From 81a0cc8c447c80d1475aa55b06a3cc240f961124 Mon Sep 17 00:00:00 2001 From: Jennifer Mah Date: Thu, 11 Mar 2021 13:57:14 -0700 Subject: [PATCH 1/3] docs: add property descriptions to docs --- .../v1/docs/AccountsV1AuthTokenPromotion.md | 14 +-- .../docs/AccountsV1CredentialCredentialAws.md | 16 +-- ...AccountsV1CredentialCredentialPublicKey.md | 16 +-- .../v1/docs/AccountsV1SecondaryAuthToken.md | 14 +-- .../v1/docs/ListCredentialAwsResponse.md | 8 +- .../v1/docs/ListCredentialAwsResponseMeta.md | 18 +-- .../docs/ListCredentialPublicKeyResponse.md | 8 +- .../model_accounts_v1_auth_token_promotion.go | 11 +- ...l_accounts_v1_credential_credential_aws.go | 18 ++- ...nts_v1_credential_credential_public_key.go | 18 ++- .../model_accounts_v1_secondary_auth_token.go | 15 ++- twilio/rest/api/v2010/README.md | 51 +------- twilio/rest/api/v2010/docs/ApiV2010Account.md | 24 ++-- .../api/v2010/docs/ApiV2010AccountAddress.md | 34 ++--- ...V2010AccountAddressDependentPhoneNumber.md | 56 ++++----- .../v2010/docs/ApiV2010AccountApplication.md | 44 +++---- .../ApiV2010AccountAuthorizedConnectApp.md | 24 ++-- ...V2010AccountAvailablePhoneNumberCountry.md | 14 +-- ...eNumberCountryAvailablePhoneNumberLocal.md | 30 ++--- ...ryAvailablePhoneNumberLocalCapabilities.md | 13 ++ ...tryAvailablePhoneNumberMachineToMachine.md | 30 ++--- ...NumberCountryAvailablePhoneNumberMobile.md | 30 ++--- ...mberCountryAvailablePhoneNumberNational.md | 30 ++--- ...erCountryAvailablePhoneNumberSharedCost.md | 30 ++--- ...mberCountryAvailablePhoneNumberTollFree.md | 30 ++--- ...neNumberCountryAvailablePhoneNumberVoip.md | 30 ++--- .../api/v2010/docs/ApiV2010AccountBalance.md | 10 +- .../api/v2010/docs/ApiV2010AccountCall.md | 58 ++++----- .../docs/ApiV2010AccountCallCallEvent.md | 8 +- .../docs/ApiV2010AccountCallCallFeedback.md | 16 +-- .../ApiV2010AccountCallCallFeedbackSummary.md | 32 ++--- ...010AccountCallCallFeedbackSummaryIssues.md | 12 ++ .../ApiV2010AccountCallCallNotification.md | 32 ++--- ...2010AccountCallCallNotificationInstance.md | 38 +++--- .../docs/ApiV2010AccountCallCallRecording.md | 40 +++--- .../v2010/docs/ApiV2010AccountCallPayments.md | 16 +-- .../v2010/docs/ApiV2010AccountConference.md | 28 ++--- ...010AccountConferenceConferenceRecording.md | 38 +++--- .../ApiV2010AccountConferenceParticipant.md | 32 ++--- .../v2010/docs/ApiV2010AccountConnectApp.md | 26 ++-- .../ApiV2010AccountIncomingPhoneNumber.md | 70 +++++------ ...0AccountIncomingPhoneNumberCapabilities.md | 13 ++ ...eNumberIncomingPhoneNumberAssignedAddOn.md | 26 ++-- ...comingPhoneNumberAssignedAddOnExtension.md | 22 ++-- ...mingPhoneNumberIncomingPhoneNumberLocal.md | 70 +++++------ ...ingPhoneNumberIncomingPhoneNumberMobile.md | 70 +++++------ ...gPhoneNumberIncomingPhoneNumberTollFree.md | 70 +++++------ .../rest/api/v2010/docs/ApiV2010AccountKey.md | 12 +- .../api/v2010/docs/ApiV2010AccountMessage.md | 44 +++---- .../v2010/docs/ApiV2010AccountMessageMedia.md | 18 +-- .../ApiV2010AccountMessageMessageFeedback.md | 16 +-- .../api/v2010/docs/ApiV2010AccountNewKey.md | 14 +-- .../docs/ApiV2010AccountNewSigningKey.md | 14 +-- .../v2010/docs/ApiV2010AccountNotification.md | 32 ++--- .../ApiV2010AccountNotificationInstance.md | 38 +++--- .../docs/ApiV2010AccountOutgoingCallerId.md | 18 +-- .../api/v2010/docs/ApiV2010AccountQueue.md | 22 ++-- .../v2010/docs/ApiV2010AccountQueueMember.md | 16 +-- .../v2010/docs/ApiV2010AccountRecording.md | 40 +++--- ...010AccountRecordingRecordingAddOnResult.md | 24 ++-- ...gAddOnResultRecordingAddOnResultPayload.md | 26 ++-- ...0AccountRecordingRecordingTranscription.md | 30 ++--- .../v2010/docs/ApiV2010AccountShortCode.md | 28 ++--- .../v2010/docs/ApiV2010AccountSigningKey.md | 12 +- .../ApiV2010AccountSipSipCredentialList.md | 18 +-- ...ccountSipSipCredentialListSipCredential.md | 18 +-- .../v2010/docs/ApiV2010AccountSipSipDomain.md | 46 +++---- ...hCallsSipAuthCallsCredentialListMapping.md | 14 +-- ...sSipAuthCallsIpAccessControlListMapping.md | 14 +-- ...pAuthRegistrationsCredentialListMapping.md | 14 +-- ...untSipSipDomainSipCredentialListMapping.md | 18 +-- ...pSipDomainSipIpAccessControlListMapping.md | 18 +-- ...piV2010AccountSipSipIpAccessControlList.md | 18 +-- ...ntSipSipIpAccessControlListSipIpAddress.md | 22 ++-- .../api/v2010/docs/ApiV2010AccountToken.md | 18 +-- .../docs/ApiV2010AccountTokenIceServers.md | 13 ++ .../docs/ApiV2010AccountTranscription.md | 30 ++--- .../docs/ApiV2010AccountUsageUsageRecord.md | 34 ++--- ...countUsageUsageRecordUsageRecordAllTime.md | 34 ++--- ...AccountUsageUsageRecordUsageRecordDaily.md | 34 ++--- ...untUsageUsageRecordUsageRecordLastMonth.md | 34 ++--- ...countUsageUsageRecordUsageRecordMonthly.md | 34 ++--- ...untUsageUsageRecordUsageRecordThisMonth.md | 34 ++--- ...AccountUsageUsageRecordUsageRecordToday.md | 34 ++--- ...ccountUsageUsageRecordUsageRecordYearly.md | 34 ++--- ...untUsageUsageRecordUsageRecordYesterday.md | 34 ++--- .../docs/ApiV2010AccountUsageUsageTrigger.md | 36 +++--- .../docs/ApiV2010AccountValidationRequest.md | 14 +-- .../api/v2010/docs/ListAccountResponse.md | 22 ++-- .../api/v2010/docs/ListAddressResponse.md | 22 ++-- .../api/v2010/docs/ListApplicationResponse.md | 22 ++-- .../docs/ListAuthorizedConnectAppResponse.md | 22 ++-- ...ListAvailablePhoneNumberCountryResponse.md | 22 ++-- .../ListAvailablePhoneNumberLocalResponse.md | 22 ++-- ...ablePhoneNumberMachineToMachineResponse.md | 22 ++-- .../ListAvailablePhoneNumberMobileResponse.md | 22 ++-- ...istAvailablePhoneNumberNationalResponse.md | 22 ++-- ...tAvailablePhoneNumberSharedCostResponse.md | 22 ++-- ...istAvailablePhoneNumberTollFreeResponse.md | 22 ++-- .../ListAvailablePhoneNumberVoipResponse.md | 22 ++-- .../api/v2010/docs/ListCallEventResponse.md | 22 ++-- .../docs/ListCallNotificationResponse.md | 22 ++-- .../v2010/docs/ListCallRecordingResponse.md | 22 ++-- .../rest/api/v2010/docs/ListCallResponse.md | 22 ++-- .../docs/ListConferenceRecordingResponse.md | 22 ++-- .../api/v2010/docs/ListConferenceResponse.md | 22 ++-- .../api/v2010/docs/ListConnectAppResponse.md | 22 ++-- .../docs/ListDependentPhoneNumberResponse.md | 22 ++-- ...oneNumberAssignedAddOnExtensionResponse.md | 22 ++-- ...ncomingPhoneNumberAssignedAddOnResponse.md | 22 ++-- .../ListIncomingPhoneNumberLocalResponse.md | 22 ++-- .../ListIncomingPhoneNumberMobileResponse.md | 22 ++-- .../docs/ListIncomingPhoneNumberResponse.md | 22 ++-- ...ListIncomingPhoneNumberTollFreeResponse.md | 22 ++-- twilio/rest/api/v2010/docs/ListKeyResponse.md | 22 ++-- .../rest/api/v2010/docs/ListMediaResponse.md | 22 ++-- .../rest/api/v2010/docs/ListMemberResponse.md | 22 ++-- .../api/v2010/docs/ListMessageResponse.md | 22 ++-- .../v2010/docs/ListNotificationResponse.md | 22 ++-- .../docs/ListOutgoingCallerIdResponse.md | 22 ++-- .../api/v2010/docs/ListParticipantResponse.md | 22 ++-- .../rest/api/v2010/docs/ListQueueResponse.md | 22 ++-- ...ListRecordingAddOnResultPayloadResponse.md | 22 ++-- .../docs/ListRecordingAddOnResultResponse.md | 22 ++-- .../api/v2010/docs/ListRecordingResponse.md | 22 ++-- .../ListRecordingTranscriptionResponse.md | 22 ++-- .../api/v2010/docs/ListShortCodeResponse.md | 22 ++-- .../api/v2010/docs/ListSigningKeyResponse.md | 22 ++-- ...pAuthCallsCredentialListMappingResponse.md | 22 ++-- ...CallsIpAccessControlListMappingResponse.md | 22 ++-- ...istrationsCredentialListMappingResponse.md | 22 ++-- .../ListSipCredentialListMappingResponse.md | 22 ++-- .../docs/ListSipCredentialListResponse.md | 22 ++-- .../v2010/docs/ListSipCredentialResponse.md | 22 ++-- .../api/v2010/docs/ListSipDomainResponse.md | 22 ++-- ...stSipIpAccessControlListMappingResponse.md | 22 ++-- .../ListSipIpAccessControlListResponse.md | 22 ++-- .../v2010/docs/ListSipIpAddressResponse.md | 22 ++-- .../v2010/docs/ListTranscriptionResponse.md | 22 ++-- .../docs/ListUsageRecordAllTimeResponse.md | 22 ++-- .../docs/ListUsageRecordDailyResponse.md | 22 ++-- .../docs/ListUsageRecordLastMonthResponse.md | 22 ++-- .../docs/ListUsageRecordMonthlyResponse.md | 22 ++-- .../api/v2010/docs/ListUsageRecordResponse.md | 22 ++-- .../docs/ListUsageRecordThisMonthResponse.md | 22 ++-- .../docs/ListUsageRecordTodayResponse.md | 22 ++-- .../docs/ListUsageRecordYearlyResponse.md | 22 ++-- .../docs/ListUsageRecordYesterdayResponse.md | 22 ++-- .../v2010/docs/ListUsageTriggerResponse.md | 22 ++-- .../rest/api/v2010/model_api_v2010_account.go | 28 +++-- .../v2010/model_api_v2010_account_address.go | 45 ++++--- ..._account_address_dependent_phone_number.go | 78 ++++++++---- .../model_api_v2010_account_application.go | 60 ++++++--- ...pi_v2010_account_authorized_connect_app.go | 30 +++-- ..._account_available_phone_number_country.go | 13 +- ...er_country_available_phone_number_local.go | 38 ++++-- ...ailable_phone_number_local_capabilities.go | 20 +++ ...ailable_phone_number_machine_to_machine.go | 38 ++++-- ...r_country_available_phone_number_mobile.go | 38 ++++-- ...country_available_phone_number_national.go | 38 ++++-- ...ntry_available_phone_number_shared_cost.go | 38 ++++-- ...ountry_available_phone_number_toll_free.go | 38 ++++-- ...ber_country_available_phone_number_voip.go | 38 ++++-- .../v2010/model_api_v2010_account_balance.go | 7 +- .../api/v2010/model_api_v2010_account_call.go | 79 ++++++++---- ...model_api_v2010_account_call_call_event.go | 4 +- ...el_api_v2010_account_call_call_feedback.go | 18 ++- ...2010_account_call_call_feedback_summary.go | 42 ++++--- ...count_call_call_feedback_summary_issues.go | 19 +++ ...pi_v2010_account_call_call_notification.go | 42 ++++--- ...account_call_call_notification_instance.go | 51 +++++--- ...l_api_v2010_account_call_call_recording.go | 52 +++++--- .../model_api_v2010_account_call_payments.go | 14 ++- .../model_api_v2010_account_conference.go | 36 ++++-- ...account_conference_conference_recording.go | 51 +++++--- ...pi_v2010_account_conference_participant.go | 42 ++++--- .../model_api_v2010_account_connect_app.go | 33 +++-- ...api_v2010_account_incoming_phone_number.go | 96 +++++++++----- ...ount_incoming_phone_number_capabilities.go | 20 +++ ...r_incoming_phone_number_assigned_add_on.go | 31 +++-- ..._phone_number_assigned_add_on_extension.go | 25 ++-- ...hone_number_incoming_phone_number_local.go | 96 +++++++++----- ...one_number_incoming_phone_number_mobile.go | 96 +++++++++----- ..._number_incoming_phone_number_toll_free.go | 96 +++++++++----- .../api/v2010/model_api_v2010_account_key.go | 10 +- .../v2010/model_api_v2010_account_message.go | 60 ++++++--- .../model_api_v2010_account_message_media.go | 15 ++- ..._v2010_account_message_message_feedback.go | 18 ++- .../v2010/model_api_v2010_account_new_key.go | 13 +- ...model_api_v2010_account_new_signing_key.go | 13 +- .../model_api_v2010_account_notification.go | 42 ++++--- ...api_v2010_account_notification_instance.go | 51 +++++--- ...el_api_v2010_account_outgoing_caller_id.go | 19 ++- .../v2010/model_api_v2010_account_queue.go | 27 ++-- .../model_api_v2010_account_queue_member.go | 16 ++- .../model_api_v2010_account_recording.go | 52 +++++--- ...count_recording_recording_add_on_result.go | 30 +++-- ..._result_recording_add_on_result_payload.go | 33 +++-- ...count_recording_recording_transcription.go | 39 ++++-- .../model_api_v2010_account_short_code.go | 36 ++++-- ...i_v2010_account_sip_sip_credential_list.go | 19 ++- ..._sip_sip_credential_list_sip_credential.go | 19 ++- .../model_api_v2010_account_sip_sip_domain.go | 63 ++++++---- ..._sip_auth_calls_credential_list_mapping.go | 13 +- ...th_calls_ip_access_control_list_mapping.go | 13 +- ...h_registrations_credential_list_mapping.go | 13 +- ..._sip_domain_sip_credential_list_mapping.go | 19 ++- ...main_sip_ip_access_control_list_mapping.go | 19 ++- ..._account_sip_sip_ip_access_control_list.go | 19 ++- ...p_ip_access_control_list_sip_ip_address.go | 25 ++-- .../v2010/model_api_v2010_account_token.go | 21 ++-- ...del_api_v2010_account_token_ice_servers.go | 20 +++ .../model_api_v2010_account_transcription.go | 39 ++++-- ...el_api_v2010_account_usage_usage_record.go | 43 ++++--- ...sage_usage_record_usage_record_all_time.go | 45 ++++--- ...t_usage_usage_record_usage_record_daily.go | 45 ++++--- ...ge_usage_record_usage_record_last_month.go | 45 ++++--- ...usage_usage_record_usage_record_monthly.go | 45 ++++--- ...ge_usage_record_usage_record_this_month.go | 45 ++++--- ...t_usage_usage_record_usage_record_today.go | 45 ++++--- ..._usage_usage_record_usage_record_yearly.go | 45 ++++--- ...age_usage_record_usage_record_yesterday.go | 45 ++++--- ...l_api_v2010_account_usage_usage_trigger.go | 48 ++++--- ...el_api_v2010_account_validation_request.go | 13 +- twilio/rest/autopilot/v1/README.md | 1 - .../autopilot/v1/docs/AutopilotV1Assistant.md | 32 ++--- .../v1/docs/AutopilotV1AssistantDefaults.md | 12 +- .../v1/docs/AutopilotV1AssistantDialogue.md | 14 +-- .../v1/docs/AutopilotV1AssistantFieldType.md | 22 ++-- ...AutopilotV1AssistantFieldTypeFieldValue.md | 24 ++-- .../v1/docs/AutopilotV1AssistantModelBuild.md | 24 ++-- .../v1/docs/AutopilotV1AssistantQuery.md | 32 ++--- .../v1/docs/AutopilotV1AssistantStyleSheet.md | 12 +- .../v1/docs/AutopilotV1AssistantTask.md | 24 ++-- .../v1/docs/AutopilotV1AssistantTaskField.md | 22 ++-- .../v1/docs/AutopilotV1AssistantTaskSample.md | 24 ++-- .../AutopilotV1AssistantTaskTaskActions.md | 14 +-- .../AutopilotV1AssistantTaskTaskStatistics.md | 16 +-- .../v1/docs/AutopilotV1AssistantWebhook.md | 24 ++-- .../v1/docs/AutopilotV1RestoreAssistant.md | 28 ++--- .../v1/docs/ListAssistantResponse.md | 8 +- .../v1/docs/ListAssistantResponseMeta.md | 18 +-- .../autopilot/v1/docs/ListFieldResponse.md | 8 +- .../v1/docs/ListFieldTypeResponse.md | 8 +- .../v1/docs/ListFieldValueResponse.md | 8 +- .../v1/docs/ListModelBuildResponse.md | 8 +- .../autopilot/v1/docs/ListQueryResponse.md | 8 +- .../autopilot/v1/docs/ListSampleResponse.md | 8 +- .../autopilot/v1/docs/ListTaskResponse.md | 8 +- .../autopilot/v1/docs/ListWebhookResponse.md | 8 +- .../v1/model_autopilot_v1_assistant.go | 42 ++++--- .../model_autopilot_v1_assistant_defaults.go | 12 +- .../model_autopilot_v1_assistant_dialogue.go | 15 ++- ...model_autopilot_v1_assistant_field_type.go | 27 ++-- ...lot_v1_assistant_field_type_field_value.go | 30 +++-- ...odel_autopilot_v1_assistant_model_build.go | 30 +++-- .../v1/model_autopilot_v1_assistant_query.go | 42 ++++--- ...odel_autopilot_v1_assistant_style_sheet.go | 12 +- .../v1/model_autopilot_v1_assistant_task.go | 30 +++-- ...model_autopilot_v1_assistant_task_field.go | 27 ++-- ...odel_autopilot_v1_assistant_task_sample.go | 30 +++-- ...utopilot_v1_assistant_task_task_actions.go | 15 ++- ...pilot_v1_assistant_task_task_statistics.go | 16 ++- .../model_autopilot_v1_assistant_webhook.go | 30 +++-- .../model_autopilot_v1_restore_assistant.go | 36 ++++-- .../v1/docs/BulkexportsV1Export.md | 10 +- .../docs/BulkexportsV1ExportConfiguration.md | 14 +-- .../v1/docs/BulkexportsV1ExportDay.md | 14 +-- .../v1/docs/BulkexportsV1ExportDayInstance.md | 6 +- .../BulkexportsV1ExportExportCustomJob.md | 22 ++-- .../v1/docs/BulkexportsV1ExportJob.md | 24 ++-- .../bulkexports/v1/docs/ListDayResponse.md | 8 +- .../v1/docs/ListDayResponseMeta.md | 18 +-- .../v1/docs/ListExportCustomJobResponse.md | 8 +- .../v1/model_bulkexports_v1_export.go | 9 +- ...del_bulkexports_v1_export_configuration.go | 13 +- .../v1/model_bulkexports_v1_export_day.go | 11 +- ...bulkexports_v1_export_export_custom_job.go | 27 ++-- .../v1/model_bulkexports_v1_export_job.go | 29 +++-- twilio/rest/chat/v1/README.md | 4 - twilio/rest/chat/v1/docs/ChatV1Credential.md | 20 +-- twilio/rest/chat/v1/docs/ChatV1Service.md | 46 +++---- .../rest/chat/v1/docs/ChatV1ServiceChannel.md | 32 ++--- .../v1/docs/ChatV1ServiceChannelInvite.md | 24 ++-- .../v1/docs/ChatV1ServiceChannelMember.md | 26 ++-- .../v1/docs/ChatV1ServiceChannelMessage.md | 30 ++--- twilio/rest/chat/v1/docs/ChatV1ServiceRole.md | 22 ++-- twilio/rest/chat/v1/docs/ChatV1ServiceUser.md | 32 ++--- .../v1/docs/ChatV1ServiceUserUserChannel.md | 20 +-- .../rest/chat/v1/docs/ListChannelResponse.md | 8 +- .../chat/v1/docs/ListCredentialResponse.md | 8 +- .../v1/docs/ListCredentialResponseMeta.md | 18 +-- .../rest/chat/v1/docs/ListInviteResponse.md | 8 +- .../rest/chat/v1/docs/ListMemberResponse.md | 8 +- .../rest/chat/v1/docs/ListMessageResponse.md | 8 +- twilio/rest/chat/v1/docs/ListRoleResponse.md | 8 +- .../rest/chat/v1/docs/ListServiceResponse.md | 8 +- .../chat/v1/docs/ListUserChannelResponse.md | 8 +- twilio/rest/chat/v1/docs/ListUserResponse.md | 8 +- .../rest/chat/v1/model_chat_v1_credential.go | 24 ++-- twilio/rest/chat/v1/model_chat_v1_service.go | 63 ++++++---- .../chat/v1/model_chat_v1_service_channel.go | 42 ++++--- .../model_chat_v1_service_channel_invite.go | 26 ++-- .../model_chat_v1_service_channel_member.go | 31 +++-- .../model_chat_v1_service_channel_message.go | 35 ++++-- .../chat/v1/model_chat_v1_service_role.go | 27 ++-- .../chat/v1/model_chat_v1_service_user.go | 42 ++++--- ...model_chat_v1_service_user_user_channel.go | 24 ++-- twilio/rest/chat/v2/README.md | 7 -- twilio/rest/chat/v2/docs/ChatV2Credential.md | 20 +-- twilio/rest/chat/v2/docs/ChatV2Service.md | 50 ++++---- .../rest/chat/v2/docs/ChatV2ServiceBinding.md | 28 ++--- .../rest/chat/v2/docs/ChatV2ServiceChannel.md | 32 ++--- .../ChatV2ServiceChannelChannelWebhook.md | 22 ++-- .../v2/docs/ChatV2ServiceChannelInvite.md | 24 ++-- .../v2/docs/ChatV2ServiceChannelMember.md | 28 ++--- .../v2/docs/ChatV2ServiceChannelMessage.md | 36 +++--- twilio/rest/chat/v2/docs/ChatV2ServiceRole.md | 22 ++-- twilio/rest/chat/v2/docs/ChatV2ServiceUser.md | 32 ++--- .../v2/docs/ChatV2ServiceUserUserBinding.md | 28 ++--- .../v2/docs/ChatV2ServiceUserUserChannel.md | 26 ++-- .../rest/chat/v2/docs/ListBindingResponse.md | 8 +- .../rest/chat/v2/docs/ListChannelResponse.md | 8 +- .../v2/docs/ListChannelWebhookResponse.md | 8 +- .../chat/v2/docs/ListCredentialResponse.md | 8 +- .../v2/docs/ListCredentialResponseMeta.md | 18 +-- .../rest/chat/v2/docs/ListInviteResponse.md | 8 +- .../rest/chat/v2/docs/ListMemberResponse.md | 8 +- .../rest/chat/v2/docs/ListMessageResponse.md | 8 +- twilio/rest/chat/v2/docs/ListRoleResponse.md | 8 +- .../rest/chat/v2/docs/ListServiceResponse.md | 8 +- .../chat/v2/docs/ListUserBindingResponse.md | 8 +- .../chat/v2/docs/ListUserChannelResponse.md | 8 +- twilio/rest/chat/v2/docs/ListUserResponse.md | 8 +- .../rest/chat/v2/model_chat_v2_credential.go | 24 ++-- twilio/rest/chat/v2/model_chat_v2_service.go | 69 +++++++---- .../chat/v2/model_chat_v2_service_binding.go | 36 ++++-- .../chat/v2/model_chat_v2_service_channel.go | 42 ++++--- ...chat_v2_service_channel_channel_webhook.go | 25 ++-- .../model_chat_v2_service_channel_invite.go | 26 ++-- .../model_chat_v2_service_channel_member.go | 34 +++-- .../model_chat_v2_service_channel_message.go | 48 ++++--- .../chat/v2/model_chat_v2_service_role.go | 27 ++-- .../chat/v2/model_chat_v2_service_user.go | 42 ++++--- ...model_chat_v2_service_user_user_binding.go | 36 ++++-- ...model_chat_v2_service_user_user_channel.go | 33 +++-- twilio/rest/conversations/v1/README.md | 10 -- .../v1/docs/ConversationsV1Configuration.md | 18 +-- ...ionsV1ConfigurationConfigurationWebhook.md | 18 +-- .../v1/docs/ConversationsV1Conversation.md | 30 ++--- ...ationsV1ConversationConversationMessage.md | 32 ++--- ...sationMessageConversationMessageReceipt.md | 26 ++-- ...nsV1ConversationConversationParticipant.md | 28 ++--- ...V1ConversationConversationScopedWebhook.md | 20 +-- .../v1/docs/ConversationsV1Credential.md | 20 +-- .../v1/docs/ConversationsV1Role.md | 22 ++-- .../v1/docs/ConversationsV1Service.md | 18 +-- .../ConversationsV1ServiceServiceBinding.md | 26 ++-- ...versationsV1ServiceServiceConfiguration.md | 18 +-- ...ServiceConfigurationServiceNotification.md | 18 +-- ...nversationsV1ServiceServiceConversation.md | 30 ++--- ...eConversationServiceConversationMessage.md | 34 ++--- ...essageServiceConversationMessageReceipt.md | 28 ++--- ...versationServiceConversationParticipant.md | 30 ++--- ...rsationServiceConversationScopedWebhook.md | 22 ++-- .../docs/ConversationsV1ServiceServiceRole.md | 22 ++-- .../docs/ConversationsV1ServiceServiceUser.md | 28 ++--- .../v1/docs/ConversationsV1User.md | 28 ++--- .../ListConversationMessageReceiptResponse.md | 8 +- .../docs/ListConversationMessageResponse.md | 8 +- .../ListConversationParticipantResponse.md | 8 +- .../v1/docs/ListConversationResponse.md | 8 +- .../v1/docs/ListConversationResponseMeta.md | 18 +-- .../ListConversationScopedWebhookResponse.md | 8 +- .../v1/docs/ListCredentialResponse.md | 8 +- .../conversations/v1/docs/ListRoleResponse.md | 8 +- .../v1/docs/ListServiceBindingResponse.md | 8 +- ...rviceConversationMessageReceiptResponse.md | 8 +- .../ListServiceConversationMessageResponse.md | 8 +- ...tServiceConversationParticipantResponse.md | 8 +- .../docs/ListServiceConversationResponse.md | 8 +- ...erviceConversationScopedWebhookResponse.md | 8 +- .../v1/docs/ListServiceResponse.md | 8 +- .../v1/docs/ListServiceRoleResponse.md | 8 +- .../v1/docs/ListServiceUserResponse.md | 8 +- .../conversations/v1/docs/ListUserResponse.md | 8 +- .../model_conversations_v1_configuration.go | 21 ++-- ..._v1_configuration_configuration_webhook.go | 21 ++-- .../v1/model_conversations_v1_conversation.go | 39 ++++-- ...ns_v1_conversation_conversation_message.go | 42 ++++--- ...on_message_conversation_message_receipt.go | 33 +++-- ...1_conversation_conversation_participant.go | 36 ++++-- ...onversation_conversation_scoped_webhook.go | 24 ++-- .../v1/model_conversations_v1_credential.go | 24 ++-- .../v1/model_conversations_v1_role.go | 27 ++-- .../v1/model_conversations_v1_service.go | 21 ++-- ...onversations_v1_service_service_binding.go | 33 +++-- ...ations_v1_service_service_configuration.go | 21 ++-- ...vice_configuration_service_notification.go | 19 ++- ...sations_v1_service_service_conversation.go | 39 ++++-- ...nversation_service_conversation_message.go | 45 ++++--- ...ge_service_conversation_message_receipt.go | 36 ++++-- ...sation_service_conversation_participant.go | 39 ++++-- ...ion_service_conversation_scoped_webhook.go | 27 ++-- ...l_conversations_v1_service_service_role.go | 27 ++-- ...l_conversations_v1_service_service_user.go | 36 ++++-- .../v1/model_conversations_v1_user.go | 36 ++++-- twilio/rest/events/v1/README.md | 2 - .../rest/events/v1/docs/EventsV1EventType.md | 18 +-- twilio/rest/events/v1/docs/EventsV1Schema.md | 14 +-- .../events/v1/docs/EventsV1SchemaVersion.md | 14 +-- twilio/rest/events/v1/docs/EventsV1Sink.md | 22 ++-- .../events/v1/docs/EventsV1SinkSinkTest.md | 6 +- .../v1/docs/EventsV1SinkSinkValidate.md | 6 +- .../events/v1/docs/EventsV1Subscription.md | 20 +-- .../EventsV1SubscriptionSubscribedEvent.md | 14 +-- .../events/v1/docs/ListEventTypeResponse.md | 8 +- .../rest/events/v1/docs/ListSinkResponse.md | 8 +- .../v1/docs/ListSubscribedEventResponse.md | 8 +- .../v1/docs/ListSubscriptionResponse.md | 8 +- .../events/v1/docs/ListVersionResponse.md | 8 +- .../events/v1/docs/ListVersionResponseMeta.md | 18 +-- .../events/v1/model_events_v1_event_type.go | 16 ++- .../rest/events/v1/model_events_v1_schema.go | 15 ++- .../v1/model_events_v1_schema_version.go | 14 ++- twilio/rest/events/v1/model_events_v1_sink.go | 25 ++-- .../v1/model_events_v1_sink_sink_test_.go | 1 + .../v1/model_events_v1_sink_sink_validate.go | 1 + .../events/v1/model_events_v1_subscription.go | 24 ++-- ...events_v1_subscription_subscribed_event.go | 13 +- twilio/rest/fax/v1/README.md | 3 - twilio/rest/fax/v1/docs/FaxV1Fax.md | 40 +++--- twilio/rest/fax/v1/docs/FaxV1FaxFaxMedia.md | 18 +-- .../rest/fax/v1/docs/ListFaxMediaResponse.md | 8 +- twilio/rest/fax/v1/docs/ListFaxResponse.md | 8 +- .../rest/fax/v1/docs/ListFaxResponseMeta.md | 18 +-- twilio/rest/fax/v1/model_fax_v1_fax.go | 54 +++++--- .../rest/fax/v1/model_fax_v1_fax_fax_media.go | 17 ++- twilio/rest/flex/v1/README.md | 3 - twilio/rest/flex/v1/docs/FlexV1Channel.md | 20 +-- .../rest/flex/v1/docs/FlexV1Configuration.md | 82 ++++++------ twilio/rest/flex/v1/docs/FlexV1FlexFlow.md | 32 ++--- twilio/rest/flex/v1/docs/FlexV1WebChannel.md | 16 +-- .../rest/flex/v1/docs/ListChannelResponse.md | 8 +- .../flex/v1/docs/ListChannelResponseMeta.md | 18 +-- .../rest/flex/v1/docs/ListFlexFlowResponse.md | 8 +- .../flex/v1/docs/ListWebChannelResponse.md | 8 +- twilio/rest/flex/v1/model_flex_v1_channel.go | 20 ++- .../flex/v1/model_flex_v1_configuration.go | 117 ++++++++++++------ .../rest/flex/v1/model_flex_v1_flex_flow.go | 42 ++++--- .../rest/flex/v1/model_flex_v1_web_channel.go | 14 ++- twilio/rest/insights/v1/README.md | 18 --- .../rest/insights/v1/docs/InsightsV1Call.md | 10 +- .../insights/v1/docs/InsightsV1CallEvent.md | 26 ++-- .../insights/v1/docs/InsightsV1CallMetric.md | 22 ++-- .../insights/v1/docs/InsightsV1CallSummary.md | 46 +++---- .../v1/docs/InsightsV1VideoRoomSummary.md | 56 ++++----- ...VideoRoomSummaryVideoParticipantSummary.md | 38 +++--- .../insights/v1/docs/ListEventResponse.md | 8 +- .../insights/v1/docs/ListMetricResponse.md | 8 +- .../ListVideoParticipantSummaryResponse.md | 8 +- .../v1/docs/ListVideoRoomSummaryResponse.md | 8 +- .../docs/ListVideoRoomSummaryResponseMeta.md | 18 +-- .../v1/model_insights_v1_call_event.go | 4 +- .../v1/model_insights_v1_call_metric.go | 4 +- .../v1/model_insights_v1_call_summary.go | 6 +- .../model_insights_v1_video_room_summary.go | 52 ++++---- ..._room_summary_video_participant_summary.go | 34 ++--- twilio/rest/ip_messaging/v1/README.md | 4 - .../v1/docs/IpMessagingV1Credential.md | 20 +-- .../v1/docs/IpMessagingV1Service.md | 46 +++---- .../v1/docs/IpMessagingV1ServiceChannel.md | 32 ++--- .../docs/IpMessagingV1ServiceChannelInvite.md | 24 ++-- .../docs/IpMessagingV1ServiceChannelMember.md | 26 ++-- .../IpMessagingV1ServiceChannelMessage.md | 30 ++--- .../v1/docs/IpMessagingV1ServiceRole.md | 22 ++-- .../v1/docs/IpMessagingV1ServiceUser.md | 32 ++--- .../IpMessagingV1ServiceUserUserChannel.md | 20 +-- .../v1/docs/ListChannelResponse.md | 8 +- .../v1/docs/ListCredentialResponse.md | 8 +- .../v1/docs/ListCredentialResponseMeta.md | 18 +-- .../v1/docs/ListInviteResponse.md | 8 +- .../v1/docs/ListMemberResponse.md | 8 +- .../v1/docs/ListMessageResponse.md | 8 +- .../ip_messaging/v1/docs/ListRoleResponse.md | 8 +- .../v1/docs/ListServiceResponse.md | 8 +- .../v1/docs/ListUserChannelResponse.md | 8 +- .../ip_messaging/v1/docs/ListUserResponse.md | 8 +- .../v1/model_ip_messaging_v1_credential.go | 16 +-- .../model_ip_messaging_v1_service_channel.go | 2 +- .../v1/model_ip_messaging_v1_service_role.go | 18 +-- ..._messaging_v1_service_user_user_channel.go | 16 +-- twilio/rest/ip_messaging/v2/README.md | 7 -- .../v2/docs/IpMessagingV2Credential.md | 20 +-- .../v2/docs/IpMessagingV2Service.md | 50 ++++---- .../v2/docs/IpMessagingV2ServiceBinding.md | 28 ++--- .../v2/docs/IpMessagingV2ServiceChannel.md | 32 ++--- ...MessagingV2ServiceChannelChannelWebhook.md | 22 ++-- .../docs/IpMessagingV2ServiceChannelInvite.md | 24 ++-- .../docs/IpMessagingV2ServiceChannelMember.md | 28 ++--- .../IpMessagingV2ServiceChannelMessage.md | 36 +++--- .../v2/docs/IpMessagingV2ServiceRole.md | 22 ++-- .../v2/docs/IpMessagingV2ServiceUser.md | 32 ++--- .../IpMessagingV2ServiceUserUserBinding.md | 28 ++--- .../IpMessagingV2ServiceUserUserChannel.md | 26 ++-- .../v2/docs/ListBindingResponse.md | 8 +- .../v2/docs/ListChannelResponse.md | 8 +- .../v2/docs/ListChannelWebhookResponse.md | 8 +- .../v2/docs/ListCredentialResponse.md | 8 +- .../v2/docs/ListCredentialResponseMeta.md | 18 +-- .../v2/docs/ListInviteResponse.md | 8 +- .../v2/docs/ListMemberResponse.md | 8 +- .../v2/docs/ListMessageResponse.md | 8 +- .../ip_messaging/v2/docs/ListRoleResponse.md | 8 +- .../v2/docs/ListServiceResponse.md | 8 +- .../v2/docs/ListUserBindingResponse.md | 8 +- .../v2/docs/ListUserChannelResponse.md | 8 +- .../ip_messaging/v2/docs/ListUserResponse.md | 8 +- .../v2/model_ip_messaging_v2_credential.go | 16 +-- .../model_ip_messaging_v2_service_binding.go | 2 +- .../model_ip_messaging_v2_service_channel.go | 2 +- .../v2/model_ip_messaging_v2_service_role.go | 18 +-- ..._messaging_v2_service_user_user_binding.go | 24 ++-- ..._messaging_v2_service_user_user_channel.go | 22 ++-- .../lookups/v1/docs/LookupsV1PhoneNumber.md | 18 +-- .../v1/model_lookups_v1_phone_number.go | 21 ++-- twilio/rest/messaging/v1/README.md | 3 - .../v1/docs/ListAlphaSenderResponse.md | 8 +- .../v1/docs/ListBrandRegistrationsResponse.md | 8 +- .../v1/docs/ListPhoneNumberResponse.md | 8 +- .../messaging/v1/docs/ListServiceResponse.md | 8 +- .../v1/docs/ListServiceResponseMeta.md | 18 +-- .../v1/docs/ListShortCodeResponse.md | 8 +- .../v1/docs/MessagingV1BrandRegistrations.md | 24 ++-- .../v1/docs/MessagingV1Deactivation.md | 6 +- .../messaging/v1/docs/MessagingV1Service.md | 44 +++---- .../v1/docs/MessagingV1ServiceAlphaSender.md | 20 +-- .../v1/docs/MessagingV1ServicePhoneNumber.md | 22 ++-- .../v1/docs/MessagingV1ServiceShortCode.md | 22 ++-- .../model_messaging_v1_brand_registrations.go | 30 +++-- .../v1/model_messaging_v1_deactivation.go | 1 + .../v1/model_messaging_v1_service.go | 60 ++++++--- ...model_messaging_v1_service_alpha_sender.go | 24 ++-- ...model_messaging_v1_service_phone_number.go | 27 ++-- .../model_messaging_v1_service_short_code.go | 27 ++-- twilio/rest/monitor/v1/README.md | 1 - .../rest/monitor/v1/docs/ListAlertResponse.md | 8 +- .../monitor/v1/docs/ListAlertResponseMeta.md | 18 +-- .../rest/monitor/v1/docs/ListEventResponse.md | 8 +- twilio/rest/monitor/v1/docs/MonitorV1Alert.md | 34 ++--- .../monitor/v1/docs/MonitorV1AlertInstance.md | 42 +++---- twilio/rest/monitor/v1/docs/MonitorV1Event.md | 32 ++--- .../rest/monitor/v1/model_monitor_v1_alert.go | 45 ++++--- .../v1/model_monitor_v1_alert_instance.go | 57 ++++++--- .../rest/monitor/v1/model_monitor_v1_event.go | 42 ++++--- twilio/rest/notify/v1/README.md | 2 - .../notify/v1/docs/ListBindingResponse.md | 8 +- .../notify/v1/docs/ListCredentialResponse.md | 8 +- .../v1/docs/ListCredentialResponseMeta.md | 18 +-- .../notify/v1/docs/ListServiceResponse.md | 8 +- .../rest/notify/v1/docs/NotifyV1Credential.md | 20 +-- twilio/rest/notify/v1/docs/NotifyV1Service.md | 44 +++---- .../notify/v1/docs/NotifyV1ServiceBinding.md | 32 ++--- .../v1/docs/NotifyV1ServiceNotification.md | 44 +++---- .../notify/v1/model_notify_v1_credential.go | 24 ++-- .../rest/notify/v1/model_notify_v1_service.go | 60 ++++++--- .../v1/model_notify_v1_service_binding.go | 42 ++++--- .../model_notify_v1_service_notification.go | 58 ++++++--- twilio/rest/numbers/v2/README.md | 5 - .../numbers/v2/docs/ListBundleResponse.md | 8 +- .../numbers/v2/docs/ListBundleResponseMeta.md | 18 +-- .../numbers/v2/docs/ListEndUserResponse.md | 8 +- .../v2/docs/ListEndUserTypeResponse.md | 8 +- .../numbers/v2/docs/ListEvaluationResponse.md | 8 +- .../v2/docs/ListItemAssignmentResponse.md | 8 +- .../numbers/v2/docs/ListRegulationResponse.md | 8 +- .../v2/docs/ListSupportingDocumentResponse.md | 8 +- .../ListSupportingDocumentTypeResponse.md | 8 +- .../NumbersV2RegulatoryComplianceBundle.md | 28 ++--- ...sV2RegulatoryComplianceBundleEvaluation.md | 20 +-- ...egulatoryComplianceBundleItemAssignment.md | 16 +-- .../NumbersV2RegulatoryComplianceEndUser.md | 20 +-- ...umbersV2RegulatoryComplianceEndUserType.md | 14 +-- ...NumbersV2RegulatoryComplianceRegulation.md | 18 +-- ...2RegulatoryComplianceSupportingDocument.md | 24 ++-- ...ulatoryComplianceSupportingDocumentType.md | 14 +-- ...numbers_v2_regulatory_compliance_bundle.go | 36 ++++-- ...regulatory_compliance_bundle_evaluation.go | 22 ++-- ...atory_compliance_bundle_item_assignment.go | 16 ++- ...mbers_v2_regulatory_compliance_end_user.go | 24 ++-- ..._v2_regulatory_compliance_end_user_type.go | 15 ++- ...ers_v2_regulatory_compliance_regulation.go | 19 ++- ...gulatory_compliance_supporting_document.go | 30 +++-- ...ory_compliance_supporting_document_type.go | 15 ++- twilio/rest/pricing/v1/README.md | 7 +- .../v1/docs/ListMessagingCountryResponse.md | 8 +- .../docs/ListMessagingCountryResponseMeta.md | 18 +-- .../v1/docs/ListPhoneNumberCountryResponse.md | 8 +- .../v1/docs/ListVoiceCountryResponse.md | 8 +- .../pricing/v1/docs/PricingV1Messaging.md | 10 +- .../PricingV1MessagingMessagingCountry.md | 10 +- ...cingV1MessagingMessagingCountryInstance.md | 16 +-- ...essagingCountryInstanceInboundSmsPrices.md | 12 ++ ...ssagingCountryInstanceOutboundSmsPrices.md | 13 ++ .../pricing/v1/docs/PricingV1PhoneNumber.md | 10 +- .../PricingV1PhoneNumberPhoneNumberCountry.md | 10 +- ...V1PhoneNumberPhoneNumberCountryInstance.md | 14 +-- twilio/rest/pricing/v1/docs/PricingV1Voice.md | 10 +- .../v1/docs/PricingV1VoiceVoiceCountry.md | 10 +- .../PricingV1VoiceVoiceCountryInstance.md | 16 +-- ...oiceCountryInstanceOutboundPrefixPrices.md | 13 ++ .../v1/docs/PricingV1VoiceVoiceNumber.md | 18 +-- ...icingV1VoiceVoiceNumberInboundCallPrice.md | 12 ++ ...cingV1VoiceVoiceNumberOutboundCallPrice.md | 11 ++ ..._pricing_v1_messaging_messaging_country.go | 7 +- ...v1_messaging_messaging_country_instance.go | 18 ++- ...ing_country_instance_inbound_sms_prices.go | 19 +++ ...ng_country_instance_outbound_sms_prices.go | 20 +++ ...ng_v1_phone_number_phone_number_country.go | 7 +- ...ne_number_phone_number_country_instance.go | 15 ++- .../model_pricing_v1_voice_voice_country.go | 7 +- ...pricing_v1_voice_voice_country_instance.go | 18 ++- ...country_instance_outbound_prefix_prices.go | 20 +++ .../v1/model_pricing_v1_voice_voice_number.go | 19 +-- ...1_voice_voice_number_inbound_call_price.go | 19 +++ ..._voice_voice_number_outbound_call_price.go | 18 +++ twilio/rest/pricing/v2/README.md | 5 +- .../v2/docs/ListVoiceCountryResponse.md | 8 +- .../v2/docs/ListVoiceCountryResponseMeta.md | 18 +-- twilio/rest/pricing/v2/docs/PricingV2Voice.md | 10 +- .../v2/docs/PricingV2VoiceVoiceCountry.md | 10 +- .../PricingV2VoiceVoiceCountryInstance.md | 16 +-- ...ceVoiceCountryInstanceInboundCallPrices.md | 12 ++ ...oiceCountryInstanceOutboundPrefixPrices.md | 14 +++ .../v2/docs/PricingV2VoiceVoiceNumber.md | 20 +-- ...icingV2VoiceVoiceNumberInboundCallPrice.md | 12 ++ ...ingV2VoiceVoiceNumberOutboundCallPrices.md | 12 ++ .../rest/pricing/v2/model_pricing_v2_voice.go | 7 +- .../model_pricing_v2_voice_voice_country.go | 7 +- ...pricing_v2_voice_voice_country_instance.go | 18 ++- ...ce_country_instance_inbound_call_prices.go | 19 +++ ...country_instance_outbound_prefix_prices.go | 21 ++++ .../v2/model_pricing_v2_voice_voice_number.go | 23 ++-- ...2_voice_voice_number_inbound_call_price.go | 19 +++ ...voice_voice_number_outbound_call_prices.go | 19 +++ twilio/rest/proxy/v1/README.md | 11 +- .../proxy/v1/docs/ListInteractionResponse.md | 8 +- .../v1/docs/ListMessageInteractionResponse.md | 8 +- .../proxy/v1/docs/ListParticipantResponse.md | 8 +- .../proxy/v1/docs/ListPhoneNumberResponse.md | 8 +- .../rest/proxy/v1/docs/ListServiceResponse.md | 8 +- .../proxy/v1/docs/ListServiceResponseMeta.md | 18 +-- .../rest/proxy/v1/docs/ListSessionResponse.md | 8 +- .../proxy/v1/docs/ListShortCodeResponse.md | 8 +- twilio/rest/proxy/v1/docs/ProxyV1Service.md | 32 ++--- .../v1/docs/ProxyV1ServicePhoneNumber.md | 28 ++--- .../ProxyV1ServicePhoneNumberCapabilities.md | 13 ++ .../proxy/v1/docs/ProxyV1ServiceSession.md | 36 +++--- .../docs/ProxyV1ServiceSessionInteraction.md | 42 +++---- .../docs/ProxyV1ServiceSessionParticipant.md | 30 ++--- ...iceSessionParticipantMessageInteraction.md | 44 +++---- .../proxy/v1/docs/ProxyV1ServiceShortCode.md | 24 ++-- .../ProxyV1ServiceShortCodeCapabilities.md | 13 ++ .../rest/proxy/v1/model_proxy_v1_service.go | 42 ++++--- .../v1/model_proxy_v1_service_phone_number.go | 35 ++++-- ...xy_v1_service_phone_number_capabilities.go | 20 +++ .../v1/model_proxy_v1_service_session.go | 48 ++++--- ...el_proxy_v1_service_session_interaction.go | 57 ++++++--- ...el_proxy_v1_service_session_participant.go | 39 ++++-- ...session_participant_message_interaction.go | 60 ++++++--- .../v1/model_proxy_v1_service_short_code.go | 29 +++-- ...roxy_v1_service_short_code_capabilities.go | 20 +++ twilio/rest/serverless/v1/README.md | 6 - .../serverless/v1/docs/ListAssetResponse.md | 8 +- .../v1/docs/ListAssetVersionResponse.md | 8 +- .../serverless/v1/docs/ListBuildResponse.md | 8 +- .../v1/docs/ListDeploymentResponse.md | 8 +- .../v1/docs/ListEnvironmentResponse.md | 8 +- .../v1/docs/ListFunctionResponse.md | 8 +- .../v1/docs/ListFunctionVersionResponse.md | 8 +- .../serverless/v1/docs/ListLogResponse.md | 8 +- .../serverless/v1/docs/ListServiceResponse.md | 8 +- .../v1/docs/ListServiceResponseMeta.md | 18 +-- .../v1/docs/ListVariableResponse.md | 8 +- .../serverless/v1/docs/ServerlessV1Service.md | 24 ++-- .../v1/docs/ServerlessV1ServiceAsset.md | 20 +-- .../ServerlessV1ServiceAssetAssetVersion.md | 20 +-- .../v1/docs/ServerlessV1ServiceBuild.md | 28 ++--- .../ServerlessV1ServiceBuildBuildStatus.md | 14 +-- .../v1/docs/ServerlessV1ServiceEnvironment.md | 26 ++-- ...erverlessV1ServiceEnvironmentDeployment.md | 20 +-- .../docs/ServerlessV1ServiceEnvironmentLog.md | 28 ++--- .../ServerlessV1ServiceEnvironmentVariable.md | 22 ++-- .../v1/docs/ServerlessV1ServiceFunction.md | 20 +-- ...verlessV1ServiceFunctionFunctionVersion.md | 22 ++-- ...onFunctionVersionFunctionVersionContent.md | 16 +-- .../v1/model_serverless_v1_service.go | 30 +++-- .../v1/model_serverless_v1_service_asset.go | 24 ++-- ...rverless_v1_service_asset_asset_version.go | 24 ++-- .../v1/model_serverless_v1_service_build.go | 31 +++-- ...erverless_v1_service_build_build_status.go | 15 ++- ...model_serverless_v1_service_environment.go | 33 +++-- ...rless_v1_service_environment_deployment.go | 24 ++-- ...l_serverless_v1_service_environment_log.go | 36 ++++-- ...verless_v1_service_environment_variable.go | 27 ++-- .../model_serverless_v1_service_function.go | 24 ++-- ...ss_v1_service_function_function_version.go | 26 ++-- ...nction_version_function_version_content.go | 15 ++- twilio/rest/studio/v1/README.md | 3 - .../studio/v1/docs/ListEngagementResponse.md | 8 +- .../studio/v1/docs/ListExecutionResponse.md | 8 +- .../v1/docs/ListExecutionStepResponse.md | 8 +- .../rest/studio/v1/docs/ListFlowResponse.md | 8 +- .../studio/v1/docs/ListFlowResponseMeta.md | 18 +-- .../rest/studio/v1/docs/ListStepResponse.md | 8 +- twilio/rest/studio/v1/docs/StudioV1Flow.md | 22 ++-- .../studio/v1/docs/StudioV1FlowEngagement.md | 26 ++-- ...StudioV1FlowEngagementEngagementContext.md | 14 +-- .../v1/docs/StudioV1FlowEngagementStep.md | 28 ++--- .../StudioV1FlowEngagementStepStepContext.md | 16 +-- .../studio/v1/docs/StudioV1FlowExecution.md | 26 ++-- .../StudioV1FlowExecutionExecutionContext.md | 14 +-- .../StudioV1FlowExecutionExecutionStep.md | 28 ++--- ...cutionExecutionStepExecutionStepContext.md | 16 +-- twilio/rest/studio/v1/model_studio_v1_flow.go | 27 ++-- .../v1/model_studio_v1_flow_engagement.go | 33 +++-- ...o_v1_flow_engagement_engagement_context.go | 15 ++- .../model_studio_v1_flow_engagement_step.go | 36 ++++-- ...io_v1_flow_engagement_step_step_context.go | 18 ++- .../v1/model_studio_v1_flow_execution.go | 33 +++-- ...dio_v1_flow_execution_execution_context.go | 15 ++- ...studio_v1_flow_execution_execution_step.go | 36 ++++-- ...n_execution_step_execution_step_context.go | 18 ++- twilio/rest/studio/v2/README.md | 3 - .../studio/v2/docs/ListExecutionResponse.md | 8 +- .../v2/docs/ListExecutionStepResponse.md | 8 +- .../rest/studio/v2/docs/ListFlowResponse.md | 8 +- .../studio/v2/docs/ListFlowResponseMeta.md | 18 +-- .../v2/docs/ListFlowRevisionResponse.md | 8 +- twilio/rest/studio/v2/docs/StudioV2Flow.md | 34 ++--- .../studio/v2/docs/StudioV2FlowExecution.md | 24 ++-- .../StudioV2FlowExecutionExecutionContext.md | 14 +-- .../StudioV2FlowExecutionExecutionStep.md | 28 ++--- ...cutionExecutionStepExecutionStepContext.md | 16 +-- .../v2/docs/StudioV2FlowFlowRevision.md | 28 ++--- .../studio/v2/docs/StudioV2FlowTestUser.md | 10 +- .../studio/v2/docs/StudioV2FlowValidate.md | 6 +- twilio/rest/studio/v2/model_studio_v2_flow.go | 44 ++++--- .../v2/model_studio_v2_flow_execution.go | 30 +++-- ...dio_v2_flow_execution_execution_context.go | 15 ++- ...studio_v2_flow_execution_execution_step.go | 36 ++++-- ...n_execution_step_execution_step_context.go | 18 ++- .../v2/model_studio_v2_flow_flow_revision.go | 36 ++++-- .../v2/model_studio_v2_flow_test_user.go | 7 +- .../v2/model_studio_v2_flow_validate.go | 1 + twilio/rest/supersim/v1/README.md | 5 - .../supersim/v1/docs/ListCommandResponse.md | 8 +- .../v1/docs/ListCommandResponseMeta.md | 18 +-- .../supersim/v1/docs/ListFleetResponse.md | 8 +- ...ListNetworkAccessProfileNetworkResponse.md | 8 +- .../docs/ListNetworkAccessProfileResponse.md | 8 +- .../supersim/v1/docs/ListNetworkResponse.md | 8 +- .../rest/supersim/v1/docs/ListSimResponse.md | 8 +- .../v1/docs/ListUsageRecordResponse.md | 8 +- .../supersim/v1/docs/SupersimV1Command.md | 22 ++-- .../rest/supersim/v1/docs/SupersimV1Fleet.md | 30 ++--- .../supersim/v1/docs/SupersimV1Network.md | 14 +-- .../v1/docs/SupersimV1NetworkAccessProfile.md | 18 +-- ...ccessProfileNetworkAccessProfileNetwork.md | 16 +-- twilio/rest/supersim/v1/docs/SupersimV1Sim.md | 22 ++-- .../supersim/v1/docs/SupersimV1UsageRecord.md | 22 ++-- .../supersim/v1/model_supersim_v1_command.go | 27 ++-- .../supersim/v1/model_supersim_v1_fleet.go | 39 ++++-- .../supersim/v1/model_supersim_v1_network.go | 15 ++- ...odel_supersim_v1_network_access_profile.go | 16 ++- ..._profile_network_access_profile_network.go | 18 ++- .../rest/supersim/v1/model_supersim_v1_sim.go | 23 ++-- .../v1/model_supersim_v1_usage_record.go | 27 ++-- .../v1/docs/ListDocumentPermissionResponse.md | 8 +- .../rest/sync/v1/docs/ListDocumentResponse.md | 8 +- .../rest/sync/v1/docs/ListServiceResponse.md | 8 +- .../sync/v1/docs/ListServiceResponseMeta.md | 18 +-- .../sync/v1/docs/ListSyncListItemResponse.md | 8 +- .../v1/docs/ListSyncListPermissionResponse.md | 8 +- .../rest/sync/v1/docs/ListSyncListResponse.md | 8 +- .../sync/v1/docs/ListSyncMapItemResponse.md | 8 +- .../v1/docs/ListSyncMapPermissionResponse.md | 8 +- .../rest/sync/v1/docs/ListSyncMapResponse.md | 8 +- .../sync/v1/docs/ListSyncStreamResponse.md | 8 +- twilio/rest/sync/v1/docs/SyncV1Service.md | 32 ++--- .../sync/v1/docs/SyncV1ServiceDocument.md | 28 ++--- ...SyncV1ServiceDocumentDocumentPermission.md | 20 +-- .../sync/v1/docs/SyncV1ServiceSyncList.md | 26 ++-- .../docs/SyncV1ServiceSyncListSyncListItem.md | 26 ++-- ...SyncV1ServiceSyncListSyncListPermission.md | 20 +-- .../rest/sync/v1/docs/SyncV1ServiceSyncMap.md | 26 ++-- .../docs/SyncV1ServiceSyncMapSyncMapItem.md | 26 ++-- .../SyncV1ServiceSyncMapSyncMapPermission.md | 20 +-- .../sync/v1/docs/SyncV1ServiceSyncStream.md | 24 ++-- .../SyncV1ServiceSyncStreamStreamMessage.md | 8 +- twilio/rest/sync/v1/model_sync_v1_service.go | 42 ++++--- .../sync/v1/model_sync_v1_service_document.go | 36 ++++-- ...v1_service_document_document_permission.go | 22 ++-- .../v1/model_sync_v1_service_sync_list.go | 33 +++-- ...ync_v1_service_sync_list_sync_list_item.go | 33 +++-- ..._service_sync_list_sync_list_permission.go | 20 ++- .../sync/v1/model_sync_v1_service_sync_map.go | 33 +++-- ..._sync_v1_service_sync_map_sync_map_item.go | 33 +++-- ...v1_service_sync_map_sync_map_permission.go | 20 ++- .../v1/model_sync_v1_service_sync_stream.go | 30 +++-- ...c_v1_service_sync_stream_stream_message.go | 4 +- twilio/rest/taskrouter/v1/README.md | 5 - .../v1/docs/ListActivityResponse.md | 8 +- .../taskrouter/v1/docs/ListEventResponse.md | 8 +- .../v1/docs/ListTaskChannelResponse.md | 8 +- .../v1/docs/ListTaskQueueResponse.md | 8 +- .../docs/ListTaskQueuesStatisticsResponse.md | 8 +- .../v1/docs/ListTaskReservationResponse.md | 8 +- .../taskrouter/v1/docs/ListTaskResponse.md | 8 +- .../v1/docs/ListWorkerChannelResponse.md | 8 +- .../v1/docs/ListWorkerReservationResponse.md | 8 +- .../taskrouter/v1/docs/ListWorkerResponse.md | 8 +- .../v1/docs/ListWorkflowResponse.md | 8 +- .../v1/docs/ListWorkspaceResponse.md | 8 +- .../v1/docs/ListWorkspaceResponseMeta.md | 18 +-- .../v1/docs/TaskrouterV1Workspace.md | 34 ++--- .../v1/docs/TaskrouterV1WorkspaceActivity.md | 20 +-- .../v1/docs/TaskrouterV1WorkspaceEvent.md | 38 +++--- .../v1/docs/TaskrouterV1WorkspaceTask.md | 46 +++---- .../docs/TaskrouterV1WorkspaceTaskChannel.md | 24 ++-- .../v1/docs/TaskrouterV1WorkspaceTaskQueue.md | 34 ++--- ...eTaskQueueTaskQueueCumulativeStatistics.md | 48 +++---- ...aceTaskQueueTaskQueueRealTimeStatistics.md | 32 ++--- ...V1WorkspaceTaskQueueTaskQueueStatistics.md | 16 +-- ...1WorkspaceTaskQueueTaskQueuesStatistics.md | 14 +-- ...askrouterV1WorkspaceTaskTaskReservation.md | 26 ++-- .../v1/docs/TaskrouterV1WorkspaceWorker.md | 30 ++--- ...askrouterV1WorkspaceWorkerWorkerChannel.md | 30 ++--- ...WorkspaceWorkerWorkerInstanceStatistics.md | 14 +-- ...outerV1WorkspaceWorkerWorkerReservation.md | 26 ++-- ...routerV1WorkspaceWorkerWorkerStatistics.md | 14 +-- ...kspaceWorkerWorkersCumulativeStatistics.md | 28 ++--- ...orkspaceWorkerWorkersRealTimeStatistics.md | 14 +-- .../v1/docs/TaskrouterV1WorkspaceWorkflow.md | 30 ++--- ...aceWorkflowWorkflowCumulativeStatistics.md | 48 +++---- ...spaceWorkflowWorkflowRealTimeStatistics.md | 22 ++-- ...erV1WorkspaceWorkflowWorkflowStatistics.md | 16 +-- ...1WorkspaceWorkspaceCumulativeStatistics.md | 46 +++---- ...rV1WorkspaceWorkspaceRealTimeStatistics.md | 24 ++-- ...askrouterV1WorkspaceWorkspaceStatistics.md | 14 +-- .../v1/model_taskrouter_v1_workspace.go | 45 ++++--- .../model_taskrouter_v1_workspace_activity.go | 24 ++-- .../v1/model_taskrouter_v1_workspace_event.go | 51 +++++--- .../v1/model_taskrouter_v1_workspace_task.go | 63 ++++++---- ...el_taskrouter_v1_workspace_task_channel.go | 30 +++-- ...odel_taskrouter_v1_workspace_task_queue.go | 45 ++++--- ..._queue_task_queue_cumulative_statistics.go | 64 ++++++---- ...k_queue_task_queue_real_time_statistics.go | 42 ++++--- ...kspace_task_queue_task_queue_statistics.go | 18 ++- ...space_task_queue_task_queues_statistics.go | 15 ++- ...uter_v1_workspace_task_task_reservation.go | 33 +++-- .../model_taskrouter_v1_workspace_worker.go | 39 ++++-- ...uter_v1_workspace_worker_worker_channel.go | 39 ++++-- ...space_worker_worker_instance_statistics.go | 15 ++- ..._v1_workspace_worker_worker_reservation.go | 33 +++-- ...r_v1_workspace_worker_worker_statistics.go | 15 ++- ...ce_worker_workers_cumulative_statistics.go | 36 ++++-- ...ace_worker_workers_real_time_statistics.go | 13 +- .../model_taskrouter_v1_workspace_workflow.go | 39 ++++-- ...workflow_workflow_cumulative_statistics.go | 62 +++++++--- ..._workflow_workflow_real_time_statistics.go | 27 ++-- ..._workspace_workflow_workflow_statistics.go | 18 ++- ...rkspace_workspace_cumulative_statistics.go | 59 ++++++--- ...orkspace_workspace_real_time_statistics.go | 30 +++-- ...outer_v1_workspace_workspace_statistics.go | 15 ++- twilio/rest/trunking/v1/README.md | 5 - .../v1/docs/ListCredentialListResponse.md | 8 +- .../docs/ListIpAccessControlListResponse.md | 8 +- .../v1/docs/ListOriginationUrlResponse.md | 8 +- .../v1/docs/ListPhoneNumberResponse.md | 8 +- .../trunking/v1/docs/ListTrunkResponse.md | 8 +- .../trunking/v1/docs/ListTrunkResponseMeta.md | 18 +-- .../rest/trunking/v1/docs/TrunkingV1Trunk.md | 36 +++--- .../v1/docs/TrunkingV1TrunkCredentialList.md | 18 +-- .../TrunkingV1TrunkIpAccessControlList.md | 18 +-- .../v1/docs/TrunkingV1TrunkOriginationUrl.md | 26 ++-- .../v1/docs/TrunkingV1TrunkPhoneNumber.md | 56 ++++----- .../v1/docs/TrunkingV1TrunkRecording.md | 8 +- .../trunking/v1/model_trunking_v1_trunk.go | 48 ++++--- ...model_trunking_v1_trunk_credential_list.go | 21 ++-- ...runking_v1_trunk_ip_access_control_list.go | 21 ++-- ...model_trunking_v1_trunk_origination_url.go | 33 +++-- .../model_trunking_v1_trunk_phone_number.go | 78 ++++++++---- .../v1/model_trunking_v1_trunk_recording.go | 6 +- twilio/rest/trusthub/v1/README.md | 5 - ...rofileChannelEndpointAssignmentResponse.md | 8 +- ...CustomerProfileEntityAssignmentResponse.md | 8 +- .../ListCustomerProfileEvaluationResponse.md | 8 +- .../v1/docs/ListCustomerProfileResponse.md | 8 +- .../docs/ListCustomerProfileResponseMeta.md | 18 +-- .../trusthub/v1/docs/ListEndUserResponse.md | 8 +- .../v1/docs/ListEndUserTypeResponse.md | 8 +- .../trusthub/v1/docs/ListPoliciesResponse.md | 8 +- .../v1/docs/ListSupportingDocumentResponse.md | 8 +- .../ListSupportingDocumentTypeResponse.md | 8 +- ...roductChannelEndpointAssignmentResponse.md | 8 +- ...istTrustProductEntityAssignmentResponse.md | 8 +- .../ListTrustProductEvaluationResponse.md | 8 +- .../v1/docs/ListTrustProductResponse.md | 8 +- .../v1/docs/TrusthubV1CustomerProfile.md | 28 ++--- ...ustomerProfileChannelEndpointAssignment.md | 18 +-- ...rProfileCustomerProfileEntityAssignment.md | 16 +-- ...ustomerProfileCustomerProfileEvaluation.md | 20 +-- .../trusthub/v1/docs/TrusthubV1EndUser.md | 20 +-- .../trusthub/v1/docs/TrusthubV1EndUserType.md | 14 +-- .../trusthub/v1/docs/TrusthubV1Policies.md | 12 +- .../v1/docs/TrusthubV1SupportingDocument.md | 24 ++-- .../docs/TrusthubV1SupportingDocumentType.md | 14 +-- .../v1/docs/TrusthubV1TrustProduct.md | 28 ++--- ...ctTrustProductChannelEndpointAssignment.md | 18 +-- ...rustProductTrustProductEntityAssignment.md | 16 +-- ...hubV1TrustProductTrustProductEvaluation.md | 20 +-- .../v1/model_trusthub_v1_customer_profile.go | 36 ++++-- ...mer_profile_channel_endpoint_assignment.go | 21 ++-- ...file_customer_profile_entity_assignment.go | 18 ++- ...mer_profile_customer_profile_evaluation.go | 22 ++-- .../trusthub/v1/model_trusthub_v1_end_user.go | 24 ++-- .../v1/model_trusthub_v1_end_user_type.go | 15 ++- .../trusthub/v1/model_trusthub_v1_policies.go | 10 +- .../model_trusthub_v1_supporting_document.go | 30 +++-- ...el_trusthub_v1_supporting_document_type.go | 15 ++- .../v1/model_trusthub_v1_trust_product.go | 36 ++++-- ...ust_product_channel_endpoint_assignment.go | 21 ++-- ...product_trust_product_entity_assignment.go | 18 ++- ..._trust_product_trust_product_evaluation.go | 22 ++-- twilio/rest/verify/v2/README.md | 12 -- .../rest/verify/v2/docs/ListBucketResponse.md | 8 +- .../verify/v2/docs/ListChallengeResponse.md | 8 +- .../rest/verify/v2/docs/ListEntityResponse.md | 8 +- .../rest/verify/v2/docs/ListFactorResponse.md | 8 +- .../ListMessagingConfigurationResponse.md | 8 +- .../verify/v2/docs/ListRateLimitResponse.md | 8 +- .../verify/v2/docs/ListServiceResponse.md | 8 +- .../docs/ListVerificationAttemptResponse.md | 8 +- .../ListVerificationAttemptResponseMeta.md | 18 +-- .../verify/v2/docs/ListWebhookResponse.md | 8 +- twilio/rest/verify/v2/docs/VerifyV2Form.md | 12 +- twilio/rest/verify/v2/docs/VerifyV2Service.md | 36 +++--- .../v2/docs/VerifyV2ServiceAccessToken.md | 6 +- .../verify/v2/docs/VerifyV2ServiceEntity.md | 20 +-- .../v2/docs/VerifyV2ServiceEntityChallenge.md | 36 +++--- .../v2/docs/VerifyV2ServiceEntityFactor.md | 28 ++--- .../VerifyV2ServiceMessagingConfiguration.md | 18 +-- .../v2/docs/VerifyV2ServiceRateLimit.md | 22 ++-- .../v2/docs/VerifyV2ServiceRateLimitBucket.md | 22 ++-- .../v2/docs/VerifyV2ServiceVerification.md | 32 ++--- .../docs/VerifyV2ServiceVerificationCheck.md | 26 ++-- .../verify/v2/docs/VerifyV2ServiceWebhook.md | 26 ++-- .../v2/docs/VerifyV2VerificationAttempt.md | 22 ++-- twilio/rest/verify/v2/model_verify_v2_form.go | 10 +- .../rest/verify/v2/model_verify_v2_service.go | 48 ++++--- .../model_verify_v2_service_access_token.go | 1 + .../v2/model_verify_v2_service_entity.go | 24 ++-- ...odel_verify_v2_service_entity_challenge.go | 48 ++++--- .../model_verify_v2_service_entity_factor.go | 36 ++++-- ...rify_v2_service_messaging_configuration.go | 21 ++-- .../v2/model_verify_v2_service_rate_limit.go | 27 ++-- ...del_verify_v2_service_rate_limit_bucket.go | 27 ++-- .../model_verify_v2_service_verification.go | 40 ++++-- ...el_verify_v2_service_verification_check.go | 33 +++-- .../v2/model_verify_v2_service_webhook.go | 33 +++-- .../model_verify_v2_verification_attempt.go | 25 ++-- twilio/rest/video/v1/README.md | 18 +-- .../v1/docs/ListCompositionHookResponse.md | 8 +- .../docs/ListCompositionHookResponseMeta.md | 18 +-- .../video/v1/docs/ListCompositionResponse.md | 8 +- .../video/v1/docs/ListRecordingResponse.md | 8 +- ...stRoomParticipantPublishedTrackResponse.md | 8 +- .../v1/docs/ListRoomParticipantResponse.md | 8 +- ...tRoomParticipantSubscribedTrackResponse.md | 8 +- .../v1/docs/ListRoomRecordingResponse.md | 8 +- twilio/rest/video/v1/docs/ListRoomResponse.md | 8 +- .../rest/video/v1/docs/VideoV1Composition.md | 40 +++--- .../video/v1/docs/VideoV1CompositionHook.md | 34 ++--- .../v1/docs/VideoV1CompositionSettings.md | 20 +-- twilio/rest/video/v1/docs/VideoV1Recording.md | 34 ++--- .../video/v1/docs/VideoV1RecordingSettings.md | 20 +-- twilio/rest/video/v1/docs/VideoV1Room.md | 42 +++---- .../v1/docs/VideoV1RoomRoomParticipant.md | 28 ++--- ...articipantRoomParticipantPublishedTrack.md | 22 ++-- ...ParticipantRoomParticipantSubscribeRule.md | 14 +-- ...rticipantRoomParticipantSubscribedTrack.md | 24 ++-- .../video/v1/docs/VideoV1RoomRoomRecording.md | 36 +++--- .../v1/docs/VideoV1RoomRoomRecordingRule.md | 12 +- .../docs/VideoV1RoomRoomRecordingRuleRules.md | 14 +++ .../video/v1/model_video_v1_composition.go | 54 +++++--- .../v1/model_video_v1_composition_hook.go | 45 ++++--- .../v1/model_video_v1_composition_settings.go | 22 ++-- .../rest/video/v1/model_video_v1_recording.go | 45 ++++--- .../v1/model_video_v1_recording_settings.go | 22 ++-- twilio/rest/video/v1/model_video_v1_room.go | 57 ++++++--- .../model_video_v1_room_room_participant.go | 36 ++++-- ...cipant_room_participant_published_track.go | 27 ++-- ...icipant_room_participant_subscribe_rule.go | 15 ++- ...ipant_room_participant_subscribed_track.go | 30 +++-- .../v1/model_video_v1_room_room_recording.go | 48 ++++--- ...model_video_v1_room_room_recording_rule.go | 12 +- ...video_v1_room_room_recording_rule_rules.go | 21 ++++ twilio/rest/voice/v1/README.md | 1 - .../voice/v1/docs/ListByocTrunkResponse.md | 8 +- .../v1/docs/ListByocTrunkResponseMeta.md | 18 +-- .../v1/docs/ListConnectionPolicyResponse.md | 8 +- .../ListConnectionPolicyTargetResponse.md | 8 +- .../ListDialingPermissionsCountryResponse.md | 8 +- ...stDialingPermissionsHrsPrefixesResponse.md | 8 +- .../voice/v1/docs/ListIpRecordResponse.md | 8 +- .../v1/docs/ListSourceIpMappingResponse.md | 8 +- twilio/rest/voice/v1/docs/VoiceV1ByocTrunk.md | 34 ++--- .../voice/v1/docs/VoiceV1ConnectionPolicy.md | 18 +-- ...1ConnectionPolicyConnectionPolicyTarget.md | 26 ++-- ...ingPermissionsDialingPermissionsCountry.md | 22 ++-- ...ionsDialingPermissionsCountryBulkUpdate.md | 8 +- ...onsCountryDialingPermissionsHrsPrefixes.md | 6 +- ...ssionsDialingPermissionsCountryInstance.md | 22 ++-- ...ngPermissionsDialingPermissionsSettings.md | 8 +- twilio/rest/voice/v1/docs/VoiceV1IpRecord.md | 20 +-- .../voice/v1/docs/VoiceV1SourceIpMapping.md | 16 +-- .../voice/v1/model_voice_v1_byoc_trunk.go | 45 ++++--- .../v1/model_voice_v1_connection_policy.go | 21 ++-- ...nection_policy_connection_policy_target.go | 33 +++-- ...permissions_dialing_permissions_country.go | 27 ++-- ...dialing_permissions_country_bulk_update.go | 4 +- ...ountry_dialing_permissions_hrs_prefixes.go | 1 + ...ns_dialing_permissions_country_instance.go | 27 ++-- ...ermissions_dialing_permissions_settings.go | 6 +- .../rest/voice/v1/model_voice_v1_ip_record.go | 24 ++-- .../v1/model_voice_v1_source_ip_mapping.go | 18 ++- twilio/rest/wireless/v1/README.md | 7 -- .../v1/docs/ListAccountUsageRecordResponse.md | 8 +- .../wireless/v1/docs/ListCommandResponse.md | 8 +- .../v1/docs/ListCommandResponseMeta.md | 18 +-- .../v1/docs/ListDataSessionResponse.md | 8 +- .../wireless/v1/docs/ListRatePlanResponse.md | 8 +- .../rest/wireless/v1/docs/ListSimResponse.md | 8 +- .../v1/docs/ListUsageRecordResponse.md | 8 +- .../v1/docs/WirelessV1AccountUsageRecord.md | 12 +- .../wireless/v1/docs/WirelessV1Command.md | 28 ++--- .../wireless/v1/docs/WirelessV1RatePlan.md | 36 +++--- twilio/rest/wireless/v1/docs/WirelessV1Sim.md | 52 ++++---- .../v1/docs/WirelessV1SimDataSession.md | 36 +++--- .../v1/docs/WirelessV1SimUsageRecord.md | 14 +-- .../model_wireless_v1_account_usage_record.go | 12 +- .../wireless/v1/model_wireless_v1_command.go | 36 ++++-- .../v1/model_wireless_v1_rate_plan.go | 48 ++++--- .../rest/wireless/v1/model_wireless_v1_sim.go | 72 +++++++---- .../v1/model_wireless_v1_sim_data_session.go | 46 ++++--- .../v1/model_wireless_v1_sim_usage_record.go | 15 ++- 1057 files changed, 13516 insertions(+), 9842 deletions(-) create mode 100644 twilio/rest/api/v2010/docs/ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocalCapabilities.md create mode 100644 twilio/rest/api/v2010/docs/ApiV2010AccountCallCallFeedbackSummaryIssues.md create mode 100644 twilio/rest/api/v2010/docs/ApiV2010AccountIncomingPhoneNumberCapabilities.md create mode 100644 twilio/rest/api/v2010/docs/ApiV2010AccountTokenIceServers.md create mode 100644 twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_local_capabilities.go create mode 100644 twilio/rest/api/v2010/model_api_v2010_account_call_call_feedback_summary_issues.go create mode 100644 twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number_capabilities.go create mode 100644 twilio/rest/api/v2010/model_api_v2010_account_token_ice_servers.go create mode 100644 twilio/rest/pricing/v1/docs/PricingV1MessagingMessagingCountryInstanceInboundSmsPrices.md create mode 100644 twilio/rest/pricing/v1/docs/PricingV1MessagingMessagingCountryInstanceOutboundSmsPrices.md create mode 100644 twilio/rest/pricing/v1/docs/PricingV1VoiceVoiceCountryInstanceOutboundPrefixPrices.md create mode 100644 twilio/rest/pricing/v1/docs/PricingV1VoiceVoiceNumberInboundCallPrice.md create mode 100644 twilio/rest/pricing/v1/docs/PricingV1VoiceVoiceNumberOutboundCallPrice.md create mode 100644 twilio/rest/pricing/v1/model_pricing_v1_messaging_messaging_country_instance_inbound_sms_prices.go create mode 100644 twilio/rest/pricing/v1/model_pricing_v1_messaging_messaging_country_instance_outbound_sms_prices.go create mode 100644 twilio/rest/pricing/v1/model_pricing_v1_voice_voice_country_instance_outbound_prefix_prices.go create mode 100644 twilio/rest/pricing/v1/model_pricing_v1_voice_voice_number_inbound_call_price.go create mode 100644 twilio/rest/pricing/v1/model_pricing_v1_voice_voice_number_outbound_call_price.go create mode 100644 twilio/rest/pricing/v2/docs/PricingV2VoiceVoiceCountryInstanceInboundCallPrices.md create mode 100644 twilio/rest/pricing/v2/docs/PricingV2VoiceVoiceCountryInstanceOutboundPrefixPrices.md create mode 100644 twilio/rest/pricing/v2/docs/PricingV2VoiceVoiceNumberInboundCallPrice.md create mode 100644 twilio/rest/pricing/v2/docs/PricingV2VoiceVoiceNumberOutboundCallPrices.md create mode 100644 twilio/rest/pricing/v2/model_pricing_v2_voice_voice_country_instance_inbound_call_prices.go create mode 100644 twilio/rest/pricing/v2/model_pricing_v2_voice_voice_country_instance_outbound_prefix_prices.go create mode 100644 twilio/rest/pricing/v2/model_pricing_v2_voice_voice_number_inbound_call_price.go create mode 100644 twilio/rest/pricing/v2/model_pricing_v2_voice_voice_number_outbound_call_prices.go create mode 100644 twilio/rest/proxy/v1/docs/ProxyV1ServicePhoneNumberCapabilities.md create mode 100644 twilio/rest/proxy/v1/docs/ProxyV1ServiceShortCodeCapabilities.md create mode 100644 twilio/rest/proxy/v1/model_proxy_v1_service_phone_number_capabilities.go create mode 100644 twilio/rest/proxy/v1/model_proxy_v1_service_short_code_capabilities.go create mode 100644 twilio/rest/video/v1/docs/VideoV1RoomRoomRecordingRuleRules.md create mode 100644 twilio/rest/video/v1/model_video_v1_room_room_recording_rule_rules.go diff --git a/twilio/rest/accounts/v1/docs/AccountsV1AuthTokenPromotion.md b/twilio/rest/accounts/v1/docs/AccountsV1AuthTokenPromotion.md index 9e5df985f..ba9c9f941 100644 --- a/twilio/rest/accounts/v1/docs/AccountsV1AuthTokenPromotion.md +++ b/twilio/rest/accounts/v1/docs/AccountsV1AuthTokenPromotion.md @@ -1,13 +1,13 @@ # AccountsV1AuthTokenPromotion ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**AuthToken** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that the secondary Auth Token was created for | +**AuthToken** | Pointer to **string** | The promoted Auth Token | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 formatted date and time in UTC when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 formatted date and time in UTC when the resource was last updated | +**Url** | Pointer to **string** | The URI for this resource, relative to `https://accounts.twilio.com` | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/accounts/v1/docs/AccountsV1CredentialCredentialAws.md b/twilio/rest/accounts/v1/docs/AccountsV1CredentialCredentialAws.md index f3fa0df17..e7b316aea 100644 --- a/twilio/rest/accounts/v1/docs/AccountsV1CredentialCredentialAws.md +++ b/twilio/rest/accounts/v1/docs/AccountsV1CredentialCredentialAws.md @@ -1,14 +1,14 @@ # AccountsV1CredentialCredentialAws ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**FriendlyName** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was last updated | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the resource | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Url** | Pointer to **string** | The URI for this resource, relative to `https://accounts.twilio.com` | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/accounts/v1/docs/AccountsV1CredentialCredentialPublicKey.md b/twilio/rest/accounts/v1/docs/AccountsV1CredentialCredentialPublicKey.md index 2af19653c..6d4b81096 100644 --- a/twilio/rest/accounts/v1/docs/AccountsV1CredentialCredentialPublicKey.md +++ b/twilio/rest/accounts/v1/docs/AccountsV1CredentialCredentialPublicKey.md @@ -1,14 +1,14 @@ # AccountsV1CredentialCredentialPublicKey ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**FriendlyName** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the Credential that the PublicKey resource belongs to | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was last updated | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the resource | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Url** | Pointer to **string** | The URI for this resource, relative to `https://accounts.twilio.com` | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/accounts/v1/docs/AccountsV1SecondaryAuthToken.md b/twilio/rest/accounts/v1/docs/AccountsV1SecondaryAuthToken.md index 072e1bb97..da75a7653 100644 --- a/twilio/rest/accounts/v1/docs/AccountsV1SecondaryAuthToken.md +++ b/twilio/rest/accounts/v1/docs/AccountsV1SecondaryAuthToken.md @@ -1,13 +1,13 @@ # AccountsV1SecondaryAuthToken ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**SecondaryAuthToken** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that the secondary Auth Token was created for | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 formatted date and time in UTC when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 formatted date and time in UTC when the resource was last updated | +**SecondaryAuthToken** | Pointer to **string** | The generated secondary Auth Token | +**Url** | Pointer to **string** | The URI for this resource, relative to `https://accounts.twilio.com` | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/accounts/v1/docs/ListCredentialAwsResponse.md b/twilio/rest/accounts/v1/docs/ListCredentialAwsResponse.md index 52fa9526b..bbc42c47b 100644 --- a/twilio/rest/accounts/v1/docs/ListCredentialAwsResponse.md +++ b/twilio/rest/accounts/v1/docs/ListCredentialAwsResponse.md @@ -1,10 +1,10 @@ # ListCredentialAwsResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Credentials** | [**[]AccountsV1CredentialCredentialAws**](accounts.v1.credential.credential_aws.md) | [optional] -**Meta** | [**ListCredentialAwsResponseMeta**](ListCredentialAwsResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Credentials** | [**[]AccountsV1CredentialCredentialAws**](accounts.v1.credential.credential_aws.md) | |[optional] +**Meta** | [**ListCredentialAwsResponseMeta**](ListCredentialAwsResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/accounts/v1/docs/ListCredentialAwsResponseMeta.md b/twilio/rest/accounts/v1/docs/ListCredentialAwsResponseMeta.md index 71b25b019..1f8f215ad 100644 --- a/twilio/rest/accounts/v1/docs/ListCredentialAwsResponseMeta.md +++ b/twilio/rest/accounts/v1/docs/ListCredentialAwsResponseMeta.md @@ -1,15 +1,15 @@ # ListCredentialAwsResponseMeta ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**FirstPageUrl** | **string** | [optional] -**Key** | **string** | [optional] -**NextPageUrl** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUrl** | **string** | [optional] -**Url** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstPageUrl** | **string** | |[optional] +**Key** | **string** | |[optional] +**NextPageUrl** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUrl** | **string** | |[optional] +**Url** | **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/twilio/rest/accounts/v1/docs/ListCredentialPublicKeyResponse.md b/twilio/rest/accounts/v1/docs/ListCredentialPublicKeyResponse.md index 986682433..ee5f7fe67 100644 --- a/twilio/rest/accounts/v1/docs/ListCredentialPublicKeyResponse.md +++ b/twilio/rest/accounts/v1/docs/ListCredentialPublicKeyResponse.md @@ -1,10 +1,10 @@ # ListCredentialPublicKeyResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Credentials** | [**[]AccountsV1CredentialCredentialPublicKey**](accounts.v1.credential.credential_public_key.md) | [optional] -**Meta** | [**ListCredentialAwsResponseMeta**](ListCredentialAwsResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Credentials** | [**[]AccountsV1CredentialCredentialPublicKey**](accounts.v1.credential.credential_public_key.md) | |[optional] +**Meta** | [**ListCredentialAwsResponseMeta**](ListCredentialAwsResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/accounts/v1/model_accounts_v1_auth_token_promotion.go b/twilio/rest/accounts/v1/model_accounts_v1_auth_token_promotion.go index b9a3faabb..d62eb9a85 100644 --- a/twilio/rest/accounts/v1/model_accounts_v1_auth_token_promotion.go +++ b/twilio/rest/accounts/v1/model_accounts_v1_auth_token_promotion.go @@ -17,9 +17,14 @@ import ( // AccountsV1AuthTokenPromotion struct for AccountsV1AuthTokenPromotion type AccountsV1AuthTokenPromotion struct { - AccountSid *string `json:"AccountSid,omitempty"` - AuthToken *string `json:"AuthToken,omitempty"` + // The SID of the Account that the secondary Auth Token was created for + AccountSid *string `json:"AccountSid,omitempty"` + // The promoted Auth Token + AuthToken *string `json:"AuthToken,omitempty"` + // The ISO 8601 formatted date and time in UTC when the resource was created DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 formatted date and time in UTC when the resource was last updated DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Url *string `json:"Url,omitempty"` + // The URI for this resource, relative to `https://accounts.twilio.com` + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/accounts/v1/model_accounts_v1_credential_credential_aws.go b/twilio/rest/accounts/v1/model_accounts_v1_credential_credential_aws.go index 6b4a337ec..f43b14e27 100644 --- a/twilio/rest/accounts/v1/model_accounts_v1_credential_credential_aws.go +++ b/twilio/rest/accounts/v1/model_accounts_v1_credential_credential_aws.go @@ -17,10 +17,16 @@ import ( // AccountsV1CredentialCredentialAws struct for AccountsV1CredentialCredentialAws type AccountsV1CredentialCredentialAws struct { - AccountSid *string `json:"AccountSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The RFC 2822 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The string that you assigned to describe the resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The URI for this resource, relative to `https://accounts.twilio.com` + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/accounts/v1/model_accounts_v1_credential_credential_public_key.go b/twilio/rest/accounts/v1/model_accounts_v1_credential_credential_public_key.go index d8afaf24a..cb8fa0646 100644 --- a/twilio/rest/accounts/v1/model_accounts_v1_credential_credential_public_key.go +++ b/twilio/rest/accounts/v1/model_accounts_v1_credential_credential_public_key.go @@ -17,10 +17,16 @@ import ( // AccountsV1CredentialCredentialPublicKey struct for AccountsV1CredentialCredentialPublicKey type AccountsV1CredentialCredentialPublicKey struct { - AccountSid *string `json:"AccountSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the Credential that the PublicKey resource belongs to + AccountSid *string `json:"AccountSid,omitempty"` + // The RFC 2822 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The string that you assigned to describe the resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The URI for this resource, relative to `https://accounts.twilio.com` + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/accounts/v1/model_accounts_v1_secondary_auth_token.go b/twilio/rest/accounts/v1/model_accounts_v1_secondary_auth_token.go index 5dd1e9fec..d8aa60d6b 100644 --- a/twilio/rest/accounts/v1/model_accounts_v1_secondary_auth_token.go +++ b/twilio/rest/accounts/v1/model_accounts_v1_secondary_auth_token.go @@ -17,9 +17,14 @@ import ( // AccountsV1SecondaryAuthToken struct for AccountsV1SecondaryAuthToken type AccountsV1SecondaryAuthToken struct { - AccountSid *string `json:"AccountSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - SecondaryAuthToken *string `json:"SecondaryAuthToken,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that the secondary Auth Token was created for + AccountSid *string `json:"AccountSid,omitempty"` + // The ISO 8601 formatted date and time in UTC when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 formatted date and time in UTC when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The generated secondary Auth Token + SecondaryAuthToken *string `json:"SecondaryAuthToken,omitempty"` + // The URI for this resource, relative to `https://accounts.twilio.com` + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/api/v2010/README.md b/twilio/rest/api/v2010/README.md index 17693b2df..3316f7bdc 100644 --- a/twilio/rest/api/v2010/README.md +++ b/twilio/rest/api/v2010/README.md @@ -227,8 +227,6 @@ Class | Method | HTTP request | Description ## Documentation For Models - - [AccountStatus](docs/AccountStatus.md) - - [AccountType](docs/AccountType.md) - [ApiV2010Account](docs/ApiV2010Account.md) - [ApiV2010AccountAddress](docs/ApiV2010AccountAddress.md) - [ApiV2010AccountAddressDependentPhoneNumber](docs/ApiV2010AccountAddressDependentPhoneNumber.md) @@ -236,6 +234,7 @@ Class | Method | HTTP request | Description - [ApiV2010AccountAuthorizedConnectApp](docs/ApiV2010AccountAuthorizedConnectApp.md) - [ApiV2010AccountAvailablePhoneNumberCountry](docs/ApiV2010AccountAvailablePhoneNumberCountry.md) - [ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocal](docs/ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocal.md) + - [ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocalCapabilities](docs/ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocalCapabilities.md) - [ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberMachineToMachine](docs/ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberMachineToMachine.md) - [ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberMobile](docs/ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberMobile.md) - [ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberNational](docs/ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberNational.md) @@ -247,6 +246,7 @@ Class | Method | HTTP request | Description - [ApiV2010AccountCallCallEvent](docs/ApiV2010AccountCallCallEvent.md) - [ApiV2010AccountCallCallFeedback](docs/ApiV2010AccountCallCallFeedback.md) - [ApiV2010AccountCallCallFeedbackSummary](docs/ApiV2010AccountCallCallFeedbackSummary.md) + - [ApiV2010AccountCallCallFeedbackSummaryIssues](docs/ApiV2010AccountCallCallFeedbackSummaryIssues.md) - [ApiV2010AccountCallCallNotification](docs/ApiV2010AccountCallCallNotification.md) - [ApiV2010AccountCallCallNotificationInstance](docs/ApiV2010AccountCallCallNotificationInstance.md) - [ApiV2010AccountCallCallRecording](docs/ApiV2010AccountCallCallRecording.md) @@ -256,6 +256,7 @@ Class | Method | HTTP request | Description - [ApiV2010AccountConferenceParticipant](docs/ApiV2010AccountConferenceParticipant.md) - [ApiV2010AccountConnectApp](docs/ApiV2010AccountConnectApp.md) - [ApiV2010AccountIncomingPhoneNumber](docs/ApiV2010AccountIncomingPhoneNumber.md) + - [ApiV2010AccountIncomingPhoneNumberCapabilities](docs/ApiV2010AccountIncomingPhoneNumberCapabilities.md) - [ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOn](docs/ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOn.md) - [ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOnIncomingPhoneNumberAssignedAddOnExtension](docs/ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOnIncomingPhoneNumberAssignedAddOnExtension.md) - [ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberLocal](docs/ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberLocal.md) @@ -289,6 +290,7 @@ Class | Method | HTTP request | Description - [ApiV2010AccountSipSipIpAccessControlList](docs/ApiV2010AccountSipSipIpAccessControlList.md) - [ApiV2010AccountSipSipIpAccessControlListSipIpAddress](docs/ApiV2010AccountSipSipIpAccessControlListSipIpAddress.md) - [ApiV2010AccountToken](docs/ApiV2010AccountToken.md) + - [ApiV2010AccountTokenIceServers](docs/ApiV2010AccountTokenIceServers.md) - [ApiV2010AccountTranscription](docs/ApiV2010AccountTranscription.md) - [ApiV2010AccountUsageUsageRecord](docs/ApiV2010AccountUsageUsageRecord.md) - [ApiV2010AccountUsageUsageRecordUsageRecordAllTime](docs/ApiV2010AccountUsageUsageRecordUsageRecordAllTime.md) @@ -301,29 +303,6 @@ Class | Method | HTTP request | Description - [ApiV2010AccountUsageUsageRecordUsageRecordYesterday](docs/ApiV2010AccountUsageUsageRecordUsageRecordYesterday.md) - [ApiV2010AccountUsageUsageTrigger](docs/ApiV2010AccountUsageUsageTrigger.md) - [ApiV2010AccountValidationRequest](docs/ApiV2010AccountValidationRequest.md) - - [CallFeedbackSummaryStatus](docs/CallFeedbackSummaryStatus.md) - - [CallRecordingSource](docs/CallRecordingSource.md) - - [CallRecordingStatus](docs/CallRecordingStatus.md) - - [CallStatus](docs/CallStatus.md) - - [ConferenceReasonConferenceEnded](docs/ConferenceReasonConferenceEnded.md) - - [ConferenceRecordingSource](docs/ConferenceRecordingSource.md) - - [ConferenceRecordingStatus](docs/ConferenceRecordingStatus.md) - - [ConferenceStatus](docs/ConferenceStatus.md) - - [DependentPhoneNumberAddressRequirement](docs/DependentPhoneNumberAddressRequirement.md) - - [DependentPhoneNumberEmergencyStatus](docs/DependentPhoneNumberEmergencyStatus.md) - - [HttpMethod](docs/HttpMethod.md) - - [IncomingPhoneNumberAddressRequirement](docs/IncomingPhoneNumberAddressRequirement.md) - - [IncomingPhoneNumberEmergencyStatus](docs/IncomingPhoneNumberEmergencyStatus.md) - - [IncomingPhoneNumberLocalAddressRequirement](docs/IncomingPhoneNumberLocalAddressRequirement.md) - - [IncomingPhoneNumberLocalEmergencyStatus](docs/IncomingPhoneNumberLocalEmergencyStatus.md) - - [IncomingPhoneNumberLocalVoiceReceiveMode](docs/IncomingPhoneNumberLocalVoiceReceiveMode.md) - - [IncomingPhoneNumberMobileAddressRequirement](docs/IncomingPhoneNumberMobileAddressRequirement.md) - - [IncomingPhoneNumberMobileEmergencyStatus](docs/IncomingPhoneNumberMobileEmergencyStatus.md) - - [IncomingPhoneNumberMobileVoiceReceiveMode](docs/IncomingPhoneNumberMobileVoiceReceiveMode.md) - - [IncomingPhoneNumberTollFreeAddressRequirement](docs/IncomingPhoneNumberTollFreeAddressRequirement.md) - - [IncomingPhoneNumberTollFreeEmergencyStatus](docs/IncomingPhoneNumberTollFreeEmergencyStatus.md) - - [IncomingPhoneNumberTollFreeVoiceReceiveMode](docs/IncomingPhoneNumberTollFreeVoiceReceiveMode.md) - - [IncomingPhoneNumberVoiceReceiveMode](docs/IncomingPhoneNumberVoiceReceiveMode.md) - [ListAccountResponse](docs/ListAccountResponse.md) - [ListAddressResponse](docs/ListAddressResponse.md) - [ListApplicationResponse](docs/ListApplicationResponse.md) @@ -385,28 +364,6 @@ Class | Method | HTTP request | Description - [ListUsageRecordYearlyResponse](docs/ListUsageRecordYearlyResponse.md) - [ListUsageRecordYesterdayResponse](docs/ListUsageRecordYesterdayResponse.md) - [ListUsageTriggerResponse](docs/ListUsageTriggerResponse.md) - - [MessageDirection](docs/MessageDirection.md) - - [MessageFeedbackOutcome](docs/MessageFeedbackOutcome.md) - - [MessageStatus](docs/MessageStatus.md) - - [ParticipantStatus](docs/ParticipantStatus.md) - - [PhoneNumberCapabilities](docs/PhoneNumberCapabilities.md) - - [RecordingAddOnResultStatus](docs/RecordingAddOnResultStatus.md) - - [RecordingSource](docs/RecordingSource.md) - - [RecordingStatus](docs/RecordingStatus.md) - - [RecordingTranscriptionStatus](docs/RecordingTranscriptionStatus.md) - - [TranscriptionStatus](docs/TranscriptionStatus.md) - - [UsageRecordAllTimeCategory](docs/UsageRecordAllTimeCategory.md) - - [UsageRecordCategory](docs/UsageRecordCategory.md) - - [UsageRecordDailyCategory](docs/UsageRecordDailyCategory.md) - - [UsageRecordLastMonthCategory](docs/UsageRecordLastMonthCategory.md) - - [UsageRecordMonthlyCategory](docs/UsageRecordMonthlyCategory.md) - - [UsageRecordThisMonthCategory](docs/UsageRecordThisMonthCategory.md) - - [UsageRecordTodayCategory](docs/UsageRecordTodayCategory.md) - - [UsageRecordYearlyCategory](docs/UsageRecordYearlyCategory.md) - - [UsageRecordYesterdayCategory](docs/UsageRecordYesterdayCategory.md) - - [UsageTriggerRecurring](docs/UsageTriggerRecurring.md) - - [UsageTriggerTriggerField](docs/UsageTriggerTriggerField.md) - - [UsageTriggerUsageCategory](docs/UsageTriggerUsageCategory.md) ## Documentation For Authorization diff --git a/twilio/rest/api/v2010/docs/ApiV2010Account.md b/twilio/rest/api/v2010/docs/ApiV2010Account.md index 9c6a6f971..e9790041e 100644 --- a/twilio/rest/api/v2010/docs/ApiV2010Account.md +++ b/twilio/rest/api/v2010/docs/ApiV2010Account.md @@ -1,18 +1,18 @@ # ApiV2010Account ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AuthToken** | Pointer to **string** | -**DateCreated** | Pointer to **string** | -**DateUpdated** | Pointer to **string** | -**FriendlyName** | Pointer to **string** | -**OwnerAccountSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Status** | Pointer to [**AccountStatus**](account_status.md) | -**SubresourceUris** | Pointer to **map[string]interface{}** | -**Type** | Pointer to [**AccountType**](account_type.md) | -**Uri** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AuthToken** | Pointer to **string** | The authorization token for this account | +**DateCreated** | Pointer to **string** | The date this account was created | +**DateUpdated** | Pointer to **string** | The date this account was last updated | +**FriendlyName** | Pointer to **string** | A human readable description of this account | +**OwnerAccountSid** | Pointer to **string** | The unique 34 character id representing the parent of this account | +**Sid** | Pointer to **string** | A 34 character string that uniquely identifies this resource. | +**Status** | Pointer to **string** | The status of this account | +**SubresourceUris** | Pointer to **map[string]interface{}** | Account Instance Subresources | +**Type** | Pointer to **string** | The type of this account | +**Uri** | Pointer to **string** | The URI for this resource, relative to `https://api.twilio.com` | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ApiV2010AccountAddress.md b/twilio/rest/api/v2010/docs/ApiV2010AccountAddress.md index e9369d829..e4e2d5939 100644 --- a/twilio/rest/api/v2010/docs/ApiV2010AccountAddress.md +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountAddress.md @@ -1,23 +1,23 @@ # ApiV2010AccountAddress ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**City** | Pointer to **string** | -**CustomerName** | Pointer to **string** | -**DateCreated** | Pointer to **string** | -**DateUpdated** | Pointer to **string** | -**EmergencyEnabled** | Pointer to **bool** | -**FriendlyName** | Pointer to **string** | -**IsoCountry** | Pointer to **string** | -**PostalCode** | Pointer to **string** | -**Region** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Street** | Pointer to **string** | -**Uri** | Pointer to **string** | -**Validated** | Pointer to **bool** | -**Verified** | Pointer to **bool** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that is responsible for the resource | +**City** | Pointer to **string** | The city in which the address is located | +**CustomerName** | Pointer to **string** | The name associated with the address | +**DateCreated** | Pointer to **string** | The RFC 2822 date and time in GMT that the resource was created | +**DateUpdated** | Pointer to **string** | The RFC 2822 date and time in GMT that the resource was last updated | +**EmergencyEnabled** | Pointer to **bool** | Whether emergency calling has been enabled on this number | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the resource | +**IsoCountry** | Pointer to **string** | The ISO country code of the address | +**PostalCode** | Pointer to **string** | The postal code of the address | +**Region** | Pointer to **string** | The state or region of the address | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Street** | Pointer to **string** | The number and street address of the address | +**Uri** | Pointer to **string** | The URI of the resource, relative to `https://api.twilio.com` | +**Validated** | Pointer to **bool** | Whether the address has been validated to comply with local regulation | +**Verified** | Pointer to **bool** | Whether the address has been verified to comply with regulation | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ApiV2010AccountAddressDependentPhoneNumber.md b/twilio/rest/api/v2010/docs/ApiV2010AccountAddressDependentPhoneNumber.md index 4382cc1f2..cc5667954 100644 --- a/twilio/rest/api/v2010/docs/ApiV2010AccountAddressDependentPhoneNumber.md +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountAddressDependentPhoneNumber.md @@ -1,34 +1,34 @@ # ApiV2010AccountAddressDependentPhoneNumber ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**AddressRequirements** | Pointer to [**DependentPhoneNumberAddressRequirement**](dependent_phone_number_address_requirement.md) | -**ApiVersion** | Pointer to **string** | -**Capabilities** | Pointer to **map[string]interface{}** | -**DateCreated** | Pointer to **string** | -**DateUpdated** | Pointer to **string** | -**EmergencyAddressSid** | Pointer to **string** | -**EmergencyStatus** | Pointer to [**DependentPhoneNumberEmergencyStatus**](dependent_phone_number_emergency_status.md) | -**FriendlyName** | Pointer to **string** | -**PhoneNumber** | Pointer to **string** | -**Sid** | Pointer to **string** | -**SmsApplicationSid** | Pointer to **string** | -**SmsFallbackMethod** | Pointer to [**HttpMethod**](http_method.md) | -**SmsFallbackUrl** | Pointer to **string** | -**SmsMethod** | Pointer to [**HttpMethod**](http_method.md) | -**SmsUrl** | Pointer to **string** | -**StatusCallback** | Pointer to **string** | -**StatusCallbackMethod** | Pointer to [**HttpMethod**](http_method.md) | -**TrunkSid** | Pointer to **string** | -**Uri** | Pointer to **string** | -**VoiceApplicationSid** | Pointer to **string** | -**VoiceCallerIdLookup** | Pointer to **bool** | -**VoiceFallbackMethod** | Pointer to [**HttpMethod**](http_method.md) | -**VoiceFallbackUrl** | Pointer to **string** | -**VoiceMethod** | Pointer to [**HttpMethod**](http_method.md) | -**VoiceUrl** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**AddressRequirements** | Pointer to **string** | Whether the phone number requires an Address registered with Twilio | +**ApiVersion** | Pointer to **string** | The API version used to start a new TwiML session | +**Capabilities** | Pointer to **map[string]interface{}** | Indicate if a phone can receive calls or messages | +**DateCreated** | Pointer to **string** | The RFC 2822 date and time in GMT that the resource was created | +**DateUpdated** | Pointer to **string** | The RFC 2822 date and time in GMT that the resource was last updated | +**EmergencyAddressSid** | Pointer to **string** | The emergency address configuration to use for emergency calling | +**EmergencyStatus** | Pointer to **string** | Whether the phone number is enabled for emergency calling | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the resource | +**PhoneNumber** | Pointer to **string** | The phone number in E.164 format | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**SmsApplicationSid** | Pointer to **string** | The SID of the application that handles SMS messages sent to the phone number | +**SmsFallbackMethod** | Pointer to **string** | The HTTP method used with sms_fallback_url | +**SmsFallbackUrl** | Pointer to **string** | The URL that we call when an error occurs while retrieving or executing the TwiML | +**SmsMethod** | Pointer to **string** | The HTTP method to use with sms_url | +**SmsUrl** | Pointer to **string** | The URL we call when the phone number receives an incoming SMS message | +**StatusCallback** | Pointer to **string** | The URL to send status information to your application | +**StatusCallbackMethod** | Pointer to **string** | The HTTP method we use to call status_callback | +**TrunkSid** | Pointer to **string** | The SID of the Trunk that handles calls to the phone number | +**Uri** | Pointer to **string** | The URI of the resource, relative to `https://api.twilio.com` | +**VoiceApplicationSid** | Pointer to **string** | The SID of the application that handles calls to the phone number | +**VoiceCallerIdLookup** | Pointer to **bool** | Whether to lookup the caller's name | +**VoiceFallbackMethod** | Pointer to **string** | The HTTP method used with voice_fallback_url | +**VoiceFallbackUrl** | Pointer to **string** | The URL we call when an error occurs in TwiML | +**VoiceMethod** | Pointer to **string** | The HTTP method used with the voice_url | +**VoiceUrl** | Pointer to **string** | The URL we call when the phone number receives a call | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ApiV2010AccountApplication.md b/twilio/rest/api/v2010/docs/ApiV2010AccountApplication.md index ef7e3afed..a252b4f62 100644 --- a/twilio/rest/api/v2010/docs/ApiV2010AccountApplication.md +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountApplication.md @@ -1,28 +1,28 @@ # ApiV2010AccountApplication ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**ApiVersion** | Pointer to **string** | -**DateCreated** | Pointer to **string** | -**DateUpdated** | Pointer to **string** | -**FriendlyName** | Pointer to **string** | -**MessageStatusCallback** | Pointer to **string** | -**Sid** | Pointer to **string** | -**SmsFallbackMethod** | Pointer to [**HttpMethod**](http_method.md) | -**SmsFallbackUrl** | Pointer to **string** | -**SmsMethod** | Pointer to [**HttpMethod**](http_method.md) | -**SmsStatusCallback** | Pointer to **string** | -**SmsUrl** | Pointer to **string** | -**StatusCallback** | Pointer to **string** | -**StatusCallbackMethod** | Pointer to [**HttpMethod**](http_method.md) | -**Uri** | Pointer to **string** | -**VoiceCallerIdLookup** | Pointer to **bool** | -**VoiceFallbackMethod** | Pointer to [**HttpMethod**](http_method.md) | -**VoiceFallbackUrl** | Pointer to **string** | -**VoiceMethod** | Pointer to [**HttpMethod**](http_method.md) | -**VoiceUrl** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**ApiVersion** | Pointer to **string** | The API version used to start a new TwiML session | +**DateCreated** | Pointer to **string** | The RFC 2822 date and time in GMT that the resource was created | +**DateUpdated** | Pointer to **string** | The RFC 2822 date and time in GMT that the resource was last updated | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the resource | +**MessageStatusCallback** | Pointer to **string** | The URL to send message status information to your application | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**SmsFallbackMethod** | Pointer to **string** | The HTTP method used with sms_fallback_url | +**SmsFallbackUrl** | Pointer to **string** | The URL that we call when an error occurs while retrieving or executing the TwiML | +**SmsMethod** | Pointer to **string** | The HTTP method to use with sms_url | +**SmsStatusCallback** | Pointer to **string** | The URL to send status information to your application | +**SmsUrl** | Pointer to **string** | The URL we call when the phone number receives an incoming SMS message | +**StatusCallback** | Pointer to **string** | The URL to send status information to your application | +**StatusCallbackMethod** | Pointer to **string** | The HTTP method we use to call status_callback | +**Uri** | Pointer to **string** | The URI of the resource, relative to `https://api.twilio.com` | +**VoiceCallerIdLookup** | Pointer to **bool** | Whether to lookup the caller's name | +**VoiceFallbackMethod** | Pointer to **string** | The HTTP method used with voice_fallback_url | +**VoiceFallbackUrl** | Pointer to **string** | The URL we call when a TwiML error occurs | +**VoiceMethod** | Pointer to **string** | The HTTP method used with the voice_url | +**VoiceUrl** | Pointer to **string** | The URL we call when the phone number receives a call | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ApiV2010AccountAuthorizedConnectApp.md b/twilio/rest/api/v2010/docs/ApiV2010AccountAuthorizedConnectApp.md index a2477c054..445ef0714 100644 --- a/twilio/rest/api/v2010/docs/ApiV2010AccountAuthorizedConnectApp.md +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountAuthorizedConnectApp.md @@ -1,18 +1,18 @@ # ApiV2010AccountAuthorizedConnectApp ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**ConnectAppCompanyName** | Pointer to **string** | -**ConnectAppDescription** | Pointer to **string** | -**ConnectAppFriendlyName** | Pointer to **string** | -**ConnectAppHomepageUrl** | Pointer to **string** | -**ConnectAppSid** | Pointer to **string** | -**DateCreated** | Pointer to **string** | -**DateUpdated** | Pointer to **string** | -**Permissions** | Pointer to **[]string** | -**Uri** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**ConnectAppCompanyName** | Pointer to **string** | The company name set for the Connect App | +**ConnectAppDescription** | Pointer to **string** | A detailed description of the app | +**ConnectAppFriendlyName** | Pointer to **string** | The name of the Connect App | +**ConnectAppHomepageUrl** | Pointer to **string** | The public URL for the Connect App | +**ConnectAppSid** | Pointer to **string** | The SID that we assigned to the Connect App | +**DateCreated** | Pointer to **string** | The RFC 2822 date and time in GMT that the resource was created | +**DateUpdated** | Pointer to **string** | The RFC 2822 date and time in GMT that the resource was last updated | +**Permissions** | Pointer to **[]string** | Permissions authorized to the app | +**Uri** | Pointer to **string** | The URI of the resource, relative to `https://api.twilio.com` | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ApiV2010AccountAvailablePhoneNumberCountry.md b/twilio/rest/api/v2010/docs/ApiV2010AccountAvailablePhoneNumberCountry.md index da647d81b..bd764a9b9 100644 --- a/twilio/rest/api/v2010/docs/ApiV2010AccountAvailablePhoneNumberCountry.md +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountAvailablePhoneNumberCountry.md @@ -1,13 +1,13 @@ # ApiV2010AccountAvailablePhoneNumberCountry ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Beta** | Pointer to **bool** | -**Country** | Pointer to **string** | -**CountryCode** | Pointer to **string** | -**SubresourceUris** | Pointer to **map[string]interface{}** | -**Uri** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Beta** | Pointer to **bool** | Whether all phone numbers available in the country are new to the Twilio platform. | +**Country** | Pointer to **string** | The name of the country | +**CountryCode** | Pointer to **string** | The ISO-3166-1 country code of the country. | +**SubresourceUris** | Pointer to **map[string]interface{}** | A list of related resources identified by their relative URIs | +**Uri** | Pointer to **string** | The URI of the Country resource, relative to `https://api.twilio.com` | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocal.md b/twilio/rest/api/v2010/docs/ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocal.md index 753f7d9bb..b252687fa 100644 --- a/twilio/rest/api/v2010/docs/ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocal.md +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocal.md @@ -1,21 +1,21 @@ # ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocal ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AddressRequirements** | Pointer to **string** | -**Beta** | Pointer to **bool** | -**Capabilities** | Pointer to [**PhoneNumberCapabilities**](phone_number_capabilities.md) | -**FriendlyName** | Pointer to **string** | -**IsoCountry** | Pointer to **string** | -**Lata** | Pointer to **string** | -**Latitude** | Pointer to **float32** | -**Locality** | Pointer to **string** | -**Longitude** | Pointer to **float32** | -**PhoneNumber** | Pointer to **string** | -**PostalCode** | Pointer to **string** | -**RateCenter** | Pointer to **string** | -**Region** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AddressRequirements** | Pointer to **string** | The type of Address resource the phone number requires | +**Beta** | Pointer to **bool** | Whether the phone number is new to the Twilio platform | +**Capabilities** | Pointer to [**ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocalCapabilities**](api_v2010_account_available_phone_number_country_available_phone_number_local_capabilities.md) | | +**FriendlyName** | Pointer to **string** | A formatted version of the phone number | +**IsoCountry** | Pointer to **string** | The ISO country code of this phone number | +**Lata** | Pointer to **string** | The LATA of this phone number | +**Latitude** | Pointer to **float32** | The latitude of this phone number's location | +**Locality** | Pointer to **string** | The locality or city of this phone number's location | +**Longitude** | Pointer to **float32** | The longitude of this phone number's location | +**PhoneNumber** | Pointer to **string** | The phone number in E.164 format | +**PostalCode** | Pointer to **string** | The postal or ZIP code of this phone number's location | +**RateCenter** | Pointer to **string** | The rate center of this phone number | +**Region** | Pointer to **string** | The two-letter state or province abbreviation of this phone number's location | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocalCapabilities.md b/twilio/rest/api/v2010/docs/ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocalCapabilities.md new file mode 100644 index 000000000..f1168dd34 --- /dev/null +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocalCapabilities.md @@ -0,0 +1,13 @@ +# ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocalCapabilities + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Fax** | **bool** | |[optional] +**Mms** | **bool** | |[optional] +**Sms** | **bool** | |[optional] +**Voice** | **bool** | |[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/twilio/rest/api/v2010/docs/ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberMachineToMachine.md b/twilio/rest/api/v2010/docs/ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberMachineToMachine.md index 4083d6658..1cd6c917a 100644 --- a/twilio/rest/api/v2010/docs/ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberMachineToMachine.md +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberMachineToMachine.md @@ -1,21 +1,21 @@ # ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberMachineToMachine ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AddressRequirements** | Pointer to **string** | -**Beta** | Pointer to **bool** | -**Capabilities** | Pointer to [**PhoneNumberCapabilities**](phone_number_capabilities.md) | -**FriendlyName** | Pointer to **string** | -**IsoCountry** | Pointer to **string** | -**Lata** | Pointer to **string** | -**Latitude** | Pointer to **float32** | -**Locality** | Pointer to **string** | -**Longitude** | Pointer to **float32** | -**PhoneNumber** | Pointer to **string** | -**PostalCode** | Pointer to **string** | -**RateCenter** | Pointer to **string** | -**Region** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AddressRequirements** | Pointer to **string** | The type of Address resource the phone number requires | +**Beta** | Pointer to **bool** | Whether the phone number is new to the Twilio platform | +**Capabilities** | Pointer to [**ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocalCapabilities**](api_v2010_account_available_phone_number_country_available_phone_number_local_capabilities.md) | | +**FriendlyName** | Pointer to **string** | A formatted version of the phone number | +**IsoCountry** | Pointer to **string** | The ISO country code of this phone number | +**Lata** | Pointer to **string** | The LATA of this phone number | +**Latitude** | Pointer to **float32** | The latitude of this phone number's location | +**Locality** | Pointer to **string** | The locality or city of this phone number's location | +**Longitude** | Pointer to **float32** | The longitude of this phone number's location | +**PhoneNumber** | Pointer to **string** | The phone number in E.164 format | +**PostalCode** | Pointer to **string** | The postal or ZIP code of this phone number's location | +**RateCenter** | Pointer to **string** | The rate center of this phone number | +**Region** | Pointer to **string** | The two-letter state or province abbreviation of this phone number's location | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberMobile.md b/twilio/rest/api/v2010/docs/ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberMobile.md index 013355d5b..17cbc66b1 100644 --- a/twilio/rest/api/v2010/docs/ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberMobile.md +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberMobile.md @@ -1,21 +1,21 @@ # ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberMobile ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AddressRequirements** | Pointer to **string** | -**Beta** | Pointer to **bool** | -**Capabilities** | Pointer to [**PhoneNumberCapabilities**](phone_number_capabilities.md) | -**FriendlyName** | Pointer to **string** | -**IsoCountry** | Pointer to **string** | -**Lata** | Pointer to **string** | -**Latitude** | Pointer to **float32** | -**Locality** | Pointer to **string** | -**Longitude** | Pointer to **float32** | -**PhoneNumber** | Pointer to **string** | -**PostalCode** | Pointer to **string** | -**RateCenter** | Pointer to **string** | -**Region** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AddressRequirements** | Pointer to **string** | The type of Address resource the phone number requires | +**Beta** | Pointer to **bool** | Whether the phone number is new to the Twilio platform | +**Capabilities** | Pointer to [**ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocalCapabilities**](api_v2010_account_available_phone_number_country_available_phone_number_local_capabilities.md) | | +**FriendlyName** | Pointer to **string** | A formatted version of the phone number | +**IsoCountry** | Pointer to **string** | The ISO country code of this phone number | +**Lata** | Pointer to **string** | The LATA of this phone number | +**Latitude** | Pointer to **float32** | The latitude of this phone number's location | +**Locality** | Pointer to **string** | The locality or city of this phone number's location | +**Longitude** | Pointer to **float32** | The longitude of this phone number's location | +**PhoneNumber** | Pointer to **string** | The phone number in E.164 format | +**PostalCode** | Pointer to **string** | The postal or ZIP code of this phone number's location | +**RateCenter** | Pointer to **string** | The rate center of this phone number | +**Region** | Pointer to **string** | The two-letter state or province abbreviation of this phone number's location | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberNational.md b/twilio/rest/api/v2010/docs/ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberNational.md index 911fdcda7..530c49496 100644 --- a/twilio/rest/api/v2010/docs/ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberNational.md +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberNational.md @@ -1,21 +1,21 @@ # ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberNational ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AddressRequirements** | Pointer to **string** | -**Beta** | Pointer to **bool** | -**Capabilities** | Pointer to [**PhoneNumberCapabilities**](phone_number_capabilities.md) | -**FriendlyName** | Pointer to **string** | -**IsoCountry** | Pointer to **string** | -**Lata** | Pointer to **string** | -**Latitude** | Pointer to **float32** | -**Locality** | Pointer to **string** | -**Longitude** | Pointer to **float32** | -**PhoneNumber** | Pointer to **string** | -**PostalCode** | Pointer to **string** | -**RateCenter** | Pointer to **string** | -**Region** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AddressRequirements** | Pointer to **string** | The type of Address resource the phone number requires | +**Beta** | Pointer to **bool** | Whether the phone number is new to the Twilio platform | +**Capabilities** | Pointer to [**ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocalCapabilities**](api_v2010_account_available_phone_number_country_available_phone_number_local_capabilities.md) | | +**FriendlyName** | Pointer to **string** | A formatted version of the phone number | +**IsoCountry** | Pointer to **string** | The ISO country code of this phone number | +**Lata** | Pointer to **string** | The LATA of this phone number | +**Latitude** | Pointer to **float32** | The latitude of this phone number's location | +**Locality** | Pointer to **string** | The locality or city of this phone number's location | +**Longitude** | Pointer to **float32** | The longitude of this phone number's location | +**PhoneNumber** | Pointer to **string** | The phone number in E.164 format | +**PostalCode** | Pointer to **string** | The postal or ZIP code of this phone number's location | +**RateCenter** | Pointer to **string** | The rate center of this phone number | +**Region** | Pointer to **string** | The two-letter state or province abbreviation of this phone number's location | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberSharedCost.md b/twilio/rest/api/v2010/docs/ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberSharedCost.md index c61fae446..77b37579d 100644 --- a/twilio/rest/api/v2010/docs/ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberSharedCost.md +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberSharedCost.md @@ -1,21 +1,21 @@ # ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberSharedCost ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AddressRequirements** | Pointer to **string** | -**Beta** | Pointer to **bool** | -**Capabilities** | Pointer to [**PhoneNumberCapabilities**](phone_number_capabilities.md) | -**FriendlyName** | Pointer to **string** | -**IsoCountry** | Pointer to **string** | -**Lata** | Pointer to **string** | -**Latitude** | Pointer to **float32** | -**Locality** | Pointer to **string** | -**Longitude** | Pointer to **float32** | -**PhoneNumber** | Pointer to **string** | -**PostalCode** | Pointer to **string** | -**RateCenter** | Pointer to **string** | -**Region** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AddressRequirements** | Pointer to **string** | The type of Address resource the phone number requires | +**Beta** | Pointer to **bool** | Whether the phone number is new to the Twilio platform | +**Capabilities** | Pointer to [**ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocalCapabilities**](api_v2010_account_available_phone_number_country_available_phone_number_local_capabilities.md) | | +**FriendlyName** | Pointer to **string** | A formatted version of the phone number | +**IsoCountry** | Pointer to **string** | The ISO country code of this phone number | +**Lata** | Pointer to **string** | The LATA of this phone number | +**Latitude** | Pointer to **float32** | The latitude of this phone number's location | +**Locality** | Pointer to **string** | The locality or city of this phone number's location | +**Longitude** | Pointer to **float32** | The longitude of this phone number's location | +**PhoneNumber** | Pointer to **string** | The phone number in E.164 format | +**PostalCode** | Pointer to **string** | The postal or ZIP code of this phone number's location | +**RateCenter** | Pointer to **string** | The rate center of this phone number | +**Region** | Pointer to **string** | The two-letter state or province abbreviation of this phone number's location | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberTollFree.md b/twilio/rest/api/v2010/docs/ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberTollFree.md index 7d7196da2..b8feb3def 100644 --- a/twilio/rest/api/v2010/docs/ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberTollFree.md +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberTollFree.md @@ -1,21 +1,21 @@ # ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberTollFree ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AddressRequirements** | Pointer to **string** | -**Beta** | Pointer to **bool** | -**Capabilities** | Pointer to [**PhoneNumberCapabilities**](phone_number_capabilities.md) | -**FriendlyName** | Pointer to **string** | -**IsoCountry** | Pointer to **string** | -**Lata** | Pointer to **string** | -**Latitude** | Pointer to **float32** | -**Locality** | Pointer to **string** | -**Longitude** | Pointer to **float32** | -**PhoneNumber** | Pointer to **string** | -**PostalCode** | Pointer to **string** | -**RateCenter** | Pointer to **string** | -**Region** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AddressRequirements** | Pointer to **string** | The type of Address resource the phone number requires | +**Beta** | Pointer to **bool** | Whether the phone number is new to the Twilio platform | +**Capabilities** | Pointer to [**ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocalCapabilities**](api_v2010_account_available_phone_number_country_available_phone_number_local_capabilities.md) | | +**FriendlyName** | Pointer to **string** | A formatted version of the phone number | +**IsoCountry** | Pointer to **string** | The ISO country code of this phone number | +**Lata** | Pointer to **string** | The LATA of this phone number | +**Latitude** | Pointer to **float32** | The latitude of this phone number's location | +**Locality** | Pointer to **string** | The locality or city of this phone number's location | +**Longitude** | Pointer to **float32** | The longitude of this phone number's location | +**PhoneNumber** | Pointer to **string** | The phone number in E.164 format | +**PostalCode** | Pointer to **string** | The postal or ZIP code of this phone number's location | +**RateCenter** | Pointer to **string** | The rate center of this phone number | +**Region** | Pointer to **string** | The two-letter state or province abbreviation of this phone number's location | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberVoip.md b/twilio/rest/api/v2010/docs/ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberVoip.md index 5ad41d601..197f6bc99 100644 --- a/twilio/rest/api/v2010/docs/ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberVoip.md +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberVoip.md @@ -1,21 +1,21 @@ # ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberVoip ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AddressRequirements** | Pointer to **string** | -**Beta** | Pointer to **bool** | -**Capabilities** | Pointer to [**PhoneNumberCapabilities**](phone_number_capabilities.md) | -**FriendlyName** | Pointer to **string** | -**IsoCountry** | Pointer to **string** | -**Lata** | Pointer to **string** | -**Latitude** | Pointer to **float32** | -**Locality** | Pointer to **string** | -**Longitude** | Pointer to **float32** | -**PhoneNumber** | Pointer to **string** | -**PostalCode** | Pointer to **string** | -**RateCenter** | Pointer to **string** | -**Region** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AddressRequirements** | Pointer to **string** | The type of Address resource the phone number requires | +**Beta** | Pointer to **bool** | Whether the phone number is new to the Twilio platform | +**Capabilities** | Pointer to [**ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocalCapabilities**](api_v2010_account_available_phone_number_country_available_phone_number_local_capabilities.md) | | +**FriendlyName** | Pointer to **string** | A formatted version of the phone number | +**IsoCountry** | Pointer to **string** | The ISO country code of this phone number | +**Lata** | Pointer to **string** | The LATA of this phone number | +**Latitude** | Pointer to **float32** | The latitude of this phone number's location | +**Locality** | Pointer to **string** | The locality or city of this phone number's location | +**Longitude** | Pointer to **float32** | The longitude of this phone number's location | +**PhoneNumber** | Pointer to **string** | The phone number in E.164 format | +**PostalCode** | Pointer to **string** | The postal or ZIP code of this phone number's location | +**RateCenter** | Pointer to **string** | The rate center of this phone number | +**Region** | Pointer to **string** | The two-letter state or province abbreviation of this phone number's location | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ApiV2010AccountBalance.md b/twilio/rest/api/v2010/docs/ApiV2010AccountBalance.md index 844ca0432..d954447ac 100644 --- a/twilio/rest/api/v2010/docs/ApiV2010AccountBalance.md +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountBalance.md @@ -1,11 +1,11 @@ # ApiV2010AccountBalance ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Balance** | Pointer to **string** | -**Currency** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | Account Sid. | +**Balance** | Pointer to **string** | Account balance | +**Currency** | Pointer to **string** | Currency units | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ApiV2010AccountCall.md b/twilio/rest/api/v2010/docs/ApiV2010AccountCall.md index ea74da2b1..51988756e 100644 --- a/twilio/rest/api/v2010/docs/ApiV2010AccountCall.md +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountCall.md @@ -1,35 +1,35 @@ # ApiV2010AccountCall ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Annotation** | Pointer to **string** | -**AnsweredBy** | Pointer to **string** | -**ApiVersion** | Pointer to **string** | -**CallerName** | Pointer to **string** | -**DateCreated** | Pointer to **string** | -**DateUpdated** | Pointer to **string** | -**Direction** | Pointer to **string** | -**Duration** | Pointer to **string** | -**EndTime** | Pointer to **string** | -**ForwardedFrom** | Pointer to **string** | -**From** | Pointer to **string** | -**FromFormatted** | Pointer to **string** | -**GroupSid** | Pointer to **string** | -**ParentCallSid** | Pointer to **string** | -**PhoneNumberSid** | Pointer to **string** | -**Price** | Pointer to **string** | -**PriceUnit** | Pointer to **string** | -**QueueTime** | Pointer to **string** | -**Sid** | Pointer to **string** | -**StartTime** | Pointer to **string** | -**Status** | Pointer to [**CallStatus**](call_status.md) | -**SubresourceUris** | Pointer to **map[string]interface{}** | -**To** | Pointer to **string** | -**ToFormatted** | Pointer to **string** | -**TrunkSid** | Pointer to **string** | -**Uri** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created this resource | +**Annotation** | Pointer to **string** | The annotation provided for the call | +**AnsweredBy** | Pointer to **string** | Either `human` or `machine` if this call was initiated with answering machine detection. Empty otherwise. | +**ApiVersion** | Pointer to **string** | The API Version used to create the call | +**CallerName** | Pointer to **string** | The caller's name if this call was an incoming call to a phone number with caller ID Lookup enabled. Otherwise, empty. | +**DateCreated** | Pointer to **string** | The RFC 2822 date and time in GMT that this resource was created | +**DateUpdated** | Pointer to **string** | The RFC 2822 date and time in GMT that this resource was last updated | +**Direction** | Pointer to **string** | A string describing the direction of the call. `inbound` for inbound calls, `outbound-api` for calls initiated via the REST API or `outbound-dial` for calls initiated by a `Dial` verb. | +**Duration** | Pointer to **string** | The length of the call in seconds. | +**EndTime** | Pointer to **string** | The end time of the call. Null if the call did not complete successfully. | +**ForwardedFrom** | Pointer to **string** | The forwarding phone number if this call was an incoming call forwarded from another number (depends on carrier supporting forwarding). Otherwise, empty. | +**From** | Pointer to **string** | The phone number, SIP address or Client identifier that made this call. Phone numbers are in E.164 format (e.g., +16175551212). SIP addresses are formatted as `name@company.com`. Client identifiers are formatted `client:name`. | +**FromFormatted** | Pointer to **string** | The calling phone number, SIP address, or Client identifier formatted for display. | +**GroupSid** | Pointer to **string** | The Group SID associated with this call. If no Group is associated with the call, the field is empty. | +**ParentCallSid** | Pointer to **string** | The SID that identifies the call that created this leg. | +**PhoneNumberSid** | Pointer to **string** | If the call was inbound, this is the SID of the IncomingPhoneNumber resource that received the call. If the call was outbound, it is the SID of the OutgoingCallerId resource from which the call was placed. | +**Price** | Pointer to **string** | The charge for this call, in the currency associated with the account. Populated after the call is completed. May not be immediately available. | +**PriceUnit** | Pointer to **string** | The currency in which `Price` is measured. | +**QueueTime** | Pointer to **string** | The wait time in milliseconds before the call is placed. | +**Sid** | Pointer to **string** | The unique string that identifies this resource | +**StartTime** | Pointer to **string** | The start time of the call. Null if the call has not yet been dialed. | +**Status** | Pointer to **string** | The status of this call. | +**SubresourceUris** | Pointer to **map[string]interface{}** | A list of related subresources identified by their relative URIs | +**To** | Pointer to **string** | The phone number, SIP address or Client identifier that received this call. Phone numbers are in E.164 format (e.g., +16175551212). SIP addresses are formatted as `name@company.com`. Client identifiers are formatted `client:name`. | +**ToFormatted** | Pointer to **string** | The phone number, SIP address or Client identifier that received this call. Formatted for display. | +**TrunkSid** | Pointer to **string** | The (optional) unique identifier of the trunk resource that was used for this call. | +**Uri** | Pointer to **string** | The URI of this resource, relative to `https://api.twilio.com` | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ApiV2010AccountCallCallEvent.md b/twilio/rest/api/v2010/docs/ApiV2010AccountCallCallEvent.md index e6fb212e8..0f797e95d 100644 --- a/twilio/rest/api/v2010/docs/ApiV2010AccountCallCallEvent.md +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountCallCallEvent.md @@ -1,10 +1,10 @@ # ApiV2010AccountCallCallEvent ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Request** | Pointer to **map[string]interface{}** | -**Response** | Pointer to **map[string]interface{}** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Request** | Pointer to **map[string]interface{}** | Call Request. | +**Response** | Pointer to **map[string]interface{}** | Call Response with Events. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ApiV2010AccountCallCallFeedback.md b/twilio/rest/api/v2010/docs/ApiV2010AccountCallCallFeedback.md index 24410c5ad..1e8db5874 100644 --- a/twilio/rest/api/v2010/docs/ApiV2010AccountCallCallFeedback.md +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountCallCallFeedback.md @@ -1,14 +1,14 @@ # ApiV2010AccountCallCallFeedback ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**DateCreated** | Pointer to **string** | -**DateUpdated** | Pointer to **string** | -**Issues** | Pointer to **[]string** | -**QualityScore** | Pointer to **int32** | -**Sid** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The unique sid that identifies this account | +**DateCreated** | Pointer to **string** | The date this resource was created | +**DateUpdated** | Pointer to **string** | The date this resource was last updated | +**Issues** | Pointer to **[]string** | Issues experienced during the call | +**QualityScore** | Pointer to **int32** | 1 to 5 quality score | +**Sid** | Pointer to **string** | A string that uniquely identifies this feedback resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ApiV2010AccountCallCallFeedbackSummary.md b/twilio/rest/api/v2010/docs/ApiV2010AccountCallCallFeedbackSummary.md index acf7e220f..7c94c2f07 100644 --- a/twilio/rest/api/v2010/docs/ApiV2010AccountCallCallFeedbackSummary.md +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountCallCallFeedbackSummary.md @@ -1,22 +1,22 @@ # ApiV2010AccountCallCallFeedbackSummary ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**CallCount** | Pointer to **int32** | -**CallFeedbackCount** | Pointer to **int32** | -**DateCreated** | Pointer to **string** | -**DateUpdated** | Pointer to **string** | -**EndDate** | Pointer to [**time.Time**](time.Time.md) | -**IncludeSubaccounts** | Pointer to **bool** | -**Issues** | Pointer to **[]map[string]interface{}** | -**QualityScoreAverage** | Pointer to **float32** | -**QualityScoreMedian** | Pointer to **float32** | -**QualityScoreStandardDeviation** | Pointer to **float32** | -**Sid** | Pointer to **string** | -**StartDate** | Pointer to [**time.Time**](time.Time.md) | -**Status** | Pointer to [**CallFeedbackSummaryStatus**](call_feedback_summary_status.md) | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The unique sid that identifies this account | +**CallCount** | Pointer to **int32** | The total number of calls | +**CallFeedbackCount** | Pointer to **int32** | The total number of calls with a feedback entry | +**DateCreated** | Pointer to **string** | The date this resource was created | +**DateUpdated** | Pointer to **string** | The date this resource was last updated | +**EndDate** | Pointer to [**time.Time**](time.Time.md) | The latest feedback entry date in the summary | +**IncludeSubaccounts** | Pointer to **bool** | Whether the feedback summary includes subaccounts | +**Issues** | Pointer to [**[]ApiV2010AccountCallCallFeedbackSummaryIssues**](api_v2010_account_call_call_feedback_summary_issues.md) | Issues experienced during the call | +**QualityScoreAverage** | Pointer to **float32** | The average QualityScore of the feedback entries | +**QualityScoreMedian** | Pointer to **float32** | The median QualityScore of the feedback entries | +**QualityScoreStandardDeviation** | Pointer to **float32** | The standard deviation of the quality scores | +**Sid** | Pointer to **string** | A string that uniquely identifies this feedback entry | +**StartDate** | Pointer to [**time.Time**](time.Time.md) | The earliest feedback entry date in the summary | +**Status** | Pointer to **string** | The status of the feedback summary | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ApiV2010AccountCallCallFeedbackSummaryIssues.md b/twilio/rest/api/v2010/docs/ApiV2010AccountCallCallFeedbackSummaryIssues.md new file mode 100644 index 000000000..7e31d3cbd --- /dev/null +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountCallCallFeedbackSummaryIssues.md @@ -0,0 +1,12 @@ +# ApiV2010AccountCallCallFeedbackSummaryIssues + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Count** | **float32** | |[optional] +**Description** | **string** | |[optional] +**PercentageOfTotalCalls** | **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/twilio/rest/api/v2010/docs/ApiV2010AccountCallCallNotification.md b/twilio/rest/api/v2010/docs/ApiV2010AccountCallCallNotification.md index 1c6c7325a..c0d83c7fb 100644 --- a/twilio/rest/api/v2010/docs/ApiV2010AccountCallCallNotification.md +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountCallCallNotification.md @@ -1,22 +1,22 @@ # ApiV2010AccountCallCallNotification ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**ApiVersion** | Pointer to **string** | -**CallSid** | Pointer to **string** | -**DateCreated** | Pointer to **string** | -**DateUpdated** | Pointer to **string** | -**ErrorCode** | Pointer to **string** | -**Log** | Pointer to **string** | -**MessageDate** | Pointer to **string** | -**MessageText** | Pointer to **string** | -**MoreInfo** | Pointer to **string** | -**RequestMethod** | Pointer to [**HttpMethod**](http_method.md) | -**RequestUrl** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Uri** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**ApiVersion** | Pointer to **string** | The API version used to create the Call Notification resource | +**CallSid** | Pointer to **string** | The SID of the Call the resource is associated with | +**DateCreated** | Pointer to **string** | The RFC 2822 date and time in GMT that the resource was created | +**DateUpdated** | Pointer to **string** | The RFC 2822 date and time in GMT that the resource was last updated | +**ErrorCode** | Pointer to **string** | A unique error code corresponding to the notification | +**Log** | Pointer to **string** | An integer log level | +**MessageDate** | Pointer to **string** | The date the notification was generated | +**MessageText** | Pointer to **string** | The text of the notification | +**MoreInfo** | Pointer to **string** | A URL for more information about the error code | +**RequestMethod** | Pointer to **string** | HTTP method used with the request url | +**RequestUrl** | Pointer to **string** | URL of the resource that generated the notification | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Uri** | Pointer to **string** | The URI of the resource, relative to `https://api.twilio.com` | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ApiV2010AccountCallCallNotificationInstance.md b/twilio/rest/api/v2010/docs/ApiV2010AccountCallCallNotificationInstance.md index d4d7d4f0a..8b91d58d1 100644 --- a/twilio/rest/api/v2010/docs/ApiV2010AccountCallCallNotificationInstance.md +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountCallCallNotificationInstance.md @@ -1,25 +1,25 @@ # ApiV2010AccountCallCallNotificationInstance ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**ApiVersion** | Pointer to **string** | -**CallSid** | Pointer to **string** | -**DateCreated** | Pointer to **string** | -**DateUpdated** | Pointer to **string** | -**ErrorCode** | Pointer to **string** | -**Log** | Pointer to **string** | -**MessageDate** | Pointer to **string** | -**MessageText** | Pointer to **string** | -**MoreInfo** | Pointer to **string** | -**RequestMethod** | Pointer to [**HttpMethod**](http_method.md) | -**RequestUrl** | Pointer to **string** | -**RequestVariables** | Pointer to **string** | -**ResponseBody** | Pointer to **string** | -**ResponseHeaders** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Uri** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**ApiVersion** | Pointer to **string** | The API version used to create the Call Notification resource | +**CallSid** | Pointer to **string** | The SID of the Call the resource is associated with | +**DateCreated** | Pointer to **string** | The RFC 2822 date and time in GMT that the resource was created | +**DateUpdated** | Pointer to **string** | The RFC 2822 date and time in GMT that the resource was last updated | +**ErrorCode** | Pointer to **string** | A unique error code corresponding to the notification | +**Log** | Pointer to **string** | An integer log level | +**MessageDate** | Pointer to **string** | The date the notification was generated | +**MessageText** | Pointer to **string** | The text of the notification | +**MoreInfo** | Pointer to **string** | A URL for more information about the error code | +**RequestMethod** | Pointer to **string** | HTTP method used with the request url | +**RequestUrl** | Pointer to **string** | URL of the resource that generated the notification | +**RequestVariables** | Pointer to **string** | Twilio-generated HTTP variables sent to the server | +**ResponseBody** | Pointer to **string** | The HTTP body returned by your server | +**ResponseHeaders** | Pointer to **string** | The HTTP headers returned by your server | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Uri** | Pointer to **string** | The URI of the resource, relative to `https://api.twilio.com` | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ApiV2010AccountCallCallRecording.md b/twilio/rest/api/v2010/docs/ApiV2010AccountCallCallRecording.md index 77b9c18b1..9008f4d74 100644 --- a/twilio/rest/api/v2010/docs/ApiV2010AccountCallCallRecording.md +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountCallCallRecording.md @@ -1,26 +1,26 @@ # ApiV2010AccountCallCallRecording ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**ApiVersion** | Pointer to **string** | -**CallSid** | Pointer to **string** | -**Channels** | Pointer to **int32** | -**ConferenceSid** | Pointer to **string** | -**DateCreated** | Pointer to **string** | -**DateUpdated** | Pointer to **string** | -**Duration** | Pointer to **string** | -**EncryptionDetails** | Pointer to **map[string]interface{}** | -**ErrorCode** | Pointer to **int32** | -**Price** | Pointer to **float32** | -**PriceUnit** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Source** | Pointer to [**CallRecordingSource**](call_recording_source.md) | -**StartTime** | Pointer to **string** | -**Status** | Pointer to [**CallRecordingStatus**](call_recording_status.md) | -**Track** | Pointer to **string** | -**Uri** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**ApiVersion** | Pointer to **string** | The API version used to make the recording | +**CallSid** | Pointer to **string** | The SID of the Call the resource is associated with | +**Channels** | Pointer to **int32** | The number of channels in the final recording file | +**ConferenceSid** | Pointer to **string** | The Conference SID that identifies the conference associated with the recording | +**DateCreated** | Pointer to **string** | The RFC 2822 date and time in GMT that the resource was created | +**DateUpdated** | Pointer to **string** | The RFC 2822 date and time in GMT that the resource was last updated | +**Duration** | Pointer to **string** | The length of the recording in seconds | +**EncryptionDetails** | Pointer to **map[string]interface{}** | How to decrypt the recording. | +**ErrorCode** | Pointer to **int32** | More information about why the recording is missing, if status is `absent`. | +**Price** | Pointer to **float32** | The one-time cost of creating the recording. | +**PriceUnit** | Pointer to **string** | The currency used in the price property. | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Source** | Pointer to **string** | How the recording was created | +**StartTime** | Pointer to **string** | The start time of the recording, given in RFC 2822 format | +**Status** | Pointer to **string** | The status of the recording | +**Track** | Pointer to **string** | The recorded track. Can be: `inbound`, `outbound`, or `both`. | +**Uri** | Pointer to **string** | The URI of the resource, relative to `https://api.twilio.com` | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ApiV2010AccountCallPayments.md b/twilio/rest/api/v2010/docs/ApiV2010AccountCallPayments.md index b97b93be1..86376d166 100644 --- a/twilio/rest/api/v2010/docs/ApiV2010AccountCallPayments.md +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountCallPayments.md @@ -1,14 +1,14 @@ # ApiV2010AccountCallPayments ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**CallSid** | Pointer to **string** | -**DateCreated** | Pointer to **string** | -**DateUpdated** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Uri** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the Payments resource. | +**CallSid** | Pointer to **string** | The SID of the Call the resource is associated with. | +**DateCreated** | Pointer to **string** | The RFC 2822 date and time in GMT that the resource was created | +**DateUpdated** | Pointer to **string** | The RFC 2822 date and time in GMT that the resource was last updated | +**Sid** | Pointer to **string** | The SID of the Payments resource. | +**Uri** | Pointer to **string** | The URI of the resource, relative to `https://api.twilio.com` | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ApiV2010AccountConference.md b/twilio/rest/api/v2010/docs/ApiV2010AccountConference.md index 8c3738dc6..8c077dd00 100644 --- a/twilio/rest/api/v2010/docs/ApiV2010AccountConference.md +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountConference.md @@ -1,20 +1,20 @@ # ApiV2010AccountConference ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**ApiVersion** | Pointer to **string** | -**CallSidEndingConference** | Pointer to **string** | -**DateCreated** | Pointer to **string** | -**DateUpdated** | Pointer to **string** | -**FriendlyName** | Pointer to **string** | -**ReasonConferenceEnded** | Pointer to [**ConferenceReasonConferenceEnded**](conference_reason_conference_ended.md) | -**Region** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Status** | Pointer to [**ConferenceStatus**](conference_status.md) | -**SubresourceUris** | Pointer to **map[string]interface{}** | -**Uri** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created this resource | +**ApiVersion** | Pointer to **string** | The API version used to create this conference | +**CallSidEndingConference** | Pointer to **string** | The call SID that caused the conference to end | +**DateCreated** | Pointer to **string** | The RFC 2822 date and time in GMT that this resource was created | +**DateUpdated** | Pointer to **string** | The RFC 2822 date and time in GMT that this resource was last updated | +**FriendlyName** | Pointer to **string** | A string that you assigned to describe this conference room | +**ReasonConferenceEnded** | Pointer to **string** | The reason why a conference ended. | +**Region** | Pointer to **string** | A string that represents the Twilio Region where the conference was mixed | +**Sid** | Pointer to **string** | The unique string that identifies this resource | +**Status** | Pointer to **string** | The status of this conference | +**SubresourceUris** | Pointer to **map[string]interface{}** | A list of related resources identified by their relative URIs | +**Uri** | Pointer to **string** | The URI of this resource, relative to `https://api.twilio.com` | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ApiV2010AccountConferenceConferenceRecording.md b/twilio/rest/api/v2010/docs/ApiV2010AccountConferenceConferenceRecording.md index 716dedf5f..6fcebea7d 100644 --- a/twilio/rest/api/v2010/docs/ApiV2010AccountConferenceConferenceRecording.md +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountConferenceConferenceRecording.md @@ -1,25 +1,25 @@ # ApiV2010AccountConferenceConferenceRecording ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**ApiVersion** | Pointer to **string** | -**CallSid** | Pointer to **string** | -**Channels** | Pointer to **int32** | -**ConferenceSid** | Pointer to **string** | -**DateCreated** | Pointer to **string** | -**DateUpdated** | Pointer to **string** | -**Duration** | Pointer to **string** | -**EncryptionDetails** | Pointer to **map[string]interface{}** | -**ErrorCode** | Pointer to **int32** | -**Price** | Pointer to **float32** | -**PriceUnit** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Source** | Pointer to [**ConferenceRecordingSource**](conference_recording_source.md) | -**StartTime** | Pointer to **string** | -**Status** | Pointer to [**ConferenceRecordingStatus**](conference_recording_status.md) | -**Uri** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**ApiVersion** | Pointer to **string** | The API version used to create the recording | +**CallSid** | Pointer to **string** | The SID of the Call the resource is associated with | +**Channels** | Pointer to **int32** | The number of channels in the final recording file as an integer | +**ConferenceSid** | Pointer to **string** | The Conference SID that identifies the conference associated with the recording | +**DateCreated** | Pointer to **string** | The RFC 2822 date and time in GMT that the resource was created | +**DateUpdated** | Pointer to **string** | The RFC 2822 date and time in GMT that the resource was last updated | +**Duration** | Pointer to **string** | The length of the recording in seconds | +**EncryptionDetails** | Pointer to **map[string]interface{}** | How to decrypt the recording. | +**ErrorCode** | Pointer to **int32** | More information about why the recording is missing, if status is `absent`. | +**Price** | Pointer to **float32** | The one-time cost of creating the recording. | +**PriceUnit** | Pointer to **string** | The currency used in the price property. | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Source** | Pointer to **string** | How the recording was created | +**StartTime** | Pointer to **string** | The start time of the recording, given in RFC 2822 format | +**Status** | Pointer to **string** | The status of the recording | +**Uri** | Pointer to **string** | The URI of the resource, relative to `https://api.twilio.com` | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ApiV2010AccountConferenceParticipant.md b/twilio/rest/api/v2010/docs/ApiV2010AccountConferenceParticipant.md index fb9dce855..45a74ab85 100644 --- a/twilio/rest/api/v2010/docs/ApiV2010AccountConferenceParticipant.md +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountConferenceParticipant.md @@ -1,22 +1,22 @@ # ApiV2010AccountConferenceParticipant ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**CallSid** | Pointer to **string** | -**CallSidToCoach** | Pointer to **string** | -**Coaching** | Pointer to **bool** | -**ConferenceSid** | Pointer to **string** | -**DateCreated** | Pointer to **string** | -**DateUpdated** | Pointer to **string** | -**EndConferenceOnExit** | Pointer to **bool** | -**Hold** | Pointer to **bool** | -**Label** | Pointer to **string** | -**Muted** | Pointer to **bool** | -**StartConferenceOnEnter** | Pointer to **bool** | -**Status** | Pointer to [**ParticipantStatus**](participant_status.md) | -**Uri** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**CallSid** | Pointer to **string** | The SID of the Call the resource is associated with | +**CallSidToCoach** | Pointer to **string** | The SID of the participant who is being `coached` | +**Coaching** | Pointer to **bool** | Indicates if the participant changed to coach | +**ConferenceSid** | Pointer to **string** | The SID of the conference the participant is in | +**DateCreated** | Pointer to **string** | The RFC 2822 date and time in GMT that the resource was created | +**DateUpdated** | Pointer to **string** | The RFC 2822 date and time in GMT that the resource was last updated | +**EndConferenceOnExit** | Pointer to **bool** | Whether the conference ends when the participant leaves | +**Hold** | Pointer to **bool** | Whether the participant is on hold | +**Label** | Pointer to **string** | The label of this participant | +**Muted** | Pointer to **bool** | Whether the participant is muted | +**StartConferenceOnEnter** | Pointer to **bool** | Whether the conference starts when the participant joins the conference | +**Status** | Pointer to **string** | The status of the participant's call in a session | +**Uri** | Pointer to **string** | The URI of the resource, relative to `https://api.twilio.com` | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ApiV2010AccountConnectApp.md b/twilio/rest/api/v2010/docs/ApiV2010AccountConnectApp.md index 7c2b54ead..f8f54b313 100644 --- a/twilio/rest/api/v2010/docs/ApiV2010AccountConnectApp.md +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountConnectApp.md @@ -1,19 +1,19 @@ # ApiV2010AccountConnectApp ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**AuthorizeRedirectUrl** | Pointer to **string** | -**CompanyName** | Pointer to **string** | -**DeauthorizeCallbackMethod** | Pointer to [**HttpMethod**](http_method.md) | -**DeauthorizeCallbackUrl** | Pointer to **string** | -**Description** | Pointer to **string** | -**FriendlyName** | Pointer to **string** | -**HomepageUrl** | Pointer to **string** | -**Permissions** | Pointer to **[]string** | -**Sid** | Pointer to **string** | -**Uri** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**AuthorizeRedirectUrl** | Pointer to **string** | The URL to redirect the user to after authorization | +**CompanyName** | Pointer to **string** | The company name set for the Connect App | +**DeauthorizeCallbackMethod** | Pointer to **string** | The HTTP method we use to call deauthorize_callback_url | +**DeauthorizeCallbackUrl** | Pointer to **string** | The URL we call to de-authorize the Connect App | +**Description** | Pointer to **string** | The description of the Connect App | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the resource | +**HomepageUrl** | Pointer to **string** | The URL users can obtain more information | +**Permissions** | Pointer to **[]string** | The set of permissions that your ConnectApp requests | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Uri** | Pointer to **string** | The URI of the resource, relative to `https://api.twilio.com` | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ApiV2010AccountIncomingPhoneNumber.md b/twilio/rest/api/v2010/docs/ApiV2010AccountIncomingPhoneNumber.md index 8b5b7d67c..3f44b3fd7 100644 --- a/twilio/rest/api/v2010/docs/ApiV2010AccountIncomingPhoneNumber.md +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountIncomingPhoneNumber.md @@ -1,41 +1,41 @@ # ApiV2010AccountIncomingPhoneNumber ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**AddressRequirements** | Pointer to [**IncomingPhoneNumberAddressRequirement**](incoming_phone_number_address_requirement.md) | -**AddressSid** | Pointer to **string** | -**ApiVersion** | Pointer to **string** | -**Beta** | Pointer to **bool** | -**BundleSid** | Pointer to **string** | -**Capabilities** | Pointer to [**PhoneNumberCapabilities**](phone_number_capabilities.md) | -**DateCreated** | Pointer to **string** | -**DateUpdated** | Pointer to **string** | -**EmergencyAddressSid** | Pointer to **string** | -**EmergencyStatus** | Pointer to [**IncomingPhoneNumberEmergencyStatus**](incoming_phone_number_emergency_status.md) | -**FriendlyName** | Pointer to **string** | -**IdentitySid** | Pointer to **string** | -**Origin** | Pointer to **string** | -**PhoneNumber** | Pointer to **string** | -**Sid** | Pointer to **string** | -**SmsApplicationSid** | Pointer to **string** | -**SmsFallbackMethod** | Pointer to [**HttpMethod**](http_method.md) | -**SmsFallbackUrl** | Pointer to **string** | -**SmsMethod** | Pointer to [**HttpMethod**](http_method.md) | -**SmsUrl** | Pointer to **string** | -**Status** | Pointer to **string** | -**StatusCallback** | Pointer to **string** | -**StatusCallbackMethod** | Pointer to [**HttpMethod**](http_method.md) | -**TrunkSid** | Pointer to **string** | -**Uri** | Pointer to **string** | -**VoiceApplicationSid** | Pointer to **string** | -**VoiceCallerIdLookup** | Pointer to **bool** | -**VoiceFallbackMethod** | Pointer to [**HttpMethod**](http_method.md) | -**VoiceFallbackUrl** | Pointer to **string** | -**VoiceMethod** | Pointer to [**HttpMethod**](http_method.md) | -**VoiceReceiveMode** | Pointer to [**IncomingPhoneNumberVoiceReceiveMode**](incoming_phone_number_voice_receive_mode.md) | -**VoiceUrl** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**AddressRequirements** | Pointer to **string** | Whether the phone number requires an Address registered with Twilio. | +**AddressSid** | Pointer to **string** | The SID of the Address resource associated with the phone number | +**ApiVersion** | Pointer to **string** | The API version used to start a new TwiML session | +**Beta** | Pointer to **bool** | Whether the phone number is new to the Twilio platform | +**BundleSid** | Pointer to **string** | The SID of the Bundle resource associated with number | +**Capabilities** | Pointer to [**ApiV2010AccountIncomingPhoneNumberCapabilities**](api_v2010_account_incoming_phone_number_capabilities.md) | | +**DateCreated** | Pointer to **string** | The RFC 2822 date and time in GMT that the resource was created | +**DateUpdated** | Pointer to **string** | The RFC 2822 date and time in GMT that the resource was last updated | +**EmergencyAddressSid** | Pointer to **string** | The emergency address configuration to use for emergency calling | +**EmergencyStatus** | Pointer to **string** | Whether the phone number is enabled for emergency calling | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the resource | +**IdentitySid** | Pointer to **string** | The SID of the Identity resource associated with number | +**Origin** | Pointer to **string** | The phone number's origin. Can be twilio or hosted. | +**PhoneNumber** | Pointer to **string** | The phone number in E.164 format | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**SmsApplicationSid** | Pointer to **string** | The SID of the application that handles SMS messages sent to the phone number | +**SmsFallbackMethod** | Pointer to **string** | The HTTP method used with sms_fallback_url | +**SmsFallbackUrl** | Pointer to **string** | The URL that we call when an error occurs while retrieving or executing the TwiML | +**SmsMethod** | Pointer to **string** | The HTTP method to use with sms_url | +**SmsUrl** | Pointer to **string** | The URL we call when the phone number receives an incoming SMS message | +**Status** | Pointer to **string** | | +**StatusCallback** | Pointer to **string** | The URL to send status information to your application | +**StatusCallbackMethod** | Pointer to **string** | The HTTP method we use to call status_callback | +**TrunkSid** | Pointer to **string** | The SID of the Trunk that handles calls to the phone number | +**Uri** | Pointer to **string** | The URI of the resource, relative to `https://api.twilio.com` | +**VoiceApplicationSid** | Pointer to **string** | The SID of the application that handles calls to the phone number | +**VoiceCallerIdLookup** | Pointer to **bool** | Whether to lookup the caller's name | +**VoiceFallbackMethod** | Pointer to **string** | The HTTP method used with voice_fallback_url | +**VoiceFallbackUrl** | Pointer to **string** | The URL we call when an error occurs in TwiML | +**VoiceMethod** | Pointer to **string** | The HTTP method used with the voice_url | +**VoiceReceiveMode** | Pointer to **string** | | +**VoiceUrl** | Pointer to **string** | The URL we call when the phone number receives a call | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ApiV2010AccountIncomingPhoneNumberCapabilities.md b/twilio/rest/api/v2010/docs/ApiV2010AccountIncomingPhoneNumberCapabilities.md new file mode 100644 index 000000000..c4f21c62f --- /dev/null +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountIncomingPhoneNumberCapabilities.md @@ -0,0 +1,13 @@ +# ApiV2010AccountIncomingPhoneNumberCapabilities + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Fax** | **bool** | |[optional] +**Mms** | **bool** | |[optional] +**Sms** | **bool** | |[optional] +**Voice** | **bool** | |[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/twilio/rest/api/v2010/docs/ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOn.md b/twilio/rest/api/v2010/docs/ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOn.md index dd1e6bcc3..5abee054e 100644 --- a/twilio/rest/api/v2010/docs/ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOn.md +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOn.md @@ -1,19 +1,19 @@ # ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOn ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Configuration** | Pointer to **map[string]interface{}** | -**DateCreated** | Pointer to **string** | -**DateUpdated** | Pointer to **string** | -**Description** | Pointer to **string** | -**FriendlyName** | Pointer to **string** | -**ResourceSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**SubresourceUris** | Pointer to **map[string]interface{}** | -**UniqueName** | Pointer to **string** | -**Uri** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**Configuration** | Pointer to **map[string]interface{}** | A JSON string that represents the current configuration | +**DateCreated** | Pointer to **string** | The RFC 2822 date and time in GMT that the resource was created | +**DateUpdated** | Pointer to **string** | The RFC 2822 date and time in GMT that the resource was last updated | +**Description** | Pointer to **string** | A short description of the Add-on functionality | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the resource | +**ResourceSid** | Pointer to **string** | The SID of the Phone Number that installed this Add-on | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**SubresourceUris** | Pointer to **map[string]interface{}** | A list of related resources identified by their relative URIs | +**UniqueName** | Pointer to **string** | An application-defined string that uniquely identifies the resource | +**Uri** | Pointer to **string** | The URI of the resource, relative to `https://api.twilio.com` | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOnIncomingPhoneNumberAssignedAddOnExtension.md b/twilio/rest/api/v2010/docs/ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOnIncomingPhoneNumberAssignedAddOnExtension.md index 7aa0d2f09..8265e8c79 100644 --- a/twilio/rest/api/v2010/docs/ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOnIncomingPhoneNumberAssignedAddOnExtension.md +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOnIncomingPhoneNumberAssignedAddOnExtension.md @@ -1,17 +1,17 @@ # ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOnIncomingPhoneNumberAssignedAddOnExtension ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**AssignedAddOnSid** | Pointer to **string** | -**Enabled** | Pointer to **bool** | -**FriendlyName** | Pointer to **string** | -**ProductName** | Pointer to **string** | -**ResourceSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**UniqueName** | Pointer to **string** | -**Uri** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**AssignedAddOnSid** | Pointer to **string** | The SID that uniquely identifies the assigned Add-on installation | +**Enabled** | Pointer to **bool** | Whether the Extension will be invoked | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the resource | +**ProductName** | Pointer to **string** | A string that you assigned to describe the Product this Extension is used within | +**ResourceSid** | Pointer to **string** | The SID of the Phone Number to which the Add-on is assigned | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**UniqueName** | Pointer to **string** | An application-defined string that uniquely identifies the resource | +**Uri** | Pointer to **string** | The URI of the resource, relative to `https://api.twilio.com` | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberLocal.md b/twilio/rest/api/v2010/docs/ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberLocal.md index cefc92c75..fbdce87e8 100644 --- a/twilio/rest/api/v2010/docs/ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberLocal.md +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberLocal.md @@ -1,41 +1,41 @@ # ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberLocal ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**AddressRequirements** | Pointer to [**IncomingPhoneNumberLocalAddressRequirement**](incoming_phone_number_local_address_requirement.md) | -**AddressSid** | Pointer to **string** | -**ApiVersion** | Pointer to **string** | -**Beta** | Pointer to **bool** | -**BundleSid** | Pointer to **string** | -**Capabilities** | Pointer to [**PhoneNumberCapabilities**](phone_number_capabilities.md) | -**DateCreated** | Pointer to **string** | -**DateUpdated** | Pointer to **string** | -**EmergencyAddressSid** | Pointer to **string** | -**EmergencyStatus** | Pointer to [**IncomingPhoneNumberLocalEmergencyStatus**](incoming_phone_number_local_emergency_status.md) | -**FriendlyName** | Pointer to **string** | -**IdentitySid** | Pointer to **string** | -**Origin** | Pointer to **string** | -**PhoneNumber** | Pointer to **string** | -**Sid** | Pointer to **string** | -**SmsApplicationSid** | Pointer to **string** | -**SmsFallbackMethod** | Pointer to [**HttpMethod**](http_method.md) | -**SmsFallbackUrl** | Pointer to **string** | -**SmsMethod** | Pointer to [**HttpMethod**](http_method.md) | -**SmsUrl** | Pointer to **string** | -**Status** | Pointer to **string** | -**StatusCallback** | Pointer to **string** | -**StatusCallbackMethod** | Pointer to [**HttpMethod**](http_method.md) | -**TrunkSid** | Pointer to **string** | -**Uri** | Pointer to **string** | -**VoiceApplicationSid** | Pointer to **string** | -**VoiceCallerIdLookup** | Pointer to **bool** | -**VoiceFallbackMethod** | Pointer to [**HttpMethod**](http_method.md) | -**VoiceFallbackUrl** | Pointer to **string** | -**VoiceMethod** | Pointer to [**HttpMethod**](http_method.md) | -**VoiceReceiveMode** | Pointer to [**IncomingPhoneNumberLocalVoiceReceiveMode**](incoming_phone_number_local_voice_receive_mode.md) | -**VoiceUrl** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**AddressRequirements** | Pointer to **string** | Whether the phone number requires an Address registered with Twilio. | +**AddressSid** | Pointer to **string** | The SID of the Address resource associated with the phone number | +**ApiVersion** | Pointer to **string** | The API version used to start a new TwiML session | +**Beta** | Pointer to **bool** | Whether the phone number is new to the Twilio platform | +**BundleSid** | Pointer to **string** | The SID of the Bundle resource associated with number | +**Capabilities** | Pointer to [**ApiV2010AccountIncomingPhoneNumberCapabilities**](api_v2010_account_incoming_phone_number_capabilities.md) | | +**DateCreated** | Pointer to **string** | The RFC 2822 date and time in GMT that the resource was created | +**DateUpdated** | Pointer to **string** | The RFC 2822 date and time in GMT that the resource was last updated | +**EmergencyAddressSid** | Pointer to **string** | The emergency address configuration to use for emergency calling | +**EmergencyStatus** | Pointer to **string** | Whether the phone number is enabled for emergency calling | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the resource | +**IdentitySid** | Pointer to **string** | The SID of the Identity resource associated with number | +**Origin** | Pointer to **string** | The phone number's origin. Can be twilio or hosted. | +**PhoneNumber** | Pointer to **string** | The phone number in E.164 format | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**SmsApplicationSid** | Pointer to **string** | The SID of the Application resource to handle SMS messages | +**SmsFallbackMethod** | Pointer to **string** | The HTTP method used with sms_fallback_url | +**SmsFallbackUrl** | Pointer to **string** | The URL that we call when an error occurs while retrieving or executing the TwiML | +**SmsMethod** | Pointer to **string** | The HTTP method to use with sms_url | +**SmsUrl** | Pointer to **string** | The URL we call when the phone number receives an incoming SMS message | +**Status** | Pointer to **string** | | +**StatusCallback** | Pointer to **string** | The URL to send status information to your application | +**StatusCallbackMethod** | Pointer to **string** | The HTTP method we use to call status_callback | +**TrunkSid** | Pointer to **string** | The SID of the Trunk that handles calls to the phone number | +**Uri** | Pointer to **string** | The URI of the resource, relative to `https://api.twilio.com` | +**VoiceApplicationSid** | Pointer to **string** | The SID of the application that handles calls to the phone number | +**VoiceCallerIdLookup** | Pointer to **bool** | Whether to lookup the caller's name | +**VoiceFallbackMethod** | Pointer to **string** | The HTTP method used with voice_fallback_url | +**VoiceFallbackUrl** | Pointer to **string** | The URL we call when an error occurs in TwiML | +**VoiceMethod** | Pointer to **string** | The HTTP method used with the voice_url | +**VoiceReceiveMode** | Pointer to **string** | | +**VoiceUrl** | Pointer to **string** | The URL we call when this phone number receives a call | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberMobile.md b/twilio/rest/api/v2010/docs/ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberMobile.md index 4b4278449..da69d2129 100644 --- a/twilio/rest/api/v2010/docs/ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberMobile.md +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberMobile.md @@ -1,41 +1,41 @@ # ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberMobile ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**AddressRequirements** | Pointer to [**IncomingPhoneNumberMobileAddressRequirement**](incoming_phone_number_mobile_address_requirement.md) | -**AddressSid** | Pointer to **string** | -**ApiVersion** | Pointer to **string** | -**Beta** | Pointer to **bool** | -**BundleSid** | Pointer to **string** | -**Capabilities** | Pointer to [**PhoneNumberCapabilities**](phone_number_capabilities.md) | -**DateCreated** | Pointer to **string** | -**DateUpdated** | Pointer to **string** | -**EmergencyAddressSid** | Pointer to **string** | -**EmergencyStatus** | Pointer to [**IncomingPhoneNumberMobileEmergencyStatus**](incoming_phone_number_mobile_emergency_status.md) | -**FriendlyName** | Pointer to **string** | -**IdentitySid** | Pointer to **string** | -**Origin** | Pointer to **string** | -**PhoneNumber** | Pointer to **string** | -**Sid** | Pointer to **string** | -**SmsApplicationSid** | Pointer to **string** | -**SmsFallbackMethod** | Pointer to [**HttpMethod**](http_method.md) | -**SmsFallbackUrl** | Pointer to **string** | -**SmsMethod** | Pointer to [**HttpMethod**](http_method.md) | -**SmsUrl** | Pointer to **string** | -**Status** | Pointer to **string** | -**StatusCallback** | Pointer to **string** | -**StatusCallbackMethod** | Pointer to [**HttpMethod**](http_method.md) | -**TrunkSid** | Pointer to **string** | -**Uri** | Pointer to **string** | -**VoiceApplicationSid** | Pointer to **string** | -**VoiceCallerIdLookup** | Pointer to **bool** | -**VoiceFallbackMethod** | Pointer to [**HttpMethod**](http_method.md) | -**VoiceFallbackUrl** | Pointer to **string** | -**VoiceMethod** | Pointer to [**HttpMethod**](http_method.md) | -**VoiceReceiveMode** | Pointer to [**IncomingPhoneNumberMobileVoiceReceiveMode**](incoming_phone_number_mobile_voice_receive_mode.md) | -**VoiceUrl** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**AddressRequirements** | Pointer to **string** | Whether the phone number requires an Address registered with Twilio. | +**AddressSid** | Pointer to **string** | The SID of the Address resource associated with the phone number | +**ApiVersion** | Pointer to **string** | The API version used to start a new TwiML session | +**Beta** | Pointer to **bool** | Whether the phone number is new to the Twilio platform | +**BundleSid** | Pointer to **string** | The SID of the Bundle resource associated with number | +**Capabilities** | Pointer to [**ApiV2010AccountIncomingPhoneNumberCapabilities**](api_v2010_account_incoming_phone_number_capabilities.md) | | +**DateCreated** | Pointer to **string** | The RFC 2822 date and time in GMT that the resource was created | +**DateUpdated** | Pointer to **string** | The RFC 2822 date and time in GMT that the resource was last updated | +**EmergencyAddressSid** | Pointer to **string** | The emergency address configuration to use for emergency calling | +**EmergencyStatus** | Pointer to **string** | Whether the phone number is enabled for emergency calling | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the resource | +**IdentitySid** | Pointer to **string** | The SID of the Identity resource associated with number | +**Origin** | Pointer to **string** | The phone number's origin. Can be twilio or hosted. | +**PhoneNumber** | Pointer to **string** | The phone number in E.164 format | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**SmsApplicationSid** | Pointer to **string** | The SID of the application that handles SMS messages sent to the phone number | +**SmsFallbackMethod** | Pointer to **string** | The HTTP method used with sms_fallback_url | +**SmsFallbackUrl** | Pointer to **string** | The URL that we call when an error occurs while retrieving or executing the TwiML | +**SmsMethod** | Pointer to **string** | The HTTP method to use with sms_url | +**SmsUrl** | Pointer to **string** | The URL we call when the phone number receives an incoming SMS message | +**Status** | Pointer to **string** | | +**StatusCallback** | Pointer to **string** | The URL to send status information to your application | +**StatusCallbackMethod** | Pointer to **string** | The HTTP method we use to call status_callback | +**TrunkSid** | Pointer to **string** | The SID of the Trunk that handles calls to the phone number | +**Uri** | Pointer to **string** | The URI of the resource, relative to `https://api.twilio.com` | +**VoiceApplicationSid** | Pointer to **string** | The SID of the application that handles calls to the phone number | +**VoiceCallerIdLookup** | Pointer to **bool** | Whether to lookup the caller's name | +**VoiceFallbackMethod** | Pointer to **string** | The HTTP method used with voice_fallback_url | +**VoiceFallbackUrl** | Pointer to **string** | The URL we call when an error occurs in TwiML | +**VoiceMethod** | Pointer to **string** | The HTTP method used with the voice_url | +**VoiceReceiveMode** | Pointer to **string** | | +**VoiceUrl** | Pointer to **string** | The URL we call when the phone number receives a call | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberTollFree.md b/twilio/rest/api/v2010/docs/ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberTollFree.md index a171aef38..1d0fba897 100644 --- a/twilio/rest/api/v2010/docs/ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberTollFree.md +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberTollFree.md @@ -1,41 +1,41 @@ # ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberTollFree ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**AddressRequirements** | Pointer to [**IncomingPhoneNumberTollFreeAddressRequirement**](incoming_phone_number_toll_free_address_requirement.md) | -**AddressSid** | Pointer to **string** | -**ApiVersion** | Pointer to **string** | -**Beta** | Pointer to **bool** | -**BundleSid** | Pointer to **string** | -**Capabilities** | Pointer to [**PhoneNumberCapabilities**](phone_number_capabilities.md) | -**DateCreated** | Pointer to **string** | -**DateUpdated** | Pointer to **string** | -**EmergencyAddressSid** | Pointer to **string** | -**EmergencyStatus** | Pointer to [**IncomingPhoneNumberTollFreeEmergencyStatus**](incoming_phone_number_toll_free_emergency_status.md) | -**FriendlyName** | Pointer to **string** | -**IdentitySid** | Pointer to **string** | -**Origin** | Pointer to **string** | -**PhoneNumber** | Pointer to **string** | -**Sid** | Pointer to **string** | -**SmsApplicationSid** | Pointer to **string** | -**SmsFallbackMethod** | Pointer to [**HttpMethod**](http_method.md) | -**SmsFallbackUrl** | Pointer to **string** | -**SmsMethod** | Pointer to [**HttpMethod**](http_method.md) | -**SmsUrl** | Pointer to **string** | -**Status** | Pointer to **string** | -**StatusCallback** | Pointer to **string** | -**StatusCallbackMethod** | Pointer to [**HttpMethod**](http_method.md) | -**TrunkSid** | Pointer to **string** | -**Uri** | Pointer to **string** | -**VoiceApplicationSid** | Pointer to **string** | -**VoiceCallerIdLookup** | Pointer to **bool** | -**VoiceFallbackMethod** | Pointer to [**HttpMethod**](http_method.md) | -**VoiceFallbackUrl** | Pointer to **string** | -**VoiceMethod** | Pointer to [**HttpMethod**](http_method.md) | -**VoiceReceiveMode** | Pointer to [**IncomingPhoneNumberTollFreeVoiceReceiveMode**](incoming_phone_number_toll_free_voice_receive_mode.md) | -**VoiceUrl** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**AddressRequirements** | Pointer to **string** | Whether the phone number requires an Address registered with Twilio. | +**AddressSid** | Pointer to **string** | The SID of the Address resource associated with the phone number | +**ApiVersion** | Pointer to **string** | The API version used to start a new TwiML session | +**Beta** | Pointer to **bool** | Whether the phone number is new to the Twilio platform | +**BundleSid** | Pointer to **string** | The SID of the Bundle resource associated with number | +**Capabilities** | Pointer to [**ApiV2010AccountIncomingPhoneNumberCapabilities**](api_v2010_account_incoming_phone_number_capabilities.md) | | +**DateCreated** | Pointer to **string** | The RFC 2822 date and time in GMT that the resource was created | +**DateUpdated** | Pointer to **string** | The RFC 2822 date and time in GMT that the resource was last updated | +**EmergencyAddressSid** | Pointer to **string** | The emergency address configuration to use for emergency calling | +**EmergencyStatus** | Pointer to **string** | Whether the phone number is enabled for emergency calling | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the resource | +**IdentitySid** | Pointer to **string** | The SID of the Identity resource associated with number | +**Origin** | Pointer to **string** | The phone number's origin. Can be twilio or hosted. | +**PhoneNumber** | Pointer to **string** | The phone number in E.164 format | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**SmsApplicationSid** | Pointer to **string** | The SID of the application that handles SMS messages sent to the phone number | +**SmsFallbackMethod** | Pointer to **string** | The HTTP method used with sms_fallback_url | +**SmsFallbackUrl** | Pointer to **string** | The URL that we call when an error occurs while retrieving or executing the TwiML | +**SmsMethod** | Pointer to **string** | The HTTP method to use with sms_url | +**SmsUrl** | Pointer to **string** | The URL we call when the phone number receives an incoming SMS message | +**Status** | Pointer to **string** | | +**StatusCallback** | Pointer to **string** | The URL to send status information to your application | +**StatusCallbackMethod** | Pointer to **string** | The HTTP method we use to call status_callback | +**TrunkSid** | Pointer to **string** | The SID of the Trunk that handles calls to the phone number | +**Uri** | Pointer to **string** | The URI of the resource, relative to `https://api.twilio.com` | +**VoiceApplicationSid** | Pointer to **string** | The SID of the application that handles calls to the phone number | +**VoiceCallerIdLookup** | Pointer to **bool** | Whether to lookup the caller's name | +**VoiceFallbackMethod** | Pointer to **string** | The HTTP method used with voice_fallback_url | +**VoiceFallbackUrl** | Pointer to **string** | The URL we call when an error occurs in TwiML | +**VoiceMethod** | Pointer to **string** | The HTTP method used with the voice_url | +**VoiceReceiveMode** | Pointer to **string** | | +**VoiceUrl** | Pointer to **string** | The URL we call when the phone number receives a call | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ApiV2010AccountKey.md b/twilio/rest/api/v2010/docs/ApiV2010AccountKey.md index 378b07585..8f811e270 100644 --- a/twilio/rest/api/v2010/docs/ApiV2010AccountKey.md +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountKey.md @@ -1,12 +1,12 @@ # ApiV2010AccountKey ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**DateCreated** | Pointer to **string** | -**DateUpdated** | Pointer to **string** | -**FriendlyName** | Pointer to **string** | -**Sid** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DateCreated** | Pointer to **string** | The RFC 2822 date and time in GMT that the resource was created | +**DateUpdated** | Pointer to **string** | The RFC 2822 date and time in GMT that the resource was last updated | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the resource | +**Sid** | Pointer to **string** | The unique string that identifies the resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ApiV2010AccountMessage.md b/twilio/rest/api/v2010/docs/ApiV2010AccountMessage.md index 4aa43f853..c4188bab9 100644 --- a/twilio/rest/api/v2010/docs/ApiV2010AccountMessage.md +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountMessage.md @@ -1,28 +1,28 @@ # ApiV2010AccountMessage ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**ApiVersion** | Pointer to **string** | -**Body** | Pointer to **string** | -**DateCreated** | Pointer to **string** | -**DateSent** | Pointer to **string** | -**DateUpdated** | Pointer to **string** | -**Direction** | Pointer to [**MessageDirection**](message_direction.md) | -**ErrorCode** | Pointer to **int32** | -**ErrorMessage** | Pointer to **string** | -**From** | Pointer to **string** | -**MessagingServiceSid** | Pointer to **string** | -**NumMedia** | Pointer to **string** | -**NumSegments** | Pointer to **string** | -**Price** | Pointer to **string** | -**PriceUnit** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Status** | Pointer to [**MessageStatus**](message_status.md) | -**SubresourceUris** | Pointer to **map[string]interface{}** | -**To** | Pointer to **string** | -**Uri** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**ApiVersion** | Pointer to **string** | The API version used to process the message | +**Body** | Pointer to **string** | The message text | +**DateCreated** | Pointer to **string** | The RFC 2822 date and time in GMT that the resource was created | +**DateSent** | Pointer to **string** | The RFC 2822 date and time in GMT when the message was sent | +**DateUpdated** | Pointer to **string** | The RFC 2822 date and time in GMT that the resource was last updated | +**Direction** | Pointer to **string** | The direction of the message | +**ErrorCode** | Pointer to **int32** | The error code associated with the message | +**ErrorMessage** | Pointer to **string** | The description of the error_code | +**From** | Pointer to **string** | The phone number that initiated the message | +**MessagingServiceSid** | Pointer to **string** | The SID of the Messaging Service used with the message. | +**NumMedia** | Pointer to **string** | The number of media files associated with the message | +**NumSegments** | Pointer to **string** | The number of messages used to deliver the message body | +**Price** | Pointer to **string** | The amount billed for the message | +**PriceUnit** | Pointer to **string** | The currency in which price is measured | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Status** | Pointer to **string** | The status of the message | +**SubresourceUris** | Pointer to **map[string]interface{}** | A list of related resources identified by their relative URIs | +**To** | Pointer to **string** | The phone number that received the message | +**Uri** | Pointer to **string** | The URI of the resource, relative to `https://api.twilio.com` | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ApiV2010AccountMessageMedia.md b/twilio/rest/api/v2010/docs/ApiV2010AccountMessageMedia.md index fd0fe3c93..a09ab352d 100644 --- a/twilio/rest/api/v2010/docs/ApiV2010AccountMessageMedia.md +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountMessageMedia.md @@ -1,15 +1,15 @@ # ApiV2010AccountMessageMedia ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**ContentType** | Pointer to **string** | -**DateCreated** | Pointer to **string** | -**DateUpdated** | Pointer to **string** | -**ParentSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Uri** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created this resource | +**ContentType** | Pointer to **string** | The default mime-type of the media | +**DateCreated** | Pointer to **string** | The RFC 2822 date and time in GMT that this resource was created | +**DateUpdated** | Pointer to **string** | The RFC 2822 date and time in GMT that this resource was last updated | +**ParentSid** | Pointer to **string** | The SID of the resource that created the media | +**Sid** | Pointer to **string** | The unique string that identifies this resource | +**Uri** | Pointer to **string** | The URI of this resource, relative to `https://api.twilio.com` | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ApiV2010AccountMessageMessageFeedback.md b/twilio/rest/api/v2010/docs/ApiV2010AccountMessageMessageFeedback.md index ad9349c39..36f973ba1 100644 --- a/twilio/rest/api/v2010/docs/ApiV2010AccountMessageMessageFeedback.md +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountMessageMessageFeedback.md @@ -1,14 +1,14 @@ # ApiV2010AccountMessageMessageFeedback ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**DateCreated** | Pointer to **string** | -**DateUpdated** | Pointer to **string** | -**MessageSid** | Pointer to **string** | -**Outcome** | Pointer to [**MessageFeedbackOutcome**](message_feedback_outcome.md) | -**Uri** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**DateCreated** | Pointer to **string** | The RFC 2822 date and time in GMT that the resource was created | +**DateUpdated** | Pointer to **string** | The RFC 2822 date and time in GMT that the resource was last updated | +**MessageSid** | Pointer to **string** | The SID of the Message resource for which the feedback was provided | +**Outcome** | Pointer to **string** | Whether the feedback has arrived | +**Uri** | Pointer to **string** | The URI of the resource, relative to `https://api.twilio.com` | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ApiV2010AccountNewKey.md b/twilio/rest/api/v2010/docs/ApiV2010AccountNewKey.md index 42daaea70..7e17eb41e 100644 --- a/twilio/rest/api/v2010/docs/ApiV2010AccountNewKey.md +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountNewKey.md @@ -1,13 +1,13 @@ # ApiV2010AccountNewKey ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**DateCreated** | Pointer to **string** | -**DateUpdated** | Pointer to **string** | -**FriendlyName** | Pointer to **string** | -**Secret** | Pointer to **string** | -**Sid** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DateCreated** | Pointer to **string** | The RFC 2822 date and time in GMT that the resource was created | +**DateUpdated** | Pointer to **string** | The RFC 2822 date and time in GMT that the resource was last updated | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the resource | +**Secret** | Pointer to **string** | The secret your application uses to sign Access Tokens and to authenticate to the REST API. | +**Sid** | Pointer to **string** | The unique string that identifies the resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ApiV2010AccountNewSigningKey.md b/twilio/rest/api/v2010/docs/ApiV2010AccountNewSigningKey.md index 95ee26828..0eeaf28ed 100644 --- a/twilio/rest/api/v2010/docs/ApiV2010AccountNewSigningKey.md +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountNewSigningKey.md @@ -1,13 +1,13 @@ # ApiV2010AccountNewSigningKey ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**DateCreated** | Pointer to **string** | -**DateUpdated** | Pointer to **string** | -**FriendlyName** | Pointer to **string** | -**Secret** | Pointer to **string** | -**Sid** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DateCreated** | Pointer to **string** | The RFC 2822 date and time in GMT that the resource was created | +**DateUpdated** | Pointer to **string** | The RFC 2822 date and time in GMT that the resource was last updated | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the resource | +**Secret** | Pointer to **string** | The secret your application uses to sign Access Tokens and to authenticate to the REST API. | +**Sid** | Pointer to **string** | The unique string that identifies the resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ApiV2010AccountNotification.md b/twilio/rest/api/v2010/docs/ApiV2010AccountNotification.md index f4ff24805..589aa8ab6 100644 --- a/twilio/rest/api/v2010/docs/ApiV2010AccountNotification.md +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountNotification.md @@ -1,22 +1,22 @@ # ApiV2010AccountNotification ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**ApiVersion** | Pointer to **string** | -**CallSid** | Pointer to **string** | -**DateCreated** | Pointer to **string** | -**DateUpdated** | Pointer to **string** | -**ErrorCode** | Pointer to **string** | -**Log** | Pointer to **string** | -**MessageDate** | Pointer to **string** | -**MessageText** | Pointer to **string** | -**MoreInfo** | Pointer to **string** | -**RequestMethod** | Pointer to [**HttpMethod**](http_method.md) | -**RequestUrl** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Uri** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**ApiVersion** | Pointer to **string** | The API version used to generate the notification | +**CallSid** | Pointer to **string** | The SID of the Call the resource is associated with | +**DateCreated** | Pointer to **string** | The RFC 2822 date and time in GMT that the resource was created | +**DateUpdated** | Pointer to **string** | The RFC 2822 date and time in GMT that the resource was last updated | +**ErrorCode** | Pointer to **string** | A unique error code corresponding to the notification | +**Log** | Pointer to **string** | An integer log level | +**MessageDate** | Pointer to **string** | The date the notification was generated | +**MessageText** | Pointer to **string** | The text of the notification | +**MoreInfo** | Pointer to **string** | A URL for more information about the error code | +**RequestMethod** | Pointer to **string** | HTTP method used with the request url | +**RequestUrl** | Pointer to **string** | URL of the resource that generated the notification | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Uri** | Pointer to **string** | The URI of the resource, relative to `https://api.twilio.com` | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ApiV2010AccountNotificationInstance.md b/twilio/rest/api/v2010/docs/ApiV2010AccountNotificationInstance.md index 005ba7583..84cdfdb20 100644 --- a/twilio/rest/api/v2010/docs/ApiV2010AccountNotificationInstance.md +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountNotificationInstance.md @@ -1,25 +1,25 @@ # ApiV2010AccountNotificationInstance ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**ApiVersion** | Pointer to **string** | -**CallSid** | Pointer to **string** | -**DateCreated** | Pointer to **string** | -**DateUpdated** | Pointer to **string** | -**ErrorCode** | Pointer to **string** | -**Log** | Pointer to **string** | -**MessageDate** | Pointer to **string** | -**MessageText** | Pointer to **string** | -**MoreInfo** | Pointer to **string** | -**RequestMethod** | Pointer to [**HttpMethod**](http_method.md) | -**RequestUrl** | Pointer to **string** | -**RequestVariables** | Pointer to **string** | -**ResponseBody** | Pointer to **string** | -**ResponseHeaders** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Uri** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**ApiVersion** | Pointer to **string** | The API version used to generate the notification | +**CallSid** | Pointer to **string** | The SID of the Call the resource is associated with | +**DateCreated** | Pointer to **string** | The RFC 2822 date and time in GMT that the resource was created | +**DateUpdated** | Pointer to **string** | The RFC 2822 date and time in GMT that the resource was last updated | +**ErrorCode** | Pointer to **string** | A unique error code corresponding to the notification | +**Log** | Pointer to **string** | An integer log level | +**MessageDate** | Pointer to **string** | The date the notification was generated | +**MessageText** | Pointer to **string** | The text of the notification | +**MoreInfo** | Pointer to **string** | A URL for more information about the error code | +**RequestMethod** | Pointer to **string** | HTTP method used with the request url | +**RequestUrl** | Pointer to **string** | URL of the resource that generated the notification | +**RequestVariables** | Pointer to **string** | Twilio-generated HTTP variables sent to the server | +**ResponseBody** | Pointer to **string** | The HTTP body returned by your server | +**ResponseHeaders** | Pointer to **string** | The HTTP headers returned by your server | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Uri** | Pointer to **string** | The URI of the resource, relative to `https://api.twilio.com` | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ApiV2010AccountOutgoingCallerId.md b/twilio/rest/api/v2010/docs/ApiV2010AccountOutgoingCallerId.md index ed94a5979..5eed77627 100644 --- a/twilio/rest/api/v2010/docs/ApiV2010AccountOutgoingCallerId.md +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountOutgoingCallerId.md @@ -1,15 +1,15 @@ # ApiV2010AccountOutgoingCallerId ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**DateCreated** | Pointer to **string** | -**DateUpdated** | Pointer to **string** | -**FriendlyName** | Pointer to **string** | -**PhoneNumber** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Uri** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**DateCreated** | Pointer to **string** | The RFC 2822 date and time in GMT that the resource was created | +**DateUpdated** | Pointer to **string** | The RFC 2822 date and time in GMT that the resource was last updated | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the resource | +**PhoneNumber** | Pointer to **string** | The phone number in E.164 format | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Uri** | Pointer to **string** | The URI of the resource, relative to `https://api.twilio.com` | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ApiV2010AccountQueue.md b/twilio/rest/api/v2010/docs/ApiV2010AccountQueue.md index 0534f1b90..2318d4f60 100644 --- a/twilio/rest/api/v2010/docs/ApiV2010AccountQueue.md +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountQueue.md @@ -1,17 +1,17 @@ # ApiV2010AccountQueue ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**AverageWaitTime** | Pointer to **int32** | -**CurrentSize** | Pointer to **int32** | -**DateCreated** | Pointer to **string** | -**DateUpdated** | Pointer to **string** | -**FriendlyName** | Pointer to **string** | -**MaxSize** | Pointer to **int32** | -**Sid** | Pointer to **string** | -**Uri** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created this resource | +**AverageWaitTime** | Pointer to **int32** | Average wait time of members in the queue | +**CurrentSize** | Pointer to **int32** | The number of calls currently in the queue. | +**DateCreated** | Pointer to **string** | The RFC 2822 date and time in GMT that this resource was created | +**DateUpdated** | Pointer to **string** | The RFC 2822 date and time in GMT that this resource was last updated | +**FriendlyName** | Pointer to **string** | A string that you assigned to describe this resource | +**MaxSize** | Pointer to **int32** | The max number of calls allowed in the queue | +**Sid** | Pointer to **string** | The unique string that identifies this resource | +**Uri** | Pointer to **string** | The URI of this resource, relative to `https://api.twilio.com` | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ApiV2010AccountQueueMember.md b/twilio/rest/api/v2010/docs/ApiV2010AccountQueueMember.md index 9c20956ef..1146b730b 100644 --- a/twilio/rest/api/v2010/docs/ApiV2010AccountQueueMember.md +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountQueueMember.md @@ -1,14 +1,14 @@ # ApiV2010AccountQueueMember ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**CallSid** | Pointer to **string** | -**DateEnqueued** | Pointer to **string** | -**Position** | Pointer to **int32** | -**QueueSid** | Pointer to **string** | -**Uri** | Pointer to **string** | -**WaitTime** | Pointer to **int32** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CallSid** | Pointer to **string** | The SID of the Call the resource is associated with | +**DateEnqueued** | Pointer to **string** | The date the member was enqueued | +**Position** | Pointer to **int32** | This member's current position in the queue. | +**QueueSid** | Pointer to **string** | The SID of the Queue the member is in | +**Uri** | Pointer to **string** | The URI of the resource, relative to `https://api.twilio.com` | +**WaitTime** | Pointer to **int32** | The number of seconds the member has been in the queue. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ApiV2010AccountRecording.md b/twilio/rest/api/v2010/docs/ApiV2010AccountRecording.md index c08a84910..eca75efa3 100644 --- a/twilio/rest/api/v2010/docs/ApiV2010AccountRecording.md +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountRecording.md @@ -1,26 +1,26 @@ # ApiV2010AccountRecording ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**ApiVersion** | Pointer to **string** | -**CallSid** | Pointer to **string** | -**Channels** | Pointer to **int32** | -**ConferenceSid** | Pointer to **string** | -**DateCreated** | Pointer to **string** | -**DateUpdated** | Pointer to **string** | -**Duration** | Pointer to **string** | -**EncryptionDetails** | Pointer to **map[string]interface{}** | -**ErrorCode** | Pointer to **int32** | -**Price** | Pointer to **string** | -**PriceUnit** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Source** | Pointer to [**RecordingSource**](recording_source.md) | -**StartTime** | Pointer to **string** | -**Status** | Pointer to [**RecordingStatus**](recording_status.md) | -**SubresourceUris** | Pointer to **map[string]interface{}** | -**Uri** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**ApiVersion** | Pointer to **string** | The API version used during the recording. | +**CallSid** | Pointer to **string** | The SID of the Call the resource is associated with | +**Channels** | Pointer to **int32** | The number of channels in the final recording file as an integer. | +**ConferenceSid** | Pointer to **string** | The unique ID for the conference associated with the recording. | +**DateCreated** | Pointer to **string** | The RFC 2822 date and time in GMT that the resource was created | +**DateUpdated** | Pointer to **string** | The RFC 2822 date and time in GMT that the resource was last updated | +**Duration** | Pointer to **string** | The length of the recording in seconds. | +**EncryptionDetails** | Pointer to **map[string]interface{}** | How to decrypt the recording. | +**ErrorCode** | Pointer to **int32** | More information about why the recording is missing, if status is `absent`. | +**Price** | Pointer to **string** | The one-time cost of creating the recording. | +**PriceUnit** | Pointer to **string** | The currency used in the price property. | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Source** | Pointer to **string** | How the recording was created | +**StartTime** | Pointer to **string** | The start time of the recording, given in RFC 2822 format | +**Status** | Pointer to **string** | The status of the recording. | +**SubresourceUris** | Pointer to **map[string]interface{}** | A list of related resources identified by their relative URIs | +**Uri** | Pointer to **string** | The URI of the resource, relative to `https://api.twilio.com` | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ApiV2010AccountRecordingRecordingAddOnResult.md b/twilio/rest/api/v2010/docs/ApiV2010AccountRecordingRecordingAddOnResult.md index 496d085c4..2adcf7988 100644 --- a/twilio/rest/api/v2010/docs/ApiV2010AccountRecordingRecordingAddOnResult.md +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountRecordingRecordingAddOnResult.md @@ -1,18 +1,18 @@ # ApiV2010AccountRecordingRecordingAddOnResult ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**AddOnConfigurationSid** | Pointer to **string** | -**AddOnSid** | Pointer to **string** | -**DateCompleted** | Pointer to **string** | -**DateCreated** | Pointer to **string** | -**DateUpdated** | Pointer to **string** | -**ReferenceSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Status** | Pointer to [**RecordingAddOnResultStatus**](recording_add_on_result_status.md) | -**SubresourceUris** | Pointer to **map[string]interface{}** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**AddOnConfigurationSid** | Pointer to **string** | The SID of the Add-on configuration | +**AddOnSid** | Pointer to **string** | The SID of the Add-on to which the result belongs | +**DateCompleted** | Pointer to **string** | The date and time in GMT that the result was completed | +**DateCreated** | Pointer to **string** | The RFC 2822 date and time in GMT that the resource was created | +**DateUpdated** | Pointer to **string** | The RFC 2822 date and time in GMT that the resource was last updated | +**ReferenceSid** | Pointer to **string** | The SID of the recording to which the AddOnResult resource belongs | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Status** | Pointer to **string** | The status of the result | +**SubresourceUris** | Pointer to **map[string]interface{}** | A list of related resources identified by their relative URIs | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ApiV2010AccountRecordingRecordingAddOnResultRecordingAddOnResultPayload.md b/twilio/rest/api/v2010/docs/ApiV2010AccountRecordingRecordingAddOnResultRecordingAddOnResultPayload.md index ee16f8b05..f90b48a2a 100644 --- a/twilio/rest/api/v2010/docs/ApiV2010AccountRecordingRecordingAddOnResultRecordingAddOnResultPayload.md +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountRecordingRecordingAddOnResultRecordingAddOnResultPayload.md @@ -1,19 +1,19 @@ # ApiV2010AccountRecordingRecordingAddOnResultRecordingAddOnResultPayload ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**AddOnConfigurationSid** | Pointer to **string** | -**AddOnResultSid** | Pointer to **string** | -**AddOnSid** | Pointer to **string** | -**ContentType** | Pointer to **string** | -**DateCreated** | Pointer to **string** | -**DateUpdated** | Pointer to **string** | -**Label** | Pointer to **string** | -**ReferenceSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**SubresourceUris** | Pointer to **map[string]interface{}** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**AddOnConfigurationSid** | Pointer to **string** | The SID of the Add-on configuration | +**AddOnResultSid** | Pointer to **string** | The SID of the AddOnResult to which the payload belongs | +**AddOnSid** | Pointer to **string** | The SID of the Add-on to which the result belongs | +**ContentType** | Pointer to **string** | The MIME type of the payload | +**DateCreated** | Pointer to **string** | The RFC 2822 date and time in GMT that the resource was created | +**DateUpdated** | Pointer to **string** | The RFC 2822 date and time in GMT that the resource was last updated | +**Label** | Pointer to **string** | The string that describes the payload | +**ReferenceSid** | Pointer to **string** | The SID of the recording to which the AddOnResult resource that contains the payload belongs | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**SubresourceUris** | Pointer to **map[string]interface{}** | A list of related resources identified by their relative URIs | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ApiV2010AccountRecordingRecordingTranscription.md b/twilio/rest/api/v2010/docs/ApiV2010AccountRecordingRecordingTranscription.md index 44f5bde85..7b99f0db9 100644 --- a/twilio/rest/api/v2010/docs/ApiV2010AccountRecordingRecordingTranscription.md +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountRecordingRecordingTranscription.md @@ -1,21 +1,21 @@ # ApiV2010AccountRecordingRecordingTranscription ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**ApiVersion** | Pointer to **string** | -**DateCreated** | Pointer to **string** | -**DateUpdated** | Pointer to **string** | -**Duration** | Pointer to **string** | -**Price** | Pointer to **float32** | -**PriceUnit** | Pointer to **string** | -**RecordingSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Status** | Pointer to [**RecordingTranscriptionStatus**](recording_transcription_status.md) | -**TranscriptionText** | Pointer to **string** | -**Type** | Pointer to **string** | -**Uri** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**ApiVersion** | Pointer to **string** | The API version used to create the transcription | +**DateCreated** | Pointer to **string** | The RFC 2822 date and time in GMT that the resource was created | +**DateUpdated** | Pointer to **string** | The RFC 2822 date and time in GMT that the resource was last updated | +**Duration** | Pointer to **string** | The duration of the transcribed audio in seconds. | +**Price** | Pointer to **float32** | The charge for the transcription | +**PriceUnit** | Pointer to **string** | The currency in which price is measured | +**RecordingSid** | Pointer to **string** | The SID that identifies the transcription's recording | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Status** | Pointer to **string** | The status of the transcription | +**TranscriptionText** | Pointer to **string** | The text content of the transcription. | +**Type** | Pointer to **string** | The transcription type | +**Uri** | Pointer to **string** | The URI of the resource, relative to `https://api.twilio.com` | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ApiV2010AccountShortCode.md b/twilio/rest/api/v2010/docs/ApiV2010AccountShortCode.md index 5faff2eca..748f342fe 100644 --- a/twilio/rest/api/v2010/docs/ApiV2010AccountShortCode.md +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountShortCode.md @@ -1,20 +1,20 @@ # ApiV2010AccountShortCode ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**ApiVersion** | Pointer to **string** | -**DateCreated** | Pointer to **string** | -**DateUpdated** | Pointer to **string** | -**FriendlyName** | Pointer to **string** | -**ShortCode** | Pointer to **string** | -**Sid** | Pointer to **string** | -**SmsFallbackMethod** | Pointer to [**HttpMethod**](http_method.md) | -**SmsFallbackUrl** | Pointer to **string** | -**SmsMethod** | Pointer to [**HttpMethod**](http_method.md) | -**SmsUrl** | Pointer to **string** | -**Uri** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created this resource | +**ApiVersion** | Pointer to **string** | The API version used to start a new TwiML session | +**DateCreated** | Pointer to **string** | The RFC 2822 date and time in GMT that this resource was created | +**DateUpdated** | Pointer to **string** | The RFC 2822 date and time in GMT that this resource was last updated | +**FriendlyName** | Pointer to **string** | A string that you assigned to describe this resource | +**ShortCode** | Pointer to **string** | The short code. e.g., 894546. | +**Sid** | Pointer to **string** | The unique string that identifies this resource | +**SmsFallbackMethod** | Pointer to **string** | HTTP method we use to call the sms_fallback_url | +**SmsFallbackUrl** | Pointer to **string** | URL Twilio will request if an error occurs in executing TwiML | +**SmsMethod** | Pointer to **string** | HTTP method to use when requesting the sms url | +**SmsUrl** | Pointer to **string** | URL we call when receiving an incoming SMS message to this short code | +**Uri** | Pointer to **string** | The URI of this resource, relative to `https://api.twilio.com` | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ApiV2010AccountSigningKey.md b/twilio/rest/api/v2010/docs/ApiV2010AccountSigningKey.md index db5e41954..ad5e8ec13 100644 --- a/twilio/rest/api/v2010/docs/ApiV2010AccountSigningKey.md +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountSigningKey.md @@ -1,12 +1,12 @@ # ApiV2010AccountSigningKey ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**DateCreated** | Pointer to **string** | -**DateUpdated** | Pointer to **string** | -**FriendlyName** | Pointer to **string** | -**Sid** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DateCreated** | Pointer to **string** | | +**DateUpdated** | Pointer to **string** | | +**FriendlyName** | Pointer to **string** | | +**Sid** | Pointer to **string** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ApiV2010AccountSipSipCredentialList.md b/twilio/rest/api/v2010/docs/ApiV2010AccountSipSipCredentialList.md index db4cde937..f28fc394f 100644 --- a/twilio/rest/api/v2010/docs/ApiV2010AccountSipSipCredentialList.md +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountSipSipCredentialList.md @@ -1,15 +1,15 @@ # ApiV2010AccountSipSipCredentialList ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**DateCreated** | Pointer to **string** | -**DateUpdated** | Pointer to **string** | -**FriendlyName** | Pointer to **string** | -**Sid** | Pointer to **string** | -**SubresourceUris** | Pointer to **map[string]interface{}** | -**Uri** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The unique sid that identifies this account | +**DateCreated** | Pointer to **string** | The date this resource was created | +**DateUpdated** | Pointer to **string** | The date this resource was last updated | +**FriendlyName** | Pointer to **string** | Human readable descriptive text | +**Sid** | Pointer to **string** | A string that uniquely identifies this credential | +**SubresourceUris** | Pointer to **map[string]interface{}** | The list of credentials associated with this credential list. | +**Uri** | Pointer to **string** | The URI for this resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ApiV2010AccountSipSipCredentialListSipCredential.md b/twilio/rest/api/v2010/docs/ApiV2010AccountSipSipCredentialListSipCredential.md index 2fd217b9a..42239f325 100644 --- a/twilio/rest/api/v2010/docs/ApiV2010AccountSipSipCredentialListSipCredential.md +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountSipSipCredentialListSipCredential.md @@ -1,15 +1,15 @@ # ApiV2010AccountSipSipCredentialListSipCredential ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**CredentialListSid** | Pointer to **string** | -**DateCreated** | Pointer to **string** | -**DateUpdated** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Uri** | Pointer to **string** | -**Username** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The unique id of the Account that is responsible for this resource. | +**CredentialListSid** | Pointer to **string** | The unique id that identifies the credential list that includes this credential | +**DateCreated** | Pointer to **string** | The date that this resource was created, given as GMT in RFC 2822 format. | +**DateUpdated** | Pointer to **string** | The date that this resource was last updated, given as GMT in RFC 2822 format. | +**Sid** | Pointer to **string** | A 34 character string that uniquely identifies this resource. | +**Uri** | Pointer to **string** | The URI for this resource, relative to https://api.twilio.com | +**Username** | Pointer to **string** | The username for this credential. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ApiV2010AccountSipSipDomain.md b/twilio/rest/api/v2010/docs/ApiV2010AccountSipSipDomain.md index d70a85b87..a081b64fd 100644 --- a/twilio/rest/api/v2010/docs/ApiV2010AccountSipSipDomain.md +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountSipSipDomain.md @@ -1,29 +1,29 @@ # ApiV2010AccountSipSipDomain ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**ApiVersion** | Pointer to **string** | -**AuthType** | Pointer to **string** | -**ByocTrunkSid** | Pointer to **string** | -**DateCreated** | Pointer to **string** | -**DateUpdated** | Pointer to **string** | -**DomainName** | Pointer to **string** | -**EmergencyCallerSid** | Pointer to **string** | -**EmergencyCallingEnabled** | Pointer to **bool** | -**FriendlyName** | Pointer to **string** | -**Secure** | Pointer to **bool** | -**Sid** | Pointer to **string** | -**SipRegistration** | Pointer to **bool** | -**SubresourceUris** | Pointer to **map[string]interface{}** | -**Uri** | Pointer to **string** | -**VoiceFallbackMethod** | Pointer to [**HttpMethod**](http_method.md) | -**VoiceFallbackUrl** | Pointer to **string** | -**VoiceMethod** | Pointer to [**HttpMethod**](http_method.md) | -**VoiceStatusCallbackMethod** | Pointer to [**HttpMethod**](http_method.md) | -**VoiceStatusCallbackUrl** | Pointer to **string** | -**VoiceUrl** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**ApiVersion** | Pointer to **string** | The API version used to process the call | +**AuthType** | Pointer to **string** | The types of authentication mapped to the domain | +**ByocTrunkSid** | Pointer to **string** | The SID of the BYOC Trunk resource. | +**DateCreated** | Pointer to **string** | The RFC 2822 date and time in GMT that the resource was created | +**DateUpdated** | Pointer to **string** | The RFC 2822 date and time in GMT that the resource was last updated | +**DomainName** | Pointer to **string** | The unique address on Twilio to route SIP traffic | +**EmergencyCallerSid** | Pointer to **string** | Whether an emergency caller sid is configured for the domain. | +**EmergencyCallingEnabled** | Pointer to **bool** | Whether emergency calling is enabled for the domain. | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the resource | +**Secure** | Pointer to **bool** | Whether secure SIP is enabled for the domain | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**SipRegistration** | Pointer to **bool** | Whether SIP registration is allowed | +**SubresourceUris** | Pointer to **map[string]interface{}** | A list mapping resources associated with the SIP Domain resource | +**Uri** | Pointer to **string** | The URI of the resource, relative to `https://api.twilio.com` | +**VoiceFallbackMethod** | Pointer to **string** | The HTTP method used with voice_fallback_url | +**VoiceFallbackUrl** | Pointer to **string** | The URL we call when an error occurs while executing TwiML | +**VoiceMethod** | Pointer to **string** | The HTTP method to use with voice_url | +**VoiceStatusCallbackMethod** | Pointer to **string** | The HTTP method we use to call voice_status_callback_url | +**VoiceStatusCallbackUrl** | Pointer to **string** | The URL that we call with status updates | +**VoiceUrl** | Pointer to **string** | The URL we call when receiving a call | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsCredentialListMapping.md b/twilio/rest/api/v2010/docs/ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsCredentialListMapping.md index 458adea80..05f530cc8 100644 --- a/twilio/rest/api/v2010/docs/ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsCredentialListMapping.md +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsCredentialListMapping.md @@ -1,13 +1,13 @@ # ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsCredentialListMapping ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**DateCreated** | Pointer to **string** | -**DateUpdated** | Pointer to **string** | -**FriendlyName** | Pointer to **string** | -**Sid** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**DateCreated** | Pointer to **string** | The RFC 2822 date and time in GMT that the resource was created | +**DateUpdated** | Pointer to **string** | The RFC 2822 date and time in GMT that the resource was last updated | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the resource | +**Sid** | Pointer to **string** | The unique string that identifies the resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsIpAccessControlListMapping.md b/twilio/rest/api/v2010/docs/ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsIpAccessControlListMapping.md index 01cdcf29c..bea495eba 100644 --- a/twilio/rest/api/v2010/docs/ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsIpAccessControlListMapping.md +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsIpAccessControlListMapping.md @@ -1,13 +1,13 @@ # ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsIpAccessControlListMapping ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**DateCreated** | Pointer to **string** | -**DateUpdated** | Pointer to **string** | -**FriendlyName** | Pointer to **string** | -**Sid** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**DateCreated** | Pointer to **string** | The RFC 2822 date and time in GMT that the resource was created | +**DateUpdated** | Pointer to **string** | The RFC 2822 date and time in GMT that the resource was last updated | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the resource | +**Sid** | Pointer to **string** | The unique string that identifies the resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ApiV2010AccountSipSipDomainSipAuthSipAuthRegistrationsSipAuthRegistrationsCredentialListMapping.md b/twilio/rest/api/v2010/docs/ApiV2010AccountSipSipDomainSipAuthSipAuthRegistrationsSipAuthRegistrationsCredentialListMapping.md index 98df61f8c..ce50043de 100644 --- a/twilio/rest/api/v2010/docs/ApiV2010AccountSipSipDomainSipAuthSipAuthRegistrationsSipAuthRegistrationsCredentialListMapping.md +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountSipSipDomainSipAuthSipAuthRegistrationsSipAuthRegistrationsCredentialListMapping.md @@ -1,13 +1,13 @@ # ApiV2010AccountSipSipDomainSipAuthSipAuthRegistrationsSipAuthRegistrationsCredentialListMapping ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**DateCreated** | Pointer to **string** | -**DateUpdated** | Pointer to **string** | -**FriendlyName** | Pointer to **string** | -**Sid** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**DateCreated** | Pointer to **string** | The RFC 2822 date and time in GMT that the resource was created | +**DateUpdated** | Pointer to **string** | The RFC 2822 date and time in GMT that the resource was last updated | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the resource | +**Sid** | Pointer to **string** | The unique string that identifies the resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ApiV2010AccountSipSipDomainSipCredentialListMapping.md b/twilio/rest/api/v2010/docs/ApiV2010AccountSipSipDomainSipCredentialListMapping.md index aa1fdbe56..fee1523b3 100644 --- a/twilio/rest/api/v2010/docs/ApiV2010AccountSipSipDomainSipCredentialListMapping.md +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountSipSipDomainSipCredentialListMapping.md @@ -1,15 +1,15 @@ # ApiV2010AccountSipSipDomainSipCredentialListMapping ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**DateCreated** | Pointer to **string** | -**DateUpdated** | Pointer to **string** | -**FriendlyName** | Pointer to **string** | -**Sid** | Pointer to **string** | -**SubresourceUris** | Pointer to **map[string]interface{}** | -**Uri** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The unique id of the Account that is responsible for this resource. | +**DateCreated** | Pointer to **string** | The date that this resource was created, given as GMT in RFC 2822 format. | +**DateUpdated** | Pointer to **string** | The date that this resource was last updated, given as GMT in RFC 2822 format. | +**FriendlyName** | Pointer to **string** | A human readable descriptive text for this resource, up to 64 characters long. | +**Sid** | Pointer to **string** | A 34 character string that uniquely identifies this resource. | +**SubresourceUris** | Pointer to **map[string]interface{}** | The credentials associated with this resource. | +**Uri** | Pointer to **string** | The URI for this resource, relative to https://api.twilio.com | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ApiV2010AccountSipSipDomainSipIpAccessControlListMapping.md b/twilio/rest/api/v2010/docs/ApiV2010AccountSipSipDomainSipIpAccessControlListMapping.md index 660e79839..c8fcfb69d 100644 --- a/twilio/rest/api/v2010/docs/ApiV2010AccountSipSipDomainSipIpAccessControlListMapping.md +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountSipSipDomainSipIpAccessControlListMapping.md @@ -1,15 +1,15 @@ # ApiV2010AccountSipSipDomainSipIpAccessControlListMapping ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**DateCreated** | Pointer to **string** | -**DateUpdated** | Pointer to **string** | -**FriendlyName** | Pointer to **string** | -**Sid** | Pointer to **string** | -**SubresourceUris** | Pointer to **map[string]interface{}** | -**Uri** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The unique id of the Account that is responsible for this resource. | +**DateCreated** | Pointer to **string** | The date that this resource was created, given as GMT in RFC 2822 format. | +**DateUpdated** | Pointer to **string** | The date that this resource was last updated, given as GMT in RFC 2822 format. | +**FriendlyName** | Pointer to **string** | A human readable descriptive text for this resource, up to 64 characters long. | +**Sid** | Pointer to **string** | A 34 character string that uniquely identifies this resource. | +**SubresourceUris** | Pointer to **map[string]interface{}** | The list of IP addresses associated with this domain. | +**Uri** | Pointer to **string** | The URI for this resource, relative to https://api.twilio.com | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ApiV2010AccountSipSipIpAccessControlList.md b/twilio/rest/api/v2010/docs/ApiV2010AccountSipSipIpAccessControlList.md index 4ad74a988..c3175f609 100644 --- a/twilio/rest/api/v2010/docs/ApiV2010AccountSipSipIpAccessControlList.md +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountSipSipIpAccessControlList.md @@ -1,15 +1,15 @@ # ApiV2010AccountSipSipIpAccessControlList ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**DateCreated** | Pointer to **string** | -**DateUpdated** | Pointer to **string** | -**FriendlyName** | Pointer to **string** | -**Sid** | Pointer to **string** | -**SubresourceUris** | Pointer to **map[string]interface{}** | -**Uri** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The unique sid that identifies this account | +**DateCreated** | Pointer to **string** | The date this resource was created | +**DateUpdated** | Pointer to **string** | The date this resource was last updated | +**FriendlyName** | Pointer to **string** | A human readable description of this resource | +**Sid** | Pointer to **string** | A string that uniquely identifies this resource | +**SubresourceUris** | Pointer to **map[string]interface{}** | The IP addresses associated with this resource. | +**Uri** | Pointer to **string** | The URI for this resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ApiV2010AccountSipSipIpAccessControlListSipIpAddress.md b/twilio/rest/api/v2010/docs/ApiV2010AccountSipSipIpAccessControlListSipIpAddress.md index 14786576a..63dd95e5b 100644 --- a/twilio/rest/api/v2010/docs/ApiV2010AccountSipSipIpAccessControlListSipIpAddress.md +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountSipSipIpAccessControlListSipIpAddress.md @@ -1,17 +1,17 @@ # ApiV2010AccountSipSipIpAccessControlListSipIpAddress ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**CidrPrefixLength** | Pointer to **int32** | -**DateCreated** | Pointer to **string** | -**DateUpdated** | Pointer to **string** | -**FriendlyName** | Pointer to **string** | -**IpAccessControlListSid** | Pointer to **string** | -**IpAddress** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Uri** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The unique id of the Account that is responsible for this resource. | +**CidrPrefixLength** | Pointer to **int32** | An integer representing the length of the CIDR prefix to use with this IP address when accepting traffic. By default the entire IP address is used. | +**DateCreated** | Pointer to **string** | The date that this resource was created, given as GMT in RFC 2822 format. | +**DateUpdated** | Pointer to **string** | The date that this resource was last updated, given as GMT in RFC 2822 format. | +**FriendlyName** | Pointer to **string** | A human readable descriptive text for this resource, up to 64 characters long. | +**IpAccessControlListSid** | Pointer to **string** | The unique id of the IpAccessControlList resource that includes this resource. | +**IpAddress** | Pointer to **string** | An IP address in dotted decimal notation from which you want to accept traffic. Any SIP requests from this IP address will be allowed by Twilio. IPv4 only supported today. | +**Sid** | Pointer to **string** | A 34 character string that uniquely identifies this resource. | +**Uri** | Pointer to **string** | The URI for this resource, relative to https://api.twilio.com | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ApiV2010AccountToken.md b/twilio/rest/api/v2010/docs/ApiV2010AccountToken.md index 0eeffcd76..ffe5001fb 100644 --- a/twilio/rest/api/v2010/docs/ApiV2010AccountToken.md +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountToken.md @@ -1,15 +1,15 @@ # ApiV2010AccountToken ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**DateCreated** | Pointer to **string** | -**DateUpdated** | Pointer to **string** | -**IceServers** | Pointer to **[]map[string]interface{}** | -**Password** | Pointer to **string** | -**Ttl** | Pointer to **string** | -**Username** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**DateCreated** | Pointer to **string** | The RFC 2822 date and time in GMT that the resource was created | +**DateUpdated** | Pointer to **string** | The RFC 2822 date and time in GMT that the resource was last updated | +**IceServers** | Pointer to [**[]ApiV2010AccountTokenIceServers**](api_v2010_account_token_ice_servers.md) | An array representing the ephemeral credentials | +**Password** | Pointer to **string** | The temporary password used for authenticating | +**Ttl** | Pointer to **string** | The duration in seconds the credentials are valid | +**Username** | Pointer to **string** | The temporary username that uniquely identifies a Token | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ApiV2010AccountTokenIceServers.md b/twilio/rest/api/v2010/docs/ApiV2010AccountTokenIceServers.md new file mode 100644 index 000000000..56ff8a757 --- /dev/null +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountTokenIceServers.md @@ -0,0 +1,13 @@ +# ApiV2010AccountTokenIceServers + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Credential** | **string** | |[optional] +**Url** | **string** | |[optional] +**Urls** | **string** | |[optional] +**Username** | **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/twilio/rest/api/v2010/docs/ApiV2010AccountTranscription.md b/twilio/rest/api/v2010/docs/ApiV2010AccountTranscription.md index add0073c6..f0ef2936c 100644 --- a/twilio/rest/api/v2010/docs/ApiV2010AccountTranscription.md +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountTranscription.md @@ -1,21 +1,21 @@ # ApiV2010AccountTranscription ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**ApiVersion** | Pointer to **string** | -**DateCreated** | Pointer to **string** | -**DateUpdated** | Pointer to **string** | -**Duration** | Pointer to **string** | -**Price** | Pointer to **float32** | -**PriceUnit** | Pointer to **string** | -**RecordingSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Status** | Pointer to [**TranscriptionStatus**](transcription_status.md) | -**TranscriptionText** | Pointer to **string** | -**Type** | Pointer to **string** | -**Uri** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**ApiVersion** | Pointer to **string** | The API version used to create the transcription | +**DateCreated** | Pointer to **string** | The RFC 2822 date and time in GMT that the resource was created | +**DateUpdated** | Pointer to **string** | The RFC 2822 date and time in GMT that the resource was last updated | +**Duration** | Pointer to **string** | The duration of the transcribed audio in seconds. | +**Price** | Pointer to **float32** | The charge for the transcription | +**PriceUnit** | Pointer to **string** | The currency in which price is measured | +**RecordingSid** | Pointer to **string** | The SID that identifies the transcription's recording | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Status** | Pointer to **string** | The status of the transcription | +**TranscriptionText** | Pointer to **string** | The text content of the transcription. | +**Type** | Pointer to **string** | The transcription type | +**Uri** | Pointer to **string** | The URI of the resource, relative to `https://api.twilio.com` | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ApiV2010AccountUsageUsageRecord.md b/twilio/rest/api/v2010/docs/ApiV2010AccountUsageUsageRecord.md index 7451b07de..35f8a7fc0 100644 --- a/twilio/rest/api/v2010/docs/ApiV2010AccountUsageUsageRecord.md +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountUsageUsageRecord.md @@ -1,23 +1,23 @@ # ApiV2010AccountUsageUsageRecord ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**ApiVersion** | Pointer to **string** | -**AsOf** | Pointer to **string** | -**Category** | Pointer to [**UsageRecordCategory**](usage_record_category.md) | -**Count** | Pointer to **string** | -**CountUnit** | Pointer to **string** | -**Description** | Pointer to **string** | -**EndDate** | Pointer to [**time.Time**](time.Time.md) | -**Price** | Pointer to **float32** | -**PriceUnit** | Pointer to **string** | -**StartDate** | Pointer to [**time.Time**](time.Time.md) | -**SubresourceUris** | Pointer to **map[string]interface{}** | -**Uri** | Pointer to **string** | -**Usage** | Pointer to **string** | -**UsageUnit** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account accrued the usage | +**ApiVersion** | Pointer to **string** | The API version used to create the resource | +**AsOf** | Pointer to **string** | Usage records up to date as of this timestamp | +**Category** | Pointer to **string** | The category of usage | +**Count** | Pointer to **string** | The number of usage events | +**CountUnit** | Pointer to **string** | The units in which count is measured | +**Description** | Pointer to **string** | A plain-language description of the usage category | +**EndDate** | Pointer to [**time.Time**](time.Time.md) | The last date for which usage is included in the UsageRecord | +**Price** | Pointer to **float32** | The total price of the usage | +**PriceUnit** | Pointer to **string** | The currency in which `price` is measured | +**StartDate** | Pointer to [**time.Time**](time.Time.md) | The first date for which usage is included in this UsageRecord | +**SubresourceUris** | Pointer to **map[string]interface{}** | A list of related resources identified by their relative URIs | +**Uri** | Pointer to **string** | The URI of the resource, relative to `https://api.twilio.com` | +**Usage** | Pointer to **string** | The amount of usage | +**UsageUnit** | Pointer to **string** | The units in which usage is measured | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ApiV2010AccountUsageUsageRecordUsageRecordAllTime.md b/twilio/rest/api/v2010/docs/ApiV2010AccountUsageUsageRecordUsageRecordAllTime.md index 8117a4645..621094522 100644 --- a/twilio/rest/api/v2010/docs/ApiV2010AccountUsageUsageRecordUsageRecordAllTime.md +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountUsageUsageRecordUsageRecordAllTime.md @@ -1,23 +1,23 @@ # ApiV2010AccountUsageUsageRecordUsageRecordAllTime ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**ApiVersion** | Pointer to **string** | -**AsOf** | Pointer to **string** | -**Category** | Pointer to [**UsageRecordAllTimeCategory**](usage_record_all_time_category.md) | -**Count** | Pointer to **string** | -**CountUnit** | Pointer to **string** | -**Description** | Pointer to **string** | -**EndDate** | Pointer to [**time.Time**](time.Time.md) | -**Price** | Pointer to **float32** | -**PriceUnit** | Pointer to **string** | -**StartDate** | Pointer to [**time.Time**](time.Time.md) | -**SubresourceUris** | Pointer to **map[string]interface{}** | -**Uri** | Pointer to **string** | -**Usage** | Pointer to **string** | -**UsageUnit** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account accrued the usage | +**ApiVersion** | Pointer to **string** | The API version used to create the resource | +**AsOf** | Pointer to **string** | Usage records up to date as of this timestamp | +**Category** | Pointer to **string** | The category of usage | +**Count** | Pointer to **string** | The number of usage events | +**CountUnit** | Pointer to **string** | The units in which count is measured | +**Description** | Pointer to **string** | A plain-language description of the usage category | +**EndDate** | Pointer to [**time.Time**](time.Time.md) | The last date for which usage is included in the UsageRecord | +**Price** | Pointer to **float32** | The total price of the usage | +**PriceUnit** | Pointer to **string** | The currency in which `price` is measured | +**StartDate** | Pointer to [**time.Time**](time.Time.md) | The first date for which usage is included in this UsageRecord | +**SubresourceUris** | Pointer to **map[string]interface{}** | A list of related resources identified by their relative URIs | +**Uri** | Pointer to **string** | The URI of the resource, relative to `https://api.twilio.com` | +**Usage** | Pointer to **string** | The amount of usage | +**UsageUnit** | Pointer to **string** | The units in which usage is measured | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ApiV2010AccountUsageUsageRecordUsageRecordDaily.md b/twilio/rest/api/v2010/docs/ApiV2010AccountUsageUsageRecordUsageRecordDaily.md index c0ce157a2..9c8a9df61 100644 --- a/twilio/rest/api/v2010/docs/ApiV2010AccountUsageUsageRecordUsageRecordDaily.md +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountUsageUsageRecordUsageRecordDaily.md @@ -1,23 +1,23 @@ # ApiV2010AccountUsageUsageRecordUsageRecordDaily ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**ApiVersion** | Pointer to **string** | -**AsOf** | Pointer to **string** | -**Category** | Pointer to [**UsageRecordDailyCategory**](usage_record_daily_category.md) | -**Count** | Pointer to **string** | -**CountUnit** | Pointer to **string** | -**Description** | Pointer to **string** | -**EndDate** | Pointer to [**time.Time**](time.Time.md) | -**Price** | Pointer to **float32** | -**PriceUnit** | Pointer to **string** | -**StartDate** | Pointer to [**time.Time**](time.Time.md) | -**SubresourceUris** | Pointer to **map[string]interface{}** | -**Uri** | Pointer to **string** | -**Usage** | Pointer to **string** | -**UsageUnit** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account accrued the usage | +**ApiVersion** | Pointer to **string** | The API version used to create the resource | +**AsOf** | Pointer to **string** | Usage records up to date as of this timestamp | +**Category** | Pointer to **string** | The category of usage | +**Count** | Pointer to **string** | The number of usage events | +**CountUnit** | Pointer to **string** | The units in which count is measured | +**Description** | Pointer to **string** | A plain-language description of the usage category | +**EndDate** | Pointer to [**time.Time**](time.Time.md) | The last date for which usage is included in the UsageRecord | +**Price** | Pointer to **float32** | The total price of the usage | +**PriceUnit** | Pointer to **string** | The currency in which `price` is measured | +**StartDate** | Pointer to [**time.Time**](time.Time.md) | The first date for which usage is included in this UsageRecord | +**SubresourceUris** | Pointer to **map[string]interface{}** | A list of related resources identified by their relative URIs | +**Uri** | Pointer to **string** | The URI of the resource, relative to `https://api.twilio.com` | +**Usage** | Pointer to **string** | The amount of usage | +**UsageUnit** | Pointer to **string** | The units in which usage is measured | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ApiV2010AccountUsageUsageRecordUsageRecordLastMonth.md b/twilio/rest/api/v2010/docs/ApiV2010AccountUsageUsageRecordUsageRecordLastMonth.md index eea74860d..8cb684449 100644 --- a/twilio/rest/api/v2010/docs/ApiV2010AccountUsageUsageRecordUsageRecordLastMonth.md +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountUsageUsageRecordUsageRecordLastMonth.md @@ -1,23 +1,23 @@ # ApiV2010AccountUsageUsageRecordUsageRecordLastMonth ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**ApiVersion** | Pointer to **string** | -**AsOf** | Pointer to **string** | -**Category** | Pointer to [**UsageRecordLastMonthCategory**](usage_record_last_month_category.md) | -**Count** | Pointer to **string** | -**CountUnit** | Pointer to **string** | -**Description** | Pointer to **string** | -**EndDate** | Pointer to [**time.Time**](time.Time.md) | -**Price** | Pointer to **float32** | -**PriceUnit** | Pointer to **string** | -**StartDate** | Pointer to [**time.Time**](time.Time.md) | -**SubresourceUris** | Pointer to **map[string]interface{}** | -**Uri** | Pointer to **string** | -**Usage** | Pointer to **string** | -**UsageUnit** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account accrued the usage | +**ApiVersion** | Pointer to **string** | The API version used to create the resource | +**AsOf** | Pointer to **string** | Usage records up to date as of this timestamp | +**Category** | Pointer to **string** | The category of usage | +**Count** | Pointer to **string** | The number of usage events | +**CountUnit** | Pointer to **string** | The units in which count is measured | +**Description** | Pointer to **string** | A plain-language description of the usage category | +**EndDate** | Pointer to [**time.Time**](time.Time.md) | The last date for which usage is included in the UsageRecord | +**Price** | Pointer to **float32** | The total price of the usage | +**PriceUnit** | Pointer to **string** | The currency in which `price` is measured | +**StartDate** | Pointer to [**time.Time**](time.Time.md) | The first date for which usage is included in this UsageRecord | +**SubresourceUris** | Pointer to **map[string]interface{}** | A list of related resources identified by their relative URIs | +**Uri** | Pointer to **string** | The URI of the resource, relative to `https://api.twilio.com` | +**Usage** | Pointer to **string** | The amount of usage | +**UsageUnit** | Pointer to **string** | The units in which usage is measured | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ApiV2010AccountUsageUsageRecordUsageRecordMonthly.md b/twilio/rest/api/v2010/docs/ApiV2010AccountUsageUsageRecordUsageRecordMonthly.md index 94c2ed1cb..6846ab412 100644 --- a/twilio/rest/api/v2010/docs/ApiV2010AccountUsageUsageRecordUsageRecordMonthly.md +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountUsageUsageRecordUsageRecordMonthly.md @@ -1,23 +1,23 @@ # ApiV2010AccountUsageUsageRecordUsageRecordMonthly ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**ApiVersion** | Pointer to **string** | -**AsOf** | Pointer to **string** | -**Category** | Pointer to [**UsageRecordMonthlyCategory**](usage_record_monthly_category.md) | -**Count** | Pointer to **string** | -**CountUnit** | Pointer to **string** | -**Description** | Pointer to **string** | -**EndDate** | Pointer to [**time.Time**](time.Time.md) | -**Price** | Pointer to **float32** | -**PriceUnit** | Pointer to **string** | -**StartDate** | Pointer to [**time.Time**](time.Time.md) | -**SubresourceUris** | Pointer to **map[string]interface{}** | -**Uri** | Pointer to **string** | -**Usage** | Pointer to **string** | -**UsageUnit** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account accrued the usage | +**ApiVersion** | Pointer to **string** | The API version used to create the resource | +**AsOf** | Pointer to **string** | Usage records up to date as of this timestamp | +**Category** | Pointer to **string** | The category of usage | +**Count** | Pointer to **string** | The number of usage events | +**CountUnit** | Pointer to **string** | The units in which count is measured | +**Description** | Pointer to **string** | A plain-language description of the usage category | +**EndDate** | Pointer to [**time.Time**](time.Time.md) | The last date for which usage is included in the UsageRecord | +**Price** | Pointer to **float32** | The total price of the usage | +**PriceUnit** | Pointer to **string** | The currency in which `price` is measured | +**StartDate** | Pointer to [**time.Time**](time.Time.md) | The first date for which usage is included in this UsageRecord | +**SubresourceUris** | Pointer to **map[string]interface{}** | A list of related resources identified by their relative URIs | +**Uri** | Pointer to **string** | The URI of the resource, relative to `https://api.twilio.com` | +**Usage** | Pointer to **string** | The amount of usage | +**UsageUnit** | Pointer to **string** | The units in which usage is measured | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ApiV2010AccountUsageUsageRecordUsageRecordThisMonth.md b/twilio/rest/api/v2010/docs/ApiV2010AccountUsageUsageRecordUsageRecordThisMonth.md index e621475c7..43203e4e4 100644 --- a/twilio/rest/api/v2010/docs/ApiV2010AccountUsageUsageRecordUsageRecordThisMonth.md +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountUsageUsageRecordUsageRecordThisMonth.md @@ -1,23 +1,23 @@ # ApiV2010AccountUsageUsageRecordUsageRecordThisMonth ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**ApiVersion** | Pointer to **string** | -**AsOf** | Pointer to **string** | -**Category** | Pointer to [**UsageRecordThisMonthCategory**](usage_record_this_month_category.md) | -**Count** | Pointer to **string** | -**CountUnit** | Pointer to **string** | -**Description** | Pointer to **string** | -**EndDate** | Pointer to [**time.Time**](time.Time.md) | -**Price** | Pointer to **float32** | -**PriceUnit** | Pointer to **string** | -**StartDate** | Pointer to [**time.Time**](time.Time.md) | -**SubresourceUris** | Pointer to **map[string]interface{}** | -**Uri** | Pointer to **string** | -**Usage** | Pointer to **string** | -**UsageUnit** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account accrued the usage | +**ApiVersion** | Pointer to **string** | The API version used to create the resource | +**AsOf** | Pointer to **string** | Usage records up to date as of this timestamp | +**Category** | Pointer to **string** | The category of usage | +**Count** | Pointer to **string** | The number of usage events | +**CountUnit** | Pointer to **string** | The units in which count is measured | +**Description** | Pointer to **string** | A plain-language description of the usage category | +**EndDate** | Pointer to [**time.Time**](time.Time.md) | The last date for which usage is included in the UsageRecord | +**Price** | Pointer to **float32** | The total price of the usage | +**PriceUnit** | Pointer to **string** | The currency in which `price` is measured | +**StartDate** | Pointer to [**time.Time**](time.Time.md) | The first date for which usage is included in this UsageRecord | +**SubresourceUris** | Pointer to **map[string]interface{}** | A list of related resources identified by their relative URIs | +**Uri** | Pointer to **string** | The URI of the resource, relative to `https://api.twilio.com` | +**Usage** | Pointer to **string** | The amount of usage | +**UsageUnit** | Pointer to **string** | The units in which usage is measured | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ApiV2010AccountUsageUsageRecordUsageRecordToday.md b/twilio/rest/api/v2010/docs/ApiV2010AccountUsageUsageRecordUsageRecordToday.md index 5de1471e7..61c0f517a 100644 --- a/twilio/rest/api/v2010/docs/ApiV2010AccountUsageUsageRecordUsageRecordToday.md +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountUsageUsageRecordUsageRecordToday.md @@ -1,23 +1,23 @@ # ApiV2010AccountUsageUsageRecordUsageRecordToday ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**ApiVersion** | Pointer to **string** | -**AsOf** | Pointer to **string** | -**Category** | Pointer to [**UsageRecordTodayCategory**](usage_record_today_category.md) | -**Count** | Pointer to **string** | -**CountUnit** | Pointer to **string** | -**Description** | Pointer to **string** | -**EndDate** | Pointer to [**time.Time**](time.Time.md) | -**Price** | Pointer to **float32** | -**PriceUnit** | Pointer to **string** | -**StartDate** | Pointer to [**time.Time**](time.Time.md) | -**SubresourceUris** | Pointer to **map[string]interface{}** | -**Uri** | Pointer to **string** | -**Usage** | Pointer to **string** | -**UsageUnit** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account accrued the usage | +**ApiVersion** | Pointer to **string** | The API version used to create the resource | +**AsOf** | Pointer to **string** | Usage records up to date as of this timestamp | +**Category** | Pointer to **string** | The category of usage | +**Count** | Pointer to **string** | The number of usage events | +**CountUnit** | Pointer to **string** | The units in which count is measured | +**Description** | Pointer to **string** | A plain-language description of the usage category | +**EndDate** | Pointer to [**time.Time**](time.Time.md) | The last date for which usage is included in the UsageRecord | +**Price** | Pointer to **float32** | The total price of the usage | +**PriceUnit** | Pointer to **string** | The currency in which `price` is measured | +**StartDate** | Pointer to [**time.Time**](time.Time.md) | The first date for which usage is included in this UsageRecord | +**SubresourceUris** | Pointer to **map[string]interface{}** | A list of related resources identified by their relative URIs | +**Uri** | Pointer to **string** | The URI of the resource, relative to `https://api.twilio.com` | +**Usage** | Pointer to **string** | The amount of usage | +**UsageUnit** | Pointer to **string** | The units in which usage is measured | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ApiV2010AccountUsageUsageRecordUsageRecordYearly.md b/twilio/rest/api/v2010/docs/ApiV2010AccountUsageUsageRecordUsageRecordYearly.md index bd5e50f4a..7c09c73d6 100644 --- a/twilio/rest/api/v2010/docs/ApiV2010AccountUsageUsageRecordUsageRecordYearly.md +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountUsageUsageRecordUsageRecordYearly.md @@ -1,23 +1,23 @@ # ApiV2010AccountUsageUsageRecordUsageRecordYearly ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**ApiVersion** | Pointer to **string** | -**AsOf** | Pointer to **string** | -**Category** | Pointer to [**UsageRecordYearlyCategory**](usage_record_yearly_category.md) | -**Count** | Pointer to **string** | -**CountUnit** | Pointer to **string** | -**Description** | Pointer to **string** | -**EndDate** | Pointer to [**time.Time**](time.Time.md) | -**Price** | Pointer to **float32** | -**PriceUnit** | Pointer to **string** | -**StartDate** | Pointer to [**time.Time**](time.Time.md) | -**SubresourceUris** | Pointer to **map[string]interface{}** | -**Uri** | Pointer to **string** | -**Usage** | Pointer to **string** | -**UsageUnit** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account accrued the usage | +**ApiVersion** | Pointer to **string** | The API version used to create the resource | +**AsOf** | Pointer to **string** | Usage records up to date as of this timestamp | +**Category** | Pointer to **string** | The category of usage | +**Count** | Pointer to **string** | The number of usage events | +**CountUnit** | Pointer to **string** | The units in which count is measured | +**Description** | Pointer to **string** | A plain-language description of the usage category | +**EndDate** | Pointer to [**time.Time**](time.Time.md) | The last date for which usage is included in the UsageRecord | +**Price** | Pointer to **float32** | The total price of the usage | +**PriceUnit** | Pointer to **string** | The currency in which `price` is measured | +**StartDate** | Pointer to [**time.Time**](time.Time.md) | The first date for which usage is included in this UsageRecord | +**SubresourceUris** | Pointer to **map[string]interface{}** | A list of related resources identified by their relative URIs | +**Uri** | Pointer to **string** | The URI of the resource, relative to `https://api.twilio.com` | +**Usage** | Pointer to **string** | The amount of usage | +**UsageUnit** | Pointer to **string** | The units in which usage is measured | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ApiV2010AccountUsageUsageRecordUsageRecordYesterday.md b/twilio/rest/api/v2010/docs/ApiV2010AccountUsageUsageRecordUsageRecordYesterday.md index cc0ac3eb8..315a868ea 100644 --- a/twilio/rest/api/v2010/docs/ApiV2010AccountUsageUsageRecordUsageRecordYesterday.md +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountUsageUsageRecordUsageRecordYesterday.md @@ -1,23 +1,23 @@ # ApiV2010AccountUsageUsageRecordUsageRecordYesterday ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**ApiVersion** | Pointer to **string** | -**AsOf** | Pointer to **string** | -**Category** | Pointer to [**UsageRecordYesterdayCategory**](usage_record_yesterday_category.md) | -**Count** | Pointer to **string** | -**CountUnit** | Pointer to **string** | -**Description** | Pointer to **string** | -**EndDate** | Pointer to [**time.Time**](time.Time.md) | -**Price** | Pointer to **float32** | -**PriceUnit** | Pointer to **string** | -**StartDate** | Pointer to [**time.Time**](time.Time.md) | -**SubresourceUris** | Pointer to **map[string]interface{}** | -**Uri** | Pointer to **string** | -**Usage** | Pointer to **string** | -**UsageUnit** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account accrued the usage | +**ApiVersion** | Pointer to **string** | The API version used to create the resource | +**AsOf** | Pointer to **string** | Usage records up to date as of this timestamp | +**Category** | Pointer to **string** | The category of usage | +**Count** | Pointer to **string** | The number of usage events | +**CountUnit** | Pointer to **string** | The units in which count is measured | +**Description** | Pointer to **string** | A plain-language description of the usage category | +**EndDate** | Pointer to [**time.Time**](time.Time.md) | The last date for which usage is included in the UsageRecord | +**Price** | Pointer to **float32** | The total price of the usage | +**PriceUnit** | Pointer to **string** | The currency in which `price` is measured | +**StartDate** | Pointer to [**time.Time**](time.Time.md) | The first date for which usage is included in this UsageRecord | +**SubresourceUris** | Pointer to **map[string]interface{}** | A list of related resources identified by their relative URIs | +**Uri** | Pointer to **string** | The URI of the resource, relative to `https://api.twilio.com` | +**Usage** | Pointer to **string** | The amount of usage | +**UsageUnit** | Pointer to **string** | The units in which usage is measured | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ApiV2010AccountUsageUsageTrigger.md b/twilio/rest/api/v2010/docs/ApiV2010AccountUsageUsageTrigger.md index 65175cfac..e33cb8ee2 100644 --- a/twilio/rest/api/v2010/docs/ApiV2010AccountUsageUsageTrigger.md +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountUsageUsageTrigger.md @@ -1,24 +1,24 @@ # ApiV2010AccountUsageUsageTrigger ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**ApiVersion** | Pointer to **string** | -**CallbackMethod** | Pointer to [**HttpMethod**](http_method.md) | -**CallbackUrl** | Pointer to **string** | -**CurrentValue** | Pointer to **string** | -**DateCreated** | Pointer to **string** | -**DateFired** | Pointer to **string** | -**DateUpdated** | Pointer to **string** | -**FriendlyName** | Pointer to **string** | -**Recurring** | Pointer to [**UsageTriggerRecurring**](usage_trigger_recurring.md) | -**Sid** | Pointer to **string** | -**TriggerBy** | Pointer to [**UsageTriggerTriggerField**](usage_trigger_trigger_field.md) | -**TriggerValue** | Pointer to **string** | -**Uri** | Pointer to **string** | -**UsageCategory** | Pointer to [**UsageTriggerUsageCategory**](usage_trigger_usage_category.md) | -**UsageRecordUri** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that this trigger monitors | +**ApiVersion** | Pointer to **string** | The API version used to create the resource | +**CallbackMethod** | Pointer to **string** | The HTTP method we use to call callback_url | +**CallbackUrl** | Pointer to **string** | he URL we call when the trigger fires | +**CurrentValue** | Pointer to **string** | The current value of the field the trigger is watching | +**DateCreated** | Pointer to **string** | The RFC 2822 date and time in GMT that the resource was created | +**DateFired** | Pointer to **string** | The RFC 2822 date and time in GMT that the trigger was last fired | +**DateUpdated** | Pointer to **string** | The RFC 2822 date and time in GMT that the resource was last updated | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the trigger | +**Recurring** | Pointer to **string** | The frequency of a recurring UsageTrigger | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**TriggerBy** | Pointer to **string** | The field in the UsageRecord resource that fires the trigger | +**TriggerValue** | Pointer to **string** | The value at which the trigger will fire | +**Uri** | Pointer to **string** | The URI of the resource, relative to `https://api.twilio.com` | +**UsageCategory** | Pointer to **string** | The usage category the trigger watches | +**UsageRecordUri** | Pointer to **string** | The URI of the UsageRecord resource this trigger watches | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ApiV2010AccountValidationRequest.md b/twilio/rest/api/v2010/docs/ApiV2010AccountValidationRequest.md index ae4797d4f..13d72f2cd 100644 --- a/twilio/rest/api/v2010/docs/ApiV2010AccountValidationRequest.md +++ b/twilio/rest/api/v2010/docs/ApiV2010AccountValidationRequest.md @@ -1,13 +1,13 @@ # ApiV2010AccountValidationRequest ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**CallSid** | Pointer to **string** | -**FriendlyName** | Pointer to **string** | -**PhoneNumber** | Pointer to **string** | -**ValidationCode** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**CallSid** | Pointer to **string** | The SID of the Call the resource is associated with | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the resource | +**PhoneNumber** | Pointer to **string** | The phone number to verify in E.164 format | +**ValidationCode** | Pointer to **string** | The 6 digit validation code that someone must enter to validate the Caller ID when `phone_number` is called | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ListAccountResponse.md b/twilio/rest/api/v2010/docs/ListAccountResponse.md index c9d94023a..b7518b6f0 100644 --- a/twilio/rest/api/v2010/docs/ListAccountResponse.md +++ b/twilio/rest/api/v2010/docs/ListAccountResponse.md @@ -1,17 +1,17 @@ # ListAccountResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Accounts** | [**[]ApiV2010Account**](api.v2010.account.md) | [optional] -**End** | **int32** | [optional] -**FirstPageUri** | **string** | [optional] -**NextPageUri** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUri** | **string** | [optional] -**Start** | **int32** | [optional] -**Uri** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Accounts** | [**[]ApiV2010Account**](api.v2010.account.md) | |[optional] +**End** | **int32** | |[optional] +**FirstPageUri** | **string** | |[optional] +**NextPageUri** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUri** | **string** | |[optional] +**Start** | **int32** | |[optional] +**Uri** | **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/twilio/rest/api/v2010/docs/ListAddressResponse.md b/twilio/rest/api/v2010/docs/ListAddressResponse.md index 9777e28fc..11d46adb2 100644 --- a/twilio/rest/api/v2010/docs/ListAddressResponse.md +++ b/twilio/rest/api/v2010/docs/ListAddressResponse.md @@ -1,17 +1,17 @@ # ListAddressResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Addresses** | [**[]ApiV2010AccountAddress**](api.v2010.account.address.md) | [optional] -**End** | **int32** | [optional] -**FirstPageUri** | **string** | [optional] -**NextPageUri** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUri** | **string** | [optional] -**Start** | **int32** | [optional] -**Uri** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Addresses** | [**[]ApiV2010AccountAddress**](api.v2010.account.address.md) | |[optional] +**End** | **int32** | |[optional] +**FirstPageUri** | **string** | |[optional] +**NextPageUri** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUri** | **string** | |[optional] +**Start** | **int32** | |[optional] +**Uri** | **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/twilio/rest/api/v2010/docs/ListApplicationResponse.md b/twilio/rest/api/v2010/docs/ListApplicationResponse.md index dffb264d2..9535eb98f 100644 --- a/twilio/rest/api/v2010/docs/ListApplicationResponse.md +++ b/twilio/rest/api/v2010/docs/ListApplicationResponse.md @@ -1,17 +1,17 @@ # ListApplicationResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Applications** | [**[]ApiV2010AccountApplication**](api.v2010.account.application.md) | [optional] -**End** | **int32** | [optional] -**FirstPageUri** | **string** | [optional] -**NextPageUri** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUri** | **string** | [optional] -**Start** | **int32** | [optional] -**Uri** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Applications** | [**[]ApiV2010AccountApplication**](api.v2010.account.application.md) | |[optional] +**End** | **int32** | |[optional] +**FirstPageUri** | **string** | |[optional] +**NextPageUri** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUri** | **string** | |[optional] +**Start** | **int32** | |[optional] +**Uri** | **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/twilio/rest/api/v2010/docs/ListAuthorizedConnectAppResponse.md b/twilio/rest/api/v2010/docs/ListAuthorizedConnectAppResponse.md index 9060687ea..29fe1d91e 100644 --- a/twilio/rest/api/v2010/docs/ListAuthorizedConnectAppResponse.md +++ b/twilio/rest/api/v2010/docs/ListAuthorizedConnectAppResponse.md @@ -1,17 +1,17 @@ # ListAuthorizedConnectAppResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AuthorizedConnectApps** | [**[]ApiV2010AccountAuthorizedConnectApp**](api.v2010.account.authorized_connect_app.md) | [optional] -**End** | **int32** | [optional] -**FirstPageUri** | **string** | [optional] -**NextPageUri** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUri** | **string** | [optional] -**Start** | **int32** | [optional] -**Uri** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AuthorizedConnectApps** | [**[]ApiV2010AccountAuthorizedConnectApp**](api.v2010.account.authorized_connect_app.md) | |[optional] +**End** | **int32** | |[optional] +**FirstPageUri** | **string** | |[optional] +**NextPageUri** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUri** | **string** | |[optional] +**Start** | **int32** | |[optional] +**Uri** | **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/twilio/rest/api/v2010/docs/ListAvailablePhoneNumberCountryResponse.md b/twilio/rest/api/v2010/docs/ListAvailablePhoneNumberCountryResponse.md index d9451a84d..e4695a4ba 100644 --- a/twilio/rest/api/v2010/docs/ListAvailablePhoneNumberCountryResponse.md +++ b/twilio/rest/api/v2010/docs/ListAvailablePhoneNumberCountryResponse.md @@ -1,17 +1,17 @@ # ListAvailablePhoneNumberCountryResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Countries** | [**[]ApiV2010AccountAvailablePhoneNumberCountry**](api.v2010.account.available_phone_number_country.md) | [optional] -**End** | **int32** | [optional] -**FirstPageUri** | **string** | [optional] -**NextPageUri** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUri** | **string** | [optional] -**Start** | **int32** | [optional] -**Uri** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Countries** | [**[]ApiV2010AccountAvailablePhoneNumberCountry**](api.v2010.account.available_phone_number_country.md) | |[optional] +**End** | **int32** | |[optional] +**FirstPageUri** | **string** | |[optional] +**NextPageUri** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUri** | **string** | |[optional] +**Start** | **int32** | |[optional] +**Uri** | **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/twilio/rest/api/v2010/docs/ListAvailablePhoneNumberLocalResponse.md b/twilio/rest/api/v2010/docs/ListAvailablePhoneNumberLocalResponse.md index ba3128bb7..b457ff59e 100644 --- a/twilio/rest/api/v2010/docs/ListAvailablePhoneNumberLocalResponse.md +++ b/twilio/rest/api/v2010/docs/ListAvailablePhoneNumberLocalResponse.md @@ -1,17 +1,17 @@ # ListAvailablePhoneNumberLocalResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AvailablePhoneNumbers** | [**[]ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocal**](api.v2010.account.available_phone_number_country.available_phone_number_local.md) | [optional] -**End** | **int32** | [optional] -**FirstPageUri** | **string** | [optional] -**NextPageUri** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUri** | **string** | [optional] -**Start** | **int32** | [optional] -**Uri** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AvailablePhoneNumbers** | [**[]ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocal**](api.v2010.account.available_phone_number_country.available_phone_number_local.md) | |[optional] +**End** | **int32** | |[optional] +**FirstPageUri** | **string** | |[optional] +**NextPageUri** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUri** | **string** | |[optional] +**Start** | **int32** | |[optional] +**Uri** | **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/twilio/rest/api/v2010/docs/ListAvailablePhoneNumberMachineToMachineResponse.md b/twilio/rest/api/v2010/docs/ListAvailablePhoneNumberMachineToMachineResponse.md index 9619e8465..29ee07887 100644 --- a/twilio/rest/api/v2010/docs/ListAvailablePhoneNumberMachineToMachineResponse.md +++ b/twilio/rest/api/v2010/docs/ListAvailablePhoneNumberMachineToMachineResponse.md @@ -1,17 +1,17 @@ # ListAvailablePhoneNumberMachineToMachineResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AvailablePhoneNumbers** | [**[]ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberMachineToMachine**](api.v2010.account.available_phone_number_country.available_phone_number_machine_to_machine.md) | [optional] -**End** | **int32** | [optional] -**FirstPageUri** | **string** | [optional] -**NextPageUri** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUri** | **string** | [optional] -**Start** | **int32** | [optional] -**Uri** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AvailablePhoneNumbers** | [**[]ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberMachineToMachine**](api.v2010.account.available_phone_number_country.available_phone_number_machine_to_machine.md) | |[optional] +**End** | **int32** | |[optional] +**FirstPageUri** | **string** | |[optional] +**NextPageUri** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUri** | **string** | |[optional] +**Start** | **int32** | |[optional] +**Uri** | **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/twilio/rest/api/v2010/docs/ListAvailablePhoneNumberMobileResponse.md b/twilio/rest/api/v2010/docs/ListAvailablePhoneNumberMobileResponse.md index 75b006292..209bd7b46 100644 --- a/twilio/rest/api/v2010/docs/ListAvailablePhoneNumberMobileResponse.md +++ b/twilio/rest/api/v2010/docs/ListAvailablePhoneNumberMobileResponse.md @@ -1,17 +1,17 @@ # ListAvailablePhoneNumberMobileResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AvailablePhoneNumbers** | [**[]ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberMobile**](api.v2010.account.available_phone_number_country.available_phone_number_mobile.md) | [optional] -**End** | **int32** | [optional] -**FirstPageUri** | **string** | [optional] -**NextPageUri** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUri** | **string** | [optional] -**Start** | **int32** | [optional] -**Uri** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AvailablePhoneNumbers** | [**[]ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberMobile**](api.v2010.account.available_phone_number_country.available_phone_number_mobile.md) | |[optional] +**End** | **int32** | |[optional] +**FirstPageUri** | **string** | |[optional] +**NextPageUri** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUri** | **string** | |[optional] +**Start** | **int32** | |[optional] +**Uri** | **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/twilio/rest/api/v2010/docs/ListAvailablePhoneNumberNationalResponse.md b/twilio/rest/api/v2010/docs/ListAvailablePhoneNumberNationalResponse.md index 28a11c825..0d0164fca 100644 --- a/twilio/rest/api/v2010/docs/ListAvailablePhoneNumberNationalResponse.md +++ b/twilio/rest/api/v2010/docs/ListAvailablePhoneNumberNationalResponse.md @@ -1,17 +1,17 @@ # ListAvailablePhoneNumberNationalResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AvailablePhoneNumbers** | [**[]ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberNational**](api.v2010.account.available_phone_number_country.available_phone_number_national.md) | [optional] -**End** | **int32** | [optional] -**FirstPageUri** | **string** | [optional] -**NextPageUri** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUri** | **string** | [optional] -**Start** | **int32** | [optional] -**Uri** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AvailablePhoneNumbers** | [**[]ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberNational**](api.v2010.account.available_phone_number_country.available_phone_number_national.md) | |[optional] +**End** | **int32** | |[optional] +**FirstPageUri** | **string** | |[optional] +**NextPageUri** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUri** | **string** | |[optional] +**Start** | **int32** | |[optional] +**Uri** | **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/twilio/rest/api/v2010/docs/ListAvailablePhoneNumberSharedCostResponse.md b/twilio/rest/api/v2010/docs/ListAvailablePhoneNumberSharedCostResponse.md index 31f19b95f..6a99df41d 100644 --- a/twilio/rest/api/v2010/docs/ListAvailablePhoneNumberSharedCostResponse.md +++ b/twilio/rest/api/v2010/docs/ListAvailablePhoneNumberSharedCostResponse.md @@ -1,17 +1,17 @@ # ListAvailablePhoneNumberSharedCostResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AvailablePhoneNumbers** | [**[]ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberSharedCost**](api.v2010.account.available_phone_number_country.available_phone_number_shared_cost.md) | [optional] -**End** | **int32** | [optional] -**FirstPageUri** | **string** | [optional] -**NextPageUri** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUri** | **string** | [optional] -**Start** | **int32** | [optional] -**Uri** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AvailablePhoneNumbers** | [**[]ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberSharedCost**](api.v2010.account.available_phone_number_country.available_phone_number_shared_cost.md) | |[optional] +**End** | **int32** | |[optional] +**FirstPageUri** | **string** | |[optional] +**NextPageUri** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUri** | **string** | |[optional] +**Start** | **int32** | |[optional] +**Uri** | **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/twilio/rest/api/v2010/docs/ListAvailablePhoneNumberTollFreeResponse.md b/twilio/rest/api/v2010/docs/ListAvailablePhoneNumberTollFreeResponse.md index 66a0e2091..aac03b6c7 100644 --- a/twilio/rest/api/v2010/docs/ListAvailablePhoneNumberTollFreeResponse.md +++ b/twilio/rest/api/v2010/docs/ListAvailablePhoneNumberTollFreeResponse.md @@ -1,17 +1,17 @@ # ListAvailablePhoneNumberTollFreeResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AvailablePhoneNumbers** | [**[]ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberTollFree**](api.v2010.account.available_phone_number_country.available_phone_number_toll_free.md) | [optional] -**End** | **int32** | [optional] -**FirstPageUri** | **string** | [optional] -**NextPageUri** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUri** | **string** | [optional] -**Start** | **int32** | [optional] -**Uri** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AvailablePhoneNumbers** | [**[]ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberTollFree**](api.v2010.account.available_phone_number_country.available_phone_number_toll_free.md) | |[optional] +**End** | **int32** | |[optional] +**FirstPageUri** | **string** | |[optional] +**NextPageUri** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUri** | **string** | |[optional] +**Start** | **int32** | |[optional] +**Uri** | **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/twilio/rest/api/v2010/docs/ListAvailablePhoneNumberVoipResponse.md b/twilio/rest/api/v2010/docs/ListAvailablePhoneNumberVoipResponse.md index f5c5ccce5..50814aebd 100644 --- a/twilio/rest/api/v2010/docs/ListAvailablePhoneNumberVoipResponse.md +++ b/twilio/rest/api/v2010/docs/ListAvailablePhoneNumberVoipResponse.md @@ -1,17 +1,17 @@ # ListAvailablePhoneNumberVoipResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AvailablePhoneNumbers** | [**[]ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberVoip**](api.v2010.account.available_phone_number_country.available_phone_number_voip.md) | [optional] -**End** | **int32** | [optional] -**FirstPageUri** | **string** | [optional] -**NextPageUri** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUri** | **string** | [optional] -**Start** | **int32** | [optional] -**Uri** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AvailablePhoneNumbers** | [**[]ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberVoip**](api.v2010.account.available_phone_number_country.available_phone_number_voip.md) | |[optional] +**End** | **int32** | |[optional] +**FirstPageUri** | **string** | |[optional] +**NextPageUri** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUri** | **string** | |[optional] +**Start** | **int32** | |[optional] +**Uri** | **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/twilio/rest/api/v2010/docs/ListCallEventResponse.md b/twilio/rest/api/v2010/docs/ListCallEventResponse.md index 2f7098f86..079637d2c 100644 --- a/twilio/rest/api/v2010/docs/ListCallEventResponse.md +++ b/twilio/rest/api/v2010/docs/ListCallEventResponse.md @@ -1,17 +1,17 @@ # ListCallEventResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**End** | **int32** | [optional] -**Events** | [**[]ApiV2010AccountCallCallEvent**](api.v2010.account.call.call_event.md) | [optional] -**FirstPageUri** | **string** | [optional] -**NextPageUri** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUri** | **string** | [optional] -**Start** | **int32** | [optional] -**Uri** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | **int32** | |[optional] +**Events** | [**[]ApiV2010AccountCallCallEvent**](api.v2010.account.call.call_event.md) | |[optional] +**FirstPageUri** | **string** | |[optional] +**NextPageUri** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUri** | **string** | |[optional] +**Start** | **int32** | |[optional] +**Uri** | **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/twilio/rest/api/v2010/docs/ListCallNotificationResponse.md b/twilio/rest/api/v2010/docs/ListCallNotificationResponse.md index b2acb3a53..dd08cabdf 100644 --- a/twilio/rest/api/v2010/docs/ListCallNotificationResponse.md +++ b/twilio/rest/api/v2010/docs/ListCallNotificationResponse.md @@ -1,17 +1,17 @@ # ListCallNotificationResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**End** | **int32** | [optional] -**FirstPageUri** | **string** | [optional] -**NextPageUri** | **string** | [optional] -**Notifications** | [**[]ApiV2010AccountCallCallNotification**](api.v2010.account.call.call_notification.md) | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUri** | **string** | [optional] -**Start** | **int32** | [optional] -**Uri** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | **int32** | |[optional] +**FirstPageUri** | **string** | |[optional] +**NextPageUri** | **string** | |[optional] +**Notifications** | [**[]ApiV2010AccountCallCallNotification**](api.v2010.account.call.call_notification.md) | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUri** | **string** | |[optional] +**Start** | **int32** | |[optional] +**Uri** | **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/twilio/rest/api/v2010/docs/ListCallRecordingResponse.md b/twilio/rest/api/v2010/docs/ListCallRecordingResponse.md index 0f428c9e5..30dcd42cb 100644 --- a/twilio/rest/api/v2010/docs/ListCallRecordingResponse.md +++ b/twilio/rest/api/v2010/docs/ListCallRecordingResponse.md @@ -1,17 +1,17 @@ # ListCallRecordingResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**End** | **int32** | [optional] -**FirstPageUri** | **string** | [optional] -**NextPageUri** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUri** | **string** | [optional] -**Recordings** | [**[]ApiV2010AccountCallCallRecording**](api.v2010.account.call.call_recording.md) | [optional] -**Start** | **int32** | [optional] -**Uri** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | **int32** | |[optional] +**FirstPageUri** | **string** | |[optional] +**NextPageUri** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUri** | **string** | |[optional] +**Recordings** | [**[]ApiV2010AccountCallCallRecording**](api.v2010.account.call.call_recording.md) | |[optional] +**Start** | **int32** | |[optional] +**Uri** | **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/twilio/rest/api/v2010/docs/ListCallResponse.md b/twilio/rest/api/v2010/docs/ListCallResponse.md index 2214e99ec..ca146e458 100644 --- a/twilio/rest/api/v2010/docs/ListCallResponse.md +++ b/twilio/rest/api/v2010/docs/ListCallResponse.md @@ -1,17 +1,17 @@ # ListCallResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Calls** | [**[]ApiV2010AccountCall**](api.v2010.account.call.md) | [optional] -**End** | **int32** | [optional] -**FirstPageUri** | **string** | [optional] -**NextPageUri** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUri** | **string** | [optional] -**Start** | **int32** | [optional] -**Uri** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Calls** | [**[]ApiV2010AccountCall**](api.v2010.account.call.md) | |[optional] +**End** | **int32** | |[optional] +**FirstPageUri** | **string** | |[optional] +**NextPageUri** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUri** | **string** | |[optional] +**Start** | **int32** | |[optional] +**Uri** | **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/twilio/rest/api/v2010/docs/ListConferenceRecordingResponse.md b/twilio/rest/api/v2010/docs/ListConferenceRecordingResponse.md index 5dcab7fda..1fbb2585e 100644 --- a/twilio/rest/api/v2010/docs/ListConferenceRecordingResponse.md +++ b/twilio/rest/api/v2010/docs/ListConferenceRecordingResponse.md @@ -1,17 +1,17 @@ # ListConferenceRecordingResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**End** | **int32** | [optional] -**FirstPageUri** | **string** | [optional] -**NextPageUri** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUri** | **string** | [optional] -**Recordings** | [**[]ApiV2010AccountConferenceConferenceRecording**](api.v2010.account.conference.conference_recording.md) | [optional] -**Start** | **int32** | [optional] -**Uri** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | **int32** | |[optional] +**FirstPageUri** | **string** | |[optional] +**NextPageUri** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUri** | **string** | |[optional] +**Recordings** | [**[]ApiV2010AccountConferenceConferenceRecording**](api.v2010.account.conference.conference_recording.md) | |[optional] +**Start** | **int32** | |[optional] +**Uri** | **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/twilio/rest/api/v2010/docs/ListConferenceResponse.md b/twilio/rest/api/v2010/docs/ListConferenceResponse.md index 0d8008e67..5e1f30e5c 100644 --- a/twilio/rest/api/v2010/docs/ListConferenceResponse.md +++ b/twilio/rest/api/v2010/docs/ListConferenceResponse.md @@ -1,17 +1,17 @@ # ListConferenceResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Conferences** | [**[]ApiV2010AccountConference**](api.v2010.account.conference.md) | [optional] -**End** | **int32** | [optional] -**FirstPageUri** | **string** | [optional] -**NextPageUri** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUri** | **string** | [optional] -**Start** | **int32** | [optional] -**Uri** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Conferences** | [**[]ApiV2010AccountConference**](api.v2010.account.conference.md) | |[optional] +**End** | **int32** | |[optional] +**FirstPageUri** | **string** | |[optional] +**NextPageUri** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUri** | **string** | |[optional] +**Start** | **int32** | |[optional] +**Uri** | **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/twilio/rest/api/v2010/docs/ListConnectAppResponse.md b/twilio/rest/api/v2010/docs/ListConnectAppResponse.md index 4b1f23b88..94494a8cf 100644 --- a/twilio/rest/api/v2010/docs/ListConnectAppResponse.md +++ b/twilio/rest/api/v2010/docs/ListConnectAppResponse.md @@ -1,17 +1,17 @@ # ListConnectAppResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**ConnectApps** | [**[]ApiV2010AccountConnectApp**](api.v2010.account.connect_app.md) | [optional] -**End** | **int32** | [optional] -**FirstPageUri** | **string** | [optional] -**NextPageUri** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUri** | **string** | [optional] -**Start** | **int32** | [optional] -**Uri** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ConnectApps** | [**[]ApiV2010AccountConnectApp**](api.v2010.account.connect_app.md) | |[optional] +**End** | **int32** | |[optional] +**FirstPageUri** | **string** | |[optional] +**NextPageUri** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUri** | **string** | |[optional] +**Start** | **int32** | |[optional] +**Uri** | **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/twilio/rest/api/v2010/docs/ListDependentPhoneNumberResponse.md b/twilio/rest/api/v2010/docs/ListDependentPhoneNumberResponse.md index eec664493..2e7e682e3 100644 --- a/twilio/rest/api/v2010/docs/ListDependentPhoneNumberResponse.md +++ b/twilio/rest/api/v2010/docs/ListDependentPhoneNumberResponse.md @@ -1,17 +1,17 @@ # ListDependentPhoneNumberResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**DependentPhoneNumbers** | [**[]ApiV2010AccountAddressDependentPhoneNumber**](api.v2010.account.address.dependent_phone_number.md) | [optional] -**End** | **int32** | [optional] -**FirstPageUri** | **string** | [optional] -**NextPageUri** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUri** | **string** | [optional] -**Start** | **int32** | [optional] -**Uri** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DependentPhoneNumbers** | [**[]ApiV2010AccountAddressDependentPhoneNumber**](api.v2010.account.address.dependent_phone_number.md) | |[optional] +**End** | **int32** | |[optional] +**FirstPageUri** | **string** | |[optional] +**NextPageUri** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUri** | **string** | |[optional] +**Start** | **int32** | |[optional] +**Uri** | **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/twilio/rest/api/v2010/docs/ListIncomingPhoneNumberAssignedAddOnExtensionResponse.md b/twilio/rest/api/v2010/docs/ListIncomingPhoneNumberAssignedAddOnExtensionResponse.md index 123078eb3..d60c02769 100644 --- a/twilio/rest/api/v2010/docs/ListIncomingPhoneNumberAssignedAddOnExtensionResponse.md +++ b/twilio/rest/api/v2010/docs/ListIncomingPhoneNumberAssignedAddOnExtensionResponse.md @@ -1,17 +1,17 @@ # ListIncomingPhoneNumberAssignedAddOnExtensionResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**End** | **int32** | [optional] -**Extensions** | [**[]ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOnIncomingPhoneNumberAssignedAddOnExtension**](api.v2010.account.incoming_phone_number.incoming_phone_number_assigned_add_on.incoming_phone_number_assigned_add_on_extension.md) | [optional] -**FirstPageUri** | **string** | [optional] -**NextPageUri** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUri** | **string** | [optional] -**Start** | **int32** | [optional] -**Uri** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | **int32** | |[optional] +**Extensions** | [**[]ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOnIncomingPhoneNumberAssignedAddOnExtension**](api.v2010.account.incoming_phone_number.incoming_phone_number_assigned_add_on.incoming_phone_number_assigned_add_on_extension.md) | |[optional] +**FirstPageUri** | **string** | |[optional] +**NextPageUri** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUri** | **string** | |[optional] +**Start** | **int32** | |[optional] +**Uri** | **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/twilio/rest/api/v2010/docs/ListIncomingPhoneNumberAssignedAddOnResponse.md b/twilio/rest/api/v2010/docs/ListIncomingPhoneNumberAssignedAddOnResponse.md index 7d2543f38..17b6da555 100644 --- a/twilio/rest/api/v2010/docs/ListIncomingPhoneNumberAssignedAddOnResponse.md +++ b/twilio/rest/api/v2010/docs/ListIncomingPhoneNumberAssignedAddOnResponse.md @@ -1,17 +1,17 @@ # ListIncomingPhoneNumberAssignedAddOnResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AssignedAddOns** | [**[]ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOn**](api.v2010.account.incoming_phone_number.incoming_phone_number_assigned_add_on.md) | [optional] -**End** | **int32** | [optional] -**FirstPageUri** | **string** | [optional] -**NextPageUri** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUri** | **string** | [optional] -**Start** | **int32** | [optional] -**Uri** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AssignedAddOns** | [**[]ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOn**](api.v2010.account.incoming_phone_number.incoming_phone_number_assigned_add_on.md) | |[optional] +**End** | **int32** | |[optional] +**FirstPageUri** | **string** | |[optional] +**NextPageUri** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUri** | **string** | |[optional] +**Start** | **int32** | |[optional] +**Uri** | **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/twilio/rest/api/v2010/docs/ListIncomingPhoneNumberLocalResponse.md b/twilio/rest/api/v2010/docs/ListIncomingPhoneNumberLocalResponse.md index f3f01a4ec..37ab49c3f 100644 --- a/twilio/rest/api/v2010/docs/ListIncomingPhoneNumberLocalResponse.md +++ b/twilio/rest/api/v2010/docs/ListIncomingPhoneNumberLocalResponse.md @@ -1,17 +1,17 @@ # ListIncomingPhoneNumberLocalResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**End** | **int32** | [optional] -**FirstPageUri** | **string** | [optional] -**IncomingPhoneNumbers** | [**[]ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberLocal**](api.v2010.account.incoming_phone_number.incoming_phone_number_local.md) | [optional] -**NextPageUri** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUri** | **string** | [optional] -**Start** | **int32** | [optional] -**Uri** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | **int32** | |[optional] +**FirstPageUri** | **string** | |[optional] +**IncomingPhoneNumbers** | [**[]ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberLocal**](api.v2010.account.incoming_phone_number.incoming_phone_number_local.md) | |[optional] +**NextPageUri** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUri** | **string** | |[optional] +**Start** | **int32** | |[optional] +**Uri** | **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/twilio/rest/api/v2010/docs/ListIncomingPhoneNumberMobileResponse.md b/twilio/rest/api/v2010/docs/ListIncomingPhoneNumberMobileResponse.md index acacd88f5..380c60991 100644 --- a/twilio/rest/api/v2010/docs/ListIncomingPhoneNumberMobileResponse.md +++ b/twilio/rest/api/v2010/docs/ListIncomingPhoneNumberMobileResponse.md @@ -1,17 +1,17 @@ # ListIncomingPhoneNumberMobileResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**End** | **int32** | [optional] -**FirstPageUri** | **string** | [optional] -**IncomingPhoneNumbers** | [**[]ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberMobile**](api.v2010.account.incoming_phone_number.incoming_phone_number_mobile.md) | [optional] -**NextPageUri** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUri** | **string** | [optional] -**Start** | **int32** | [optional] -**Uri** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | **int32** | |[optional] +**FirstPageUri** | **string** | |[optional] +**IncomingPhoneNumbers** | [**[]ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberMobile**](api.v2010.account.incoming_phone_number.incoming_phone_number_mobile.md) | |[optional] +**NextPageUri** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUri** | **string** | |[optional] +**Start** | **int32** | |[optional] +**Uri** | **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/twilio/rest/api/v2010/docs/ListIncomingPhoneNumberResponse.md b/twilio/rest/api/v2010/docs/ListIncomingPhoneNumberResponse.md index 47b4b4d56..140b24ca8 100644 --- a/twilio/rest/api/v2010/docs/ListIncomingPhoneNumberResponse.md +++ b/twilio/rest/api/v2010/docs/ListIncomingPhoneNumberResponse.md @@ -1,17 +1,17 @@ # ListIncomingPhoneNumberResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**End** | **int32** | [optional] -**FirstPageUri** | **string** | [optional] -**IncomingPhoneNumbers** | [**[]ApiV2010AccountIncomingPhoneNumber**](api.v2010.account.incoming_phone_number.md) | [optional] -**NextPageUri** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUri** | **string** | [optional] -**Start** | **int32** | [optional] -**Uri** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | **int32** | |[optional] +**FirstPageUri** | **string** | |[optional] +**IncomingPhoneNumbers** | [**[]ApiV2010AccountIncomingPhoneNumber**](api.v2010.account.incoming_phone_number.md) | |[optional] +**NextPageUri** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUri** | **string** | |[optional] +**Start** | **int32** | |[optional] +**Uri** | **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/twilio/rest/api/v2010/docs/ListIncomingPhoneNumberTollFreeResponse.md b/twilio/rest/api/v2010/docs/ListIncomingPhoneNumberTollFreeResponse.md index 571f0fb8c..1f57ec1fd 100644 --- a/twilio/rest/api/v2010/docs/ListIncomingPhoneNumberTollFreeResponse.md +++ b/twilio/rest/api/v2010/docs/ListIncomingPhoneNumberTollFreeResponse.md @@ -1,17 +1,17 @@ # ListIncomingPhoneNumberTollFreeResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**End** | **int32** | [optional] -**FirstPageUri** | **string** | [optional] -**IncomingPhoneNumbers** | [**[]ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberTollFree**](api.v2010.account.incoming_phone_number.incoming_phone_number_toll_free.md) | [optional] -**NextPageUri** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUri** | **string** | [optional] -**Start** | **int32** | [optional] -**Uri** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | **int32** | |[optional] +**FirstPageUri** | **string** | |[optional] +**IncomingPhoneNumbers** | [**[]ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberTollFree**](api.v2010.account.incoming_phone_number.incoming_phone_number_toll_free.md) | |[optional] +**NextPageUri** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUri** | **string** | |[optional] +**Start** | **int32** | |[optional] +**Uri** | **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/twilio/rest/api/v2010/docs/ListKeyResponse.md b/twilio/rest/api/v2010/docs/ListKeyResponse.md index 11649ef86..870932700 100644 --- a/twilio/rest/api/v2010/docs/ListKeyResponse.md +++ b/twilio/rest/api/v2010/docs/ListKeyResponse.md @@ -1,17 +1,17 @@ # ListKeyResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**End** | **int32** | [optional] -**FirstPageUri** | **string** | [optional] -**Keys** | [**[]ApiV2010AccountKey**](api.v2010.account.key.md) | [optional] -**NextPageUri** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUri** | **string** | [optional] -**Start** | **int32** | [optional] -**Uri** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | **int32** | |[optional] +**FirstPageUri** | **string** | |[optional] +**Keys** | [**[]ApiV2010AccountKey**](api.v2010.account.key.md) | |[optional] +**NextPageUri** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUri** | **string** | |[optional] +**Start** | **int32** | |[optional] +**Uri** | **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/twilio/rest/api/v2010/docs/ListMediaResponse.md b/twilio/rest/api/v2010/docs/ListMediaResponse.md index 0f92b75a3..75ded46c4 100644 --- a/twilio/rest/api/v2010/docs/ListMediaResponse.md +++ b/twilio/rest/api/v2010/docs/ListMediaResponse.md @@ -1,17 +1,17 @@ # ListMediaResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**End** | **int32** | [optional] -**FirstPageUri** | **string** | [optional] -**MediaList** | [**[]ApiV2010AccountMessageMedia**](api.v2010.account.message.media.md) | [optional] -**NextPageUri** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUri** | **string** | [optional] -**Start** | **int32** | [optional] -**Uri** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | **int32** | |[optional] +**FirstPageUri** | **string** | |[optional] +**MediaList** | [**[]ApiV2010AccountMessageMedia**](api.v2010.account.message.media.md) | |[optional] +**NextPageUri** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUri** | **string** | |[optional] +**Start** | **int32** | |[optional] +**Uri** | **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/twilio/rest/api/v2010/docs/ListMemberResponse.md b/twilio/rest/api/v2010/docs/ListMemberResponse.md index 5419f674d..4613af91f 100644 --- a/twilio/rest/api/v2010/docs/ListMemberResponse.md +++ b/twilio/rest/api/v2010/docs/ListMemberResponse.md @@ -1,17 +1,17 @@ # ListMemberResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**End** | **int32** | [optional] -**FirstPageUri** | **string** | [optional] -**NextPageUri** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUri** | **string** | [optional] -**QueueMembers** | [**[]ApiV2010AccountQueueMember**](api.v2010.account.queue.member.md) | [optional] -**Start** | **int32** | [optional] -**Uri** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | **int32** | |[optional] +**FirstPageUri** | **string** | |[optional] +**NextPageUri** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUri** | **string** | |[optional] +**QueueMembers** | [**[]ApiV2010AccountQueueMember**](api.v2010.account.queue.member.md) | |[optional] +**Start** | **int32** | |[optional] +**Uri** | **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/twilio/rest/api/v2010/docs/ListMessageResponse.md b/twilio/rest/api/v2010/docs/ListMessageResponse.md index 49796ac68..19ccd8c28 100644 --- a/twilio/rest/api/v2010/docs/ListMessageResponse.md +++ b/twilio/rest/api/v2010/docs/ListMessageResponse.md @@ -1,17 +1,17 @@ # ListMessageResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**End** | **int32** | [optional] -**FirstPageUri** | **string** | [optional] -**Messages** | [**[]ApiV2010AccountMessage**](api.v2010.account.message.md) | [optional] -**NextPageUri** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUri** | **string** | [optional] -**Start** | **int32** | [optional] -**Uri** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | **int32** | |[optional] +**FirstPageUri** | **string** | |[optional] +**Messages** | [**[]ApiV2010AccountMessage**](api.v2010.account.message.md) | |[optional] +**NextPageUri** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUri** | **string** | |[optional] +**Start** | **int32** | |[optional] +**Uri** | **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/twilio/rest/api/v2010/docs/ListNotificationResponse.md b/twilio/rest/api/v2010/docs/ListNotificationResponse.md index 6d6f7c44e..3ee2fad10 100644 --- a/twilio/rest/api/v2010/docs/ListNotificationResponse.md +++ b/twilio/rest/api/v2010/docs/ListNotificationResponse.md @@ -1,17 +1,17 @@ # ListNotificationResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**End** | **int32** | [optional] -**FirstPageUri** | **string** | [optional] -**NextPageUri** | **string** | [optional] -**Notifications** | [**[]ApiV2010AccountNotification**](api.v2010.account.notification.md) | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUri** | **string** | [optional] -**Start** | **int32** | [optional] -**Uri** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | **int32** | |[optional] +**FirstPageUri** | **string** | |[optional] +**NextPageUri** | **string** | |[optional] +**Notifications** | [**[]ApiV2010AccountNotification**](api.v2010.account.notification.md) | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUri** | **string** | |[optional] +**Start** | **int32** | |[optional] +**Uri** | **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/twilio/rest/api/v2010/docs/ListOutgoingCallerIdResponse.md b/twilio/rest/api/v2010/docs/ListOutgoingCallerIdResponse.md index 0d3f068ff..5ca06ed6d 100644 --- a/twilio/rest/api/v2010/docs/ListOutgoingCallerIdResponse.md +++ b/twilio/rest/api/v2010/docs/ListOutgoingCallerIdResponse.md @@ -1,17 +1,17 @@ # ListOutgoingCallerIdResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**End** | **int32** | [optional] -**FirstPageUri** | **string** | [optional] -**NextPageUri** | **string** | [optional] -**OutgoingCallerIds** | [**[]ApiV2010AccountOutgoingCallerId**](api.v2010.account.outgoing_caller_id.md) | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUri** | **string** | [optional] -**Start** | **int32** | [optional] -**Uri** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | **int32** | |[optional] +**FirstPageUri** | **string** | |[optional] +**NextPageUri** | **string** | |[optional] +**OutgoingCallerIds** | [**[]ApiV2010AccountOutgoingCallerId**](api.v2010.account.outgoing_caller_id.md) | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUri** | **string** | |[optional] +**Start** | **int32** | |[optional] +**Uri** | **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/twilio/rest/api/v2010/docs/ListParticipantResponse.md b/twilio/rest/api/v2010/docs/ListParticipantResponse.md index 89f7c30f5..b4ae05d62 100644 --- a/twilio/rest/api/v2010/docs/ListParticipantResponse.md +++ b/twilio/rest/api/v2010/docs/ListParticipantResponse.md @@ -1,17 +1,17 @@ # ListParticipantResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**End** | **int32** | [optional] -**FirstPageUri** | **string** | [optional] -**NextPageUri** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**Participants** | [**[]ApiV2010AccountConferenceParticipant**](api.v2010.account.conference.participant.md) | [optional] -**PreviousPageUri** | **string** | [optional] -**Start** | **int32** | [optional] -**Uri** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | **int32** | |[optional] +**FirstPageUri** | **string** | |[optional] +**NextPageUri** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**Participants** | [**[]ApiV2010AccountConferenceParticipant**](api.v2010.account.conference.participant.md) | |[optional] +**PreviousPageUri** | **string** | |[optional] +**Start** | **int32** | |[optional] +**Uri** | **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/twilio/rest/api/v2010/docs/ListQueueResponse.md b/twilio/rest/api/v2010/docs/ListQueueResponse.md index b021bb863..c4dcce4c6 100644 --- a/twilio/rest/api/v2010/docs/ListQueueResponse.md +++ b/twilio/rest/api/v2010/docs/ListQueueResponse.md @@ -1,17 +1,17 @@ # ListQueueResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**End** | **int32** | [optional] -**FirstPageUri** | **string** | [optional] -**NextPageUri** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUri** | **string** | [optional] -**Queues** | [**[]ApiV2010AccountQueue**](api.v2010.account.queue.md) | [optional] -**Start** | **int32** | [optional] -**Uri** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | **int32** | |[optional] +**FirstPageUri** | **string** | |[optional] +**NextPageUri** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUri** | **string** | |[optional] +**Queues** | [**[]ApiV2010AccountQueue**](api.v2010.account.queue.md) | |[optional] +**Start** | **int32** | |[optional] +**Uri** | **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/twilio/rest/api/v2010/docs/ListRecordingAddOnResultPayloadResponse.md b/twilio/rest/api/v2010/docs/ListRecordingAddOnResultPayloadResponse.md index 042250ff1..56f2aee9b 100644 --- a/twilio/rest/api/v2010/docs/ListRecordingAddOnResultPayloadResponse.md +++ b/twilio/rest/api/v2010/docs/ListRecordingAddOnResultPayloadResponse.md @@ -1,17 +1,17 @@ # ListRecordingAddOnResultPayloadResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**End** | **int32** | [optional] -**FirstPageUri** | **string** | [optional] -**NextPageUri** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**Payloads** | [**[]ApiV2010AccountRecordingRecordingAddOnResultRecordingAddOnResultPayload**](api.v2010.account.recording.recording_add_on_result.recording_add_on_result_payload.md) | [optional] -**PreviousPageUri** | **string** | [optional] -**Start** | **int32** | [optional] -**Uri** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | **int32** | |[optional] +**FirstPageUri** | **string** | |[optional] +**NextPageUri** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**Payloads** | [**[]ApiV2010AccountRecordingRecordingAddOnResultRecordingAddOnResultPayload**](api.v2010.account.recording.recording_add_on_result.recording_add_on_result_payload.md) | |[optional] +**PreviousPageUri** | **string** | |[optional] +**Start** | **int32** | |[optional] +**Uri** | **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/twilio/rest/api/v2010/docs/ListRecordingAddOnResultResponse.md b/twilio/rest/api/v2010/docs/ListRecordingAddOnResultResponse.md index 502e36dde..4e036e11f 100644 --- a/twilio/rest/api/v2010/docs/ListRecordingAddOnResultResponse.md +++ b/twilio/rest/api/v2010/docs/ListRecordingAddOnResultResponse.md @@ -1,17 +1,17 @@ # ListRecordingAddOnResultResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AddOnResults** | [**[]ApiV2010AccountRecordingRecordingAddOnResult**](api.v2010.account.recording.recording_add_on_result.md) | [optional] -**End** | **int32** | [optional] -**FirstPageUri** | **string** | [optional] -**NextPageUri** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUri** | **string** | [optional] -**Start** | **int32** | [optional] -**Uri** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AddOnResults** | [**[]ApiV2010AccountRecordingRecordingAddOnResult**](api.v2010.account.recording.recording_add_on_result.md) | |[optional] +**End** | **int32** | |[optional] +**FirstPageUri** | **string** | |[optional] +**NextPageUri** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUri** | **string** | |[optional] +**Start** | **int32** | |[optional] +**Uri** | **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/twilio/rest/api/v2010/docs/ListRecordingResponse.md b/twilio/rest/api/v2010/docs/ListRecordingResponse.md index 011f2d349..a201efdb1 100644 --- a/twilio/rest/api/v2010/docs/ListRecordingResponse.md +++ b/twilio/rest/api/v2010/docs/ListRecordingResponse.md @@ -1,17 +1,17 @@ # ListRecordingResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**End** | **int32** | [optional] -**FirstPageUri** | **string** | [optional] -**NextPageUri** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUri** | **string** | [optional] -**Recordings** | [**[]ApiV2010AccountRecording**](api.v2010.account.recording.md) | [optional] -**Start** | **int32** | [optional] -**Uri** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | **int32** | |[optional] +**FirstPageUri** | **string** | |[optional] +**NextPageUri** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUri** | **string** | |[optional] +**Recordings** | [**[]ApiV2010AccountRecording**](api.v2010.account.recording.md) | |[optional] +**Start** | **int32** | |[optional] +**Uri** | **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/twilio/rest/api/v2010/docs/ListRecordingTranscriptionResponse.md b/twilio/rest/api/v2010/docs/ListRecordingTranscriptionResponse.md index a26f2db08..698bf0301 100644 --- a/twilio/rest/api/v2010/docs/ListRecordingTranscriptionResponse.md +++ b/twilio/rest/api/v2010/docs/ListRecordingTranscriptionResponse.md @@ -1,17 +1,17 @@ # ListRecordingTranscriptionResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**End** | **int32** | [optional] -**FirstPageUri** | **string** | [optional] -**NextPageUri** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUri** | **string** | [optional] -**Start** | **int32** | [optional] -**Transcriptions** | [**[]ApiV2010AccountRecordingRecordingTranscription**](api.v2010.account.recording.recording_transcription.md) | [optional] -**Uri** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | **int32** | |[optional] +**FirstPageUri** | **string** | |[optional] +**NextPageUri** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUri** | **string** | |[optional] +**Start** | **int32** | |[optional] +**Transcriptions** | [**[]ApiV2010AccountRecordingRecordingTranscription**](api.v2010.account.recording.recording_transcription.md) | |[optional] +**Uri** | **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/twilio/rest/api/v2010/docs/ListShortCodeResponse.md b/twilio/rest/api/v2010/docs/ListShortCodeResponse.md index 54dc02ce2..05764bb56 100644 --- a/twilio/rest/api/v2010/docs/ListShortCodeResponse.md +++ b/twilio/rest/api/v2010/docs/ListShortCodeResponse.md @@ -1,17 +1,17 @@ # ListShortCodeResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**End** | **int32** | [optional] -**FirstPageUri** | **string** | [optional] -**NextPageUri** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUri** | **string** | [optional] -**ShortCodes** | [**[]ApiV2010AccountShortCode**](api.v2010.account.short_code.md) | [optional] -**Start** | **int32** | [optional] -**Uri** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | **int32** | |[optional] +**FirstPageUri** | **string** | |[optional] +**NextPageUri** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUri** | **string** | |[optional] +**ShortCodes** | [**[]ApiV2010AccountShortCode**](api.v2010.account.short_code.md) | |[optional] +**Start** | **int32** | |[optional] +**Uri** | **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/twilio/rest/api/v2010/docs/ListSigningKeyResponse.md b/twilio/rest/api/v2010/docs/ListSigningKeyResponse.md index 7849512c9..3e14e0c25 100644 --- a/twilio/rest/api/v2010/docs/ListSigningKeyResponse.md +++ b/twilio/rest/api/v2010/docs/ListSigningKeyResponse.md @@ -1,17 +1,17 @@ # ListSigningKeyResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**End** | **int32** | [optional] -**FirstPageUri** | **string** | [optional] -**NextPageUri** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUri** | **string** | [optional] -**SigningKeys** | [**[]ApiV2010AccountSigningKey**](api.v2010.account.signing_key.md) | [optional] -**Start** | **int32** | [optional] -**Uri** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | **int32** | |[optional] +**FirstPageUri** | **string** | |[optional] +**NextPageUri** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUri** | **string** | |[optional] +**SigningKeys** | [**[]ApiV2010AccountSigningKey**](api.v2010.account.signing_key.md) | |[optional] +**Start** | **int32** | |[optional] +**Uri** | **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/twilio/rest/api/v2010/docs/ListSipAuthCallsCredentialListMappingResponse.md b/twilio/rest/api/v2010/docs/ListSipAuthCallsCredentialListMappingResponse.md index b76a80d33..45cd83068 100644 --- a/twilio/rest/api/v2010/docs/ListSipAuthCallsCredentialListMappingResponse.md +++ b/twilio/rest/api/v2010/docs/ListSipAuthCallsCredentialListMappingResponse.md @@ -1,17 +1,17 @@ # ListSipAuthCallsCredentialListMappingResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Contents** | [**[]ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsCredentialListMapping**](api.v2010.account.sip.sip_domain.sip_auth.sip_auth_calls.sip_auth_calls_credential_list_mapping.md) | [optional] -**End** | **int32** | [optional] -**FirstPageUri** | **string** | [optional] -**NextPageUri** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUri** | **string** | [optional] -**Start** | **int32** | [optional] -**Uri** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Contents** | [**[]ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsCredentialListMapping**](api.v2010.account.sip.sip_domain.sip_auth.sip_auth_calls.sip_auth_calls_credential_list_mapping.md) | |[optional] +**End** | **int32** | |[optional] +**FirstPageUri** | **string** | |[optional] +**NextPageUri** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUri** | **string** | |[optional] +**Start** | **int32** | |[optional] +**Uri** | **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/twilio/rest/api/v2010/docs/ListSipAuthCallsIpAccessControlListMappingResponse.md b/twilio/rest/api/v2010/docs/ListSipAuthCallsIpAccessControlListMappingResponse.md index 03da9fdcd..493dce977 100644 --- a/twilio/rest/api/v2010/docs/ListSipAuthCallsIpAccessControlListMappingResponse.md +++ b/twilio/rest/api/v2010/docs/ListSipAuthCallsIpAccessControlListMappingResponse.md @@ -1,17 +1,17 @@ # ListSipAuthCallsIpAccessControlListMappingResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Contents** | [**[]ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsIpAccessControlListMapping**](api.v2010.account.sip.sip_domain.sip_auth.sip_auth_calls.sip_auth_calls_ip_access_control_list_mapping.md) | [optional] -**End** | **int32** | [optional] -**FirstPageUri** | **string** | [optional] -**NextPageUri** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUri** | **string** | [optional] -**Start** | **int32** | [optional] -**Uri** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Contents** | [**[]ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsIpAccessControlListMapping**](api.v2010.account.sip.sip_domain.sip_auth.sip_auth_calls.sip_auth_calls_ip_access_control_list_mapping.md) | |[optional] +**End** | **int32** | |[optional] +**FirstPageUri** | **string** | |[optional] +**NextPageUri** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUri** | **string** | |[optional] +**Start** | **int32** | |[optional] +**Uri** | **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/twilio/rest/api/v2010/docs/ListSipAuthRegistrationsCredentialListMappingResponse.md b/twilio/rest/api/v2010/docs/ListSipAuthRegistrationsCredentialListMappingResponse.md index dd94f526e..a2b8617a7 100644 --- a/twilio/rest/api/v2010/docs/ListSipAuthRegistrationsCredentialListMappingResponse.md +++ b/twilio/rest/api/v2010/docs/ListSipAuthRegistrationsCredentialListMappingResponse.md @@ -1,17 +1,17 @@ # ListSipAuthRegistrationsCredentialListMappingResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Contents** | [**[]ApiV2010AccountSipSipDomainSipAuthSipAuthRegistrationsSipAuthRegistrationsCredentialListMapping**](api.v2010.account.sip.sip_domain.sip_auth.sip_auth_registrations.sip_auth_registrations_credential_list_mapping.md) | [optional] -**End** | **int32** | [optional] -**FirstPageUri** | **string** | [optional] -**NextPageUri** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUri** | **string** | [optional] -**Start** | **int32** | [optional] -**Uri** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Contents** | [**[]ApiV2010AccountSipSipDomainSipAuthSipAuthRegistrationsSipAuthRegistrationsCredentialListMapping**](api.v2010.account.sip.sip_domain.sip_auth.sip_auth_registrations.sip_auth_registrations_credential_list_mapping.md) | |[optional] +**End** | **int32** | |[optional] +**FirstPageUri** | **string** | |[optional] +**NextPageUri** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUri** | **string** | |[optional] +**Start** | **int32** | |[optional] +**Uri** | **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/twilio/rest/api/v2010/docs/ListSipCredentialListMappingResponse.md b/twilio/rest/api/v2010/docs/ListSipCredentialListMappingResponse.md index 2207c3fa5..97b7225ab 100644 --- a/twilio/rest/api/v2010/docs/ListSipCredentialListMappingResponse.md +++ b/twilio/rest/api/v2010/docs/ListSipCredentialListMappingResponse.md @@ -1,17 +1,17 @@ # ListSipCredentialListMappingResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**CredentialListMappings** | [**[]ApiV2010AccountSipSipDomainSipCredentialListMapping**](api.v2010.account.sip.sip_domain.sip_credential_list_mapping.md) | [optional] -**End** | **int32** | [optional] -**FirstPageUri** | **string** | [optional] -**NextPageUri** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUri** | **string** | [optional] -**Start** | **int32** | [optional] -**Uri** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CredentialListMappings** | [**[]ApiV2010AccountSipSipDomainSipCredentialListMapping**](api.v2010.account.sip.sip_domain.sip_credential_list_mapping.md) | |[optional] +**End** | **int32** | |[optional] +**FirstPageUri** | **string** | |[optional] +**NextPageUri** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUri** | **string** | |[optional] +**Start** | **int32** | |[optional] +**Uri** | **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/twilio/rest/api/v2010/docs/ListSipCredentialListResponse.md b/twilio/rest/api/v2010/docs/ListSipCredentialListResponse.md index 415a9da31..6787b8d88 100644 --- a/twilio/rest/api/v2010/docs/ListSipCredentialListResponse.md +++ b/twilio/rest/api/v2010/docs/ListSipCredentialListResponse.md @@ -1,17 +1,17 @@ # ListSipCredentialListResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**CredentialLists** | [**[]ApiV2010AccountSipSipCredentialList**](api.v2010.account.sip.sip_credential_list.md) | [optional] -**End** | **int32** | [optional] -**FirstPageUri** | **string** | [optional] -**NextPageUri** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUri** | **string** | [optional] -**Start** | **int32** | [optional] -**Uri** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CredentialLists** | [**[]ApiV2010AccountSipSipCredentialList**](api.v2010.account.sip.sip_credential_list.md) | |[optional] +**End** | **int32** | |[optional] +**FirstPageUri** | **string** | |[optional] +**NextPageUri** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUri** | **string** | |[optional] +**Start** | **int32** | |[optional] +**Uri** | **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/twilio/rest/api/v2010/docs/ListSipCredentialResponse.md b/twilio/rest/api/v2010/docs/ListSipCredentialResponse.md index 6a8b695b5..fbdf760b3 100644 --- a/twilio/rest/api/v2010/docs/ListSipCredentialResponse.md +++ b/twilio/rest/api/v2010/docs/ListSipCredentialResponse.md @@ -1,17 +1,17 @@ # ListSipCredentialResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Credentials** | [**[]ApiV2010AccountSipSipCredentialListSipCredential**](api.v2010.account.sip.sip_credential_list.sip_credential.md) | [optional] -**End** | **int32** | [optional] -**FirstPageUri** | **string** | [optional] -**NextPageUri** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUri** | **string** | [optional] -**Start** | **int32** | [optional] -**Uri** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Credentials** | [**[]ApiV2010AccountSipSipCredentialListSipCredential**](api.v2010.account.sip.sip_credential_list.sip_credential.md) | |[optional] +**End** | **int32** | |[optional] +**FirstPageUri** | **string** | |[optional] +**NextPageUri** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUri** | **string** | |[optional] +**Start** | **int32** | |[optional] +**Uri** | **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/twilio/rest/api/v2010/docs/ListSipDomainResponse.md b/twilio/rest/api/v2010/docs/ListSipDomainResponse.md index 3aad98f56..b6d5dcd5f 100644 --- a/twilio/rest/api/v2010/docs/ListSipDomainResponse.md +++ b/twilio/rest/api/v2010/docs/ListSipDomainResponse.md @@ -1,17 +1,17 @@ # ListSipDomainResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Domains** | [**[]ApiV2010AccountSipSipDomain**](api.v2010.account.sip.sip_domain.md) | [optional] -**End** | **int32** | [optional] -**FirstPageUri** | **string** | [optional] -**NextPageUri** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUri** | **string** | [optional] -**Start** | **int32** | [optional] -**Uri** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Domains** | [**[]ApiV2010AccountSipSipDomain**](api.v2010.account.sip.sip_domain.md) | |[optional] +**End** | **int32** | |[optional] +**FirstPageUri** | **string** | |[optional] +**NextPageUri** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUri** | **string** | |[optional] +**Start** | **int32** | |[optional] +**Uri** | **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/twilio/rest/api/v2010/docs/ListSipIpAccessControlListMappingResponse.md b/twilio/rest/api/v2010/docs/ListSipIpAccessControlListMappingResponse.md index d5a26508c..236320e5b 100644 --- a/twilio/rest/api/v2010/docs/ListSipIpAccessControlListMappingResponse.md +++ b/twilio/rest/api/v2010/docs/ListSipIpAccessControlListMappingResponse.md @@ -1,17 +1,17 @@ # ListSipIpAccessControlListMappingResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**End** | **int32** | [optional] -**FirstPageUri** | **string** | [optional] -**IpAccessControlListMappings** | [**[]ApiV2010AccountSipSipDomainSipIpAccessControlListMapping**](api.v2010.account.sip.sip_domain.sip_ip_access_control_list_mapping.md) | [optional] -**NextPageUri** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUri** | **string** | [optional] -**Start** | **int32** | [optional] -**Uri** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | **int32** | |[optional] +**FirstPageUri** | **string** | |[optional] +**IpAccessControlListMappings** | [**[]ApiV2010AccountSipSipDomainSipIpAccessControlListMapping**](api.v2010.account.sip.sip_domain.sip_ip_access_control_list_mapping.md) | |[optional] +**NextPageUri** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUri** | **string** | |[optional] +**Start** | **int32** | |[optional] +**Uri** | **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/twilio/rest/api/v2010/docs/ListSipIpAccessControlListResponse.md b/twilio/rest/api/v2010/docs/ListSipIpAccessControlListResponse.md index 90a36269b..e3fe2ee3b 100644 --- a/twilio/rest/api/v2010/docs/ListSipIpAccessControlListResponse.md +++ b/twilio/rest/api/v2010/docs/ListSipIpAccessControlListResponse.md @@ -1,17 +1,17 @@ # ListSipIpAccessControlListResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**End** | **int32** | [optional] -**FirstPageUri** | **string** | [optional] -**IpAccessControlLists** | [**[]ApiV2010AccountSipSipIpAccessControlList**](api.v2010.account.sip.sip_ip_access_control_list.md) | [optional] -**NextPageUri** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUri** | **string** | [optional] -**Start** | **int32** | [optional] -**Uri** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | **int32** | |[optional] +**FirstPageUri** | **string** | |[optional] +**IpAccessControlLists** | [**[]ApiV2010AccountSipSipIpAccessControlList**](api.v2010.account.sip.sip_ip_access_control_list.md) | |[optional] +**NextPageUri** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUri** | **string** | |[optional] +**Start** | **int32** | |[optional] +**Uri** | **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/twilio/rest/api/v2010/docs/ListSipIpAddressResponse.md b/twilio/rest/api/v2010/docs/ListSipIpAddressResponse.md index 09b7381b7..4f589fef8 100644 --- a/twilio/rest/api/v2010/docs/ListSipIpAddressResponse.md +++ b/twilio/rest/api/v2010/docs/ListSipIpAddressResponse.md @@ -1,17 +1,17 @@ # ListSipIpAddressResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**End** | **int32** | [optional] -**FirstPageUri** | **string** | [optional] -**IpAddresses** | [**[]ApiV2010AccountSipSipIpAccessControlListSipIpAddress**](api.v2010.account.sip.sip_ip_access_control_list.sip_ip_address.md) | [optional] -**NextPageUri** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUri** | **string** | [optional] -**Start** | **int32** | [optional] -**Uri** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | **int32** | |[optional] +**FirstPageUri** | **string** | |[optional] +**IpAddresses** | [**[]ApiV2010AccountSipSipIpAccessControlListSipIpAddress**](api.v2010.account.sip.sip_ip_access_control_list.sip_ip_address.md) | |[optional] +**NextPageUri** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUri** | **string** | |[optional] +**Start** | **int32** | |[optional] +**Uri** | **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/twilio/rest/api/v2010/docs/ListTranscriptionResponse.md b/twilio/rest/api/v2010/docs/ListTranscriptionResponse.md index e8f989952..e7bea2a10 100644 --- a/twilio/rest/api/v2010/docs/ListTranscriptionResponse.md +++ b/twilio/rest/api/v2010/docs/ListTranscriptionResponse.md @@ -1,17 +1,17 @@ # ListTranscriptionResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**End** | **int32** | [optional] -**FirstPageUri** | **string** | [optional] -**NextPageUri** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUri** | **string** | [optional] -**Start** | **int32** | [optional] -**Transcriptions** | [**[]ApiV2010AccountTranscription**](api.v2010.account.transcription.md) | [optional] -**Uri** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | **int32** | |[optional] +**FirstPageUri** | **string** | |[optional] +**NextPageUri** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUri** | **string** | |[optional] +**Start** | **int32** | |[optional] +**Transcriptions** | [**[]ApiV2010AccountTranscription**](api.v2010.account.transcription.md) | |[optional] +**Uri** | **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/twilio/rest/api/v2010/docs/ListUsageRecordAllTimeResponse.md b/twilio/rest/api/v2010/docs/ListUsageRecordAllTimeResponse.md index 5967749ed..a659f0bca 100644 --- a/twilio/rest/api/v2010/docs/ListUsageRecordAllTimeResponse.md +++ b/twilio/rest/api/v2010/docs/ListUsageRecordAllTimeResponse.md @@ -1,17 +1,17 @@ # ListUsageRecordAllTimeResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**End** | **int32** | [optional] -**FirstPageUri** | **string** | [optional] -**NextPageUri** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUri** | **string** | [optional] -**Start** | **int32** | [optional] -**Uri** | **string** | [optional] -**UsageRecords** | [**[]ApiV2010AccountUsageUsageRecordUsageRecordAllTime**](api.v2010.account.usage.usage_record.usage_record_all_time.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | **int32** | |[optional] +**FirstPageUri** | **string** | |[optional] +**NextPageUri** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUri** | **string** | |[optional] +**Start** | **int32** | |[optional] +**Uri** | **string** | |[optional] +**UsageRecords** | [**[]ApiV2010AccountUsageUsageRecordUsageRecordAllTime**](api.v2010.account.usage.usage_record.usage_record_all_time.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ListUsageRecordDailyResponse.md b/twilio/rest/api/v2010/docs/ListUsageRecordDailyResponse.md index 4a242c8ad..888ed4c64 100644 --- a/twilio/rest/api/v2010/docs/ListUsageRecordDailyResponse.md +++ b/twilio/rest/api/v2010/docs/ListUsageRecordDailyResponse.md @@ -1,17 +1,17 @@ # ListUsageRecordDailyResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**End** | **int32** | [optional] -**FirstPageUri** | **string** | [optional] -**NextPageUri** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUri** | **string** | [optional] -**Start** | **int32** | [optional] -**Uri** | **string** | [optional] -**UsageRecords** | [**[]ApiV2010AccountUsageUsageRecordUsageRecordDaily**](api.v2010.account.usage.usage_record.usage_record_daily.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | **int32** | |[optional] +**FirstPageUri** | **string** | |[optional] +**NextPageUri** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUri** | **string** | |[optional] +**Start** | **int32** | |[optional] +**Uri** | **string** | |[optional] +**UsageRecords** | [**[]ApiV2010AccountUsageUsageRecordUsageRecordDaily**](api.v2010.account.usage.usage_record.usage_record_daily.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ListUsageRecordLastMonthResponse.md b/twilio/rest/api/v2010/docs/ListUsageRecordLastMonthResponse.md index f8e9a1455..c9038389f 100644 --- a/twilio/rest/api/v2010/docs/ListUsageRecordLastMonthResponse.md +++ b/twilio/rest/api/v2010/docs/ListUsageRecordLastMonthResponse.md @@ -1,17 +1,17 @@ # ListUsageRecordLastMonthResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**End** | **int32** | [optional] -**FirstPageUri** | **string** | [optional] -**NextPageUri** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUri** | **string** | [optional] -**Start** | **int32** | [optional] -**Uri** | **string** | [optional] -**UsageRecords** | [**[]ApiV2010AccountUsageUsageRecordUsageRecordLastMonth**](api.v2010.account.usage.usage_record.usage_record_last_month.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | **int32** | |[optional] +**FirstPageUri** | **string** | |[optional] +**NextPageUri** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUri** | **string** | |[optional] +**Start** | **int32** | |[optional] +**Uri** | **string** | |[optional] +**UsageRecords** | [**[]ApiV2010AccountUsageUsageRecordUsageRecordLastMonth**](api.v2010.account.usage.usage_record.usage_record_last_month.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ListUsageRecordMonthlyResponse.md b/twilio/rest/api/v2010/docs/ListUsageRecordMonthlyResponse.md index 3b9439d15..ef0e4f231 100644 --- a/twilio/rest/api/v2010/docs/ListUsageRecordMonthlyResponse.md +++ b/twilio/rest/api/v2010/docs/ListUsageRecordMonthlyResponse.md @@ -1,17 +1,17 @@ # ListUsageRecordMonthlyResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**End** | **int32** | [optional] -**FirstPageUri** | **string** | [optional] -**NextPageUri** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUri** | **string** | [optional] -**Start** | **int32** | [optional] -**Uri** | **string** | [optional] -**UsageRecords** | [**[]ApiV2010AccountUsageUsageRecordUsageRecordMonthly**](api.v2010.account.usage.usage_record.usage_record_monthly.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | **int32** | |[optional] +**FirstPageUri** | **string** | |[optional] +**NextPageUri** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUri** | **string** | |[optional] +**Start** | **int32** | |[optional] +**Uri** | **string** | |[optional] +**UsageRecords** | [**[]ApiV2010AccountUsageUsageRecordUsageRecordMonthly**](api.v2010.account.usage.usage_record.usage_record_monthly.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ListUsageRecordResponse.md b/twilio/rest/api/v2010/docs/ListUsageRecordResponse.md index 2f67f562e..62499b8e9 100644 --- a/twilio/rest/api/v2010/docs/ListUsageRecordResponse.md +++ b/twilio/rest/api/v2010/docs/ListUsageRecordResponse.md @@ -1,17 +1,17 @@ # ListUsageRecordResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**End** | **int32** | [optional] -**FirstPageUri** | **string** | [optional] -**NextPageUri** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUri** | **string** | [optional] -**Start** | **int32** | [optional] -**Uri** | **string** | [optional] -**UsageRecords** | [**[]ApiV2010AccountUsageUsageRecord**](api.v2010.account.usage.usage_record.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | **int32** | |[optional] +**FirstPageUri** | **string** | |[optional] +**NextPageUri** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUri** | **string** | |[optional] +**Start** | **int32** | |[optional] +**Uri** | **string** | |[optional] +**UsageRecords** | [**[]ApiV2010AccountUsageUsageRecord**](api.v2010.account.usage.usage_record.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ListUsageRecordThisMonthResponse.md b/twilio/rest/api/v2010/docs/ListUsageRecordThisMonthResponse.md index 590cce0e3..0fc6a7883 100644 --- a/twilio/rest/api/v2010/docs/ListUsageRecordThisMonthResponse.md +++ b/twilio/rest/api/v2010/docs/ListUsageRecordThisMonthResponse.md @@ -1,17 +1,17 @@ # ListUsageRecordThisMonthResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**End** | **int32** | [optional] -**FirstPageUri** | **string** | [optional] -**NextPageUri** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUri** | **string** | [optional] -**Start** | **int32** | [optional] -**Uri** | **string** | [optional] -**UsageRecords** | [**[]ApiV2010AccountUsageUsageRecordUsageRecordThisMonth**](api.v2010.account.usage.usage_record.usage_record_this_month.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | **int32** | |[optional] +**FirstPageUri** | **string** | |[optional] +**NextPageUri** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUri** | **string** | |[optional] +**Start** | **int32** | |[optional] +**Uri** | **string** | |[optional] +**UsageRecords** | [**[]ApiV2010AccountUsageUsageRecordUsageRecordThisMonth**](api.v2010.account.usage.usage_record.usage_record_this_month.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ListUsageRecordTodayResponse.md b/twilio/rest/api/v2010/docs/ListUsageRecordTodayResponse.md index 283a87b63..fc68b338d 100644 --- a/twilio/rest/api/v2010/docs/ListUsageRecordTodayResponse.md +++ b/twilio/rest/api/v2010/docs/ListUsageRecordTodayResponse.md @@ -1,17 +1,17 @@ # ListUsageRecordTodayResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**End** | **int32** | [optional] -**FirstPageUri** | **string** | [optional] -**NextPageUri** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUri** | **string** | [optional] -**Start** | **int32** | [optional] -**Uri** | **string** | [optional] -**UsageRecords** | [**[]ApiV2010AccountUsageUsageRecordUsageRecordToday**](api.v2010.account.usage.usage_record.usage_record_today.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | **int32** | |[optional] +**FirstPageUri** | **string** | |[optional] +**NextPageUri** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUri** | **string** | |[optional] +**Start** | **int32** | |[optional] +**Uri** | **string** | |[optional] +**UsageRecords** | [**[]ApiV2010AccountUsageUsageRecordUsageRecordToday**](api.v2010.account.usage.usage_record.usage_record_today.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ListUsageRecordYearlyResponse.md b/twilio/rest/api/v2010/docs/ListUsageRecordYearlyResponse.md index c01f314f8..f1eb2f732 100644 --- a/twilio/rest/api/v2010/docs/ListUsageRecordYearlyResponse.md +++ b/twilio/rest/api/v2010/docs/ListUsageRecordYearlyResponse.md @@ -1,17 +1,17 @@ # ListUsageRecordYearlyResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**End** | **int32** | [optional] -**FirstPageUri** | **string** | [optional] -**NextPageUri** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUri** | **string** | [optional] -**Start** | **int32** | [optional] -**Uri** | **string** | [optional] -**UsageRecords** | [**[]ApiV2010AccountUsageUsageRecordUsageRecordYearly**](api.v2010.account.usage.usage_record.usage_record_yearly.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | **int32** | |[optional] +**FirstPageUri** | **string** | |[optional] +**NextPageUri** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUri** | **string** | |[optional] +**Start** | **int32** | |[optional] +**Uri** | **string** | |[optional] +**UsageRecords** | [**[]ApiV2010AccountUsageUsageRecordUsageRecordYearly**](api.v2010.account.usage.usage_record.usage_record_yearly.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ListUsageRecordYesterdayResponse.md b/twilio/rest/api/v2010/docs/ListUsageRecordYesterdayResponse.md index e1c628177..82e921192 100644 --- a/twilio/rest/api/v2010/docs/ListUsageRecordYesterdayResponse.md +++ b/twilio/rest/api/v2010/docs/ListUsageRecordYesterdayResponse.md @@ -1,17 +1,17 @@ # ListUsageRecordYesterdayResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**End** | **int32** | [optional] -**FirstPageUri** | **string** | [optional] -**NextPageUri** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUri** | **string** | [optional] -**Start** | **int32** | [optional] -**Uri** | **string** | [optional] -**UsageRecords** | [**[]ApiV2010AccountUsageUsageRecordUsageRecordYesterday**](api.v2010.account.usage.usage_record.usage_record_yesterday.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | **int32** | |[optional] +**FirstPageUri** | **string** | |[optional] +**NextPageUri** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUri** | **string** | |[optional] +**Start** | **int32** | |[optional] +**Uri** | **string** | |[optional] +**UsageRecords** | [**[]ApiV2010AccountUsageUsageRecordUsageRecordYesterday**](api.v2010.account.usage.usage_record.usage_record_yesterday.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/docs/ListUsageTriggerResponse.md b/twilio/rest/api/v2010/docs/ListUsageTriggerResponse.md index 99a78b526..433100c26 100644 --- a/twilio/rest/api/v2010/docs/ListUsageTriggerResponse.md +++ b/twilio/rest/api/v2010/docs/ListUsageTriggerResponse.md @@ -1,17 +1,17 @@ # ListUsageTriggerResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**End** | **int32** | [optional] -**FirstPageUri** | **string** | [optional] -**NextPageUri** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUri** | **string** | [optional] -**Start** | **int32** | [optional] -**Uri** | **string** | [optional] -**UsageTriggers** | [**[]ApiV2010AccountUsageUsageTrigger**](api.v2010.account.usage.usage_trigger.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | **int32** | |[optional] +**FirstPageUri** | **string** | |[optional] +**NextPageUri** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUri** | **string** | |[optional] +**Start** | **int32** | |[optional] +**Uri** | **string** | |[optional] +**UsageTriggers** | [**[]ApiV2010AccountUsageUsageTrigger**](api.v2010.account.usage.usage_trigger.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/api/v2010/model_api_v2010_account.go b/twilio/rest/api/v2010/model_api_v2010_account.go index 03e449b97..16fa4e3bd 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account.go +++ b/twilio/rest/api/v2010/model_api_v2010_account.go @@ -13,14 +13,24 @@ package openapi // ApiV2010Account struct for ApiV2010Account type ApiV2010Account struct { - AuthToken *string `json:"AuthToken,omitempty"` - DateCreated *string `json:"DateCreated,omitempty"` - DateUpdated *string `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - OwnerAccountSid *string `json:"OwnerAccountSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Status *AccountStatus `json:"Status,omitempty"` + // The authorization token for this account + AuthToken *string `json:"AuthToken,omitempty"` + // The date this account was created + DateCreated *string `json:"DateCreated,omitempty"` + // The date this account was last updated + DateUpdated *string `json:"DateUpdated,omitempty"` + // A human readable description of this account + FriendlyName *string `json:"FriendlyName,omitempty"` + // The unique 34 character id representing the parent of this account + OwnerAccountSid *string `json:"OwnerAccountSid,omitempty"` + // A 34 character string that uniquely identifies this resource. + Sid *string `json:"Sid,omitempty"` + // The status of this account + Status *string `json:"Status,omitempty"` + // Account Instance Subresources SubresourceUris *map[string]interface{} `json:"SubresourceUris,omitempty"` - Type *AccountType `json:"Type,omitempty"` - Uri *string `json:"Uri,omitempty"` + // The type of this account + Type *string `json:"Type,omitempty"` + // The URI for this resource, relative to `https://api.twilio.com` + Uri *string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_address.go b/twilio/rest/api/v2010/model_api_v2010_account_address.go index 06216659b..64f55887a 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_address.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_address.go @@ -13,19 +13,34 @@ package openapi // ApiV2010AccountAddress struct for ApiV2010AccountAddress type ApiV2010AccountAddress struct { - AccountSid *string `json:"AccountSid,omitempty"` - City *string `json:"City,omitempty"` - CustomerName *string `json:"CustomerName,omitempty"` - DateCreated *string `json:"DateCreated,omitempty"` - DateUpdated *string `json:"DateUpdated,omitempty"` - EmergencyEnabled *bool `json:"EmergencyEnabled,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - IsoCountry *string `json:"IsoCountry,omitempty"` - PostalCode *string `json:"PostalCode,omitempty"` - Region *string `json:"Region,omitempty"` - Sid *string `json:"Sid,omitempty"` - Street *string `json:"Street,omitempty"` - Uri *string `json:"Uri,omitempty"` - Validated *bool `json:"Validated,omitempty"` - Verified *bool `json:"Verified,omitempty"` + // The SID of the Account that is responsible for the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The city in which the address is located + City *string `json:"City,omitempty"` + // The name associated with the address + CustomerName *string `json:"CustomerName,omitempty"` + // The RFC 2822 date and time in GMT that the resource was created + DateCreated *string `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT that the resource was last updated + DateUpdated *string `json:"DateUpdated,omitempty"` + // Whether emergency calling has been enabled on this number + EmergencyEnabled *bool `json:"EmergencyEnabled,omitempty"` + // The string that you assigned to describe the resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // The ISO country code of the address + IsoCountry *string `json:"IsoCountry,omitempty"` + // The postal code of the address + PostalCode *string `json:"PostalCode,omitempty"` + // The state or region of the address + Region *string `json:"Region,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The number and street address of the address + Street *string `json:"Street,omitempty"` + // The URI of the resource, relative to `https://api.twilio.com` + Uri *string `json:"Uri,omitempty"` + // Whether the address has been validated to comply with local regulation + Validated *bool `json:"Validated,omitempty"` + // Whether the address has been verified to comply with regulation + Verified *bool `json:"Verified,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_address_dependent_phone_number.go b/twilio/rest/api/v2010/model_api_v2010_account_address_dependent_phone_number.go index c0b58d626..a87291f87 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_address_dependent_phone_number.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_address_dependent_phone_number.go @@ -13,30 +13,56 @@ package openapi // ApiV2010AccountAddressDependentPhoneNumber struct for ApiV2010AccountAddressDependentPhoneNumber type ApiV2010AccountAddressDependentPhoneNumber struct { - AccountSid *string `json:"AccountSid,omitempty"` - AddressRequirements *DependentPhoneNumberAddressRequirement `json:"AddressRequirements,omitempty"` - ApiVersion *string `json:"ApiVersion,omitempty"` - Capabilities *map[string]interface{} `json:"Capabilities,omitempty"` - DateCreated *string `json:"DateCreated,omitempty"` - DateUpdated *string `json:"DateUpdated,omitempty"` - EmergencyAddressSid *string `json:"EmergencyAddressSid,omitempty"` - EmergencyStatus *DependentPhoneNumberEmergencyStatus `json:"EmergencyStatus,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - PhoneNumber *string `json:"PhoneNumber,omitempty"` - Sid *string `json:"Sid,omitempty"` - SmsApplicationSid *string `json:"SmsApplicationSid,omitempty"` - SmsFallbackMethod *HttpMethod `json:"SmsFallbackMethod,omitempty"` - SmsFallbackUrl *string `json:"SmsFallbackUrl,omitempty"` - SmsMethod *HttpMethod `json:"SmsMethod,omitempty"` - SmsUrl *string `json:"SmsUrl,omitempty"` - StatusCallback *string `json:"StatusCallback,omitempty"` - StatusCallbackMethod *HttpMethod `json:"StatusCallbackMethod,omitempty"` - TrunkSid *string `json:"TrunkSid,omitempty"` - Uri *string `json:"Uri,omitempty"` - VoiceApplicationSid *string `json:"VoiceApplicationSid,omitempty"` - VoiceCallerIdLookup *bool `json:"VoiceCallerIdLookup,omitempty"` - VoiceFallbackMethod *HttpMethod `json:"VoiceFallbackMethod,omitempty"` - VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` - VoiceMethod *HttpMethod `json:"VoiceMethod,omitempty"` - VoiceUrl *string `json:"VoiceUrl,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // Whether the phone number requires an Address registered with Twilio + AddressRequirements *string `json:"AddressRequirements,omitempty"` + // The API version used to start a new TwiML session + ApiVersion *string `json:"ApiVersion,omitempty"` + // Indicate if a phone can receive calls or messages + Capabilities *map[string]interface{} `json:"Capabilities,omitempty"` + // The RFC 2822 date and time in GMT that the resource was created + DateCreated *string `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT that the resource was last updated + DateUpdated *string `json:"DateUpdated,omitempty"` + // The emergency address configuration to use for emergency calling + EmergencyAddressSid *string `json:"EmergencyAddressSid,omitempty"` + // Whether the phone number is enabled for emergency calling + EmergencyStatus *string `json:"EmergencyStatus,omitempty"` + // The string that you assigned to describe the resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // The phone number in E.164 format + PhoneNumber *string `json:"PhoneNumber,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The SID of the application that handles SMS messages sent to the phone number + SmsApplicationSid *string `json:"SmsApplicationSid,omitempty"` + // The HTTP method used with sms_fallback_url + SmsFallbackMethod *string `json:"SmsFallbackMethod,omitempty"` + // The URL that we call when an error occurs while retrieving or executing the TwiML + SmsFallbackUrl *string `json:"SmsFallbackUrl,omitempty"` + // The HTTP method to use with sms_url + SmsMethod *string `json:"SmsMethod,omitempty"` + // The URL we call when the phone number receives an incoming SMS message + SmsUrl *string `json:"SmsUrl,omitempty"` + // The URL to send status information to your application + StatusCallback *string `json:"StatusCallback,omitempty"` + // The HTTP method we use to call status_callback + StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` + // The SID of the Trunk that handles calls to the phone number + TrunkSid *string `json:"TrunkSid,omitempty"` + // The URI of the resource, relative to `https://api.twilio.com` + Uri *string `json:"Uri,omitempty"` + // The SID of the application that handles calls to the phone number + VoiceApplicationSid *string `json:"VoiceApplicationSid,omitempty"` + // Whether to lookup the caller's name + VoiceCallerIdLookup *bool `json:"VoiceCallerIdLookup,omitempty"` + // The HTTP method used with voice_fallback_url + VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"` + // The URL we call when an error occurs in TwiML + VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` + // The HTTP method used with the voice_url + VoiceMethod *string `json:"VoiceMethod,omitempty"` + // The URL we call when the phone number receives a call + VoiceUrl *string `json:"VoiceUrl,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_application.go b/twilio/rest/api/v2010/model_api_v2010_account_application.go index 904cea2ab..b9d5d709a 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_application.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_application.go @@ -13,24 +13,44 @@ package openapi // ApiV2010AccountApplication struct for ApiV2010AccountApplication type ApiV2010AccountApplication struct { - AccountSid *string `json:"AccountSid,omitempty"` - ApiVersion *string `json:"ApiVersion,omitempty"` - DateCreated *string `json:"DateCreated,omitempty"` - DateUpdated *string `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - MessageStatusCallback *string `json:"MessageStatusCallback,omitempty"` - Sid *string `json:"Sid,omitempty"` - SmsFallbackMethod *HttpMethod `json:"SmsFallbackMethod,omitempty"` - SmsFallbackUrl *string `json:"SmsFallbackUrl,omitempty"` - SmsMethod *HttpMethod `json:"SmsMethod,omitempty"` - SmsStatusCallback *string `json:"SmsStatusCallback,omitempty"` - SmsUrl *string `json:"SmsUrl,omitempty"` - StatusCallback *string `json:"StatusCallback,omitempty"` - StatusCallbackMethod *HttpMethod `json:"StatusCallbackMethod,omitempty"` - Uri *string `json:"Uri,omitempty"` - VoiceCallerIdLookup *bool `json:"VoiceCallerIdLookup,omitempty"` - VoiceFallbackMethod *HttpMethod `json:"VoiceFallbackMethod,omitempty"` - VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` - VoiceMethod *HttpMethod `json:"VoiceMethod,omitempty"` - VoiceUrl *string `json:"VoiceUrl,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The API version used to start a new TwiML session + ApiVersion *string `json:"ApiVersion,omitempty"` + // The RFC 2822 date and time in GMT that the resource was created + DateCreated *string `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT that the resource was last updated + DateUpdated *string `json:"DateUpdated,omitempty"` + // The string that you assigned to describe the resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // The URL to send message status information to your application + MessageStatusCallback *string `json:"MessageStatusCallback,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The HTTP method used with sms_fallback_url + SmsFallbackMethod *string `json:"SmsFallbackMethod,omitempty"` + // The URL that we call when an error occurs while retrieving or executing the TwiML + SmsFallbackUrl *string `json:"SmsFallbackUrl,omitempty"` + // The HTTP method to use with sms_url + SmsMethod *string `json:"SmsMethod,omitempty"` + // The URL to send status information to your application + SmsStatusCallback *string `json:"SmsStatusCallback,omitempty"` + // The URL we call when the phone number receives an incoming SMS message + SmsUrl *string `json:"SmsUrl,omitempty"` + // The URL to send status information to your application + StatusCallback *string `json:"StatusCallback,omitempty"` + // The HTTP method we use to call status_callback + StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` + // The URI of the resource, relative to `https://api.twilio.com` + Uri *string `json:"Uri,omitempty"` + // Whether to lookup the caller's name + VoiceCallerIdLookup *bool `json:"VoiceCallerIdLookup,omitempty"` + // The HTTP method used with voice_fallback_url + VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"` + // The URL we call when a TwiML error occurs + VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` + // The HTTP method used with the voice_url + VoiceMethod *string `json:"VoiceMethod,omitempty"` + // The URL we call when the phone number receives a call + VoiceUrl *string `json:"VoiceUrl,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_authorized_connect_app.go b/twilio/rest/api/v2010/model_api_v2010_account_authorized_connect_app.go index aa69cbea5..65a096253 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_authorized_connect_app.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_authorized_connect_app.go @@ -13,14 +13,24 @@ package openapi // ApiV2010AccountAuthorizedConnectApp struct for ApiV2010AccountAuthorizedConnectApp type ApiV2010AccountAuthorizedConnectApp struct { - AccountSid *string `json:"AccountSid,omitempty"` - ConnectAppCompanyName *string `json:"ConnectAppCompanyName,omitempty"` - ConnectAppDescription *string `json:"ConnectAppDescription,omitempty"` - ConnectAppFriendlyName *string `json:"ConnectAppFriendlyName,omitempty"` - ConnectAppHomepageUrl *string `json:"ConnectAppHomepageUrl,omitempty"` - ConnectAppSid *string `json:"ConnectAppSid,omitempty"` - DateCreated *string `json:"DateCreated,omitempty"` - DateUpdated *string `json:"DateUpdated,omitempty"` - Permissions *[]string `json:"Permissions,omitempty"` - Uri *string `json:"Uri,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The company name set for the Connect App + ConnectAppCompanyName *string `json:"ConnectAppCompanyName,omitempty"` + // A detailed description of the app + ConnectAppDescription *string `json:"ConnectAppDescription,omitempty"` + // The name of the Connect App + ConnectAppFriendlyName *string `json:"ConnectAppFriendlyName,omitempty"` + // The public URL for the Connect App + ConnectAppHomepageUrl *string `json:"ConnectAppHomepageUrl,omitempty"` + // The SID that we assigned to the Connect App + ConnectAppSid *string `json:"ConnectAppSid,omitempty"` + // The RFC 2822 date and time in GMT that the resource was created + DateCreated *string `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT that the resource was last updated + DateUpdated *string `json:"DateUpdated,omitempty"` + // Permissions authorized to the app + Permissions *[]string `json:"Permissions,omitempty"` + // The URI of the resource, relative to `https://api.twilio.com` + Uri *string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country.go b/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country.go index cb3bf5118..f22c0d71c 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country.go @@ -13,9 +13,14 @@ package openapi // ApiV2010AccountAvailablePhoneNumberCountry struct for ApiV2010AccountAvailablePhoneNumberCountry type ApiV2010AccountAvailablePhoneNumberCountry struct { - Beta *bool `json:"Beta,omitempty"` - Country *string `json:"Country,omitempty"` - CountryCode *string `json:"CountryCode,omitempty"` + // Whether all phone numbers available in the country are new to the Twilio platform. + Beta *bool `json:"Beta,omitempty"` + // The name of the country + Country *string `json:"Country,omitempty"` + // The ISO-3166-1 country code of the country. + CountryCode *string `json:"CountryCode,omitempty"` + // A list of related resources identified by their relative URIs SubresourceUris *map[string]interface{} `json:"SubresourceUris,omitempty"` - Uri *string `json:"Uri,omitempty"` + // The URI of the Country resource, relative to `https://api.twilio.com` + Uri *string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_local.go b/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_local.go index acb76329f..2a53f8999 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_local.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_local.go @@ -13,17 +13,29 @@ package openapi // ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocal struct for ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocal type ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocal struct { - AddressRequirements *string `json:"AddressRequirements,omitempty"` - Beta *bool `json:"Beta,omitempty"` - Capabilities *PhoneNumberCapabilities `json:"Capabilities,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - IsoCountry *string `json:"IsoCountry,omitempty"` - Lata *string `json:"Lata,omitempty"` - Latitude *float32 `json:"Latitude,omitempty"` - Locality *string `json:"Locality,omitempty"` - Longitude *float32 `json:"Longitude,omitempty"` - PhoneNumber *string `json:"PhoneNumber,omitempty"` - PostalCode *string `json:"PostalCode,omitempty"` - RateCenter *string `json:"RateCenter,omitempty"` - Region *string `json:"Region,omitempty"` + // The type of Address resource the phone number requires + AddressRequirements *string `json:"AddressRequirements,omitempty"` + // Whether the phone number is new to the Twilio platform + Beta *bool `json:"Beta,omitempty"` + Capabilities *ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocalCapabilities `json:"Capabilities,omitempty"` + // A formatted version of the phone number + FriendlyName *string `json:"FriendlyName,omitempty"` + // The ISO country code of this phone number + IsoCountry *string `json:"IsoCountry,omitempty"` + // The LATA of this phone number + Lata *string `json:"Lata,omitempty"` + // The latitude of this phone number's location + Latitude *float32 `json:"Latitude,omitempty"` + // The locality or city of this phone number's location + Locality *string `json:"Locality,omitempty"` + // The longitude of this phone number's location + Longitude *float32 `json:"Longitude,omitempty"` + // The phone number in E.164 format + PhoneNumber *string `json:"PhoneNumber,omitempty"` + // The postal or ZIP code of this phone number's location + PostalCode *string `json:"PostalCode,omitempty"` + // The rate center of this phone number + RateCenter *string `json:"RateCenter,omitempty"` + // The two-letter state or province abbreviation of this phone number's location + Region *string `json:"Region,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_local_capabilities.go b/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_local_capabilities.go new file mode 100644 index 000000000..bcf296000 --- /dev/null +++ b/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_local_capabilities.go @@ -0,0 +1,20 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +// ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocalCapabilities Whether a phone number can receive calls or messages +type ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocalCapabilities struct { + Fax bool `json:"Fax,omitempty"` + Mms bool `json:"Mms,omitempty"` + Sms bool `json:"Sms,omitempty"` + Voice bool `json:"Voice,omitempty"` +} diff --git a/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_machine_to_machine.go b/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_machine_to_machine.go index 277dac506..d471ee908 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_machine_to_machine.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_machine_to_machine.go @@ -13,17 +13,29 @@ package openapi // ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberMachineToMachine struct for ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberMachineToMachine type ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberMachineToMachine struct { - AddressRequirements *string `json:"AddressRequirements,omitempty"` - Beta *bool `json:"Beta,omitempty"` - Capabilities *PhoneNumberCapabilities `json:"Capabilities,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - IsoCountry *string `json:"IsoCountry,omitempty"` - Lata *string `json:"Lata,omitempty"` - Latitude *float32 `json:"Latitude,omitempty"` - Locality *string `json:"Locality,omitempty"` - Longitude *float32 `json:"Longitude,omitempty"` - PhoneNumber *string `json:"PhoneNumber,omitempty"` - PostalCode *string `json:"PostalCode,omitempty"` - RateCenter *string `json:"RateCenter,omitempty"` - Region *string `json:"Region,omitempty"` + // The type of Address resource the phone number requires + AddressRequirements *string `json:"AddressRequirements,omitempty"` + // Whether the phone number is new to the Twilio platform + Beta *bool `json:"Beta,omitempty"` + Capabilities *ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocalCapabilities `json:"Capabilities,omitempty"` + // A formatted version of the phone number + FriendlyName *string `json:"FriendlyName,omitempty"` + // The ISO country code of this phone number + IsoCountry *string `json:"IsoCountry,omitempty"` + // The LATA of this phone number + Lata *string `json:"Lata,omitempty"` + // The latitude of this phone number's location + Latitude *float32 `json:"Latitude,omitempty"` + // The locality or city of this phone number's location + Locality *string `json:"Locality,omitempty"` + // The longitude of this phone number's location + Longitude *float32 `json:"Longitude,omitempty"` + // The phone number in E.164 format + PhoneNumber *string `json:"PhoneNumber,omitempty"` + // The postal or ZIP code of this phone number's location + PostalCode *string `json:"PostalCode,omitempty"` + // The rate center of this phone number + RateCenter *string `json:"RateCenter,omitempty"` + // The two-letter state or province abbreviation of this phone number's location + Region *string `json:"Region,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_mobile.go b/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_mobile.go index d7fe5d7e8..e37afedff 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_mobile.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_mobile.go @@ -13,17 +13,29 @@ package openapi // ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberMobile struct for ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberMobile type ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberMobile struct { - AddressRequirements *string `json:"AddressRequirements,omitempty"` - Beta *bool `json:"Beta,omitempty"` - Capabilities *PhoneNumberCapabilities `json:"Capabilities,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - IsoCountry *string `json:"IsoCountry,omitempty"` - Lata *string `json:"Lata,omitempty"` - Latitude *float32 `json:"Latitude,omitempty"` - Locality *string `json:"Locality,omitempty"` - Longitude *float32 `json:"Longitude,omitempty"` - PhoneNumber *string `json:"PhoneNumber,omitempty"` - PostalCode *string `json:"PostalCode,omitempty"` - RateCenter *string `json:"RateCenter,omitempty"` - Region *string `json:"Region,omitempty"` + // The type of Address resource the phone number requires + AddressRequirements *string `json:"AddressRequirements,omitempty"` + // Whether the phone number is new to the Twilio platform + Beta *bool `json:"Beta,omitempty"` + Capabilities *ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocalCapabilities `json:"Capabilities,omitempty"` + // A formatted version of the phone number + FriendlyName *string `json:"FriendlyName,omitempty"` + // The ISO country code of this phone number + IsoCountry *string `json:"IsoCountry,omitempty"` + // The LATA of this phone number + Lata *string `json:"Lata,omitempty"` + // The latitude of this phone number's location + Latitude *float32 `json:"Latitude,omitempty"` + // The locality or city of this phone number's location + Locality *string `json:"Locality,omitempty"` + // The longitude of this phone number's location + Longitude *float32 `json:"Longitude,omitempty"` + // The phone number in E.164 format + PhoneNumber *string `json:"PhoneNumber,omitempty"` + // The postal or ZIP code of this phone number's location + PostalCode *string `json:"PostalCode,omitempty"` + // The rate center of this phone number + RateCenter *string `json:"RateCenter,omitempty"` + // The two-letter state or province abbreviation of this phone number's location + Region *string `json:"Region,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_national.go b/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_national.go index f1bb3d044..06ba69450 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_national.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_national.go @@ -13,17 +13,29 @@ package openapi // ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberNational struct for ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberNational type ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberNational struct { - AddressRequirements *string `json:"AddressRequirements,omitempty"` - Beta *bool `json:"Beta,omitempty"` - Capabilities *PhoneNumberCapabilities `json:"Capabilities,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - IsoCountry *string `json:"IsoCountry,omitempty"` - Lata *string `json:"Lata,omitempty"` - Latitude *float32 `json:"Latitude,omitempty"` - Locality *string `json:"Locality,omitempty"` - Longitude *float32 `json:"Longitude,omitempty"` - PhoneNumber *string `json:"PhoneNumber,omitempty"` - PostalCode *string `json:"PostalCode,omitempty"` - RateCenter *string `json:"RateCenter,omitempty"` - Region *string `json:"Region,omitempty"` + // The type of Address resource the phone number requires + AddressRequirements *string `json:"AddressRequirements,omitempty"` + // Whether the phone number is new to the Twilio platform + Beta *bool `json:"Beta,omitempty"` + Capabilities *ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocalCapabilities `json:"Capabilities,omitempty"` + // A formatted version of the phone number + FriendlyName *string `json:"FriendlyName,omitempty"` + // The ISO country code of this phone number + IsoCountry *string `json:"IsoCountry,omitempty"` + // The LATA of this phone number + Lata *string `json:"Lata,omitempty"` + // The latitude of this phone number's location + Latitude *float32 `json:"Latitude,omitempty"` + // The locality or city of this phone number's location + Locality *string `json:"Locality,omitempty"` + // The longitude of this phone number's location + Longitude *float32 `json:"Longitude,omitempty"` + // The phone number in E.164 format + PhoneNumber *string `json:"PhoneNumber,omitempty"` + // The postal or ZIP code of this phone number's location + PostalCode *string `json:"PostalCode,omitempty"` + // The rate center of this phone number + RateCenter *string `json:"RateCenter,omitempty"` + // The two-letter state or province abbreviation of this phone number's location + Region *string `json:"Region,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_shared_cost.go b/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_shared_cost.go index c32e201c2..0431bee31 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_shared_cost.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_shared_cost.go @@ -13,17 +13,29 @@ package openapi // ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberSharedCost struct for ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberSharedCost type ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberSharedCost struct { - AddressRequirements *string `json:"AddressRequirements,omitempty"` - Beta *bool `json:"Beta,omitempty"` - Capabilities *PhoneNumberCapabilities `json:"Capabilities,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - IsoCountry *string `json:"IsoCountry,omitempty"` - Lata *string `json:"Lata,omitempty"` - Latitude *float32 `json:"Latitude,omitempty"` - Locality *string `json:"Locality,omitempty"` - Longitude *float32 `json:"Longitude,omitempty"` - PhoneNumber *string `json:"PhoneNumber,omitempty"` - PostalCode *string `json:"PostalCode,omitempty"` - RateCenter *string `json:"RateCenter,omitempty"` - Region *string `json:"Region,omitempty"` + // The type of Address resource the phone number requires + AddressRequirements *string `json:"AddressRequirements,omitempty"` + // Whether the phone number is new to the Twilio platform + Beta *bool `json:"Beta,omitempty"` + Capabilities *ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocalCapabilities `json:"Capabilities,omitempty"` + // A formatted version of the phone number + FriendlyName *string `json:"FriendlyName,omitempty"` + // The ISO country code of this phone number + IsoCountry *string `json:"IsoCountry,omitempty"` + // The LATA of this phone number + Lata *string `json:"Lata,omitempty"` + // The latitude of this phone number's location + Latitude *float32 `json:"Latitude,omitempty"` + // The locality or city of this phone number's location + Locality *string `json:"Locality,omitempty"` + // The longitude of this phone number's location + Longitude *float32 `json:"Longitude,omitempty"` + // The phone number in E.164 format + PhoneNumber *string `json:"PhoneNumber,omitempty"` + // The postal or ZIP code of this phone number's location + PostalCode *string `json:"PostalCode,omitempty"` + // The rate center of this phone number + RateCenter *string `json:"RateCenter,omitempty"` + // The two-letter state or province abbreviation of this phone number's location + Region *string `json:"Region,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_toll_free.go b/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_toll_free.go index b2836c503..023c62eb7 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_toll_free.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_toll_free.go @@ -13,17 +13,29 @@ package openapi // ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberTollFree struct for ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberTollFree type ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberTollFree struct { - AddressRequirements *string `json:"AddressRequirements,omitempty"` - Beta *bool `json:"Beta,omitempty"` - Capabilities *PhoneNumberCapabilities `json:"Capabilities,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - IsoCountry *string `json:"IsoCountry,omitempty"` - Lata *string `json:"Lata,omitempty"` - Latitude *float32 `json:"Latitude,omitempty"` - Locality *string `json:"Locality,omitempty"` - Longitude *float32 `json:"Longitude,omitempty"` - PhoneNumber *string `json:"PhoneNumber,omitempty"` - PostalCode *string `json:"PostalCode,omitempty"` - RateCenter *string `json:"RateCenter,omitempty"` - Region *string `json:"Region,omitempty"` + // The type of Address resource the phone number requires + AddressRequirements *string `json:"AddressRequirements,omitempty"` + // Whether the phone number is new to the Twilio platform + Beta *bool `json:"Beta,omitempty"` + Capabilities *ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocalCapabilities `json:"Capabilities,omitempty"` + // A formatted version of the phone number + FriendlyName *string `json:"FriendlyName,omitempty"` + // The ISO country code of this phone number + IsoCountry *string `json:"IsoCountry,omitempty"` + // The LATA of this phone number + Lata *string `json:"Lata,omitempty"` + // The latitude of this phone number's location + Latitude *float32 `json:"Latitude,omitempty"` + // The locality or city of this phone number's location + Locality *string `json:"Locality,omitempty"` + // The longitude of this phone number's location + Longitude *float32 `json:"Longitude,omitempty"` + // The phone number in E.164 format + PhoneNumber *string `json:"PhoneNumber,omitempty"` + // The postal or ZIP code of this phone number's location + PostalCode *string `json:"PostalCode,omitempty"` + // The rate center of this phone number + RateCenter *string `json:"RateCenter,omitempty"` + // The two-letter state or province abbreviation of this phone number's location + Region *string `json:"Region,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_voip.go b/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_voip.go index 7a353d592..c13b98a85 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_voip.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_voip.go @@ -13,17 +13,29 @@ package openapi // ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberVoip struct for ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberVoip type ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberVoip struct { - AddressRequirements *string `json:"AddressRequirements,omitempty"` - Beta *bool `json:"Beta,omitempty"` - Capabilities *PhoneNumberCapabilities `json:"Capabilities,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - IsoCountry *string `json:"IsoCountry,omitempty"` - Lata *string `json:"Lata,omitempty"` - Latitude *float32 `json:"Latitude,omitempty"` - Locality *string `json:"Locality,omitempty"` - Longitude *float32 `json:"Longitude,omitempty"` - PhoneNumber *string `json:"PhoneNumber,omitempty"` - PostalCode *string `json:"PostalCode,omitempty"` - RateCenter *string `json:"RateCenter,omitempty"` - Region *string `json:"Region,omitempty"` + // The type of Address resource the phone number requires + AddressRequirements *string `json:"AddressRequirements,omitempty"` + // Whether the phone number is new to the Twilio platform + Beta *bool `json:"Beta,omitempty"` + Capabilities *ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocalCapabilities `json:"Capabilities,omitempty"` + // A formatted version of the phone number + FriendlyName *string `json:"FriendlyName,omitempty"` + // The ISO country code of this phone number + IsoCountry *string `json:"IsoCountry,omitempty"` + // The LATA of this phone number + Lata *string `json:"Lata,omitempty"` + // The latitude of this phone number's location + Latitude *float32 `json:"Latitude,omitempty"` + // The locality or city of this phone number's location + Locality *string `json:"Locality,omitempty"` + // The longitude of this phone number's location + Longitude *float32 `json:"Longitude,omitempty"` + // The phone number in E.164 format + PhoneNumber *string `json:"PhoneNumber,omitempty"` + // The postal or ZIP code of this phone number's location + PostalCode *string `json:"PostalCode,omitempty"` + // The rate center of this phone number + RateCenter *string `json:"RateCenter,omitempty"` + // The two-letter state or province abbreviation of this phone number's location + Region *string `json:"Region,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_balance.go b/twilio/rest/api/v2010/model_api_v2010_account_balance.go index a88c71b75..3f9c1fa2e 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_balance.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_balance.go @@ -13,7 +13,10 @@ package openapi // ApiV2010AccountBalance struct for ApiV2010AccountBalance type ApiV2010AccountBalance struct { + // Account Sid. AccountSid *string `json:"AccountSid,omitempty"` - Balance *string `json:"Balance,omitempty"` - Currency *string `json:"Currency,omitempty"` + // Account balance + Balance *string `json:"Balance,omitempty"` + // Currency units + Currency *string `json:"Currency,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_call.go b/twilio/rest/api/v2010/model_api_v2010_account_call.go index 953c61cf5..50e8f3254 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_call.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_call.go @@ -13,31 +13,58 @@ package openapi // ApiV2010AccountCall struct for ApiV2010AccountCall type ApiV2010AccountCall struct { - AccountSid *string `json:"AccountSid,omitempty"` - Annotation *string `json:"Annotation,omitempty"` - AnsweredBy *string `json:"AnsweredBy,omitempty"` - ApiVersion *string `json:"ApiVersion,omitempty"` - CallerName *string `json:"CallerName,omitempty"` - DateCreated *string `json:"DateCreated,omitempty"` - DateUpdated *string `json:"DateUpdated,omitempty"` - Direction *string `json:"Direction,omitempty"` - Duration *string `json:"Duration,omitempty"` - EndTime *string `json:"EndTime,omitempty"` - ForwardedFrom *string `json:"ForwardedFrom,omitempty"` - From *string `json:"From,omitempty"` - FromFormatted *string `json:"FromFormatted,omitempty"` - GroupSid *string `json:"GroupSid,omitempty"` - ParentCallSid *string `json:"ParentCallSid,omitempty"` - PhoneNumberSid *string `json:"PhoneNumberSid,omitempty"` - Price *string `json:"Price,omitempty"` - PriceUnit *string `json:"PriceUnit,omitempty"` - QueueTime *string `json:"QueueTime,omitempty"` - Sid *string `json:"Sid,omitempty"` - StartTime *string `json:"StartTime,omitempty"` - Status *CallStatus `json:"Status,omitempty"` + // The SID of the Account that created this resource + AccountSid *string `json:"AccountSid,omitempty"` + // The annotation provided for the call + Annotation *string `json:"Annotation,omitempty"` + // Either `human` or `machine` if this call was initiated with answering machine detection. Empty otherwise. + AnsweredBy *string `json:"AnsweredBy,omitempty"` + // The API Version used to create the call + ApiVersion *string `json:"ApiVersion,omitempty"` + // The caller's name if this call was an incoming call to a phone number with caller ID Lookup enabled. Otherwise, empty. + CallerName *string `json:"CallerName,omitempty"` + // The RFC 2822 date and time in GMT that this resource was created + DateCreated *string `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT that this resource was last updated + DateUpdated *string `json:"DateUpdated,omitempty"` + // A string describing the direction of the call. `inbound` for inbound calls, `outbound-api` for calls initiated via the REST API or `outbound-dial` for calls initiated by a `Dial` verb. + Direction *string `json:"Direction,omitempty"` + // The length of the call in seconds. + Duration *string `json:"Duration,omitempty"` + // The end time of the call. Null if the call did not complete successfully. + EndTime *string `json:"EndTime,omitempty"` + // The forwarding phone number if this call was an incoming call forwarded from another number (depends on carrier supporting forwarding). Otherwise, empty. + ForwardedFrom *string `json:"ForwardedFrom,omitempty"` + // The phone number, SIP address or Client identifier that made this call. Phone numbers are in E.164 format (e.g., +16175551212). SIP addresses are formatted as `name@company.com`. Client identifiers are formatted `client:name`. + From *string `json:"From,omitempty"` + // The calling phone number, SIP address, or Client identifier formatted for display. + FromFormatted *string `json:"FromFormatted,omitempty"` + // The Group SID associated with this call. If no Group is associated with the call, the field is empty. + GroupSid *string `json:"GroupSid,omitempty"` + // The SID that identifies the call that created this leg. + ParentCallSid *string `json:"ParentCallSid,omitempty"` + // If the call was inbound, this is the SID of the IncomingPhoneNumber resource that received the call. If the call was outbound, it is the SID of the OutgoingCallerId resource from which the call was placed. + PhoneNumberSid *string `json:"PhoneNumberSid,omitempty"` + // The charge for this call, in the currency associated with the account. Populated after the call is completed. May not be immediately available. + Price *string `json:"Price,omitempty"` + // The currency in which `Price` is measured. + PriceUnit *string `json:"PriceUnit,omitempty"` + // The wait time in milliseconds before the call is placed. + QueueTime *string `json:"QueueTime,omitempty"` + // The unique string that identifies this resource + Sid *string `json:"Sid,omitempty"` + // The start time of the call. Null if the call has not yet been dialed. + StartTime *string `json:"StartTime,omitempty"` + // The status of this call. + Status *string `json:"Status,omitempty"` + // A list of related subresources identified by their relative URIs SubresourceUris *map[string]interface{} `json:"SubresourceUris,omitempty"` - To *string `json:"To,omitempty"` - ToFormatted *string `json:"ToFormatted,omitempty"` - TrunkSid *string `json:"TrunkSid,omitempty"` - Uri *string `json:"Uri,omitempty"` + // The phone number, SIP address or Client identifier that received this call. Phone numbers are in E.164 format (e.g., +16175551212). SIP addresses are formatted as `name@company.com`. Client identifiers are formatted `client:name`. + To *string `json:"To,omitempty"` + // The phone number, SIP address or Client identifier that received this call. Formatted for display. + ToFormatted *string `json:"ToFormatted,omitempty"` + // The (optional) unique identifier of the trunk resource that was used for this call. + TrunkSid *string `json:"TrunkSid,omitempty"` + // The URI of this resource, relative to `https://api.twilio.com` + Uri *string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_call_call_event.go b/twilio/rest/api/v2010/model_api_v2010_account_call_call_event.go index c59bddba3..64af39eba 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_call_call_event.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_call_call_event.go @@ -13,6 +13,8 @@ package openapi // ApiV2010AccountCallCallEvent struct for ApiV2010AccountCallCallEvent type ApiV2010AccountCallCallEvent struct { - Request *map[string]interface{} `json:"Request,omitempty"` + // Call Request. + Request *map[string]interface{} `json:"Request,omitempty"` + // Call Response with Events. Response *map[string]interface{} `json:"Response,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_call_call_feedback.go b/twilio/rest/api/v2010/model_api_v2010_account_call_call_feedback.go index 574125687..cd304b270 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_call_call_feedback.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_call_call_feedback.go @@ -13,10 +13,16 @@ package openapi // ApiV2010AccountCallCallFeedback struct for ApiV2010AccountCallCallFeedback type ApiV2010AccountCallCallFeedback struct { - AccountSid *string `json:"AccountSid,omitempty"` - DateCreated *string `json:"DateCreated,omitempty"` - DateUpdated *string `json:"DateUpdated,omitempty"` - Issues *[]string `json:"Issues,omitempty"` - QualityScore *int32 `json:"QualityScore,omitempty"` - Sid *string `json:"Sid,omitempty"` + // The unique sid that identifies this account + AccountSid *string `json:"AccountSid,omitempty"` + // The date this resource was created + DateCreated *string `json:"DateCreated,omitempty"` + // The date this resource was last updated + DateUpdated *string `json:"DateUpdated,omitempty"` + // Issues experienced during the call + Issues *[]string `json:"Issues,omitempty"` + // 1 to 5 quality score + QualityScore *int32 `json:"QualityScore,omitempty"` + // A string that uniquely identifies this feedback resource + Sid *string `json:"Sid,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_call_call_feedback_summary.go b/twilio/rest/api/v2010/model_api_v2010_account_call_call_feedback_summary.go index 8d568f406..17dc6e8dd 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_call_call_feedback_summary.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_call_call_feedback_summary.go @@ -17,18 +17,32 @@ import ( // ApiV2010AccountCallCallFeedbackSummary struct for ApiV2010AccountCallCallFeedbackSummary type ApiV2010AccountCallCallFeedbackSummary struct { - AccountSid *string `json:"AccountSid,omitempty"` - CallCount *int32 `json:"CallCount,omitempty"` - CallFeedbackCount *int32 `json:"CallFeedbackCount,omitempty"` - DateCreated *string `json:"DateCreated,omitempty"` - DateUpdated *string `json:"DateUpdated,omitempty"` - EndDate *time.Time `json:"EndDate,omitempty"` - IncludeSubaccounts *bool `json:"IncludeSubaccounts,omitempty"` - Issues *[]map[string]interface{} `json:"Issues,omitempty"` - QualityScoreAverage *float32 `json:"QualityScoreAverage,omitempty"` - QualityScoreMedian *float32 `json:"QualityScoreMedian,omitempty"` - QualityScoreStandardDeviation *float32 `json:"QualityScoreStandardDeviation,omitempty"` - Sid *string `json:"Sid,omitempty"` - StartDate *time.Time `json:"StartDate,omitempty"` - Status *CallFeedbackSummaryStatus `json:"Status,omitempty"` + // The unique sid that identifies this account + AccountSid *string `json:"AccountSid,omitempty"` + // The total number of calls + CallCount *int32 `json:"CallCount,omitempty"` + // The total number of calls with a feedback entry + CallFeedbackCount *int32 `json:"CallFeedbackCount,omitempty"` + // The date this resource was created + DateCreated *string `json:"DateCreated,omitempty"` + // The date this resource was last updated + DateUpdated *string `json:"DateUpdated,omitempty"` + // The latest feedback entry date in the summary + EndDate *time.Time `json:"EndDate,omitempty"` + // Whether the feedback summary includes subaccounts + IncludeSubaccounts *bool `json:"IncludeSubaccounts,omitempty"` + // Issues experienced during the call + Issues *[]ApiV2010AccountCallCallFeedbackSummaryIssues `json:"Issues,omitempty"` + // The average QualityScore of the feedback entries + QualityScoreAverage *float32 `json:"QualityScoreAverage,omitempty"` + // The median QualityScore of the feedback entries + QualityScoreMedian *float32 `json:"QualityScoreMedian,omitempty"` + // The standard deviation of the quality scores + QualityScoreStandardDeviation *float32 `json:"QualityScoreStandardDeviation,omitempty"` + // A string that uniquely identifies this feedback entry + Sid *string `json:"Sid,omitempty"` + // The earliest feedback entry date in the summary + StartDate *time.Time `json:"StartDate,omitempty"` + // The status of the feedback summary + Status *string `json:"Status,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_call_call_feedback_summary_issues.go b/twilio/rest/api/v2010/model_api_v2010_account_call_call_feedback_summary_issues.go new file mode 100644 index 000000000..7ee0bb2ae --- /dev/null +++ b/twilio/rest/api/v2010/model_api_v2010_account_call_call_feedback_summary_issues.go @@ -0,0 +1,19 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +// ApiV2010AccountCallCallFeedbackSummaryIssues struct for ApiV2010AccountCallCallFeedbackSummaryIssues +type ApiV2010AccountCallCallFeedbackSummaryIssues struct { + Count float32 `json:"Count,omitempty"` + Description string `json:"Description,omitempty"` + PercentageOfTotalCalls string `json:"PercentageOfTotalCalls,omitempty"` +} diff --git a/twilio/rest/api/v2010/model_api_v2010_account_call_call_notification.go b/twilio/rest/api/v2010/model_api_v2010_account_call_call_notification.go index 41d7f88ef..6b3606473 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_call_call_notification.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_call_call_notification.go @@ -13,18 +13,32 @@ package openapi // ApiV2010AccountCallCallNotification struct for ApiV2010AccountCallCallNotification type ApiV2010AccountCallCallNotification struct { - AccountSid *string `json:"AccountSid,omitempty"` - ApiVersion *string `json:"ApiVersion,omitempty"` - CallSid *string `json:"CallSid,omitempty"` - DateCreated *string `json:"DateCreated,omitempty"` - DateUpdated *string `json:"DateUpdated,omitempty"` - ErrorCode *string `json:"ErrorCode,omitempty"` - Log *string `json:"Log,omitempty"` - MessageDate *string `json:"MessageDate,omitempty"` - MessageText *string `json:"MessageText,omitempty"` - MoreInfo *string `json:"MoreInfo,omitempty"` - RequestMethod *HttpMethod `json:"RequestMethod,omitempty"` - RequestUrl *string `json:"RequestUrl,omitempty"` - Sid *string `json:"Sid,omitempty"` - Uri *string `json:"Uri,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The API version used to create the Call Notification resource + ApiVersion *string `json:"ApiVersion,omitempty"` + // The SID of the Call the resource is associated with + CallSid *string `json:"CallSid,omitempty"` + // The RFC 2822 date and time in GMT that the resource was created + DateCreated *string `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT that the resource was last updated + DateUpdated *string `json:"DateUpdated,omitempty"` + // A unique error code corresponding to the notification + ErrorCode *string `json:"ErrorCode,omitempty"` + // An integer log level + Log *string `json:"Log,omitempty"` + // The date the notification was generated + MessageDate *string `json:"MessageDate,omitempty"` + // The text of the notification + MessageText *string `json:"MessageText,omitempty"` + // A URL for more information about the error code + MoreInfo *string `json:"MoreInfo,omitempty"` + // HTTP method used with the request url + RequestMethod *string `json:"RequestMethod,omitempty"` + // URL of the resource that generated the notification + RequestUrl *string `json:"RequestUrl,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The URI of the resource, relative to `https://api.twilio.com` + Uri *string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_call_call_notification_instance.go b/twilio/rest/api/v2010/model_api_v2010_account_call_call_notification_instance.go index e5437e2c3..5db6b2c21 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_call_call_notification_instance.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_call_call_notification_instance.go @@ -13,21 +13,38 @@ package openapi // ApiV2010AccountCallCallNotificationInstance struct for ApiV2010AccountCallCallNotificationInstance type ApiV2010AccountCallCallNotificationInstance struct { - AccountSid *string `json:"AccountSid,omitempty"` - ApiVersion *string `json:"ApiVersion,omitempty"` - CallSid *string `json:"CallSid,omitempty"` - DateCreated *string `json:"DateCreated,omitempty"` - DateUpdated *string `json:"DateUpdated,omitempty"` - ErrorCode *string `json:"ErrorCode,omitempty"` - Log *string `json:"Log,omitempty"` - MessageDate *string `json:"MessageDate,omitempty"` - MessageText *string `json:"MessageText,omitempty"` - MoreInfo *string `json:"MoreInfo,omitempty"` - RequestMethod *HttpMethod `json:"RequestMethod,omitempty"` - RequestUrl *string `json:"RequestUrl,omitempty"` - RequestVariables *string `json:"RequestVariables,omitempty"` - ResponseBody *string `json:"ResponseBody,omitempty"` - ResponseHeaders *string `json:"ResponseHeaders,omitempty"` - Sid *string `json:"Sid,omitempty"` - Uri *string `json:"Uri,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The API version used to create the Call Notification resource + ApiVersion *string `json:"ApiVersion,omitempty"` + // The SID of the Call the resource is associated with + CallSid *string `json:"CallSid,omitempty"` + // The RFC 2822 date and time in GMT that the resource was created + DateCreated *string `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT that the resource was last updated + DateUpdated *string `json:"DateUpdated,omitempty"` + // A unique error code corresponding to the notification + ErrorCode *string `json:"ErrorCode,omitempty"` + // An integer log level + Log *string `json:"Log,omitempty"` + // The date the notification was generated + MessageDate *string `json:"MessageDate,omitempty"` + // The text of the notification + MessageText *string `json:"MessageText,omitempty"` + // A URL for more information about the error code + MoreInfo *string `json:"MoreInfo,omitempty"` + // HTTP method used with the request url + RequestMethod *string `json:"RequestMethod,omitempty"` + // URL of the resource that generated the notification + RequestUrl *string `json:"RequestUrl,omitempty"` + // Twilio-generated HTTP variables sent to the server + RequestVariables *string `json:"RequestVariables,omitempty"` + // The HTTP body returned by your server + ResponseBody *string `json:"ResponseBody,omitempty"` + // The HTTP headers returned by your server + ResponseHeaders *string `json:"ResponseHeaders,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The URI of the resource, relative to `https://api.twilio.com` + Uri *string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_call_call_recording.go b/twilio/rest/api/v2010/model_api_v2010_account_call_call_recording.go index c3c411f05..7af72eb0f 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_call_call_recording.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_call_call_recording.go @@ -13,22 +13,40 @@ package openapi // ApiV2010AccountCallCallRecording struct for ApiV2010AccountCallCallRecording type ApiV2010AccountCallCallRecording struct { - AccountSid *string `json:"AccountSid,omitempty"` - ApiVersion *string `json:"ApiVersion,omitempty"` - CallSid *string `json:"CallSid,omitempty"` - Channels *int32 `json:"Channels,omitempty"` - ConferenceSid *string `json:"ConferenceSid,omitempty"` - DateCreated *string `json:"DateCreated,omitempty"` - DateUpdated *string `json:"DateUpdated,omitempty"` - Duration *string `json:"Duration,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The API version used to make the recording + ApiVersion *string `json:"ApiVersion,omitempty"` + // The SID of the Call the resource is associated with + CallSid *string `json:"CallSid,omitempty"` + // The number of channels in the final recording file + Channels *int32 `json:"Channels,omitempty"` + // The Conference SID that identifies the conference associated with the recording + ConferenceSid *string `json:"ConferenceSid,omitempty"` + // The RFC 2822 date and time in GMT that the resource was created + DateCreated *string `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT that the resource was last updated + DateUpdated *string `json:"DateUpdated,omitempty"` + // The length of the recording in seconds + Duration *string `json:"Duration,omitempty"` + // How to decrypt the recording. EncryptionDetails *map[string]interface{} `json:"EncryptionDetails,omitempty"` - ErrorCode *int32 `json:"ErrorCode,omitempty"` - Price *float32 `json:"Price,omitempty"` - PriceUnit *string `json:"PriceUnit,omitempty"` - Sid *string `json:"Sid,omitempty"` - Source *CallRecordingSource `json:"Source,omitempty"` - StartTime *string `json:"StartTime,omitempty"` - Status *CallRecordingStatus `json:"Status,omitempty"` - Track *string `json:"Track,omitempty"` - Uri *string `json:"Uri,omitempty"` + // More information about why the recording is missing, if status is `absent`. + ErrorCode *int32 `json:"ErrorCode,omitempty"` + // The one-time cost of creating the recording. + Price *float32 `json:"Price,omitempty"` + // The currency used in the price property. + PriceUnit *string `json:"PriceUnit,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // How the recording was created + Source *string `json:"Source,omitempty"` + // The start time of the recording, given in RFC 2822 format + StartTime *string `json:"StartTime,omitempty"` + // The status of the recording + Status *string `json:"Status,omitempty"` + // The recorded track. Can be: `inbound`, `outbound`, or `both`. + Track *string `json:"Track,omitempty"` + // The URI of the resource, relative to `https://api.twilio.com` + Uri *string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_call_payments.go b/twilio/rest/api/v2010/model_api_v2010_account_call_payments.go index bbf1f1ffd..e99c27c17 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_call_payments.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_call_payments.go @@ -13,10 +13,16 @@ package openapi // ApiV2010AccountCallPayments struct for ApiV2010AccountCallPayments type ApiV2010AccountCallPayments struct { - AccountSid *string `json:"AccountSid,omitempty"` - CallSid *string `json:"CallSid,omitempty"` + // The SID of the Account that created the Payments resource. + AccountSid *string `json:"AccountSid,omitempty"` + // The SID of the Call the resource is associated with. + CallSid *string `json:"CallSid,omitempty"` + // The RFC 2822 date and time in GMT that the resource was created DateCreated *string `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT that the resource was last updated DateUpdated *string `json:"DateUpdated,omitempty"` - Sid *string `json:"Sid,omitempty"` - Uri *string `json:"Uri,omitempty"` + // The SID of the Payments resource. + Sid *string `json:"Sid,omitempty"` + // The URI of the resource, relative to `https://api.twilio.com` + Uri *string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_conference.go b/twilio/rest/api/v2010/model_api_v2010_account_conference.go index f0efd88d8..f12162a6a 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_conference.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_conference.go @@ -13,16 +13,28 @@ package openapi // ApiV2010AccountConference struct for ApiV2010AccountConference type ApiV2010AccountConference struct { - AccountSid *string `json:"AccountSid,omitempty"` - ApiVersion *string `json:"ApiVersion,omitempty"` - CallSidEndingConference *string `json:"CallSidEndingConference,omitempty"` - DateCreated *string `json:"DateCreated,omitempty"` - DateUpdated *string `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - ReasonConferenceEnded *ConferenceReasonConferenceEnded `json:"ReasonConferenceEnded,omitempty"` - Region *string `json:"Region,omitempty"` - Sid *string `json:"Sid,omitempty"` - Status *ConferenceStatus `json:"Status,omitempty"` - SubresourceUris *map[string]interface{} `json:"SubresourceUris,omitempty"` - Uri *string `json:"Uri,omitempty"` + // The SID of the Account that created this resource + AccountSid *string `json:"AccountSid,omitempty"` + // The API version used to create this conference + ApiVersion *string `json:"ApiVersion,omitempty"` + // The call SID that caused the conference to end + CallSidEndingConference *string `json:"CallSidEndingConference,omitempty"` + // The RFC 2822 date and time in GMT that this resource was created + DateCreated *string `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT that this resource was last updated + DateUpdated *string `json:"DateUpdated,omitempty"` + // A string that you assigned to describe this conference room + FriendlyName *string `json:"FriendlyName,omitempty"` + // The reason why a conference ended. + ReasonConferenceEnded *string `json:"ReasonConferenceEnded,omitempty"` + // A string that represents the Twilio Region where the conference was mixed + Region *string `json:"Region,omitempty"` + // The unique string that identifies this resource + Sid *string `json:"Sid,omitempty"` + // The status of this conference + Status *string `json:"Status,omitempty"` + // A list of related resources identified by their relative URIs + SubresourceUris *map[string]interface{} `json:"SubresourceUris,omitempty"` + // The URI of this resource, relative to `https://api.twilio.com` + Uri *string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_conference_conference_recording.go b/twilio/rest/api/v2010/model_api_v2010_account_conference_conference_recording.go index 3434ba1a7..6ad28afb3 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_conference_conference_recording.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_conference_conference_recording.go @@ -13,21 +13,38 @@ package openapi // ApiV2010AccountConferenceConferenceRecording struct for ApiV2010AccountConferenceConferenceRecording type ApiV2010AccountConferenceConferenceRecording struct { - AccountSid *string `json:"AccountSid,omitempty"` - ApiVersion *string `json:"ApiVersion,omitempty"` - CallSid *string `json:"CallSid,omitempty"` - Channels *int32 `json:"Channels,omitempty"` - ConferenceSid *string `json:"ConferenceSid,omitempty"` - DateCreated *string `json:"DateCreated,omitempty"` - DateUpdated *string `json:"DateUpdated,omitempty"` - Duration *string `json:"Duration,omitempty"` - EncryptionDetails *map[string]interface{} `json:"EncryptionDetails,omitempty"` - ErrorCode *int32 `json:"ErrorCode,omitempty"` - Price *float32 `json:"Price,omitempty"` - PriceUnit *string `json:"PriceUnit,omitempty"` - Sid *string `json:"Sid,omitempty"` - Source *ConferenceRecordingSource `json:"Source,omitempty"` - StartTime *string `json:"StartTime,omitempty"` - Status *ConferenceRecordingStatus `json:"Status,omitempty"` - Uri *string `json:"Uri,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The API version used to create the recording + ApiVersion *string `json:"ApiVersion,omitempty"` + // The SID of the Call the resource is associated with + CallSid *string `json:"CallSid,omitempty"` + // The number of channels in the final recording file as an integer + Channels *int32 `json:"Channels,omitempty"` + // The Conference SID that identifies the conference associated with the recording + ConferenceSid *string `json:"ConferenceSid,omitempty"` + // The RFC 2822 date and time in GMT that the resource was created + DateCreated *string `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT that the resource was last updated + DateUpdated *string `json:"DateUpdated,omitempty"` + // The length of the recording in seconds + Duration *string `json:"Duration,omitempty"` + // How to decrypt the recording. + EncryptionDetails *map[string]interface{} `json:"EncryptionDetails,omitempty"` + // More information about why the recording is missing, if status is `absent`. + ErrorCode *int32 `json:"ErrorCode,omitempty"` + // The one-time cost of creating the recording. + Price *float32 `json:"Price,omitempty"` + // The currency used in the price property. + PriceUnit *string `json:"PriceUnit,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // How the recording was created + Source *string `json:"Source,omitempty"` + // The start time of the recording, given in RFC 2822 format + StartTime *string `json:"StartTime,omitempty"` + // The status of the recording + Status *string `json:"Status,omitempty"` + // The URI of the resource, relative to `https://api.twilio.com` + Uri *string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_conference_participant.go b/twilio/rest/api/v2010/model_api_v2010_account_conference_participant.go index 951ccea8d..a0ea48551 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_conference_participant.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_conference_participant.go @@ -13,18 +13,32 @@ package openapi // ApiV2010AccountConferenceParticipant struct for ApiV2010AccountConferenceParticipant type ApiV2010AccountConferenceParticipant struct { - AccountSid *string `json:"AccountSid,omitempty"` - CallSid *string `json:"CallSid,omitempty"` - CallSidToCoach *string `json:"CallSidToCoach,omitempty"` - Coaching *bool `json:"Coaching,omitempty"` - ConferenceSid *string `json:"ConferenceSid,omitempty"` - DateCreated *string `json:"DateCreated,omitempty"` - DateUpdated *string `json:"DateUpdated,omitempty"` - EndConferenceOnExit *bool `json:"EndConferenceOnExit,omitempty"` - Hold *bool `json:"Hold,omitempty"` - Label *string `json:"Label,omitempty"` - Muted *bool `json:"Muted,omitempty"` - StartConferenceOnEnter *bool `json:"StartConferenceOnEnter,omitempty"` - Status *ParticipantStatus `json:"Status,omitempty"` - Uri *string `json:"Uri,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The SID of the Call the resource is associated with + CallSid *string `json:"CallSid,omitempty"` + // The SID of the participant who is being `coached` + CallSidToCoach *string `json:"CallSidToCoach,omitempty"` + // Indicates if the participant changed to coach + Coaching *bool `json:"Coaching,omitempty"` + // The SID of the conference the participant is in + ConferenceSid *string `json:"ConferenceSid,omitempty"` + // The RFC 2822 date and time in GMT that the resource was created + DateCreated *string `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT that the resource was last updated + DateUpdated *string `json:"DateUpdated,omitempty"` + // Whether the conference ends when the participant leaves + EndConferenceOnExit *bool `json:"EndConferenceOnExit,omitempty"` + // Whether the participant is on hold + Hold *bool `json:"Hold,omitempty"` + // The label of this participant + Label *string `json:"Label,omitempty"` + // Whether the participant is muted + Muted *bool `json:"Muted,omitempty"` + // Whether the conference starts when the participant joins the conference + StartConferenceOnEnter *bool `json:"StartConferenceOnEnter,omitempty"` + // The status of the participant's call in a session + Status *string `json:"Status,omitempty"` + // The URI of the resource, relative to `https://api.twilio.com` + Uri *string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_connect_app.go b/twilio/rest/api/v2010/model_api_v2010_account_connect_app.go index 390d90fba..8a72c0cea 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_connect_app.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_connect_app.go @@ -13,15 +13,26 @@ package openapi // ApiV2010AccountConnectApp struct for ApiV2010AccountConnectApp type ApiV2010AccountConnectApp struct { - AccountSid *string `json:"AccountSid,omitempty"` - AuthorizeRedirectUrl *string `json:"AuthorizeRedirectUrl,omitempty"` - CompanyName *string `json:"CompanyName,omitempty"` - DeauthorizeCallbackMethod *HttpMethod `json:"DeauthorizeCallbackMethod,omitempty"` - DeauthorizeCallbackUrl *string `json:"DeauthorizeCallbackUrl,omitempty"` - Description *string `json:"Description,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - HomepageUrl *string `json:"HomepageUrl,omitempty"` - Permissions *[]string `json:"Permissions,omitempty"` - Sid *string `json:"Sid,omitempty"` - Uri *string `json:"Uri,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The URL to redirect the user to after authorization + AuthorizeRedirectUrl *string `json:"AuthorizeRedirectUrl,omitempty"` + // The company name set for the Connect App + CompanyName *string `json:"CompanyName,omitempty"` + // The HTTP method we use to call deauthorize_callback_url + DeauthorizeCallbackMethod *string `json:"DeauthorizeCallbackMethod,omitempty"` + // The URL we call to de-authorize the Connect App + DeauthorizeCallbackUrl *string `json:"DeauthorizeCallbackUrl,omitempty"` + // The description of the Connect App + Description *string `json:"Description,omitempty"` + // The string that you assigned to describe the resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // The URL users can obtain more information + HomepageUrl *string `json:"HomepageUrl,omitempty"` + // The set of permissions that your ConnectApp requests + Permissions *[]string `json:"Permissions,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The URI of the resource, relative to `https://api.twilio.com` + Uri *string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number.go b/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number.go index 61208031e..b2daf7b37 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number.go @@ -13,37 +13,67 @@ package openapi // ApiV2010AccountIncomingPhoneNumber struct for ApiV2010AccountIncomingPhoneNumber type ApiV2010AccountIncomingPhoneNumber struct { - AccountSid *string `json:"AccountSid,omitempty"` - AddressRequirements *IncomingPhoneNumberAddressRequirement `json:"AddressRequirements,omitempty"` - AddressSid *string `json:"AddressSid,omitempty"` - ApiVersion *string `json:"ApiVersion,omitempty"` - Beta *bool `json:"Beta,omitempty"` - BundleSid *string `json:"BundleSid,omitempty"` - Capabilities *PhoneNumberCapabilities `json:"Capabilities,omitempty"` - DateCreated *string `json:"DateCreated,omitempty"` - DateUpdated *string `json:"DateUpdated,omitempty"` - EmergencyAddressSid *string `json:"EmergencyAddressSid,omitempty"` - EmergencyStatus *IncomingPhoneNumberEmergencyStatus `json:"EmergencyStatus,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - IdentitySid *string `json:"IdentitySid,omitempty"` - Origin *string `json:"Origin,omitempty"` - PhoneNumber *string `json:"PhoneNumber,omitempty"` - Sid *string `json:"Sid,omitempty"` - SmsApplicationSid *string `json:"SmsApplicationSid,omitempty"` - SmsFallbackMethod *HttpMethod `json:"SmsFallbackMethod,omitempty"` - SmsFallbackUrl *string `json:"SmsFallbackUrl,omitempty"` - SmsMethod *HttpMethod `json:"SmsMethod,omitempty"` - SmsUrl *string `json:"SmsUrl,omitempty"` - Status *string `json:"Status,omitempty"` - StatusCallback *string `json:"StatusCallback,omitempty"` - StatusCallbackMethod *HttpMethod `json:"StatusCallbackMethod,omitempty"` - TrunkSid *string `json:"TrunkSid,omitempty"` - Uri *string `json:"Uri,omitempty"` - VoiceApplicationSid *string `json:"VoiceApplicationSid,omitempty"` - VoiceCallerIdLookup *bool `json:"VoiceCallerIdLookup,omitempty"` - VoiceFallbackMethod *HttpMethod `json:"VoiceFallbackMethod,omitempty"` - VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` - VoiceMethod *HttpMethod `json:"VoiceMethod,omitempty"` - VoiceReceiveMode *IncomingPhoneNumberVoiceReceiveMode `json:"VoiceReceiveMode,omitempty"` - VoiceUrl *string `json:"VoiceUrl,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // Whether the phone number requires an Address registered with Twilio. + AddressRequirements *string `json:"AddressRequirements,omitempty"` + // The SID of the Address resource associated with the phone number + AddressSid *string `json:"AddressSid,omitempty"` + // The API version used to start a new TwiML session + ApiVersion *string `json:"ApiVersion,omitempty"` + // Whether the phone number is new to the Twilio platform + Beta *bool `json:"Beta,omitempty"` + // The SID of the Bundle resource associated with number + BundleSid *string `json:"BundleSid,omitempty"` + Capabilities *ApiV2010AccountIncomingPhoneNumberCapabilities `json:"Capabilities,omitempty"` + // The RFC 2822 date and time in GMT that the resource was created + DateCreated *string `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT that the resource was last updated + DateUpdated *string `json:"DateUpdated,omitempty"` + // The emergency address configuration to use for emergency calling + EmergencyAddressSid *string `json:"EmergencyAddressSid,omitempty"` + // Whether the phone number is enabled for emergency calling + EmergencyStatus *string `json:"EmergencyStatus,omitempty"` + // The string that you assigned to describe the resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // The SID of the Identity resource associated with number + IdentitySid *string `json:"IdentitySid,omitempty"` + // The phone number's origin. Can be twilio or hosted. + Origin *string `json:"Origin,omitempty"` + // The phone number in E.164 format + PhoneNumber *string `json:"PhoneNumber,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The SID of the application that handles SMS messages sent to the phone number + SmsApplicationSid *string `json:"SmsApplicationSid,omitempty"` + // The HTTP method used with sms_fallback_url + SmsFallbackMethod *string `json:"SmsFallbackMethod,omitempty"` + // The URL that we call when an error occurs while retrieving or executing the TwiML + SmsFallbackUrl *string `json:"SmsFallbackUrl,omitempty"` + // The HTTP method to use with sms_url + SmsMethod *string `json:"SmsMethod,omitempty"` + // The URL we call when the phone number receives an incoming SMS message + SmsUrl *string `json:"SmsUrl,omitempty"` + Status *string `json:"Status,omitempty"` + // The URL to send status information to your application + StatusCallback *string `json:"StatusCallback,omitempty"` + // The HTTP method we use to call status_callback + StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` + // The SID of the Trunk that handles calls to the phone number + TrunkSid *string `json:"TrunkSid,omitempty"` + // The URI of the resource, relative to `https://api.twilio.com` + Uri *string `json:"Uri,omitempty"` + // The SID of the application that handles calls to the phone number + VoiceApplicationSid *string `json:"VoiceApplicationSid,omitempty"` + // Whether to lookup the caller's name + VoiceCallerIdLookup *bool `json:"VoiceCallerIdLookup,omitempty"` + // The HTTP method used with voice_fallback_url + VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"` + // The URL we call when an error occurs in TwiML + VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` + // The HTTP method used with the voice_url + VoiceMethod *string `json:"VoiceMethod,omitempty"` + VoiceReceiveMode *string `json:"VoiceReceiveMode,omitempty"` + // The URL we call when the phone number receives a call + VoiceUrl *string `json:"VoiceUrl,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number_capabilities.go b/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number_capabilities.go new file mode 100644 index 000000000..e5ba30993 --- /dev/null +++ b/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number_capabilities.go @@ -0,0 +1,20 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +// ApiV2010AccountIncomingPhoneNumberCapabilities Indicate if a phone can receive calls or messages +type ApiV2010AccountIncomingPhoneNumberCapabilities struct { + Fax bool `json:"Fax,omitempty"` + Mms bool `json:"Mms,omitempty"` + Sms bool `json:"Sms,omitempty"` + Voice bool `json:"Voice,omitempty"` +} diff --git a/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_assigned_add_on.go b/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_assigned_add_on.go index 1c4453e02..50aed05e6 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_assigned_add_on.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_assigned_add_on.go @@ -13,15 +13,26 @@ package openapi // ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOn struct for ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOn type ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOn struct { - AccountSid *string `json:"AccountSid,omitempty"` - Configuration *map[string]interface{} `json:"Configuration,omitempty"` - DateCreated *string `json:"DateCreated,omitempty"` - DateUpdated *string `json:"DateUpdated,omitempty"` - Description *string `json:"Description,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - ResourceSid *string `json:"ResourceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // A JSON string that represents the current configuration + Configuration *map[string]interface{} `json:"Configuration,omitempty"` + // The RFC 2822 date and time in GMT that the resource was created + DateCreated *string `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT that the resource was last updated + DateUpdated *string `json:"DateUpdated,omitempty"` + // A short description of the Add-on functionality + Description *string `json:"Description,omitempty"` + // The string that you assigned to describe the resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // The SID of the Phone Number that installed this Add-on + ResourceSid *string `json:"ResourceSid,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // A list of related resources identified by their relative URIs SubresourceUris *map[string]interface{} `json:"SubresourceUris,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` - Uri *string `json:"Uri,omitempty"` + // An application-defined string that uniquely identifies the resource + UniqueName *string `json:"UniqueName,omitempty"` + // The URI of the resource, relative to `https://api.twilio.com` + Uri *string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_assigned_add_on_incoming_phone_number_assigned_add_on_extension.go b/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_assigned_add_on_incoming_phone_number_assigned_add_on_extension.go index 3903d224e..dfa70b00a 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_assigned_add_on_incoming_phone_number_assigned_add_on_extension.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_assigned_add_on_incoming_phone_number_assigned_add_on_extension.go @@ -13,13 +13,22 @@ package openapi // ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOnIncomingPhoneNumberAssignedAddOnExtension struct for ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOnIncomingPhoneNumberAssignedAddOnExtension type ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOnIncomingPhoneNumberAssignedAddOnExtension struct { - AccountSid *string `json:"AccountSid,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The SID that uniquely identifies the assigned Add-on installation AssignedAddOnSid *string `json:"AssignedAddOnSid,omitempty"` - Enabled *bool `json:"Enabled,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - ProductName *string `json:"ProductName,omitempty"` - ResourceSid *string `json:"ResourceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` - Uri *string `json:"Uri,omitempty"` + // Whether the Extension will be invoked + Enabled *bool `json:"Enabled,omitempty"` + // The string that you assigned to describe the resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // A string that you assigned to describe the Product this Extension is used within + ProductName *string `json:"ProductName,omitempty"` + // The SID of the Phone Number to which the Add-on is assigned + ResourceSid *string `json:"ResourceSid,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // An application-defined string that uniquely identifies the resource + UniqueName *string `json:"UniqueName,omitempty"` + // The URI of the resource, relative to `https://api.twilio.com` + Uri *string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_local.go b/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_local.go index e640a03f1..b81fe6970 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_local.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_local.go @@ -13,37 +13,67 @@ package openapi // ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberLocal struct for ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberLocal type ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberLocal struct { - AccountSid *string `json:"AccountSid,omitempty"` - AddressRequirements *IncomingPhoneNumberLocalAddressRequirement `json:"AddressRequirements,omitempty"` - AddressSid *string `json:"AddressSid,omitempty"` - ApiVersion *string `json:"ApiVersion,omitempty"` - Beta *bool `json:"Beta,omitempty"` - BundleSid *string `json:"BundleSid,omitempty"` - Capabilities *PhoneNumberCapabilities `json:"Capabilities,omitempty"` - DateCreated *string `json:"DateCreated,omitempty"` - DateUpdated *string `json:"DateUpdated,omitempty"` - EmergencyAddressSid *string `json:"EmergencyAddressSid,omitempty"` - EmergencyStatus *IncomingPhoneNumberLocalEmergencyStatus `json:"EmergencyStatus,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - IdentitySid *string `json:"IdentitySid,omitempty"` - Origin *string `json:"Origin,omitempty"` - PhoneNumber *string `json:"PhoneNumber,omitempty"` - Sid *string `json:"Sid,omitempty"` - SmsApplicationSid *string `json:"SmsApplicationSid,omitempty"` - SmsFallbackMethod *HttpMethod `json:"SmsFallbackMethod,omitempty"` - SmsFallbackUrl *string `json:"SmsFallbackUrl,omitempty"` - SmsMethod *HttpMethod `json:"SmsMethod,omitempty"` - SmsUrl *string `json:"SmsUrl,omitempty"` - Status *string `json:"Status,omitempty"` - StatusCallback *string `json:"StatusCallback,omitempty"` - StatusCallbackMethod *HttpMethod `json:"StatusCallbackMethod,omitempty"` - TrunkSid *string `json:"TrunkSid,omitempty"` - Uri *string `json:"Uri,omitempty"` - VoiceApplicationSid *string `json:"VoiceApplicationSid,omitempty"` - VoiceCallerIdLookup *bool `json:"VoiceCallerIdLookup,omitempty"` - VoiceFallbackMethod *HttpMethod `json:"VoiceFallbackMethod,omitempty"` - VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` - VoiceMethod *HttpMethod `json:"VoiceMethod,omitempty"` - VoiceReceiveMode *IncomingPhoneNumberLocalVoiceReceiveMode `json:"VoiceReceiveMode,omitempty"` - VoiceUrl *string `json:"VoiceUrl,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // Whether the phone number requires an Address registered with Twilio. + AddressRequirements *string `json:"AddressRequirements,omitempty"` + // The SID of the Address resource associated with the phone number + AddressSid *string `json:"AddressSid,omitempty"` + // The API version used to start a new TwiML session + ApiVersion *string `json:"ApiVersion,omitempty"` + // Whether the phone number is new to the Twilio platform + Beta *bool `json:"Beta,omitempty"` + // The SID of the Bundle resource associated with number + BundleSid *string `json:"BundleSid,omitempty"` + Capabilities *ApiV2010AccountIncomingPhoneNumberCapabilities `json:"Capabilities,omitempty"` + // The RFC 2822 date and time in GMT that the resource was created + DateCreated *string `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT that the resource was last updated + DateUpdated *string `json:"DateUpdated,omitempty"` + // The emergency address configuration to use for emergency calling + EmergencyAddressSid *string `json:"EmergencyAddressSid,omitempty"` + // Whether the phone number is enabled for emergency calling + EmergencyStatus *string `json:"EmergencyStatus,omitempty"` + // The string that you assigned to describe the resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // The SID of the Identity resource associated with number + IdentitySid *string `json:"IdentitySid,omitempty"` + // The phone number's origin. Can be twilio or hosted. + Origin *string `json:"Origin,omitempty"` + // The phone number in E.164 format + PhoneNumber *string `json:"PhoneNumber,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The SID of the Application resource to handle SMS messages + SmsApplicationSid *string `json:"SmsApplicationSid,omitempty"` + // The HTTP method used with sms_fallback_url + SmsFallbackMethod *string `json:"SmsFallbackMethod,omitempty"` + // The URL that we call when an error occurs while retrieving or executing the TwiML + SmsFallbackUrl *string `json:"SmsFallbackUrl,omitempty"` + // The HTTP method to use with sms_url + SmsMethod *string `json:"SmsMethod,omitempty"` + // The URL we call when the phone number receives an incoming SMS message + SmsUrl *string `json:"SmsUrl,omitempty"` + Status *string `json:"Status,omitempty"` + // The URL to send status information to your application + StatusCallback *string `json:"StatusCallback,omitempty"` + // The HTTP method we use to call status_callback + StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` + // The SID of the Trunk that handles calls to the phone number + TrunkSid *string `json:"TrunkSid,omitempty"` + // The URI of the resource, relative to `https://api.twilio.com` + Uri *string `json:"Uri,omitempty"` + // The SID of the application that handles calls to the phone number + VoiceApplicationSid *string `json:"VoiceApplicationSid,omitempty"` + // Whether to lookup the caller's name + VoiceCallerIdLookup *bool `json:"VoiceCallerIdLookup,omitempty"` + // The HTTP method used with voice_fallback_url + VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"` + // The URL we call when an error occurs in TwiML + VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` + // The HTTP method used with the voice_url + VoiceMethod *string `json:"VoiceMethod,omitempty"` + VoiceReceiveMode *string `json:"VoiceReceiveMode,omitempty"` + // The URL we call when this phone number receives a call + VoiceUrl *string `json:"VoiceUrl,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_mobile.go b/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_mobile.go index 4f52d2035..867633ed7 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_mobile.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_mobile.go @@ -13,37 +13,67 @@ package openapi // ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberMobile struct for ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberMobile type ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberMobile struct { - AccountSid *string `json:"AccountSid,omitempty"` - AddressRequirements *IncomingPhoneNumberMobileAddressRequirement `json:"AddressRequirements,omitempty"` - AddressSid *string `json:"AddressSid,omitempty"` - ApiVersion *string `json:"ApiVersion,omitempty"` - Beta *bool `json:"Beta,omitempty"` - BundleSid *string `json:"BundleSid,omitempty"` - Capabilities *PhoneNumberCapabilities `json:"Capabilities,omitempty"` - DateCreated *string `json:"DateCreated,omitempty"` - DateUpdated *string `json:"DateUpdated,omitempty"` - EmergencyAddressSid *string `json:"EmergencyAddressSid,omitempty"` - EmergencyStatus *IncomingPhoneNumberMobileEmergencyStatus `json:"EmergencyStatus,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - IdentitySid *string `json:"IdentitySid,omitempty"` - Origin *string `json:"Origin,omitempty"` - PhoneNumber *string `json:"PhoneNumber,omitempty"` - Sid *string `json:"Sid,omitempty"` - SmsApplicationSid *string `json:"SmsApplicationSid,omitempty"` - SmsFallbackMethod *HttpMethod `json:"SmsFallbackMethod,omitempty"` - SmsFallbackUrl *string `json:"SmsFallbackUrl,omitempty"` - SmsMethod *HttpMethod `json:"SmsMethod,omitempty"` - SmsUrl *string `json:"SmsUrl,omitempty"` - Status *string `json:"Status,omitempty"` - StatusCallback *string `json:"StatusCallback,omitempty"` - StatusCallbackMethod *HttpMethod `json:"StatusCallbackMethod,omitempty"` - TrunkSid *string `json:"TrunkSid,omitempty"` - Uri *string `json:"Uri,omitempty"` - VoiceApplicationSid *string `json:"VoiceApplicationSid,omitempty"` - VoiceCallerIdLookup *bool `json:"VoiceCallerIdLookup,omitempty"` - VoiceFallbackMethod *HttpMethod `json:"VoiceFallbackMethod,omitempty"` - VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` - VoiceMethod *HttpMethod `json:"VoiceMethod,omitempty"` - VoiceReceiveMode *IncomingPhoneNumberMobileVoiceReceiveMode `json:"VoiceReceiveMode,omitempty"` - VoiceUrl *string `json:"VoiceUrl,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // Whether the phone number requires an Address registered with Twilio. + AddressRequirements *string `json:"AddressRequirements,omitempty"` + // The SID of the Address resource associated with the phone number + AddressSid *string `json:"AddressSid,omitempty"` + // The API version used to start a new TwiML session + ApiVersion *string `json:"ApiVersion,omitempty"` + // Whether the phone number is new to the Twilio platform + Beta *bool `json:"Beta,omitempty"` + // The SID of the Bundle resource associated with number + BundleSid *string `json:"BundleSid,omitempty"` + Capabilities *ApiV2010AccountIncomingPhoneNumberCapabilities `json:"Capabilities,omitempty"` + // The RFC 2822 date and time in GMT that the resource was created + DateCreated *string `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT that the resource was last updated + DateUpdated *string `json:"DateUpdated,omitempty"` + // The emergency address configuration to use for emergency calling + EmergencyAddressSid *string `json:"EmergencyAddressSid,omitempty"` + // Whether the phone number is enabled for emergency calling + EmergencyStatus *string `json:"EmergencyStatus,omitempty"` + // The string that you assigned to describe the resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // The SID of the Identity resource associated with number + IdentitySid *string `json:"IdentitySid,omitempty"` + // The phone number's origin. Can be twilio or hosted. + Origin *string `json:"Origin,omitempty"` + // The phone number in E.164 format + PhoneNumber *string `json:"PhoneNumber,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The SID of the application that handles SMS messages sent to the phone number + SmsApplicationSid *string `json:"SmsApplicationSid,omitempty"` + // The HTTP method used with sms_fallback_url + SmsFallbackMethod *string `json:"SmsFallbackMethod,omitempty"` + // The URL that we call when an error occurs while retrieving or executing the TwiML + SmsFallbackUrl *string `json:"SmsFallbackUrl,omitempty"` + // The HTTP method to use with sms_url + SmsMethod *string `json:"SmsMethod,omitempty"` + // The URL we call when the phone number receives an incoming SMS message + SmsUrl *string `json:"SmsUrl,omitempty"` + Status *string `json:"Status,omitempty"` + // The URL to send status information to your application + StatusCallback *string `json:"StatusCallback,omitempty"` + // The HTTP method we use to call status_callback + StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` + // The SID of the Trunk that handles calls to the phone number + TrunkSid *string `json:"TrunkSid,omitempty"` + // The URI of the resource, relative to `https://api.twilio.com` + Uri *string `json:"Uri,omitempty"` + // The SID of the application that handles calls to the phone number + VoiceApplicationSid *string `json:"VoiceApplicationSid,omitempty"` + // Whether to lookup the caller's name + VoiceCallerIdLookup *bool `json:"VoiceCallerIdLookup,omitempty"` + // The HTTP method used with voice_fallback_url + VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"` + // The URL we call when an error occurs in TwiML + VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` + // The HTTP method used with the voice_url + VoiceMethod *string `json:"VoiceMethod,omitempty"` + VoiceReceiveMode *string `json:"VoiceReceiveMode,omitempty"` + // The URL we call when the phone number receives a call + VoiceUrl *string `json:"VoiceUrl,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_toll_free.go b/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_toll_free.go index 7324bedab..bf37d9695 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_toll_free.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_toll_free.go @@ -13,37 +13,67 @@ package openapi // ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberTollFree struct for ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberTollFree type ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberTollFree struct { - AccountSid *string `json:"AccountSid,omitempty"` - AddressRequirements *IncomingPhoneNumberTollFreeAddressRequirement `json:"AddressRequirements,omitempty"` - AddressSid *string `json:"AddressSid,omitempty"` - ApiVersion *string `json:"ApiVersion,omitempty"` - Beta *bool `json:"Beta,omitempty"` - BundleSid *string `json:"BundleSid,omitempty"` - Capabilities *PhoneNumberCapabilities `json:"Capabilities,omitempty"` - DateCreated *string `json:"DateCreated,omitempty"` - DateUpdated *string `json:"DateUpdated,omitempty"` - EmergencyAddressSid *string `json:"EmergencyAddressSid,omitempty"` - EmergencyStatus *IncomingPhoneNumberTollFreeEmergencyStatus `json:"EmergencyStatus,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - IdentitySid *string `json:"IdentitySid,omitempty"` - Origin *string `json:"Origin,omitempty"` - PhoneNumber *string `json:"PhoneNumber,omitempty"` - Sid *string `json:"Sid,omitempty"` - SmsApplicationSid *string `json:"SmsApplicationSid,omitempty"` - SmsFallbackMethod *HttpMethod `json:"SmsFallbackMethod,omitempty"` - SmsFallbackUrl *string `json:"SmsFallbackUrl,omitempty"` - SmsMethod *HttpMethod `json:"SmsMethod,omitempty"` - SmsUrl *string `json:"SmsUrl,omitempty"` - Status *string `json:"Status,omitempty"` - StatusCallback *string `json:"StatusCallback,omitempty"` - StatusCallbackMethod *HttpMethod `json:"StatusCallbackMethod,omitempty"` - TrunkSid *string `json:"TrunkSid,omitempty"` - Uri *string `json:"Uri,omitempty"` - VoiceApplicationSid *string `json:"VoiceApplicationSid,omitempty"` - VoiceCallerIdLookup *bool `json:"VoiceCallerIdLookup,omitempty"` - VoiceFallbackMethod *HttpMethod `json:"VoiceFallbackMethod,omitempty"` - VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` - VoiceMethod *HttpMethod `json:"VoiceMethod,omitempty"` - VoiceReceiveMode *IncomingPhoneNumberTollFreeVoiceReceiveMode `json:"VoiceReceiveMode,omitempty"` - VoiceUrl *string `json:"VoiceUrl,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // Whether the phone number requires an Address registered with Twilio. + AddressRequirements *string `json:"AddressRequirements,omitempty"` + // The SID of the Address resource associated with the phone number + AddressSid *string `json:"AddressSid,omitempty"` + // The API version used to start a new TwiML session + ApiVersion *string `json:"ApiVersion,omitempty"` + // Whether the phone number is new to the Twilio platform + Beta *bool `json:"Beta,omitempty"` + // The SID of the Bundle resource associated with number + BundleSid *string `json:"BundleSid,omitempty"` + Capabilities *ApiV2010AccountIncomingPhoneNumberCapabilities `json:"Capabilities,omitempty"` + // The RFC 2822 date and time in GMT that the resource was created + DateCreated *string `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT that the resource was last updated + DateUpdated *string `json:"DateUpdated,omitempty"` + // The emergency address configuration to use for emergency calling + EmergencyAddressSid *string `json:"EmergencyAddressSid,omitempty"` + // Whether the phone number is enabled for emergency calling + EmergencyStatus *string `json:"EmergencyStatus,omitempty"` + // The string that you assigned to describe the resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // The SID of the Identity resource associated with number + IdentitySid *string `json:"IdentitySid,omitempty"` + // The phone number's origin. Can be twilio or hosted. + Origin *string `json:"Origin,omitempty"` + // The phone number in E.164 format + PhoneNumber *string `json:"PhoneNumber,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The SID of the application that handles SMS messages sent to the phone number + SmsApplicationSid *string `json:"SmsApplicationSid,omitempty"` + // The HTTP method used with sms_fallback_url + SmsFallbackMethod *string `json:"SmsFallbackMethod,omitempty"` + // The URL that we call when an error occurs while retrieving or executing the TwiML + SmsFallbackUrl *string `json:"SmsFallbackUrl,omitempty"` + // The HTTP method to use with sms_url + SmsMethod *string `json:"SmsMethod,omitempty"` + // The URL we call when the phone number receives an incoming SMS message + SmsUrl *string `json:"SmsUrl,omitempty"` + Status *string `json:"Status,omitempty"` + // The URL to send status information to your application + StatusCallback *string `json:"StatusCallback,omitempty"` + // The HTTP method we use to call status_callback + StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` + // The SID of the Trunk that handles calls to the phone number + TrunkSid *string `json:"TrunkSid,omitempty"` + // The URI of the resource, relative to `https://api.twilio.com` + Uri *string `json:"Uri,omitempty"` + // The SID of the application that handles calls to the phone number + VoiceApplicationSid *string `json:"VoiceApplicationSid,omitempty"` + // Whether to lookup the caller's name + VoiceCallerIdLookup *bool `json:"VoiceCallerIdLookup,omitempty"` + // The HTTP method used with voice_fallback_url + VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"` + // The URL we call when an error occurs in TwiML + VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` + // The HTTP method used with the voice_url + VoiceMethod *string `json:"VoiceMethod,omitempty"` + VoiceReceiveMode *string `json:"VoiceReceiveMode,omitempty"` + // The URL we call when the phone number receives a call + VoiceUrl *string `json:"VoiceUrl,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_key.go b/twilio/rest/api/v2010/model_api_v2010_account_key.go index 9360e656a..fc061f0a0 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_key.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_key.go @@ -13,8 +13,12 @@ package openapi // ApiV2010AccountKey struct for ApiV2010AccountKey type ApiV2010AccountKey struct { - DateCreated *string `json:"DateCreated,omitempty"` - DateUpdated *string `json:"DateUpdated,omitempty"` + // The RFC 2822 date and time in GMT that the resource was created + DateCreated *string `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT that the resource was last updated + DateUpdated *string `json:"DateUpdated,omitempty"` + // The string that you assigned to describe the resource FriendlyName *string `json:"FriendlyName,omitempty"` - Sid *string `json:"Sid,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_message.go b/twilio/rest/api/v2010/model_api_v2010_account_message.go index e5c6677a6..56035a891 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_message.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_message.go @@ -13,24 +13,44 @@ package openapi // ApiV2010AccountMessage struct for ApiV2010AccountMessage type ApiV2010AccountMessage struct { - AccountSid *string `json:"AccountSid,omitempty"` - ApiVersion *string `json:"ApiVersion,omitempty"` - Body *string `json:"Body,omitempty"` - DateCreated *string `json:"DateCreated,omitempty"` - DateSent *string `json:"DateSent,omitempty"` - DateUpdated *string `json:"DateUpdated,omitempty"` - Direction *MessageDirection `json:"Direction,omitempty"` - ErrorCode *int32 `json:"ErrorCode,omitempty"` - ErrorMessage *string `json:"ErrorMessage,omitempty"` - From *string `json:"From,omitempty"` - MessagingServiceSid *string `json:"MessagingServiceSid,omitempty"` - NumMedia *string `json:"NumMedia,omitempty"` - NumSegments *string `json:"NumSegments,omitempty"` - Price *string `json:"Price,omitempty"` - PriceUnit *string `json:"PriceUnit,omitempty"` - Sid *string `json:"Sid,omitempty"` - Status *MessageStatus `json:"Status,omitempty"` - SubresourceUris *map[string]interface{} `json:"SubresourceUris,omitempty"` - To *string `json:"To,omitempty"` - Uri *string `json:"Uri,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The API version used to process the message + ApiVersion *string `json:"ApiVersion,omitempty"` + // The message text + Body *string `json:"Body,omitempty"` + // The RFC 2822 date and time in GMT that the resource was created + DateCreated *string `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT when the message was sent + DateSent *string `json:"DateSent,omitempty"` + // The RFC 2822 date and time in GMT that the resource was last updated + DateUpdated *string `json:"DateUpdated,omitempty"` + // The direction of the message + Direction *string `json:"Direction,omitempty"` + // The error code associated with the message + ErrorCode *int32 `json:"ErrorCode,omitempty"` + // The description of the error_code + ErrorMessage *string `json:"ErrorMessage,omitempty"` + // The phone number that initiated the message + From *string `json:"From,omitempty"` + // The SID of the Messaging Service used with the message. + MessagingServiceSid *string `json:"MessagingServiceSid,omitempty"` + // The number of media files associated with the message + NumMedia *string `json:"NumMedia,omitempty"` + // The number of messages used to deliver the message body + NumSegments *string `json:"NumSegments,omitempty"` + // The amount billed for the message + Price *string `json:"Price,omitempty"` + // The currency in which price is measured + PriceUnit *string `json:"PriceUnit,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The status of the message + Status *string `json:"Status,omitempty"` + // A list of related resources identified by their relative URIs + SubresourceUris *map[string]interface{} `json:"SubresourceUris,omitempty"` + // The phone number that received the message + To *string `json:"To,omitempty"` + // The URI of the resource, relative to `https://api.twilio.com` + Uri *string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_message_media.go b/twilio/rest/api/v2010/model_api_v2010_account_message_media.go index a9cfd2485..74d292def 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_message_media.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_message_media.go @@ -13,11 +13,18 @@ package openapi // ApiV2010AccountMessageMedia struct for ApiV2010AccountMessageMedia type ApiV2010AccountMessageMedia struct { - AccountSid *string `json:"AccountSid,omitempty"` + // The SID of the Account that created this resource + AccountSid *string `json:"AccountSid,omitempty"` + // The default mime-type of the media ContentType *string `json:"ContentType,omitempty"` + // The RFC 2822 date and time in GMT that this resource was created DateCreated *string `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT that this resource was last updated DateUpdated *string `json:"DateUpdated,omitempty"` - ParentSid *string `json:"ParentSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Uri *string `json:"Uri,omitempty"` + // The SID of the resource that created the media + ParentSid *string `json:"ParentSid,omitempty"` + // The unique string that identifies this resource + Sid *string `json:"Sid,omitempty"` + // The URI of this resource, relative to `https://api.twilio.com` + Uri *string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_message_message_feedback.go b/twilio/rest/api/v2010/model_api_v2010_account_message_message_feedback.go index 41f60b998..109a3f97d 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_message_message_feedback.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_message_message_feedback.go @@ -13,10 +13,16 @@ package openapi // ApiV2010AccountMessageMessageFeedback struct for ApiV2010AccountMessageMessageFeedback type ApiV2010AccountMessageMessageFeedback struct { - AccountSid *string `json:"AccountSid,omitempty"` - DateCreated *string `json:"DateCreated,omitempty"` - DateUpdated *string `json:"DateUpdated,omitempty"` - MessageSid *string `json:"MessageSid,omitempty"` - Outcome *MessageFeedbackOutcome `json:"Outcome,omitempty"` - Uri *string `json:"Uri,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The RFC 2822 date and time in GMT that the resource was created + DateCreated *string `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT that the resource was last updated + DateUpdated *string `json:"DateUpdated,omitempty"` + // The SID of the Message resource for which the feedback was provided + MessageSid *string `json:"MessageSid,omitempty"` + // Whether the feedback has arrived + Outcome *string `json:"Outcome,omitempty"` + // The URI of the resource, relative to `https://api.twilio.com` + Uri *string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_new_key.go b/twilio/rest/api/v2010/model_api_v2010_account_new_key.go index da77c8606..d92641b58 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_new_key.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_new_key.go @@ -13,9 +13,14 @@ package openapi // ApiV2010AccountNewKey struct for ApiV2010AccountNewKey type ApiV2010AccountNewKey struct { - DateCreated *string `json:"DateCreated,omitempty"` - DateUpdated *string `json:"DateUpdated,omitempty"` + // The RFC 2822 date and time in GMT that the resource was created + DateCreated *string `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT that the resource was last updated + DateUpdated *string `json:"DateUpdated,omitempty"` + // The string that you assigned to describe the resource FriendlyName *string `json:"FriendlyName,omitempty"` - Secret *string `json:"Secret,omitempty"` - Sid *string `json:"Sid,omitempty"` + // The secret your application uses to sign Access Tokens and to authenticate to the REST API. + Secret *string `json:"Secret,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_new_signing_key.go b/twilio/rest/api/v2010/model_api_v2010_account_new_signing_key.go index e408acad4..b17812e25 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_new_signing_key.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_new_signing_key.go @@ -13,9 +13,14 @@ package openapi // ApiV2010AccountNewSigningKey struct for ApiV2010AccountNewSigningKey type ApiV2010AccountNewSigningKey struct { - DateCreated *string `json:"DateCreated,omitempty"` - DateUpdated *string `json:"DateUpdated,omitempty"` + // The RFC 2822 date and time in GMT that the resource was created + DateCreated *string `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT that the resource was last updated + DateUpdated *string `json:"DateUpdated,omitempty"` + // The string that you assigned to describe the resource FriendlyName *string `json:"FriendlyName,omitempty"` - Secret *string `json:"Secret,omitempty"` - Sid *string `json:"Sid,omitempty"` + // The secret your application uses to sign Access Tokens and to authenticate to the REST API. + Secret *string `json:"Secret,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_notification.go b/twilio/rest/api/v2010/model_api_v2010_account_notification.go index 4ef1db4b9..93e1e1c1c 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_notification.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_notification.go @@ -13,18 +13,32 @@ package openapi // ApiV2010AccountNotification struct for ApiV2010AccountNotification type ApiV2010AccountNotification struct { - AccountSid *string `json:"AccountSid,omitempty"` - ApiVersion *string `json:"ApiVersion,omitempty"` - CallSid *string `json:"CallSid,omitempty"` - DateCreated *string `json:"DateCreated,omitempty"` - DateUpdated *string `json:"DateUpdated,omitempty"` - ErrorCode *string `json:"ErrorCode,omitempty"` - Log *string `json:"Log,omitempty"` - MessageDate *string `json:"MessageDate,omitempty"` - MessageText *string `json:"MessageText,omitempty"` - MoreInfo *string `json:"MoreInfo,omitempty"` - RequestMethod *HttpMethod `json:"RequestMethod,omitempty"` - RequestUrl *string `json:"RequestUrl,omitempty"` - Sid *string `json:"Sid,omitempty"` - Uri *string `json:"Uri,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The API version used to generate the notification + ApiVersion *string `json:"ApiVersion,omitempty"` + // The SID of the Call the resource is associated with + CallSid *string `json:"CallSid,omitempty"` + // The RFC 2822 date and time in GMT that the resource was created + DateCreated *string `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT that the resource was last updated + DateUpdated *string `json:"DateUpdated,omitempty"` + // A unique error code corresponding to the notification + ErrorCode *string `json:"ErrorCode,omitempty"` + // An integer log level + Log *string `json:"Log,omitempty"` + // The date the notification was generated + MessageDate *string `json:"MessageDate,omitempty"` + // The text of the notification + MessageText *string `json:"MessageText,omitempty"` + // A URL for more information about the error code + MoreInfo *string `json:"MoreInfo,omitempty"` + // HTTP method used with the request url + RequestMethod *string `json:"RequestMethod,omitempty"` + // URL of the resource that generated the notification + RequestUrl *string `json:"RequestUrl,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The URI of the resource, relative to `https://api.twilio.com` + Uri *string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_notification_instance.go b/twilio/rest/api/v2010/model_api_v2010_account_notification_instance.go index 2247ee7d0..4364a1774 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_notification_instance.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_notification_instance.go @@ -13,21 +13,38 @@ package openapi // ApiV2010AccountNotificationInstance struct for ApiV2010AccountNotificationInstance type ApiV2010AccountNotificationInstance struct { - AccountSid *string `json:"AccountSid,omitempty"` - ApiVersion *string `json:"ApiVersion,omitempty"` - CallSid *string `json:"CallSid,omitempty"` - DateCreated *string `json:"DateCreated,omitempty"` - DateUpdated *string `json:"DateUpdated,omitempty"` - ErrorCode *string `json:"ErrorCode,omitempty"` - Log *string `json:"Log,omitempty"` - MessageDate *string `json:"MessageDate,omitempty"` - MessageText *string `json:"MessageText,omitempty"` - MoreInfo *string `json:"MoreInfo,omitempty"` - RequestMethod *HttpMethod `json:"RequestMethod,omitempty"` - RequestUrl *string `json:"RequestUrl,omitempty"` - RequestVariables *string `json:"RequestVariables,omitempty"` - ResponseBody *string `json:"ResponseBody,omitempty"` - ResponseHeaders *string `json:"ResponseHeaders,omitempty"` - Sid *string `json:"Sid,omitempty"` - Uri *string `json:"Uri,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The API version used to generate the notification + ApiVersion *string `json:"ApiVersion,omitempty"` + // The SID of the Call the resource is associated with + CallSid *string `json:"CallSid,omitempty"` + // The RFC 2822 date and time in GMT that the resource was created + DateCreated *string `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT that the resource was last updated + DateUpdated *string `json:"DateUpdated,omitempty"` + // A unique error code corresponding to the notification + ErrorCode *string `json:"ErrorCode,omitempty"` + // An integer log level + Log *string `json:"Log,omitempty"` + // The date the notification was generated + MessageDate *string `json:"MessageDate,omitempty"` + // The text of the notification + MessageText *string `json:"MessageText,omitempty"` + // A URL for more information about the error code + MoreInfo *string `json:"MoreInfo,omitempty"` + // HTTP method used with the request url + RequestMethod *string `json:"RequestMethod,omitempty"` + // URL of the resource that generated the notification + RequestUrl *string `json:"RequestUrl,omitempty"` + // Twilio-generated HTTP variables sent to the server + RequestVariables *string `json:"RequestVariables,omitempty"` + // The HTTP body returned by your server + ResponseBody *string `json:"ResponseBody,omitempty"` + // The HTTP headers returned by your server + ResponseHeaders *string `json:"ResponseHeaders,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The URI of the resource, relative to `https://api.twilio.com` + Uri *string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_outgoing_caller_id.go b/twilio/rest/api/v2010/model_api_v2010_account_outgoing_caller_id.go index 3d4b22fbe..997772792 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_outgoing_caller_id.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_outgoing_caller_id.go @@ -13,11 +13,18 @@ package openapi // ApiV2010AccountOutgoingCallerId struct for ApiV2010AccountOutgoingCallerId type ApiV2010AccountOutgoingCallerId struct { - AccountSid *string `json:"AccountSid,omitempty"` - DateCreated *string `json:"DateCreated,omitempty"` - DateUpdated *string `json:"DateUpdated,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The RFC 2822 date and time in GMT that the resource was created + DateCreated *string `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT that the resource was last updated + DateUpdated *string `json:"DateUpdated,omitempty"` + // The string that you assigned to describe the resource FriendlyName *string `json:"FriendlyName,omitempty"` - PhoneNumber *string `json:"PhoneNumber,omitempty"` - Sid *string `json:"Sid,omitempty"` - Uri *string `json:"Uri,omitempty"` + // The phone number in E.164 format + PhoneNumber *string `json:"PhoneNumber,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The URI of the resource, relative to `https://api.twilio.com` + Uri *string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_queue.go b/twilio/rest/api/v2010/model_api_v2010_account_queue.go index bf5f01854..44b011469 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_queue.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_queue.go @@ -13,13 +13,22 @@ package openapi // ApiV2010AccountQueue struct for ApiV2010AccountQueue type ApiV2010AccountQueue struct { - AccountSid *string `json:"AccountSid,omitempty"` - AverageWaitTime *int32 `json:"AverageWaitTime,omitempty"` - CurrentSize *int32 `json:"CurrentSize,omitempty"` - DateCreated *string `json:"DateCreated,omitempty"` - DateUpdated *string `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - MaxSize *int32 `json:"MaxSize,omitempty"` - Sid *string `json:"Sid,omitempty"` - Uri *string `json:"Uri,omitempty"` + // The SID of the Account that created this resource + AccountSid *string `json:"AccountSid,omitempty"` + // Average wait time of members in the queue + AverageWaitTime *int32 `json:"AverageWaitTime,omitempty"` + // The number of calls currently in the queue. + CurrentSize *int32 `json:"CurrentSize,omitempty"` + // The RFC 2822 date and time in GMT that this resource was created + DateCreated *string `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT that this resource was last updated + DateUpdated *string `json:"DateUpdated,omitempty"` + // A string that you assigned to describe this resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // The max number of calls allowed in the queue + MaxSize *int32 `json:"MaxSize,omitempty"` + // The unique string that identifies this resource + Sid *string `json:"Sid,omitempty"` + // The URI of this resource, relative to `https://api.twilio.com` + Uri *string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_queue_member.go b/twilio/rest/api/v2010/model_api_v2010_account_queue_member.go index 7d9e58c97..bff575ce9 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_queue_member.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_queue_member.go @@ -13,10 +13,16 @@ package openapi // ApiV2010AccountQueueMember struct for ApiV2010AccountQueueMember type ApiV2010AccountQueueMember struct { - CallSid *string `json:"CallSid,omitempty"` + // The SID of the Call the resource is associated with + CallSid *string `json:"CallSid,omitempty"` + // The date the member was enqueued DateEnqueued *string `json:"DateEnqueued,omitempty"` - Position *int32 `json:"Position,omitempty"` - QueueSid *string `json:"QueueSid,omitempty"` - Uri *string `json:"Uri,omitempty"` - WaitTime *int32 `json:"WaitTime,omitempty"` + // This member's current position in the queue. + Position *int32 `json:"Position,omitempty"` + // The SID of the Queue the member is in + QueueSid *string `json:"QueueSid,omitempty"` + // The URI of the resource, relative to `https://api.twilio.com` + Uri *string `json:"Uri,omitempty"` + // The number of seconds the member has been in the queue. + WaitTime *int32 `json:"WaitTime,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_recording.go b/twilio/rest/api/v2010/model_api_v2010_account_recording.go index cd6f5d742..f35fff909 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_recording.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_recording.go @@ -13,22 +13,40 @@ package openapi // ApiV2010AccountRecording struct for ApiV2010AccountRecording type ApiV2010AccountRecording struct { - AccountSid *string `json:"AccountSid,omitempty"` - ApiVersion *string `json:"ApiVersion,omitempty"` - CallSid *string `json:"CallSid,omitempty"` - Channels *int32 `json:"Channels,omitempty"` - ConferenceSid *string `json:"ConferenceSid,omitempty"` - DateCreated *string `json:"DateCreated,omitempty"` - DateUpdated *string `json:"DateUpdated,omitempty"` - Duration *string `json:"Duration,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The API version used during the recording. + ApiVersion *string `json:"ApiVersion,omitempty"` + // The SID of the Call the resource is associated with + CallSid *string `json:"CallSid,omitempty"` + // The number of channels in the final recording file as an integer. + Channels *int32 `json:"Channels,omitempty"` + // The unique ID for the conference associated with the recording. + ConferenceSid *string `json:"ConferenceSid,omitempty"` + // The RFC 2822 date and time in GMT that the resource was created + DateCreated *string `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT that the resource was last updated + DateUpdated *string `json:"DateUpdated,omitempty"` + // The length of the recording in seconds. + Duration *string `json:"Duration,omitempty"` + // How to decrypt the recording. EncryptionDetails *map[string]interface{} `json:"EncryptionDetails,omitempty"` - ErrorCode *int32 `json:"ErrorCode,omitempty"` - Price *string `json:"Price,omitempty"` - PriceUnit *string `json:"PriceUnit,omitempty"` - Sid *string `json:"Sid,omitempty"` - Source *RecordingSource `json:"Source,omitempty"` - StartTime *string `json:"StartTime,omitempty"` - Status *RecordingStatus `json:"Status,omitempty"` - SubresourceUris *map[string]interface{} `json:"SubresourceUris,omitempty"` - Uri *string `json:"Uri,omitempty"` + // More information about why the recording is missing, if status is `absent`. + ErrorCode *int32 `json:"ErrorCode,omitempty"` + // The one-time cost of creating the recording. + Price *string `json:"Price,omitempty"` + // The currency used in the price property. + PriceUnit *string `json:"PriceUnit,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // How the recording was created + Source *string `json:"Source,omitempty"` + // The start time of the recording, given in RFC 2822 format + StartTime *string `json:"StartTime,omitempty"` + // The status of the recording. + Status *string `json:"Status,omitempty"` + // A list of related resources identified by their relative URIs + SubresourceUris *map[string]interface{} `json:"SubresourceUris,omitempty"` + // The URI of the resource, relative to `https://api.twilio.com` + Uri *string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_recording_recording_add_on_result.go b/twilio/rest/api/v2010/model_api_v2010_account_recording_recording_add_on_result.go index c44c90df0..10097b7ab 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_recording_recording_add_on_result.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_recording_recording_add_on_result.go @@ -13,14 +13,24 @@ package openapi // ApiV2010AccountRecordingRecordingAddOnResult struct for ApiV2010AccountRecordingRecordingAddOnResult type ApiV2010AccountRecordingRecordingAddOnResult struct { - AccountSid *string `json:"AccountSid,omitempty"` - AddOnConfigurationSid *string `json:"AddOnConfigurationSid,omitempty"` - AddOnSid *string `json:"AddOnSid,omitempty"` - DateCompleted *string `json:"DateCompleted,omitempty"` - DateCreated *string `json:"DateCreated,omitempty"` - DateUpdated *string `json:"DateUpdated,omitempty"` - ReferenceSid *string `json:"ReferenceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Status *RecordingAddOnResultStatus `json:"Status,omitempty"` - SubresourceUris *map[string]interface{} `json:"SubresourceUris,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The SID of the Add-on configuration + AddOnConfigurationSid *string `json:"AddOnConfigurationSid,omitempty"` + // The SID of the Add-on to which the result belongs + AddOnSid *string `json:"AddOnSid,omitempty"` + // The date and time in GMT that the result was completed + DateCompleted *string `json:"DateCompleted,omitempty"` + // The RFC 2822 date and time in GMT that the resource was created + DateCreated *string `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT that the resource was last updated + DateUpdated *string `json:"DateUpdated,omitempty"` + // The SID of the recording to which the AddOnResult resource belongs + ReferenceSid *string `json:"ReferenceSid,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The status of the result + Status *string `json:"Status,omitempty"` + // A list of related resources identified by their relative URIs + SubresourceUris *map[string]interface{} `json:"SubresourceUris,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_recording_recording_add_on_result_recording_add_on_result_payload.go b/twilio/rest/api/v2010/model_api_v2010_account_recording_recording_add_on_result_recording_add_on_result_payload.go index 7b624c514..51fd023cf 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_recording_recording_add_on_result_recording_add_on_result_payload.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_recording_recording_add_on_result_recording_add_on_result_payload.go @@ -13,15 +13,26 @@ package openapi // ApiV2010AccountRecordingRecordingAddOnResultRecordingAddOnResultPayload struct for ApiV2010AccountRecordingRecordingAddOnResultRecordingAddOnResultPayload type ApiV2010AccountRecordingRecordingAddOnResultRecordingAddOnResultPayload struct { - AccountSid *string `json:"AccountSid,omitempty"` - AddOnConfigurationSid *string `json:"AddOnConfigurationSid,omitempty"` - AddOnResultSid *string `json:"AddOnResultSid,omitempty"` - AddOnSid *string `json:"AddOnSid,omitempty"` - ContentType *string `json:"ContentType,omitempty"` - DateCreated *string `json:"DateCreated,omitempty"` - DateUpdated *string `json:"DateUpdated,omitempty"` - Label *string `json:"Label,omitempty"` - ReferenceSid *string `json:"ReferenceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - SubresourceUris *map[string]interface{} `json:"SubresourceUris,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The SID of the Add-on configuration + AddOnConfigurationSid *string `json:"AddOnConfigurationSid,omitempty"` + // The SID of the AddOnResult to which the payload belongs + AddOnResultSid *string `json:"AddOnResultSid,omitempty"` + // The SID of the Add-on to which the result belongs + AddOnSid *string `json:"AddOnSid,omitempty"` + // The MIME type of the payload + ContentType *string `json:"ContentType,omitempty"` + // The RFC 2822 date and time in GMT that the resource was created + DateCreated *string `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT that the resource was last updated + DateUpdated *string `json:"DateUpdated,omitempty"` + // The string that describes the payload + Label *string `json:"Label,omitempty"` + // The SID of the recording to which the AddOnResult resource that contains the payload belongs + ReferenceSid *string `json:"ReferenceSid,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // A list of related resources identified by their relative URIs + SubresourceUris *map[string]interface{} `json:"SubresourceUris,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_recording_recording_transcription.go b/twilio/rest/api/v2010/model_api_v2010_account_recording_recording_transcription.go index d715f35b5..f895d2f41 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_recording_recording_transcription.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_recording_recording_transcription.go @@ -13,17 +13,30 @@ package openapi // ApiV2010AccountRecordingRecordingTranscription struct for ApiV2010AccountRecordingRecordingTranscription type ApiV2010AccountRecordingRecordingTranscription struct { - AccountSid *string `json:"AccountSid,omitempty"` - ApiVersion *string `json:"ApiVersion,omitempty"` - DateCreated *string `json:"DateCreated,omitempty"` - DateUpdated *string `json:"DateUpdated,omitempty"` - Duration *string `json:"Duration,omitempty"` - Price *float32 `json:"Price,omitempty"` - PriceUnit *string `json:"PriceUnit,omitempty"` - RecordingSid *string `json:"RecordingSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Status *RecordingTranscriptionStatus `json:"Status,omitempty"` - TranscriptionText *string `json:"TranscriptionText,omitempty"` - Type *string `json:"Type,omitempty"` - Uri *string `json:"Uri,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The API version used to create the transcription + ApiVersion *string `json:"ApiVersion,omitempty"` + // The RFC 2822 date and time in GMT that the resource was created + DateCreated *string `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT that the resource was last updated + DateUpdated *string `json:"DateUpdated,omitempty"` + // The duration of the transcribed audio in seconds. + Duration *string `json:"Duration,omitempty"` + // The charge for the transcription + Price *float32 `json:"Price,omitempty"` + // The currency in which price is measured + PriceUnit *string `json:"PriceUnit,omitempty"` + // The SID that identifies the transcription's recording + RecordingSid *string `json:"RecordingSid,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The status of the transcription + Status *string `json:"Status,omitempty"` + // The text content of the transcription. + TranscriptionText *string `json:"TranscriptionText,omitempty"` + // The transcription type + Type *string `json:"Type,omitempty"` + // The URI of the resource, relative to `https://api.twilio.com` + Uri *string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_short_code.go b/twilio/rest/api/v2010/model_api_v2010_account_short_code.go index 0f554232b..d0517f2cc 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_short_code.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_short_code.go @@ -13,16 +13,28 @@ package openapi // ApiV2010AccountShortCode struct for ApiV2010AccountShortCode type ApiV2010AccountShortCode struct { - AccountSid *string `json:"AccountSid,omitempty"` - ApiVersion *string `json:"ApiVersion,omitempty"` - DateCreated *string `json:"DateCreated,omitempty"` - DateUpdated *string `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - ShortCode *string `json:"ShortCode,omitempty"` - Sid *string `json:"Sid,omitempty"` - SmsFallbackMethod *HttpMethod `json:"SmsFallbackMethod,omitempty"` - SmsFallbackUrl *string `json:"SmsFallbackUrl,omitempty"` - SmsMethod *HttpMethod `json:"SmsMethod,omitempty"` - SmsUrl *string `json:"SmsUrl,omitempty"` - Uri *string `json:"Uri,omitempty"` + // The SID of the Account that created this resource + AccountSid *string `json:"AccountSid,omitempty"` + // The API version used to start a new TwiML session + ApiVersion *string `json:"ApiVersion,omitempty"` + // The RFC 2822 date and time in GMT that this resource was created + DateCreated *string `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT that this resource was last updated + DateUpdated *string `json:"DateUpdated,omitempty"` + // A string that you assigned to describe this resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // The short code. e.g., 894546. + ShortCode *string `json:"ShortCode,omitempty"` + // The unique string that identifies this resource + Sid *string `json:"Sid,omitempty"` + // HTTP method we use to call the sms_fallback_url + SmsFallbackMethod *string `json:"SmsFallbackMethod,omitempty"` + // URL Twilio will request if an error occurs in executing TwiML + SmsFallbackUrl *string `json:"SmsFallbackUrl,omitempty"` + // HTTP method to use when requesting the sms url + SmsMethod *string `json:"SmsMethod,omitempty"` + // URL we call when receiving an incoming SMS message to this short code + SmsUrl *string `json:"SmsUrl,omitempty"` + // The URI of this resource, relative to `https://api.twilio.com` + Uri *string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_credential_list.go b/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_credential_list.go index 72d041e6f..2c95c8767 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_credential_list.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_credential_list.go @@ -13,11 +13,18 @@ package openapi // ApiV2010AccountSipSipCredentialList struct for ApiV2010AccountSipSipCredentialList type ApiV2010AccountSipSipCredentialList struct { - AccountSid *string `json:"AccountSid,omitempty"` - DateCreated *string `json:"DateCreated,omitempty"` - DateUpdated *string `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Sid *string `json:"Sid,omitempty"` + // The unique sid that identifies this account + AccountSid *string `json:"AccountSid,omitempty"` + // The date this resource was created + DateCreated *string `json:"DateCreated,omitempty"` + // The date this resource was last updated + DateUpdated *string `json:"DateUpdated,omitempty"` + // Human readable descriptive text + FriendlyName *string `json:"FriendlyName,omitempty"` + // A string that uniquely identifies this credential + Sid *string `json:"Sid,omitempty"` + // The list of credentials associated with this credential list. SubresourceUris *map[string]interface{} `json:"SubresourceUris,omitempty"` - Uri *string `json:"Uri,omitempty"` + // The URI for this resource + Uri *string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_credential_list_sip_credential.go b/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_credential_list_sip_credential.go index 8256ca8a2..785693328 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_credential_list_sip_credential.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_credential_list_sip_credential.go @@ -13,11 +13,18 @@ package openapi // ApiV2010AccountSipSipCredentialListSipCredential struct for ApiV2010AccountSipSipCredentialListSipCredential type ApiV2010AccountSipSipCredentialListSipCredential struct { - AccountSid *string `json:"AccountSid,omitempty"` + // The unique id of the Account that is responsible for this resource. + AccountSid *string `json:"AccountSid,omitempty"` + // The unique id that identifies the credential list that includes this credential CredentialListSid *string `json:"CredentialListSid,omitempty"` - DateCreated *string `json:"DateCreated,omitempty"` - DateUpdated *string `json:"DateUpdated,omitempty"` - Sid *string `json:"Sid,omitempty"` - Uri *string `json:"Uri,omitempty"` - Username *string `json:"Username,omitempty"` + // The date that this resource was created, given as GMT in RFC 2822 format. + DateCreated *string `json:"DateCreated,omitempty"` + // The date that this resource was last updated, given as GMT in RFC 2822 format. + DateUpdated *string `json:"DateUpdated,omitempty"` + // A 34 character string that uniquely identifies this resource. + Sid *string `json:"Sid,omitempty"` + // The URI for this resource, relative to https://api.twilio.com + Uri *string `json:"Uri,omitempty"` + // The username for this credential. + Username *string `json:"Username,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_domain.go b/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_domain.go index c4f8803c2..fc83afa52 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_domain.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_domain.go @@ -13,25 +13,46 @@ package openapi // ApiV2010AccountSipSipDomain struct for ApiV2010AccountSipSipDomain type ApiV2010AccountSipSipDomain struct { - AccountSid *string `json:"AccountSid,omitempty"` - ApiVersion *string `json:"ApiVersion,omitempty"` - AuthType *string `json:"AuthType,omitempty"` - ByocTrunkSid *string `json:"ByocTrunkSid,omitempty"` - DateCreated *string `json:"DateCreated,omitempty"` - DateUpdated *string `json:"DateUpdated,omitempty"` - DomainName *string `json:"DomainName,omitempty"` - EmergencyCallerSid *string `json:"EmergencyCallerSid,omitempty"` - EmergencyCallingEnabled *bool `json:"EmergencyCallingEnabled,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Secure *bool `json:"Secure,omitempty"` - Sid *string `json:"Sid,omitempty"` - SipRegistration *bool `json:"SipRegistration,omitempty"` - SubresourceUris *map[string]interface{} `json:"SubresourceUris,omitempty"` - Uri *string `json:"Uri,omitempty"` - VoiceFallbackMethod *HttpMethod `json:"VoiceFallbackMethod,omitempty"` - VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` - VoiceMethod *HttpMethod `json:"VoiceMethod,omitempty"` - VoiceStatusCallbackMethod *HttpMethod `json:"VoiceStatusCallbackMethod,omitempty"` - VoiceStatusCallbackUrl *string `json:"VoiceStatusCallbackUrl,omitempty"` - VoiceUrl *string `json:"VoiceUrl,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The API version used to process the call + ApiVersion *string `json:"ApiVersion,omitempty"` + // The types of authentication mapped to the domain + AuthType *string `json:"AuthType,omitempty"` + // The SID of the BYOC Trunk resource. + ByocTrunkSid *string `json:"ByocTrunkSid,omitempty"` + // The RFC 2822 date and time in GMT that the resource was created + DateCreated *string `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT that the resource was last updated + DateUpdated *string `json:"DateUpdated,omitempty"` + // The unique address on Twilio to route SIP traffic + DomainName *string `json:"DomainName,omitempty"` + // Whether an emergency caller sid is configured for the domain. + EmergencyCallerSid *string `json:"EmergencyCallerSid,omitempty"` + // Whether emergency calling is enabled for the domain. + EmergencyCallingEnabled *bool `json:"EmergencyCallingEnabled,omitempty"` + // The string that you assigned to describe the resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // Whether secure SIP is enabled for the domain + Secure *bool `json:"Secure,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // Whether SIP registration is allowed + SipRegistration *bool `json:"SipRegistration,omitempty"` + // A list mapping resources associated with the SIP Domain resource + SubresourceUris *map[string]interface{} `json:"SubresourceUris,omitempty"` + // The URI of the resource, relative to `https://api.twilio.com` + Uri *string `json:"Uri,omitempty"` + // The HTTP method used with voice_fallback_url + VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"` + // The URL we call when an error occurs while executing TwiML + VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` + // The HTTP method to use with voice_url + VoiceMethod *string `json:"VoiceMethod,omitempty"` + // The HTTP method we use to call voice_status_callback_url + VoiceStatusCallbackMethod *string `json:"VoiceStatusCallbackMethod,omitempty"` + // The URL that we call with status updates + VoiceStatusCallbackUrl *string `json:"VoiceStatusCallbackUrl,omitempty"` + // The URL we call when receiving a call + VoiceUrl *string `json:"VoiceUrl,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_auth_sip_auth_calls_sip_auth_calls_credential_list_mapping.go b/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_auth_sip_auth_calls_sip_auth_calls_credential_list_mapping.go index e92dbef1b..57dc44e9d 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_auth_sip_auth_calls_sip_auth_calls_credential_list_mapping.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_auth_sip_auth_calls_sip_auth_calls_credential_list_mapping.go @@ -13,9 +13,14 @@ package openapi // ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsCredentialListMapping struct for ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsCredentialListMapping type ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsCredentialListMapping struct { - AccountSid *string `json:"AccountSid,omitempty"` - DateCreated *string `json:"DateCreated,omitempty"` - DateUpdated *string `json:"DateUpdated,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The RFC 2822 date and time in GMT that the resource was created + DateCreated *string `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT that the resource was last updated + DateUpdated *string `json:"DateUpdated,omitempty"` + // The string that you assigned to describe the resource FriendlyName *string `json:"FriendlyName,omitempty"` - Sid *string `json:"Sid,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_auth_sip_auth_calls_sip_auth_calls_ip_access_control_list_mapping.go b/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_auth_sip_auth_calls_sip_auth_calls_ip_access_control_list_mapping.go index 0c7ea2ecf..629dcf9e6 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_auth_sip_auth_calls_sip_auth_calls_ip_access_control_list_mapping.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_auth_sip_auth_calls_sip_auth_calls_ip_access_control_list_mapping.go @@ -13,9 +13,14 @@ package openapi // ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsIpAccessControlListMapping struct for ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsIpAccessControlListMapping type ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsIpAccessControlListMapping struct { - AccountSid *string `json:"AccountSid,omitempty"` - DateCreated *string `json:"DateCreated,omitempty"` - DateUpdated *string `json:"DateUpdated,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The RFC 2822 date and time in GMT that the resource was created + DateCreated *string `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT that the resource was last updated + DateUpdated *string `json:"DateUpdated,omitempty"` + // The string that you assigned to describe the resource FriendlyName *string `json:"FriendlyName,omitempty"` - Sid *string `json:"Sid,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_auth_sip_auth_registrations_sip_auth_registrations_credential_list_mapping.go b/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_auth_sip_auth_registrations_sip_auth_registrations_credential_list_mapping.go index cf4572ff5..61804a522 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_auth_sip_auth_registrations_sip_auth_registrations_credential_list_mapping.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_auth_sip_auth_registrations_sip_auth_registrations_credential_list_mapping.go @@ -13,9 +13,14 @@ package openapi // ApiV2010AccountSipSipDomainSipAuthSipAuthRegistrationsSipAuthRegistrationsCredentialListMapping struct for ApiV2010AccountSipSipDomainSipAuthSipAuthRegistrationsSipAuthRegistrationsCredentialListMapping type ApiV2010AccountSipSipDomainSipAuthSipAuthRegistrationsSipAuthRegistrationsCredentialListMapping struct { - AccountSid *string `json:"AccountSid,omitempty"` - DateCreated *string `json:"DateCreated,omitempty"` - DateUpdated *string `json:"DateUpdated,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The RFC 2822 date and time in GMT that the resource was created + DateCreated *string `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT that the resource was last updated + DateUpdated *string `json:"DateUpdated,omitempty"` + // The string that you assigned to describe the resource FriendlyName *string `json:"FriendlyName,omitempty"` - Sid *string `json:"Sid,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_credential_list_mapping.go b/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_credential_list_mapping.go index 1eb86d0f6..336f58ee7 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_credential_list_mapping.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_credential_list_mapping.go @@ -13,11 +13,18 @@ package openapi // ApiV2010AccountSipSipDomainSipCredentialListMapping struct for ApiV2010AccountSipSipDomainSipCredentialListMapping type ApiV2010AccountSipSipDomainSipCredentialListMapping struct { - AccountSid *string `json:"AccountSid,omitempty"` - DateCreated *string `json:"DateCreated,omitempty"` - DateUpdated *string `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Sid *string `json:"Sid,omitempty"` + // The unique id of the Account that is responsible for this resource. + AccountSid *string `json:"AccountSid,omitempty"` + // The date that this resource was created, given as GMT in RFC 2822 format. + DateCreated *string `json:"DateCreated,omitempty"` + // The date that this resource was last updated, given as GMT in RFC 2822 format. + DateUpdated *string `json:"DateUpdated,omitempty"` + // A human readable descriptive text for this resource, up to 64 characters long. + FriendlyName *string `json:"FriendlyName,omitempty"` + // A 34 character string that uniquely identifies this resource. + Sid *string `json:"Sid,omitempty"` + // The credentials associated with this resource. SubresourceUris *map[string]interface{} `json:"SubresourceUris,omitempty"` - Uri *string `json:"Uri,omitempty"` + // The URI for this resource, relative to https://api.twilio.com + Uri *string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_ip_access_control_list_mapping.go b/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_ip_access_control_list_mapping.go index e87636d92..8f4612414 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_ip_access_control_list_mapping.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_ip_access_control_list_mapping.go @@ -13,11 +13,18 @@ package openapi // ApiV2010AccountSipSipDomainSipIpAccessControlListMapping struct for ApiV2010AccountSipSipDomainSipIpAccessControlListMapping type ApiV2010AccountSipSipDomainSipIpAccessControlListMapping struct { - AccountSid *string `json:"AccountSid,omitempty"` - DateCreated *string `json:"DateCreated,omitempty"` - DateUpdated *string `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Sid *string `json:"Sid,omitempty"` + // The unique id of the Account that is responsible for this resource. + AccountSid *string `json:"AccountSid,omitempty"` + // The date that this resource was created, given as GMT in RFC 2822 format. + DateCreated *string `json:"DateCreated,omitempty"` + // The date that this resource was last updated, given as GMT in RFC 2822 format. + DateUpdated *string `json:"DateUpdated,omitempty"` + // A human readable descriptive text for this resource, up to 64 characters long. + FriendlyName *string `json:"FriendlyName,omitempty"` + // A 34 character string that uniquely identifies this resource. + Sid *string `json:"Sid,omitempty"` + // The list of IP addresses associated with this domain. SubresourceUris *map[string]interface{} `json:"SubresourceUris,omitempty"` - Uri *string `json:"Uri,omitempty"` + // The URI for this resource, relative to https://api.twilio.com + Uri *string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_ip_access_control_list.go b/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_ip_access_control_list.go index a8cda6ea2..6a19cbd50 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_ip_access_control_list.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_ip_access_control_list.go @@ -13,11 +13,18 @@ package openapi // ApiV2010AccountSipSipIpAccessControlList struct for ApiV2010AccountSipSipIpAccessControlList type ApiV2010AccountSipSipIpAccessControlList struct { - AccountSid *string `json:"AccountSid,omitempty"` - DateCreated *string `json:"DateCreated,omitempty"` - DateUpdated *string `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Sid *string `json:"Sid,omitempty"` + // The unique sid that identifies this account + AccountSid *string `json:"AccountSid,omitempty"` + // The date this resource was created + DateCreated *string `json:"DateCreated,omitempty"` + // The date this resource was last updated + DateUpdated *string `json:"DateUpdated,omitempty"` + // A human readable description of this resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // A string that uniquely identifies this resource + Sid *string `json:"Sid,omitempty"` + // The IP addresses associated with this resource. SubresourceUris *map[string]interface{} `json:"SubresourceUris,omitempty"` - Uri *string `json:"Uri,omitempty"` + // The URI for this resource + Uri *string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_ip_access_control_list_sip_ip_address.go b/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_ip_access_control_list_sip_ip_address.go index e456edbac..63b02de70 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_ip_access_control_list_sip_ip_address.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_ip_access_control_list_sip_ip_address.go @@ -13,13 +13,22 @@ package openapi // ApiV2010AccountSipSipIpAccessControlListSipIpAddress struct for ApiV2010AccountSipSipIpAccessControlListSipIpAddress type ApiV2010AccountSipSipIpAccessControlListSipIpAddress struct { - AccountSid *string `json:"AccountSid,omitempty"` - CidrPrefixLength *int32 `json:"CidrPrefixLength,omitempty"` - DateCreated *string `json:"DateCreated,omitempty"` - DateUpdated *string `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` + // The unique id of the Account that is responsible for this resource. + AccountSid *string `json:"AccountSid,omitempty"` + // An integer representing the length of the CIDR prefix to use with this IP address when accepting traffic. By default the entire IP address is used. + CidrPrefixLength *int32 `json:"CidrPrefixLength,omitempty"` + // The date that this resource was created, given as GMT in RFC 2822 format. + DateCreated *string `json:"DateCreated,omitempty"` + // The date that this resource was last updated, given as GMT in RFC 2822 format. + DateUpdated *string `json:"DateUpdated,omitempty"` + // A human readable descriptive text for this resource, up to 64 characters long. + FriendlyName *string `json:"FriendlyName,omitempty"` + // The unique id of the IpAccessControlList resource that includes this resource. IpAccessControlListSid *string `json:"IpAccessControlListSid,omitempty"` - IpAddress *string `json:"IpAddress,omitempty"` - Sid *string `json:"Sid,omitempty"` - Uri *string `json:"Uri,omitempty"` + // An IP address in dotted decimal notation from which you want to accept traffic. Any SIP requests from this IP address will be allowed by Twilio. IPv4 only supported today. + IpAddress *string `json:"IpAddress,omitempty"` + // A 34 character string that uniquely identifies this resource. + Sid *string `json:"Sid,omitempty"` + // The URI for this resource, relative to https://api.twilio.com + Uri *string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_token.go b/twilio/rest/api/v2010/model_api_v2010_account_token.go index 5b4331b58..b327f4ee3 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_token.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_token.go @@ -13,11 +13,18 @@ package openapi // ApiV2010AccountToken struct for ApiV2010AccountToken type ApiV2010AccountToken struct { - AccountSid *string `json:"AccountSid,omitempty"` - DateCreated *string `json:"DateCreated,omitempty"` - DateUpdated *string `json:"DateUpdated,omitempty"` - IceServers *[]map[string]interface{} `json:"IceServers,omitempty"` - Password *string `json:"Password,omitempty"` - Ttl *string `json:"Ttl,omitempty"` - Username *string `json:"Username,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The RFC 2822 date and time in GMT that the resource was created + DateCreated *string `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT that the resource was last updated + DateUpdated *string `json:"DateUpdated,omitempty"` + // An array representing the ephemeral credentials + IceServers *[]ApiV2010AccountTokenIceServers `json:"IceServers,omitempty"` + // The temporary password used for authenticating + Password *string `json:"Password,omitempty"` + // The duration in seconds the credentials are valid + Ttl *string `json:"Ttl,omitempty"` + // The temporary username that uniquely identifies a Token + Username *string `json:"Username,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_token_ice_servers.go b/twilio/rest/api/v2010/model_api_v2010_account_token_ice_servers.go new file mode 100644 index 000000000..08a9a8f14 --- /dev/null +++ b/twilio/rest/api/v2010/model_api_v2010_account_token_ice_servers.go @@ -0,0 +1,20 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +// ApiV2010AccountTokenIceServers struct for ApiV2010AccountTokenIceServers +type ApiV2010AccountTokenIceServers struct { + Credential string `json:"Credential,omitempty"` + Url string `json:"Url,omitempty"` + Urls string `json:"Urls,omitempty"` + Username string `json:"Username,omitempty"` +} diff --git a/twilio/rest/api/v2010/model_api_v2010_account_transcription.go b/twilio/rest/api/v2010/model_api_v2010_account_transcription.go index d7737b62d..eeeeabeda 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_transcription.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_transcription.go @@ -13,17 +13,30 @@ package openapi // ApiV2010AccountTranscription struct for ApiV2010AccountTranscription type ApiV2010AccountTranscription struct { - AccountSid *string `json:"AccountSid,omitempty"` - ApiVersion *string `json:"ApiVersion,omitempty"` - DateCreated *string `json:"DateCreated,omitempty"` - DateUpdated *string `json:"DateUpdated,omitempty"` - Duration *string `json:"Duration,omitempty"` - Price *float32 `json:"Price,omitempty"` - PriceUnit *string `json:"PriceUnit,omitempty"` - RecordingSid *string `json:"RecordingSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Status *TranscriptionStatus `json:"Status,omitempty"` - TranscriptionText *string `json:"TranscriptionText,omitempty"` - Type *string `json:"Type,omitempty"` - Uri *string `json:"Uri,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The API version used to create the transcription + ApiVersion *string `json:"ApiVersion,omitempty"` + // The RFC 2822 date and time in GMT that the resource was created + DateCreated *string `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT that the resource was last updated + DateUpdated *string `json:"DateUpdated,omitempty"` + // The duration of the transcribed audio in seconds. + Duration *string `json:"Duration,omitempty"` + // The charge for the transcription + Price *float32 `json:"Price,omitempty"` + // The currency in which price is measured + PriceUnit *string `json:"PriceUnit,omitempty"` + // The SID that identifies the transcription's recording + RecordingSid *string `json:"RecordingSid,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The status of the transcription + Status *string `json:"Status,omitempty"` + // The text content of the transcription. + TranscriptionText *string `json:"TranscriptionText,omitempty"` + // The transcription type + Type *string `json:"Type,omitempty"` + // The URI of the resource, relative to `https://api.twilio.com` + Uri *string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record.go b/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record.go index 8e48ad792..8215068cc 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record.go @@ -17,19 +17,34 @@ import ( // ApiV2010AccountUsageUsageRecord struct for ApiV2010AccountUsageUsageRecord type ApiV2010AccountUsageUsageRecord struct { - AccountSid *string `json:"AccountSid,omitempty"` - ApiVersion *string `json:"ApiVersion,omitempty"` - AsOf *string `json:"AsOf,omitempty"` - Category *UsageRecordCategory `json:"Category,omitempty"` - Count *string `json:"Count,omitempty"` - CountUnit *string `json:"CountUnit,omitempty"` - Description *string `json:"Description,omitempty"` - EndDate *time.Time `json:"EndDate,omitempty"` - Price *float32 `json:"Price,omitempty"` - PriceUnit *string `json:"PriceUnit,omitempty"` - StartDate *time.Time `json:"StartDate,omitempty"` + // The SID of the Account accrued the usage + AccountSid *string `json:"AccountSid,omitempty"` + // The API version used to create the resource + ApiVersion *string `json:"ApiVersion,omitempty"` + // Usage records up to date as of this timestamp + AsOf *string `json:"AsOf,omitempty"` + // The category of usage + Category *string `json:"Category,omitempty"` + // The number of usage events + Count *string `json:"Count,omitempty"` + // The units in which count is measured + CountUnit *string `json:"CountUnit,omitempty"` + // A plain-language description of the usage category + Description *string `json:"Description,omitempty"` + // The last date for which usage is included in the UsageRecord + EndDate *time.Time `json:"EndDate,omitempty"` + // The total price of the usage + Price *float32 `json:"Price,omitempty"` + // The currency in which `price` is measured + PriceUnit *string `json:"PriceUnit,omitempty"` + // The first date for which usage is included in this UsageRecord + StartDate *time.Time `json:"StartDate,omitempty"` + // A list of related resources identified by their relative URIs SubresourceUris *map[string]interface{} `json:"SubresourceUris,omitempty"` - Uri *string `json:"Uri,omitempty"` - Usage *string `json:"Usage,omitempty"` - UsageUnit *string `json:"UsageUnit,omitempty"` + // The URI of the resource, relative to `https://api.twilio.com` + Uri *string `json:"Uri,omitempty"` + // The amount of usage + Usage *string `json:"Usage,omitempty"` + // The units in which usage is measured + UsageUnit *string `json:"UsageUnit,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_all_time.go b/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_all_time.go index 3c1c10e2b..98dddc6d8 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_all_time.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_all_time.go @@ -17,19 +17,34 @@ import ( // ApiV2010AccountUsageUsageRecordUsageRecordAllTime struct for ApiV2010AccountUsageUsageRecordUsageRecordAllTime type ApiV2010AccountUsageUsageRecordUsageRecordAllTime struct { - AccountSid *string `json:"AccountSid,omitempty"` - ApiVersion *string `json:"ApiVersion,omitempty"` - AsOf *string `json:"AsOf,omitempty"` - Category *UsageRecordAllTimeCategory `json:"Category,omitempty"` - Count *string `json:"Count,omitempty"` - CountUnit *string `json:"CountUnit,omitempty"` - Description *string `json:"Description,omitempty"` - EndDate *time.Time `json:"EndDate,omitempty"` - Price *float32 `json:"Price,omitempty"` - PriceUnit *string `json:"PriceUnit,omitempty"` - StartDate *time.Time `json:"StartDate,omitempty"` - SubresourceUris *map[string]interface{} `json:"SubresourceUris,omitempty"` - Uri *string `json:"Uri,omitempty"` - Usage *string `json:"Usage,omitempty"` - UsageUnit *string `json:"UsageUnit,omitempty"` + // The SID of the Account accrued the usage + AccountSid *string `json:"AccountSid,omitempty"` + // The API version used to create the resource + ApiVersion *string `json:"ApiVersion,omitempty"` + // Usage records up to date as of this timestamp + AsOf *string `json:"AsOf,omitempty"` + // The category of usage + Category *string `json:"Category,omitempty"` + // The number of usage events + Count *string `json:"Count,omitempty"` + // The units in which count is measured + CountUnit *string `json:"CountUnit,omitempty"` + // A plain-language description of the usage category + Description *string `json:"Description,omitempty"` + // The last date for which usage is included in the UsageRecord + EndDate *time.Time `json:"EndDate,omitempty"` + // The total price of the usage + Price *float32 `json:"Price,omitempty"` + // The currency in which `price` is measured + PriceUnit *string `json:"PriceUnit,omitempty"` + // The first date for which usage is included in this UsageRecord + StartDate *time.Time `json:"StartDate,omitempty"` + // A list of related resources identified by their relative URIs + SubresourceUris *map[string]interface{} `json:"SubresourceUris,omitempty"` + // The URI of the resource, relative to `https://api.twilio.com` + Uri *string `json:"Uri,omitempty"` + // The amount of usage + Usage *string `json:"Usage,omitempty"` + // The units in which usage is measured + UsageUnit *string `json:"UsageUnit,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_daily.go b/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_daily.go index c6377f37e..bc617d0dd 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_daily.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_daily.go @@ -17,19 +17,34 @@ import ( // ApiV2010AccountUsageUsageRecordUsageRecordDaily struct for ApiV2010AccountUsageUsageRecordUsageRecordDaily type ApiV2010AccountUsageUsageRecordUsageRecordDaily struct { - AccountSid *string `json:"AccountSid,omitempty"` - ApiVersion *string `json:"ApiVersion,omitempty"` - AsOf *string `json:"AsOf,omitempty"` - Category *UsageRecordDailyCategory `json:"Category,omitempty"` - Count *string `json:"Count,omitempty"` - CountUnit *string `json:"CountUnit,omitempty"` - Description *string `json:"Description,omitempty"` - EndDate *time.Time `json:"EndDate,omitempty"` - Price *float32 `json:"Price,omitempty"` - PriceUnit *string `json:"PriceUnit,omitempty"` - StartDate *time.Time `json:"StartDate,omitempty"` - SubresourceUris *map[string]interface{} `json:"SubresourceUris,omitempty"` - Uri *string `json:"Uri,omitempty"` - Usage *string `json:"Usage,omitempty"` - UsageUnit *string `json:"UsageUnit,omitempty"` + // The SID of the Account accrued the usage + AccountSid *string `json:"AccountSid,omitempty"` + // The API version used to create the resource + ApiVersion *string `json:"ApiVersion,omitempty"` + // Usage records up to date as of this timestamp + AsOf *string `json:"AsOf,omitempty"` + // The category of usage + Category *string `json:"Category,omitempty"` + // The number of usage events + Count *string `json:"Count,omitempty"` + // The units in which count is measured + CountUnit *string `json:"CountUnit,omitempty"` + // A plain-language description of the usage category + Description *string `json:"Description,omitempty"` + // The last date for which usage is included in the UsageRecord + EndDate *time.Time `json:"EndDate,omitempty"` + // The total price of the usage + Price *float32 `json:"Price,omitempty"` + // The currency in which `price` is measured + PriceUnit *string `json:"PriceUnit,omitempty"` + // The first date for which usage is included in this UsageRecord + StartDate *time.Time `json:"StartDate,omitempty"` + // A list of related resources identified by their relative URIs + SubresourceUris *map[string]interface{} `json:"SubresourceUris,omitempty"` + // The URI of the resource, relative to `https://api.twilio.com` + Uri *string `json:"Uri,omitempty"` + // The amount of usage + Usage *string `json:"Usage,omitempty"` + // The units in which usage is measured + UsageUnit *string `json:"UsageUnit,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_last_month.go b/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_last_month.go index f7f2edbcc..4cbbae56e 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_last_month.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_last_month.go @@ -17,19 +17,34 @@ import ( // ApiV2010AccountUsageUsageRecordUsageRecordLastMonth struct for ApiV2010AccountUsageUsageRecordUsageRecordLastMonth type ApiV2010AccountUsageUsageRecordUsageRecordLastMonth struct { - AccountSid *string `json:"AccountSid,omitempty"` - ApiVersion *string `json:"ApiVersion,omitempty"` - AsOf *string `json:"AsOf,omitempty"` - Category *UsageRecordLastMonthCategory `json:"Category,omitempty"` - Count *string `json:"Count,omitempty"` - CountUnit *string `json:"CountUnit,omitempty"` - Description *string `json:"Description,omitempty"` - EndDate *time.Time `json:"EndDate,omitempty"` - Price *float32 `json:"Price,omitempty"` - PriceUnit *string `json:"PriceUnit,omitempty"` - StartDate *time.Time `json:"StartDate,omitempty"` - SubresourceUris *map[string]interface{} `json:"SubresourceUris,omitempty"` - Uri *string `json:"Uri,omitempty"` - Usage *string `json:"Usage,omitempty"` - UsageUnit *string `json:"UsageUnit,omitempty"` + // The SID of the Account accrued the usage + AccountSid *string `json:"AccountSid,omitempty"` + // The API version used to create the resource + ApiVersion *string `json:"ApiVersion,omitempty"` + // Usage records up to date as of this timestamp + AsOf *string `json:"AsOf,omitempty"` + // The category of usage + Category *string `json:"Category,omitempty"` + // The number of usage events + Count *string `json:"Count,omitempty"` + // The units in which count is measured + CountUnit *string `json:"CountUnit,omitempty"` + // A plain-language description of the usage category + Description *string `json:"Description,omitempty"` + // The last date for which usage is included in the UsageRecord + EndDate *time.Time `json:"EndDate,omitempty"` + // The total price of the usage + Price *float32 `json:"Price,omitempty"` + // The currency in which `price` is measured + PriceUnit *string `json:"PriceUnit,omitempty"` + // The first date for which usage is included in this UsageRecord + StartDate *time.Time `json:"StartDate,omitempty"` + // A list of related resources identified by their relative URIs + SubresourceUris *map[string]interface{} `json:"SubresourceUris,omitempty"` + // The URI of the resource, relative to `https://api.twilio.com` + Uri *string `json:"Uri,omitempty"` + // The amount of usage + Usage *string `json:"Usage,omitempty"` + // The units in which usage is measured + UsageUnit *string `json:"UsageUnit,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_monthly.go b/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_monthly.go index 3c0c04cf8..e06835754 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_monthly.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_monthly.go @@ -17,19 +17,34 @@ import ( // ApiV2010AccountUsageUsageRecordUsageRecordMonthly struct for ApiV2010AccountUsageUsageRecordUsageRecordMonthly type ApiV2010AccountUsageUsageRecordUsageRecordMonthly struct { - AccountSid *string `json:"AccountSid,omitempty"` - ApiVersion *string `json:"ApiVersion,omitempty"` - AsOf *string `json:"AsOf,omitempty"` - Category *UsageRecordMonthlyCategory `json:"Category,omitempty"` - Count *string `json:"Count,omitempty"` - CountUnit *string `json:"CountUnit,omitempty"` - Description *string `json:"Description,omitempty"` - EndDate *time.Time `json:"EndDate,omitempty"` - Price *float32 `json:"Price,omitempty"` - PriceUnit *string `json:"PriceUnit,omitempty"` - StartDate *time.Time `json:"StartDate,omitempty"` - SubresourceUris *map[string]interface{} `json:"SubresourceUris,omitempty"` - Uri *string `json:"Uri,omitempty"` - Usage *string `json:"Usage,omitempty"` - UsageUnit *string `json:"UsageUnit,omitempty"` + // The SID of the Account accrued the usage + AccountSid *string `json:"AccountSid,omitempty"` + // The API version used to create the resource + ApiVersion *string `json:"ApiVersion,omitempty"` + // Usage records up to date as of this timestamp + AsOf *string `json:"AsOf,omitempty"` + // The category of usage + Category *string `json:"Category,omitempty"` + // The number of usage events + Count *string `json:"Count,omitempty"` + // The units in which count is measured + CountUnit *string `json:"CountUnit,omitempty"` + // A plain-language description of the usage category + Description *string `json:"Description,omitempty"` + // The last date for which usage is included in the UsageRecord + EndDate *time.Time `json:"EndDate,omitempty"` + // The total price of the usage + Price *float32 `json:"Price,omitempty"` + // The currency in which `price` is measured + PriceUnit *string `json:"PriceUnit,omitempty"` + // The first date for which usage is included in this UsageRecord + StartDate *time.Time `json:"StartDate,omitempty"` + // A list of related resources identified by their relative URIs + SubresourceUris *map[string]interface{} `json:"SubresourceUris,omitempty"` + // The URI of the resource, relative to `https://api.twilio.com` + Uri *string `json:"Uri,omitempty"` + // The amount of usage + Usage *string `json:"Usage,omitempty"` + // The units in which usage is measured + UsageUnit *string `json:"UsageUnit,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_this_month.go b/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_this_month.go index 7289a13c3..4202daa20 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_this_month.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_this_month.go @@ -17,19 +17,34 @@ import ( // ApiV2010AccountUsageUsageRecordUsageRecordThisMonth struct for ApiV2010AccountUsageUsageRecordUsageRecordThisMonth type ApiV2010AccountUsageUsageRecordUsageRecordThisMonth struct { - AccountSid *string `json:"AccountSid,omitempty"` - ApiVersion *string `json:"ApiVersion,omitempty"` - AsOf *string `json:"AsOf,omitempty"` - Category *UsageRecordThisMonthCategory `json:"Category,omitempty"` - Count *string `json:"Count,omitempty"` - CountUnit *string `json:"CountUnit,omitempty"` - Description *string `json:"Description,omitempty"` - EndDate *time.Time `json:"EndDate,omitempty"` - Price *float32 `json:"Price,omitempty"` - PriceUnit *string `json:"PriceUnit,omitempty"` - StartDate *time.Time `json:"StartDate,omitempty"` - SubresourceUris *map[string]interface{} `json:"SubresourceUris,omitempty"` - Uri *string `json:"Uri,omitempty"` - Usage *string `json:"Usage,omitempty"` - UsageUnit *string `json:"UsageUnit,omitempty"` + // The SID of the Account accrued the usage + AccountSid *string `json:"AccountSid,omitempty"` + // The API version used to create the resource + ApiVersion *string `json:"ApiVersion,omitempty"` + // Usage records up to date as of this timestamp + AsOf *string `json:"AsOf,omitempty"` + // The category of usage + Category *string `json:"Category,omitempty"` + // The number of usage events + Count *string `json:"Count,omitempty"` + // The units in which count is measured + CountUnit *string `json:"CountUnit,omitempty"` + // A plain-language description of the usage category + Description *string `json:"Description,omitempty"` + // The last date for which usage is included in the UsageRecord + EndDate *time.Time `json:"EndDate,omitempty"` + // The total price of the usage + Price *float32 `json:"Price,omitempty"` + // The currency in which `price` is measured + PriceUnit *string `json:"PriceUnit,omitempty"` + // The first date for which usage is included in this UsageRecord + StartDate *time.Time `json:"StartDate,omitempty"` + // A list of related resources identified by their relative URIs + SubresourceUris *map[string]interface{} `json:"SubresourceUris,omitempty"` + // The URI of the resource, relative to `https://api.twilio.com` + Uri *string `json:"Uri,omitempty"` + // The amount of usage + Usage *string `json:"Usage,omitempty"` + // The units in which usage is measured + UsageUnit *string `json:"UsageUnit,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_today.go b/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_today.go index 7a3fdb9bf..6d74bf501 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_today.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_today.go @@ -17,19 +17,34 @@ import ( // ApiV2010AccountUsageUsageRecordUsageRecordToday struct for ApiV2010AccountUsageUsageRecordUsageRecordToday type ApiV2010AccountUsageUsageRecordUsageRecordToday struct { - AccountSid *string `json:"AccountSid,omitempty"` - ApiVersion *string `json:"ApiVersion,omitempty"` - AsOf *string `json:"AsOf,omitempty"` - Category *UsageRecordTodayCategory `json:"Category,omitempty"` - Count *string `json:"Count,omitempty"` - CountUnit *string `json:"CountUnit,omitempty"` - Description *string `json:"Description,omitempty"` - EndDate *time.Time `json:"EndDate,omitempty"` - Price *float32 `json:"Price,omitempty"` - PriceUnit *string `json:"PriceUnit,omitempty"` - StartDate *time.Time `json:"StartDate,omitempty"` - SubresourceUris *map[string]interface{} `json:"SubresourceUris,omitempty"` - Uri *string `json:"Uri,omitempty"` - Usage *string `json:"Usage,omitempty"` - UsageUnit *string `json:"UsageUnit,omitempty"` + // The SID of the Account accrued the usage + AccountSid *string `json:"AccountSid,omitempty"` + // The API version used to create the resource + ApiVersion *string `json:"ApiVersion,omitempty"` + // Usage records up to date as of this timestamp + AsOf *string `json:"AsOf,omitempty"` + // The category of usage + Category *string `json:"Category,omitempty"` + // The number of usage events + Count *string `json:"Count,omitempty"` + // The units in which count is measured + CountUnit *string `json:"CountUnit,omitempty"` + // A plain-language description of the usage category + Description *string `json:"Description,omitempty"` + // The last date for which usage is included in the UsageRecord + EndDate *time.Time `json:"EndDate,omitempty"` + // The total price of the usage + Price *float32 `json:"Price,omitempty"` + // The currency in which `price` is measured + PriceUnit *string `json:"PriceUnit,omitempty"` + // The first date for which usage is included in this UsageRecord + StartDate *time.Time `json:"StartDate,omitempty"` + // A list of related resources identified by their relative URIs + SubresourceUris *map[string]interface{} `json:"SubresourceUris,omitempty"` + // The URI of the resource, relative to `https://api.twilio.com` + Uri *string `json:"Uri,omitempty"` + // The amount of usage + Usage *string `json:"Usage,omitempty"` + // The units in which usage is measured + UsageUnit *string `json:"UsageUnit,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_yearly.go b/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_yearly.go index c0c298dfe..03ffc6709 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_yearly.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_yearly.go @@ -17,19 +17,34 @@ import ( // ApiV2010AccountUsageUsageRecordUsageRecordYearly struct for ApiV2010AccountUsageUsageRecordUsageRecordYearly type ApiV2010AccountUsageUsageRecordUsageRecordYearly struct { - AccountSid *string `json:"AccountSid,omitempty"` - ApiVersion *string `json:"ApiVersion,omitempty"` - AsOf *string `json:"AsOf,omitempty"` - Category *UsageRecordYearlyCategory `json:"Category,omitempty"` - Count *string `json:"Count,omitempty"` - CountUnit *string `json:"CountUnit,omitempty"` - Description *string `json:"Description,omitempty"` - EndDate *time.Time `json:"EndDate,omitempty"` - Price *float32 `json:"Price,omitempty"` - PriceUnit *string `json:"PriceUnit,omitempty"` - StartDate *time.Time `json:"StartDate,omitempty"` - SubresourceUris *map[string]interface{} `json:"SubresourceUris,omitempty"` - Uri *string `json:"Uri,omitempty"` - Usage *string `json:"Usage,omitempty"` - UsageUnit *string `json:"UsageUnit,omitempty"` + // The SID of the Account accrued the usage + AccountSid *string `json:"AccountSid,omitempty"` + // The API version used to create the resource + ApiVersion *string `json:"ApiVersion,omitempty"` + // Usage records up to date as of this timestamp + AsOf *string `json:"AsOf,omitempty"` + // The category of usage + Category *string `json:"Category,omitempty"` + // The number of usage events + Count *string `json:"Count,omitempty"` + // The units in which count is measured + CountUnit *string `json:"CountUnit,omitempty"` + // A plain-language description of the usage category + Description *string `json:"Description,omitempty"` + // The last date for which usage is included in the UsageRecord + EndDate *time.Time `json:"EndDate,omitempty"` + // The total price of the usage + Price *float32 `json:"Price,omitempty"` + // The currency in which `price` is measured + PriceUnit *string `json:"PriceUnit,omitempty"` + // The first date for which usage is included in this UsageRecord + StartDate *time.Time `json:"StartDate,omitempty"` + // A list of related resources identified by their relative URIs + SubresourceUris *map[string]interface{} `json:"SubresourceUris,omitempty"` + // The URI of the resource, relative to `https://api.twilio.com` + Uri *string `json:"Uri,omitempty"` + // The amount of usage + Usage *string `json:"Usage,omitempty"` + // The units in which usage is measured + UsageUnit *string `json:"UsageUnit,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_yesterday.go b/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_yesterday.go index 44935b609..fb97886e1 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_yesterday.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_yesterday.go @@ -17,19 +17,34 @@ import ( // ApiV2010AccountUsageUsageRecordUsageRecordYesterday struct for ApiV2010AccountUsageUsageRecordUsageRecordYesterday type ApiV2010AccountUsageUsageRecordUsageRecordYesterday struct { - AccountSid *string `json:"AccountSid,omitempty"` - ApiVersion *string `json:"ApiVersion,omitempty"` - AsOf *string `json:"AsOf,omitempty"` - Category *UsageRecordYesterdayCategory `json:"Category,omitempty"` - Count *string `json:"Count,omitempty"` - CountUnit *string `json:"CountUnit,omitempty"` - Description *string `json:"Description,omitempty"` - EndDate *time.Time `json:"EndDate,omitempty"` - Price *float32 `json:"Price,omitempty"` - PriceUnit *string `json:"PriceUnit,omitempty"` - StartDate *time.Time `json:"StartDate,omitempty"` - SubresourceUris *map[string]interface{} `json:"SubresourceUris,omitempty"` - Uri *string `json:"Uri,omitempty"` - Usage *string `json:"Usage,omitempty"` - UsageUnit *string `json:"UsageUnit,omitempty"` + // The SID of the Account accrued the usage + AccountSid *string `json:"AccountSid,omitempty"` + // The API version used to create the resource + ApiVersion *string `json:"ApiVersion,omitempty"` + // Usage records up to date as of this timestamp + AsOf *string `json:"AsOf,omitempty"` + // The category of usage + Category *string `json:"Category,omitempty"` + // The number of usage events + Count *string `json:"Count,omitempty"` + // The units in which count is measured + CountUnit *string `json:"CountUnit,omitempty"` + // A plain-language description of the usage category + Description *string `json:"Description,omitempty"` + // The last date for which usage is included in the UsageRecord + EndDate *time.Time `json:"EndDate,omitempty"` + // The total price of the usage + Price *float32 `json:"Price,omitempty"` + // The currency in which `price` is measured + PriceUnit *string `json:"PriceUnit,omitempty"` + // The first date for which usage is included in this UsageRecord + StartDate *time.Time `json:"StartDate,omitempty"` + // A list of related resources identified by their relative URIs + SubresourceUris *map[string]interface{} `json:"SubresourceUris,omitempty"` + // The URI of the resource, relative to `https://api.twilio.com` + Uri *string `json:"Uri,omitempty"` + // The amount of usage + Usage *string `json:"Usage,omitempty"` + // The units in which usage is measured + UsageUnit *string `json:"UsageUnit,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_trigger.go b/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_trigger.go index 9add00fd1..5fc245a9f 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_trigger.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_trigger.go @@ -13,20 +13,36 @@ package openapi // ApiV2010AccountUsageUsageTrigger struct for ApiV2010AccountUsageUsageTrigger type ApiV2010AccountUsageUsageTrigger struct { - AccountSid *string `json:"AccountSid,omitempty"` - ApiVersion *string `json:"ApiVersion,omitempty"` - CallbackMethod *HttpMethod `json:"CallbackMethod,omitempty"` - CallbackUrl *string `json:"CallbackUrl,omitempty"` - CurrentValue *string `json:"CurrentValue,omitempty"` - DateCreated *string `json:"DateCreated,omitempty"` - DateFired *string `json:"DateFired,omitempty"` - DateUpdated *string `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Recurring *UsageTriggerRecurring `json:"Recurring,omitempty"` - Sid *string `json:"Sid,omitempty"` - TriggerBy *UsageTriggerTriggerField `json:"TriggerBy,omitempty"` - TriggerValue *string `json:"TriggerValue,omitempty"` - Uri *string `json:"Uri,omitempty"` - UsageCategory *UsageTriggerUsageCategory `json:"UsageCategory,omitempty"` - UsageRecordUri *string `json:"UsageRecordUri,omitempty"` + // The SID of the Account that this trigger monitors + AccountSid *string `json:"AccountSid,omitempty"` + // The API version used to create the resource + ApiVersion *string `json:"ApiVersion,omitempty"` + // The HTTP method we use to call callback_url + CallbackMethod *string `json:"CallbackMethod,omitempty"` + // he URL we call when the trigger fires + CallbackUrl *string `json:"CallbackUrl,omitempty"` + // The current value of the field the trigger is watching + CurrentValue *string `json:"CurrentValue,omitempty"` + // The RFC 2822 date and time in GMT that the resource was created + DateCreated *string `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT that the trigger was last fired + DateFired *string `json:"DateFired,omitempty"` + // The RFC 2822 date and time in GMT that the resource was last updated + DateUpdated *string `json:"DateUpdated,omitempty"` + // The string that you assigned to describe the trigger + FriendlyName *string `json:"FriendlyName,omitempty"` + // The frequency of a recurring UsageTrigger + Recurring *string `json:"Recurring,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The field in the UsageRecord resource that fires the trigger + TriggerBy *string `json:"TriggerBy,omitempty"` + // The value at which the trigger will fire + TriggerValue *string `json:"TriggerValue,omitempty"` + // The URI of the resource, relative to `https://api.twilio.com` + Uri *string `json:"Uri,omitempty"` + // The usage category the trigger watches + UsageCategory *string `json:"UsageCategory,omitempty"` + // The URI of the UsageRecord resource this trigger watches + UsageRecordUri *string `json:"UsageRecordUri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_validation_request.go b/twilio/rest/api/v2010/model_api_v2010_account_validation_request.go index 529976fa3..342b8e833 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_validation_request.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_validation_request.go @@ -13,9 +13,14 @@ package openapi // ApiV2010AccountValidationRequest struct for ApiV2010AccountValidationRequest type ApiV2010AccountValidationRequest struct { - AccountSid *string `json:"AccountSid,omitempty"` - CallSid *string `json:"CallSid,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - PhoneNumber *string `json:"PhoneNumber,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The SID of the Call the resource is associated with + CallSid *string `json:"CallSid,omitempty"` + // The string that you assigned to describe the resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // The phone number to verify in E.164 format + PhoneNumber *string `json:"PhoneNumber,omitempty"` + // The 6 digit validation code that someone must enter to validate the Caller ID when `phone_number` is called ValidationCode *string `json:"ValidationCode,omitempty"` } diff --git a/twilio/rest/autopilot/v1/README.md b/twilio/rest/autopilot/v1/README.md index ca4d69d38..e88f3dc3b 100644 --- a/twilio/rest/autopilot/v1/README.md +++ b/twilio/rest/autopilot/v1/README.md @@ -112,7 +112,6 @@ Class | Method | HTTP request | Description - [ListSampleResponse](docs/ListSampleResponse.md) - [ListTaskResponse](docs/ListTaskResponse.md) - [ListWebhookResponse](docs/ListWebhookResponse.md) - - [ModelBuildStatus](docs/ModelBuildStatus.md) ## Documentation For Authorization diff --git a/twilio/rest/autopilot/v1/docs/AutopilotV1Assistant.md b/twilio/rest/autopilot/v1/docs/AutopilotV1Assistant.md index cb28c903e..cea58f598 100644 --- a/twilio/rest/autopilot/v1/docs/AutopilotV1Assistant.md +++ b/twilio/rest/autopilot/v1/docs/AutopilotV1Assistant.md @@ -1,22 +1,22 @@ # AutopilotV1Assistant ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**CallbackEvents** | Pointer to **string** | -**CallbackUrl** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**DevelopmentStage** | Pointer to **string** | -**FriendlyName** | Pointer to **string** | -**LatestModelBuildSid** | Pointer to **string** | -**Links** | Pointer to **map[string]interface{}** | -**LogQueries** | Pointer to **bool** | -**NeedsModelBuild** | Pointer to **bool** | -**Sid** | Pointer to **string** | -**UniqueName** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**CallbackEvents** | Pointer to **string** | Reserved | +**CallbackUrl** | Pointer to **string** | Reserved | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was last updated | +**DevelopmentStage** | Pointer to **string** | A string describing the state of the assistant. | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the resource | +**LatestModelBuildSid** | Pointer to **string** | Reserved | +**Links** | Pointer to **map[string]interface{}** | A list of the URLs of the Assistant's related resources | +**LogQueries** | Pointer to **bool** | Whether queries should be logged and kept after training | +**NeedsModelBuild** | Pointer to **bool** | Whether model needs to be rebuilt | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**UniqueName** | Pointer to **string** | An application-defined string that uniquely identifies the resource | +**Url** | Pointer to **string** | The absolute URL of the Assistant resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/autopilot/v1/docs/AutopilotV1AssistantDefaults.md b/twilio/rest/autopilot/v1/docs/AutopilotV1AssistantDefaults.md index abf3a7c68..18272864d 100644 --- a/twilio/rest/autopilot/v1/docs/AutopilotV1AssistantDefaults.md +++ b/twilio/rest/autopilot/v1/docs/AutopilotV1AssistantDefaults.md @@ -1,12 +1,12 @@ # AutopilotV1AssistantDefaults ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**AssistantSid** | Pointer to **string** | -**Data** | Pointer to **map[string]interface{}** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**AssistantSid** | Pointer to **string** | The SID of the Assistant that is the parent of the resource | +**Data** | Pointer to **map[string]interface{}** | The JSON string that describes the default task links | +**Url** | Pointer to **string** | The absolute URL of the Defaults resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/autopilot/v1/docs/AutopilotV1AssistantDialogue.md b/twilio/rest/autopilot/v1/docs/AutopilotV1AssistantDialogue.md index 4d55f0c58..93951c039 100644 --- a/twilio/rest/autopilot/v1/docs/AutopilotV1AssistantDialogue.md +++ b/twilio/rest/autopilot/v1/docs/AutopilotV1AssistantDialogue.md @@ -1,13 +1,13 @@ # AutopilotV1AssistantDialogue ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**AssistantSid** | Pointer to **string** | -**Data** | Pointer to **map[string]interface{}** | -**Sid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**AssistantSid** | Pointer to **string** | The SID of the Assistant that is the parent of the resource | +**Data** | Pointer to **map[string]interface{}** | The JSON string that describes the dialogue session object | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Url** | Pointer to **string** | The absolute URL of the Dialogue resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/autopilot/v1/docs/AutopilotV1AssistantFieldType.md b/twilio/rest/autopilot/v1/docs/AutopilotV1AssistantFieldType.md index d26ea7be7..ab75369c4 100644 --- a/twilio/rest/autopilot/v1/docs/AutopilotV1AssistantFieldType.md +++ b/twilio/rest/autopilot/v1/docs/AutopilotV1AssistantFieldType.md @@ -1,17 +1,17 @@ # AutopilotV1AssistantFieldType ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**AssistantSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**FriendlyName** | Pointer to **string** | -**Links** | Pointer to **map[string]interface{}** | -**Sid** | Pointer to **string** | -**UniqueName** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**AssistantSid** | Pointer to **string** | The SID of the Assistant that is the parent of the resource | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was last updated | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the resource | +**Links** | Pointer to **map[string]interface{}** | A list of the URLs of related resources | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**UniqueName** | Pointer to **string** | An application-defined string that uniquely identifies the resource | +**Url** | Pointer to **string** | The absolute URL of the FieldType resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/autopilot/v1/docs/AutopilotV1AssistantFieldTypeFieldValue.md b/twilio/rest/autopilot/v1/docs/AutopilotV1AssistantFieldTypeFieldValue.md index 1fcd1a419..7b59457ca 100644 --- a/twilio/rest/autopilot/v1/docs/AutopilotV1AssistantFieldTypeFieldValue.md +++ b/twilio/rest/autopilot/v1/docs/AutopilotV1AssistantFieldTypeFieldValue.md @@ -1,18 +1,18 @@ # AutopilotV1AssistantFieldTypeFieldValue ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**AssistantSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**FieldTypeSid** | Pointer to **string** | -**Language** | Pointer to **string** | -**Sid** | Pointer to **string** | -**SynonymOf** | Pointer to **string** | -**Url** | Pointer to **string** | -**Value** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**AssistantSid** | Pointer to **string** | The SID of the Assistant that is the parent of the FieldType associated with the resource | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was last updated | +**FieldTypeSid** | Pointer to **string** | The SID of the Field Type associated with the Field Value | +**Language** | Pointer to **string** | The ISO language-country tag that identifies the language of the value | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**SynonymOf** | Pointer to **string** | The word for which the field value is a synonym of | +**Url** | Pointer to **string** | The absolute URL of the FieldValue resource | +**Value** | Pointer to **string** | The Field Value data | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/autopilot/v1/docs/AutopilotV1AssistantModelBuild.md b/twilio/rest/autopilot/v1/docs/AutopilotV1AssistantModelBuild.md index 4ff4412b8..c04b655a4 100644 --- a/twilio/rest/autopilot/v1/docs/AutopilotV1AssistantModelBuild.md +++ b/twilio/rest/autopilot/v1/docs/AutopilotV1AssistantModelBuild.md @@ -1,18 +1,18 @@ # AutopilotV1AssistantModelBuild ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**AssistantSid** | Pointer to **string** | -**BuildDuration** | Pointer to **int32** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**ErrorCode** | Pointer to **int32** | -**Sid** | Pointer to **string** | -**Status** | Pointer to [**ModelBuildStatus**](model_build_status.md) | -**UniqueName** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**AssistantSid** | Pointer to **string** | The SID of the Assistant that is the parent of the resource | +**BuildDuration** | Pointer to **int32** | The time in seconds it took to build the model | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was last updated | +**ErrorCode** | Pointer to **int32** | More information about why the model build failed, if `status` is `failed` | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Status** | Pointer to **string** | The status of the model build process | +**UniqueName** | Pointer to **string** | An application-defined string that uniquely identifies the resource | +**Url** | Pointer to **string** | The absolute URL of the ModelBuild resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/autopilot/v1/docs/AutopilotV1AssistantQuery.md b/twilio/rest/autopilot/v1/docs/AutopilotV1AssistantQuery.md index 340c9ba7c..2951e112e 100644 --- a/twilio/rest/autopilot/v1/docs/AutopilotV1AssistantQuery.md +++ b/twilio/rest/autopilot/v1/docs/AutopilotV1AssistantQuery.md @@ -1,22 +1,22 @@ # AutopilotV1AssistantQuery ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**AssistantSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**DialogueSid** | Pointer to **string** | -**Language** | Pointer to **string** | -**ModelBuildSid** | Pointer to **string** | -**Query** | Pointer to **string** | -**Results** | Pointer to **map[string]interface{}** | -**SampleSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**SourceChannel** | Pointer to **string** | -**Status** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**AssistantSid** | Pointer to **string** | The SID of the Assistant that is the parent of the resource | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was last updated | +**DialogueSid** | Pointer to **string** | The SID of the [Dialogue](https://www.twilio.com/docs/autopilot/api/dialogue). | +**Language** | Pointer to **string** | The ISO language-country string that specifies the language used by the Query | +**ModelBuildSid** | Pointer to **string** | The SID of the [Model Build](https://www.twilio.com/docs/autopilot/api/model-build) queried | +**Query** | Pointer to **string** | The end-user's natural language input | +**Results** | Pointer to **map[string]interface{}** | The natural language analysis results that include the Task recognized and a list of identified Fields | +**SampleSid** | Pointer to **string** | The SID of an optional reference to the Sample created from the query | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**SourceChannel** | Pointer to **string** | The communication channel from where the end-user input came | +**Status** | Pointer to **string** | The status of the Query | +**Url** | Pointer to **string** | The absolute URL of the Query resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/autopilot/v1/docs/AutopilotV1AssistantStyleSheet.md b/twilio/rest/autopilot/v1/docs/AutopilotV1AssistantStyleSheet.md index 808b61e9d..d2bca324e 100644 --- a/twilio/rest/autopilot/v1/docs/AutopilotV1AssistantStyleSheet.md +++ b/twilio/rest/autopilot/v1/docs/AutopilotV1AssistantStyleSheet.md @@ -1,12 +1,12 @@ # AutopilotV1AssistantStyleSheet ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**AssistantSid** | Pointer to **string** | -**Data** | Pointer to **map[string]interface{}** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**AssistantSid** | Pointer to **string** | The SID of the Assistant that is the parent of the resource | +**Data** | Pointer to **map[string]interface{}** | The JSON string that describes the style sheet object | +**Url** | Pointer to **string** | The absolute URL of the StyleSheet resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/autopilot/v1/docs/AutopilotV1AssistantTask.md b/twilio/rest/autopilot/v1/docs/AutopilotV1AssistantTask.md index 91f766013..b85a530ba 100644 --- a/twilio/rest/autopilot/v1/docs/AutopilotV1AssistantTask.md +++ b/twilio/rest/autopilot/v1/docs/AutopilotV1AssistantTask.md @@ -1,18 +1,18 @@ # AutopilotV1AssistantTask ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**ActionsUrl** | Pointer to **string** | -**AssistantSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**FriendlyName** | Pointer to **string** | -**Links** | Pointer to **map[string]interface{}** | -**Sid** | Pointer to **string** | -**UniqueName** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**ActionsUrl** | Pointer to **string** | The URL from which the Assistant can fetch actions | +**AssistantSid** | Pointer to **string** | The SID of the Assistant that is the parent of the resource | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was last updated | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the resource | +**Links** | Pointer to **map[string]interface{}** | A list of the URLs of related resources | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**UniqueName** | Pointer to **string** | An application-defined string that uniquely identifies the resource | +**Url** | Pointer to **string** | The absolute URL of the Task resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/autopilot/v1/docs/AutopilotV1AssistantTaskField.md b/twilio/rest/autopilot/v1/docs/AutopilotV1AssistantTaskField.md index 1b8cc8f0f..e90bb4f64 100644 --- a/twilio/rest/autopilot/v1/docs/AutopilotV1AssistantTaskField.md +++ b/twilio/rest/autopilot/v1/docs/AutopilotV1AssistantTaskField.md @@ -1,17 +1,17 @@ # AutopilotV1AssistantTaskField ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**AssistantSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**FieldType** | Pointer to **string** | -**Sid** | Pointer to **string** | -**TaskSid** | Pointer to **string** | -**UniqueName** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**AssistantSid** | Pointer to **string** | The SID of the Assistant that is the parent of the Task associated with the resource | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was last updated | +**FieldType** | Pointer to **string** | The Field Type of the field | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**TaskSid** | Pointer to **string** | The SID of the [Task](https://www.twilio.com/docs/autopilot/api/task) resource associated with this Field | +**UniqueName** | Pointer to **string** | An application-defined string that uniquely identifies the resource | +**Url** | Pointer to **string** | The absolute URL of the Field resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/autopilot/v1/docs/AutopilotV1AssistantTaskSample.md b/twilio/rest/autopilot/v1/docs/AutopilotV1AssistantTaskSample.md index d10bc5ef2..690d60b8a 100644 --- a/twilio/rest/autopilot/v1/docs/AutopilotV1AssistantTaskSample.md +++ b/twilio/rest/autopilot/v1/docs/AutopilotV1AssistantTaskSample.md @@ -1,18 +1,18 @@ # AutopilotV1AssistantTaskSample ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**AssistantSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**Language** | Pointer to **string** | -**Sid** | Pointer to **string** | -**SourceChannel** | Pointer to **string** | -**TaggedText** | Pointer to **string** | -**TaskSid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**AssistantSid** | Pointer to **string** | The SID of the Assistant that is the parent of the Task associated with the resource | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was last updated | +**Language** | Pointer to **string** | An ISO language-country string that specifies the language used for the sample | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**SourceChannel** | Pointer to **string** | The communication channel from which the sample was captured | +**TaggedText** | Pointer to **string** | The text example of how end users might express the task | +**TaskSid** | Pointer to **string** | The SID of the Task associated with the resource | +**Url** | Pointer to **string** | The absolute URL of the Sample resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/autopilot/v1/docs/AutopilotV1AssistantTaskTaskActions.md b/twilio/rest/autopilot/v1/docs/AutopilotV1AssistantTaskTaskActions.md index 9f24f0ad8..7965549e3 100644 --- a/twilio/rest/autopilot/v1/docs/AutopilotV1AssistantTaskTaskActions.md +++ b/twilio/rest/autopilot/v1/docs/AutopilotV1AssistantTaskTaskActions.md @@ -1,13 +1,13 @@ # AutopilotV1AssistantTaskTaskActions ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**AssistantSid** | Pointer to **string** | -**Data** | Pointer to **map[string]interface{}** | -**TaskSid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**AssistantSid** | Pointer to **string** | The SID of the Assistant that is the parent of the Task associated with the resource | +**Data** | Pointer to **map[string]interface{}** | The JSON string that specifies the actions that instruct the Assistant on how to perform the task | +**TaskSid** | Pointer to **string** | The SID of the Task associated with the resource | +**Url** | Pointer to **string** | The absolute URL of the TaskActions resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/autopilot/v1/docs/AutopilotV1AssistantTaskTaskStatistics.md b/twilio/rest/autopilot/v1/docs/AutopilotV1AssistantTaskTaskStatistics.md index 8f1343c58..db0308488 100644 --- a/twilio/rest/autopilot/v1/docs/AutopilotV1AssistantTaskTaskStatistics.md +++ b/twilio/rest/autopilot/v1/docs/AutopilotV1AssistantTaskTaskStatistics.md @@ -1,14 +1,14 @@ # AutopilotV1AssistantTaskTaskStatistics ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**AssistantSid** | Pointer to **string** | -**FieldsCount** | Pointer to **int32** | -**SamplesCount** | Pointer to **int32** | -**TaskSid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**AssistantSid** | Pointer to **string** | The SID of the Assistant that is the parent of the Task associated with the resource | +**FieldsCount** | Pointer to **int32** | The total number of Fields associated with the Task | +**SamplesCount** | Pointer to **int32** | The total number of Samples associated with the Task | +**TaskSid** | Pointer to **string** | The SID of the Task for which the statistics were collected | +**Url** | Pointer to **string** | The absolute URL of the TaskStatistics resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/autopilot/v1/docs/AutopilotV1AssistantWebhook.md b/twilio/rest/autopilot/v1/docs/AutopilotV1AssistantWebhook.md index dfa0c4637..769c17535 100644 --- a/twilio/rest/autopilot/v1/docs/AutopilotV1AssistantWebhook.md +++ b/twilio/rest/autopilot/v1/docs/AutopilotV1AssistantWebhook.md @@ -1,18 +1,18 @@ # AutopilotV1AssistantWebhook ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**AssistantSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**Events** | Pointer to **string** | -**Sid** | Pointer to **string** | -**UniqueName** | Pointer to **string** | -**Url** | Pointer to **string** | -**WebhookMethod** | Pointer to **string** | -**WebhookUrl** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**AssistantSid** | Pointer to **string** | The SID of the Assistant that is the parent of the resource | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was last updated | +**Events** | Pointer to **string** | The list of space-separated events that this Webhook is subscribed to. | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**UniqueName** | Pointer to **string** | An application-defined string that uniquely identifies the resource | +**Url** | Pointer to **string** | The absolute URL of the Webhook resource | +**WebhookMethod** | Pointer to **string** | The method used when calling the webhook's URL. | +**WebhookUrl** | Pointer to **string** | The URL associated with this Webhook. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/autopilot/v1/docs/AutopilotV1RestoreAssistant.md b/twilio/rest/autopilot/v1/docs/AutopilotV1RestoreAssistant.md index 1087ad089..a2bb4fc24 100644 --- a/twilio/rest/autopilot/v1/docs/AutopilotV1RestoreAssistant.md +++ b/twilio/rest/autopilot/v1/docs/AutopilotV1RestoreAssistant.md @@ -1,20 +1,20 @@ # AutopilotV1RestoreAssistant ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**CallbackEvents** | Pointer to **string** | -**CallbackUrl** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**DevelopmentStage** | Pointer to **string** | -**FriendlyName** | Pointer to **string** | -**LatestModelBuildSid** | Pointer to **string** | -**LogQueries** | Pointer to **bool** | -**NeedsModelBuild** | Pointer to **bool** | -**Sid** | Pointer to **string** | -**UniqueName** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**CallbackEvents** | Pointer to **string** | Reserved | +**CallbackUrl** | Pointer to **string** | Reserved | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was last updated | +**DevelopmentStage** | Pointer to **string** | A string describing the state of the assistant. | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the resource | +**LatestModelBuildSid** | Pointer to **string** | Reserved | +**LogQueries** | Pointer to **bool** | Whether queries should be logged and kept after training | +**NeedsModelBuild** | Pointer to **bool** | Whether model needs to be rebuilt | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**UniqueName** | Pointer to **string** | An application-defined string that uniquely identifies the resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/autopilot/v1/docs/ListAssistantResponse.md b/twilio/rest/autopilot/v1/docs/ListAssistantResponse.md index 8fb79d2db..f5637d31b 100644 --- a/twilio/rest/autopilot/v1/docs/ListAssistantResponse.md +++ b/twilio/rest/autopilot/v1/docs/ListAssistantResponse.md @@ -1,10 +1,10 @@ # ListAssistantResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Assistants** | [**[]AutopilotV1Assistant**](autopilot.v1.assistant.md) | [optional] -**Meta** | [**ListAssistantResponseMeta**](ListAssistantResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Assistants** | [**[]AutopilotV1Assistant**](autopilot.v1.assistant.md) | |[optional] +**Meta** | [**ListAssistantResponseMeta**](ListAssistantResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/autopilot/v1/docs/ListAssistantResponseMeta.md b/twilio/rest/autopilot/v1/docs/ListAssistantResponseMeta.md index 7bb4ce301..740796256 100644 --- a/twilio/rest/autopilot/v1/docs/ListAssistantResponseMeta.md +++ b/twilio/rest/autopilot/v1/docs/ListAssistantResponseMeta.md @@ -1,15 +1,15 @@ # ListAssistantResponseMeta ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**FirstPageUrl** | **string** | [optional] -**Key** | **string** | [optional] -**NextPageUrl** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUrl** | **string** | [optional] -**Url** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstPageUrl** | **string** | |[optional] +**Key** | **string** | |[optional] +**NextPageUrl** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUrl** | **string** | |[optional] +**Url** | **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/twilio/rest/autopilot/v1/docs/ListFieldResponse.md b/twilio/rest/autopilot/v1/docs/ListFieldResponse.md index 00e23e778..852a2d85d 100644 --- a/twilio/rest/autopilot/v1/docs/ListFieldResponse.md +++ b/twilio/rest/autopilot/v1/docs/ListFieldResponse.md @@ -1,10 +1,10 @@ # ListFieldResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Fields** | [**[]AutopilotV1AssistantTaskField**](autopilot.v1.assistant.task.field.md) | [optional] -**Meta** | [**ListAssistantResponseMeta**](ListAssistantResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Fields** | [**[]AutopilotV1AssistantTaskField**](autopilot.v1.assistant.task.field.md) | |[optional] +**Meta** | [**ListAssistantResponseMeta**](ListAssistantResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/autopilot/v1/docs/ListFieldTypeResponse.md b/twilio/rest/autopilot/v1/docs/ListFieldTypeResponse.md index b38344684..9a09b8e67 100644 --- a/twilio/rest/autopilot/v1/docs/ListFieldTypeResponse.md +++ b/twilio/rest/autopilot/v1/docs/ListFieldTypeResponse.md @@ -1,10 +1,10 @@ # ListFieldTypeResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**FieldTypes** | [**[]AutopilotV1AssistantFieldType**](autopilot.v1.assistant.field_type.md) | [optional] -**Meta** | [**ListAssistantResponseMeta**](ListAssistantResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FieldTypes** | [**[]AutopilotV1AssistantFieldType**](autopilot.v1.assistant.field_type.md) | |[optional] +**Meta** | [**ListAssistantResponseMeta**](ListAssistantResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/autopilot/v1/docs/ListFieldValueResponse.md b/twilio/rest/autopilot/v1/docs/ListFieldValueResponse.md index 4b1abf97e..fc959423f 100644 --- a/twilio/rest/autopilot/v1/docs/ListFieldValueResponse.md +++ b/twilio/rest/autopilot/v1/docs/ListFieldValueResponse.md @@ -1,10 +1,10 @@ # ListFieldValueResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**FieldValues** | [**[]AutopilotV1AssistantFieldTypeFieldValue**](autopilot.v1.assistant.field_type.field_value.md) | [optional] -**Meta** | [**ListAssistantResponseMeta**](ListAssistantResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FieldValues** | [**[]AutopilotV1AssistantFieldTypeFieldValue**](autopilot.v1.assistant.field_type.field_value.md) | |[optional] +**Meta** | [**ListAssistantResponseMeta**](ListAssistantResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/autopilot/v1/docs/ListModelBuildResponse.md b/twilio/rest/autopilot/v1/docs/ListModelBuildResponse.md index d1f7e91ca..b9e1acc81 100644 --- a/twilio/rest/autopilot/v1/docs/ListModelBuildResponse.md +++ b/twilio/rest/autopilot/v1/docs/ListModelBuildResponse.md @@ -1,10 +1,10 @@ # ListModelBuildResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListAssistantResponseMeta**](ListAssistantResponse_meta.md) | [optional] -**ModelBuilds** | [**[]AutopilotV1AssistantModelBuild**](autopilot.v1.assistant.model_build.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListAssistantResponseMeta**](ListAssistantResponse_meta.md) | |[optional] +**ModelBuilds** | [**[]AutopilotV1AssistantModelBuild**](autopilot.v1.assistant.model_build.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/autopilot/v1/docs/ListQueryResponse.md b/twilio/rest/autopilot/v1/docs/ListQueryResponse.md index ac696382c..517565855 100644 --- a/twilio/rest/autopilot/v1/docs/ListQueryResponse.md +++ b/twilio/rest/autopilot/v1/docs/ListQueryResponse.md @@ -1,10 +1,10 @@ # ListQueryResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListAssistantResponseMeta**](ListAssistantResponse_meta.md) | [optional] -**Queries** | [**[]AutopilotV1AssistantQuery**](autopilot.v1.assistant.query.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListAssistantResponseMeta**](ListAssistantResponse_meta.md) | |[optional] +**Queries** | [**[]AutopilotV1AssistantQuery**](autopilot.v1.assistant.query.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/autopilot/v1/docs/ListSampleResponse.md b/twilio/rest/autopilot/v1/docs/ListSampleResponse.md index 81c38dabb..a0f9f4e64 100644 --- a/twilio/rest/autopilot/v1/docs/ListSampleResponse.md +++ b/twilio/rest/autopilot/v1/docs/ListSampleResponse.md @@ -1,10 +1,10 @@ # ListSampleResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListAssistantResponseMeta**](ListAssistantResponse_meta.md) | [optional] -**Samples** | [**[]AutopilotV1AssistantTaskSample**](autopilot.v1.assistant.task.sample.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListAssistantResponseMeta**](ListAssistantResponse_meta.md) | |[optional] +**Samples** | [**[]AutopilotV1AssistantTaskSample**](autopilot.v1.assistant.task.sample.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/autopilot/v1/docs/ListTaskResponse.md b/twilio/rest/autopilot/v1/docs/ListTaskResponse.md index 2228d93ee..c0b0a2745 100644 --- a/twilio/rest/autopilot/v1/docs/ListTaskResponse.md +++ b/twilio/rest/autopilot/v1/docs/ListTaskResponse.md @@ -1,10 +1,10 @@ # ListTaskResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListAssistantResponseMeta**](ListAssistantResponse_meta.md) | [optional] -**Tasks** | [**[]AutopilotV1AssistantTask**](autopilot.v1.assistant.task.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListAssistantResponseMeta**](ListAssistantResponse_meta.md) | |[optional] +**Tasks** | [**[]AutopilotV1AssistantTask**](autopilot.v1.assistant.task.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/autopilot/v1/docs/ListWebhookResponse.md b/twilio/rest/autopilot/v1/docs/ListWebhookResponse.md index 921e6eb03..a2c8cf16f 100644 --- a/twilio/rest/autopilot/v1/docs/ListWebhookResponse.md +++ b/twilio/rest/autopilot/v1/docs/ListWebhookResponse.md @@ -1,10 +1,10 @@ # ListWebhookResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListAssistantResponseMeta**](ListAssistantResponse_meta.md) | [optional] -**Webhooks** | [**[]AutopilotV1AssistantWebhook**](autopilot.v1.assistant.webhook.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListAssistantResponseMeta**](ListAssistantResponse_meta.md) | |[optional] +**Webhooks** | [**[]AutopilotV1AssistantWebhook**](autopilot.v1.assistant.webhook.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant.go b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant.go index e8f74159c..bd1991c60 100644 --- a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant.go +++ b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant.go @@ -17,18 +17,32 @@ import ( // AutopilotV1Assistant struct for AutopilotV1Assistant type AutopilotV1Assistant struct { - AccountSid *string `json:"AccountSid,omitempty"` - CallbackEvents *string `json:"CallbackEvents,omitempty"` - CallbackUrl *string `json:"CallbackUrl,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - DevelopmentStage *string `json:"DevelopmentStage,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - LatestModelBuildSid *string `json:"LatestModelBuildSid,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - LogQueries *bool `json:"LogQueries,omitempty"` - NeedsModelBuild *bool `json:"NeedsModelBuild,omitempty"` - Sid *string `json:"Sid,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // Reserved + CallbackEvents *string `json:"CallbackEvents,omitempty"` + // Reserved + CallbackUrl *string `json:"CallbackUrl,omitempty"` + // The RFC 2822 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // A string describing the state of the assistant. + DevelopmentStage *string `json:"DevelopmentStage,omitempty"` + // The string that you assigned to describe the resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // Reserved + LatestModelBuildSid *string `json:"LatestModelBuildSid,omitempty"` + // A list of the URLs of the Assistant's related resources + Links *map[string]interface{} `json:"Links,omitempty"` + // Whether queries should be logged and kept after training + LogQueries *bool `json:"LogQueries,omitempty"` + // Whether model needs to be rebuilt + NeedsModelBuild *bool `json:"NeedsModelBuild,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // An application-defined string that uniquely identifies the resource + UniqueName *string `json:"UniqueName,omitempty"` + // The absolute URL of the Assistant resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_defaults.go b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_defaults.go index b6bef0a32..2bed3d78e 100644 --- a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_defaults.go +++ b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_defaults.go @@ -13,8 +13,12 @@ package openapi // AutopilotV1AssistantDefaults struct for AutopilotV1AssistantDefaults type AutopilotV1AssistantDefaults struct { - AccountSid *string `json:"AccountSid,omitempty"` - AssistantSid *string `json:"AssistantSid,omitempty"` - Data *map[string]interface{} `json:"Data,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The SID of the Assistant that is the parent of the resource + AssistantSid *string `json:"AssistantSid,omitempty"` + // The JSON string that describes the default task links + Data *map[string]interface{} `json:"Data,omitempty"` + // The absolute URL of the Defaults resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_dialogue.go b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_dialogue.go index 648570a26..66326d80c 100644 --- a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_dialogue.go +++ b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_dialogue.go @@ -13,9 +13,14 @@ package openapi // AutopilotV1AssistantDialogue struct for AutopilotV1AssistantDialogue type AutopilotV1AssistantDialogue struct { - AccountSid *string `json:"AccountSid,omitempty"` - AssistantSid *string `json:"AssistantSid,omitempty"` - Data *map[string]interface{} `json:"Data,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The SID of the Assistant that is the parent of the resource + AssistantSid *string `json:"AssistantSid,omitempty"` + // The JSON string that describes the dialogue session object + Data *map[string]interface{} `json:"Data,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The absolute URL of the Dialogue resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_field_type.go b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_field_type.go index 22eee0135..9b266c7ad 100644 --- a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_field_type.go +++ b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_field_type.go @@ -17,13 +17,22 @@ import ( // AutopilotV1AssistantFieldType struct for AutopilotV1AssistantFieldType type AutopilotV1AssistantFieldType struct { - AccountSid *string `json:"AccountSid,omitempty"` - AssistantSid *string `json:"AssistantSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - Sid *string `json:"Sid,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The SID of the Assistant that is the parent of the resource + AssistantSid *string `json:"AssistantSid,omitempty"` + // The RFC 2822 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The string that you assigned to describe the resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // A list of the URLs of related resources + Links *map[string]interface{} `json:"Links,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // An application-defined string that uniquely identifies the resource + UniqueName *string `json:"UniqueName,omitempty"` + // The absolute URL of the FieldType resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_field_type_field_value.go b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_field_type_field_value.go index 4cead0f73..d15c4aac4 100644 --- a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_field_type_field_value.go +++ b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_field_type_field_value.go @@ -17,14 +17,24 @@ import ( // AutopilotV1AssistantFieldTypeFieldValue struct for AutopilotV1AssistantFieldTypeFieldValue type AutopilotV1AssistantFieldTypeFieldValue struct { - AccountSid *string `json:"AccountSid,omitempty"` - AssistantSid *string `json:"AssistantSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FieldTypeSid *string `json:"FieldTypeSid,omitempty"` - Language *string `json:"Language,omitempty"` - Sid *string `json:"Sid,omitempty"` - SynonymOf *string `json:"SynonymOf,omitempty"` - Url *string `json:"Url,omitempty"` - Value *string `json:"Value,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The SID of the Assistant that is the parent of the FieldType associated with the resource + AssistantSid *string `json:"AssistantSid,omitempty"` + // The RFC 2822 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The SID of the Field Type associated with the Field Value + FieldTypeSid *string `json:"FieldTypeSid,omitempty"` + // The ISO language-country tag that identifies the language of the value + Language *string `json:"Language,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The word for which the field value is a synonym of + SynonymOf *string `json:"SynonymOf,omitempty"` + // The absolute URL of the FieldValue resource + Url *string `json:"Url,omitempty"` + // The Field Value data + Value *string `json:"Value,omitempty"` } diff --git a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_model_build.go b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_model_build.go index 24066d69a..d8b9deb62 100644 --- a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_model_build.go +++ b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_model_build.go @@ -17,14 +17,24 @@ import ( // AutopilotV1AssistantModelBuild struct for AutopilotV1AssistantModelBuild type AutopilotV1AssistantModelBuild struct { - AccountSid *string `json:"AccountSid,omitempty"` - AssistantSid *string `json:"AssistantSid,omitempty"` - BuildDuration *int32 `json:"BuildDuration,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - ErrorCode *int32 `json:"ErrorCode,omitempty"` - Sid *string `json:"Sid,omitempty"` - Status *ModelBuildStatus `json:"Status,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The SID of the Assistant that is the parent of the resource + AssistantSid *string `json:"AssistantSid,omitempty"` + // The time in seconds it took to build the model + BuildDuration *int32 `json:"BuildDuration,omitempty"` + // The RFC 2822 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // More information about why the model build failed, if `status` is `failed` + ErrorCode *int32 `json:"ErrorCode,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The status of the model build process + Status *string `json:"Status,omitempty"` + // An application-defined string that uniquely identifies the resource + UniqueName *string `json:"UniqueName,omitempty"` + // The absolute URL of the ModelBuild resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_query.go b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_query.go index 555cac84b..762bc6c3b 100644 --- a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_query.go +++ b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_query.go @@ -17,18 +17,32 @@ import ( // AutopilotV1AssistantQuery struct for AutopilotV1AssistantQuery type AutopilotV1AssistantQuery struct { - AccountSid *string `json:"AccountSid,omitempty"` - AssistantSid *string `json:"AssistantSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - DialogueSid *string `json:"DialogueSid,omitempty"` - Language *string `json:"Language,omitempty"` - ModelBuildSid *string `json:"ModelBuildSid,omitempty"` - Query *string `json:"Query,omitempty"` - Results *map[string]interface{} `json:"Results,omitempty"` - SampleSid *string `json:"SampleSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - SourceChannel *string `json:"SourceChannel,omitempty"` - Status *string `json:"Status,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The SID of the Assistant that is the parent of the resource + AssistantSid *string `json:"AssistantSid,omitempty"` + // The RFC 2822 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The SID of the [Dialogue](https://www.twilio.com/docs/autopilot/api/dialogue). + DialogueSid *string `json:"DialogueSid,omitempty"` + // The ISO language-country string that specifies the language used by the Query + Language *string `json:"Language,omitempty"` + // The SID of the [Model Build](https://www.twilio.com/docs/autopilot/api/model-build) queried + ModelBuildSid *string `json:"ModelBuildSid,omitempty"` + // The end-user's natural language input + Query *string `json:"Query,omitempty"` + // The natural language analysis results that include the Task recognized and a list of identified Fields + Results *map[string]interface{} `json:"Results,omitempty"` + // The SID of an optional reference to the Sample created from the query + SampleSid *string `json:"SampleSid,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The communication channel from where the end-user input came + SourceChannel *string `json:"SourceChannel,omitempty"` + // The status of the Query + Status *string `json:"Status,omitempty"` + // The absolute URL of the Query resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_style_sheet.go b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_style_sheet.go index 8b50fe03d..dde6186c5 100644 --- a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_style_sheet.go +++ b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_style_sheet.go @@ -13,8 +13,12 @@ package openapi // AutopilotV1AssistantStyleSheet struct for AutopilotV1AssistantStyleSheet type AutopilotV1AssistantStyleSheet struct { - AccountSid *string `json:"AccountSid,omitempty"` - AssistantSid *string `json:"AssistantSid,omitempty"` - Data *map[string]interface{} `json:"Data,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The SID of the Assistant that is the parent of the resource + AssistantSid *string `json:"AssistantSid,omitempty"` + // The JSON string that describes the style sheet object + Data *map[string]interface{} `json:"Data,omitempty"` + // The absolute URL of the StyleSheet resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_task.go b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_task.go index 814e349e5..5678aa6c8 100644 --- a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_task.go +++ b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_task.go @@ -17,14 +17,24 @@ import ( // AutopilotV1AssistantTask struct for AutopilotV1AssistantTask type AutopilotV1AssistantTask struct { - AccountSid *string `json:"AccountSid,omitempty"` - ActionsUrl *string `json:"ActionsUrl,omitempty"` - AssistantSid *string `json:"AssistantSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - Sid *string `json:"Sid,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The URL from which the Assistant can fetch actions + ActionsUrl *string `json:"ActionsUrl,omitempty"` + // The SID of the Assistant that is the parent of the resource + AssistantSid *string `json:"AssistantSid,omitempty"` + // The RFC 2822 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The string that you assigned to describe the resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // A list of the URLs of related resources + Links *map[string]interface{} `json:"Links,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // An application-defined string that uniquely identifies the resource + UniqueName *string `json:"UniqueName,omitempty"` + // The absolute URL of the Task resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_task_field.go b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_task_field.go index 5466138fa..98283431a 100644 --- a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_task_field.go +++ b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_task_field.go @@ -17,13 +17,22 @@ import ( // AutopilotV1AssistantTaskField struct for AutopilotV1AssistantTaskField type AutopilotV1AssistantTaskField struct { - AccountSid *string `json:"AccountSid,omitempty"` - AssistantSid *string `json:"AssistantSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FieldType *string `json:"FieldType,omitempty"` - Sid *string `json:"Sid,omitempty"` - TaskSid *string `json:"TaskSid,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The SID of the Assistant that is the parent of the Task associated with the resource + AssistantSid *string `json:"AssistantSid,omitempty"` + // The RFC 2822 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The Field Type of the field + FieldType *string `json:"FieldType,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The SID of the [Task](https://www.twilio.com/docs/autopilot/api/task) resource associated with this Field + TaskSid *string `json:"TaskSid,omitempty"` + // An application-defined string that uniquely identifies the resource + UniqueName *string `json:"UniqueName,omitempty"` + // The absolute URL of the Field resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_task_sample.go b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_task_sample.go index e71600566..2a4270efd 100644 --- a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_task_sample.go +++ b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_task_sample.go @@ -17,14 +17,24 @@ import ( // AutopilotV1AssistantTaskSample struct for AutopilotV1AssistantTaskSample type AutopilotV1AssistantTaskSample struct { - AccountSid *string `json:"AccountSid,omitempty"` - AssistantSid *string `json:"AssistantSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Language *string `json:"Language,omitempty"` - Sid *string `json:"Sid,omitempty"` - SourceChannel *string `json:"SourceChannel,omitempty"` - TaggedText *string `json:"TaggedText,omitempty"` - TaskSid *string `json:"TaskSid,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The SID of the Assistant that is the parent of the Task associated with the resource + AssistantSid *string `json:"AssistantSid,omitempty"` + // The RFC 2822 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // An ISO language-country string that specifies the language used for the sample + Language *string `json:"Language,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The communication channel from which the sample was captured + SourceChannel *string `json:"SourceChannel,omitempty"` + // The text example of how end users might express the task + TaggedText *string `json:"TaggedText,omitempty"` + // The SID of the Task associated with the resource + TaskSid *string `json:"TaskSid,omitempty"` + // The absolute URL of the Sample resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_task_task_actions.go b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_task_task_actions.go index 51fcb3434..974dfae00 100644 --- a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_task_task_actions.go +++ b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_task_task_actions.go @@ -13,9 +13,14 @@ package openapi // AutopilotV1AssistantTaskTaskActions struct for AutopilotV1AssistantTaskTaskActions type AutopilotV1AssistantTaskTaskActions struct { - AccountSid *string `json:"AccountSid,omitempty"` - AssistantSid *string `json:"AssistantSid,omitempty"` - Data *map[string]interface{} `json:"Data,omitempty"` - TaskSid *string `json:"TaskSid,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The SID of the Assistant that is the parent of the Task associated with the resource + AssistantSid *string `json:"AssistantSid,omitempty"` + // The JSON string that specifies the actions that instruct the Assistant on how to perform the task + Data *map[string]interface{} `json:"Data,omitempty"` + // The SID of the Task associated with the resource + TaskSid *string `json:"TaskSid,omitempty"` + // The absolute URL of the TaskActions resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_task_task_statistics.go b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_task_task_statistics.go index 64bf0a102..2ff031051 100644 --- a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_task_task_statistics.go +++ b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_task_task_statistics.go @@ -13,10 +13,16 @@ package openapi // AutopilotV1AssistantTaskTaskStatistics struct for AutopilotV1AssistantTaskTaskStatistics type AutopilotV1AssistantTaskTaskStatistics struct { - AccountSid *string `json:"AccountSid,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The SID of the Assistant that is the parent of the Task associated with the resource AssistantSid *string `json:"AssistantSid,omitempty"` - FieldsCount *int32 `json:"FieldsCount,omitempty"` - SamplesCount *int32 `json:"SamplesCount,omitempty"` - TaskSid *string `json:"TaskSid,omitempty"` - Url *string `json:"Url,omitempty"` + // The total number of Fields associated with the Task + FieldsCount *int32 `json:"FieldsCount,omitempty"` + // The total number of Samples associated with the Task + SamplesCount *int32 `json:"SamplesCount,omitempty"` + // The SID of the Task for which the statistics were collected + TaskSid *string `json:"TaskSid,omitempty"` + // The absolute URL of the TaskStatistics resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_webhook.go b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_webhook.go index ff22b14c8..d0ba020da 100644 --- a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_webhook.go +++ b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_webhook.go @@ -17,14 +17,24 @@ import ( // AutopilotV1AssistantWebhook struct for AutopilotV1AssistantWebhook type AutopilotV1AssistantWebhook struct { - AccountSid *string `json:"AccountSid,omitempty"` - AssistantSid *string `json:"AssistantSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Events *string `json:"Events,omitempty"` - Sid *string `json:"Sid,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` - Url *string `json:"Url,omitempty"` - WebhookMethod *string `json:"WebhookMethod,omitempty"` - WebhookUrl *string `json:"WebhookUrl,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The SID of the Assistant that is the parent of the resource + AssistantSid *string `json:"AssistantSid,omitempty"` + // The RFC 2822 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The list of space-separated events that this Webhook is subscribed to. + Events *string `json:"Events,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // An application-defined string that uniquely identifies the resource + UniqueName *string `json:"UniqueName,omitempty"` + // The absolute URL of the Webhook resource + Url *string `json:"Url,omitempty"` + // The method used when calling the webhook's URL. + WebhookMethod *string `json:"WebhookMethod,omitempty"` + // The URL associated with this Webhook. + WebhookUrl *string `json:"WebhookUrl,omitempty"` } diff --git a/twilio/rest/autopilot/v1/model_autopilot_v1_restore_assistant.go b/twilio/rest/autopilot/v1/model_autopilot_v1_restore_assistant.go index 329c4d873..4e78d760d 100644 --- a/twilio/rest/autopilot/v1/model_autopilot_v1_restore_assistant.go +++ b/twilio/rest/autopilot/v1/model_autopilot_v1_restore_assistant.go @@ -17,16 +17,28 @@ import ( // AutopilotV1RestoreAssistant struct for AutopilotV1RestoreAssistant type AutopilotV1RestoreAssistant struct { - AccountSid *string `json:"AccountSid,omitempty"` - CallbackEvents *string `json:"CallbackEvents,omitempty"` - CallbackUrl *string `json:"CallbackUrl,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - DevelopmentStage *string `json:"DevelopmentStage,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - LatestModelBuildSid *string `json:"LatestModelBuildSid,omitempty"` - LogQueries *bool `json:"LogQueries,omitempty"` - NeedsModelBuild *bool `json:"NeedsModelBuild,omitempty"` - Sid *string `json:"Sid,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // Reserved + CallbackEvents *string `json:"CallbackEvents,omitempty"` + // Reserved + CallbackUrl *string `json:"CallbackUrl,omitempty"` + // The RFC 2822 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // A string describing the state of the assistant. + DevelopmentStage *string `json:"DevelopmentStage,omitempty"` + // The string that you assigned to describe the resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // Reserved + LatestModelBuildSid *string `json:"LatestModelBuildSid,omitempty"` + // Whether queries should be logged and kept after training + LogQueries *bool `json:"LogQueries,omitempty"` + // Whether model needs to be rebuilt + NeedsModelBuild *bool `json:"NeedsModelBuild,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // An application-defined string that uniquely identifies the resource + UniqueName *string `json:"UniqueName,omitempty"` } diff --git a/twilio/rest/bulkexports/v1/docs/BulkexportsV1Export.md b/twilio/rest/bulkexports/v1/docs/BulkexportsV1Export.md index 19366325e..597ee9eaa 100644 --- a/twilio/rest/bulkexports/v1/docs/BulkexportsV1Export.md +++ b/twilio/rest/bulkexports/v1/docs/BulkexportsV1Export.md @@ -1,11 +1,11 @@ # BulkexportsV1Export ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Links** | Pointer to **map[string]interface{}** | -**ResourceType** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Links** | Pointer to **map[string]interface{}** | Nested resource URLs. | +**ResourceType** | Pointer to **string** | The type of communication – Messages, Calls, Conferences, and Participants | +**Url** | Pointer to **string** | The URL of this resource. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/bulkexports/v1/docs/BulkexportsV1ExportConfiguration.md b/twilio/rest/bulkexports/v1/docs/BulkexportsV1ExportConfiguration.md index 0b2b372e8..bc4107f26 100644 --- a/twilio/rest/bulkexports/v1/docs/BulkexportsV1ExportConfiguration.md +++ b/twilio/rest/bulkexports/v1/docs/BulkexportsV1ExportConfiguration.md @@ -1,13 +1,13 @@ # BulkexportsV1ExportConfiguration ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Enabled** | Pointer to **bool** | -**ResourceType** | Pointer to **string** | -**Url** | Pointer to **string** | -**WebhookMethod** | Pointer to **string** | -**WebhookUrl** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | Pointer to **bool** | Whether files are automatically generated | +**ResourceType** | Pointer to **string** | The type of communication – Messages, Calls, Conferences, and Participants | +**Url** | Pointer to **string** | The URL of this resource. | +**WebhookMethod** | Pointer to **string** | Whether to GET or POST to the webhook url | +**WebhookUrl** | Pointer to **string** | URL targeted at export | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/bulkexports/v1/docs/BulkexportsV1ExportDay.md b/twilio/rest/bulkexports/v1/docs/BulkexportsV1ExportDay.md index 9c58a1803..c0a195554 100644 --- a/twilio/rest/bulkexports/v1/docs/BulkexportsV1ExportDay.md +++ b/twilio/rest/bulkexports/v1/docs/BulkexportsV1ExportDay.md @@ -1,13 +1,13 @@ # BulkexportsV1ExportDay ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**CreateDate** | Pointer to **string** | -**Day** | Pointer to **string** | -**FriendlyName** | Pointer to **string** | -**ResourceType** | Pointer to **string** | -**Size** | Pointer to **int32** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CreateDate** | Pointer to **string** | The date when resource is created | +**Day** | Pointer to **string** | The date of the data in the file | +**FriendlyName** | Pointer to **string** | The friendly name specified when creating the job | +**ResourceType** | Pointer to **string** | The type of communication – Messages, Calls, Conferences, and Participants | +**Size** | Pointer to **int32** | Size of the file in bytes | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/bulkexports/v1/docs/BulkexportsV1ExportDayInstance.md b/twilio/rest/bulkexports/v1/docs/BulkexportsV1ExportDayInstance.md index 182b6bbb2..763bd87c8 100644 --- a/twilio/rest/bulkexports/v1/docs/BulkexportsV1ExportDayInstance.md +++ b/twilio/rest/bulkexports/v1/docs/BulkexportsV1ExportDayInstance.md @@ -1,9 +1,9 @@ # BulkexportsV1ExportDayInstance ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**RedirectTo** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RedirectTo** | Pointer to **string** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/bulkexports/v1/docs/BulkexportsV1ExportExportCustomJob.md b/twilio/rest/bulkexports/v1/docs/BulkexportsV1ExportExportCustomJob.md index 496119219..ea4ea9d08 100644 --- a/twilio/rest/bulkexports/v1/docs/BulkexportsV1ExportExportCustomJob.md +++ b/twilio/rest/bulkexports/v1/docs/BulkexportsV1ExportExportCustomJob.md @@ -1,17 +1,17 @@ # BulkexportsV1ExportExportCustomJob ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Details** | Pointer to **map[string]interface{}** | -**Email** | Pointer to **string** | -**EndDay** | Pointer to **string** | -**FriendlyName** | Pointer to **string** | -**JobSid** | Pointer to **string** | -**ResourceType** | Pointer to **string** | -**StartDay** | Pointer to **string** | -**WebhookMethod** | Pointer to **string** | -**WebhookUrl** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Details** | Pointer to **map[string]interface{}** | The details of a job state which is an object that contains a status string, a day count integer, and list of days in the job | +**Email** | Pointer to **string** | The optional email to send the completion notification to | +**EndDay** | Pointer to **string** | The end day for the custom export specified as a string in the format of yyyy-MM-dd. This will be the last day exported. For instance, to export a single day, choose the same day for start and end day. To export the first 4 days of July, you would set the start date to 2020-07-01 and the end date to 2020-07-04. The end date must be the UTC day before yesterday. | +**FriendlyName** | Pointer to **string** | The friendly name specified when creating the job | +**JobSid** | Pointer to **string** | The unique job_sid returned when the custom export was created. This can be used to look up the status of the job. | +**ResourceType** | Pointer to **string** | The type of communication – Messages, Calls, Conferences, and Participants | +**StartDay** | Pointer to **string** | The start day for the custom export specified as a string in the format of yyyy-MM-dd | +**WebhookMethod** | Pointer to **string** | This is the method used to call the webhook | +**WebhookUrl** | Pointer to **string** | The optional webhook url called on completion | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/bulkexports/v1/docs/BulkexportsV1ExportJob.md b/twilio/rest/bulkexports/v1/docs/BulkexportsV1ExportJob.md index 2465581c4..384da85ac 100644 --- a/twilio/rest/bulkexports/v1/docs/BulkexportsV1ExportJob.md +++ b/twilio/rest/bulkexports/v1/docs/BulkexportsV1ExportJob.md @@ -1,18 +1,18 @@ # BulkexportsV1ExportJob ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Details** | Pointer to **map[string]interface{}** | -**Email** | Pointer to **string** | -**EndDay** | Pointer to **string** | -**FriendlyName** | Pointer to **string** | -**JobSid** | Pointer to **string** | -**ResourceType** | Pointer to **string** | -**StartDay** | Pointer to **string** | -**Url** | Pointer to **string** | -**WebhookMethod** | Pointer to **string** | -**WebhookUrl** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Details** | Pointer to **map[string]interface{}** | This is a list of the completed, pending, or errored dates within the export time range, with one entry for each status with more than one day in that status | +**Email** | Pointer to **string** | The optional email to send the completion notification to | +**EndDay** | Pointer to **string** | The end time for the export specified when creating the job | +**FriendlyName** | Pointer to **string** | The friendly name specified when creating the job | +**JobSid** | Pointer to **string** | The job_sid returned when the export was created | +**ResourceType** | Pointer to **string** | The type of communication – Messages, Calls, Conferences, and Participants | +**StartDay** | Pointer to **string** | The start time for the export specified when creating the job | +**Url** | Pointer to **string** | | +**WebhookMethod** | Pointer to **string** | This is the method used to call the webhook | +**WebhookUrl** | Pointer to **string** | The optional webhook url called on completion | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/bulkexports/v1/docs/ListDayResponse.md b/twilio/rest/bulkexports/v1/docs/ListDayResponse.md index 7f60ae2e3..e87ca785e 100644 --- a/twilio/rest/bulkexports/v1/docs/ListDayResponse.md +++ b/twilio/rest/bulkexports/v1/docs/ListDayResponse.md @@ -1,10 +1,10 @@ # ListDayResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Days** | [**[]BulkexportsV1ExportDay**](bulkexports.v1.export.day.md) | [optional] -**Meta** | [**ListDayResponseMeta**](ListDayResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Days** | [**[]BulkexportsV1ExportDay**](bulkexports.v1.export.day.md) | |[optional] +**Meta** | [**ListDayResponseMeta**](ListDayResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/bulkexports/v1/docs/ListDayResponseMeta.md b/twilio/rest/bulkexports/v1/docs/ListDayResponseMeta.md index 37650ac77..1f719cbd2 100644 --- a/twilio/rest/bulkexports/v1/docs/ListDayResponseMeta.md +++ b/twilio/rest/bulkexports/v1/docs/ListDayResponseMeta.md @@ -1,15 +1,15 @@ # ListDayResponseMeta ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**FirstPageUrl** | **string** | [optional] -**Key** | **string** | [optional] -**NextPageUrl** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUrl** | **string** | [optional] -**Url** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstPageUrl** | **string** | |[optional] +**Key** | **string** | |[optional] +**NextPageUrl** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUrl** | **string** | |[optional] +**Url** | **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/twilio/rest/bulkexports/v1/docs/ListExportCustomJobResponse.md b/twilio/rest/bulkexports/v1/docs/ListExportCustomJobResponse.md index 5a23b6a4d..2b42f4f53 100644 --- a/twilio/rest/bulkexports/v1/docs/ListExportCustomJobResponse.md +++ b/twilio/rest/bulkexports/v1/docs/ListExportCustomJobResponse.md @@ -1,10 +1,10 @@ # ListExportCustomJobResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Jobs** | [**[]BulkexportsV1ExportExportCustomJob**](bulkexports.v1.export.export_custom_job.md) | [optional] -**Meta** | [**ListDayResponseMeta**](ListDayResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Jobs** | [**[]BulkexportsV1ExportExportCustomJob**](bulkexports.v1.export.export_custom_job.md) | |[optional] +**Meta** | [**ListDayResponseMeta**](ListDayResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/bulkexports/v1/model_bulkexports_v1_export.go b/twilio/rest/bulkexports/v1/model_bulkexports_v1_export.go index fc02e258e..daf2f7bd3 100644 --- a/twilio/rest/bulkexports/v1/model_bulkexports_v1_export.go +++ b/twilio/rest/bulkexports/v1/model_bulkexports_v1_export.go @@ -13,7 +13,10 @@ package openapi // BulkexportsV1Export struct for BulkexportsV1Export type BulkexportsV1Export struct { - Links *map[string]interface{} `json:"Links,omitempty"` - ResourceType *string `json:"ResourceType,omitempty"` - Url *string `json:"Url,omitempty"` + // Nested resource URLs. + Links *map[string]interface{} `json:"Links,omitempty"` + // The type of communication – Messages, Calls, Conferences, and Participants + ResourceType *string `json:"ResourceType,omitempty"` + // The URL of this resource. + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/bulkexports/v1/model_bulkexports_v1_export_configuration.go b/twilio/rest/bulkexports/v1/model_bulkexports_v1_export_configuration.go index f542ee163..7999347d4 100644 --- a/twilio/rest/bulkexports/v1/model_bulkexports_v1_export_configuration.go +++ b/twilio/rest/bulkexports/v1/model_bulkexports_v1_export_configuration.go @@ -13,9 +13,14 @@ package openapi // BulkexportsV1ExportConfiguration struct for BulkexportsV1ExportConfiguration type BulkexportsV1ExportConfiguration struct { - Enabled *bool `json:"Enabled,omitempty"` - ResourceType *string `json:"ResourceType,omitempty"` - Url *string `json:"Url,omitempty"` + // Whether files are automatically generated + Enabled *bool `json:"Enabled,omitempty"` + // The type of communication – Messages, Calls, Conferences, and Participants + ResourceType *string `json:"ResourceType,omitempty"` + // The URL of this resource. + Url *string `json:"Url,omitempty"` + // Whether to GET or POST to the webhook url WebhookMethod *string `json:"WebhookMethod,omitempty"` - WebhookUrl *string `json:"WebhookUrl,omitempty"` + // URL targeted at export + WebhookUrl *string `json:"WebhookUrl,omitempty"` } diff --git a/twilio/rest/bulkexports/v1/model_bulkexports_v1_export_day.go b/twilio/rest/bulkexports/v1/model_bulkexports_v1_export_day.go index 230ddfe67..4af7ad177 100644 --- a/twilio/rest/bulkexports/v1/model_bulkexports_v1_export_day.go +++ b/twilio/rest/bulkexports/v1/model_bulkexports_v1_export_day.go @@ -13,9 +13,14 @@ package openapi // BulkexportsV1ExportDay struct for BulkexportsV1ExportDay type BulkexportsV1ExportDay struct { - CreateDate *string `json:"CreateDate,omitempty"` - Day *string `json:"Day,omitempty"` + // The date when resource is created + CreateDate *string `json:"CreateDate,omitempty"` + // The date of the data in the file + Day *string `json:"Day,omitempty"` + // The friendly name specified when creating the job FriendlyName *string `json:"FriendlyName,omitempty"` + // The type of communication – Messages, Calls, Conferences, and Participants ResourceType *string `json:"ResourceType,omitempty"` - Size *int32 `json:"Size,omitempty"` + // Size of the file in bytes + Size *int32 `json:"Size,omitempty"` } diff --git a/twilio/rest/bulkexports/v1/model_bulkexports_v1_export_export_custom_job.go b/twilio/rest/bulkexports/v1/model_bulkexports_v1_export_export_custom_job.go index 4da0a0697..9ab4f36d0 100644 --- a/twilio/rest/bulkexports/v1/model_bulkexports_v1_export_export_custom_job.go +++ b/twilio/rest/bulkexports/v1/model_bulkexports_v1_export_export_custom_job.go @@ -13,13 +13,22 @@ package openapi // BulkexportsV1ExportExportCustomJob struct for BulkexportsV1ExportExportCustomJob type BulkexportsV1ExportExportCustomJob struct { - Details *map[string]interface{} `json:"Details,omitempty"` - Email *string `json:"Email,omitempty"` - EndDay *string `json:"EndDay,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - JobSid *string `json:"JobSid,omitempty"` - ResourceType *string `json:"ResourceType,omitempty"` - StartDay *string `json:"StartDay,omitempty"` - WebhookMethod *string `json:"WebhookMethod,omitempty"` - WebhookUrl *string `json:"WebhookUrl,omitempty"` + // The details of a job state which is an object that contains a status string, a day count integer, and list of days in the job + Details *map[string]interface{} `json:"Details,omitempty"` + // The optional email to send the completion notification to + Email *string `json:"Email,omitempty"` + // The end day for the custom export specified as a string in the format of yyyy-MM-dd. This will be the last day exported. For instance, to export a single day, choose the same day for start and end day. To export the first 4 days of July, you would set the start date to 2020-07-01 and the end date to 2020-07-04. The end date must be the UTC day before yesterday. + EndDay *string `json:"EndDay,omitempty"` + // The friendly name specified when creating the job + FriendlyName *string `json:"FriendlyName,omitempty"` + // The unique job_sid returned when the custom export was created. This can be used to look up the status of the job. + JobSid *string `json:"JobSid,omitempty"` + // The type of communication – Messages, Calls, Conferences, and Participants + ResourceType *string `json:"ResourceType,omitempty"` + // The start day for the custom export specified as a string in the format of yyyy-MM-dd + StartDay *string `json:"StartDay,omitempty"` + // This is the method used to call the webhook + WebhookMethod *string `json:"WebhookMethod,omitempty"` + // The optional webhook url called on completion + WebhookUrl *string `json:"WebhookUrl,omitempty"` } diff --git a/twilio/rest/bulkexports/v1/model_bulkexports_v1_export_job.go b/twilio/rest/bulkexports/v1/model_bulkexports_v1_export_job.go index c0fc834ba..e4d30be37 100644 --- a/twilio/rest/bulkexports/v1/model_bulkexports_v1_export_job.go +++ b/twilio/rest/bulkexports/v1/model_bulkexports_v1_export_job.go @@ -13,14 +13,23 @@ package openapi // BulkexportsV1ExportJob struct for BulkexportsV1ExportJob type BulkexportsV1ExportJob struct { - Details *map[string]interface{} `json:"Details,omitempty"` - Email *string `json:"Email,omitempty"` - EndDay *string `json:"EndDay,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - JobSid *string `json:"JobSid,omitempty"` - ResourceType *string `json:"ResourceType,omitempty"` - StartDay *string `json:"StartDay,omitempty"` - Url *string `json:"Url,omitempty"` - WebhookMethod *string `json:"WebhookMethod,omitempty"` - WebhookUrl *string `json:"WebhookUrl,omitempty"` + // This is a list of the completed, pending, or errored dates within the export time range, with one entry for each status with more than one day in that status + Details *map[string]interface{} `json:"Details,omitempty"` + // The optional email to send the completion notification to + Email *string `json:"Email,omitempty"` + // The end time for the export specified when creating the job + EndDay *string `json:"EndDay,omitempty"` + // The friendly name specified when creating the job + FriendlyName *string `json:"FriendlyName,omitempty"` + // The job_sid returned when the export was created + JobSid *string `json:"JobSid,omitempty"` + // The type of communication – Messages, Calls, Conferences, and Participants + ResourceType *string `json:"ResourceType,omitempty"` + // The start time for the export specified when creating the job + StartDay *string `json:"StartDay,omitempty"` + Url *string `json:"Url,omitempty"` + // This is the method used to call the webhook + WebhookMethod *string `json:"WebhookMethod,omitempty"` + // The optional webhook url called on completion + WebhookUrl *string `json:"WebhookUrl,omitempty"` } diff --git a/twilio/rest/chat/v1/README.md b/twilio/rest/chat/v1/README.md index 2821d86a3..547fe1e44 100644 --- a/twilio/rest/chat/v1/README.md +++ b/twilio/rest/chat/v1/README.md @@ -75,7 +75,6 @@ Class | Method | HTTP request | Description ## Documentation For Models - - [ChannelChannelType](docs/ChannelChannelType.md) - [ChatV1Credential](docs/ChatV1Credential.md) - [ChatV1Service](docs/ChatV1Service.md) - [ChatV1ServiceChannel](docs/ChatV1ServiceChannel.md) @@ -85,7 +84,6 @@ Class | Method | HTTP request | Description - [ChatV1ServiceRole](docs/ChatV1ServiceRole.md) - [ChatV1ServiceUser](docs/ChatV1ServiceUser.md) - [ChatV1ServiceUserUserChannel](docs/ChatV1ServiceUserUserChannel.md) - - [CredentialPushService](docs/CredentialPushService.md) - [ListChannelResponse](docs/ListChannelResponse.md) - [ListCredentialResponse](docs/ListCredentialResponse.md) - [ListCredentialResponseMeta](docs/ListCredentialResponseMeta.md) @@ -96,8 +94,6 @@ Class | Method | HTTP request | Description - [ListServiceResponse](docs/ListServiceResponse.md) - [ListUserChannelResponse](docs/ListUserChannelResponse.md) - [ListUserResponse](docs/ListUserResponse.md) - - [RoleRoleType](docs/RoleRoleType.md) - - [UserChannelChannelStatus](docs/UserChannelChannelStatus.md) ## Documentation For Authorization diff --git a/twilio/rest/chat/v1/docs/ChatV1Credential.md b/twilio/rest/chat/v1/docs/ChatV1Credential.md index 740dd6fc2..079305188 100644 --- a/twilio/rest/chat/v1/docs/ChatV1Credential.md +++ b/twilio/rest/chat/v1/docs/ChatV1Credential.md @@ -1,16 +1,16 @@ # ChatV1Credential ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**FriendlyName** | Pointer to **string** | -**Sandbox** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Type** | Pointer to [**CredentialPushService**](credential_push_service.md) | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was last updated | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the resource | +**Sandbox** | Pointer to **string** | [APN only] Whether to send the credential to sandbox APNs | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Type** | Pointer to **string** | The type of push-notification service the credential is for | +**Url** | Pointer to **string** | The absolute URL of the Credential resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/chat/v1/docs/ChatV1Service.md b/twilio/rest/chat/v1/docs/ChatV1Service.md index 36c9a6635..9d7728932 100644 --- a/twilio/rest/chat/v1/docs/ChatV1Service.md +++ b/twilio/rest/chat/v1/docs/ChatV1Service.md @@ -1,29 +1,29 @@ # ChatV1Service ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**ConsumptionReportInterval** | Pointer to **int32** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**DefaultChannelCreatorRoleSid** | Pointer to **string** | -**DefaultChannelRoleSid** | Pointer to **string** | -**DefaultServiceRoleSid** | Pointer to **string** | -**FriendlyName** | Pointer to **string** | -**Limits** | Pointer to **map[string]interface{}** | -**Links** | Pointer to **map[string]interface{}** | -**Notifications** | Pointer to **map[string]interface{}** | -**PostWebhookUrl** | Pointer to **string** | -**PreWebhookUrl** | Pointer to **string** | -**ReachabilityEnabled** | Pointer to **bool** | -**ReadStatusEnabled** | Pointer to **bool** | -**Sid** | Pointer to **string** | -**TypingIndicatorTimeout** | Pointer to **int32** | -**Url** | Pointer to **string** | -**WebhookFilters** | Pointer to **[]string** | -**WebhookMethod** | Pointer to **string** | -**Webhooks** | Pointer to **map[string]interface{}** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**ConsumptionReportInterval** | Pointer to **int32** | DEPRECATED | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was last updated | +**DefaultChannelCreatorRoleSid** | Pointer to **string** | The channel role assigned to a channel creator when they join a new channel | +**DefaultChannelRoleSid** | Pointer to **string** | The channel role assigned to users when they are added to a channel | +**DefaultServiceRoleSid** | Pointer to **string** | The service role assigned to users when they are added to the service | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the resource | +**Limits** | Pointer to **map[string]interface{}** | An object that describes the limits of the service instance | +**Links** | Pointer to **map[string]interface{}** | The absolute URLs of the Service's Channels, Roles, and Users | +**Notifications** | Pointer to **map[string]interface{}** | The notification configuration for the Service instance | +**PostWebhookUrl** | Pointer to **string** | The URL for post-event webhooks | +**PreWebhookUrl** | Pointer to **string** | The webhook URL for pre-event webhooks | +**ReachabilityEnabled** | Pointer to **bool** | Whether the Reachability Indicator feature is enabled for this Service instance | +**ReadStatusEnabled** | Pointer to **bool** | Whether the Message Consumption Horizon feature is enabled | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**TypingIndicatorTimeout** | Pointer to **int32** | How long in seconds to wait before assuming the user is no longer typing | +**Url** | Pointer to **string** | The absolute URL of the Service resource | +**WebhookFilters** | Pointer to **[]string** | The list of WebHook events that are enabled for this Service instance | +**WebhookMethod** | Pointer to **string** | The HTTP method to use for both PRE and POST webhooks | +**Webhooks** | Pointer to **map[string]interface{}** | An object that contains information about the webhooks configured for this service | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/chat/v1/docs/ChatV1ServiceChannel.md b/twilio/rest/chat/v1/docs/ChatV1ServiceChannel.md index 877ab25e0..84a9ee16e 100644 --- a/twilio/rest/chat/v1/docs/ChatV1ServiceChannel.md +++ b/twilio/rest/chat/v1/docs/ChatV1ServiceChannel.md @@ -1,22 +1,22 @@ # ChatV1ServiceChannel ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Attributes** | Pointer to **string** | -**CreatedBy** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**FriendlyName** | Pointer to **string** | -**Links** | Pointer to **map[string]interface{}** | -**MembersCount** | Pointer to **int32** | -**MessagesCount** | Pointer to **int32** | -**ServiceSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Type** | Pointer to [**ChannelChannelType**](channel_channel_type.md) | -**UniqueName** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**Attributes** | Pointer to **string** | The JSON string that stores application-specific data | +**CreatedBy** | Pointer to **string** | The identity of the User that created the channel | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was last updated | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the resource | +**Links** | Pointer to **map[string]interface{}** | Absolute URLs to access the Members, Messages , Invites and, if it exists, the last Message for the Channel | +**MembersCount** | Pointer to **int32** | The number of Members in the Channel | +**MessagesCount** | Pointer to **int32** | The number of Messages in the Channel | +**ServiceSid** | Pointer to **string** | The SID of the Service that the resource is associated with | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Type** | Pointer to **string** | The visibility of the channel. Can be: `public` or `private` | +**UniqueName** | Pointer to **string** | An application-defined string that uniquely identifies the resource | +**Url** | Pointer to **string** | The absolute URL of the Channel resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/chat/v1/docs/ChatV1ServiceChannelInvite.md b/twilio/rest/chat/v1/docs/ChatV1ServiceChannelInvite.md index ab33e6ccc..a19e5717e 100644 --- a/twilio/rest/chat/v1/docs/ChatV1ServiceChannelInvite.md +++ b/twilio/rest/chat/v1/docs/ChatV1ServiceChannelInvite.md @@ -1,18 +1,18 @@ # ChatV1ServiceChannelInvite ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**ChannelSid** | Pointer to **string** | -**CreatedBy** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**Identity** | Pointer to **string** | -**RoleSid** | Pointer to **string** | -**ServiceSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**ChannelSid** | Pointer to **string** | The SID of the Channel the new resource belongs to | +**CreatedBy** | Pointer to **string** | The identity of the User that created the invite | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was last updated | +**Identity** | Pointer to **string** | The string that identifies the resource's User | +**RoleSid** | Pointer to **string** | The SID of the Role assigned to the member | +**ServiceSid** | Pointer to **string** | The SID of the Service that the resource is associated with | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Url** | Pointer to **string** | The absolute URL of the Invite resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/chat/v1/docs/ChatV1ServiceChannelMember.md b/twilio/rest/chat/v1/docs/ChatV1ServiceChannelMember.md index 95889a1a3..3b7fde38d 100644 --- a/twilio/rest/chat/v1/docs/ChatV1ServiceChannelMember.md +++ b/twilio/rest/chat/v1/docs/ChatV1ServiceChannelMember.md @@ -1,19 +1,19 @@ # ChatV1ServiceChannelMember ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**ChannelSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**Identity** | Pointer to **string** | -**LastConsumedMessageIndex** | Pointer to **int32** | -**LastConsumptionTimestamp** | Pointer to [**time.Time**](time.Time.md) | -**RoleSid** | Pointer to **string** | -**ServiceSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**ChannelSid** | Pointer to **string** | The unique ID of the Channel for the member | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was last updated | +**Identity** | Pointer to **string** | The string that identifies the resource's User | +**LastConsumedMessageIndex** | Pointer to **int32** | The index of the last Message that the Member has read within the Channel | +**LastConsumptionTimestamp** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 based timestamp string that represents the date-time of the last Message read event for the Member within the Channel | +**RoleSid** | Pointer to **string** | The SID of the Role assigned to the member | +**ServiceSid** | Pointer to **string** | The SID of the Service that the resource is associated with | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Url** | Pointer to **string** | The absolute URL of the Member resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/chat/v1/docs/ChatV1ServiceChannelMessage.md b/twilio/rest/chat/v1/docs/ChatV1ServiceChannelMessage.md index a03dd71db..09f439258 100644 --- a/twilio/rest/chat/v1/docs/ChatV1ServiceChannelMessage.md +++ b/twilio/rest/chat/v1/docs/ChatV1ServiceChannelMessage.md @@ -1,21 +1,21 @@ # ChatV1ServiceChannelMessage ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Attributes** | Pointer to **string** | -**Body** | Pointer to **string** | -**ChannelSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**From** | Pointer to **string** | -**Index** | Pointer to **int32** | -**ServiceSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**To** | Pointer to **string** | -**Url** | Pointer to **string** | -**WasEdited** | Pointer to **bool** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**Attributes** | Pointer to **string** | The JSON string that stores application-specific data | +**Body** | Pointer to **string** | The content of the message | +**ChannelSid** | Pointer to **string** | The unique ID of the Channel the Message resource belongs to | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was last updated | +**From** | Pointer to **string** | The identity of the message's author | +**Index** | Pointer to **int32** | The index of the message within the Channel | +**ServiceSid** | Pointer to **string** | The SID of the Service that the resource is associated with | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**To** | Pointer to **string** | The SID of the Channel that the message was sent to | +**Url** | Pointer to **string** | The absolute URL of the Message resource | +**WasEdited** | Pointer to **bool** | Whether the message has been edited since it was created | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/chat/v1/docs/ChatV1ServiceRole.md b/twilio/rest/chat/v1/docs/ChatV1ServiceRole.md index a776d3116..3cc416784 100644 --- a/twilio/rest/chat/v1/docs/ChatV1ServiceRole.md +++ b/twilio/rest/chat/v1/docs/ChatV1ServiceRole.md @@ -1,17 +1,17 @@ # ChatV1ServiceRole ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**FriendlyName** | Pointer to **string** | -**Permissions** | Pointer to **[]string** | -**ServiceSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Type** | Pointer to [**RoleRoleType**](role_role_type.md) | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was last updated | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the resource | +**Permissions** | Pointer to **[]string** | An array of the permissions the role has been granted | +**ServiceSid** | Pointer to **string** | The SID of the Service that the resource is associated with | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Type** | Pointer to **string** | The type of role | +**Url** | Pointer to **string** | The absolute URL of the Role resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/chat/v1/docs/ChatV1ServiceUser.md b/twilio/rest/chat/v1/docs/ChatV1ServiceUser.md index 31d2dafa5..8fe8c66cb 100644 --- a/twilio/rest/chat/v1/docs/ChatV1ServiceUser.md +++ b/twilio/rest/chat/v1/docs/ChatV1ServiceUser.md @@ -1,22 +1,22 @@ # ChatV1ServiceUser ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Attributes** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**FriendlyName** | Pointer to **string** | -**Identity** | Pointer to **string** | -**IsNotifiable** | Pointer to **bool** | -**IsOnline** | Pointer to **bool** | -**JoinedChannelsCount** | Pointer to **int32** | -**Links** | Pointer to **map[string]interface{}** | -**RoleSid** | Pointer to **string** | -**ServiceSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**Attributes** | Pointer to **string** | The JSON string that stores application-specific data | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was last updated | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the resource | +**Identity** | Pointer to **string** | The string that identifies the resource's User | +**IsNotifiable** | Pointer to **bool** | Whether the User has a potentially valid Push Notification registration for the Service instance | +**IsOnline** | Pointer to **bool** | Whether the User is actively connected to the Service instance and online | +**JoinedChannelsCount** | Pointer to **int32** | The number of Channels this User is a Member of | +**Links** | Pointer to **map[string]interface{}** | The absolute URLs of the Channel and Binding resources related to the user | +**RoleSid** | Pointer to **string** | The SID of the assigned to the user | +**ServiceSid** | Pointer to **string** | The SID of the Service that the resource is associated with | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Url** | Pointer to **string** | The absolute URL of the User resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/chat/v1/docs/ChatV1ServiceUserUserChannel.md b/twilio/rest/chat/v1/docs/ChatV1ServiceUserUserChannel.md index a40012974..8069eb5b7 100644 --- a/twilio/rest/chat/v1/docs/ChatV1ServiceUserUserChannel.md +++ b/twilio/rest/chat/v1/docs/ChatV1ServiceUserUserChannel.md @@ -1,16 +1,16 @@ # ChatV1ServiceUserUserChannel ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**ChannelSid** | Pointer to **string** | -**LastConsumedMessageIndex** | Pointer to **int32** | -**Links** | Pointer to **map[string]interface{}** | -**MemberSid** | Pointer to **string** | -**ServiceSid** | Pointer to **string** | -**Status** | Pointer to [**UserChannelChannelStatus**](user_channel_channel_status.md) | -**UnreadMessagesCount** | Pointer to **int32** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**ChannelSid** | Pointer to **string** | The SID of the Channel the resource belongs to | +**LastConsumedMessageIndex** | Pointer to **int32** | The index of the last Message in the Channel the Member has read | +**Links** | Pointer to **map[string]interface{}** | Absolute URLs to access the Members, Messages , Invites and, if it exists, the last Message for the Channel | +**MemberSid** | Pointer to **string** | The SID of the User as a Member in the Channel | +**ServiceSid** | Pointer to **string** | The SID of the Service that the resource is associated with | +**Status** | Pointer to **string** | The status of the User on the Channel | +**UnreadMessagesCount** | Pointer to **int32** | The number of unread Messages in the Channel for the User | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/chat/v1/docs/ListChannelResponse.md b/twilio/rest/chat/v1/docs/ListChannelResponse.md index 0993a5990..fe6d2c13a 100644 --- a/twilio/rest/chat/v1/docs/ListChannelResponse.md +++ b/twilio/rest/chat/v1/docs/ListChannelResponse.md @@ -1,10 +1,10 @@ # ListChannelResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Channels** | [**[]ChatV1ServiceChannel**](chat.v1.service.channel.md) | [optional] -**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Channels** | [**[]ChatV1ServiceChannel**](chat.v1.service.channel.md) | |[optional] +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/chat/v1/docs/ListCredentialResponse.md b/twilio/rest/chat/v1/docs/ListCredentialResponse.md index 0ec2ecb71..efbfa56b8 100644 --- a/twilio/rest/chat/v1/docs/ListCredentialResponse.md +++ b/twilio/rest/chat/v1/docs/ListCredentialResponse.md @@ -1,10 +1,10 @@ # ListCredentialResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Credentials** | [**[]ChatV1Credential**](chat.v1.credential.md) | [optional] -**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Credentials** | [**[]ChatV1Credential**](chat.v1.credential.md) | |[optional] +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/chat/v1/docs/ListCredentialResponseMeta.md b/twilio/rest/chat/v1/docs/ListCredentialResponseMeta.md index fdaf9c314..1de617a01 100644 --- a/twilio/rest/chat/v1/docs/ListCredentialResponseMeta.md +++ b/twilio/rest/chat/v1/docs/ListCredentialResponseMeta.md @@ -1,15 +1,15 @@ # ListCredentialResponseMeta ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**FirstPageUrl** | **string** | [optional] -**Key** | **string** | [optional] -**NextPageUrl** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUrl** | **string** | [optional] -**Url** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstPageUrl** | **string** | |[optional] +**Key** | **string** | |[optional] +**NextPageUrl** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUrl** | **string** | |[optional] +**Url** | **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/twilio/rest/chat/v1/docs/ListInviteResponse.md b/twilio/rest/chat/v1/docs/ListInviteResponse.md index 9cade423d..391370de6 100644 --- a/twilio/rest/chat/v1/docs/ListInviteResponse.md +++ b/twilio/rest/chat/v1/docs/ListInviteResponse.md @@ -1,10 +1,10 @@ # ListInviteResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Invites** | [**[]ChatV1ServiceChannelInvite**](chat.v1.service.channel.invite.md) | [optional] -**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Invites** | [**[]ChatV1ServiceChannelInvite**](chat.v1.service.channel.invite.md) | |[optional] +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/chat/v1/docs/ListMemberResponse.md b/twilio/rest/chat/v1/docs/ListMemberResponse.md index 43e74a369..331b439a4 100644 --- a/twilio/rest/chat/v1/docs/ListMemberResponse.md +++ b/twilio/rest/chat/v1/docs/ListMemberResponse.md @@ -1,10 +1,10 @@ # ListMemberResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Members** | [**[]ChatV1ServiceChannelMember**](chat.v1.service.channel.member.md) | [optional] -**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Members** | [**[]ChatV1ServiceChannelMember**](chat.v1.service.channel.member.md) | |[optional] +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/chat/v1/docs/ListMessageResponse.md b/twilio/rest/chat/v1/docs/ListMessageResponse.md index 14bcd758c..30be09729 100644 --- a/twilio/rest/chat/v1/docs/ListMessageResponse.md +++ b/twilio/rest/chat/v1/docs/ListMessageResponse.md @@ -1,10 +1,10 @@ # ListMessageResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Messages** | [**[]ChatV1ServiceChannelMessage**](chat.v1.service.channel.message.md) | [optional] -**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Messages** | [**[]ChatV1ServiceChannelMessage**](chat.v1.service.channel.message.md) | |[optional] +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/chat/v1/docs/ListRoleResponse.md b/twilio/rest/chat/v1/docs/ListRoleResponse.md index a33743e38..061740150 100644 --- a/twilio/rest/chat/v1/docs/ListRoleResponse.md +++ b/twilio/rest/chat/v1/docs/ListRoleResponse.md @@ -1,10 +1,10 @@ # ListRoleResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | [optional] -**Roles** | [**[]ChatV1ServiceRole**](chat.v1.service.role.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | |[optional] +**Roles** | [**[]ChatV1ServiceRole**](chat.v1.service.role.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/chat/v1/docs/ListServiceResponse.md b/twilio/rest/chat/v1/docs/ListServiceResponse.md index 0f0d779fe..01705e7e0 100644 --- a/twilio/rest/chat/v1/docs/ListServiceResponse.md +++ b/twilio/rest/chat/v1/docs/ListServiceResponse.md @@ -1,10 +1,10 @@ # ListServiceResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | [optional] -**Services** | [**[]ChatV1Service**](chat.v1.service.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | |[optional] +**Services** | [**[]ChatV1Service**](chat.v1.service.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/chat/v1/docs/ListUserChannelResponse.md b/twilio/rest/chat/v1/docs/ListUserChannelResponse.md index 442596b97..03012eba2 100644 --- a/twilio/rest/chat/v1/docs/ListUserChannelResponse.md +++ b/twilio/rest/chat/v1/docs/ListUserChannelResponse.md @@ -1,10 +1,10 @@ # ListUserChannelResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Channels** | [**[]ChatV1ServiceUserUserChannel**](chat.v1.service.user.user_channel.md) | [optional] -**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Channels** | [**[]ChatV1ServiceUserUserChannel**](chat.v1.service.user.user_channel.md) | |[optional] +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/chat/v1/docs/ListUserResponse.md b/twilio/rest/chat/v1/docs/ListUserResponse.md index 93a358347..b77273bb2 100644 --- a/twilio/rest/chat/v1/docs/ListUserResponse.md +++ b/twilio/rest/chat/v1/docs/ListUserResponse.md @@ -1,10 +1,10 @@ # ListUserResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | [optional] -**Users** | [**[]ChatV1ServiceUser**](chat.v1.service.user.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | |[optional] +**Users** | [**[]ChatV1ServiceUser**](chat.v1.service.user.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/chat/v1/model_chat_v1_credential.go b/twilio/rest/chat/v1/model_chat_v1_credential.go index be32420fa..d2eef1cb7 100644 --- a/twilio/rest/chat/v1/model_chat_v1_credential.go +++ b/twilio/rest/chat/v1/model_chat_v1_credential.go @@ -17,12 +17,20 @@ import ( // ChatV1Credential struct for ChatV1Credential type ChatV1Credential struct { - AccountSid *string `json:"AccountSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Sandbox *string `json:"Sandbox,omitempty"` - Sid *string `json:"Sid,omitempty"` - Type *CredentialPushService `json:"Type,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The RFC 2822 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The string that you assigned to describe the resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // [APN only] Whether to send the credential to sandbox APNs + Sandbox *string `json:"Sandbox,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The type of push-notification service the credential is for + Type *string `json:"Type,omitempty"` + // The absolute URL of the Credential resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/chat/v1/model_chat_v1_service.go b/twilio/rest/chat/v1/model_chat_v1_service.go index c962dff70..2bbab2418 100644 --- a/twilio/rest/chat/v1/model_chat_v1_service.go +++ b/twilio/rest/chat/v1/model_chat_v1_service.go @@ -17,25 +17,46 @@ import ( // ChatV1Service struct for ChatV1Service type ChatV1Service struct { - AccountSid *string `json:"AccountSid,omitempty"` - ConsumptionReportInterval *int32 `json:"ConsumptionReportInterval,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - DefaultChannelCreatorRoleSid *string `json:"DefaultChannelCreatorRoleSid,omitempty"` - DefaultChannelRoleSid *string `json:"DefaultChannelRoleSid,omitempty"` - DefaultServiceRoleSid *string `json:"DefaultServiceRoleSid,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Limits *map[string]interface{} `json:"Limits,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - Notifications *map[string]interface{} `json:"Notifications,omitempty"` - PostWebhookUrl *string `json:"PostWebhookUrl,omitempty"` - PreWebhookUrl *string `json:"PreWebhookUrl,omitempty"` - ReachabilityEnabled *bool `json:"ReachabilityEnabled,omitempty"` - ReadStatusEnabled *bool `json:"ReadStatusEnabled,omitempty"` - Sid *string `json:"Sid,omitempty"` - TypingIndicatorTimeout *int32 `json:"TypingIndicatorTimeout,omitempty"` - Url *string `json:"Url,omitempty"` - WebhookFilters *[]string `json:"WebhookFilters,omitempty"` - WebhookMethod *string `json:"WebhookMethod,omitempty"` - Webhooks *map[string]interface{} `json:"Webhooks,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // DEPRECATED + ConsumptionReportInterval *int32 `json:"ConsumptionReportInterval,omitempty"` + // The RFC 2822 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The channel role assigned to a channel creator when they join a new channel + DefaultChannelCreatorRoleSid *string `json:"DefaultChannelCreatorRoleSid,omitempty"` + // The channel role assigned to users when they are added to a channel + DefaultChannelRoleSid *string `json:"DefaultChannelRoleSid,omitempty"` + // The service role assigned to users when they are added to the service + DefaultServiceRoleSid *string `json:"DefaultServiceRoleSid,omitempty"` + // The string that you assigned to describe the resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // An object that describes the limits of the service instance + Limits *map[string]interface{} `json:"Limits,omitempty"` + // The absolute URLs of the Service's Channels, Roles, and Users + Links *map[string]interface{} `json:"Links,omitempty"` + // The notification configuration for the Service instance + Notifications *map[string]interface{} `json:"Notifications,omitempty"` + // The URL for post-event webhooks + PostWebhookUrl *string `json:"PostWebhookUrl,omitempty"` + // The webhook URL for pre-event webhooks + PreWebhookUrl *string `json:"PreWebhookUrl,omitempty"` + // Whether the Reachability Indicator feature is enabled for this Service instance + ReachabilityEnabled *bool `json:"ReachabilityEnabled,omitempty"` + // Whether the Message Consumption Horizon feature is enabled + ReadStatusEnabled *bool `json:"ReadStatusEnabled,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // How long in seconds to wait before assuming the user is no longer typing + TypingIndicatorTimeout *int32 `json:"TypingIndicatorTimeout,omitempty"` + // The absolute URL of the Service resource + Url *string `json:"Url,omitempty"` + // The list of WebHook events that are enabled for this Service instance + WebhookFilters *[]string `json:"WebhookFilters,omitempty"` + // The HTTP method to use for both PRE and POST webhooks + WebhookMethod *string `json:"WebhookMethod,omitempty"` + // An object that contains information about the webhooks configured for this service + Webhooks *map[string]interface{} `json:"Webhooks,omitempty"` } diff --git a/twilio/rest/chat/v1/model_chat_v1_service_channel.go b/twilio/rest/chat/v1/model_chat_v1_service_channel.go index f884776af..a0fb9a88e 100644 --- a/twilio/rest/chat/v1/model_chat_v1_service_channel.go +++ b/twilio/rest/chat/v1/model_chat_v1_service_channel.go @@ -17,18 +17,32 @@ import ( // ChatV1ServiceChannel struct for ChatV1ServiceChannel type ChatV1ServiceChannel struct { - AccountSid *string `json:"AccountSid,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - CreatedBy *string `json:"CreatedBy,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - MembersCount *int32 `json:"MembersCount,omitempty"` - MessagesCount *int32 `json:"MessagesCount,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Type *ChannelChannelType `json:"Type,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The JSON string that stores application-specific data + Attributes *string `json:"Attributes,omitempty"` + // The identity of the User that created the channel + CreatedBy *string `json:"CreatedBy,omitempty"` + // The RFC 2822 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The string that you assigned to describe the resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // Absolute URLs to access the Members, Messages , Invites and, if it exists, the last Message for the Channel + Links *map[string]interface{} `json:"Links,omitempty"` + // The number of Members in the Channel + MembersCount *int32 `json:"MembersCount,omitempty"` + // The number of Messages in the Channel + MessagesCount *int32 `json:"MessagesCount,omitempty"` + // The SID of the Service that the resource is associated with + ServiceSid *string `json:"ServiceSid,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The visibility of the channel. Can be: `public` or `private` + Type *string `json:"Type,omitempty"` + // An application-defined string that uniquely identifies the resource + UniqueName *string `json:"UniqueName,omitempty"` + // The absolute URL of the Channel resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/chat/v1/model_chat_v1_service_channel_invite.go b/twilio/rest/chat/v1/model_chat_v1_service_channel_invite.go index ba9233942..5bd0f3566 100644 --- a/twilio/rest/chat/v1/model_chat_v1_service_channel_invite.go +++ b/twilio/rest/chat/v1/model_chat_v1_service_channel_invite.go @@ -17,14 +17,24 @@ import ( // ChatV1ServiceChannelInvite struct for ChatV1ServiceChannelInvite type ChatV1ServiceChannelInvite struct { - AccountSid *string `json:"AccountSid,omitempty"` - ChannelSid *string `json:"ChannelSid,omitempty"` - CreatedBy *string `json:"CreatedBy,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The SID of the Channel the new resource belongs to + ChannelSid *string `json:"ChannelSid,omitempty"` + // The identity of the User that created the invite + CreatedBy *string `json:"CreatedBy,omitempty"` + // The RFC 2822 date and time in GMT when the resource was created DateCreated *time.Time `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT when the resource was last updated DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Identity *string `json:"Identity,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` + // The string that identifies the resource's User + Identity *string `json:"Identity,omitempty"` + // The SID of the Role assigned to the member + RoleSid *string `json:"RoleSid,omitempty"` + // The SID of the Service that the resource is associated with + ServiceSid *string `json:"ServiceSid,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The absolute URL of the Invite resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/chat/v1/model_chat_v1_service_channel_member.go b/twilio/rest/chat/v1/model_chat_v1_service_channel_member.go index e72ead149..0d0b52df4 100644 --- a/twilio/rest/chat/v1/model_chat_v1_service_channel_member.go +++ b/twilio/rest/chat/v1/model_chat_v1_service_channel_member.go @@ -17,15 +17,26 @@ import ( // ChatV1ServiceChannelMember struct for ChatV1ServiceChannelMember type ChatV1ServiceChannelMember struct { - AccountSid *string `json:"AccountSid,omitempty"` - ChannelSid *string `json:"ChannelSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Identity *string `json:"Identity,omitempty"` - LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The unique ID of the Channel for the member + ChannelSid *string `json:"ChannelSid,omitempty"` + // The RFC 2822 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The string that identifies the resource's User + Identity *string `json:"Identity,omitempty"` + // The index of the last Message that the Member has read within the Channel + LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` + // The ISO 8601 based timestamp string that represents the date-time of the last Message read event for the Member within the Channel LastConsumptionTimestamp *time.Time `json:"LastConsumptionTimestamp,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Role assigned to the member + RoleSid *string `json:"RoleSid,omitempty"` + // The SID of the Service that the resource is associated with + ServiceSid *string `json:"ServiceSid,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The absolute URL of the Member resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/chat/v1/model_chat_v1_service_channel_message.go b/twilio/rest/chat/v1/model_chat_v1_service_channel_message.go index 8d8116e0f..9a5a7ea4e 100644 --- a/twilio/rest/chat/v1/model_chat_v1_service_channel_message.go +++ b/twilio/rest/chat/v1/model_chat_v1_service_channel_message.go @@ -17,17 +17,30 @@ import ( // ChatV1ServiceChannelMessage struct for ChatV1ServiceChannelMessage type ChatV1ServiceChannelMessage struct { - AccountSid *string `json:"AccountSid,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - Body *string `json:"Body,omitempty"` - ChannelSid *string `json:"ChannelSid,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The JSON string that stores application-specific data + Attributes *string `json:"Attributes,omitempty"` + // The content of the message + Body *string `json:"Body,omitempty"` + // The unique ID of the Channel the Message resource belongs to + ChannelSid *string `json:"ChannelSid,omitempty"` + // The RFC 2822 date and time in GMT when the resource was created DateCreated *time.Time `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT when the resource was last updated DateUpdated *time.Time `json:"DateUpdated,omitempty"` - From *string `json:"From,omitempty"` - Index *int32 `json:"Index,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - To *string `json:"To,omitempty"` - Url *string `json:"Url,omitempty"` - WasEdited *bool `json:"WasEdited,omitempty"` + // The identity of the message's author + From *string `json:"From,omitempty"` + // The index of the message within the Channel + Index *int32 `json:"Index,omitempty"` + // The SID of the Service that the resource is associated with + ServiceSid *string `json:"ServiceSid,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The SID of the Channel that the message was sent to + To *string `json:"To,omitempty"` + // The absolute URL of the Message resource + Url *string `json:"Url,omitempty"` + // Whether the message has been edited since it was created + WasEdited *bool `json:"WasEdited,omitempty"` } diff --git a/twilio/rest/chat/v1/model_chat_v1_service_role.go b/twilio/rest/chat/v1/model_chat_v1_service_role.go index ca35bb187..4a97996c9 100644 --- a/twilio/rest/chat/v1/model_chat_v1_service_role.go +++ b/twilio/rest/chat/v1/model_chat_v1_service_role.go @@ -17,13 +17,22 @@ import ( // ChatV1ServiceRole struct for ChatV1ServiceRole type ChatV1ServiceRole struct { - AccountSid *string `json:"AccountSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Permissions *[]string `json:"Permissions,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Type *RoleRoleType `json:"Type,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The RFC 2822 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The string that you assigned to describe the resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // An array of the permissions the role has been granted + Permissions *[]string `json:"Permissions,omitempty"` + // The SID of the Service that the resource is associated with + ServiceSid *string `json:"ServiceSid,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The type of role + Type *string `json:"Type,omitempty"` + // The absolute URL of the Role resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/chat/v1/model_chat_v1_service_user.go b/twilio/rest/chat/v1/model_chat_v1_service_user.go index 65616ce50..ff6906c19 100644 --- a/twilio/rest/chat/v1/model_chat_v1_service_user.go +++ b/twilio/rest/chat/v1/model_chat_v1_service_user.go @@ -17,18 +17,32 @@ import ( // ChatV1ServiceUser struct for ChatV1ServiceUser type ChatV1ServiceUser struct { - AccountSid *string `json:"AccountSid,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Identity *string `json:"Identity,omitempty"` - IsNotifiable *bool `json:"IsNotifiable,omitempty"` - IsOnline *bool `json:"IsOnline,omitempty"` - JoinedChannelsCount *int32 `json:"JoinedChannelsCount,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The JSON string that stores application-specific data + Attributes *string `json:"Attributes,omitempty"` + // The RFC 2822 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The string that you assigned to describe the resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // The string that identifies the resource's User + Identity *string `json:"Identity,omitempty"` + // Whether the User has a potentially valid Push Notification registration for the Service instance + IsNotifiable *bool `json:"IsNotifiable,omitempty"` + // Whether the User is actively connected to the Service instance and online + IsOnline *bool `json:"IsOnline,omitempty"` + // The number of Channels this User is a Member of + JoinedChannelsCount *int32 `json:"JoinedChannelsCount,omitempty"` + // The absolute URLs of the Channel and Binding resources related to the user + Links *map[string]interface{} `json:"Links,omitempty"` + // The SID of the assigned to the user + RoleSid *string `json:"RoleSid,omitempty"` + // The SID of the Service that the resource is associated with + ServiceSid *string `json:"ServiceSid,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The absolute URL of the User resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/chat/v1/model_chat_v1_service_user_user_channel.go b/twilio/rest/chat/v1/model_chat_v1_service_user_user_channel.go index 088450478..3a9904cfe 100644 --- a/twilio/rest/chat/v1/model_chat_v1_service_user_user_channel.go +++ b/twilio/rest/chat/v1/model_chat_v1_service_user_user_channel.go @@ -13,12 +13,20 @@ package openapi // ChatV1ServiceUserUserChannel struct for ChatV1ServiceUserUserChannel type ChatV1ServiceUserUserChannel struct { - AccountSid *string `json:"AccountSid,omitempty"` - ChannelSid *string `json:"ChannelSid,omitempty"` - LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - MemberSid *string `json:"MemberSid,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Status *UserChannelChannelStatus `json:"Status,omitempty"` - UnreadMessagesCount *int32 `json:"UnreadMessagesCount,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The SID of the Channel the resource belongs to + ChannelSid *string `json:"ChannelSid,omitempty"` + // The index of the last Message in the Channel the Member has read + LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` + // Absolute URLs to access the Members, Messages , Invites and, if it exists, the last Message for the Channel + Links *map[string]interface{} `json:"Links,omitempty"` + // The SID of the User as a Member in the Channel + MemberSid *string `json:"MemberSid,omitempty"` + // The SID of the Service that the resource is associated with + ServiceSid *string `json:"ServiceSid,omitempty"` + // The status of the User on the Channel + Status *string `json:"Status,omitempty"` + // The number of unread Messages in the Channel for the User + UnreadMessagesCount *int32 `json:"UnreadMessagesCount,omitempty"` } diff --git a/twilio/rest/chat/v2/README.md b/twilio/rest/chat/v2/README.md index 9488e6acf..a7a947cd6 100644 --- a/twilio/rest/chat/v2/README.md +++ b/twilio/rest/chat/v2/README.md @@ -89,8 +89,6 @@ Class | Method | HTTP request | Description ## Documentation For Models - - [BindingBindingType](docs/BindingBindingType.md) - - [ChannelChannelType](docs/ChannelChannelType.md) - [ChatV2Credential](docs/ChatV2Credential.md) - [ChatV2Service](docs/ChatV2Service.md) - [ChatV2ServiceBinding](docs/ChatV2ServiceBinding.md) @@ -103,7 +101,6 @@ Class | Method | HTTP request | Description - [ChatV2ServiceUser](docs/ChatV2ServiceUser.md) - [ChatV2ServiceUserUserBinding](docs/ChatV2ServiceUserUserBinding.md) - [ChatV2ServiceUserUserChannel](docs/ChatV2ServiceUserUserChannel.md) - - [CredentialPushService](docs/CredentialPushService.md) - [ListBindingResponse](docs/ListBindingResponse.md) - [ListChannelResponse](docs/ListChannelResponse.md) - [ListChannelWebhookResponse](docs/ListChannelWebhookResponse.md) @@ -117,10 +114,6 @@ Class | Method | HTTP request | Description - [ListUserBindingResponse](docs/ListUserBindingResponse.md) - [ListUserChannelResponse](docs/ListUserChannelResponse.md) - [ListUserResponse](docs/ListUserResponse.md) - - [RoleRoleType](docs/RoleRoleType.md) - - [UserBindingBindingType](docs/UserBindingBindingType.md) - - [UserChannelChannelStatus](docs/UserChannelChannelStatus.md) - - [UserChannelNotificationLevel](docs/UserChannelNotificationLevel.md) ## Documentation For Authorization diff --git a/twilio/rest/chat/v2/docs/ChatV2Credential.md b/twilio/rest/chat/v2/docs/ChatV2Credential.md index c2274d30d..6fe5922dc 100644 --- a/twilio/rest/chat/v2/docs/ChatV2Credential.md +++ b/twilio/rest/chat/v2/docs/ChatV2Credential.md @@ -1,16 +1,16 @@ # ChatV2Credential ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**FriendlyName** | Pointer to **string** | -**Sandbox** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Type** | Pointer to [**CredentialPushService**](credential_push_service.md) | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was last updated | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the resource | +**Sandbox** | Pointer to **string** | [APN only] Whether to send the credential to sandbox APNs | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Type** | Pointer to **string** | The type of push-notification service the credential is for | +**Url** | Pointer to **string** | The absolute URL of the Credential resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/chat/v2/docs/ChatV2Service.md b/twilio/rest/chat/v2/docs/ChatV2Service.md index d994ff2aa..a37b1012c 100644 --- a/twilio/rest/chat/v2/docs/ChatV2Service.md +++ b/twilio/rest/chat/v2/docs/ChatV2Service.md @@ -1,31 +1,31 @@ # ChatV2Service ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**ConsumptionReportInterval** | Pointer to **int32** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**DefaultChannelCreatorRoleSid** | Pointer to **string** | -**DefaultChannelRoleSid** | Pointer to **string** | -**DefaultServiceRoleSid** | Pointer to **string** | -**FriendlyName** | Pointer to **string** | -**Limits** | Pointer to **map[string]interface{}** | -**Links** | Pointer to **map[string]interface{}** | -**Media** | Pointer to **map[string]interface{}** | -**Notifications** | Pointer to **map[string]interface{}** | -**PostWebhookRetryCount** | Pointer to **int32** | -**PostWebhookUrl** | Pointer to **string** | -**PreWebhookRetryCount** | Pointer to **int32** | -**PreWebhookUrl** | Pointer to **string** | -**ReachabilityEnabled** | Pointer to **bool** | -**ReadStatusEnabled** | Pointer to **bool** | -**Sid** | Pointer to **string** | -**TypingIndicatorTimeout** | Pointer to **int32** | -**Url** | Pointer to **string** | -**WebhookFilters** | Pointer to **[]string** | -**WebhookMethod** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**ConsumptionReportInterval** | Pointer to **int32** | DEPRECATED | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was last updated | +**DefaultChannelCreatorRoleSid** | Pointer to **string** | The channel role assigned to a channel creator when they join a new channel | +**DefaultChannelRoleSid** | Pointer to **string** | The channel role assigned to users when they are added to a channel | +**DefaultServiceRoleSid** | Pointer to **string** | The service role assigned to users when they are added to the service | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the resource | +**Limits** | Pointer to **map[string]interface{}** | An object that describes the limits of the service instance | +**Links** | Pointer to **map[string]interface{}** | The absolute URLs of the Service's Channels, Roles, and Users | +**Media** | Pointer to **map[string]interface{}** | The properties of the media that the service supports | +**Notifications** | Pointer to **map[string]interface{}** | The notification configuration for the Service instance | +**PostWebhookRetryCount** | Pointer to **int32** | The number of times calls to the `post_webhook_url` will be retried | +**PostWebhookUrl** | Pointer to **string** | The URL for post-event webhooks | +**PreWebhookRetryCount** | Pointer to **int32** | Count of times webhook will be retried in case of timeout or 429/503/504 HTTP responses | +**PreWebhookUrl** | Pointer to **string** | The webhook URL for pre-event webhooks | +**ReachabilityEnabled** | Pointer to **bool** | Whether the Reachability Indicator feature is enabled for this Service instance | +**ReadStatusEnabled** | Pointer to **bool** | Whether the Message Consumption Horizon feature is enabled | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**TypingIndicatorTimeout** | Pointer to **int32** | How long in seconds to wait before assuming the user is no longer typing | +**Url** | Pointer to **string** | The absolute URL of the Service resource | +**WebhookFilters** | Pointer to **[]string** | The list of webhook events that are enabled for this Service instance | +**WebhookMethod** | Pointer to **string** | The HTTP method to use for both PRE and POST webhooks | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/chat/v2/docs/ChatV2ServiceBinding.md b/twilio/rest/chat/v2/docs/ChatV2ServiceBinding.md index cf696aac3..fd2afcf59 100644 --- a/twilio/rest/chat/v2/docs/ChatV2ServiceBinding.md +++ b/twilio/rest/chat/v2/docs/ChatV2ServiceBinding.md @@ -1,20 +1,20 @@ # ChatV2ServiceBinding ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**BindingType** | Pointer to [**BindingBindingType**](binding_binding_type.md) | -**CredentialSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**Endpoint** | Pointer to **string** | -**Identity** | Pointer to **string** | -**Links** | Pointer to **map[string]interface{}** | -**MessageTypes** | Pointer to **[]string** | -**ServiceSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**BindingType** | Pointer to **string** | The push technology to use for the binding | +**CredentialSid** | Pointer to **string** | The SID of the Credential for the binding | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was last updated | +**Endpoint** | Pointer to **string** | The unique endpoint identifier for the Binding | +**Identity** | Pointer to **string** | The string that identifies the resource's User | +**Links** | Pointer to **map[string]interface{}** | The absolute URLs of the Binding's User | +**MessageTypes** | Pointer to **[]string** | The Programmable Chat message types the binding is subscribed to | +**ServiceSid** | Pointer to **string** | The SID of the Service that the Binding resource is associated with | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Url** | Pointer to **string** | The absolute URL of the Binding resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/chat/v2/docs/ChatV2ServiceChannel.md b/twilio/rest/chat/v2/docs/ChatV2ServiceChannel.md index 1f0f429e6..97e151edd 100644 --- a/twilio/rest/chat/v2/docs/ChatV2ServiceChannel.md +++ b/twilio/rest/chat/v2/docs/ChatV2ServiceChannel.md @@ -1,22 +1,22 @@ # ChatV2ServiceChannel ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Attributes** | Pointer to **string** | -**CreatedBy** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**FriendlyName** | Pointer to **string** | -**Links** | Pointer to **map[string]interface{}** | -**MembersCount** | Pointer to **int32** | -**MessagesCount** | Pointer to **int32** | -**ServiceSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Type** | Pointer to [**ChannelChannelType**](channel_channel_type.md) | -**UniqueName** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**Attributes** | Pointer to **string** | The JSON string that stores application-specific data | +**CreatedBy** | Pointer to **string** | The identity of the User that created the channel | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was last updated | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the resource | +**Links** | Pointer to **map[string]interface{}** | Absolute URLs to access the Members, Messages , Invites and, if it exists, the last Message for the Channel | +**MembersCount** | Pointer to **int32** | The number of Members in the Channel | +**MessagesCount** | Pointer to **int32** | The number of Messages that have been passed in the Channel | +**ServiceSid** | Pointer to **string** | The SID of the Service that the resource is associated with | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Type** | Pointer to **string** | The visibility of the channel. Can be: `public` or `private` | +**UniqueName** | Pointer to **string** | An application-defined string that uniquely identifies the resource | +**Url** | Pointer to **string** | The absolute URL of the Channel resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/chat/v2/docs/ChatV2ServiceChannelChannelWebhook.md b/twilio/rest/chat/v2/docs/ChatV2ServiceChannelChannelWebhook.md index 2ed00937c..e38325a76 100644 --- a/twilio/rest/chat/v2/docs/ChatV2ServiceChannelChannelWebhook.md +++ b/twilio/rest/chat/v2/docs/ChatV2ServiceChannelChannelWebhook.md @@ -1,17 +1,17 @@ # ChatV2ServiceChannelChannelWebhook ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**ChannelSid** | Pointer to **string** | -**Configuration** | Pointer to **map[string]interface{}** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**ServiceSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Type** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**ChannelSid** | Pointer to **string** | The SID of the Channel the Channel Webhook resource belongs to | +**Configuration** | Pointer to **map[string]interface{}** | The JSON string that describes the configuration object for the channel webhook | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was last updated | +**ServiceSid** | Pointer to **string** | The SID of the Service that the Channel Webhook resource is associated with | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Type** | Pointer to **string** | The type of webhook | +**Url** | Pointer to **string** | The absolute URL of the Channel Webhook resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/chat/v2/docs/ChatV2ServiceChannelInvite.md b/twilio/rest/chat/v2/docs/ChatV2ServiceChannelInvite.md index 773e0fcaf..ed8971744 100644 --- a/twilio/rest/chat/v2/docs/ChatV2ServiceChannelInvite.md +++ b/twilio/rest/chat/v2/docs/ChatV2ServiceChannelInvite.md @@ -1,18 +1,18 @@ # ChatV2ServiceChannelInvite ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**ChannelSid** | Pointer to **string** | -**CreatedBy** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**Identity** | Pointer to **string** | -**RoleSid** | Pointer to **string** | -**ServiceSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**ChannelSid** | Pointer to **string** | The SID of the Channel the new resource belongs to | +**CreatedBy** | Pointer to **string** | The identity of the User that created the invite | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was last updated | +**Identity** | Pointer to **string** | The string that identifies the resource's User | +**RoleSid** | Pointer to **string** | The SID of the Role assigned to the member | +**ServiceSid** | Pointer to **string** | The SID of the Service that the resource is associated with | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Url** | Pointer to **string** | The absolute URL of the Invite resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/chat/v2/docs/ChatV2ServiceChannelMember.md b/twilio/rest/chat/v2/docs/ChatV2ServiceChannelMember.md index 910332c39..33a696f02 100644 --- a/twilio/rest/chat/v2/docs/ChatV2ServiceChannelMember.md +++ b/twilio/rest/chat/v2/docs/ChatV2ServiceChannelMember.md @@ -1,20 +1,20 @@ # ChatV2ServiceChannelMember ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Attributes** | Pointer to **string** | -**ChannelSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**Identity** | Pointer to **string** | -**LastConsumedMessageIndex** | Pointer to **int32** | -**LastConsumptionTimestamp** | Pointer to [**time.Time**](time.Time.md) | -**RoleSid** | Pointer to **string** | -**ServiceSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**Attributes** | Pointer to **string** | The JSON string that stores application-specific data | +**ChannelSid** | Pointer to **string** | The SID of the Channel for the member | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was last updated | +**Identity** | Pointer to **string** | The string that identifies the resource's User | +**LastConsumedMessageIndex** | Pointer to **int32** | The index of the last Message that the Member has read within the Channel | +**LastConsumptionTimestamp** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 based timestamp string that represents the datetime of the last Message read event for the Member within the Channel | +**RoleSid** | Pointer to **string** | The SID of the Role assigned to the member | +**ServiceSid** | Pointer to **string** | The SID of the Service that the resource is associated with | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Url** | Pointer to **string** | The absolute URL of the Member resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/chat/v2/docs/ChatV2ServiceChannelMessage.md b/twilio/rest/chat/v2/docs/ChatV2ServiceChannelMessage.md index 5cd15f068..4ae5c91a4 100644 --- a/twilio/rest/chat/v2/docs/ChatV2ServiceChannelMessage.md +++ b/twilio/rest/chat/v2/docs/ChatV2ServiceChannelMessage.md @@ -1,24 +1,24 @@ # ChatV2ServiceChannelMessage ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Attributes** | Pointer to **string** | -**Body** | Pointer to **string** | -**ChannelSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**From** | Pointer to **string** | -**Index** | Pointer to **int32** | -**LastUpdatedBy** | Pointer to **string** | -**Media** | Pointer to **map[string]interface{}** | -**ServiceSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**To** | Pointer to **string** | -**Type** | Pointer to **string** | -**Url** | Pointer to **string** | -**WasEdited** | Pointer to **bool** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**Attributes** | Pointer to **string** | The JSON string that stores application-specific data | +**Body** | Pointer to **string** | The content of the message | +**ChannelSid** | Pointer to **string** | The SID of the Channel the Message resource belongs to | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was last updated | +**From** | Pointer to **string** | The Identity of the message's author | +**Index** | Pointer to **int32** | The index of the message within the Channel | +**LastUpdatedBy** | Pointer to **string** | The Identity of the User who last updated the Message | +**Media** | Pointer to **map[string]interface{}** | A Media object that describes the Message's media if attached; otherwise, null | +**ServiceSid** | Pointer to **string** | The SID of the Service that the resource is associated with | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**To** | Pointer to **string** | The SID of the Channel that the message was sent to | +**Type** | Pointer to **string** | The Message type | +**Url** | Pointer to **string** | The absolute URL of the Message resource | +**WasEdited** | Pointer to **bool** | Whether the message has been edited since it was created | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/chat/v2/docs/ChatV2ServiceRole.md b/twilio/rest/chat/v2/docs/ChatV2ServiceRole.md index b3ec3cc96..a64038330 100644 --- a/twilio/rest/chat/v2/docs/ChatV2ServiceRole.md +++ b/twilio/rest/chat/v2/docs/ChatV2ServiceRole.md @@ -1,17 +1,17 @@ # ChatV2ServiceRole ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**FriendlyName** | Pointer to **string** | -**Permissions** | Pointer to **[]string** | -**ServiceSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Type** | Pointer to [**RoleRoleType**](role_role_type.md) | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was last updated | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the resource | +**Permissions** | Pointer to **[]string** | An array of the permissions the role has been granted | +**ServiceSid** | Pointer to **string** | The SID of the Service that the resource is associated with | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Type** | Pointer to **string** | The type of role | +**Url** | Pointer to **string** | The absolute URL of the Role resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/chat/v2/docs/ChatV2ServiceUser.md b/twilio/rest/chat/v2/docs/ChatV2ServiceUser.md index 47cea0611..bb98d0282 100644 --- a/twilio/rest/chat/v2/docs/ChatV2ServiceUser.md +++ b/twilio/rest/chat/v2/docs/ChatV2ServiceUser.md @@ -1,22 +1,22 @@ # ChatV2ServiceUser ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Attributes** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**FriendlyName** | Pointer to **string** | -**Identity** | Pointer to **string** | -**IsNotifiable** | Pointer to **bool** | -**IsOnline** | Pointer to **bool** | -**JoinedChannelsCount** | Pointer to **int32** | -**Links** | Pointer to **map[string]interface{}** | -**RoleSid** | Pointer to **string** | -**ServiceSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**Attributes** | Pointer to **string** | The JSON string that stores application-specific data | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was last updated | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the resource | +**Identity** | Pointer to **string** | The string that identifies the resource's User | +**IsNotifiable** | Pointer to **bool** | Whether the User has a potentially valid Push Notification registration for the Service instance | +**IsOnline** | Pointer to **bool** | Whether the User is actively connected to the Service instance and online | +**JoinedChannelsCount** | Pointer to **int32** | The number of Channels the User is a Member of | +**Links** | Pointer to **map[string]interface{}** | The absolute URLs of the Channel and Binding resources related to the user | +**RoleSid** | Pointer to **string** | The SID of the Role assigned to the user | +**ServiceSid** | Pointer to **string** | The SID of the Service that the resource is associated with | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Url** | Pointer to **string** | The absolute URL of the User resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/chat/v2/docs/ChatV2ServiceUserUserBinding.md b/twilio/rest/chat/v2/docs/ChatV2ServiceUserUserBinding.md index 5200720dc..f18337007 100644 --- a/twilio/rest/chat/v2/docs/ChatV2ServiceUserUserBinding.md +++ b/twilio/rest/chat/v2/docs/ChatV2ServiceUserUserBinding.md @@ -1,20 +1,20 @@ # ChatV2ServiceUserUserBinding ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**BindingType** | Pointer to [**UserBindingBindingType**](user_binding_binding_type.md) | -**CredentialSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**Endpoint** | Pointer to **string** | -**Identity** | Pointer to **string** | -**MessageTypes** | Pointer to **[]string** | -**ServiceSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Url** | Pointer to **string** | -**UserSid** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**BindingType** | Pointer to **string** | The push technology to use for the binding | +**CredentialSid** | Pointer to **string** | The SID of the Credential for the binding | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was last updated | +**Endpoint** | Pointer to **string** | The unique endpoint identifier for the User Binding | +**Identity** | Pointer to **string** | The string that identifies the resource's User | +**MessageTypes** | Pointer to **[]string** | The Programmable Chat message types the binding is subscribed to | +**ServiceSid** | Pointer to **string** | The SID of the Service that the resource is associated with | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Url** | Pointer to **string** | The absolute URL of the User Binding resource | +**UserSid** | Pointer to **string** | The SID of the User with the binding | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/chat/v2/docs/ChatV2ServiceUserUserChannel.md b/twilio/rest/chat/v2/docs/ChatV2ServiceUserUserChannel.md index e942f69f3..d5394bb70 100644 --- a/twilio/rest/chat/v2/docs/ChatV2ServiceUserUserChannel.md +++ b/twilio/rest/chat/v2/docs/ChatV2ServiceUserUserChannel.md @@ -1,19 +1,19 @@ # ChatV2ServiceUserUserChannel ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**ChannelSid** | Pointer to **string** | -**LastConsumedMessageIndex** | Pointer to **int32** | -**Links** | Pointer to **map[string]interface{}** | -**MemberSid** | Pointer to **string** | -**NotificationLevel** | Pointer to [**UserChannelNotificationLevel**](user_channel_notification_level.md) | -**ServiceSid** | Pointer to **string** | -**Status** | Pointer to [**UserChannelChannelStatus**](user_channel_channel_status.md) | -**UnreadMessagesCount** | Pointer to **int32** | -**Url** | Pointer to **string** | -**UserSid** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**ChannelSid** | Pointer to **string** | The SID of the Channel the resource belongs to | +**LastConsumedMessageIndex** | Pointer to **int32** | The index of the last Message in the Channel the Member has read | +**Links** | Pointer to **map[string]interface{}** | Absolute URLs to access the Members, Messages , Invites and, if it exists, the last Message for the Channel | +**MemberSid** | Pointer to **string** | The SID of the User as a Member in the Channel | +**NotificationLevel** | Pointer to **string** | The push notification level of the User for the Channel | +**ServiceSid** | Pointer to **string** | The SID of the Service that the resource is associated with | +**Status** | Pointer to **string** | The status of the User on the Channel | +**UnreadMessagesCount** | Pointer to **int32** | The number of unread Messages in the Channel for the User | +**Url** | Pointer to **string** | The absolute URL of the resource | +**UserSid** | Pointer to **string** | The SID of the User the User Channel belongs to | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/chat/v2/docs/ListBindingResponse.md b/twilio/rest/chat/v2/docs/ListBindingResponse.md index 6fb586dd3..329421af0 100644 --- a/twilio/rest/chat/v2/docs/ListBindingResponse.md +++ b/twilio/rest/chat/v2/docs/ListBindingResponse.md @@ -1,10 +1,10 @@ # ListBindingResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Bindings** | [**[]ChatV2ServiceBinding**](chat.v2.service.binding.md) | [optional] -**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Bindings** | [**[]ChatV2ServiceBinding**](chat.v2.service.binding.md) | |[optional] +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/chat/v2/docs/ListChannelResponse.md b/twilio/rest/chat/v2/docs/ListChannelResponse.md index 06df1bf8b..d2626a3d2 100644 --- a/twilio/rest/chat/v2/docs/ListChannelResponse.md +++ b/twilio/rest/chat/v2/docs/ListChannelResponse.md @@ -1,10 +1,10 @@ # ListChannelResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Channels** | [**[]ChatV2ServiceChannel**](chat.v2.service.channel.md) | [optional] -**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Channels** | [**[]ChatV2ServiceChannel**](chat.v2.service.channel.md) | |[optional] +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/chat/v2/docs/ListChannelWebhookResponse.md b/twilio/rest/chat/v2/docs/ListChannelWebhookResponse.md index 55f8a3b2a..5f024698d 100644 --- a/twilio/rest/chat/v2/docs/ListChannelWebhookResponse.md +++ b/twilio/rest/chat/v2/docs/ListChannelWebhookResponse.md @@ -1,10 +1,10 @@ # ListChannelWebhookResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | [optional] -**Webhooks** | [**[]ChatV2ServiceChannelChannelWebhook**](chat.v2.service.channel.channel_webhook.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | |[optional] +**Webhooks** | [**[]ChatV2ServiceChannelChannelWebhook**](chat.v2.service.channel.channel_webhook.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/chat/v2/docs/ListCredentialResponse.md b/twilio/rest/chat/v2/docs/ListCredentialResponse.md index 932363d1f..150d7097f 100644 --- a/twilio/rest/chat/v2/docs/ListCredentialResponse.md +++ b/twilio/rest/chat/v2/docs/ListCredentialResponse.md @@ -1,10 +1,10 @@ # ListCredentialResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Credentials** | [**[]ChatV2Credential**](chat.v2.credential.md) | [optional] -**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Credentials** | [**[]ChatV2Credential**](chat.v2.credential.md) | |[optional] +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/chat/v2/docs/ListCredentialResponseMeta.md b/twilio/rest/chat/v2/docs/ListCredentialResponseMeta.md index fdaf9c314..1de617a01 100644 --- a/twilio/rest/chat/v2/docs/ListCredentialResponseMeta.md +++ b/twilio/rest/chat/v2/docs/ListCredentialResponseMeta.md @@ -1,15 +1,15 @@ # ListCredentialResponseMeta ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**FirstPageUrl** | **string** | [optional] -**Key** | **string** | [optional] -**NextPageUrl** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUrl** | **string** | [optional] -**Url** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstPageUrl** | **string** | |[optional] +**Key** | **string** | |[optional] +**NextPageUrl** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUrl** | **string** | |[optional] +**Url** | **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/twilio/rest/chat/v2/docs/ListInviteResponse.md b/twilio/rest/chat/v2/docs/ListInviteResponse.md index b9190dc6c..03711e7d5 100644 --- a/twilio/rest/chat/v2/docs/ListInviteResponse.md +++ b/twilio/rest/chat/v2/docs/ListInviteResponse.md @@ -1,10 +1,10 @@ # ListInviteResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Invites** | [**[]ChatV2ServiceChannelInvite**](chat.v2.service.channel.invite.md) | [optional] -**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Invites** | [**[]ChatV2ServiceChannelInvite**](chat.v2.service.channel.invite.md) | |[optional] +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/chat/v2/docs/ListMemberResponse.md b/twilio/rest/chat/v2/docs/ListMemberResponse.md index d347f02d7..b6d563e2b 100644 --- a/twilio/rest/chat/v2/docs/ListMemberResponse.md +++ b/twilio/rest/chat/v2/docs/ListMemberResponse.md @@ -1,10 +1,10 @@ # ListMemberResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Members** | [**[]ChatV2ServiceChannelMember**](chat.v2.service.channel.member.md) | [optional] -**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Members** | [**[]ChatV2ServiceChannelMember**](chat.v2.service.channel.member.md) | |[optional] +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/chat/v2/docs/ListMessageResponse.md b/twilio/rest/chat/v2/docs/ListMessageResponse.md index fd8c139a3..730da28aa 100644 --- a/twilio/rest/chat/v2/docs/ListMessageResponse.md +++ b/twilio/rest/chat/v2/docs/ListMessageResponse.md @@ -1,10 +1,10 @@ # ListMessageResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Messages** | [**[]ChatV2ServiceChannelMessage**](chat.v2.service.channel.message.md) | [optional] -**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Messages** | [**[]ChatV2ServiceChannelMessage**](chat.v2.service.channel.message.md) | |[optional] +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/chat/v2/docs/ListRoleResponse.md b/twilio/rest/chat/v2/docs/ListRoleResponse.md index 1dfe2d81d..8cb61a140 100644 --- a/twilio/rest/chat/v2/docs/ListRoleResponse.md +++ b/twilio/rest/chat/v2/docs/ListRoleResponse.md @@ -1,10 +1,10 @@ # ListRoleResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | [optional] -**Roles** | [**[]ChatV2ServiceRole**](chat.v2.service.role.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | |[optional] +**Roles** | [**[]ChatV2ServiceRole**](chat.v2.service.role.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/chat/v2/docs/ListServiceResponse.md b/twilio/rest/chat/v2/docs/ListServiceResponse.md index 3c2a6aa1d..ffbbdf6c5 100644 --- a/twilio/rest/chat/v2/docs/ListServiceResponse.md +++ b/twilio/rest/chat/v2/docs/ListServiceResponse.md @@ -1,10 +1,10 @@ # ListServiceResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | [optional] -**Services** | [**[]ChatV2Service**](chat.v2.service.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | |[optional] +**Services** | [**[]ChatV2Service**](chat.v2.service.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/chat/v2/docs/ListUserBindingResponse.md b/twilio/rest/chat/v2/docs/ListUserBindingResponse.md index 21f05439e..ebff7a7c9 100644 --- a/twilio/rest/chat/v2/docs/ListUserBindingResponse.md +++ b/twilio/rest/chat/v2/docs/ListUserBindingResponse.md @@ -1,10 +1,10 @@ # ListUserBindingResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Bindings** | [**[]ChatV2ServiceUserUserBinding**](chat.v2.service.user.user_binding.md) | [optional] -**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Bindings** | [**[]ChatV2ServiceUserUserBinding**](chat.v2.service.user.user_binding.md) | |[optional] +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/chat/v2/docs/ListUserChannelResponse.md b/twilio/rest/chat/v2/docs/ListUserChannelResponse.md index 7d21c6916..9716563e7 100644 --- a/twilio/rest/chat/v2/docs/ListUserChannelResponse.md +++ b/twilio/rest/chat/v2/docs/ListUserChannelResponse.md @@ -1,10 +1,10 @@ # ListUserChannelResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Channels** | [**[]ChatV2ServiceUserUserChannel**](chat.v2.service.user.user_channel.md) | [optional] -**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Channels** | [**[]ChatV2ServiceUserUserChannel**](chat.v2.service.user.user_channel.md) | |[optional] +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/chat/v2/docs/ListUserResponse.md b/twilio/rest/chat/v2/docs/ListUserResponse.md index 272a35e58..baf0c2ac7 100644 --- a/twilio/rest/chat/v2/docs/ListUserResponse.md +++ b/twilio/rest/chat/v2/docs/ListUserResponse.md @@ -1,10 +1,10 @@ # ListUserResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | [optional] -**Users** | [**[]ChatV2ServiceUser**](chat.v2.service.user.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | |[optional] +**Users** | [**[]ChatV2ServiceUser**](chat.v2.service.user.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/chat/v2/model_chat_v2_credential.go b/twilio/rest/chat/v2/model_chat_v2_credential.go index eb31f493c..fd8eb761c 100644 --- a/twilio/rest/chat/v2/model_chat_v2_credential.go +++ b/twilio/rest/chat/v2/model_chat_v2_credential.go @@ -17,12 +17,20 @@ import ( // ChatV2Credential struct for ChatV2Credential type ChatV2Credential struct { - AccountSid *string `json:"AccountSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Sandbox *string `json:"Sandbox,omitempty"` - Sid *string `json:"Sid,omitempty"` - Type *CredentialPushService `json:"Type,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The string that you assigned to describe the resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // [APN only] Whether to send the credential to sandbox APNs + Sandbox *string `json:"Sandbox,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The type of push-notification service the credential is for + Type *string `json:"Type,omitempty"` + // The absolute URL of the Credential resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/chat/v2/model_chat_v2_service.go b/twilio/rest/chat/v2/model_chat_v2_service.go index 754b8d477..34218216e 100644 --- a/twilio/rest/chat/v2/model_chat_v2_service.go +++ b/twilio/rest/chat/v2/model_chat_v2_service.go @@ -17,27 +17,50 @@ import ( // ChatV2Service struct for ChatV2Service type ChatV2Service struct { - AccountSid *string `json:"AccountSid,omitempty"` - ConsumptionReportInterval *int32 `json:"ConsumptionReportInterval,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - DefaultChannelCreatorRoleSid *string `json:"DefaultChannelCreatorRoleSid,omitempty"` - DefaultChannelRoleSid *string `json:"DefaultChannelRoleSid,omitempty"` - DefaultServiceRoleSid *string `json:"DefaultServiceRoleSid,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Limits *map[string]interface{} `json:"Limits,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - Media *map[string]interface{} `json:"Media,omitempty"` - Notifications *map[string]interface{} `json:"Notifications,omitempty"` - PostWebhookRetryCount *int32 `json:"PostWebhookRetryCount,omitempty"` - PostWebhookUrl *string `json:"PostWebhookUrl,omitempty"` - PreWebhookRetryCount *int32 `json:"PreWebhookRetryCount,omitempty"` - PreWebhookUrl *string `json:"PreWebhookUrl,omitempty"` - ReachabilityEnabled *bool `json:"ReachabilityEnabled,omitempty"` - ReadStatusEnabled *bool `json:"ReadStatusEnabled,omitempty"` - Sid *string `json:"Sid,omitempty"` - TypingIndicatorTimeout *int32 `json:"TypingIndicatorTimeout,omitempty"` - Url *string `json:"Url,omitempty"` - WebhookFilters *[]string `json:"WebhookFilters,omitempty"` - WebhookMethod *string `json:"WebhookMethod,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // DEPRECATED + ConsumptionReportInterval *int32 `json:"ConsumptionReportInterval,omitempty"` + // The RFC 2822 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The channel role assigned to a channel creator when they join a new channel + DefaultChannelCreatorRoleSid *string `json:"DefaultChannelCreatorRoleSid,omitempty"` + // The channel role assigned to users when they are added to a channel + DefaultChannelRoleSid *string `json:"DefaultChannelRoleSid,omitempty"` + // The service role assigned to users when they are added to the service + DefaultServiceRoleSid *string `json:"DefaultServiceRoleSid,omitempty"` + // The string that you assigned to describe the resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // An object that describes the limits of the service instance + Limits *map[string]interface{} `json:"Limits,omitempty"` + // The absolute URLs of the Service's Channels, Roles, and Users + Links *map[string]interface{} `json:"Links,omitempty"` + // The properties of the media that the service supports + Media *map[string]interface{} `json:"Media,omitempty"` + // The notification configuration for the Service instance + Notifications *map[string]interface{} `json:"Notifications,omitempty"` + // The number of times calls to the `post_webhook_url` will be retried + PostWebhookRetryCount *int32 `json:"PostWebhookRetryCount,omitempty"` + // The URL for post-event webhooks + PostWebhookUrl *string `json:"PostWebhookUrl,omitempty"` + // Count of times webhook will be retried in case of timeout or 429/503/504 HTTP responses + PreWebhookRetryCount *int32 `json:"PreWebhookRetryCount,omitempty"` + // The webhook URL for pre-event webhooks + PreWebhookUrl *string `json:"PreWebhookUrl,omitempty"` + // Whether the Reachability Indicator feature is enabled for this Service instance + ReachabilityEnabled *bool `json:"ReachabilityEnabled,omitempty"` + // Whether the Message Consumption Horizon feature is enabled + ReadStatusEnabled *bool `json:"ReadStatusEnabled,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // How long in seconds to wait before assuming the user is no longer typing + TypingIndicatorTimeout *int32 `json:"TypingIndicatorTimeout,omitempty"` + // The absolute URL of the Service resource + Url *string `json:"Url,omitempty"` + // The list of webhook events that are enabled for this Service instance + WebhookFilters *[]string `json:"WebhookFilters,omitempty"` + // The HTTP method to use for both PRE and POST webhooks + WebhookMethod *string `json:"WebhookMethod,omitempty"` } diff --git a/twilio/rest/chat/v2/model_chat_v2_service_binding.go b/twilio/rest/chat/v2/model_chat_v2_service_binding.go index b26b06275..4047afab6 100644 --- a/twilio/rest/chat/v2/model_chat_v2_service_binding.go +++ b/twilio/rest/chat/v2/model_chat_v2_service_binding.go @@ -17,16 +17,28 @@ import ( // ChatV2ServiceBinding struct for ChatV2ServiceBinding type ChatV2ServiceBinding struct { - AccountSid *string `json:"AccountSid,omitempty"` - BindingType *BindingBindingType `json:"BindingType,omitempty"` - CredentialSid *string `json:"CredentialSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Endpoint *string `json:"Endpoint,omitempty"` - Identity *string `json:"Identity,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - MessageTypes *[]string `json:"MessageTypes,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The push technology to use for the binding + BindingType *string `json:"BindingType,omitempty"` + // The SID of the Credential for the binding + CredentialSid *string `json:"CredentialSid,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The unique endpoint identifier for the Binding + Endpoint *string `json:"Endpoint,omitempty"` + // The string that identifies the resource's User + Identity *string `json:"Identity,omitempty"` + // The absolute URLs of the Binding's User + Links *map[string]interface{} `json:"Links,omitempty"` + // The Programmable Chat message types the binding is subscribed to + MessageTypes *[]string `json:"MessageTypes,omitempty"` + // The SID of the Service that the Binding resource is associated with + ServiceSid *string `json:"ServiceSid,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The absolute URL of the Binding resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/chat/v2/model_chat_v2_service_channel.go b/twilio/rest/chat/v2/model_chat_v2_service_channel.go index 5cc3b9ce4..4fb11d9c6 100644 --- a/twilio/rest/chat/v2/model_chat_v2_service_channel.go +++ b/twilio/rest/chat/v2/model_chat_v2_service_channel.go @@ -17,18 +17,32 @@ import ( // ChatV2ServiceChannel struct for ChatV2ServiceChannel type ChatV2ServiceChannel struct { - AccountSid *string `json:"AccountSid,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - CreatedBy *string `json:"CreatedBy,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - MembersCount *int32 `json:"MembersCount,omitempty"` - MessagesCount *int32 `json:"MessagesCount,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Type *ChannelChannelType `json:"Type,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The JSON string that stores application-specific data + Attributes *string `json:"Attributes,omitempty"` + // The identity of the User that created the channel + CreatedBy *string `json:"CreatedBy,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The string that you assigned to describe the resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // Absolute URLs to access the Members, Messages , Invites and, if it exists, the last Message for the Channel + Links *map[string]interface{} `json:"Links,omitempty"` + // The number of Members in the Channel + MembersCount *int32 `json:"MembersCount,omitempty"` + // The number of Messages that have been passed in the Channel + MessagesCount *int32 `json:"MessagesCount,omitempty"` + // The SID of the Service that the resource is associated with + ServiceSid *string `json:"ServiceSid,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The visibility of the channel. Can be: `public` or `private` + Type *string `json:"Type,omitempty"` + // An application-defined string that uniquely identifies the resource + UniqueName *string `json:"UniqueName,omitempty"` + // The absolute URL of the Channel resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/chat/v2/model_chat_v2_service_channel_channel_webhook.go b/twilio/rest/chat/v2/model_chat_v2_service_channel_channel_webhook.go index b617888f8..4ae08b97c 100644 --- a/twilio/rest/chat/v2/model_chat_v2_service_channel_channel_webhook.go +++ b/twilio/rest/chat/v2/model_chat_v2_service_channel_channel_webhook.go @@ -17,13 +17,22 @@ import ( // ChatV2ServiceChannelChannelWebhook struct for ChatV2ServiceChannelChannelWebhook type ChatV2ServiceChannelChannelWebhook struct { - AccountSid *string `json:"AccountSid,omitempty"` - ChannelSid *string `json:"ChannelSid,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The SID of the Channel the Channel Webhook resource belongs to + ChannelSid *string `json:"ChannelSid,omitempty"` + // The JSON string that describes the configuration object for the channel webhook Configuration *map[string]interface{} `json:"Configuration,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Type *string `json:"Type,omitempty"` - Url *string `json:"Url,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The SID of the Service that the Channel Webhook resource is associated with + ServiceSid *string `json:"ServiceSid,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The type of webhook + Type *string `json:"Type,omitempty"` + // The absolute URL of the Channel Webhook resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/chat/v2/model_chat_v2_service_channel_invite.go b/twilio/rest/chat/v2/model_chat_v2_service_channel_invite.go index 3e7e103c0..3f8f8038c 100644 --- a/twilio/rest/chat/v2/model_chat_v2_service_channel_invite.go +++ b/twilio/rest/chat/v2/model_chat_v2_service_channel_invite.go @@ -17,14 +17,24 @@ import ( // ChatV2ServiceChannelInvite struct for ChatV2ServiceChannelInvite type ChatV2ServiceChannelInvite struct { - AccountSid *string `json:"AccountSid,omitempty"` - ChannelSid *string `json:"ChannelSid,omitempty"` - CreatedBy *string `json:"CreatedBy,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The SID of the Channel the new resource belongs to + ChannelSid *string `json:"ChannelSid,omitempty"` + // The identity of the User that created the invite + CreatedBy *string `json:"CreatedBy,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the resource was last updated DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Identity *string `json:"Identity,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` + // The string that identifies the resource's User + Identity *string `json:"Identity,omitempty"` + // The SID of the Role assigned to the member + RoleSid *string `json:"RoleSid,omitempty"` + // The SID of the Service that the resource is associated with + ServiceSid *string `json:"ServiceSid,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The absolute URL of the Invite resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/chat/v2/model_chat_v2_service_channel_member.go b/twilio/rest/chat/v2/model_chat_v2_service_channel_member.go index 361e073e2..1bd6fac4a 100644 --- a/twilio/rest/chat/v2/model_chat_v2_service_channel_member.go +++ b/twilio/rest/chat/v2/model_chat_v2_service_channel_member.go @@ -17,16 +17,28 @@ import ( // ChatV2ServiceChannelMember struct for ChatV2ServiceChannelMember type ChatV2ServiceChannelMember struct { - AccountSid *string `json:"AccountSid,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - ChannelSid *string `json:"ChannelSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Identity *string `json:"Identity,omitempty"` - LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The JSON string that stores application-specific data + Attributes *string `json:"Attributes,omitempty"` + // The SID of the Channel for the member + ChannelSid *string `json:"ChannelSid,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The string that identifies the resource's User + Identity *string `json:"Identity,omitempty"` + // The index of the last Message that the Member has read within the Channel + LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` + // The ISO 8601 based timestamp string that represents the datetime of the last Message read event for the Member within the Channel LastConsumptionTimestamp *time.Time `json:"LastConsumptionTimestamp,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Role assigned to the member + RoleSid *string `json:"RoleSid,omitempty"` + // The SID of the Service that the resource is associated with + ServiceSid *string `json:"ServiceSid,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The absolute URL of the Member resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/chat/v2/model_chat_v2_service_channel_message.go b/twilio/rest/chat/v2/model_chat_v2_service_channel_message.go index 19247203b..42b284fdd 100644 --- a/twilio/rest/chat/v2/model_chat_v2_service_channel_message.go +++ b/twilio/rest/chat/v2/model_chat_v2_service_channel_message.go @@ -17,20 +17,36 @@ import ( // ChatV2ServiceChannelMessage struct for ChatV2ServiceChannelMessage type ChatV2ServiceChannelMessage struct { - AccountSid *string `json:"AccountSid,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - Body *string `json:"Body,omitempty"` - ChannelSid *string `json:"ChannelSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - From *string `json:"From,omitempty"` - Index *int32 `json:"Index,omitempty"` - LastUpdatedBy *string `json:"LastUpdatedBy,omitempty"` - Media *map[string]interface{} `json:"Media,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - To *string `json:"To,omitempty"` - Type *string `json:"Type,omitempty"` - Url *string `json:"Url,omitempty"` - WasEdited *bool `json:"WasEdited,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The JSON string that stores application-specific data + Attributes *string `json:"Attributes,omitempty"` + // The content of the message + Body *string `json:"Body,omitempty"` + // The SID of the Channel the Message resource belongs to + ChannelSid *string `json:"ChannelSid,omitempty"` + // The RFC 2822 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The Identity of the message's author + From *string `json:"From,omitempty"` + // The index of the message within the Channel + Index *int32 `json:"Index,omitempty"` + // The Identity of the User who last updated the Message + LastUpdatedBy *string `json:"LastUpdatedBy,omitempty"` + // A Media object that describes the Message's media if attached; otherwise, null + Media *map[string]interface{} `json:"Media,omitempty"` + // The SID of the Service that the resource is associated with + ServiceSid *string `json:"ServiceSid,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The SID of the Channel that the message was sent to + To *string `json:"To,omitempty"` + // The Message type + Type *string `json:"Type,omitempty"` + // The absolute URL of the Message resource + Url *string `json:"Url,omitempty"` + // Whether the message has been edited since it was created + WasEdited *bool `json:"WasEdited,omitempty"` } diff --git a/twilio/rest/chat/v2/model_chat_v2_service_role.go b/twilio/rest/chat/v2/model_chat_v2_service_role.go index 23bf15c25..fd9a4abb8 100644 --- a/twilio/rest/chat/v2/model_chat_v2_service_role.go +++ b/twilio/rest/chat/v2/model_chat_v2_service_role.go @@ -17,13 +17,22 @@ import ( // ChatV2ServiceRole struct for ChatV2ServiceRole type ChatV2ServiceRole struct { - AccountSid *string `json:"AccountSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Permissions *[]string `json:"Permissions,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Type *RoleRoleType `json:"Type,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The string that you assigned to describe the resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // An array of the permissions the role has been granted + Permissions *[]string `json:"Permissions,omitempty"` + // The SID of the Service that the resource is associated with + ServiceSid *string `json:"ServiceSid,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The type of role + Type *string `json:"Type,omitempty"` + // The absolute URL of the Role resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/chat/v2/model_chat_v2_service_user.go b/twilio/rest/chat/v2/model_chat_v2_service_user.go index 3cdb6184f..2eac57fe8 100644 --- a/twilio/rest/chat/v2/model_chat_v2_service_user.go +++ b/twilio/rest/chat/v2/model_chat_v2_service_user.go @@ -17,18 +17,32 @@ import ( // ChatV2ServiceUser struct for ChatV2ServiceUser type ChatV2ServiceUser struct { - AccountSid *string `json:"AccountSid,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Identity *string `json:"Identity,omitempty"` - IsNotifiable *bool `json:"IsNotifiable,omitempty"` - IsOnline *bool `json:"IsOnline,omitempty"` - JoinedChannelsCount *int32 `json:"JoinedChannelsCount,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The JSON string that stores application-specific data + Attributes *string `json:"Attributes,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The string that you assigned to describe the resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // The string that identifies the resource's User + Identity *string `json:"Identity,omitempty"` + // Whether the User has a potentially valid Push Notification registration for the Service instance + IsNotifiable *bool `json:"IsNotifiable,omitempty"` + // Whether the User is actively connected to the Service instance and online + IsOnline *bool `json:"IsOnline,omitempty"` + // The number of Channels the User is a Member of + JoinedChannelsCount *int32 `json:"JoinedChannelsCount,omitempty"` + // The absolute URLs of the Channel and Binding resources related to the user + Links *map[string]interface{} `json:"Links,omitempty"` + // The SID of the Role assigned to the user + RoleSid *string `json:"RoleSid,omitempty"` + // The SID of the Service that the resource is associated with + ServiceSid *string `json:"ServiceSid,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The absolute URL of the User resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/chat/v2/model_chat_v2_service_user_user_binding.go b/twilio/rest/chat/v2/model_chat_v2_service_user_user_binding.go index 0cad372e9..ed39cd819 100644 --- a/twilio/rest/chat/v2/model_chat_v2_service_user_user_binding.go +++ b/twilio/rest/chat/v2/model_chat_v2_service_user_user_binding.go @@ -17,16 +17,28 @@ import ( // ChatV2ServiceUserUserBinding struct for ChatV2ServiceUserUserBinding type ChatV2ServiceUserUserBinding struct { - AccountSid *string `json:"AccountSid,omitempty"` - BindingType *UserBindingBindingType `json:"BindingType,omitempty"` - CredentialSid *string `json:"CredentialSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Endpoint *string `json:"Endpoint,omitempty"` - Identity *string `json:"Identity,omitempty"` - MessageTypes *[]string `json:"MessageTypes,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` - UserSid *string `json:"UserSid,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The push technology to use for the binding + BindingType *string `json:"BindingType,omitempty"` + // The SID of the Credential for the binding + CredentialSid *string `json:"CredentialSid,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The unique endpoint identifier for the User Binding + Endpoint *string `json:"Endpoint,omitempty"` + // The string that identifies the resource's User + Identity *string `json:"Identity,omitempty"` + // The Programmable Chat message types the binding is subscribed to + MessageTypes *[]string `json:"MessageTypes,omitempty"` + // The SID of the Service that the resource is associated with + ServiceSid *string `json:"ServiceSid,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The absolute URL of the User Binding resource + Url *string `json:"Url,omitempty"` + // The SID of the User with the binding + UserSid *string `json:"UserSid,omitempty"` } diff --git a/twilio/rest/chat/v2/model_chat_v2_service_user_user_channel.go b/twilio/rest/chat/v2/model_chat_v2_service_user_user_channel.go index 22e98db97..d658070b0 100644 --- a/twilio/rest/chat/v2/model_chat_v2_service_user_user_channel.go +++ b/twilio/rest/chat/v2/model_chat_v2_service_user_user_channel.go @@ -13,15 +13,26 @@ package openapi // ChatV2ServiceUserUserChannel struct for ChatV2ServiceUserUserChannel type ChatV2ServiceUserUserChannel struct { - AccountSid *string `json:"AccountSid,omitempty"` - ChannelSid *string `json:"ChannelSid,omitempty"` - LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - MemberSid *string `json:"MemberSid,omitempty"` - NotificationLevel *UserChannelNotificationLevel `json:"NotificationLevel,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Status *UserChannelChannelStatus `json:"Status,omitempty"` - UnreadMessagesCount *int32 `json:"UnreadMessagesCount,omitempty"` - Url *string `json:"Url,omitempty"` - UserSid *string `json:"UserSid,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The SID of the Channel the resource belongs to + ChannelSid *string `json:"ChannelSid,omitempty"` + // The index of the last Message in the Channel the Member has read + LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` + // Absolute URLs to access the Members, Messages , Invites and, if it exists, the last Message for the Channel + Links *map[string]interface{} `json:"Links,omitempty"` + // The SID of the User as a Member in the Channel + MemberSid *string `json:"MemberSid,omitempty"` + // The push notification level of the User for the Channel + NotificationLevel *string `json:"NotificationLevel,omitempty"` + // The SID of the Service that the resource is associated with + ServiceSid *string `json:"ServiceSid,omitempty"` + // The status of the User on the Channel + Status *string `json:"Status,omitempty"` + // The number of unread Messages in the Channel for the User + UnreadMessagesCount *int32 `json:"UnreadMessagesCount,omitempty"` + // The absolute URL of the resource + Url *string `json:"Url,omitempty"` + // The SID of the User the User Channel belongs to + UserSid *string `json:"UserSid,omitempty"` } diff --git a/twilio/rest/conversations/v1/README.md b/twilio/rest/conversations/v1/README.md index 32ad2e288..e3a9a6879 100644 --- a/twilio/rest/conversations/v1/README.md +++ b/twilio/rest/conversations/v1/README.md @@ -119,10 +119,6 @@ Class | Method | HTTP request | Description ## Documentation For Models - - [ConfigurationWebhookMethod](docs/ConfigurationWebhookMethod.md) - - [ConfigurationWebhookTarget](docs/ConfigurationWebhookTarget.md) - - [ConversationMessageReceiptDeliveryStatus](docs/ConversationMessageReceiptDeliveryStatus.md) - - [ConversationState](docs/ConversationState.md) - [ConversationsV1Configuration](docs/ConversationsV1Configuration.md) - [ConversationsV1ConfigurationConfigurationWebhook](docs/ConversationsV1ConfigurationConfigurationWebhook.md) - [ConversationsV1Conversation](docs/ConversationsV1Conversation.md) @@ -144,7 +140,6 @@ Class | Method | HTTP request | Description - [ConversationsV1ServiceServiceRole](docs/ConversationsV1ServiceServiceRole.md) - [ConversationsV1ServiceServiceUser](docs/ConversationsV1ServiceServiceUser.md) - [ConversationsV1User](docs/ConversationsV1User.md) - - [CredentialPushType](docs/CredentialPushType.md) - [ListConversationMessageReceiptResponse](docs/ListConversationMessageReceiptResponse.md) - [ListConversationMessageResponse](docs/ListConversationMessageResponse.md) - [ListConversationParticipantResponse](docs/ListConversationParticipantResponse.md) @@ -163,11 +158,6 @@ Class | Method | HTTP request | Description - [ListServiceRoleResponse](docs/ListServiceRoleResponse.md) - [ListServiceUserResponse](docs/ListServiceUserResponse.md) - [ListUserResponse](docs/ListUserResponse.md) - - [RoleRoleType](docs/RoleRoleType.md) - - [ServiceBindingBindingType](docs/ServiceBindingBindingType.md) - - [ServiceConversationMessageReceiptDeliveryStatus](docs/ServiceConversationMessageReceiptDeliveryStatus.md) - - [ServiceConversationState](docs/ServiceConversationState.md) - - [ServiceRoleRoleType](docs/ServiceRoleRoleType.md) ## Documentation For Authorization diff --git a/twilio/rest/conversations/v1/docs/ConversationsV1Configuration.md b/twilio/rest/conversations/v1/docs/ConversationsV1Configuration.md index 47b1aaac7..b79879b85 100644 --- a/twilio/rest/conversations/v1/docs/ConversationsV1Configuration.md +++ b/twilio/rest/conversations/v1/docs/ConversationsV1Configuration.md @@ -1,15 +1,15 @@ # ConversationsV1Configuration ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**DefaultChatServiceSid** | Pointer to **string** | -**DefaultClosedTimer** | Pointer to **string** | -**DefaultInactiveTimer** | Pointer to **string** | -**DefaultMessagingServiceSid** | Pointer to **string** | -**Links** | Pointer to **map[string]interface{}** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account responsible for this configuration. | +**DefaultChatServiceSid** | Pointer to **string** | The SID of the default Conversation Service that every new conversation is associated with. | +**DefaultClosedTimer** | Pointer to **string** | Default ISO8601 duration when conversation will be switched to `closed` state. | +**DefaultInactiveTimer** | Pointer to **string** | Default ISO8601 duration when conversation will be switched to `inactive` state. | +**DefaultMessagingServiceSid** | Pointer to **string** | The SID of the default Messaging Service that every new conversation is associated with. | +**Links** | Pointer to **map[string]interface{}** | Absolute URLs to access the webhook and default service configurations. | +**Url** | Pointer to **string** | An absolute URL for this global configuration. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/conversations/v1/docs/ConversationsV1ConfigurationConfigurationWebhook.md b/twilio/rest/conversations/v1/docs/ConversationsV1ConfigurationConfigurationWebhook.md index d3bbc88d9..44512b8bc 100644 --- a/twilio/rest/conversations/v1/docs/ConversationsV1ConfigurationConfigurationWebhook.md +++ b/twilio/rest/conversations/v1/docs/ConversationsV1ConfigurationConfigurationWebhook.md @@ -1,15 +1,15 @@ # ConversationsV1ConfigurationConfigurationWebhook ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Filters** | Pointer to **[]string** | -**Method** | Pointer to [**ConfigurationWebhookMethod**](configuration_webhook_method.md) | -**PostWebhookUrl** | Pointer to **string** | -**PreWebhookUrl** | Pointer to **string** | -**Target** | Pointer to [**ConfigurationWebhookTarget**](configuration_webhook_target.md) | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The unique ID of the Account responsible for this conversation. | +**Filters** | Pointer to **[]string** | The list of webhook event triggers that are enabled for this Service. | +**Method** | Pointer to **string** | The HTTP method to be used when sending a webhook request. | +**PostWebhookUrl** | Pointer to **string** | The absolute url the post-event webhook request should be sent to. | +**PreWebhookUrl** | Pointer to **string** | The absolute url the pre-event webhook request should be sent to. | +**Target** | Pointer to **string** | The routing target of the webhook. | +**Url** | Pointer to **string** | An absolute URL for this webhook. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/conversations/v1/docs/ConversationsV1Conversation.md b/twilio/rest/conversations/v1/docs/ConversationsV1Conversation.md index e4bcdbc77..7dbed5486 100644 --- a/twilio/rest/conversations/v1/docs/ConversationsV1Conversation.md +++ b/twilio/rest/conversations/v1/docs/ConversationsV1Conversation.md @@ -1,21 +1,21 @@ # ConversationsV1Conversation ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Attributes** | Pointer to **string** | -**ChatServiceSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**FriendlyName** | Pointer to **string** | -**Links** | Pointer to **map[string]interface{}** | -**MessagingServiceSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**State** | Pointer to [**ConversationState**](conversation_state.md) | -**Timers** | Pointer to **map[string]interface{}** | -**UniqueName** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The unique ID of the Account responsible for this conversation. | +**Attributes** | Pointer to **string** | An optional string metadata field you can use to store any data you wish. | +**ChatServiceSid** | Pointer to **string** | The unique ID of the Conversation Service this conversation belongs to. | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The date that this resource was created. | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The date that this resource was last updated. | +**FriendlyName** | Pointer to **string** | The human-readable name of this conversation. | +**Links** | Pointer to **map[string]interface{}** | Absolute URLs to access the participants, messages and webhooks of this conversation. | +**MessagingServiceSid** | Pointer to **string** | The unique ID of the Messaging Service this conversation belongs to. | +**Sid** | Pointer to **string** | A 34 character string that uniquely identifies this resource. | +**State** | Pointer to **string** | Current state of this conversation. | +**Timers** | Pointer to **map[string]interface{}** | Timer date values for this conversation. | +**UniqueName** | Pointer to **string** | An application-defined string that uniquely identifies the resource | +**Url** | Pointer to **string** | An absolute URL for this conversation. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/conversations/v1/docs/ConversationsV1ConversationConversationMessage.md b/twilio/rest/conversations/v1/docs/ConversationsV1ConversationConversationMessage.md index 5ea6f61f5..6b4a37ef1 100644 --- a/twilio/rest/conversations/v1/docs/ConversationsV1ConversationConversationMessage.md +++ b/twilio/rest/conversations/v1/docs/ConversationsV1ConversationConversationMessage.md @@ -1,22 +1,22 @@ # ConversationsV1ConversationConversationMessage ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Attributes** | Pointer to **string** | -**Author** | Pointer to **string** | -**Body** | Pointer to **string** | -**ConversationSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**Delivery** | Pointer to **map[string]interface{}** | -**Index** | Pointer to **int32** | -**Links** | Pointer to **map[string]interface{}** | -**Media** | Pointer to **[]map[string]interface{}** | -**ParticipantSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The unique ID of the Account responsible for this message. | +**Attributes** | Pointer to **string** | A string metadata field you can use to store any data you wish. | +**Author** | Pointer to **string** | The channel specific identifier of the message's author. | +**Body** | Pointer to **string** | The content of the message. | +**ConversationSid** | Pointer to **string** | The unique ID of the Conversation for this message. | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The date that this resource was created. | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The date that this resource was last updated. | +**Delivery** | Pointer to **map[string]interface{}** | An object that contains the summary of delivery statuses for the message to non-chat participants. | +**Index** | Pointer to **int32** | The index of the message within the Conversation. | +**Links** | Pointer to **map[string]interface{}** | Absolute URL to access the receipts of this message. | +**Media** | Pointer to **[]map[string]interface{}** | An array of objects that describe the Message's media if attached, otherwise, null. | +**ParticipantSid** | Pointer to **string** | The unique ID of messages's author participant. | +**Sid** | Pointer to **string** | A 34 character string that uniquely identifies this resource. | +**Url** | Pointer to **string** | An absolute API URL for this message. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/conversations/v1/docs/ConversationsV1ConversationConversationMessageConversationMessageReceipt.md b/twilio/rest/conversations/v1/docs/ConversationsV1ConversationConversationMessageConversationMessageReceipt.md index d86558b0c..f6fb6a8a9 100644 --- a/twilio/rest/conversations/v1/docs/ConversationsV1ConversationConversationMessageConversationMessageReceipt.md +++ b/twilio/rest/conversations/v1/docs/ConversationsV1ConversationConversationMessageConversationMessageReceipt.md @@ -1,19 +1,19 @@ # ConversationsV1ConversationConversationMessageConversationMessageReceipt ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**ChannelMessageSid** | Pointer to **string** | -**ConversationSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**ErrorCode** | Pointer to **int32** | -**MessageSid** | Pointer to **string** | -**ParticipantSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Status** | Pointer to [**ConversationMessageReceiptDeliveryStatus**](conversation_message_receipt_delivery_status.md) | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The unique ID of the Account responsible for this participant. | +**ChannelMessageSid** | Pointer to **string** | A messaging channel-specific identifier for the message delivered to participant | +**ConversationSid** | Pointer to **string** | The unique ID of the Conversation for this message. | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The date that this resource was created. | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The date that this resource was last updated. | +**ErrorCode** | Pointer to **int32** | The message [delivery error code](https://www.twilio.com/docs/sms/api/message-resource#delivery-related-errors) for a `failed` status | +**MessageSid** | Pointer to **string** | The SID of the message the delivery receipt belongs to | +**ParticipantSid** | Pointer to **string** | The unique ID of the participant the delivery receipt belongs to. | +**Sid** | Pointer to **string** | A 34 character string that uniquely identifies this resource. | +**Status** | Pointer to **string** | The message delivery status | +**Url** | Pointer to **string** | An absolute URL for this delivery receipt. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/conversations/v1/docs/ConversationsV1ConversationConversationParticipant.md b/twilio/rest/conversations/v1/docs/ConversationsV1ConversationConversationParticipant.md index b36395642..77d4f8d56 100644 --- a/twilio/rest/conversations/v1/docs/ConversationsV1ConversationConversationParticipant.md +++ b/twilio/rest/conversations/v1/docs/ConversationsV1ConversationConversationParticipant.md @@ -1,20 +1,20 @@ # ConversationsV1ConversationConversationParticipant ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Attributes** | Pointer to **string** | -**ConversationSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**Identity** | Pointer to **string** | -**LastReadMessageIndex** | Pointer to **int32** | -**LastReadTimestamp** | Pointer to **string** | -**MessagingBinding** | Pointer to **map[string]interface{}** | -**RoleSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The unique ID of the Account responsible for this participant. | +**Attributes** | Pointer to **string** | An optional string metadata field you can use to store any data you wish. | +**ConversationSid** | Pointer to **string** | The unique ID of the Conversation for this participant. | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The date that this resource was created. | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The date that this resource was last updated. | +**Identity** | Pointer to **string** | A unique string identifier for the conversation participant as Conversation User. | +**LastReadMessageIndex** | Pointer to **int32** | Index of last “read” message in the Conversation for the Participant. | +**LastReadTimestamp** | Pointer to **string** | Timestamp of last “read” message in the Conversation for the Participant. | +**MessagingBinding** | Pointer to **map[string]interface{}** | Information about how this participant exchanges messages with the conversation. | +**RoleSid** | Pointer to **string** | The SID of a conversation-level Role to assign to the participant | +**Sid** | Pointer to **string** | A 34 character string that uniquely identifies this resource. | +**Url** | Pointer to **string** | An absolute URL for this participant. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/conversations/v1/docs/ConversationsV1ConversationConversationScopedWebhook.md b/twilio/rest/conversations/v1/docs/ConversationsV1ConversationConversationScopedWebhook.md index 4ea55b1ac..9050d56f6 100644 --- a/twilio/rest/conversations/v1/docs/ConversationsV1ConversationConversationScopedWebhook.md +++ b/twilio/rest/conversations/v1/docs/ConversationsV1ConversationConversationScopedWebhook.md @@ -1,16 +1,16 @@ # ConversationsV1ConversationConversationScopedWebhook ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Configuration** | Pointer to **map[string]interface{}** | -**ConversationSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**Sid** | Pointer to **string** | -**Target** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The unique ID of the Account responsible for this conversation. | +**Configuration** | Pointer to **map[string]interface{}** | The configuration of this webhook. | +**ConversationSid** | Pointer to **string** | The unique ID of the Conversation for this webhook. | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The date that this resource was created. | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The date that this resource was last updated. | +**Sid** | Pointer to **string** | A 34 character string that uniquely identifies this resource. | +**Target** | Pointer to **string** | The target of this webhook. | +**Url** | Pointer to **string** | An absolute URL for this webhook. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/conversations/v1/docs/ConversationsV1Credential.md b/twilio/rest/conversations/v1/docs/ConversationsV1Credential.md index 1ff05db29..c97efc659 100644 --- a/twilio/rest/conversations/v1/docs/ConversationsV1Credential.md +++ b/twilio/rest/conversations/v1/docs/ConversationsV1Credential.md @@ -1,16 +1,16 @@ # ConversationsV1Credential ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**FriendlyName** | Pointer to **string** | -**Sandbox** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Type** | Pointer to [**CredentialPushType**](credential_push_type.md) | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The unique ID of the Account responsible for this credential. | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The date that this resource was created. | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The date that this resource was last updated. | +**FriendlyName** | Pointer to **string** | The human-readable name of this credential. | +**Sandbox** | Pointer to **string** | [APN only] Whether to send the credential to sandbox APNs. | +**Sid** | Pointer to **string** | A 34 character string that uniquely identifies this resource. | +**Type** | Pointer to **string** | The type of push-notification service the credential is for. | +**Url** | Pointer to **string** | An absolute URL for this credential. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/conversations/v1/docs/ConversationsV1Role.md b/twilio/rest/conversations/v1/docs/ConversationsV1Role.md index eb506fbf3..2f899fb33 100644 --- a/twilio/rest/conversations/v1/docs/ConversationsV1Role.md +++ b/twilio/rest/conversations/v1/docs/ConversationsV1Role.md @@ -1,17 +1,17 @@ # ConversationsV1Role ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**ChatServiceSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**FriendlyName** | Pointer to **string** | -**Permissions** | Pointer to **[]string** | -**Sid** | Pointer to **string** | -**Type** | Pointer to [**RoleRoleType**](role_role_type.md) | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**ChatServiceSid** | Pointer to **string** | The SID of the Conversation Service that the resource is associated with | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was last updated | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the resource | +**Permissions** | Pointer to **[]string** | An array of the permissions the role has been granted | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Type** | Pointer to **string** | The type of role | +**Url** | Pointer to **string** | An absolute URL for this user role. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/conversations/v1/docs/ConversationsV1Service.md b/twilio/rest/conversations/v1/docs/ConversationsV1Service.md index 91d77e06d..8b91f8198 100644 --- a/twilio/rest/conversations/v1/docs/ConversationsV1Service.md +++ b/twilio/rest/conversations/v1/docs/ConversationsV1Service.md @@ -1,15 +1,15 @@ # ConversationsV1Service ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**FriendlyName** | Pointer to **string** | -**Links** | Pointer to **map[string]interface{}** | -**Sid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The unique ID of the Account responsible for this service. | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The date that this resource was created. | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The date that this resource was last updated. | +**FriendlyName** | Pointer to **string** | The human-readable name of this service. | +**Links** | Pointer to **map[string]interface{}** | Absolute URLs to access the conversations, users, roles, bindings and configuration of this service. | +**Sid** | Pointer to **string** | A 34 character string that uniquely identifies this resource. | +**Url** | Pointer to **string** | An absolute URL for this service. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/conversations/v1/docs/ConversationsV1ServiceServiceBinding.md b/twilio/rest/conversations/v1/docs/ConversationsV1ServiceServiceBinding.md index 4540ac7aa..0e1735764 100644 --- a/twilio/rest/conversations/v1/docs/ConversationsV1ServiceServiceBinding.md +++ b/twilio/rest/conversations/v1/docs/ConversationsV1ServiceServiceBinding.md @@ -1,19 +1,19 @@ # ConversationsV1ServiceServiceBinding ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**BindingType** | Pointer to [**ServiceBindingBindingType**](service_binding_binding_type.md) | -**ChatServiceSid** | Pointer to **string** | -**CredentialSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**Endpoint** | Pointer to **string** | -**Identity** | Pointer to **string** | -**MessageTypes** | Pointer to **[]string** | -**Sid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The unique ID of the Account responsible for this binding. | +**BindingType** | Pointer to **string** | The push technology to use for the binding. | +**ChatServiceSid** | Pointer to **string** | The SID of the Conversation Service that the resource is associated with. | +**CredentialSid** | Pointer to **string** | The SID of the Credential for the binding. | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The date that this resource was created. | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The date that this resource was last updated. | +**Endpoint** | Pointer to **string** | The unique endpoint identifier for the Binding. | +**Identity** | Pointer to **string** | The identity of Conversation User associated with this binding. | +**MessageTypes** | Pointer to **[]string** | The Conversation message types the binding is subscribed to. | +**Sid** | Pointer to **string** | A 34 character string that uniquely identifies this resource. | +**Url** | Pointer to **string** | An absolute URL for this binding. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/conversations/v1/docs/ConversationsV1ServiceServiceConfiguration.md b/twilio/rest/conversations/v1/docs/ConversationsV1ServiceServiceConfiguration.md index c12a024c5..c5d58570c 100644 --- a/twilio/rest/conversations/v1/docs/ConversationsV1ServiceServiceConfiguration.md +++ b/twilio/rest/conversations/v1/docs/ConversationsV1ServiceServiceConfiguration.md @@ -1,15 +1,15 @@ # ConversationsV1ServiceServiceConfiguration ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**ChatServiceSid** | Pointer to **string** | -**DefaultChatServiceRoleSid** | Pointer to **string** | -**DefaultConversationCreatorRoleSid** | Pointer to **string** | -**DefaultConversationRoleSid** | Pointer to **string** | -**Links** | Pointer to **map[string]interface{}** | -**ReachabilityEnabled** | Pointer to **bool** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ChatServiceSid** | Pointer to **string** | The unique string that identifies the resource | +**DefaultChatServiceRoleSid** | Pointer to **string** | The service role assigned to users when they are added to the service | +**DefaultConversationCreatorRoleSid** | Pointer to **string** | The role assigned to a conversation creator user when they join a new conversation | +**DefaultConversationRoleSid** | Pointer to **string** | The role assigned to users when they are added to a conversation | +**Links** | Pointer to **map[string]interface{}** | Absolute URL to access the push notifications configuration of this service. | +**ReachabilityEnabled** | Pointer to **bool** | Whether the Reachability Indicator feature is enabled for this Conversations Service | +**Url** | Pointer to **string** | An absolute URL for this service configuration. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/conversations/v1/docs/ConversationsV1ServiceServiceConfigurationServiceNotification.md b/twilio/rest/conversations/v1/docs/ConversationsV1ServiceServiceConfigurationServiceNotification.md index 33b218b00..a6f395877 100644 --- a/twilio/rest/conversations/v1/docs/ConversationsV1ServiceServiceConfigurationServiceNotification.md +++ b/twilio/rest/conversations/v1/docs/ConversationsV1ServiceServiceConfigurationServiceNotification.md @@ -1,15 +1,15 @@ # ConversationsV1ServiceServiceConfigurationServiceNotification ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**AddedToConversation** | Pointer to **map[string]interface{}** | -**ChatServiceSid** | Pointer to **string** | -**LogEnabled** | Pointer to **bool** | -**NewMessage** | Pointer to **map[string]interface{}** | -**RemovedFromConversation** | Pointer to **map[string]interface{}** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The unique ID of the Account responsible for this configuration. | +**AddedToConversation** | Pointer to **map[string]interface{}** | The Push Notification configuration for being added to a Conversation. | +**ChatServiceSid** | Pointer to **string** | The SID of the Conversation Service that the Configuration applies to. | +**LogEnabled** | Pointer to **bool** | Weather the notification logging is enabled. | +**NewMessage** | Pointer to **map[string]interface{}** | The Push Notification configuration for New Messages. | +**RemovedFromConversation** | Pointer to **map[string]interface{}** | The Push Notification configuration for being removed from a Conversation. | +**Url** | Pointer to **string** | An absolute URL for this configuration. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/conversations/v1/docs/ConversationsV1ServiceServiceConversation.md b/twilio/rest/conversations/v1/docs/ConversationsV1ServiceServiceConversation.md index e4f388602..5e77324e5 100644 --- a/twilio/rest/conversations/v1/docs/ConversationsV1ServiceServiceConversation.md +++ b/twilio/rest/conversations/v1/docs/ConversationsV1ServiceServiceConversation.md @@ -1,21 +1,21 @@ # ConversationsV1ServiceServiceConversation ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Attributes** | Pointer to **string** | -**ChatServiceSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**FriendlyName** | Pointer to **string** | -**Links** | Pointer to **map[string]interface{}** | -**MessagingServiceSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**State** | Pointer to [**ServiceConversationState**](service_conversation_state.md) | -**Timers** | Pointer to **map[string]interface{}** | -**UniqueName** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The unique ID of the Account responsible for this conversation. | +**Attributes** | Pointer to **string** | An optional string metadata field you can use to store any data you wish. | +**ChatServiceSid** | Pointer to **string** | The unique ID of the Conversation Service this conversation belongs to. | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The date that this resource was created. | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The date that this resource was last updated. | +**FriendlyName** | Pointer to **string** | The human-readable name of this conversation. | +**Links** | Pointer to **map[string]interface{}** | Absolute URLs to access the participants, messages and webhooks of this conversation. | +**MessagingServiceSid** | Pointer to **string** | The unique ID of the Messaging Service this conversation belongs to. | +**Sid** | Pointer to **string** | A 34 character string that uniquely identifies this resource. | +**State** | Pointer to **string** | Current state of this conversation. | +**Timers** | Pointer to **map[string]interface{}** | Timer date values for this conversation. | +**UniqueName** | Pointer to **string** | An application-defined string that uniquely identifies the resource | +**Url** | Pointer to **string** | An absolute URL for this conversation. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/conversations/v1/docs/ConversationsV1ServiceServiceConversationServiceConversationMessage.md b/twilio/rest/conversations/v1/docs/ConversationsV1ServiceServiceConversationServiceConversationMessage.md index b8bcc1a23..a44ad55f1 100644 --- a/twilio/rest/conversations/v1/docs/ConversationsV1ServiceServiceConversationServiceConversationMessage.md +++ b/twilio/rest/conversations/v1/docs/ConversationsV1ServiceServiceConversationServiceConversationMessage.md @@ -1,23 +1,23 @@ # ConversationsV1ServiceServiceConversationServiceConversationMessage ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Attributes** | Pointer to **string** | -**Author** | Pointer to **string** | -**Body** | Pointer to **string** | -**ChatServiceSid** | Pointer to **string** | -**ConversationSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**Delivery** | Pointer to **map[string]interface{}** | -**Index** | Pointer to **int32** | -**Links** | Pointer to **map[string]interface{}** | -**Media** | Pointer to **[]map[string]interface{}** | -**ParticipantSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The unique ID of the Account responsible for this message. | +**Attributes** | Pointer to **string** | A string metadata field you can use to store any data you wish. | +**Author** | Pointer to **string** | The channel specific identifier of the message's author. | +**Body** | Pointer to **string** | The content of the message. | +**ChatServiceSid** | Pointer to **string** | The SID of the Conversation Service that the resource is associated with. | +**ConversationSid** | Pointer to **string** | The unique ID of the Conversation for this message. | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The date that this resource was created. | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The date that this resource was last updated. | +**Delivery** | Pointer to **map[string]interface{}** | An object that contains the summary of delivery statuses for the message to non-chat participants. | +**Index** | Pointer to **int32** | The index of the message within the Conversation. | +**Links** | Pointer to **map[string]interface{}** | Absolute URL to access the receipts of this message. | +**Media** | Pointer to **[]map[string]interface{}** | An array of objects that describe the Message's media if attached, otherwise, null. | +**ParticipantSid** | Pointer to **string** | The unique ID of messages's author participant. | +**Sid** | Pointer to **string** | A 34 character string that uniquely identifies this resource. | +**Url** | Pointer to **string** | An absolute URL for this message. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/conversations/v1/docs/ConversationsV1ServiceServiceConversationServiceConversationMessageServiceConversationMessageReceipt.md b/twilio/rest/conversations/v1/docs/ConversationsV1ServiceServiceConversationServiceConversationMessageServiceConversationMessageReceipt.md index 9f8429352..d54ff5670 100644 --- a/twilio/rest/conversations/v1/docs/ConversationsV1ServiceServiceConversationServiceConversationMessageServiceConversationMessageReceipt.md +++ b/twilio/rest/conversations/v1/docs/ConversationsV1ServiceServiceConversationServiceConversationMessageServiceConversationMessageReceipt.md @@ -1,20 +1,20 @@ # ConversationsV1ServiceServiceConversationServiceConversationMessageServiceConversationMessageReceipt ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**ChannelMessageSid** | Pointer to **string** | -**ChatServiceSid** | Pointer to **string** | -**ConversationSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**ErrorCode** | Pointer to **int32** | -**MessageSid** | Pointer to **string** | -**ParticipantSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Status** | Pointer to [**ServiceConversationMessageReceiptDeliveryStatus**](service_conversation_message_receipt_delivery_status.md) | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The unique ID of the Account responsible for this participant. | +**ChannelMessageSid** | Pointer to **string** | A messaging channel-specific identifier for the message delivered to participant | +**ChatServiceSid** | Pointer to **string** | The SID of the Conversation Service that the resource is associated with. | +**ConversationSid** | Pointer to **string** | The unique ID of the Conversation for this message. | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The date that this resource was created. | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The date that this resource was last updated. | +**ErrorCode** | Pointer to **int32** | The message [delivery error code](https://www.twilio.com/docs/sms/api/message-resource#delivery-related-errors) for a `failed` status | +**MessageSid** | Pointer to **string** | The SID of the message the delivery receipt belongs to | +**ParticipantSid** | Pointer to **string** | The unique ID of the participant the delivery receipt belongs to. | +**Sid** | Pointer to **string** | A 34 character string that uniquely identifies this resource. | +**Status** | Pointer to **string** | The message delivery status | +**Url** | Pointer to **string** | An absolute URL for this delivery receipt. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/conversations/v1/docs/ConversationsV1ServiceServiceConversationServiceConversationParticipant.md b/twilio/rest/conversations/v1/docs/ConversationsV1ServiceServiceConversationServiceConversationParticipant.md index 0d86d6e29..3295715f2 100644 --- a/twilio/rest/conversations/v1/docs/ConversationsV1ServiceServiceConversationServiceConversationParticipant.md +++ b/twilio/rest/conversations/v1/docs/ConversationsV1ServiceServiceConversationServiceConversationParticipant.md @@ -1,21 +1,21 @@ # ConversationsV1ServiceServiceConversationServiceConversationParticipant ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Attributes** | Pointer to **string** | -**ChatServiceSid** | Pointer to **string** | -**ConversationSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**Identity** | Pointer to **string** | -**LastReadMessageIndex** | Pointer to **int32** | -**LastReadTimestamp** | Pointer to **string** | -**MessagingBinding** | Pointer to **map[string]interface{}** | -**RoleSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The unique ID of the Account responsible for this participant. | +**Attributes** | Pointer to **string** | An optional string metadata field you can use to store any data you wish. | +**ChatServiceSid** | Pointer to **string** | The SID of the Conversation Service that the resource is associated with. | +**ConversationSid** | Pointer to **string** | The unique ID of the Conversation for this participant. | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The date that this resource was created. | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The date that this resource was last updated. | +**Identity** | Pointer to **string** | A unique string identifier for the conversation participant as Conversation User. | +**LastReadMessageIndex** | Pointer to **int32** | Index of last “read” message in the Conversation for the Participant. | +**LastReadTimestamp** | Pointer to **string** | Timestamp of last “read” message in the Conversation for the Participant. | +**MessagingBinding** | Pointer to **map[string]interface{}** | Information about how this participant exchanges messages with the conversation. | +**RoleSid** | Pointer to **string** | The SID of a conversation-level Role to assign to the participant | +**Sid** | Pointer to **string** | A 34 character string that uniquely identifies this resource. | +**Url** | Pointer to **string** | An absolute URL for this participant. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/conversations/v1/docs/ConversationsV1ServiceServiceConversationServiceConversationScopedWebhook.md b/twilio/rest/conversations/v1/docs/ConversationsV1ServiceServiceConversationServiceConversationScopedWebhook.md index 2138d5df2..be387f7e0 100644 --- a/twilio/rest/conversations/v1/docs/ConversationsV1ServiceServiceConversationServiceConversationScopedWebhook.md +++ b/twilio/rest/conversations/v1/docs/ConversationsV1ServiceServiceConversationServiceConversationScopedWebhook.md @@ -1,17 +1,17 @@ # ConversationsV1ServiceServiceConversationServiceConversationScopedWebhook ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**ChatServiceSid** | Pointer to **string** | -**Configuration** | Pointer to **map[string]interface{}** | -**ConversationSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**Sid** | Pointer to **string** | -**Target** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The unique ID of the Account responsible for this conversation. | +**ChatServiceSid** | Pointer to **string** | The SID of the Conversation Service that the resource is associated with. | +**Configuration** | Pointer to **map[string]interface{}** | The configuration of this webhook. | +**ConversationSid** | Pointer to **string** | The unique ID of the Conversation for this webhook. | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The date that this resource was created. | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The date that this resource was last updated. | +**Sid** | Pointer to **string** | A 34 character string that uniquely identifies this resource. | +**Target** | Pointer to **string** | The target of this webhook. | +**Url** | Pointer to **string** | An absolute URL for this webhook. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/conversations/v1/docs/ConversationsV1ServiceServiceRole.md b/twilio/rest/conversations/v1/docs/ConversationsV1ServiceServiceRole.md index 991cfb206..e8489501e 100644 --- a/twilio/rest/conversations/v1/docs/ConversationsV1ServiceServiceRole.md +++ b/twilio/rest/conversations/v1/docs/ConversationsV1ServiceServiceRole.md @@ -1,17 +1,17 @@ # ConversationsV1ServiceServiceRole ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**ChatServiceSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**FriendlyName** | Pointer to **string** | -**Permissions** | Pointer to **[]string** | -**Sid** | Pointer to **string** | -**Type** | Pointer to [**ServiceRoleRoleType**](service_role_role_type.md) | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**ChatServiceSid** | Pointer to **string** | The SID of the Conversation Service that the resource is associated with | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was last updated | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the resource | +**Permissions** | Pointer to **[]string** | An array of the permissions the role has been granted | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Type** | Pointer to **string** | The type of role | +**Url** | Pointer to **string** | An absolute URL for this user role. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/conversations/v1/docs/ConversationsV1ServiceServiceUser.md b/twilio/rest/conversations/v1/docs/ConversationsV1ServiceServiceUser.md index 950357a82..66499cfce 100644 --- a/twilio/rest/conversations/v1/docs/ConversationsV1ServiceServiceUser.md +++ b/twilio/rest/conversations/v1/docs/ConversationsV1ServiceServiceUser.md @@ -1,20 +1,20 @@ # ConversationsV1ServiceServiceUser ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Attributes** | Pointer to **string** | -**ChatServiceSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**FriendlyName** | Pointer to **string** | -**Identity** | Pointer to **string** | -**IsNotifiable** | Pointer to **bool** | -**IsOnline** | Pointer to **bool** | -**RoleSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**Attributes** | Pointer to **string** | The JSON Object string that stores application-specific data | +**ChatServiceSid** | Pointer to **string** | The SID of the Conversation Service that the resource is associated with | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was last updated | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the resource | +**Identity** | Pointer to **string** | The string that identifies the resource's User | +**IsNotifiable** | Pointer to **bool** | Whether the User has a potentially valid Push Notification registration for this Conversations Service | +**IsOnline** | Pointer to **bool** | Whether the User is actively connected to this Conversations Service and online | +**RoleSid** | Pointer to **string** | The SID of a service-level Role assigned to the user | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Url** | Pointer to **string** | An absolute URL for this user. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/conversations/v1/docs/ConversationsV1User.md b/twilio/rest/conversations/v1/docs/ConversationsV1User.md index 76061dfa0..b3c396221 100644 --- a/twilio/rest/conversations/v1/docs/ConversationsV1User.md +++ b/twilio/rest/conversations/v1/docs/ConversationsV1User.md @@ -1,20 +1,20 @@ # ConversationsV1User ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Attributes** | Pointer to **string** | -**ChatServiceSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**FriendlyName** | Pointer to **string** | -**Identity** | Pointer to **string** | -**IsNotifiable** | Pointer to **bool** | -**IsOnline** | Pointer to **bool** | -**RoleSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**Attributes** | Pointer to **string** | The JSON Object string that stores application-specific data | +**ChatServiceSid** | Pointer to **string** | The SID of the Conversation Service that the resource is associated with | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was last updated | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the resource | +**Identity** | Pointer to **string** | The string that identifies the resource's User | +**IsNotifiable** | Pointer to **bool** | Whether the User has a potentially valid Push Notification registration for this Conversations Service | +**IsOnline** | Pointer to **bool** | Whether the User is actively connected to this Conversations Service and online | +**RoleSid** | Pointer to **string** | The SID of a service-level Role assigned to the user | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Url** | Pointer to **string** | An absolute URL for this user. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/conversations/v1/docs/ListConversationMessageReceiptResponse.md b/twilio/rest/conversations/v1/docs/ListConversationMessageReceiptResponse.md index a57b8f422..1351b87b5 100644 --- a/twilio/rest/conversations/v1/docs/ListConversationMessageReceiptResponse.md +++ b/twilio/rest/conversations/v1/docs/ListConversationMessageReceiptResponse.md @@ -1,10 +1,10 @@ # ListConversationMessageReceiptResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**DeliveryReceipts** | [**[]ConversationsV1ConversationConversationMessageConversationMessageReceipt**](conversations.v1.conversation.conversation_message.conversation_message_receipt.md) | [optional] -**Meta** | [**ListConversationResponseMeta**](ListConversationResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DeliveryReceipts** | [**[]ConversationsV1ConversationConversationMessageConversationMessageReceipt**](conversations.v1.conversation.conversation_message.conversation_message_receipt.md) | |[optional] +**Meta** | [**ListConversationResponseMeta**](ListConversationResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/conversations/v1/docs/ListConversationMessageResponse.md b/twilio/rest/conversations/v1/docs/ListConversationMessageResponse.md index 8e0be0217..b7373b0ff 100644 --- a/twilio/rest/conversations/v1/docs/ListConversationMessageResponse.md +++ b/twilio/rest/conversations/v1/docs/ListConversationMessageResponse.md @@ -1,10 +1,10 @@ # ListConversationMessageResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Messages** | [**[]ConversationsV1ConversationConversationMessage**](conversations.v1.conversation.conversation_message.md) | [optional] -**Meta** | [**ListConversationResponseMeta**](ListConversationResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Messages** | [**[]ConversationsV1ConversationConversationMessage**](conversations.v1.conversation.conversation_message.md) | |[optional] +**Meta** | [**ListConversationResponseMeta**](ListConversationResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/conversations/v1/docs/ListConversationParticipantResponse.md b/twilio/rest/conversations/v1/docs/ListConversationParticipantResponse.md index 98c9ab86b..d274c4760 100644 --- a/twilio/rest/conversations/v1/docs/ListConversationParticipantResponse.md +++ b/twilio/rest/conversations/v1/docs/ListConversationParticipantResponse.md @@ -1,10 +1,10 @@ # ListConversationParticipantResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListConversationResponseMeta**](ListConversationResponse_meta.md) | [optional] -**Participants** | [**[]ConversationsV1ConversationConversationParticipant**](conversations.v1.conversation.conversation_participant.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListConversationResponseMeta**](ListConversationResponse_meta.md) | |[optional] +**Participants** | [**[]ConversationsV1ConversationConversationParticipant**](conversations.v1.conversation.conversation_participant.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/conversations/v1/docs/ListConversationResponse.md b/twilio/rest/conversations/v1/docs/ListConversationResponse.md index 6676f9f03..f47e45f92 100644 --- a/twilio/rest/conversations/v1/docs/ListConversationResponse.md +++ b/twilio/rest/conversations/v1/docs/ListConversationResponse.md @@ -1,10 +1,10 @@ # ListConversationResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Conversations** | [**[]ConversationsV1Conversation**](conversations.v1.conversation.md) | [optional] -**Meta** | [**ListConversationResponseMeta**](ListConversationResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Conversations** | [**[]ConversationsV1Conversation**](conversations.v1.conversation.md) | |[optional] +**Meta** | [**ListConversationResponseMeta**](ListConversationResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/conversations/v1/docs/ListConversationResponseMeta.md b/twilio/rest/conversations/v1/docs/ListConversationResponseMeta.md index 88a20918d..935253750 100644 --- a/twilio/rest/conversations/v1/docs/ListConversationResponseMeta.md +++ b/twilio/rest/conversations/v1/docs/ListConversationResponseMeta.md @@ -1,15 +1,15 @@ # ListConversationResponseMeta ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**FirstPageUrl** | **string** | [optional] -**Key** | **string** | [optional] -**NextPageUrl** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUrl** | **string** | [optional] -**Url** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstPageUrl** | **string** | |[optional] +**Key** | **string** | |[optional] +**NextPageUrl** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUrl** | **string** | |[optional] +**Url** | **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/twilio/rest/conversations/v1/docs/ListConversationScopedWebhookResponse.md b/twilio/rest/conversations/v1/docs/ListConversationScopedWebhookResponse.md index c98b9f5e5..09d428300 100644 --- a/twilio/rest/conversations/v1/docs/ListConversationScopedWebhookResponse.md +++ b/twilio/rest/conversations/v1/docs/ListConversationScopedWebhookResponse.md @@ -1,10 +1,10 @@ # ListConversationScopedWebhookResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListConversationResponseMeta**](ListConversationResponse_meta.md) | [optional] -**Webhooks** | [**[]ConversationsV1ConversationConversationScopedWebhook**](conversations.v1.conversation.conversation_scoped_webhook.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListConversationResponseMeta**](ListConversationResponse_meta.md) | |[optional] +**Webhooks** | [**[]ConversationsV1ConversationConversationScopedWebhook**](conversations.v1.conversation.conversation_scoped_webhook.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/conversations/v1/docs/ListCredentialResponse.md b/twilio/rest/conversations/v1/docs/ListCredentialResponse.md index 4978f2a7f..0bdd26db9 100644 --- a/twilio/rest/conversations/v1/docs/ListCredentialResponse.md +++ b/twilio/rest/conversations/v1/docs/ListCredentialResponse.md @@ -1,10 +1,10 @@ # ListCredentialResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Credentials** | [**[]ConversationsV1Credential**](conversations.v1.credential.md) | [optional] -**Meta** | [**ListConversationResponseMeta**](ListConversationResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Credentials** | [**[]ConversationsV1Credential**](conversations.v1.credential.md) | |[optional] +**Meta** | [**ListConversationResponseMeta**](ListConversationResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/conversations/v1/docs/ListRoleResponse.md b/twilio/rest/conversations/v1/docs/ListRoleResponse.md index 70c4ce906..d7779a8f6 100644 --- a/twilio/rest/conversations/v1/docs/ListRoleResponse.md +++ b/twilio/rest/conversations/v1/docs/ListRoleResponse.md @@ -1,10 +1,10 @@ # ListRoleResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListConversationResponseMeta**](ListConversationResponse_meta.md) | [optional] -**Roles** | [**[]ConversationsV1Role**](conversations.v1.role.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListConversationResponseMeta**](ListConversationResponse_meta.md) | |[optional] +**Roles** | [**[]ConversationsV1Role**](conversations.v1.role.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/conversations/v1/docs/ListServiceBindingResponse.md b/twilio/rest/conversations/v1/docs/ListServiceBindingResponse.md index 54b8b2480..ce2beca97 100644 --- a/twilio/rest/conversations/v1/docs/ListServiceBindingResponse.md +++ b/twilio/rest/conversations/v1/docs/ListServiceBindingResponse.md @@ -1,10 +1,10 @@ # ListServiceBindingResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Bindings** | [**[]ConversationsV1ServiceServiceBinding**](conversations.v1.service.service_binding.md) | [optional] -**Meta** | [**ListConversationResponseMeta**](ListConversationResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Bindings** | [**[]ConversationsV1ServiceServiceBinding**](conversations.v1.service.service_binding.md) | |[optional] +**Meta** | [**ListConversationResponseMeta**](ListConversationResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/conversations/v1/docs/ListServiceConversationMessageReceiptResponse.md b/twilio/rest/conversations/v1/docs/ListServiceConversationMessageReceiptResponse.md index 76e8b2135..80bb4de5d 100644 --- a/twilio/rest/conversations/v1/docs/ListServiceConversationMessageReceiptResponse.md +++ b/twilio/rest/conversations/v1/docs/ListServiceConversationMessageReceiptResponse.md @@ -1,10 +1,10 @@ # ListServiceConversationMessageReceiptResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**DeliveryReceipts** | [**[]ConversationsV1ServiceServiceConversationServiceConversationMessageServiceConversationMessageReceipt**](conversations.v1.service.service_conversation.service_conversation_message.service_conversation_message_receipt.md) | [optional] -**Meta** | [**ListConversationResponseMeta**](ListConversationResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DeliveryReceipts** | [**[]ConversationsV1ServiceServiceConversationServiceConversationMessageServiceConversationMessageReceipt**](conversations.v1.service.service_conversation.service_conversation_message.service_conversation_message_receipt.md) | |[optional] +**Meta** | [**ListConversationResponseMeta**](ListConversationResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/conversations/v1/docs/ListServiceConversationMessageResponse.md b/twilio/rest/conversations/v1/docs/ListServiceConversationMessageResponse.md index b94d8e405..f963a24b4 100644 --- a/twilio/rest/conversations/v1/docs/ListServiceConversationMessageResponse.md +++ b/twilio/rest/conversations/v1/docs/ListServiceConversationMessageResponse.md @@ -1,10 +1,10 @@ # ListServiceConversationMessageResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Messages** | [**[]ConversationsV1ServiceServiceConversationServiceConversationMessage**](conversations.v1.service.service_conversation.service_conversation_message.md) | [optional] -**Meta** | [**ListConversationResponseMeta**](ListConversationResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Messages** | [**[]ConversationsV1ServiceServiceConversationServiceConversationMessage**](conversations.v1.service.service_conversation.service_conversation_message.md) | |[optional] +**Meta** | [**ListConversationResponseMeta**](ListConversationResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/conversations/v1/docs/ListServiceConversationParticipantResponse.md b/twilio/rest/conversations/v1/docs/ListServiceConversationParticipantResponse.md index b39556013..c11468bb6 100644 --- a/twilio/rest/conversations/v1/docs/ListServiceConversationParticipantResponse.md +++ b/twilio/rest/conversations/v1/docs/ListServiceConversationParticipantResponse.md @@ -1,10 +1,10 @@ # ListServiceConversationParticipantResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListConversationResponseMeta**](ListConversationResponse_meta.md) | [optional] -**Participants** | [**[]ConversationsV1ServiceServiceConversationServiceConversationParticipant**](conversations.v1.service.service_conversation.service_conversation_participant.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListConversationResponseMeta**](ListConversationResponse_meta.md) | |[optional] +**Participants** | [**[]ConversationsV1ServiceServiceConversationServiceConversationParticipant**](conversations.v1.service.service_conversation.service_conversation_participant.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/conversations/v1/docs/ListServiceConversationResponse.md b/twilio/rest/conversations/v1/docs/ListServiceConversationResponse.md index d94b223d3..fb99c3c5b 100644 --- a/twilio/rest/conversations/v1/docs/ListServiceConversationResponse.md +++ b/twilio/rest/conversations/v1/docs/ListServiceConversationResponse.md @@ -1,10 +1,10 @@ # ListServiceConversationResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Conversations** | [**[]ConversationsV1ServiceServiceConversation**](conversations.v1.service.service_conversation.md) | [optional] -**Meta** | [**ListConversationResponseMeta**](ListConversationResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Conversations** | [**[]ConversationsV1ServiceServiceConversation**](conversations.v1.service.service_conversation.md) | |[optional] +**Meta** | [**ListConversationResponseMeta**](ListConversationResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/conversations/v1/docs/ListServiceConversationScopedWebhookResponse.md b/twilio/rest/conversations/v1/docs/ListServiceConversationScopedWebhookResponse.md index a421df04f..0f9933241 100644 --- a/twilio/rest/conversations/v1/docs/ListServiceConversationScopedWebhookResponse.md +++ b/twilio/rest/conversations/v1/docs/ListServiceConversationScopedWebhookResponse.md @@ -1,10 +1,10 @@ # ListServiceConversationScopedWebhookResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListConversationResponseMeta**](ListConversationResponse_meta.md) | [optional] -**Webhooks** | [**[]ConversationsV1ServiceServiceConversationServiceConversationScopedWebhook**](conversations.v1.service.service_conversation.service_conversation_scoped_webhook.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListConversationResponseMeta**](ListConversationResponse_meta.md) | |[optional] +**Webhooks** | [**[]ConversationsV1ServiceServiceConversationServiceConversationScopedWebhook**](conversations.v1.service.service_conversation.service_conversation_scoped_webhook.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/conversations/v1/docs/ListServiceResponse.md b/twilio/rest/conversations/v1/docs/ListServiceResponse.md index 1e37655f8..c015271fd 100644 --- a/twilio/rest/conversations/v1/docs/ListServiceResponse.md +++ b/twilio/rest/conversations/v1/docs/ListServiceResponse.md @@ -1,10 +1,10 @@ # ListServiceResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListConversationResponseMeta**](ListConversationResponse_meta.md) | [optional] -**Services** | [**[]ConversationsV1Service**](conversations.v1.service.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListConversationResponseMeta**](ListConversationResponse_meta.md) | |[optional] +**Services** | [**[]ConversationsV1Service**](conversations.v1.service.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/conversations/v1/docs/ListServiceRoleResponse.md b/twilio/rest/conversations/v1/docs/ListServiceRoleResponse.md index 1bd65ab03..2bf6ccbf6 100644 --- a/twilio/rest/conversations/v1/docs/ListServiceRoleResponse.md +++ b/twilio/rest/conversations/v1/docs/ListServiceRoleResponse.md @@ -1,10 +1,10 @@ # ListServiceRoleResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListConversationResponseMeta**](ListConversationResponse_meta.md) | [optional] -**Roles** | [**[]ConversationsV1ServiceServiceRole**](conversations.v1.service.service_role.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListConversationResponseMeta**](ListConversationResponse_meta.md) | |[optional] +**Roles** | [**[]ConversationsV1ServiceServiceRole**](conversations.v1.service.service_role.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/conversations/v1/docs/ListServiceUserResponse.md b/twilio/rest/conversations/v1/docs/ListServiceUserResponse.md index fb6ddbdf7..e422265cf 100644 --- a/twilio/rest/conversations/v1/docs/ListServiceUserResponse.md +++ b/twilio/rest/conversations/v1/docs/ListServiceUserResponse.md @@ -1,10 +1,10 @@ # ListServiceUserResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListConversationResponseMeta**](ListConversationResponse_meta.md) | [optional] -**Users** | [**[]ConversationsV1ServiceServiceUser**](conversations.v1.service.service_user.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListConversationResponseMeta**](ListConversationResponse_meta.md) | |[optional] +**Users** | [**[]ConversationsV1ServiceServiceUser**](conversations.v1.service.service_user.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/conversations/v1/docs/ListUserResponse.md b/twilio/rest/conversations/v1/docs/ListUserResponse.md index 8e3c0d947..f8a2975c1 100644 --- a/twilio/rest/conversations/v1/docs/ListUserResponse.md +++ b/twilio/rest/conversations/v1/docs/ListUserResponse.md @@ -1,10 +1,10 @@ # ListUserResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListConversationResponseMeta**](ListConversationResponse_meta.md) | [optional] -**Users** | [**[]ConversationsV1User**](conversations.v1.user.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListConversationResponseMeta**](ListConversationResponse_meta.md) | |[optional] +**Users** | [**[]ConversationsV1User**](conversations.v1.user.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/conversations/v1/model_conversations_v1_configuration.go b/twilio/rest/conversations/v1/model_conversations_v1_configuration.go index bf212ce6c..aa34120b8 100644 --- a/twilio/rest/conversations/v1/model_conversations_v1_configuration.go +++ b/twilio/rest/conversations/v1/model_conversations_v1_configuration.go @@ -13,11 +13,18 @@ package openapi // ConversationsV1Configuration struct for ConversationsV1Configuration type ConversationsV1Configuration struct { - AccountSid *string `json:"AccountSid,omitempty"` - DefaultChatServiceSid *string `json:"DefaultChatServiceSid,omitempty"` - DefaultClosedTimer *string `json:"DefaultClosedTimer,omitempty"` - DefaultInactiveTimer *string `json:"DefaultInactiveTimer,omitempty"` - DefaultMessagingServiceSid *string `json:"DefaultMessagingServiceSid,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account responsible for this configuration. + AccountSid *string `json:"AccountSid,omitempty"` + // The SID of the default Conversation Service that every new conversation is associated with. + DefaultChatServiceSid *string `json:"DefaultChatServiceSid,omitempty"` + // Default ISO8601 duration when conversation will be switched to `closed` state. + DefaultClosedTimer *string `json:"DefaultClosedTimer,omitempty"` + // Default ISO8601 duration when conversation will be switched to `inactive` state. + DefaultInactiveTimer *string `json:"DefaultInactiveTimer,omitempty"` + // The SID of the default Messaging Service that every new conversation is associated with. + DefaultMessagingServiceSid *string `json:"DefaultMessagingServiceSid,omitempty"` + // Absolute URLs to access the webhook and default service configurations. + Links *map[string]interface{} `json:"Links,omitempty"` + // An absolute URL for this global configuration. + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/conversations/v1/model_conversations_v1_configuration_configuration_webhook.go b/twilio/rest/conversations/v1/model_conversations_v1_configuration_configuration_webhook.go index a5391cf2a..e912125e2 100644 --- a/twilio/rest/conversations/v1/model_conversations_v1_configuration_configuration_webhook.go +++ b/twilio/rest/conversations/v1/model_conversations_v1_configuration_configuration_webhook.go @@ -13,11 +13,18 @@ package openapi // ConversationsV1ConfigurationConfigurationWebhook struct for ConversationsV1ConfigurationConfigurationWebhook type ConversationsV1ConfigurationConfigurationWebhook struct { - AccountSid *string `json:"AccountSid,omitempty"` - Filters *[]string `json:"Filters,omitempty"` - Method *ConfigurationWebhookMethod `json:"Method,omitempty"` - PostWebhookUrl *string `json:"PostWebhookUrl,omitempty"` - PreWebhookUrl *string `json:"PreWebhookUrl,omitempty"` - Target *ConfigurationWebhookTarget `json:"Target,omitempty"` - Url *string `json:"Url,omitempty"` + // The unique ID of the Account responsible for this conversation. + AccountSid *string `json:"AccountSid,omitempty"` + // The list of webhook event triggers that are enabled for this Service. + Filters *[]string `json:"Filters,omitempty"` + // The HTTP method to be used when sending a webhook request. + Method *string `json:"Method,omitempty"` + // The absolute url the post-event webhook request should be sent to. + PostWebhookUrl *string `json:"PostWebhookUrl,omitempty"` + // The absolute url the pre-event webhook request should be sent to. + PreWebhookUrl *string `json:"PreWebhookUrl,omitempty"` + // The routing target of the webhook. + Target *string `json:"Target,omitempty"` + // An absolute URL for this webhook. + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/conversations/v1/model_conversations_v1_conversation.go b/twilio/rest/conversations/v1/model_conversations_v1_conversation.go index 8e6ac5610..1672ff665 100644 --- a/twilio/rest/conversations/v1/model_conversations_v1_conversation.go +++ b/twilio/rest/conversations/v1/model_conversations_v1_conversation.go @@ -17,17 +17,30 @@ import ( // ConversationsV1Conversation struct for ConversationsV1Conversation type ConversationsV1Conversation struct { - AccountSid *string `json:"AccountSid,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - ChatServiceSid *string `json:"ChatServiceSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - MessagingServiceSid *string `json:"MessagingServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - State *ConversationState `json:"State,omitempty"` - Timers *map[string]interface{} `json:"Timers,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` - Url *string `json:"Url,omitempty"` + // The unique ID of the Account responsible for this conversation. + AccountSid *string `json:"AccountSid,omitempty"` + // An optional string metadata field you can use to store any data you wish. + Attributes *string `json:"Attributes,omitempty"` + // The unique ID of the Conversation Service this conversation belongs to. + ChatServiceSid *string `json:"ChatServiceSid,omitempty"` + // The date that this resource was created. + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The date that this resource was last updated. + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The human-readable name of this conversation. + FriendlyName *string `json:"FriendlyName,omitempty"` + // Absolute URLs to access the participants, messages and webhooks of this conversation. + Links *map[string]interface{} `json:"Links,omitempty"` + // The unique ID of the Messaging Service this conversation belongs to. + MessagingServiceSid *string `json:"MessagingServiceSid,omitempty"` + // A 34 character string that uniquely identifies this resource. + Sid *string `json:"Sid,omitempty"` + // Current state of this conversation. + State *string `json:"State,omitempty"` + // Timer date values for this conversation. + Timers *map[string]interface{} `json:"Timers,omitempty"` + // An application-defined string that uniquely identifies the resource + UniqueName *string `json:"UniqueName,omitempty"` + // An absolute URL for this conversation. + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/conversations/v1/model_conversations_v1_conversation_conversation_message.go b/twilio/rest/conversations/v1/model_conversations_v1_conversation_conversation_message.go index 0f64adc91..faf0b770d 100644 --- a/twilio/rest/conversations/v1/model_conversations_v1_conversation_conversation_message.go +++ b/twilio/rest/conversations/v1/model_conversations_v1_conversation_conversation_message.go @@ -17,18 +17,32 @@ import ( // ConversationsV1ConversationConversationMessage struct for ConversationsV1ConversationConversationMessage type ConversationsV1ConversationConversationMessage struct { - AccountSid *string `json:"AccountSid,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - Author *string `json:"Author,omitempty"` - Body *string `json:"Body,omitempty"` - ConversationSid *string `json:"ConversationSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Delivery *map[string]interface{} `json:"Delivery,omitempty"` - Index *int32 `json:"Index,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - Media *[]map[string]interface{} `json:"Media,omitempty"` - ParticipantSid *string `json:"ParticipantSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` + // The unique ID of the Account responsible for this message. + AccountSid *string `json:"AccountSid,omitempty"` + // A string metadata field you can use to store any data you wish. + Attributes *string `json:"Attributes,omitempty"` + // The channel specific identifier of the message's author. + Author *string `json:"Author,omitempty"` + // The content of the message. + Body *string `json:"Body,omitempty"` + // The unique ID of the Conversation for this message. + ConversationSid *string `json:"ConversationSid,omitempty"` + // The date that this resource was created. + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The date that this resource was last updated. + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // An object that contains the summary of delivery statuses for the message to non-chat participants. + Delivery *map[string]interface{} `json:"Delivery,omitempty"` + // The index of the message within the Conversation. + Index *int32 `json:"Index,omitempty"` + // Absolute URL to access the receipts of this message. + Links *map[string]interface{} `json:"Links,omitempty"` + // An array of objects that describe the Message's media if attached, otherwise, null. + Media *[]map[string]interface{} `json:"Media,omitempty"` + // The unique ID of messages's author participant. + ParticipantSid *string `json:"ParticipantSid,omitempty"` + // A 34 character string that uniquely identifies this resource. + Sid *string `json:"Sid,omitempty"` + // An absolute API URL for this message. + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/conversations/v1/model_conversations_v1_conversation_conversation_message_conversation_message_receipt.go b/twilio/rest/conversations/v1/model_conversations_v1_conversation_conversation_message_conversation_message_receipt.go index 8d9e5fad1..e938c6db1 100644 --- a/twilio/rest/conversations/v1/model_conversations_v1_conversation_conversation_message_conversation_message_receipt.go +++ b/twilio/rest/conversations/v1/model_conversations_v1_conversation_conversation_message_conversation_message_receipt.go @@ -17,15 +17,26 @@ import ( // ConversationsV1ConversationConversationMessageConversationMessageReceipt struct for ConversationsV1ConversationConversationMessageConversationMessageReceipt type ConversationsV1ConversationConversationMessageConversationMessageReceipt struct { - AccountSid *string `json:"AccountSid,omitempty"` - ChannelMessageSid *string `json:"ChannelMessageSid,omitempty"` - ConversationSid *string `json:"ConversationSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - ErrorCode *int32 `json:"ErrorCode,omitempty"` - MessageSid *string `json:"MessageSid,omitempty"` - ParticipantSid *string `json:"ParticipantSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Status *ConversationMessageReceiptDeliveryStatus `json:"Status,omitempty"` - Url *string `json:"Url,omitempty"` + // The unique ID of the Account responsible for this participant. + AccountSid *string `json:"AccountSid,omitempty"` + // A messaging channel-specific identifier for the message delivered to participant + ChannelMessageSid *string `json:"ChannelMessageSid,omitempty"` + // The unique ID of the Conversation for this message. + ConversationSid *string `json:"ConversationSid,omitempty"` + // The date that this resource was created. + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The date that this resource was last updated. + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The message [delivery error code](https://www.twilio.com/docs/sms/api/message-resource#delivery-related-errors) for a `failed` status + ErrorCode *int32 `json:"ErrorCode,omitempty"` + // The SID of the message the delivery receipt belongs to + MessageSid *string `json:"MessageSid,omitempty"` + // The unique ID of the participant the delivery receipt belongs to. + ParticipantSid *string `json:"ParticipantSid,omitempty"` + // A 34 character string that uniquely identifies this resource. + Sid *string `json:"Sid,omitempty"` + // The message delivery status + Status *string `json:"Status,omitempty"` + // An absolute URL for this delivery receipt. + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/conversations/v1/model_conversations_v1_conversation_conversation_participant.go b/twilio/rest/conversations/v1/model_conversations_v1_conversation_conversation_participant.go index ea11b6f1a..329811ff7 100644 --- a/twilio/rest/conversations/v1/model_conversations_v1_conversation_conversation_participant.go +++ b/twilio/rest/conversations/v1/model_conversations_v1_conversation_conversation_participant.go @@ -17,16 +17,28 @@ import ( // ConversationsV1ConversationConversationParticipant struct for ConversationsV1ConversationConversationParticipant type ConversationsV1ConversationConversationParticipant struct { - AccountSid *string `json:"AccountSid,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - ConversationSid *string `json:"ConversationSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Identity *string `json:"Identity,omitempty"` - LastReadMessageIndex *int32 `json:"LastReadMessageIndex,omitempty"` - LastReadTimestamp *string `json:"LastReadTimestamp,omitempty"` - MessagingBinding *map[string]interface{} `json:"MessagingBinding,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` + // The unique ID of the Account responsible for this participant. + AccountSid *string `json:"AccountSid,omitempty"` + // An optional string metadata field you can use to store any data you wish. + Attributes *string `json:"Attributes,omitempty"` + // The unique ID of the Conversation for this participant. + ConversationSid *string `json:"ConversationSid,omitempty"` + // The date that this resource was created. + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The date that this resource was last updated. + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // A unique string identifier for the conversation participant as Conversation User. + Identity *string `json:"Identity,omitempty"` + // Index of last “read” message in the Conversation for the Participant. + LastReadMessageIndex *int32 `json:"LastReadMessageIndex,omitempty"` + // Timestamp of last “read” message in the Conversation for the Participant. + LastReadTimestamp *string `json:"LastReadTimestamp,omitempty"` + // Information about how this participant exchanges messages with the conversation. + MessagingBinding *map[string]interface{} `json:"MessagingBinding,omitempty"` + // The SID of a conversation-level Role to assign to the participant + RoleSid *string `json:"RoleSid,omitempty"` + // A 34 character string that uniquely identifies this resource. + Sid *string `json:"Sid,omitempty"` + // An absolute URL for this participant. + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/conversations/v1/model_conversations_v1_conversation_conversation_scoped_webhook.go b/twilio/rest/conversations/v1/model_conversations_v1_conversation_conversation_scoped_webhook.go index 53076bc4d..29c79f140 100644 --- a/twilio/rest/conversations/v1/model_conversations_v1_conversation_conversation_scoped_webhook.go +++ b/twilio/rest/conversations/v1/model_conversations_v1_conversation_conversation_scoped_webhook.go @@ -17,12 +17,20 @@ import ( // ConversationsV1ConversationConversationScopedWebhook struct for ConversationsV1ConversationConversationScopedWebhook type ConversationsV1ConversationConversationScopedWebhook struct { - AccountSid *string `json:"AccountSid,omitempty"` - Configuration *map[string]interface{} `json:"Configuration,omitempty"` - ConversationSid *string `json:"ConversationSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Sid *string `json:"Sid,omitempty"` - Target *string `json:"Target,omitempty"` - Url *string `json:"Url,omitempty"` + // The unique ID of the Account responsible for this conversation. + AccountSid *string `json:"AccountSid,omitempty"` + // The configuration of this webhook. + Configuration *map[string]interface{} `json:"Configuration,omitempty"` + // The unique ID of the Conversation for this webhook. + ConversationSid *string `json:"ConversationSid,omitempty"` + // The date that this resource was created. + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The date that this resource was last updated. + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // A 34 character string that uniquely identifies this resource. + Sid *string `json:"Sid,omitempty"` + // The target of this webhook. + Target *string `json:"Target,omitempty"` + // An absolute URL for this webhook. + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/conversations/v1/model_conversations_v1_credential.go b/twilio/rest/conversations/v1/model_conversations_v1_credential.go index 44af5598f..d4b50aae4 100644 --- a/twilio/rest/conversations/v1/model_conversations_v1_credential.go +++ b/twilio/rest/conversations/v1/model_conversations_v1_credential.go @@ -17,12 +17,20 @@ import ( // ConversationsV1Credential struct for ConversationsV1Credential type ConversationsV1Credential struct { - AccountSid *string `json:"AccountSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Sandbox *string `json:"Sandbox,omitempty"` - Sid *string `json:"Sid,omitempty"` - Type *CredentialPushType `json:"Type,omitempty"` - Url *string `json:"Url,omitempty"` + // The unique ID of the Account responsible for this credential. + AccountSid *string `json:"AccountSid,omitempty"` + // The date that this resource was created. + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The date that this resource was last updated. + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The human-readable name of this credential. + FriendlyName *string `json:"FriendlyName,omitempty"` + // [APN only] Whether to send the credential to sandbox APNs. + Sandbox *string `json:"Sandbox,omitempty"` + // A 34 character string that uniquely identifies this resource. + Sid *string `json:"Sid,omitempty"` + // The type of push-notification service the credential is for. + Type *string `json:"Type,omitempty"` + // An absolute URL for this credential. + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/conversations/v1/model_conversations_v1_role.go b/twilio/rest/conversations/v1/model_conversations_v1_role.go index 5914461a4..45273ca81 100644 --- a/twilio/rest/conversations/v1/model_conversations_v1_role.go +++ b/twilio/rest/conversations/v1/model_conversations_v1_role.go @@ -17,13 +17,22 @@ import ( // ConversationsV1Role struct for ConversationsV1Role type ConversationsV1Role struct { - AccountSid *string `json:"AccountSid,omitempty"` - ChatServiceSid *string `json:"ChatServiceSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Permissions *[]string `json:"Permissions,omitempty"` - Sid *string `json:"Sid,omitempty"` - Type *RoleRoleType `json:"Type,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The SID of the Conversation Service that the resource is associated with + ChatServiceSid *string `json:"ChatServiceSid,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The string that you assigned to describe the resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // An array of the permissions the role has been granted + Permissions *[]string `json:"Permissions,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The type of role + Type *string `json:"Type,omitempty"` + // An absolute URL for this user role. + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/conversations/v1/model_conversations_v1_service.go b/twilio/rest/conversations/v1/model_conversations_v1_service.go index 5abb65598..8c507161e 100644 --- a/twilio/rest/conversations/v1/model_conversations_v1_service.go +++ b/twilio/rest/conversations/v1/model_conversations_v1_service.go @@ -17,11 +17,18 @@ import ( // ConversationsV1Service struct for ConversationsV1Service type ConversationsV1Service struct { - AccountSid *string `json:"AccountSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` + // The unique ID of the Account responsible for this service. + AccountSid *string `json:"AccountSid,omitempty"` + // The date that this resource was created. + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The date that this resource was last updated. + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The human-readable name of this service. + FriendlyName *string `json:"FriendlyName,omitempty"` + // Absolute URLs to access the conversations, users, roles, bindings and configuration of this service. + Links *map[string]interface{} `json:"Links,omitempty"` + // A 34 character string that uniquely identifies this resource. + Sid *string `json:"Sid,omitempty"` + // An absolute URL for this service. + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/conversations/v1/model_conversations_v1_service_service_binding.go b/twilio/rest/conversations/v1/model_conversations_v1_service_service_binding.go index 239f95f7b..b7614c707 100644 --- a/twilio/rest/conversations/v1/model_conversations_v1_service_service_binding.go +++ b/twilio/rest/conversations/v1/model_conversations_v1_service_service_binding.go @@ -17,15 +17,26 @@ import ( // ConversationsV1ServiceServiceBinding struct for ConversationsV1ServiceServiceBinding type ConversationsV1ServiceServiceBinding struct { - AccountSid *string `json:"AccountSid,omitempty"` - BindingType *ServiceBindingBindingType `json:"BindingType,omitempty"` - ChatServiceSid *string `json:"ChatServiceSid,omitempty"` - CredentialSid *string `json:"CredentialSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Endpoint *string `json:"Endpoint,omitempty"` - Identity *string `json:"Identity,omitempty"` - MessageTypes *[]string `json:"MessageTypes,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` + // The unique ID of the Account responsible for this binding. + AccountSid *string `json:"AccountSid,omitempty"` + // The push technology to use for the binding. + BindingType *string `json:"BindingType,omitempty"` + // The SID of the Conversation Service that the resource is associated with. + ChatServiceSid *string `json:"ChatServiceSid,omitempty"` + // The SID of the Credential for the binding. + CredentialSid *string `json:"CredentialSid,omitempty"` + // The date that this resource was created. + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The date that this resource was last updated. + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The unique endpoint identifier for the Binding. + Endpoint *string `json:"Endpoint,omitempty"` + // The identity of Conversation User associated with this binding. + Identity *string `json:"Identity,omitempty"` + // The Conversation message types the binding is subscribed to. + MessageTypes *[]string `json:"MessageTypes,omitempty"` + // A 34 character string that uniquely identifies this resource. + Sid *string `json:"Sid,omitempty"` + // An absolute URL for this binding. + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/conversations/v1/model_conversations_v1_service_service_configuration.go b/twilio/rest/conversations/v1/model_conversations_v1_service_service_configuration.go index 954c33c80..840672011 100644 --- a/twilio/rest/conversations/v1/model_conversations_v1_service_service_configuration.go +++ b/twilio/rest/conversations/v1/model_conversations_v1_service_service_configuration.go @@ -13,11 +13,18 @@ package openapi // ConversationsV1ServiceServiceConfiguration struct for ConversationsV1ServiceServiceConfiguration type ConversationsV1ServiceServiceConfiguration struct { - ChatServiceSid *string `json:"ChatServiceSid,omitempty"` - DefaultChatServiceRoleSid *string `json:"DefaultChatServiceRoleSid,omitempty"` - DefaultConversationCreatorRoleSid *string `json:"DefaultConversationCreatorRoleSid,omitempty"` - DefaultConversationRoleSid *string `json:"DefaultConversationRoleSid,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - ReachabilityEnabled *bool `json:"ReachabilityEnabled,omitempty"` - Url *string `json:"Url,omitempty"` + // The unique string that identifies the resource + ChatServiceSid *string `json:"ChatServiceSid,omitempty"` + // The service role assigned to users when they are added to the service + DefaultChatServiceRoleSid *string `json:"DefaultChatServiceRoleSid,omitempty"` + // The role assigned to a conversation creator user when they join a new conversation + DefaultConversationCreatorRoleSid *string `json:"DefaultConversationCreatorRoleSid,omitempty"` + // The role assigned to users when they are added to a conversation + DefaultConversationRoleSid *string `json:"DefaultConversationRoleSid,omitempty"` + // Absolute URL to access the push notifications configuration of this service. + Links *map[string]interface{} `json:"Links,omitempty"` + // Whether the Reachability Indicator feature is enabled for this Conversations Service + ReachabilityEnabled *bool `json:"ReachabilityEnabled,omitempty"` + // An absolute URL for this service configuration. + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/conversations/v1/model_conversations_v1_service_service_configuration_service_notification.go b/twilio/rest/conversations/v1/model_conversations_v1_service_service_configuration_service_notification.go index 5b31e6e65..cbad1d98b 100644 --- a/twilio/rest/conversations/v1/model_conversations_v1_service_service_configuration_service_notification.go +++ b/twilio/rest/conversations/v1/model_conversations_v1_service_service_configuration_service_notification.go @@ -13,11 +13,18 @@ package openapi // ConversationsV1ServiceServiceConfigurationServiceNotification struct for ConversationsV1ServiceServiceConfigurationServiceNotification type ConversationsV1ServiceServiceConfigurationServiceNotification struct { - AccountSid *string `json:"AccountSid,omitempty"` - AddedToConversation *map[string]interface{} `json:"AddedToConversation,omitempty"` - ChatServiceSid *string `json:"ChatServiceSid,omitempty"` - LogEnabled *bool `json:"LogEnabled,omitempty"` - NewMessage *map[string]interface{} `json:"NewMessage,omitempty"` + // The unique ID of the Account responsible for this configuration. + AccountSid *string `json:"AccountSid,omitempty"` + // The Push Notification configuration for being added to a Conversation. + AddedToConversation *map[string]interface{} `json:"AddedToConversation,omitempty"` + // The SID of the Conversation Service that the Configuration applies to. + ChatServiceSid *string `json:"ChatServiceSid,omitempty"` + // Weather the notification logging is enabled. + LogEnabled *bool `json:"LogEnabled,omitempty"` + // The Push Notification configuration for New Messages. + NewMessage *map[string]interface{} `json:"NewMessage,omitempty"` + // The Push Notification configuration for being removed from a Conversation. RemovedFromConversation *map[string]interface{} `json:"RemovedFromConversation,omitempty"` - Url *string `json:"Url,omitempty"` + // An absolute URL for this configuration. + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/conversations/v1/model_conversations_v1_service_service_conversation.go b/twilio/rest/conversations/v1/model_conversations_v1_service_service_conversation.go index a8d9ea966..31311dd22 100644 --- a/twilio/rest/conversations/v1/model_conversations_v1_service_service_conversation.go +++ b/twilio/rest/conversations/v1/model_conversations_v1_service_service_conversation.go @@ -17,17 +17,30 @@ import ( // ConversationsV1ServiceServiceConversation struct for ConversationsV1ServiceServiceConversation type ConversationsV1ServiceServiceConversation struct { - AccountSid *string `json:"AccountSid,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - ChatServiceSid *string `json:"ChatServiceSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - MessagingServiceSid *string `json:"MessagingServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - State *ServiceConversationState `json:"State,omitempty"` - Timers *map[string]interface{} `json:"Timers,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` - Url *string `json:"Url,omitempty"` + // The unique ID of the Account responsible for this conversation. + AccountSid *string `json:"AccountSid,omitempty"` + // An optional string metadata field you can use to store any data you wish. + Attributes *string `json:"Attributes,omitempty"` + // The unique ID of the Conversation Service this conversation belongs to. + ChatServiceSid *string `json:"ChatServiceSid,omitempty"` + // The date that this resource was created. + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The date that this resource was last updated. + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The human-readable name of this conversation. + FriendlyName *string `json:"FriendlyName,omitempty"` + // Absolute URLs to access the participants, messages and webhooks of this conversation. + Links *map[string]interface{} `json:"Links,omitempty"` + // The unique ID of the Messaging Service this conversation belongs to. + MessagingServiceSid *string `json:"MessagingServiceSid,omitempty"` + // A 34 character string that uniquely identifies this resource. + Sid *string `json:"Sid,omitempty"` + // Current state of this conversation. + State *string `json:"State,omitempty"` + // Timer date values for this conversation. + Timers *map[string]interface{} `json:"Timers,omitempty"` + // An application-defined string that uniquely identifies the resource + UniqueName *string `json:"UniqueName,omitempty"` + // An absolute URL for this conversation. + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/conversations/v1/model_conversations_v1_service_service_conversation_service_conversation_message.go b/twilio/rest/conversations/v1/model_conversations_v1_service_service_conversation_service_conversation_message.go index f1e8b6d6d..4092f5a09 100644 --- a/twilio/rest/conversations/v1/model_conversations_v1_service_service_conversation_service_conversation_message.go +++ b/twilio/rest/conversations/v1/model_conversations_v1_service_service_conversation_service_conversation_message.go @@ -17,19 +17,34 @@ import ( // ConversationsV1ServiceServiceConversationServiceConversationMessage struct for ConversationsV1ServiceServiceConversationServiceConversationMessage type ConversationsV1ServiceServiceConversationServiceConversationMessage struct { - AccountSid *string `json:"AccountSid,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - Author *string `json:"Author,omitempty"` - Body *string `json:"Body,omitempty"` - ChatServiceSid *string `json:"ChatServiceSid,omitempty"` - ConversationSid *string `json:"ConversationSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Delivery *map[string]interface{} `json:"Delivery,omitempty"` - Index *int32 `json:"Index,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - Media *[]map[string]interface{} `json:"Media,omitempty"` - ParticipantSid *string `json:"ParticipantSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` + // The unique ID of the Account responsible for this message. + AccountSid *string `json:"AccountSid,omitempty"` + // A string metadata field you can use to store any data you wish. + Attributes *string `json:"Attributes,omitempty"` + // The channel specific identifier of the message's author. + Author *string `json:"Author,omitempty"` + // The content of the message. + Body *string `json:"Body,omitempty"` + // The SID of the Conversation Service that the resource is associated with. + ChatServiceSid *string `json:"ChatServiceSid,omitempty"` + // The unique ID of the Conversation for this message. + ConversationSid *string `json:"ConversationSid,omitempty"` + // The date that this resource was created. + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The date that this resource was last updated. + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // An object that contains the summary of delivery statuses for the message to non-chat participants. + Delivery *map[string]interface{} `json:"Delivery,omitempty"` + // The index of the message within the Conversation. + Index *int32 `json:"Index,omitempty"` + // Absolute URL to access the receipts of this message. + Links *map[string]interface{} `json:"Links,omitempty"` + // An array of objects that describe the Message's media if attached, otherwise, null. + Media *[]map[string]interface{} `json:"Media,omitempty"` + // The unique ID of messages's author participant. + ParticipantSid *string `json:"ParticipantSid,omitempty"` + // A 34 character string that uniquely identifies this resource. + Sid *string `json:"Sid,omitempty"` + // An absolute URL for this message. + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/conversations/v1/model_conversations_v1_service_service_conversation_service_conversation_message_service_conversation_message_receipt.go b/twilio/rest/conversations/v1/model_conversations_v1_service_service_conversation_service_conversation_message_service_conversation_message_receipt.go index 7bd952823..022729c08 100644 --- a/twilio/rest/conversations/v1/model_conversations_v1_service_service_conversation_service_conversation_message_service_conversation_message_receipt.go +++ b/twilio/rest/conversations/v1/model_conversations_v1_service_service_conversation_service_conversation_message_service_conversation_message_receipt.go @@ -17,16 +17,28 @@ import ( // ConversationsV1ServiceServiceConversationServiceConversationMessageServiceConversationMessageReceipt struct for ConversationsV1ServiceServiceConversationServiceConversationMessageServiceConversationMessageReceipt type ConversationsV1ServiceServiceConversationServiceConversationMessageServiceConversationMessageReceipt struct { - AccountSid *string `json:"AccountSid,omitempty"` - ChannelMessageSid *string `json:"ChannelMessageSid,omitempty"` - ChatServiceSid *string `json:"ChatServiceSid,omitempty"` - ConversationSid *string `json:"ConversationSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - ErrorCode *int32 `json:"ErrorCode,omitempty"` - MessageSid *string `json:"MessageSid,omitempty"` - ParticipantSid *string `json:"ParticipantSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Status *ServiceConversationMessageReceiptDeliveryStatus `json:"Status,omitempty"` - Url *string `json:"Url,omitempty"` + // The unique ID of the Account responsible for this participant. + AccountSid *string `json:"AccountSid,omitempty"` + // A messaging channel-specific identifier for the message delivered to participant + ChannelMessageSid *string `json:"ChannelMessageSid,omitempty"` + // The SID of the Conversation Service that the resource is associated with. + ChatServiceSid *string `json:"ChatServiceSid,omitempty"` + // The unique ID of the Conversation for this message. + ConversationSid *string `json:"ConversationSid,omitempty"` + // The date that this resource was created. + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The date that this resource was last updated. + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The message [delivery error code](https://www.twilio.com/docs/sms/api/message-resource#delivery-related-errors) for a `failed` status + ErrorCode *int32 `json:"ErrorCode,omitempty"` + // The SID of the message the delivery receipt belongs to + MessageSid *string `json:"MessageSid,omitempty"` + // The unique ID of the participant the delivery receipt belongs to. + ParticipantSid *string `json:"ParticipantSid,omitempty"` + // A 34 character string that uniquely identifies this resource. + Sid *string `json:"Sid,omitempty"` + // The message delivery status + Status *string `json:"Status,omitempty"` + // An absolute URL for this delivery receipt. + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/conversations/v1/model_conversations_v1_service_service_conversation_service_conversation_participant.go b/twilio/rest/conversations/v1/model_conversations_v1_service_service_conversation_service_conversation_participant.go index 11f484e66..e049ba7e0 100644 --- a/twilio/rest/conversations/v1/model_conversations_v1_service_service_conversation_service_conversation_participant.go +++ b/twilio/rest/conversations/v1/model_conversations_v1_service_service_conversation_service_conversation_participant.go @@ -17,17 +17,30 @@ import ( // ConversationsV1ServiceServiceConversationServiceConversationParticipant struct for ConversationsV1ServiceServiceConversationServiceConversationParticipant type ConversationsV1ServiceServiceConversationServiceConversationParticipant struct { - AccountSid *string `json:"AccountSid,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - ChatServiceSid *string `json:"ChatServiceSid,omitempty"` - ConversationSid *string `json:"ConversationSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Identity *string `json:"Identity,omitempty"` - LastReadMessageIndex *int32 `json:"LastReadMessageIndex,omitempty"` - LastReadTimestamp *string `json:"LastReadTimestamp,omitempty"` - MessagingBinding *map[string]interface{} `json:"MessagingBinding,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` + // The unique ID of the Account responsible for this participant. + AccountSid *string `json:"AccountSid,omitempty"` + // An optional string metadata field you can use to store any data you wish. + Attributes *string `json:"Attributes,omitempty"` + // The SID of the Conversation Service that the resource is associated with. + ChatServiceSid *string `json:"ChatServiceSid,omitempty"` + // The unique ID of the Conversation for this participant. + ConversationSid *string `json:"ConversationSid,omitempty"` + // The date that this resource was created. + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The date that this resource was last updated. + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // A unique string identifier for the conversation participant as Conversation User. + Identity *string `json:"Identity,omitempty"` + // Index of last “read” message in the Conversation for the Participant. + LastReadMessageIndex *int32 `json:"LastReadMessageIndex,omitempty"` + // Timestamp of last “read” message in the Conversation for the Participant. + LastReadTimestamp *string `json:"LastReadTimestamp,omitempty"` + // Information about how this participant exchanges messages with the conversation. + MessagingBinding *map[string]interface{} `json:"MessagingBinding,omitempty"` + // The SID of a conversation-level Role to assign to the participant + RoleSid *string `json:"RoleSid,omitempty"` + // A 34 character string that uniquely identifies this resource. + Sid *string `json:"Sid,omitempty"` + // An absolute URL for this participant. + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/conversations/v1/model_conversations_v1_service_service_conversation_service_conversation_scoped_webhook.go b/twilio/rest/conversations/v1/model_conversations_v1_service_service_conversation_service_conversation_scoped_webhook.go index 2809c645b..6a732617d 100644 --- a/twilio/rest/conversations/v1/model_conversations_v1_service_service_conversation_service_conversation_scoped_webhook.go +++ b/twilio/rest/conversations/v1/model_conversations_v1_service_service_conversation_service_conversation_scoped_webhook.go @@ -17,13 +17,22 @@ import ( // ConversationsV1ServiceServiceConversationServiceConversationScopedWebhook struct for ConversationsV1ServiceServiceConversationServiceConversationScopedWebhook type ConversationsV1ServiceServiceConversationServiceConversationScopedWebhook struct { - AccountSid *string `json:"AccountSid,omitempty"` - ChatServiceSid *string `json:"ChatServiceSid,omitempty"` - Configuration *map[string]interface{} `json:"Configuration,omitempty"` - ConversationSid *string `json:"ConversationSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Sid *string `json:"Sid,omitempty"` - Target *string `json:"Target,omitempty"` - Url *string `json:"Url,omitempty"` + // The unique ID of the Account responsible for this conversation. + AccountSid *string `json:"AccountSid,omitempty"` + // The SID of the Conversation Service that the resource is associated with. + ChatServiceSid *string `json:"ChatServiceSid,omitempty"` + // The configuration of this webhook. + Configuration *map[string]interface{} `json:"Configuration,omitempty"` + // The unique ID of the Conversation for this webhook. + ConversationSid *string `json:"ConversationSid,omitempty"` + // The date that this resource was created. + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The date that this resource was last updated. + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // A 34 character string that uniquely identifies this resource. + Sid *string `json:"Sid,omitempty"` + // The target of this webhook. + Target *string `json:"Target,omitempty"` + // An absolute URL for this webhook. + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/conversations/v1/model_conversations_v1_service_service_role.go b/twilio/rest/conversations/v1/model_conversations_v1_service_service_role.go index ea0bd814d..f5cd6baab 100644 --- a/twilio/rest/conversations/v1/model_conversations_v1_service_service_role.go +++ b/twilio/rest/conversations/v1/model_conversations_v1_service_service_role.go @@ -17,13 +17,22 @@ import ( // ConversationsV1ServiceServiceRole struct for ConversationsV1ServiceServiceRole type ConversationsV1ServiceServiceRole struct { - AccountSid *string `json:"AccountSid,omitempty"` - ChatServiceSid *string `json:"ChatServiceSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Permissions *[]string `json:"Permissions,omitempty"` - Sid *string `json:"Sid,omitempty"` - Type *ServiceRoleRoleType `json:"Type,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The SID of the Conversation Service that the resource is associated with + ChatServiceSid *string `json:"ChatServiceSid,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The string that you assigned to describe the resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // An array of the permissions the role has been granted + Permissions *[]string `json:"Permissions,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The type of role + Type *string `json:"Type,omitempty"` + // An absolute URL for this user role. + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/conversations/v1/model_conversations_v1_service_service_user.go b/twilio/rest/conversations/v1/model_conversations_v1_service_service_user.go index 85547b6a6..e5faa0514 100644 --- a/twilio/rest/conversations/v1/model_conversations_v1_service_service_user.go +++ b/twilio/rest/conversations/v1/model_conversations_v1_service_service_user.go @@ -17,16 +17,28 @@ import ( // ConversationsV1ServiceServiceUser struct for ConversationsV1ServiceServiceUser type ConversationsV1ServiceServiceUser struct { - AccountSid *string `json:"AccountSid,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - ChatServiceSid *string `json:"ChatServiceSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Identity *string `json:"Identity,omitempty"` - IsNotifiable *bool `json:"IsNotifiable,omitempty"` - IsOnline *bool `json:"IsOnline,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The JSON Object string that stores application-specific data + Attributes *string `json:"Attributes,omitempty"` + // The SID of the Conversation Service that the resource is associated with + ChatServiceSid *string `json:"ChatServiceSid,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The string that you assigned to describe the resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // The string that identifies the resource's User + Identity *string `json:"Identity,omitempty"` + // Whether the User has a potentially valid Push Notification registration for this Conversations Service + IsNotifiable *bool `json:"IsNotifiable,omitempty"` + // Whether the User is actively connected to this Conversations Service and online + IsOnline *bool `json:"IsOnline,omitempty"` + // The SID of a service-level Role assigned to the user + RoleSid *string `json:"RoleSid,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // An absolute URL for this user. + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/conversations/v1/model_conversations_v1_user.go b/twilio/rest/conversations/v1/model_conversations_v1_user.go index e46adcf84..d5e7b146f 100644 --- a/twilio/rest/conversations/v1/model_conversations_v1_user.go +++ b/twilio/rest/conversations/v1/model_conversations_v1_user.go @@ -17,16 +17,28 @@ import ( // ConversationsV1User struct for ConversationsV1User type ConversationsV1User struct { - AccountSid *string `json:"AccountSid,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - ChatServiceSid *string `json:"ChatServiceSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Identity *string `json:"Identity,omitempty"` - IsNotifiable *bool `json:"IsNotifiable,omitempty"` - IsOnline *bool `json:"IsOnline,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The JSON Object string that stores application-specific data + Attributes *string `json:"Attributes,omitempty"` + // The SID of the Conversation Service that the resource is associated with + ChatServiceSid *string `json:"ChatServiceSid,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The string that you assigned to describe the resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // The string that identifies the resource's User + Identity *string `json:"Identity,omitempty"` + // Whether the User has a potentially valid Push Notification registration for this Conversations Service + IsNotifiable *bool `json:"IsNotifiable,omitempty"` + // Whether the User is actively connected to this Conversations Service and online + IsOnline *bool `json:"IsOnline,omitempty"` + // The SID of a service-level Role assigned to the user + RoleSid *string `json:"RoleSid,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // An absolute URL for this user. + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/events/v1/README.md b/twilio/rest/events/v1/README.md index e82db48cc..6279b3b61 100644 --- a/twilio/rest/events/v1/README.md +++ b/twilio/rest/events/v1/README.md @@ -66,8 +66,6 @@ Class | Method | HTTP request | Description - [ListSubscriptionResponse](docs/ListSubscriptionResponse.md) - [ListVersionResponse](docs/ListVersionResponse.md) - [ListVersionResponseMeta](docs/ListVersionResponseMeta.md) - - [SinkSinkType](docs/SinkSinkType.md) - - [SinkStatus](docs/SinkStatus.md) ## Documentation For Authorization diff --git a/twilio/rest/events/v1/docs/EventsV1EventType.md b/twilio/rest/events/v1/docs/EventsV1EventType.md index 4c57f2081..774bc9253 100644 --- a/twilio/rest/events/v1/docs/EventsV1EventType.md +++ b/twilio/rest/events/v1/docs/EventsV1EventType.md @@ -1,15 +1,15 @@ # EventsV1EventType ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**Description** | Pointer to **string** | -**Links** | Pointer to **map[string]interface{}** | -**SchemaId** | Pointer to **string** | -**Type** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The date this Event Type was created. | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The date this Event Type was updated. | +**Description** | Pointer to **string** | Event Type description. | +**Links** | Pointer to **map[string]interface{}** | | +**SchemaId** | Pointer to **string** | The Schema identifier for this Event Type. | +**Type** | Pointer to **string** | The Event Type identifier. | +**Url** | Pointer to **string** | The URL of this resource. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/events/v1/docs/EventsV1Schema.md b/twilio/rest/events/v1/docs/EventsV1Schema.md index df999a664..9166557bf 100644 --- a/twilio/rest/events/v1/docs/EventsV1Schema.md +++ b/twilio/rest/events/v1/docs/EventsV1Schema.md @@ -1,13 +1,13 @@ # EventsV1Schema ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Id** | Pointer to **string** | -**LastCreated** | Pointer to [**time.Time**](time.Time.md) | -**LastVersion** | Pointer to **int32** | -**Links** | Pointer to **map[string]interface{}** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | Schema Identifier. | +**LastCreated** | Pointer to [**time.Time**](time.Time.md) | The date that the last schema version was created. | +**LastVersion** | Pointer to **int32** | Last schema version. | +**Links** | Pointer to **map[string]interface{}** | Nested resource URLs. | +**Url** | Pointer to **string** | The URL of this resource. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/events/v1/docs/EventsV1SchemaVersion.md b/twilio/rest/events/v1/docs/EventsV1SchemaVersion.md index 3bcee616f..549804f6f 100644 --- a/twilio/rest/events/v1/docs/EventsV1SchemaVersion.md +++ b/twilio/rest/events/v1/docs/EventsV1SchemaVersion.md @@ -1,13 +1,13 @@ # EventsV1SchemaVersion ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**Id** | Pointer to **string** | -**Raw** | Pointer to **string** | -**SchemaVersion** | Pointer to **int32** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The date the schema version was created. | +**Id** | Pointer to **string** | The unique identifier of the schema. | +**Raw** | Pointer to **string** | | +**SchemaVersion** | Pointer to **int32** | The version of this schema. | +**Url** | Pointer to **string** | The URL of this resource. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/events/v1/docs/EventsV1Sink.md b/twilio/rest/events/v1/docs/EventsV1Sink.md index 7e8186fa2..1b1065f1c 100644 --- a/twilio/rest/events/v1/docs/EventsV1Sink.md +++ b/twilio/rest/events/v1/docs/EventsV1Sink.md @@ -1,17 +1,17 @@ # EventsV1Sink ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**Description** | Pointer to **string** | -**Links** | Pointer to **map[string]interface{}** | -**Sid** | Pointer to **string** | -**SinkConfiguration** | Pointer to **map[string]interface{}** | -**SinkType** | Pointer to [**SinkSinkType**](sink_sink_type.md) | -**Status** | Pointer to [**SinkStatus**](sink_status.md) | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The date this Sink was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The date this Sink was updated | +**Description** | Pointer to **string** | Sink Description | +**Links** | Pointer to **map[string]interface{}** | Nested resource URLs. | +**Sid** | Pointer to **string** | A string that uniquely identifies this Sink. | +**SinkConfiguration** | Pointer to **map[string]interface{}** | JSON Sink configuration. | +**SinkType** | Pointer to **string** | Sink type. | +**Status** | Pointer to **string** | The Status of this Sink | +**Url** | Pointer to **string** | The URL of this resource. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/events/v1/docs/EventsV1SinkSinkTest.md b/twilio/rest/events/v1/docs/EventsV1SinkSinkTest.md index fe1b09626..8842a8f8d 100644 --- a/twilio/rest/events/v1/docs/EventsV1SinkSinkTest.md +++ b/twilio/rest/events/v1/docs/EventsV1SinkSinkTest.md @@ -1,9 +1,9 @@ # EventsV1SinkSinkTest ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Result** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | Pointer to **string** | Feedback indicating whether the test event was generated. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/events/v1/docs/EventsV1SinkSinkValidate.md b/twilio/rest/events/v1/docs/EventsV1SinkSinkValidate.md index 9332b8762..92e8c3b29 100644 --- a/twilio/rest/events/v1/docs/EventsV1SinkSinkValidate.md +++ b/twilio/rest/events/v1/docs/EventsV1SinkSinkValidate.md @@ -1,9 +1,9 @@ # EventsV1SinkSinkValidate ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Result** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | Pointer to **string** | Feedback indicating whether the given Sink was validated. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/events/v1/docs/EventsV1Subscription.md b/twilio/rest/events/v1/docs/EventsV1Subscription.md index b6f25394e..0e8e80e6e 100644 --- a/twilio/rest/events/v1/docs/EventsV1Subscription.md +++ b/twilio/rest/events/v1/docs/EventsV1Subscription.md @@ -1,16 +1,16 @@ # EventsV1Subscription ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**Description** | Pointer to **string** | -**Links** | Pointer to **map[string]interface{}** | -**Sid** | Pointer to **string** | -**SinkSid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | Account SID. | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The date this Subscription was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The date this Subscription was updated | +**Description** | Pointer to **string** | Subscription description | +**Links** | Pointer to **map[string]interface{}** | Nested resource URLs. | +**Sid** | Pointer to **string** | A string that uniquely identifies this Subscription. | +**SinkSid** | Pointer to **string** | Sink SID. | +**Url** | Pointer to **string** | The URL of this resource. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/events/v1/docs/EventsV1SubscriptionSubscribedEvent.md b/twilio/rest/events/v1/docs/EventsV1SubscriptionSubscribedEvent.md index ae8004812..b54bc5d4a 100644 --- a/twilio/rest/events/v1/docs/EventsV1SubscriptionSubscribedEvent.md +++ b/twilio/rest/events/v1/docs/EventsV1SubscriptionSubscribedEvent.md @@ -1,13 +1,13 @@ # EventsV1SubscriptionSubscribedEvent ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**SubscriptionSid** | Pointer to **string** | -**Type** | Pointer to **string** | -**Url** | Pointer to **string** | -**Version** | Pointer to **int32** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | Account SID. | +**SubscriptionSid** | Pointer to **string** | Subscription SID. | +**Type** | Pointer to **string** | Type of event being subscribed to. | +**Url** | Pointer to **string** | The URL of this resource. | +**Version** | Pointer to **int32** | The schema version that the subscription should use. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/events/v1/docs/ListEventTypeResponse.md b/twilio/rest/events/v1/docs/ListEventTypeResponse.md index 480016167..676f0e82c 100644 --- a/twilio/rest/events/v1/docs/ListEventTypeResponse.md +++ b/twilio/rest/events/v1/docs/ListEventTypeResponse.md @@ -1,10 +1,10 @@ # ListEventTypeResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListVersionResponseMeta**](ListVersionResponse_meta.md) | [optional] -**Types** | [**[]EventsV1EventType**](events.v1.event_type.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListVersionResponseMeta**](ListVersionResponse_meta.md) | |[optional] +**Types** | [**[]EventsV1EventType**](events.v1.event_type.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/events/v1/docs/ListSinkResponse.md b/twilio/rest/events/v1/docs/ListSinkResponse.md index d3318b555..c0cbde094 100644 --- a/twilio/rest/events/v1/docs/ListSinkResponse.md +++ b/twilio/rest/events/v1/docs/ListSinkResponse.md @@ -1,10 +1,10 @@ # ListSinkResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListVersionResponseMeta**](ListVersionResponse_meta.md) | [optional] -**Sinks** | [**[]EventsV1Sink**](events.v1.sink.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListVersionResponseMeta**](ListVersionResponse_meta.md) | |[optional] +**Sinks** | [**[]EventsV1Sink**](events.v1.sink.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/events/v1/docs/ListSubscribedEventResponse.md b/twilio/rest/events/v1/docs/ListSubscribedEventResponse.md index f4df3ac05..69b6248f0 100644 --- a/twilio/rest/events/v1/docs/ListSubscribedEventResponse.md +++ b/twilio/rest/events/v1/docs/ListSubscribedEventResponse.md @@ -1,10 +1,10 @@ # ListSubscribedEventResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListVersionResponseMeta**](ListVersionResponse_meta.md) | [optional] -**Types** | [**[]EventsV1SubscriptionSubscribedEvent**](events.v1.subscription.subscribed_event.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListVersionResponseMeta**](ListVersionResponse_meta.md) | |[optional] +**Types** | [**[]EventsV1SubscriptionSubscribedEvent**](events.v1.subscription.subscribed_event.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/events/v1/docs/ListSubscriptionResponse.md b/twilio/rest/events/v1/docs/ListSubscriptionResponse.md index 27513eca1..d01b09891 100644 --- a/twilio/rest/events/v1/docs/ListSubscriptionResponse.md +++ b/twilio/rest/events/v1/docs/ListSubscriptionResponse.md @@ -1,10 +1,10 @@ # ListSubscriptionResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListVersionResponseMeta**](ListVersionResponse_meta.md) | [optional] -**Subscriptions** | [**[]EventsV1Subscription**](events.v1.subscription.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListVersionResponseMeta**](ListVersionResponse_meta.md) | |[optional] +**Subscriptions** | [**[]EventsV1Subscription**](events.v1.subscription.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/events/v1/docs/ListVersionResponse.md b/twilio/rest/events/v1/docs/ListVersionResponse.md index 816c297c3..e20c65658 100644 --- a/twilio/rest/events/v1/docs/ListVersionResponse.md +++ b/twilio/rest/events/v1/docs/ListVersionResponse.md @@ -1,10 +1,10 @@ # ListVersionResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListVersionResponseMeta**](ListVersionResponse_meta.md) | [optional] -**SchemaVersions** | [**[]EventsV1SchemaVersion**](events.v1.schema.version.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListVersionResponseMeta**](ListVersionResponse_meta.md) | |[optional] +**SchemaVersions** | [**[]EventsV1SchemaVersion**](events.v1.schema.version.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/events/v1/docs/ListVersionResponseMeta.md b/twilio/rest/events/v1/docs/ListVersionResponseMeta.md index 1330f4aae..f77d53576 100644 --- a/twilio/rest/events/v1/docs/ListVersionResponseMeta.md +++ b/twilio/rest/events/v1/docs/ListVersionResponseMeta.md @@ -1,15 +1,15 @@ # ListVersionResponseMeta ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**FirstPageUrl** | **string** | [optional] -**Key** | **string** | [optional] -**NextPageUrl** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUrl** | **string** | [optional] -**Url** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstPageUrl** | **string** | |[optional] +**Key** | **string** | |[optional] +**NextPageUrl** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUrl** | **string** | |[optional] +**Url** | **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/twilio/rest/events/v1/model_events_v1_event_type.go b/twilio/rest/events/v1/model_events_v1_event_type.go index 9f4171964..7f584f80f 100644 --- a/twilio/rest/events/v1/model_events_v1_event_type.go +++ b/twilio/rest/events/v1/model_events_v1_event_type.go @@ -17,11 +17,17 @@ import ( // EventsV1EventType struct for EventsV1EventType type EventsV1EventType struct { - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The date this Event Type was created. + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The date this Event Type was updated. + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // Event Type description. Description *string `json:"Description,omitempty"` Links *map[string]interface{} `json:"Links,omitempty"` - SchemaId *string `json:"SchemaId,omitempty"` - Type *string `json:"Type,omitempty"` - Url *string `json:"Url,omitempty"` + // The Schema identifier for this Event Type. + SchemaId *string `json:"SchemaId,omitempty"` + // The Event Type identifier. + Type *string `json:"Type,omitempty"` + // The URL of this resource. + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/events/v1/model_events_v1_schema.go b/twilio/rest/events/v1/model_events_v1_schema.go index d0271e61d..099caf55d 100644 --- a/twilio/rest/events/v1/model_events_v1_schema.go +++ b/twilio/rest/events/v1/model_events_v1_schema.go @@ -17,9 +17,14 @@ import ( // EventsV1Schema struct for EventsV1Schema type EventsV1Schema struct { - Id *string `json:"Id,omitempty"` - LastCreated *time.Time `json:"LastCreated,omitempty"` - LastVersion *int32 `json:"LastVersion,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - Url *string `json:"Url,omitempty"` + // Schema Identifier. + Id *string `json:"Id,omitempty"` + // The date that the last schema version was created. + LastCreated *time.Time `json:"LastCreated,omitempty"` + // Last schema version. + LastVersion *int32 `json:"LastVersion,omitempty"` + // Nested resource URLs. + Links *map[string]interface{} `json:"Links,omitempty"` + // The URL of this resource. + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/events/v1/model_events_v1_schema_version.go b/twilio/rest/events/v1/model_events_v1_schema_version.go index 90f442157..c24bdc9a9 100644 --- a/twilio/rest/events/v1/model_events_v1_schema_version.go +++ b/twilio/rest/events/v1/model_events_v1_schema_version.go @@ -17,9 +17,13 @@ import ( // EventsV1SchemaVersion struct for EventsV1SchemaVersion type EventsV1SchemaVersion struct { - DateCreated *time.Time `json:"DateCreated,omitempty"` - Id *string `json:"Id,omitempty"` - Raw *string `json:"Raw,omitempty"` - SchemaVersion *int32 `json:"SchemaVersion,omitempty"` - Url *string `json:"Url,omitempty"` + // The date the schema version was created. + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The unique identifier of the schema. + Id *string `json:"Id,omitempty"` + Raw *string `json:"Raw,omitempty"` + // The version of this schema. + SchemaVersion *int32 `json:"SchemaVersion,omitempty"` + // The URL of this resource. + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/events/v1/model_events_v1_sink.go b/twilio/rest/events/v1/model_events_v1_sink.go index 8d9785e6a..af2471c2c 100644 --- a/twilio/rest/events/v1/model_events_v1_sink.go +++ b/twilio/rest/events/v1/model_events_v1_sink.go @@ -17,13 +17,22 @@ import ( // EventsV1Sink struct for EventsV1Sink type EventsV1Sink struct { - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Description *string `json:"Description,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - Sid *string `json:"Sid,omitempty"` + // The date this Sink was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The date this Sink was updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // Sink Description + Description *string `json:"Description,omitempty"` + // Nested resource URLs. + Links *map[string]interface{} `json:"Links,omitempty"` + // A string that uniquely identifies this Sink. + Sid *string `json:"Sid,omitempty"` + // JSON Sink configuration. SinkConfiguration *map[string]interface{} `json:"SinkConfiguration,omitempty"` - SinkType *SinkSinkType `json:"SinkType,omitempty"` - Status *SinkStatus `json:"Status,omitempty"` - Url *string `json:"Url,omitempty"` + // Sink type. + SinkType *string `json:"SinkType,omitempty"` + // The Status of this Sink + Status *string `json:"Status,omitempty"` + // The URL of this resource. + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/events/v1/model_events_v1_sink_sink_test_.go b/twilio/rest/events/v1/model_events_v1_sink_sink_test_.go index dfb4a0cc3..0b1b9ab94 100644 --- a/twilio/rest/events/v1/model_events_v1_sink_sink_test_.go +++ b/twilio/rest/events/v1/model_events_v1_sink_sink_test_.go @@ -13,5 +13,6 @@ package openapi // EventsV1SinkSinkTest struct for EventsV1SinkSinkTest type EventsV1SinkSinkTest struct { + // Feedback indicating whether the test event was generated. Result *string `json:"Result,omitempty"` } diff --git a/twilio/rest/events/v1/model_events_v1_sink_sink_validate.go b/twilio/rest/events/v1/model_events_v1_sink_sink_validate.go index ca0475f46..cc1edc5dd 100644 --- a/twilio/rest/events/v1/model_events_v1_sink_sink_validate.go +++ b/twilio/rest/events/v1/model_events_v1_sink_sink_validate.go @@ -13,5 +13,6 @@ package openapi // EventsV1SinkSinkValidate struct for EventsV1SinkSinkValidate type EventsV1SinkSinkValidate struct { + // Feedback indicating whether the given Sink was validated. Result *string `json:"Result,omitempty"` } diff --git a/twilio/rest/events/v1/model_events_v1_subscription.go b/twilio/rest/events/v1/model_events_v1_subscription.go index 7d98e1b5d..ff8845246 100644 --- a/twilio/rest/events/v1/model_events_v1_subscription.go +++ b/twilio/rest/events/v1/model_events_v1_subscription.go @@ -17,12 +17,20 @@ import ( // EventsV1Subscription struct for EventsV1Subscription type EventsV1Subscription struct { - AccountSid *string `json:"AccountSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Description *string `json:"Description,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - Sid *string `json:"Sid,omitempty"` - SinkSid *string `json:"SinkSid,omitempty"` - Url *string `json:"Url,omitempty"` + // Account SID. + AccountSid *string `json:"AccountSid,omitempty"` + // The date this Subscription was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The date this Subscription was updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // Subscription description + Description *string `json:"Description,omitempty"` + // Nested resource URLs. + Links *map[string]interface{} `json:"Links,omitempty"` + // A string that uniquely identifies this Subscription. + Sid *string `json:"Sid,omitempty"` + // Sink SID. + SinkSid *string `json:"SinkSid,omitempty"` + // The URL of this resource. + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/events/v1/model_events_v1_subscription_subscribed_event.go b/twilio/rest/events/v1/model_events_v1_subscription_subscribed_event.go index 0eb987d4f..011122b6b 100644 --- a/twilio/rest/events/v1/model_events_v1_subscription_subscribed_event.go +++ b/twilio/rest/events/v1/model_events_v1_subscription_subscribed_event.go @@ -13,9 +13,14 @@ package openapi // EventsV1SubscriptionSubscribedEvent struct for EventsV1SubscriptionSubscribedEvent type EventsV1SubscriptionSubscribedEvent struct { - AccountSid *string `json:"AccountSid,omitempty"` + // Account SID. + AccountSid *string `json:"AccountSid,omitempty"` + // Subscription SID. SubscriptionSid *string `json:"SubscriptionSid,omitempty"` - Type *string `json:"Type,omitempty"` - Url *string `json:"Url,omitempty"` - Version *int32 `json:"Version,omitempty"` + // Type of event being subscribed to. + Type *string `json:"Type,omitempty"` + // The URL of this resource. + Url *string `json:"Url,omitempty"` + // The schema version that the subscription should use. + Version *int32 `json:"Version,omitempty"` } diff --git a/twilio/rest/fax/v1/README.md b/twilio/rest/fax/v1/README.md index cba6040ac..bc9873f92 100644 --- a/twilio/rest/fax/v1/README.md +++ b/twilio/rest/fax/v1/README.md @@ -43,9 +43,6 @@ Class | Method | HTTP request | Description ## Documentation For Models - - [FaxDirection](docs/FaxDirection.md) - - [FaxQuality](docs/FaxQuality.md) - - [FaxStatus](docs/FaxStatus.md) - [FaxV1Fax](docs/FaxV1Fax.md) - [FaxV1FaxFaxMedia](docs/FaxV1FaxFaxMedia.md) - [ListFaxMediaResponse](docs/ListFaxMediaResponse.md) diff --git a/twilio/rest/fax/v1/docs/FaxV1Fax.md b/twilio/rest/fax/v1/docs/FaxV1Fax.md index fd6afe8fb..5a948dcb1 100644 --- a/twilio/rest/fax/v1/docs/FaxV1Fax.md +++ b/twilio/rest/fax/v1/docs/FaxV1Fax.md @@ -1,26 +1,26 @@ # FaxV1Fax ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**ApiVersion** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**Direction** | Pointer to [**FaxDirection**](fax_direction.md) | -**Duration** | Pointer to **int32** | -**From** | Pointer to **string** | -**Links** | Pointer to **map[string]interface{}** | -**MediaSid** | Pointer to **string** | -**MediaUrl** | Pointer to **string** | -**NumPages** | Pointer to **int32** | -**Price** | Pointer to **float32** | -**PriceUnit** | Pointer to **string** | -**Quality** | Pointer to [**FaxQuality**](fax_quality.md) | -**Sid** | Pointer to **string** | -**Status** | Pointer to [**FaxStatus**](fax_status.md) | -**To** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**ApiVersion** | Pointer to **string** | The API version used to transmit the fax | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 formatted date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 formatted date and time in GMT when the resource was last updated | +**Direction** | Pointer to **string** | The direction of the fax | +**Duration** | Pointer to **int32** | The time it took to transmit the fax | +**From** | Pointer to **string** | The number the fax was sent from | +**Links** | Pointer to **map[string]interface{}** | The URLs of the fax's related resources | +**MediaSid** | Pointer to **string** | The SID of the FaxMedia resource that is associated with the Fax | +**MediaUrl** | Pointer to **string** | The Twilio-hosted URL that can be used to download fax media | +**NumPages** | Pointer to **int32** | The number of pages contained in the fax document | +**Price** | Pointer to **float32** | The fax transmission price | +**PriceUnit** | Pointer to **string** | The ISO 4217 currency used for billing | +**Quality** | Pointer to **string** | The quality of the fax | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Status** | Pointer to **string** | The status of the fax | +**To** | Pointer to **string** | The phone number that received the fax | +**Url** | Pointer to **string** | The absolute URL of the fax resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/fax/v1/docs/FaxV1FaxFaxMedia.md b/twilio/rest/fax/v1/docs/FaxV1FaxFaxMedia.md index 259629f6c..df161ae19 100644 --- a/twilio/rest/fax/v1/docs/FaxV1FaxFaxMedia.md +++ b/twilio/rest/fax/v1/docs/FaxV1FaxFaxMedia.md @@ -1,15 +1,15 @@ # FaxV1FaxFaxMedia ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**ContentType** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**FaxSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**ContentType** | Pointer to **string** | The content type of the stored fax media | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was last updated | +**FaxSid** | Pointer to **string** | The SID of the fax the FaxMedia resource is associated with | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Url** | Pointer to **string** | The absolute URL of the FaxMedia resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/fax/v1/docs/ListFaxMediaResponse.md b/twilio/rest/fax/v1/docs/ListFaxMediaResponse.md index 2bde38b0d..e1e0615f2 100644 --- a/twilio/rest/fax/v1/docs/ListFaxMediaResponse.md +++ b/twilio/rest/fax/v1/docs/ListFaxMediaResponse.md @@ -1,10 +1,10 @@ # ListFaxMediaResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Media** | [**[]FaxV1FaxFaxMedia**](fax.v1.fax.fax_media.md) | [optional] -**Meta** | [**ListFaxResponseMeta**](ListFaxResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Media** | [**[]FaxV1FaxFaxMedia**](fax.v1.fax.fax_media.md) | |[optional] +**Meta** | [**ListFaxResponseMeta**](ListFaxResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/fax/v1/docs/ListFaxResponse.md b/twilio/rest/fax/v1/docs/ListFaxResponse.md index eec378943..5b016dd11 100644 --- a/twilio/rest/fax/v1/docs/ListFaxResponse.md +++ b/twilio/rest/fax/v1/docs/ListFaxResponse.md @@ -1,10 +1,10 @@ # ListFaxResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Faxes** | [**[]FaxV1Fax**](fax.v1.fax.md) | [optional] -**Meta** | [**ListFaxResponseMeta**](ListFaxResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Faxes** | [**[]FaxV1Fax**](fax.v1.fax.md) | |[optional] +**Meta** | [**ListFaxResponseMeta**](ListFaxResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/fax/v1/docs/ListFaxResponseMeta.md b/twilio/rest/fax/v1/docs/ListFaxResponseMeta.md index 9a7978645..385ba3593 100644 --- a/twilio/rest/fax/v1/docs/ListFaxResponseMeta.md +++ b/twilio/rest/fax/v1/docs/ListFaxResponseMeta.md @@ -1,15 +1,15 @@ # ListFaxResponseMeta ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**FirstPageUrl** | **string** | [optional] -**Key** | **string** | [optional] -**NextPageUrl** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUrl** | **string** | [optional] -**Url** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstPageUrl** | **string** | |[optional] +**Key** | **string** | |[optional] +**NextPageUrl** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUrl** | **string** | |[optional] +**Url** | **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/twilio/rest/fax/v1/model_fax_v1_fax.go b/twilio/rest/fax/v1/model_fax_v1_fax.go index 8d5695c3e..e865046c9 100644 --- a/twilio/rest/fax/v1/model_fax_v1_fax.go +++ b/twilio/rest/fax/v1/model_fax_v1_fax.go @@ -17,22 +17,40 @@ import ( // FaxV1Fax struct for FaxV1Fax type FaxV1Fax struct { - AccountSid *string `json:"AccountSid,omitempty"` - ApiVersion *string `json:"ApiVersion,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Direction *FaxDirection `json:"Direction,omitempty"` - Duration *int32 `json:"Duration,omitempty"` - From *string `json:"From,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - MediaSid *string `json:"MediaSid,omitempty"` - MediaUrl *string `json:"MediaUrl,omitempty"` - NumPages *int32 `json:"NumPages,omitempty"` - Price *float32 `json:"Price,omitempty"` - PriceUnit *string `json:"PriceUnit,omitempty"` - Quality *FaxQuality `json:"Quality,omitempty"` - Sid *string `json:"Sid,omitempty"` - Status *FaxStatus `json:"Status,omitempty"` - To *string `json:"To,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The API version used to transmit the fax + ApiVersion *string `json:"ApiVersion,omitempty"` + // The ISO 8601 formatted date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 formatted date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The direction of the fax + Direction *string `json:"Direction,omitempty"` + // The time it took to transmit the fax + Duration *int32 `json:"Duration,omitempty"` + // The number the fax was sent from + From *string `json:"From,omitempty"` + // The URLs of the fax's related resources + Links *map[string]interface{} `json:"Links,omitempty"` + // The SID of the FaxMedia resource that is associated with the Fax + MediaSid *string `json:"MediaSid,omitempty"` + // The Twilio-hosted URL that can be used to download fax media + MediaUrl *string `json:"MediaUrl,omitempty"` + // The number of pages contained in the fax document + NumPages *int32 `json:"NumPages,omitempty"` + // The fax transmission price + Price *float32 `json:"Price,omitempty"` + // The ISO 4217 currency used for billing + PriceUnit *string `json:"PriceUnit,omitempty"` + // The quality of the fax + Quality *string `json:"Quality,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The status of the fax + Status *string `json:"Status,omitempty"` + // The phone number that received the fax + To *string `json:"To,omitempty"` + // The absolute URL of the fax resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/fax/v1/model_fax_v1_fax_fax_media.go b/twilio/rest/fax/v1/model_fax_v1_fax_fax_media.go index 219b32b9b..efd90ac88 100644 --- a/twilio/rest/fax/v1/model_fax_v1_fax_fax_media.go +++ b/twilio/rest/fax/v1/model_fax_v1_fax_fax_media.go @@ -17,11 +17,18 @@ import ( // FaxV1FaxFaxMedia struct for FaxV1FaxFaxMedia type FaxV1FaxFaxMedia struct { - AccountSid *string `json:"AccountSid,omitempty"` - ContentType *string `json:"ContentType,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The content type of the stored fax media + ContentType *string `json:"ContentType,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the resource was last updated DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FaxSid *string `json:"FaxSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the fax the FaxMedia resource is associated with + FaxSid *string `json:"FaxSid,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The absolute URL of the FaxMedia resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/flex/v1/README.md b/twilio/rest/flex/v1/README.md index 236bad605..a7acf219b 100644 --- a/twilio/rest/flex/v1/README.md +++ b/twilio/rest/flex/v1/README.md @@ -51,9 +51,6 @@ Class | Method | HTTP request | Description ## Documentation For Models - - [ConfigurationStatus](docs/ConfigurationStatus.md) - - [FlexFlowChannelType](docs/FlexFlowChannelType.md) - - [FlexFlowIntegrationType](docs/FlexFlowIntegrationType.md) - [FlexV1Channel](docs/FlexV1Channel.md) - [FlexV1Configuration](docs/FlexV1Configuration.md) - [FlexV1FlexFlow](docs/FlexV1FlexFlow.md) diff --git a/twilio/rest/flex/v1/docs/FlexV1Channel.md b/twilio/rest/flex/v1/docs/FlexV1Channel.md index 7f6fde913..f4e81928f 100644 --- a/twilio/rest/flex/v1/docs/FlexV1Channel.md +++ b/twilio/rest/flex/v1/docs/FlexV1Channel.md @@ -1,16 +1,16 @@ # FlexV1Channel ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**FlexFlowSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**TaskSid** | Pointer to **string** | -**Url** | Pointer to **string** | -**UserSid** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource and owns this Workflow | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the Flex chat channel was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the Flex chat channel was last updated | +**FlexFlowSid** | Pointer to **string** | The SID of the Flex Flow | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**TaskSid** | Pointer to **string** | The SID of the TaskRouter Task | +**Url** | Pointer to **string** | The absolute URL of the Flex chat channel resource | +**UserSid** | Pointer to **string** | The SID of the chat user | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/flex/v1/docs/FlexV1Configuration.md b/twilio/rest/flex/v1/docs/FlexV1Configuration.md index 0721f2b00..c5ea648e5 100644 --- a/twilio/rest/flex/v1/docs/FlexV1Configuration.md +++ b/twilio/rest/flex/v1/docs/FlexV1Configuration.md @@ -1,47 +1,47 @@ # FlexV1Configuration ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Attributes** | Pointer to **map[string]interface{}** | -**CallRecordingEnabled** | Pointer to **bool** | -**CallRecordingWebhookUrl** | Pointer to **string** | -**ChatServiceInstanceSid** | Pointer to **string** | -**CrmAttributes** | Pointer to **map[string]interface{}** | -**CrmCallbackUrl** | Pointer to **string** | -**CrmEnabled** | Pointer to **bool** | -**CrmFallbackUrl** | Pointer to **string** | -**CrmType** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**FlexServiceInstanceSid** | Pointer to **string** | -**Integrations** | Pointer to **[]map[string]interface{}** | -**Markdown** | Pointer to **map[string]interface{}** | -**MessagingServiceInstanceSid** | Pointer to **string** | -**Notifications** | Pointer to **map[string]interface{}** | -**OutboundCallFlows** | Pointer to **map[string]interface{}** | -**PluginServiceAttributes** | Pointer to **map[string]interface{}** | -**PluginServiceEnabled** | Pointer to **bool** | -**PublicAttributes** | Pointer to **map[string]interface{}** | -**QueueStatsConfiguration** | Pointer to **map[string]interface{}** | -**RuntimeDomain** | Pointer to **string** | -**ServerlessServiceSids** | Pointer to **[]string** | -**ServiceVersion** | Pointer to **string** | -**Status** | Pointer to [**ConfigurationStatus**](configuration_status.md) | -**TaskrouterOfflineActivitySid** | Pointer to **string** | -**TaskrouterSkills** | Pointer to **[]map[string]interface{}** | -**TaskrouterTargetTaskqueueSid** | Pointer to **string** | -**TaskrouterTargetWorkflowSid** | Pointer to **string** | -**TaskrouterTaskqueues** | Pointer to **[]map[string]interface{}** | -**TaskrouterWorkerAttributes** | Pointer to **map[string]interface{}** | -**TaskrouterWorkerChannels** | Pointer to **map[string]interface{}** | -**TaskrouterWorkspaceSid** | Pointer to **string** | -**UiAttributes** | Pointer to **map[string]interface{}** | -**UiDependencies** | Pointer to **map[string]interface{}** | -**UiLanguage** | Pointer to **string** | -**UiVersion** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**Attributes** | Pointer to **map[string]interface{}** | An object that contains application-specific data | +**CallRecordingEnabled** | Pointer to **bool** | Whether call recording is enabled | +**CallRecordingWebhookUrl** | Pointer to **string** | The call recording webhook URL | +**ChatServiceInstanceSid** | Pointer to **string** | The SID of the chat service this user belongs to | +**CrmAttributes** | Pointer to **map[string]interface{}** | An object that contains the CRM attributes | +**CrmCallbackUrl** | Pointer to **string** | The CRM Callback URL | +**CrmEnabled** | Pointer to **bool** | Whether CRM is present for Flex | +**CrmFallbackUrl** | Pointer to **string** | The CRM Fallback URL | +**CrmType** | Pointer to **string** | The CRM Type | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the Configuration resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the Configuration resource was last updated | +**FlexServiceInstanceSid** | Pointer to **string** | The SID of the Flex service instance | +**Integrations** | Pointer to **[]map[string]interface{}** | A list of objects that contain the configurations for the Integrations supported in this configuration | +**Markdown** | Pointer to **map[string]interface{}** | Configurable parameters for Markdown | +**MessagingServiceInstanceSid** | Pointer to **string** | The SID of the Messaging service instance | +**Notifications** | Pointer to **map[string]interface{}** | Configurable parameters for Notifications | +**OutboundCallFlows** | Pointer to **map[string]interface{}** | The list of outbound call flows | +**PluginServiceAttributes** | Pointer to **map[string]interface{}** | The plugin service attributes | +**PluginServiceEnabled** | Pointer to **bool** | Whether the plugin service enabled | +**PublicAttributes** | Pointer to **map[string]interface{}** | The list of public attributes | +**QueueStatsConfiguration** | Pointer to **map[string]interface{}** | Configurable parameters for Queues Statistics | +**RuntimeDomain** | Pointer to **string** | The URL where the Flex instance is hosted | +**ServerlessServiceSids** | Pointer to **[]string** | The list of serverless service SIDs | +**ServiceVersion** | Pointer to **string** | The Flex Service version | +**Status** | Pointer to **string** | The status of the Flex onboarding | +**TaskrouterOfflineActivitySid** | Pointer to **string** | The TaskRouter SID of the offline activity | +**TaskrouterSkills** | Pointer to **[]map[string]interface{}** | The Skill description for TaskRouter workers | +**TaskrouterTargetTaskqueueSid** | Pointer to **string** | The SID of the TaskRouter Target TaskQueue | +**TaskrouterTargetWorkflowSid** | Pointer to **string** | The SID of the TaskRouter target Workflow | +**TaskrouterTaskqueues** | Pointer to **[]map[string]interface{}** | The list of TaskRouter TaskQueues | +**TaskrouterWorkerAttributes** | Pointer to **map[string]interface{}** | The TaskRouter Worker attributes | +**TaskrouterWorkerChannels** | Pointer to **map[string]interface{}** | The TaskRouter default channel capacities and availability for workers | +**TaskrouterWorkspaceSid** | Pointer to **string** | The SID of the TaskRouter Workspace | +**UiAttributes** | Pointer to **map[string]interface{}** | The object that describes Flex UI characteristics and settings | +**UiDependencies** | Pointer to **map[string]interface{}** | The object that defines the NPM packages and versions to be used in Hosted Flex | +**UiLanguage** | Pointer to **string** | The primary language of the Flex UI | +**UiVersion** | Pointer to **string** | The Pinned UI version | +**Url** | Pointer to **string** | The absolute URL of the Configuration resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/flex/v1/docs/FlexV1FlexFlow.md b/twilio/rest/flex/v1/docs/FlexV1FlexFlow.md index 4dea547e8..f354b2839 100644 --- a/twilio/rest/flex/v1/docs/FlexV1FlexFlow.md +++ b/twilio/rest/flex/v1/docs/FlexV1FlexFlow.md @@ -1,22 +1,22 @@ # FlexV1FlexFlow ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**ChannelType** | Pointer to [**FlexFlowChannelType**](flex_flow_channel_type.md) | -**ChatServiceSid** | Pointer to **string** | -**ContactIdentity** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**Enabled** | Pointer to **bool** | -**FriendlyName** | Pointer to **string** | -**Integration** | Pointer to **map[string]interface{}** | -**IntegrationType** | Pointer to [**FlexFlowIntegrationType**](flex_flow_integration_type.md) | -**JanitorEnabled** | Pointer to **bool** | -**LongLived** | Pointer to **bool** | -**Sid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**ChannelType** | Pointer to **string** | The channel type | +**ChatServiceSid** | Pointer to **string** | The SID of the chat service | +**ContactIdentity** | Pointer to **string** | The channel contact's Identity | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was last updated | +**Enabled** | Pointer to **bool** | Whether the Flex Flow is enabled | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the resource | +**Integration** | Pointer to **map[string]interface{}** | An object that contains specific parameters for the integration | +**IntegrationType** | Pointer to **string** | The integration type | +**JanitorEnabled** | Pointer to **bool** | Remove active Proxy sessions if the corresponding Task is deleted. | +**LongLived** | Pointer to **bool** | Re-use this chat channel for future interactions with a contact | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Url** | Pointer to **string** | The absolute URL of the Flex Flow resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/flex/v1/docs/FlexV1WebChannel.md b/twilio/rest/flex/v1/docs/FlexV1WebChannel.md index b111fdc0f..4eb3cc6b3 100644 --- a/twilio/rest/flex/v1/docs/FlexV1WebChannel.md +++ b/twilio/rest/flex/v1/docs/FlexV1WebChannel.md @@ -1,14 +1,14 @@ # FlexV1WebChannel ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**FlexFlowSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource and owns this Workflow | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was last updated | +**FlexFlowSid** | Pointer to **string** | The SID of the Flex Flow | +**Sid** | Pointer to **string** | The unique string that identifies the WebChannel resource | +**Url** | Pointer to **string** | The absolute URL of the WebChannel resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/flex/v1/docs/ListChannelResponse.md b/twilio/rest/flex/v1/docs/ListChannelResponse.md index 9e2b63313..4d08593fc 100644 --- a/twilio/rest/flex/v1/docs/ListChannelResponse.md +++ b/twilio/rest/flex/v1/docs/ListChannelResponse.md @@ -1,10 +1,10 @@ # ListChannelResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**FlexChatChannels** | [**[]FlexV1Channel**](flex.v1.channel.md) | [optional] -**Meta** | [**ListChannelResponseMeta**](ListChannelResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FlexChatChannels** | [**[]FlexV1Channel**](flex.v1.channel.md) | |[optional] +**Meta** | [**ListChannelResponseMeta**](ListChannelResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/flex/v1/docs/ListChannelResponseMeta.md b/twilio/rest/flex/v1/docs/ListChannelResponseMeta.md index e5767f20f..5a89690f6 100644 --- a/twilio/rest/flex/v1/docs/ListChannelResponseMeta.md +++ b/twilio/rest/flex/v1/docs/ListChannelResponseMeta.md @@ -1,15 +1,15 @@ # ListChannelResponseMeta ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**FirstPageUrl** | **string** | [optional] -**Key** | **string** | [optional] -**NextPageUrl** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUrl** | **string** | [optional] -**Url** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstPageUrl** | **string** | |[optional] +**Key** | **string** | |[optional] +**NextPageUrl** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUrl** | **string** | |[optional] +**Url** | **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/twilio/rest/flex/v1/docs/ListFlexFlowResponse.md b/twilio/rest/flex/v1/docs/ListFlexFlowResponse.md index eb8840e10..16099ffbc 100644 --- a/twilio/rest/flex/v1/docs/ListFlexFlowResponse.md +++ b/twilio/rest/flex/v1/docs/ListFlexFlowResponse.md @@ -1,10 +1,10 @@ # ListFlexFlowResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**FlexFlows** | [**[]FlexV1FlexFlow**](flex.v1.flex_flow.md) | [optional] -**Meta** | [**ListChannelResponseMeta**](ListChannelResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FlexFlows** | [**[]FlexV1FlexFlow**](flex.v1.flex_flow.md) | |[optional] +**Meta** | [**ListChannelResponseMeta**](ListChannelResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/flex/v1/docs/ListWebChannelResponse.md b/twilio/rest/flex/v1/docs/ListWebChannelResponse.md index cb094af29..130a6ad5b 100644 --- a/twilio/rest/flex/v1/docs/ListWebChannelResponse.md +++ b/twilio/rest/flex/v1/docs/ListWebChannelResponse.md @@ -1,10 +1,10 @@ # ListWebChannelResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**FlexChatChannels** | [**[]FlexV1WebChannel**](flex.v1.web_channel.md) | [optional] -**Meta** | [**ListChannelResponseMeta**](ListChannelResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FlexChatChannels** | [**[]FlexV1WebChannel**](flex.v1.web_channel.md) | |[optional] +**Meta** | [**ListChannelResponseMeta**](ListChannelResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/flex/v1/model_flex_v1_channel.go b/twilio/rest/flex/v1/model_flex_v1_channel.go index a01eabc43..540a6f14b 100644 --- a/twilio/rest/flex/v1/model_flex_v1_channel.go +++ b/twilio/rest/flex/v1/model_flex_v1_channel.go @@ -17,12 +17,20 @@ import ( // FlexV1Channel struct for FlexV1Channel type FlexV1Channel struct { - AccountSid *string `json:"AccountSid,omitempty"` + // The SID of the Account that created the resource and owns this Workflow + AccountSid *string `json:"AccountSid,omitempty"` + // The ISO 8601 date and time in GMT when the Flex chat channel was created DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the Flex chat channel was last updated DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FlexFlowSid *string `json:"FlexFlowSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - TaskSid *string `json:"TaskSid,omitempty"` - Url *string `json:"Url,omitempty"` - UserSid *string `json:"UserSid,omitempty"` + // The SID of the Flex Flow + FlexFlowSid *string `json:"FlexFlowSid,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The SID of the TaskRouter Task + TaskSid *string `json:"TaskSid,omitempty"` + // The absolute URL of the Flex chat channel resource + Url *string `json:"Url,omitempty"` + // The SID of the chat user + UserSid *string `json:"UserSid,omitempty"` } diff --git a/twilio/rest/flex/v1/model_flex_v1_configuration.go b/twilio/rest/flex/v1/model_flex_v1_configuration.go index d0b6df310..cca75524f 100644 --- a/twilio/rest/flex/v1/model_flex_v1_configuration.go +++ b/twilio/rest/flex/v1/model_flex_v1_configuration.go @@ -17,43 +17,82 @@ import ( // FlexV1Configuration struct for FlexV1Configuration type FlexV1Configuration struct { - AccountSid *string `json:"AccountSid,omitempty"` - Attributes *map[string]interface{} `json:"Attributes,omitempty"` - CallRecordingEnabled *bool `json:"CallRecordingEnabled,omitempty"` - CallRecordingWebhookUrl *string `json:"CallRecordingWebhookUrl,omitempty"` - ChatServiceInstanceSid *string `json:"ChatServiceInstanceSid,omitempty"` - CrmAttributes *map[string]interface{} `json:"CrmAttributes,omitempty"` - CrmCallbackUrl *string `json:"CrmCallbackUrl,omitempty"` - CrmEnabled *bool `json:"CrmEnabled,omitempty"` - CrmFallbackUrl *string `json:"CrmFallbackUrl,omitempty"` - CrmType *string `json:"CrmType,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FlexServiceInstanceSid *string `json:"FlexServiceInstanceSid,omitempty"` - Integrations *[]map[string]interface{} `json:"Integrations,omitempty"` - Markdown *map[string]interface{} `json:"Markdown,omitempty"` - MessagingServiceInstanceSid *string `json:"MessagingServiceInstanceSid,omitempty"` - Notifications *map[string]interface{} `json:"Notifications,omitempty"` - OutboundCallFlows *map[string]interface{} `json:"OutboundCallFlows,omitempty"` - PluginServiceAttributes *map[string]interface{} `json:"PluginServiceAttributes,omitempty"` - PluginServiceEnabled *bool `json:"PluginServiceEnabled,omitempty"` - PublicAttributes *map[string]interface{} `json:"PublicAttributes,omitempty"` - QueueStatsConfiguration *map[string]interface{} `json:"QueueStatsConfiguration,omitempty"` - RuntimeDomain *string `json:"RuntimeDomain,omitempty"` - ServerlessServiceSids *[]string `json:"ServerlessServiceSids,omitempty"` - ServiceVersion *string `json:"ServiceVersion,omitempty"` - Status *ConfigurationStatus `json:"Status,omitempty"` - TaskrouterOfflineActivitySid *string `json:"TaskrouterOfflineActivitySid,omitempty"` - TaskrouterSkills *[]map[string]interface{} `json:"TaskrouterSkills,omitempty"` - TaskrouterTargetTaskqueueSid *string `json:"TaskrouterTargetTaskqueueSid,omitempty"` - TaskrouterTargetWorkflowSid *string `json:"TaskrouterTargetWorkflowSid,omitempty"` - TaskrouterTaskqueues *[]map[string]interface{} `json:"TaskrouterTaskqueues,omitempty"` - TaskrouterWorkerAttributes *map[string]interface{} `json:"TaskrouterWorkerAttributes,omitempty"` - TaskrouterWorkerChannels *map[string]interface{} `json:"TaskrouterWorkerChannels,omitempty"` - TaskrouterWorkspaceSid *string `json:"TaskrouterWorkspaceSid,omitempty"` - UiAttributes *map[string]interface{} `json:"UiAttributes,omitempty"` - UiDependencies *map[string]interface{} `json:"UiDependencies,omitempty"` - UiLanguage *string `json:"UiLanguage,omitempty"` - UiVersion *string `json:"UiVersion,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // An object that contains application-specific data + Attributes *map[string]interface{} `json:"Attributes,omitempty"` + // Whether call recording is enabled + CallRecordingEnabled *bool `json:"CallRecordingEnabled,omitempty"` + // The call recording webhook URL + CallRecordingWebhookUrl *string `json:"CallRecordingWebhookUrl,omitempty"` + // The SID of the chat service this user belongs to + ChatServiceInstanceSid *string `json:"ChatServiceInstanceSid,omitempty"` + // An object that contains the CRM attributes + CrmAttributes *map[string]interface{} `json:"CrmAttributes,omitempty"` + // The CRM Callback URL + CrmCallbackUrl *string `json:"CrmCallbackUrl,omitempty"` + // Whether CRM is present for Flex + CrmEnabled *bool `json:"CrmEnabled,omitempty"` + // The CRM Fallback URL + CrmFallbackUrl *string `json:"CrmFallbackUrl,omitempty"` + // The CRM Type + CrmType *string `json:"CrmType,omitempty"` + // The ISO 8601 date and time in GMT when the Configuration resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the Configuration resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The SID of the Flex service instance + FlexServiceInstanceSid *string `json:"FlexServiceInstanceSid,omitempty"` + // A list of objects that contain the configurations for the Integrations supported in this configuration + Integrations *[]map[string]interface{} `json:"Integrations,omitempty"` + // Configurable parameters for Markdown + Markdown *map[string]interface{} `json:"Markdown,omitempty"` + // The SID of the Messaging service instance + MessagingServiceInstanceSid *string `json:"MessagingServiceInstanceSid,omitempty"` + // Configurable parameters for Notifications + Notifications *map[string]interface{} `json:"Notifications,omitempty"` + // The list of outbound call flows + OutboundCallFlows *map[string]interface{} `json:"OutboundCallFlows,omitempty"` + // The plugin service attributes + PluginServiceAttributes *map[string]interface{} `json:"PluginServiceAttributes,omitempty"` + // Whether the plugin service enabled + PluginServiceEnabled *bool `json:"PluginServiceEnabled,omitempty"` + // The list of public attributes + PublicAttributes *map[string]interface{} `json:"PublicAttributes,omitempty"` + // Configurable parameters for Queues Statistics + QueueStatsConfiguration *map[string]interface{} `json:"QueueStatsConfiguration,omitempty"` + // The URL where the Flex instance is hosted + RuntimeDomain *string `json:"RuntimeDomain,omitempty"` + // The list of serverless service SIDs + ServerlessServiceSids *[]string `json:"ServerlessServiceSids,omitempty"` + // The Flex Service version + ServiceVersion *string `json:"ServiceVersion,omitempty"` + // The status of the Flex onboarding + Status *string `json:"Status,omitempty"` + // The TaskRouter SID of the offline activity + TaskrouterOfflineActivitySid *string `json:"TaskrouterOfflineActivitySid,omitempty"` + // The Skill description for TaskRouter workers + TaskrouterSkills *[]map[string]interface{} `json:"TaskrouterSkills,omitempty"` + // The SID of the TaskRouter Target TaskQueue + TaskrouterTargetTaskqueueSid *string `json:"TaskrouterTargetTaskqueueSid,omitempty"` + // The SID of the TaskRouter target Workflow + TaskrouterTargetWorkflowSid *string `json:"TaskrouterTargetWorkflowSid,omitempty"` + // The list of TaskRouter TaskQueues + TaskrouterTaskqueues *[]map[string]interface{} `json:"TaskrouterTaskqueues,omitempty"` + // The TaskRouter Worker attributes + TaskrouterWorkerAttributes *map[string]interface{} `json:"TaskrouterWorkerAttributes,omitempty"` + // The TaskRouter default channel capacities and availability for workers + TaskrouterWorkerChannels *map[string]interface{} `json:"TaskrouterWorkerChannels,omitempty"` + // The SID of the TaskRouter Workspace + TaskrouterWorkspaceSid *string `json:"TaskrouterWorkspaceSid,omitempty"` + // The object that describes Flex UI characteristics and settings + UiAttributes *map[string]interface{} `json:"UiAttributes,omitempty"` + // The object that defines the NPM packages and versions to be used in Hosted Flex + UiDependencies *map[string]interface{} `json:"UiDependencies,omitempty"` + // The primary language of the Flex UI + UiLanguage *string `json:"UiLanguage,omitempty"` + // The Pinned UI version + UiVersion *string `json:"UiVersion,omitempty"` + // The absolute URL of the Configuration resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/flex/v1/model_flex_v1_flex_flow.go b/twilio/rest/flex/v1/model_flex_v1_flex_flow.go index 26dc9fc60..f21e4c781 100644 --- a/twilio/rest/flex/v1/model_flex_v1_flex_flow.go +++ b/twilio/rest/flex/v1/model_flex_v1_flex_flow.go @@ -17,18 +17,32 @@ import ( // FlexV1FlexFlow struct for FlexV1FlexFlow type FlexV1FlexFlow struct { - AccountSid *string `json:"AccountSid,omitempty"` - ChannelType *FlexFlowChannelType `json:"ChannelType,omitempty"` - ChatServiceSid *string `json:"ChatServiceSid,omitempty"` - ContactIdentity *string `json:"ContactIdentity,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Enabled *bool `json:"Enabled,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Integration *map[string]interface{} `json:"Integration,omitempty"` - IntegrationType *FlexFlowIntegrationType `json:"IntegrationType,omitempty"` - JanitorEnabled *bool `json:"JanitorEnabled,omitempty"` - LongLived *bool `json:"LongLived,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The channel type + ChannelType *string `json:"ChannelType,omitempty"` + // The SID of the chat service + ChatServiceSid *string `json:"ChatServiceSid,omitempty"` + // The channel contact's Identity + ContactIdentity *string `json:"ContactIdentity,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // Whether the Flex Flow is enabled + Enabled *bool `json:"Enabled,omitempty"` + // The string that you assigned to describe the resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // An object that contains specific parameters for the integration + Integration *map[string]interface{} `json:"Integration,omitempty"` + // The integration type + IntegrationType *string `json:"IntegrationType,omitempty"` + // Remove active Proxy sessions if the corresponding Task is deleted. + JanitorEnabled *bool `json:"JanitorEnabled,omitempty"` + // Re-use this chat channel for future interactions with a contact + LongLived *bool `json:"LongLived,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The absolute URL of the Flex Flow resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/flex/v1/model_flex_v1_web_channel.go b/twilio/rest/flex/v1/model_flex_v1_web_channel.go index 185cc8be2..f031c7d46 100644 --- a/twilio/rest/flex/v1/model_flex_v1_web_channel.go +++ b/twilio/rest/flex/v1/model_flex_v1_web_channel.go @@ -17,10 +17,16 @@ import ( // FlexV1WebChannel struct for FlexV1WebChannel type FlexV1WebChannel struct { - AccountSid *string `json:"AccountSid,omitempty"` + // The SID of the Account that created the resource and owns this Workflow + AccountSid *string `json:"AccountSid,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the resource was last updated DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FlexFlowSid *string `json:"FlexFlowSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Flex Flow + FlexFlowSid *string `json:"FlexFlowSid,omitempty"` + // The unique string that identifies the WebChannel resource + Sid *string `json:"Sid,omitempty"` + // The absolute URL of the WebChannel resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/insights/v1/README.md b/twilio/rest/insights/v1/README.md index 1ede99bfb..46db2d0f3 100644 --- a/twilio/rest/insights/v1/README.md +++ b/twilio/rest/insights/v1/README.md @@ -43,9 +43,6 @@ Class | Method | HTTP request | Description ## Documentation For Models - - [EventLevel](docs/EventLevel.md) - - [EventTwilioEdge](docs/EventTwilioEdge.md) - - [HttpMethod](docs/HttpMethod.md) - [InsightsV1Call](docs/InsightsV1Call.md) - [InsightsV1CallEvent](docs/InsightsV1CallEvent.md) - [InsightsV1CallMetric](docs/InsightsV1CallMetric.md) @@ -57,21 +54,6 @@ Class | Method | HTTP request | Description - [ListVideoParticipantSummaryResponse](docs/ListVideoParticipantSummaryResponse.md) - [ListVideoRoomSummaryResponse](docs/ListVideoRoomSummaryResponse.md) - [ListVideoRoomSummaryResponseMeta](docs/ListVideoRoomSummaryResponseMeta.md) - - [MetricStreamDirection](docs/MetricStreamDirection.md) - - [MetricTwilioEdge](docs/MetricTwilioEdge.md) - - [SummaryCallState](docs/SummaryCallState.md) - - [SummaryCallType](docs/SummaryCallType.md) - - [SummaryProcessingState](docs/SummaryProcessingState.md) - - [VideoParticipantSummaryEdgeLocation](docs/VideoParticipantSummaryEdgeLocation.md) - - [VideoParticipantSummaryRoomStatus](docs/VideoParticipantSummaryRoomStatus.md) - - [VideoParticipantSummaryTwilioRealm](docs/VideoParticipantSummaryTwilioRealm.md) - - [VideoRoomSummaryCreatedMethod](docs/VideoRoomSummaryCreatedMethod.md) - - [VideoRoomSummaryEdgeLocation](docs/VideoRoomSummaryEdgeLocation.md) - - [VideoRoomSummaryEndReason](docs/VideoRoomSummaryEndReason.md) - - [VideoRoomSummaryProcessingState](docs/VideoRoomSummaryProcessingState.md) - - [VideoRoomSummaryRoomStatus](docs/VideoRoomSummaryRoomStatus.md) - - [VideoRoomSummaryRoomType](docs/VideoRoomSummaryRoomType.md) - - [VideoRoomSummaryTwilioRealm](docs/VideoRoomSummaryTwilioRealm.md) ## Documentation For Authorization diff --git a/twilio/rest/insights/v1/docs/InsightsV1Call.md b/twilio/rest/insights/v1/docs/InsightsV1Call.md index 8a22bfaed..a898b2849 100644 --- a/twilio/rest/insights/v1/docs/InsightsV1Call.md +++ b/twilio/rest/insights/v1/docs/InsightsV1Call.md @@ -1,11 +1,11 @@ # InsightsV1Call ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Links** | Pointer to **map[string]interface{}** | -**Sid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Links** | Pointer to **map[string]interface{}** | | +**Sid** | Pointer to **string** | | +**Url** | Pointer to **string** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/insights/v1/docs/InsightsV1CallEvent.md b/twilio/rest/insights/v1/docs/InsightsV1CallEvent.md index bb23f586a..098380df5 100644 --- a/twilio/rest/insights/v1/docs/InsightsV1CallEvent.md +++ b/twilio/rest/insights/v1/docs/InsightsV1CallEvent.md @@ -1,19 +1,19 @@ # InsightsV1CallEvent ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**CallSid** | Pointer to **string** | -**CarrierEdge** | Pointer to **map[string]interface{}** | -**ClientEdge** | Pointer to **map[string]interface{}** | -**Edge** | Pointer to [**EventTwilioEdge**](event_twilio_edge.md) | -**Group** | Pointer to **string** | -**Level** | Pointer to [**EventLevel**](event_level.md) | -**Name** | Pointer to **string** | -**SdkEdge** | Pointer to **map[string]interface{}** | -**SipEdge** | Pointer to **map[string]interface{}** | -**Timestamp** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | | +**CallSid** | Pointer to **string** | | +**CarrierEdge** | Pointer to **map[string]interface{}** | | +**ClientEdge** | Pointer to **map[string]interface{}** | | +**Edge** | Pointer to **string** | | +**Group** | Pointer to **string** | | +**Level** | Pointer to **string** | | +**Name** | Pointer to **string** | | +**SdkEdge** | Pointer to **map[string]interface{}** | | +**SipEdge** | Pointer to **map[string]interface{}** | | +**Timestamp** | Pointer to **string** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/insights/v1/docs/InsightsV1CallMetric.md b/twilio/rest/insights/v1/docs/InsightsV1CallMetric.md index 741432a77..caab68eff 100644 --- a/twilio/rest/insights/v1/docs/InsightsV1CallMetric.md +++ b/twilio/rest/insights/v1/docs/InsightsV1CallMetric.md @@ -1,17 +1,17 @@ # InsightsV1CallMetric ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**CallSid** | Pointer to **string** | -**CarrierEdge** | Pointer to **map[string]interface{}** | -**ClientEdge** | Pointer to **map[string]interface{}** | -**Direction** | Pointer to [**MetricStreamDirection**](metric_stream_direction.md) | -**Edge** | Pointer to [**MetricTwilioEdge**](metric_twilio_edge.md) | -**SdkEdge** | Pointer to **map[string]interface{}** | -**SipEdge** | Pointer to **map[string]interface{}** | -**Timestamp** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | | +**CallSid** | Pointer to **string** | | +**CarrierEdge** | Pointer to **map[string]interface{}** | | +**ClientEdge** | Pointer to **map[string]interface{}** | | +**Direction** | Pointer to **string** | | +**Edge** | Pointer to **string** | | +**SdkEdge** | Pointer to **map[string]interface{}** | | +**SipEdge** | Pointer to **map[string]interface{}** | | +**Timestamp** | Pointer to **string** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/insights/v1/docs/InsightsV1CallSummary.md b/twilio/rest/insights/v1/docs/InsightsV1CallSummary.md index c0fb1c239..cffcc8c36 100644 --- a/twilio/rest/insights/v1/docs/InsightsV1CallSummary.md +++ b/twilio/rest/insights/v1/docs/InsightsV1CallSummary.md @@ -1,29 +1,29 @@ # InsightsV1CallSummary ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Attributes** | Pointer to **map[string]interface{}** | -**CallSid** | Pointer to **string** | -**CallState** | Pointer to [**SummaryCallState**](summary_call_state.md) | -**CallType** | Pointer to [**SummaryCallType**](summary_call_type.md) | -**CarrierEdge** | Pointer to **map[string]interface{}** | -**ClientEdge** | Pointer to **map[string]interface{}** | -**ConnectDuration** | Pointer to **int32** | -**CreatedTime** | Pointer to [**time.Time**](time.Time.md) | -**Duration** | Pointer to **int32** | -**EndTime** | Pointer to [**time.Time**](time.Time.md) | -**From** | Pointer to **map[string]interface{}** | -**ProcessingState** | Pointer to [**SummaryProcessingState**](summary_processing_state.md) | -**Properties** | Pointer to **map[string]interface{}** | -**SdkEdge** | Pointer to **map[string]interface{}** | -**SipEdge** | Pointer to **map[string]interface{}** | -**StartTime** | Pointer to [**time.Time**](time.Time.md) | -**Tags** | Pointer to **[]string** | -**To** | Pointer to **map[string]interface{}** | -**Trust** | Pointer to **map[string]interface{}** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | | +**Attributes** | Pointer to **map[string]interface{}** | | +**CallSid** | Pointer to **string** | | +**CallState** | Pointer to **string** | | +**CallType** | Pointer to **string** | | +**CarrierEdge** | Pointer to **map[string]interface{}** | | +**ClientEdge** | Pointer to **map[string]interface{}** | | +**ConnectDuration** | Pointer to **int32** | | +**CreatedTime** | Pointer to [**time.Time**](time.Time.md) | | +**Duration** | Pointer to **int32** | | +**EndTime** | Pointer to [**time.Time**](time.Time.md) | | +**From** | Pointer to **map[string]interface{}** | | +**ProcessingState** | Pointer to **string** | | +**Properties** | Pointer to **map[string]interface{}** | | +**SdkEdge** | Pointer to **map[string]interface{}** | | +**SipEdge** | Pointer to **map[string]interface{}** | | +**StartTime** | Pointer to [**time.Time**](time.Time.md) | | +**Tags** | Pointer to **[]string** | | +**To** | Pointer to **map[string]interface{}** | | +**Trust** | Pointer to **map[string]interface{}** | | +**Url** | Pointer to **string** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/insights/v1/docs/InsightsV1VideoRoomSummary.md b/twilio/rest/insights/v1/docs/InsightsV1VideoRoomSummary.md index 05902b3e6..448aa8f41 100644 --- a/twilio/rest/insights/v1/docs/InsightsV1VideoRoomSummary.md +++ b/twilio/rest/insights/v1/docs/InsightsV1VideoRoomSummary.md @@ -1,34 +1,34 @@ # InsightsV1VideoRoomSummary ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Codecs** | Pointer to **[]string** | -**ConcurrentParticipants** | Pointer to **int32** | -**CreateTime** | Pointer to [**time.Time**](time.Time.md) | -**CreatedMethod** | Pointer to [**VideoRoomSummaryCreatedMethod**](video_room_summary_created_method.md) | -**DurationSec** | Pointer to **int32** | -**EdgeLocation** | Pointer to [**VideoRoomSummaryEdgeLocation**](video_room_summary_edge_location.md) | -**EndReason** | Pointer to [**VideoRoomSummaryEndReason**](video_room_summary_end_reason.md) | -**EndTime** | Pointer to [**time.Time**](time.Time.md) | -**Links** | Pointer to **map[string]interface{}** | -**MaxConcurrentParticipants** | Pointer to **int32** | -**MaxParticipants** | Pointer to **int32** | -**MediaRegion** | Pointer to [**VideoRoomSummaryTwilioRealm**](video_room_summary_twilio_realm.md) | -**ProcessingState** | Pointer to [**VideoRoomSummaryProcessingState**](video_room_summary_processing_state.md) | -**RecordingEnabled** | Pointer to **bool** | -**RoomName** | Pointer to **string** | -**RoomSid** | Pointer to **string** | -**RoomStatus** | Pointer to [**VideoRoomSummaryRoomStatus**](video_room_summary_room_status.md) | -**RoomType** | Pointer to [**VideoRoomSummaryRoomType**](video_room_summary_room_type.md) | -**StatusCallback** | Pointer to **string** | -**StatusCallbackMethod** | Pointer to [**HttpMethod**](http_method.md) | -**TotalParticipantDurationSec** | Pointer to **int32** | -**TotalRecordingDurationSec** | Pointer to **int32** | -**UniqueParticipantIdentities** | Pointer to **int32** | -**UniqueParticipants** | Pointer to **int32** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | | +**Codecs** | Pointer to **[]string** | | +**ConcurrentParticipants** | Pointer to **int32** | | +**CreateTime** | Pointer to [**time.Time**](time.Time.md) | | +**CreatedMethod** | Pointer to **string** | | +**DurationSec** | Pointer to **int32** | | +**EdgeLocation** | Pointer to **string** | | +**EndReason** | Pointer to **string** | | +**EndTime** | Pointer to [**time.Time**](time.Time.md) | | +**Links** | Pointer to **map[string]interface{}** | | +**MaxConcurrentParticipants** | Pointer to **int32** | | +**MaxParticipants** | Pointer to **int32** | | +**MediaRegion** | Pointer to **string** | | +**ProcessingState** | Pointer to **string** | | +**RecordingEnabled** | Pointer to **bool** | | +**RoomName** | Pointer to **string** | | +**RoomSid** | Pointer to **string** | | +**RoomStatus** | Pointer to **string** | | +**RoomType** | Pointer to **string** | | +**StatusCallback** | Pointer to **string** | | +**StatusCallbackMethod** | Pointer to **string** | | +**TotalParticipantDurationSec** | Pointer to **int32** | | +**TotalRecordingDurationSec** | Pointer to **int32** | | +**UniqueParticipantIdentities** | Pointer to **int32** | | +**UniqueParticipants** | Pointer to **int32** | | +**Url** | Pointer to **string** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/insights/v1/docs/InsightsV1VideoRoomSummaryVideoParticipantSummary.md b/twilio/rest/insights/v1/docs/InsightsV1VideoRoomSummaryVideoParticipantSummary.md index 44bdb1be2..c6901ef1e 100644 --- a/twilio/rest/insights/v1/docs/InsightsV1VideoRoomSummaryVideoParticipantSummary.md +++ b/twilio/rest/insights/v1/docs/InsightsV1VideoRoomSummaryVideoParticipantSummary.md @@ -1,25 +1,25 @@ # InsightsV1VideoRoomSummaryVideoParticipantSummary ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Codecs** | Pointer to **[]string** | -**DurationSec** | Pointer to **int32** | -**EdgeLocation** | Pointer to [**VideoParticipantSummaryEdgeLocation**](video_participant_summary_edge_location.md) | -**EndReason** | Pointer to **string** | -**ErrorCode** | Pointer to **int32** | -**ErrorCodeUrl** | Pointer to **string** | -**JoinTime** | Pointer to [**time.Time**](time.Time.md) | -**LeaveTime** | Pointer to [**time.Time**](time.Time.md) | -**MediaRegion** | Pointer to [**VideoParticipantSummaryTwilioRealm**](video_participant_summary_twilio_realm.md) | -**ParticipantIdentity** | Pointer to **string** | -**ParticipantSid** | Pointer to **string** | -**Properties** | Pointer to **map[string]interface{}** | -**PublisherInfo** | Pointer to **map[string]interface{}** | -**RoomSid** | Pointer to **string** | -**Status** | Pointer to [**VideoParticipantSummaryRoomStatus**](video_participant_summary_room_status.md) | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | | +**Codecs** | Pointer to **[]string** | | +**DurationSec** | Pointer to **int32** | | +**EdgeLocation** | Pointer to **string** | | +**EndReason** | Pointer to **string** | | +**ErrorCode** | Pointer to **int32** | | +**ErrorCodeUrl** | Pointer to **string** | | +**JoinTime** | Pointer to [**time.Time**](time.Time.md) | | +**LeaveTime** | Pointer to [**time.Time**](time.Time.md) | | +**MediaRegion** | Pointer to **string** | | +**ParticipantIdentity** | Pointer to **string** | | +**ParticipantSid** | Pointer to **string** | | +**Properties** | Pointer to **map[string]interface{}** | | +**PublisherInfo** | Pointer to **map[string]interface{}** | | +**RoomSid** | Pointer to **string** | | +**Status** | Pointer to **string** | | +**Url** | Pointer to **string** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/insights/v1/docs/ListEventResponse.md b/twilio/rest/insights/v1/docs/ListEventResponse.md index 5201202bd..3e547ba2e 100644 --- a/twilio/rest/insights/v1/docs/ListEventResponse.md +++ b/twilio/rest/insights/v1/docs/ListEventResponse.md @@ -1,10 +1,10 @@ # ListEventResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Events** | [**[]InsightsV1CallEvent**](insights.v1.call.event.md) | [optional] -**Meta** | [**ListVideoRoomSummaryResponseMeta**](ListVideoRoomSummaryResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Events** | [**[]InsightsV1CallEvent**](insights.v1.call.event.md) | |[optional] +**Meta** | [**ListVideoRoomSummaryResponseMeta**](ListVideoRoomSummaryResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/insights/v1/docs/ListMetricResponse.md b/twilio/rest/insights/v1/docs/ListMetricResponse.md index 739d676f7..b580ac30c 100644 --- a/twilio/rest/insights/v1/docs/ListMetricResponse.md +++ b/twilio/rest/insights/v1/docs/ListMetricResponse.md @@ -1,10 +1,10 @@ # ListMetricResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListVideoRoomSummaryResponseMeta**](ListVideoRoomSummaryResponse_meta.md) | [optional] -**Metrics** | [**[]InsightsV1CallMetric**](insights.v1.call.metric.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListVideoRoomSummaryResponseMeta**](ListVideoRoomSummaryResponse_meta.md) | |[optional] +**Metrics** | [**[]InsightsV1CallMetric**](insights.v1.call.metric.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/insights/v1/docs/ListVideoParticipantSummaryResponse.md b/twilio/rest/insights/v1/docs/ListVideoParticipantSummaryResponse.md index 6b1e77b04..ae60fc06b 100644 --- a/twilio/rest/insights/v1/docs/ListVideoParticipantSummaryResponse.md +++ b/twilio/rest/insights/v1/docs/ListVideoParticipantSummaryResponse.md @@ -1,10 +1,10 @@ # ListVideoParticipantSummaryResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListVideoRoomSummaryResponseMeta**](ListVideoRoomSummaryResponse_meta.md) | [optional] -**Participants** | [**[]InsightsV1VideoRoomSummaryVideoParticipantSummary**](insights.v1.video_room_summary.video_participant_summary.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListVideoRoomSummaryResponseMeta**](ListVideoRoomSummaryResponse_meta.md) | |[optional] +**Participants** | [**[]InsightsV1VideoRoomSummaryVideoParticipantSummary**](insights.v1.video_room_summary.video_participant_summary.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/insights/v1/docs/ListVideoRoomSummaryResponse.md b/twilio/rest/insights/v1/docs/ListVideoRoomSummaryResponse.md index 7de110bc5..a7e5ec11c 100644 --- a/twilio/rest/insights/v1/docs/ListVideoRoomSummaryResponse.md +++ b/twilio/rest/insights/v1/docs/ListVideoRoomSummaryResponse.md @@ -1,10 +1,10 @@ # ListVideoRoomSummaryResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListVideoRoomSummaryResponseMeta**](ListVideoRoomSummaryResponse_meta.md) | [optional] -**Rooms** | [**[]InsightsV1VideoRoomSummary**](insights.v1.video_room_summary.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListVideoRoomSummaryResponseMeta**](ListVideoRoomSummaryResponse_meta.md) | |[optional] +**Rooms** | [**[]InsightsV1VideoRoomSummary**](insights.v1.video_room_summary.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/insights/v1/docs/ListVideoRoomSummaryResponseMeta.md b/twilio/rest/insights/v1/docs/ListVideoRoomSummaryResponseMeta.md index fd46bdc05..0f8f74ae7 100644 --- a/twilio/rest/insights/v1/docs/ListVideoRoomSummaryResponseMeta.md +++ b/twilio/rest/insights/v1/docs/ListVideoRoomSummaryResponseMeta.md @@ -1,15 +1,15 @@ # ListVideoRoomSummaryResponseMeta ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**FirstPageUrl** | **string** | [optional] -**Key** | **string** | [optional] -**NextPageUrl** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUrl** | **string** | [optional] -**Url** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstPageUrl** | **string** | |[optional] +**Key** | **string** | |[optional] +**NextPageUrl** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUrl** | **string** | |[optional] +**Url** | **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/twilio/rest/insights/v1/model_insights_v1_call_event.go b/twilio/rest/insights/v1/model_insights_v1_call_event.go index 8f4e0b77a..5b914a16e 100644 --- a/twilio/rest/insights/v1/model_insights_v1_call_event.go +++ b/twilio/rest/insights/v1/model_insights_v1_call_event.go @@ -17,9 +17,9 @@ type InsightsV1CallEvent struct { CallSid *string `json:"CallSid,omitempty"` CarrierEdge *map[string]interface{} `json:"CarrierEdge,omitempty"` ClientEdge *map[string]interface{} `json:"ClientEdge,omitempty"` - Edge *EventTwilioEdge `json:"Edge,omitempty"` + Edge *string `json:"Edge,omitempty"` Group *string `json:"Group,omitempty"` - Level *EventLevel `json:"Level,omitempty"` + Level *string `json:"Level,omitempty"` Name *string `json:"Name,omitempty"` SdkEdge *map[string]interface{} `json:"SdkEdge,omitempty"` SipEdge *map[string]interface{} `json:"SipEdge,omitempty"` diff --git a/twilio/rest/insights/v1/model_insights_v1_call_metric.go b/twilio/rest/insights/v1/model_insights_v1_call_metric.go index f1ae0c126..c6e293d40 100644 --- a/twilio/rest/insights/v1/model_insights_v1_call_metric.go +++ b/twilio/rest/insights/v1/model_insights_v1_call_metric.go @@ -17,8 +17,8 @@ type InsightsV1CallMetric struct { CallSid *string `json:"CallSid,omitempty"` CarrierEdge *map[string]interface{} `json:"CarrierEdge,omitempty"` ClientEdge *map[string]interface{} `json:"ClientEdge,omitempty"` - Direction *MetricStreamDirection `json:"Direction,omitempty"` - Edge *MetricTwilioEdge `json:"Edge,omitempty"` + Direction *string `json:"Direction,omitempty"` + Edge *string `json:"Edge,omitempty"` SdkEdge *map[string]interface{} `json:"SdkEdge,omitempty"` SipEdge *map[string]interface{} `json:"SipEdge,omitempty"` Timestamp *string `json:"Timestamp,omitempty"` diff --git a/twilio/rest/insights/v1/model_insights_v1_call_summary.go b/twilio/rest/insights/v1/model_insights_v1_call_summary.go index c5b417490..faf5c3616 100644 --- a/twilio/rest/insights/v1/model_insights_v1_call_summary.go +++ b/twilio/rest/insights/v1/model_insights_v1_call_summary.go @@ -20,8 +20,8 @@ type InsightsV1CallSummary struct { AccountSid *string `json:"AccountSid,omitempty"` Attributes *map[string]interface{} `json:"Attributes,omitempty"` CallSid *string `json:"CallSid,omitempty"` - CallState *SummaryCallState `json:"CallState,omitempty"` - CallType *SummaryCallType `json:"CallType,omitempty"` + CallState *string `json:"CallState,omitempty"` + CallType *string `json:"CallType,omitempty"` CarrierEdge *map[string]interface{} `json:"CarrierEdge,omitempty"` ClientEdge *map[string]interface{} `json:"ClientEdge,omitempty"` ConnectDuration *int32 `json:"ConnectDuration,omitempty"` @@ -29,7 +29,7 @@ type InsightsV1CallSummary struct { Duration *int32 `json:"Duration,omitempty"` EndTime *time.Time `json:"EndTime,omitempty"` From *map[string]interface{} `json:"From,omitempty"` - ProcessingState *SummaryProcessingState `json:"ProcessingState,omitempty"` + ProcessingState *string `json:"ProcessingState,omitempty"` Properties *map[string]interface{} `json:"Properties,omitempty"` SdkEdge *map[string]interface{} `json:"SdkEdge,omitempty"` SipEdge *map[string]interface{} `json:"SipEdge,omitempty"` diff --git a/twilio/rest/insights/v1/model_insights_v1_video_room_summary.go b/twilio/rest/insights/v1/model_insights_v1_video_room_summary.go index bf6698dd7..7a78fc55e 100644 --- a/twilio/rest/insights/v1/model_insights_v1_video_room_summary.go +++ b/twilio/rest/insights/v1/model_insights_v1_video_room_summary.go @@ -17,30 +17,30 @@ import ( // InsightsV1VideoRoomSummary struct for InsightsV1VideoRoomSummary type InsightsV1VideoRoomSummary struct { - AccountSid *string `json:"AccountSid,omitempty"` - Codecs *[]string `json:"Codecs,omitempty"` - ConcurrentParticipants *int32 `json:"ConcurrentParticipants,omitempty"` - CreateTime *time.Time `json:"CreateTime,omitempty"` - CreatedMethod *VideoRoomSummaryCreatedMethod `json:"CreatedMethod,omitempty"` - DurationSec *int32 `json:"DurationSec,omitempty"` - EdgeLocation *VideoRoomSummaryEdgeLocation `json:"EdgeLocation,omitempty"` - EndReason *VideoRoomSummaryEndReason `json:"EndReason,omitempty"` - EndTime *time.Time `json:"EndTime,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - MaxConcurrentParticipants *int32 `json:"MaxConcurrentParticipants,omitempty"` - MaxParticipants *int32 `json:"MaxParticipants,omitempty"` - MediaRegion *VideoRoomSummaryTwilioRealm `json:"MediaRegion,omitempty"` - ProcessingState *VideoRoomSummaryProcessingState `json:"ProcessingState,omitempty"` - RecordingEnabled *bool `json:"RecordingEnabled,omitempty"` - RoomName *string `json:"RoomName,omitempty"` - RoomSid *string `json:"RoomSid,omitempty"` - RoomStatus *VideoRoomSummaryRoomStatus `json:"RoomStatus,omitempty"` - RoomType *VideoRoomSummaryRoomType `json:"RoomType,omitempty"` - StatusCallback *string `json:"StatusCallback,omitempty"` - StatusCallbackMethod *HttpMethod `json:"StatusCallbackMethod,omitempty"` - TotalParticipantDurationSec *int32 `json:"TotalParticipantDurationSec,omitempty"` - TotalRecordingDurationSec *int32 `json:"TotalRecordingDurationSec,omitempty"` - UniqueParticipantIdentities *int32 `json:"UniqueParticipantIdentities,omitempty"` - UniqueParticipants *int32 `json:"UniqueParticipants,omitempty"` - Url *string `json:"Url,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` + Codecs *[]string `json:"Codecs,omitempty"` + ConcurrentParticipants *int32 `json:"ConcurrentParticipants,omitempty"` + CreateTime *time.Time `json:"CreateTime,omitempty"` + CreatedMethod *string `json:"CreatedMethod,omitempty"` + DurationSec *int32 `json:"DurationSec,omitempty"` + EdgeLocation *string `json:"EdgeLocation,omitempty"` + EndReason *string `json:"EndReason,omitempty"` + EndTime *time.Time `json:"EndTime,omitempty"` + Links *map[string]interface{} `json:"Links,omitempty"` + MaxConcurrentParticipants *int32 `json:"MaxConcurrentParticipants,omitempty"` + MaxParticipants *int32 `json:"MaxParticipants,omitempty"` + MediaRegion *string `json:"MediaRegion,omitempty"` + ProcessingState *string `json:"ProcessingState,omitempty"` + RecordingEnabled *bool `json:"RecordingEnabled,omitempty"` + RoomName *string `json:"RoomName,omitempty"` + RoomSid *string `json:"RoomSid,omitempty"` + RoomStatus *string `json:"RoomStatus,omitempty"` + RoomType *string `json:"RoomType,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` + StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` + TotalParticipantDurationSec *int32 `json:"TotalParticipantDurationSec,omitempty"` + TotalRecordingDurationSec *int32 `json:"TotalRecordingDurationSec,omitempty"` + UniqueParticipantIdentities *int32 `json:"UniqueParticipantIdentities,omitempty"` + UniqueParticipants *int32 `json:"UniqueParticipants,omitempty"` + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/insights/v1/model_insights_v1_video_room_summary_video_participant_summary.go b/twilio/rest/insights/v1/model_insights_v1_video_room_summary_video_participant_summary.go index a92e35e73..3da85601d 100644 --- a/twilio/rest/insights/v1/model_insights_v1_video_room_summary_video_participant_summary.go +++ b/twilio/rest/insights/v1/model_insights_v1_video_room_summary_video_participant_summary.go @@ -17,21 +17,21 @@ import ( // InsightsV1VideoRoomSummaryVideoParticipantSummary struct for InsightsV1VideoRoomSummaryVideoParticipantSummary type InsightsV1VideoRoomSummaryVideoParticipantSummary struct { - AccountSid *string `json:"AccountSid,omitempty"` - Codecs *[]string `json:"Codecs,omitempty"` - DurationSec *int32 `json:"DurationSec,omitempty"` - EdgeLocation *VideoParticipantSummaryEdgeLocation `json:"EdgeLocation,omitempty"` - EndReason *string `json:"EndReason,omitempty"` - ErrorCode *int32 `json:"ErrorCode,omitempty"` - ErrorCodeUrl *string `json:"ErrorCodeUrl,omitempty"` - JoinTime *time.Time `json:"JoinTime,omitempty"` - LeaveTime *time.Time `json:"LeaveTime,omitempty"` - MediaRegion *VideoParticipantSummaryTwilioRealm `json:"MediaRegion,omitempty"` - ParticipantIdentity *string `json:"ParticipantIdentity,omitempty"` - ParticipantSid *string `json:"ParticipantSid,omitempty"` - Properties *map[string]interface{} `json:"Properties,omitempty"` - PublisherInfo *map[string]interface{} `json:"PublisherInfo,omitempty"` - RoomSid *string `json:"RoomSid,omitempty"` - Status *VideoParticipantSummaryRoomStatus `json:"Status,omitempty"` - Url *string `json:"Url,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` + Codecs *[]string `json:"Codecs,omitempty"` + DurationSec *int32 `json:"DurationSec,omitempty"` + EdgeLocation *string `json:"EdgeLocation,omitempty"` + EndReason *string `json:"EndReason,omitempty"` + ErrorCode *int32 `json:"ErrorCode,omitempty"` + ErrorCodeUrl *string `json:"ErrorCodeUrl,omitempty"` + JoinTime *time.Time `json:"JoinTime,omitempty"` + LeaveTime *time.Time `json:"LeaveTime,omitempty"` + MediaRegion *string `json:"MediaRegion,omitempty"` + ParticipantIdentity *string `json:"ParticipantIdentity,omitempty"` + ParticipantSid *string `json:"ParticipantSid,omitempty"` + Properties *map[string]interface{} `json:"Properties,omitempty"` + PublisherInfo *map[string]interface{} `json:"PublisherInfo,omitempty"` + RoomSid *string `json:"RoomSid,omitempty"` + Status *string `json:"Status,omitempty"` + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/ip_messaging/v1/README.md b/twilio/rest/ip_messaging/v1/README.md index a136d24d2..ed3d234da 100644 --- a/twilio/rest/ip_messaging/v1/README.md +++ b/twilio/rest/ip_messaging/v1/README.md @@ -75,8 +75,6 @@ Class | Method | HTTP request | Description ## Documentation For Models - - [ChannelChannelType](docs/ChannelChannelType.md) - - [CredentialPushService](docs/CredentialPushService.md) - [IpMessagingV1Credential](docs/IpMessagingV1Credential.md) - [IpMessagingV1Service](docs/IpMessagingV1Service.md) - [IpMessagingV1ServiceChannel](docs/IpMessagingV1ServiceChannel.md) @@ -96,8 +94,6 @@ Class | Method | HTTP request | Description - [ListServiceResponse](docs/ListServiceResponse.md) - [ListUserChannelResponse](docs/ListUserChannelResponse.md) - [ListUserResponse](docs/ListUserResponse.md) - - [RoleRoleType](docs/RoleRoleType.md) - - [UserChannelChannelStatus](docs/UserChannelChannelStatus.md) ## Documentation For Authorization diff --git a/twilio/rest/ip_messaging/v1/docs/IpMessagingV1Credential.md b/twilio/rest/ip_messaging/v1/docs/IpMessagingV1Credential.md index a1e09d8b1..0c240c939 100644 --- a/twilio/rest/ip_messaging/v1/docs/IpMessagingV1Credential.md +++ b/twilio/rest/ip_messaging/v1/docs/IpMessagingV1Credential.md @@ -1,16 +1,16 @@ # IpMessagingV1Credential ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**FriendlyName** | Pointer to **string** | -**Sandbox** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Type** | Pointer to [**CredentialPushService**](credential_push_service.md) | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | | +**FriendlyName** | Pointer to **string** | | +**Sandbox** | Pointer to **string** | | +**Sid** | Pointer to **string** | | +**Type** | Pointer to **string** | | +**Url** | Pointer to **string** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/ip_messaging/v1/docs/IpMessagingV1Service.md b/twilio/rest/ip_messaging/v1/docs/IpMessagingV1Service.md index 06f8cfc44..c2c57f1be 100644 --- a/twilio/rest/ip_messaging/v1/docs/IpMessagingV1Service.md +++ b/twilio/rest/ip_messaging/v1/docs/IpMessagingV1Service.md @@ -1,29 +1,29 @@ # IpMessagingV1Service ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**ConsumptionReportInterval** | Pointer to **int32** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**DefaultChannelCreatorRoleSid** | Pointer to **string** | -**DefaultChannelRoleSid** | Pointer to **string** | -**DefaultServiceRoleSid** | Pointer to **string** | -**FriendlyName** | Pointer to **string** | -**Limits** | Pointer to **map[string]interface{}** | -**Links** | Pointer to **map[string]interface{}** | -**Notifications** | Pointer to **map[string]interface{}** | -**PostWebhookUrl** | Pointer to **string** | -**PreWebhookUrl** | Pointer to **string** | -**ReachabilityEnabled** | Pointer to **bool** | -**ReadStatusEnabled** | Pointer to **bool** | -**Sid** | Pointer to **string** | -**TypingIndicatorTimeout** | Pointer to **int32** | -**Url** | Pointer to **string** | -**WebhookFilters** | Pointer to **[]string** | -**WebhookMethod** | Pointer to **string** | -**Webhooks** | Pointer to **map[string]interface{}** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | | +**ConsumptionReportInterval** | Pointer to **int32** | | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | | +**DefaultChannelCreatorRoleSid** | Pointer to **string** | | +**DefaultChannelRoleSid** | Pointer to **string** | | +**DefaultServiceRoleSid** | Pointer to **string** | | +**FriendlyName** | Pointer to **string** | | +**Limits** | Pointer to **map[string]interface{}** | | +**Links** | Pointer to **map[string]interface{}** | | +**Notifications** | Pointer to **map[string]interface{}** | | +**PostWebhookUrl** | Pointer to **string** | | +**PreWebhookUrl** | Pointer to **string** | | +**ReachabilityEnabled** | Pointer to **bool** | | +**ReadStatusEnabled** | Pointer to **bool** | | +**Sid** | Pointer to **string** | | +**TypingIndicatorTimeout** | Pointer to **int32** | | +**Url** | Pointer to **string** | | +**WebhookFilters** | Pointer to **[]string** | | +**WebhookMethod** | Pointer to **string** | | +**Webhooks** | Pointer to **map[string]interface{}** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/ip_messaging/v1/docs/IpMessagingV1ServiceChannel.md b/twilio/rest/ip_messaging/v1/docs/IpMessagingV1ServiceChannel.md index 49b4fa971..14b29d18d 100644 --- a/twilio/rest/ip_messaging/v1/docs/IpMessagingV1ServiceChannel.md +++ b/twilio/rest/ip_messaging/v1/docs/IpMessagingV1ServiceChannel.md @@ -1,22 +1,22 @@ # IpMessagingV1ServiceChannel ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Attributes** | Pointer to **string** | -**CreatedBy** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**FriendlyName** | Pointer to **string** | -**Links** | Pointer to **map[string]interface{}** | -**MembersCount** | Pointer to **int32** | -**MessagesCount** | Pointer to **int32** | -**ServiceSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Type** | Pointer to [**ChannelChannelType**](channel_channel_type.md) | -**UniqueName** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | | +**Attributes** | Pointer to **string** | | +**CreatedBy** | Pointer to **string** | | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | | +**FriendlyName** | Pointer to **string** | | +**Links** | Pointer to **map[string]interface{}** | | +**MembersCount** | Pointer to **int32** | | +**MessagesCount** | Pointer to **int32** | | +**ServiceSid** | Pointer to **string** | | +**Sid** | Pointer to **string** | | +**Type** | Pointer to **string** | | +**UniqueName** | Pointer to **string** | | +**Url** | Pointer to **string** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/ip_messaging/v1/docs/IpMessagingV1ServiceChannelInvite.md b/twilio/rest/ip_messaging/v1/docs/IpMessagingV1ServiceChannelInvite.md index 7338c31e8..ad0902fa1 100644 --- a/twilio/rest/ip_messaging/v1/docs/IpMessagingV1ServiceChannelInvite.md +++ b/twilio/rest/ip_messaging/v1/docs/IpMessagingV1ServiceChannelInvite.md @@ -1,18 +1,18 @@ # IpMessagingV1ServiceChannelInvite ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**ChannelSid** | Pointer to **string** | -**CreatedBy** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**Identity** | Pointer to **string** | -**RoleSid** | Pointer to **string** | -**ServiceSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | | +**ChannelSid** | Pointer to **string** | | +**CreatedBy** | Pointer to **string** | | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | | +**Identity** | Pointer to **string** | | +**RoleSid** | Pointer to **string** | | +**ServiceSid** | Pointer to **string** | | +**Sid** | Pointer to **string** | | +**Url** | Pointer to **string** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/ip_messaging/v1/docs/IpMessagingV1ServiceChannelMember.md b/twilio/rest/ip_messaging/v1/docs/IpMessagingV1ServiceChannelMember.md index a6bdb9ade..cb566075e 100644 --- a/twilio/rest/ip_messaging/v1/docs/IpMessagingV1ServiceChannelMember.md +++ b/twilio/rest/ip_messaging/v1/docs/IpMessagingV1ServiceChannelMember.md @@ -1,19 +1,19 @@ # IpMessagingV1ServiceChannelMember ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**ChannelSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**Identity** | Pointer to **string** | -**LastConsumedMessageIndex** | Pointer to **int32** | -**LastConsumptionTimestamp** | Pointer to [**time.Time**](time.Time.md) | -**RoleSid** | Pointer to **string** | -**ServiceSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | | +**ChannelSid** | Pointer to **string** | | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | | +**Identity** | Pointer to **string** | | +**LastConsumedMessageIndex** | Pointer to **int32** | | +**LastConsumptionTimestamp** | Pointer to [**time.Time**](time.Time.md) | | +**RoleSid** | Pointer to **string** | | +**ServiceSid** | Pointer to **string** | | +**Sid** | Pointer to **string** | | +**Url** | Pointer to **string** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/ip_messaging/v1/docs/IpMessagingV1ServiceChannelMessage.md b/twilio/rest/ip_messaging/v1/docs/IpMessagingV1ServiceChannelMessage.md index 248591e59..5c5cbac36 100644 --- a/twilio/rest/ip_messaging/v1/docs/IpMessagingV1ServiceChannelMessage.md +++ b/twilio/rest/ip_messaging/v1/docs/IpMessagingV1ServiceChannelMessage.md @@ -1,21 +1,21 @@ # IpMessagingV1ServiceChannelMessage ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Attributes** | Pointer to **string** | -**Body** | Pointer to **string** | -**ChannelSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**From** | Pointer to **string** | -**Index** | Pointer to **int32** | -**ServiceSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**To** | Pointer to **string** | -**Url** | Pointer to **string** | -**WasEdited** | Pointer to **bool** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | | +**Attributes** | Pointer to **string** | | +**Body** | Pointer to **string** | | +**ChannelSid** | Pointer to **string** | | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | | +**From** | Pointer to **string** | | +**Index** | Pointer to **int32** | | +**ServiceSid** | Pointer to **string** | | +**Sid** | Pointer to **string** | | +**To** | Pointer to **string** | | +**Url** | Pointer to **string** | | +**WasEdited** | Pointer to **bool** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/ip_messaging/v1/docs/IpMessagingV1ServiceRole.md b/twilio/rest/ip_messaging/v1/docs/IpMessagingV1ServiceRole.md index 5945be6a0..bb6b4a3e3 100644 --- a/twilio/rest/ip_messaging/v1/docs/IpMessagingV1ServiceRole.md +++ b/twilio/rest/ip_messaging/v1/docs/IpMessagingV1ServiceRole.md @@ -1,17 +1,17 @@ # IpMessagingV1ServiceRole ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**FriendlyName** | Pointer to **string** | -**Permissions** | Pointer to **[]string** | -**ServiceSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Type** | Pointer to [**RoleRoleType**](role_role_type.md) | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | | +**FriendlyName** | Pointer to **string** | | +**Permissions** | Pointer to **[]string** | | +**ServiceSid** | Pointer to **string** | | +**Sid** | Pointer to **string** | | +**Type** | Pointer to **string** | | +**Url** | Pointer to **string** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/ip_messaging/v1/docs/IpMessagingV1ServiceUser.md b/twilio/rest/ip_messaging/v1/docs/IpMessagingV1ServiceUser.md index 93b84fca4..b0e0b647c 100644 --- a/twilio/rest/ip_messaging/v1/docs/IpMessagingV1ServiceUser.md +++ b/twilio/rest/ip_messaging/v1/docs/IpMessagingV1ServiceUser.md @@ -1,22 +1,22 @@ # IpMessagingV1ServiceUser ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Attributes** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**FriendlyName** | Pointer to **string** | -**Identity** | Pointer to **string** | -**IsNotifiable** | Pointer to **bool** | -**IsOnline** | Pointer to **bool** | -**JoinedChannelsCount** | Pointer to **int32** | -**Links** | Pointer to **map[string]interface{}** | -**RoleSid** | Pointer to **string** | -**ServiceSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | | +**Attributes** | Pointer to **string** | | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | | +**FriendlyName** | Pointer to **string** | | +**Identity** | Pointer to **string** | | +**IsNotifiable** | Pointer to **bool** | | +**IsOnline** | Pointer to **bool** | | +**JoinedChannelsCount** | Pointer to **int32** | | +**Links** | Pointer to **map[string]interface{}** | | +**RoleSid** | Pointer to **string** | | +**ServiceSid** | Pointer to **string** | | +**Sid** | Pointer to **string** | | +**Url** | Pointer to **string** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/ip_messaging/v1/docs/IpMessagingV1ServiceUserUserChannel.md b/twilio/rest/ip_messaging/v1/docs/IpMessagingV1ServiceUserUserChannel.md index 39be7e8b9..7b945642f 100644 --- a/twilio/rest/ip_messaging/v1/docs/IpMessagingV1ServiceUserUserChannel.md +++ b/twilio/rest/ip_messaging/v1/docs/IpMessagingV1ServiceUserUserChannel.md @@ -1,16 +1,16 @@ # IpMessagingV1ServiceUserUserChannel ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**ChannelSid** | Pointer to **string** | -**LastConsumedMessageIndex** | Pointer to **int32** | -**Links** | Pointer to **map[string]interface{}** | -**MemberSid** | Pointer to **string** | -**ServiceSid** | Pointer to **string** | -**Status** | Pointer to [**UserChannelChannelStatus**](user_channel_channel_status.md) | -**UnreadMessagesCount** | Pointer to **int32** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | | +**ChannelSid** | Pointer to **string** | | +**LastConsumedMessageIndex** | Pointer to **int32** | | +**Links** | Pointer to **map[string]interface{}** | | +**MemberSid** | Pointer to **string** | | +**ServiceSid** | Pointer to **string** | | +**Status** | Pointer to **string** | | +**UnreadMessagesCount** | Pointer to **int32** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/ip_messaging/v1/docs/ListChannelResponse.md b/twilio/rest/ip_messaging/v1/docs/ListChannelResponse.md index 7bcdd2612..7096da662 100644 --- a/twilio/rest/ip_messaging/v1/docs/ListChannelResponse.md +++ b/twilio/rest/ip_messaging/v1/docs/ListChannelResponse.md @@ -1,10 +1,10 @@ # ListChannelResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Channels** | [**[]IpMessagingV1ServiceChannel**](ip_messaging.v1.service.channel.md) | [optional] -**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Channels** | [**[]IpMessagingV1ServiceChannel**](ip_messaging.v1.service.channel.md) | |[optional] +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/ip_messaging/v1/docs/ListCredentialResponse.md b/twilio/rest/ip_messaging/v1/docs/ListCredentialResponse.md index 372af3725..c74991332 100644 --- a/twilio/rest/ip_messaging/v1/docs/ListCredentialResponse.md +++ b/twilio/rest/ip_messaging/v1/docs/ListCredentialResponse.md @@ -1,10 +1,10 @@ # ListCredentialResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Credentials** | [**[]IpMessagingV1Credential**](ip_messaging.v1.credential.md) | [optional] -**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Credentials** | [**[]IpMessagingV1Credential**](ip_messaging.v1.credential.md) | |[optional] +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/ip_messaging/v1/docs/ListCredentialResponseMeta.md b/twilio/rest/ip_messaging/v1/docs/ListCredentialResponseMeta.md index fdaf9c314..1de617a01 100644 --- a/twilio/rest/ip_messaging/v1/docs/ListCredentialResponseMeta.md +++ b/twilio/rest/ip_messaging/v1/docs/ListCredentialResponseMeta.md @@ -1,15 +1,15 @@ # ListCredentialResponseMeta ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**FirstPageUrl** | **string** | [optional] -**Key** | **string** | [optional] -**NextPageUrl** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUrl** | **string** | [optional] -**Url** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstPageUrl** | **string** | |[optional] +**Key** | **string** | |[optional] +**NextPageUrl** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUrl** | **string** | |[optional] +**Url** | **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/twilio/rest/ip_messaging/v1/docs/ListInviteResponse.md b/twilio/rest/ip_messaging/v1/docs/ListInviteResponse.md index 2d0018970..c8a4d00d1 100644 --- a/twilio/rest/ip_messaging/v1/docs/ListInviteResponse.md +++ b/twilio/rest/ip_messaging/v1/docs/ListInviteResponse.md @@ -1,10 +1,10 @@ # ListInviteResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Invites** | [**[]IpMessagingV1ServiceChannelInvite**](ip_messaging.v1.service.channel.invite.md) | [optional] -**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Invites** | [**[]IpMessagingV1ServiceChannelInvite**](ip_messaging.v1.service.channel.invite.md) | |[optional] +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/ip_messaging/v1/docs/ListMemberResponse.md b/twilio/rest/ip_messaging/v1/docs/ListMemberResponse.md index 2512af125..8a809a4dd 100644 --- a/twilio/rest/ip_messaging/v1/docs/ListMemberResponse.md +++ b/twilio/rest/ip_messaging/v1/docs/ListMemberResponse.md @@ -1,10 +1,10 @@ # ListMemberResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Members** | [**[]IpMessagingV1ServiceChannelMember**](ip_messaging.v1.service.channel.member.md) | [optional] -**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Members** | [**[]IpMessagingV1ServiceChannelMember**](ip_messaging.v1.service.channel.member.md) | |[optional] +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/ip_messaging/v1/docs/ListMessageResponse.md b/twilio/rest/ip_messaging/v1/docs/ListMessageResponse.md index 4e4f359f2..1403d9315 100644 --- a/twilio/rest/ip_messaging/v1/docs/ListMessageResponse.md +++ b/twilio/rest/ip_messaging/v1/docs/ListMessageResponse.md @@ -1,10 +1,10 @@ # ListMessageResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Messages** | [**[]IpMessagingV1ServiceChannelMessage**](ip_messaging.v1.service.channel.message.md) | [optional] -**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Messages** | [**[]IpMessagingV1ServiceChannelMessage**](ip_messaging.v1.service.channel.message.md) | |[optional] +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/ip_messaging/v1/docs/ListRoleResponse.md b/twilio/rest/ip_messaging/v1/docs/ListRoleResponse.md index f7982098d..56be01867 100644 --- a/twilio/rest/ip_messaging/v1/docs/ListRoleResponse.md +++ b/twilio/rest/ip_messaging/v1/docs/ListRoleResponse.md @@ -1,10 +1,10 @@ # ListRoleResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | [optional] -**Roles** | [**[]IpMessagingV1ServiceRole**](ip_messaging.v1.service.role.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | |[optional] +**Roles** | [**[]IpMessagingV1ServiceRole**](ip_messaging.v1.service.role.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/ip_messaging/v1/docs/ListServiceResponse.md b/twilio/rest/ip_messaging/v1/docs/ListServiceResponse.md index ebefd7614..ce8b2cae7 100644 --- a/twilio/rest/ip_messaging/v1/docs/ListServiceResponse.md +++ b/twilio/rest/ip_messaging/v1/docs/ListServiceResponse.md @@ -1,10 +1,10 @@ # ListServiceResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | [optional] -**Services** | [**[]IpMessagingV1Service**](ip_messaging.v1.service.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | |[optional] +**Services** | [**[]IpMessagingV1Service**](ip_messaging.v1.service.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/ip_messaging/v1/docs/ListUserChannelResponse.md b/twilio/rest/ip_messaging/v1/docs/ListUserChannelResponse.md index 1b7f96885..c40532f90 100644 --- a/twilio/rest/ip_messaging/v1/docs/ListUserChannelResponse.md +++ b/twilio/rest/ip_messaging/v1/docs/ListUserChannelResponse.md @@ -1,10 +1,10 @@ # ListUserChannelResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Channels** | [**[]IpMessagingV1ServiceUserUserChannel**](ip_messaging.v1.service.user.user_channel.md) | [optional] -**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Channels** | [**[]IpMessagingV1ServiceUserUserChannel**](ip_messaging.v1.service.user.user_channel.md) | |[optional] +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/ip_messaging/v1/docs/ListUserResponse.md b/twilio/rest/ip_messaging/v1/docs/ListUserResponse.md index af5d43543..95c68f46b 100644 --- a/twilio/rest/ip_messaging/v1/docs/ListUserResponse.md +++ b/twilio/rest/ip_messaging/v1/docs/ListUserResponse.md @@ -1,10 +1,10 @@ # ListUserResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | [optional] -**Users** | [**[]IpMessagingV1ServiceUser**](ip_messaging.v1.service.user.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | |[optional] +**Users** | [**[]IpMessagingV1ServiceUser**](ip_messaging.v1.service.user.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_credential.go b/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_credential.go index b9ed9e61e..b7f6a9ea2 100644 --- a/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_credential.go +++ b/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_credential.go @@ -17,12 +17,12 @@ import ( // IpMessagingV1Credential struct for IpMessagingV1Credential type IpMessagingV1Credential struct { - AccountSid *string `json:"AccountSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Sandbox *string `json:"Sandbox,omitempty"` - Sid *string `json:"Sid,omitempty"` - Type *CredentialPushService `json:"Type,omitempty"` - Url *string `json:"Url,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Sandbox *string `json:"Sandbox,omitempty"` + Sid *string `json:"Sid,omitempty"` + Type *string `json:"Type,omitempty"` + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service_channel.go b/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service_channel.go index 401dd2059..34c6e7ba0 100644 --- a/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service_channel.go +++ b/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service_channel.go @@ -28,7 +28,7 @@ type IpMessagingV1ServiceChannel struct { MessagesCount *int32 `json:"MessagesCount,omitempty"` ServiceSid *string `json:"ServiceSid,omitempty"` Sid *string `json:"Sid,omitempty"` - Type *ChannelChannelType `json:"Type,omitempty"` + Type *string `json:"Type,omitempty"` UniqueName *string `json:"UniqueName,omitempty"` Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service_role.go b/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service_role.go index c39d70ce3..c3719e5cf 100644 --- a/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service_role.go +++ b/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service_role.go @@ -17,13 +17,13 @@ import ( // IpMessagingV1ServiceRole struct for IpMessagingV1ServiceRole type IpMessagingV1ServiceRole struct { - AccountSid *string `json:"AccountSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Permissions *[]string `json:"Permissions,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Type *RoleRoleType `json:"Type,omitempty"` - Url *string `json:"Url,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Permissions *[]string `json:"Permissions,omitempty"` + ServiceSid *string `json:"ServiceSid,omitempty"` + Sid *string `json:"Sid,omitempty"` + Type *string `json:"Type,omitempty"` + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service_user_user_channel.go b/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service_user_user_channel.go index 739d2da7f..05f8e57ba 100644 --- a/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service_user_user_channel.go +++ b/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service_user_user_channel.go @@ -13,12 +13,12 @@ package openapi // IpMessagingV1ServiceUserUserChannel struct for IpMessagingV1ServiceUserUserChannel type IpMessagingV1ServiceUserUserChannel struct { - AccountSid *string `json:"AccountSid,omitempty"` - ChannelSid *string `json:"ChannelSid,omitempty"` - LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - MemberSid *string `json:"MemberSid,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Status *UserChannelChannelStatus `json:"Status,omitempty"` - UnreadMessagesCount *int32 `json:"UnreadMessagesCount,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` + ChannelSid *string `json:"ChannelSid,omitempty"` + LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` + Links *map[string]interface{} `json:"Links,omitempty"` + MemberSid *string `json:"MemberSid,omitempty"` + ServiceSid *string `json:"ServiceSid,omitempty"` + Status *string `json:"Status,omitempty"` + UnreadMessagesCount *int32 `json:"UnreadMessagesCount,omitempty"` } diff --git a/twilio/rest/ip_messaging/v2/README.md b/twilio/rest/ip_messaging/v2/README.md index 59162610e..b2c754c85 100644 --- a/twilio/rest/ip_messaging/v2/README.md +++ b/twilio/rest/ip_messaging/v2/README.md @@ -89,9 +89,6 @@ Class | Method | HTTP request | Description ## Documentation For Models - - [BindingBindingType](docs/BindingBindingType.md) - - [ChannelChannelType](docs/ChannelChannelType.md) - - [CredentialPushService](docs/CredentialPushService.md) - [IpMessagingV2Credential](docs/IpMessagingV2Credential.md) - [IpMessagingV2Service](docs/IpMessagingV2Service.md) - [IpMessagingV2ServiceBinding](docs/IpMessagingV2ServiceBinding.md) @@ -117,10 +114,6 @@ Class | Method | HTTP request | Description - [ListUserBindingResponse](docs/ListUserBindingResponse.md) - [ListUserChannelResponse](docs/ListUserChannelResponse.md) - [ListUserResponse](docs/ListUserResponse.md) - - [RoleRoleType](docs/RoleRoleType.md) - - [UserBindingBindingType](docs/UserBindingBindingType.md) - - [UserChannelChannelStatus](docs/UserChannelChannelStatus.md) - - [UserChannelNotificationLevel](docs/UserChannelNotificationLevel.md) ## Documentation For Authorization diff --git a/twilio/rest/ip_messaging/v2/docs/IpMessagingV2Credential.md b/twilio/rest/ip_messaging/v2/docs/IpMessagingV2Credential.md index 903a55b04..d4c018eb9 100644 --- a/twilio/rest/ip_messaging/v2/docs/IpMessagingV2Credential.md +++ b/twilio/rest/ip_messaging/v2/docs/IpMessagingV2Credential.md @@ -1,16 +1,16 @@ # IpMessagingV2Credential ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**FriendlyName** | Pointer to **string** | -**Sandbox** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Type** | Pointer to [**CredentialPushService**](credential_push_service.md) | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | | +**FriendlyName** | Pointer to **string** | | +**Sandbox** | Pointer to **string** | | +**Sid** | Pointer to **string** | | +**Type** | Pointer to **string** | | +**Url** | Pointer to **string** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/ip_messaging/v2/docs/IpMessagingV2Service.md b/twilio/rest/ip_messaging/v2/docs/IpMessagingV2Service.md index aa2aaa9a5..d269fc1d9 100644 --- a/twilio/rest/ip_messaging/v2/docs/IpMessagingV2Service.md +++ b/twilio/rest/ip_messaging/v2/docs/IpMessagingV2Service.md @@ -1,31 +1,31 @@ # IpMessagingV2Service ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**ConsumptionReportInterval** | Pointer to **int32** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**DefaultChannelCreatorRoleSid** | Pointer to **string** | -**DefaultChannelRoleSid** | Pointer to **string** | -**DefaultServiceRoleSid** | Pointer to **string** | -**FriendlyName** | Pointer to **string** | -**Limits** | Pointer to **map[string]interface{}** | -**Links** | Pointer to **map[string]interface{}** | -**Media** | Pointer to **map[string]interface{}** | -**Notifications** | Pointer to **map[string]interface{}** | -**PostWebhookRetryCount** | Pointer to **int32** | -**PostWebhookUrl** | Pointer to **string** | -**PreWebhookRetryCount** | Pointer to **int32** | -**PreWebhookUrl** | Pointer to **string** | -**ReachabilityEnabled** | Pointer to **bool** | -**ReadStatusEnabled** | Pointer to **bool** | -**Sid** | Pointer to **string** | -**TypingIndicatorTimeout** | Pointer to **int32** | -**Url** | Pointer to **string** | -**WebhookFilters** | Pointer to **[]string** | -**WebhookMethod** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | | +**ConsumptionReportInterval** | Pointer to **int32** | | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | | +**DefaultChannelCreatorRoleSid** | Pointer to **string** | | +**DefaultChannelRoleSid** | Pointer to **string** | | +**DefaultServiceRoleSid** | Pointer to **string** | | +**FriendlyName** | Pointer to **string** | | +**Limits** | Pointer to **map[string]interface{}** | | +**Links** | Pointer to **map[string]interface{}** | | +**Media** | Pointer to **map[string]interface{}** | | +**Notifications** | Pointer to **map[string]interface{}** | | +**PostWebhookRetryCount** | Pointer to **int32** | | +**PostWebhookUrl** | Pointer to **string** | | +**PreWebhookRetryCount** | Pointer to **int32** | | +**PreWebhookUrl** | Pointer to **string** | | +**ReachabilityEnabled** | Pointer to **bool** | | +**ReadStatusEnabled** | Pointer to **bool** | | +**Sid** | Pointer to **string** | | +**TypingIndicatorTimeout** | Pointer to **int32** | | +**Url** | Pointer to **string** | | +**WebhookFilters** | Pointer to **[]string** | | +**WebhookMethod** | Pointer to **string** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/ip_messaging/v2/docs/IpMessagingV2ServiceBinding.md b/twilio/rest/ip_messaging/v2/docs/IpMessagingV2ServiceBinding.md index bc736dd1b..c575742be 100644 --- a/twilio/rest/ip_messaging/v2/docs/IpMessagingV2ServiceBinding.md +++ b/twilio/rest/ip_messaging/v2/docs/IpMessagingV2ServiceBinding.md @@ -1,20 +1,20 @@ # IpMessagingV2ServiceBinding ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**BindingType** | Pointer to [**BindingBindingType**](binding_binding_type.md) | -**CredentialSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**Endpoint** | Pointer to **string** | -**Identity** | Pointer to **string** | -**Links** | Pointer to **map[string]interface{}** | -**MessageTypes** | Pointer to **[]string** | -**ServiceSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | | +**BindingType** | Pointer to **string** | | +**CredentialSid** | Pointer to **string** | | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | | +**Endpoint** | Pointer to **string** | | +**Identity** | Pointer to **string** | | +**Links** | Pointer to **map[string]interface{}** | | +**MessageTypes** | Pointer to **[]string** | | +**ServiceSid** | Pointer to **string** | | +**Sid** | Pointer to **string** | | +**Url** | Pointer to **string** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/ip_messaging/v2/docs/IpMessagingV2ServiceChannel.md b/twilio/rest/ip_messaging/v2/docs/IpMessagingV2ServiceChannel.md index e32f83c1b..40ec0818e 100644 --- a/twilio/rest/ip_messaging/v2/docs/IpMessagingV2ServiceChannel.md +++ b/twilio/rest/ip_messaging/v2/docs/IpMessagingV2ServiceChannel.md @@ -1,22 +1,22 @@ # IpMessagingV2ServiceChannel ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Attributes** | Pointer to **string** | -**CreatedBy** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**FriendlyName** | Pointer to **string** | -**Links** | Pointer to **map[string]interface{}** | -**MembersCount** | Pointer to **int32** | -**MessagesCount** | Pointer to **int32** | -**ServiceSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Type** | Pointer to [**ChannelChannelType**](channel_channel_type.md) | -**UniqueName** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | | +**Attributes** | Pointer to **string** | | +**CreatedBy** | Pointer to **string** | | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | | +**FriendlyName** | Pointer to **string** | | +**Links** | Pointer to **map[string]interface{}** | | +**MembersCount** | Pointer to **int32** | | +**MessagesCount** | Pointer to **int32** | | +**ServiceSid** | Pointer to **string** | | +**Sid** | Pointer to **string** | | +**Type** | Pointer to **string** | | +**UniqueName** | Pointer to **string** | | +**Url** | Pointer to **string** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/ip_messaging/v2/docs/IpMessagingV2ServiceChannelChannelWebhook.md b/twilio/rest/ip_messaging/v2/docs/IpMessagingV2ServiceChannelChannelWebhook.md index 62e19fda6..489ac7216 100644 --- a/twilio/rest/ip_messaging/v2/docs/IpMessagingV2ServiceChannelChannelWebhook.md +++ b/twilio/rest/ip_messaging/v2/docs/IpMessagingV2ServiceChannelChannelWebhook.md @@ -1,17 +1,17 @@ # IpMessagingV2ServiceChannelChannelWebhook ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**ChannelSid** | Pointer to **string** | -**Configuration** | Pointer to **map[string]interface{}** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**ServiceSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Type** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | | +**ChannelSid** | Pointer to **string** | | +**Configuration** | Pointer to **map[string]interface{}** | | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | | +**ServiceSid** | Pointer to **string** | | +**Sid** | Pointer to **string** | | +**Type** | Pointer to **string** | | +**Url** | Pointer to **string** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/ip_messaging/v2/docs/IpMessagingV2ServiceChannelInvite.md b/twilio/rest/ip_messaging/v2/docs/IpMessagingV2ServiceChannelInvite.md index ecd217d9f..0f02c05bb 100644 --- a/twilio/rest/ip_messaging/v2/docs/IpMessagingV2ServiceChannelInvite.md +++ b/twilio/rest/ip_messaging/v2/docs/IpMessagingV2ServiceChannelInvite.md @@ -1,18 +1,18 @@ # IpMessagingV2ServiceChannelInvite ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**ChannelSid** | Pointer to **string** | -**CreatedBy** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**Identity** | Pointer to **string** | -**RoleSid** | Pointer to **string** | -**ServiceSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | | +**ChannelSid** | Pointer to **string** | | +**CreatedBy** | Pointer to **string** | | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | | +**Identity** | Pointer to **string** | | +**RoleSid** | Pointer to **string** | | +**ServiceSid** | Pointer to **string** | | +**Sid** | Pointer to **string** | | +**Url** | Pointer to **string** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/ip_messaging/v2/docs/IpMessagingV2ServiceChannelMember.md b/twilio/rest/ip_messaging/v2/docs/IpMessagingV2ServiceChannelMember.md index 3a877e76c..dad1dd112 100644 --- a/twilio/rest/ip_messaging/v2/docs/IpMessagingV2ServiceChannelMember.md +++ b/twilio/rest/ip_messaging/v2/docs/IpMessagingV2ServiceChannelMember.md @@ -1,20 +1,20 @@ # IpMessagingV2ServiceChannelMember ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Attributes** | Pointer to **string** | -**ChannelSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**Identity** | Pointer to **string** | -**LastConsumedMessageIndex** | Pointer to **int32** | -**LastConsumptionTimestamp** | Pointer to [**time.Time**](time.Time.md) | -**RoleSid** | Pointer to **string** | -**ServiceSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | | +**Attributes** | Pointer to **string** | | +**ChannelSid** | Pointer to **string** | | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | | +**Identity** | Pointer to **string** | | +**LastConsumedMessageIndex** | Pointer to **int32** | | +**LastConsumptionTimestamp** | Pointer to [**time.Time**](time.Time.md) | | +**RoleSid** | Pointer to **string** | | +**ServiceSid** | Pointer to **string** | | +**Sid** | Pointer to **string** | | +**Url** | Pointer to **string** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/ip_messaging/v2/docs/IpMessagingV2ServiceChannelMessage.md b/twilio/rest/ip_messaging/v2/docs/IpMessagingV2ServiceChannelMessage.md index 0af010fdc..4891d1a2b 100644 --- a/twilio/rest/ip_messaging/v2/docs/IpMessagingV2ServiceChannelMessage.md +++ b/twilio/rest/ip_messaging/v2/docs/IpMessagingV2ServiceChannelMessage.md @@ -1,24 +1,24 @@ # IpMessagingV2ServiceChannelMessage ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Attributes** | Pointer to **string** | -**Body** | Pointer to **string** | -**ChannelSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**From** | Pointer to **string** | -**Index** | Pointer to **int32** | -**LastUpdatedBy** | Pointer to **string** | -**Media** | Pointer to **map[string]interface{}** | -**ServiceSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**To** | Pointer to **string** | -**Type** | Pointer to **string** | -**Url** | Pointer to **string** | -**WasEdited** | Pointer to **bool** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | | +**Attributes** | Pointer to **string** | | +**Body** | Pointer to **string** | | +**ChannelSid** | Pointer to **string** | | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | | +**From** | Pointer to **string** | | +**Index** | Pointer to **int32** | | +**LastUpdatedBy** | Pointer to **string** | | +**Media** | Pointer to **map[string]interface{}** | | +**ServiceSid** | Pointer to **string** | | +**Sid** | Pointer to **string** | | +**To** | Pointer to **string** | | +**Type** | Pointer to **string** | | +**Url** | Pointer to **string** | | +**WasEdited** | Pointer to **bool** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/ip_messaging/v2/docs/IpMessagingV2ServiceRole.md b/twilio/rest/ip_messaging/v2/docs/IpMessagingV2ServiceRole.md index 88365f1d6..79272c6a2 100644 --- a/twilio/rest/ip_messaging/v2/docs/IpMessagingV2ServiceRole.md +++ b/twilio/rest/ip_messaging/v2/docs/IpMessagingV2ServiceRole.md @@ -1,17 +1,17 @@ # IpMessagingV2ServiceRole ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**FriendlyName** | Pointer to **string** | -**Permissions** | Pointer to **[]string** | -**ServiceSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Type** | Pointer to [**RoleRoleType**](role_role_type.md) | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | | +**FriendlyName** | Pointer to **string** | | +**Permissions** | Pointer to **[]string** | | +**ServiceSid** | Pointer to **string** | | +**Sid** | Pointer to **string** | | +**Type** | Pointer to **string** | | +**Url** | Pointer to **string** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/ip_messaging/v2/docs/IpMessagingV2ServiceUser.md b/twilio/rest/ip_messaging/v2/docs/IpMessagingV2ServiceUser.md index a6fc8a7f7..df690f769 100644 --- a/twilio/rest/ip_messaging/v2/docs/IpMessagingV2ServiceUser.md +++ b/twilio/rest/ip_messaging/v2/docs/IpMessagingV2ServiceUser.md @@ -1,22 +1,22 @@ # IpMessagingV2ServiceUser ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Attributes** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**FriendlyName** | Pointer to **string** | -**Identity** | Pointer to **string** | -**IsNotifiable** | Pointer to **bool** | -**IsOnline** | Pointer to **bool** | -**JoinedChannelsCount** | Pointer to **int32** | -**Links** | Pointer to **map[string]interface{}** | -**RoleSid** | Pointer to **string** | -**ServiceSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | | +**Attributes** | Pointer to **string** | | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | | +**FriendlyName** | Pointer to **string** | | +**Identity** | Pointer to **string** | | +**IsNotifiable** | Pointer to **bool** | | +**IsOnline** | Pointer to **bool** | | +**JoinedChannelsCount** | Pointer to **int32** | | +**Links** | Pointer to **map[string]interface{}** | | +**RoleSid** | Pointer to **string** | | +**ServiceSid** | Pointer to **string** | | +**Sid** | Pointer to **string** | | +**Url** | Pointer to **string** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/ip_messaging/v2/docs/IpMessagingV2ServiceUserUserBinding.md b/twilio/rest/ip_messaging/v2/docs/IpMessagingV2ServiceUserUserBinding.md index 850069dc7..e33d0f5e1 100644 --- a/twilio/rest/ip_messaging/v2/docs/IpMessagingV2ServiceUserUserBinding.md +++ b/twilio/rest/ip_messaging/v2/docs/IpMessagingV2ServiceUserUserBinding.md @@ -1,20 +1,20 @@ # IpMessagingV2ServiceUserUserBinding ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**BindingType** | Pointer to [**UserBindingBindingType**](user_binding_binding_type.md) | -**CredentialSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**Endpoint** | Pointer to **string** | -**Identity** | Pointer to **string** | -**MessageTypes** | Pointer to **[]string** | -**ServiceSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Url** | Pointer to **string** | -**UserSid** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | | +**BindingType** | Pointer to **string** | | +**CredentialSid** | Pointer to **string** | | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | | +**Endpoint** | Pointer to **string** | | +**Identity** | Pointer to **string** | | +**MessageTypes** | Pointer to **[]string** | | +**ServiceSid** | Pointer to **string** | | +**Sid** | Pointer to **string** | | +**Url** | Pointer to **string** | | +**UserSid** | Pointer to **string** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/ip_messaging/v2/docs/IpMessagingV2ServiceUserUserChannel.md b/twilio/rest/ip_messaging/v2/docs/IpMessagingV2ServiceUserUserChannel.md index 136ed94f1..0e84f2fe3 100644 --- a/twilio/rest/ip_messaging/v2/docs/IpMessagingV2ServiceUserUserChannel.md +++ b/twilio/rest/ip_messaging/v2/docs/IpMessagingV2ServiceUserUserChannel.md @@ -1,19 +1,19 @@ # IpMessagingV2ServiceUserUserChannel ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**ChannelSid** | Pointer to **string** | -**LastConsumedMessageIndex** | Pointer to **int32** | -**Links** | Pointer to **map[string]interface{}** | -**MemberSid** | Pointer to **string** | -**NotificationLevel** | Pointer to [**UserChannelNotificationLevel**](user_channel_notification_level.md) | -**ServiceSid** | Pointer to **string** | -**Status** | Pointer to [**UserChannelChannelStatus**](user_channel_channel_status.md) | -**UnreadMessagesCount** | Pointer to **int32** | -**Url** | Pointer to **string** | -**UserSid** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | | +**ChannelSid** | Pointer to **string** | | +**LastConsumedMessageIndex** | Pointer to **int32** | | +**Links** | Pointer to **map[string]interface{}** | | +**MemberSid** | Pointer to **string** | | +**NotificationLevel** | Pointer to **string** | | +**ServiceSid** | Pointer to **string** | | +**Status** | Pointer to **string** | | +**UnreadMessagesCount** | Pointer to **int32** | | +**Url** | Pointer to **string** | | +**UserSid** | Pointer to **string** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/ip_messaging/v2/docs/ListBindingResponse.md b/twilio/rest/ip_messaging/v2/docs/ListBindingResponse.md index 16f9d58d3..18763fa4b 100644 --- a/twilio/rest/ip_messaging/v2/docs/ListBindingResponse.md +++ b/twilio/rest/ip_messaging/v2/docs/ListBindingResponse.md @@ -1,10 +1,10 @@ # ListBindingResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Bindings** | [**[]IpMessagingV2ServiceBinding**](ip_messaging.v2.service.binding.md) | [optional] -**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Bindings** | [**[]IpMessagingV2ServiceBinding**](ip_messaging.v2.service.binding.md) | |[optional] +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/ip_messaging/v2/docs/ListChannelResponse.md b/twilio/rest/ip_messaging/v2/docs/ListChannelResponse.md index 180e10632..26015997c 100644 --- a/twilio/rest/ip_messaging/v2/docs/ListChannelResponse.md +++ b/twilio/rest/ip_messaging/v2/docs/ListChannelResponse.md @@ -1,10 +1,10 @@ # ListChannelResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Channels** | [**[]IpMessagingV2ServiceChannel**](ip_messaging.v2.service.channel.md) | [optional] -**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Channels** | [**[]IpMessagingV2ServiceChannel**](ip_messaging.v2.service.channel.md) | |[optional] +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/ip_messaging/v2/docs/ListChannelWebhookResponse.md b/twilio/rest/ip_messaging/v2/docs/ListChannelWebhookResponse.md index e817eab2c..3d253984d 100644 --- a/twilio/rest/ip_messaging/v2/docs/ListChannelWebhookResponse.md +++ b/twilio/rest/ip_messaging/v2/docs/ListChannelWebhookResponse.md @@ -1,10 +1,10 @@ # ListChannelWebhookResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | [optional] -**Webhooks** | [**[]IpMessagingV2ServiceChannelChannelWebhook**](ip_messaging.v2.service.channel.channel_webhook.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | |[optional] +**Webhooks** | [**[]IpMessagingV2ServiceChannelChannelWebhook**](ip_messaging.v2.service.channel.channel_webhook.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/ip_messaging/v2/docs/ListCredentialResponse.md b/twilio/rest/ip_messaging/v2/docs/ListCredentialResponse.md index d400b01d9..112db9037 100644 --- a/twilio/rest/ip_messaging/v2/docs/ListCredentialResponse.md +++ b/twilio/rest/ip_messaging/v2/docs/ListCredentialResponse.md @@ -1,10 +1,10 @@ # ListCredentialResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Credentials** | [**[]IpMessagingV2Credential**](ip_messaging.v2.credential.md) | [optional] -**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Credentials** | [**[]IpMessagingV2Credential**](ip_messaging.v2.credential.md) | |[optional] +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/ip_messaging/v2/docs/ListCredentialResponseMeta.md b/twilio/rest/ip_messaging/v2/docs/ListCredentialResponseMeta.md index fdaf9c314..1de617a01 100644 --- a/twilio/rest/ip_messaging/v2/docs/ListCredentialResponseMeta.md +++ b/twilio/rest/ip_messaging/v2/docs/ListCredentialResponseMeta.md @@ -1,15 +1,15 @@ # ListCredentialResponseMeta ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**FirstPageUrl** | **string** | [optional] -**Key** | **string** | [optional] -**NextPageUrl** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUrl** | **string** | [optional] -**Url** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstPageUrl** | **string** | |[optional] +**Key** | **string** | |[optional] +**NextPageUrl** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUrl** | **string** | |[optional] +**Url** | **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/twilio/rest/ip_messaging/v2/docs/ListInviteResponse.md b/twilio/rest/ip_messaging/v2/docs/ListInviteResponse.md index 7a9a2b58d..204a07a30 100644 --- a/twilio/rest/ip_messaging/v2/docs/ListInviteResponse.md +++ b/twilio/rest/ip_messaging/v2/docs/ListInviteResponse.md @@ -1,10 +1,10 @@ # ListInviteResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Invites** | [**[]IpMessagingV2ServiceChannelInvite**](ip_messaging.v2.service.channel.invite.md) | [optional] -**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Invites** | [**[]IpMessagingV2ServiceChannelInvite**](ip_messaging.v2.service.channel.invite.md) | |[optional] +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/ip_messaging/v2/docs/ListMemberResponse.md b/twilio/rest/ip_messaging/v2/docs/ListMemberResponse.md index 8db66d026..466d76d1f 100644 --- a/twilio/rest/ip_messaging/v2/docs/ListMemberResponse.md +++ b/twilio/rest/ip_messaging/v2/docs/ListMemberResponse.md @@ -1,10 +1,10 @@ # ListMemberResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Members** | [**[]IpMessagingV2ServiceChannelMember**](ip_messaging.v2.service.channel.member.md) | [optional] -**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Members** | [**[]IpMessagingV2ServiceChannelMember**](ip_messaging.v2.service.channel.member.md) | |[optional] +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/ip_messaging/v2/docs/ListMessageResponse.md b/twilio/rest/ip_messaging/v2/docs/ListMessageResponse.md index 79357da52..58f72e1cc 100644 --- a/twilio/rest/ip_messaging/v2/docs/ListMessageResponse.md +++ b/twilio/rest/ip_messaging/v2/docs/ListMessageResponse.md @@ -1,10 +1,10 @@ # ListMessageResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Messages** | [**[]IpMessagingV2ServiceChannelMessage**](ip_messaging.v2.service.channel.message.md) | [optional] -**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Messages** | [**[]IpMessagingV2ServiceChannelMessage**](ip_messaging.v2.service.channel.message.md) | |[optional] +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/ip_messaging/v2/docs/ListRoleResponse.md b/twilio/rest/ip_messaging/v2/docs/ListRoleResponse.md index ec06ad9a2..f6b612799 100644 --- a/twilio/rest/ip_messaging/v2/docs/ListRoleResponse.md +++ b/twilio/rest/ip_messaging/v2/docs/ListRoleResponse.md @@ -1,10 +1,10 @@ # ListRoleResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | [optional] -**Roles** | [**[]IpMessagingV2ServiceRole**](ip_messaging.v2.service.role.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | |[optional] +**Roles** | [**[]IpMessagingV2ServiceRole**](ip_messaging.v2.service.role.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/ip_messaging/v2/docs/ListServiceResponse.md b/twilio/rest/ip_messaging/v2/docs/ListServiceResponse.md index b8efb2ceb..b794c0f25 100644 --- a/twilio/rest/ip_messaging/v2/docs/ListServiceResponse.md +++ b/twilio/rest/ip_messaging/v2/docs/ListServiceResponse.md @@ -1,10 +1,10 @@ # ListServiceResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | [optional] -**Services** | [**[]IpMessagingV2Service**](ip_messaging.v2.service.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | |[optional] +**Services** | [**[]IpMessagingV2Service**](ip_messaging.v2.service.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/ip_messaging/v2/docs/ListUserBindingResponse.md b/twilio/rest/ip_messaging/v2/docs/ListUserBindingResponse.md index 7470a46d8..35e8c0c93 100644 --- a/twilio/rest/ip_messaging/v2/docs/ListUserBindingResponse.md +++ b/twilio/rest/ip_messaging/v2/docs/ListUserBindingResponse.md @@ -1,10 +1,10 @@ # ListUserBindingResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Bindings** | [**[]IpMessagingV2ServiceUserUserBinding**](ip_messaging.v2.service.user.user_binding.md) | [optional] -**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Bindings** | [**[]IpMessagingV2ServiceUserUserBinding**](ip_messaging.v2.service.user.user_binding.md) | |[optional] +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/ip_messaging/v2/docs/ListUserChannelResponse.md b/twilio/rest/ip_messaging/v2/docs/ListUserChannelResponse.md index 83c0c9d5e..9cf66c7cf 100644 --- a/twilio/rest/ip_messaging/v2/docs/ListUserChannelResponse.md +++ b/twilio/rest/ip_messaging/v2/docs/ListUserChannelResponse.md @@ -1,10 +1,10 @@ # ListUserChannelResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Channels** | [**[]IpMessagingV2ServiceUserUserChannel**](ip_messaging.v2.service.user.user_channel.md) | [optional] -**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Channels** | [**[]IpMessagingV2ServiceUserUserChannel**](ip_messaging.v2.service.user.user_channel.md) | |[optional] +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/ip_messaging/v2/docs/ListUserResponse.md b/twilio/rest/ip_messaging/v2/docs/ListUserResponse.md index b34cd7a10..d9670b845 100644 --- a/twilio/rest/ip_messaging/v2/docs/ListUserResponse.md +++ b/twilio/rest/ip_messaging/v2/docs/ListUserResponse.md @@ -1,10 +1,10 @@ # ListUserResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | [optional] -**Users** | [**[]IpMessagingV2ServiceUser**](ip_messaging.v2.service.user.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | |[optional] +**Users** | [**[]IpMessagingV2ServiceUser**](ip_messaging.v2.service.user.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_credential.go b/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_credential.go index afb3f576f..640604592 100644 --- a/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_credential.go +++ b/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_credential.go @@ -17,12 +17,12 @@ import ( // IpMessagingV2Credential struct for IpMessagingV2Credential type IpMessagingV2Credential struct { - AccountSid *string `json:"AccountSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Sandbox *string `json:"Sandbox,omitempty"` - Sid *string `json:"Sid,omitempty"` - Type *CredentialPushService `json:"Type,omitempty"` - Url *string `json:"Url,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Sandbox *string `json:"Sandbox,omitempty"` + Sid *string `json:"Sid,omitempty"` + Type *string `json:"Type,omitempty"` + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_binding.go b/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_binding.go index d0b1037e6..cac16feda 100644 --- a/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_binding.go +++ b/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_binding.go @@ -18,7 +18,7 @@ import ( // IpMessagingV2ServiceBinding struct for IpMessagingV2ServiceBinding type IpMessagingV2ServiceBinding struct { AccountSid *string `json:"AccountSid,omitempty"` - BindingType *BindingBindingType `json:"BindingType,omitempty"` + BindingType *string `json:"BindingType,omitempty"` CredentialSid *string `json:"CredentialSid,omitempty"` DateCreated *time.Time `json:"DateCreated,omitempty"` DateUpdated *time.Time `json:"DateUpdated,omitempty"` diff --git a/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_channel.go b/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_channel.go index 38c96841e..372267ec5 100644 --- a/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_channel.go +++ b/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_channel.go @@ -28,7 +28,7 @@ type IpMessagingV2ServiceChannel struct { MessagesCount *int32 `json:"MessagesCount,omitempty"` ServiceSid *string `json:"ServiceSid,omitempty"` Sid *string `json:"Sid,omitempty"` - Type *ChannelChannelType `json:"Type,omitempty"` + Type *string `json:"Type,omitempty"` UniqueName *string `json:"UniqueName,omitempty"` Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_role.go b/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_role.go index f611ebbd3..9b0f5ca1d 100644 --- a/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_role.go +++ b/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_role.go @@ -17,13 +17,13 @@ import ( // IpMessagingV2ServiceRole struct for IpMessagingV2ServiceRole type IpMessagingV2ServiceRole struct { - AccountSid *string `json:"AccountSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Permissions *[]string `json:"Permissions,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Type *RoleRoleType `json:"Type,omitempty"` - Url *string `json:"Url,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Permissions *[]string `json:"Permissions,omitempty"` + ServiceSid *string `json:"ServiceSid,omitempty"` + Sid *string `json:"Sid,omitempty"` + Type *string `json:"Type,omitempty"` + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_user_user_binding.go b/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_user_user_binding.go index 5ad2df156..dc540913f 100644 --- a/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_user_user_binding.go +++ b/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_user_user_binding.go @@ -17,16 +17,16 @@ import ( // IpMessagingV2ServiceUserUserBinding struct for IpMessagingV2ServiceUserUserBinding type IpMessagingV2ServiceUserUserBinding struct { - AccountSid *string `json:"AccountSid,omitempty"` - BindingType *UserBindingBindingType `json:"BindingType,omitempty"` - CredentialSid *string `json:"CredentialSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Endpoint *string `json:"Endpoint,omitempty"` - Identity *string `json:"Identity,omitempty"` - MessageTypes *[]string `json:"MessageTypes,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` - UserSid *string `json:"UserSid,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` + BindingType *string `json:"BindingType,omitempty"` + CredentialSid *string `json:"CredentialSid,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + Endpoint *string `json:"Endpoint,omitempty"` + Identity *string `json:"Identity,omitempty"` + MessageTypes *[]string `json:"MessageTypes,omitempty"` + ServiceSid *string `json:"ServiceSid,omitempty"` + Sid *string `json:"Sid,omitempty"` + Url *string `json:"Url,omitempty"` + UserSid *string `json:"UserSid,omitempty"` } diff --git a/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_user_user_channel.go b/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_user_user_channel.go index 5a37d61a3..74c0d7f6c 100644 --- a/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_user_user_channel.go +++ b/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_user_user_channel.go @@ -13,15 +13,15 @@ package openapi // IpMessagingV2ServiceUserUserChannel struct for IpMessagingV2ServiceUserUserChannel type IpMessagingV2ServiceUserUserChannel struct { - AccountSid *string `json:"AccountSid,omitempty"` - ChannelSid *string `json:"ChannelSid,omitempty"` - LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - MemberSid *string `json:"MemberSid,omitempty"` - NotificationLevel *UserChannelNotificationLevel `json:"NotificationLevel,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Status *UserChannelChannelStatus `json:"Status,omitempty"` - UnreadMessagesCount *int32 `json:"UnreadMessagesCount,omitempty"` - Url *string `json:"Url,omitempty"` - UserSid *string `json:"UserSid,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` + ChannelSid *string `json:"ChannelSid,omitempty"` + LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` + Links *map[string]interface{} `json:"Links,omitempty"` + MemberSid *string `json:"MemberSid,omitempty"` + NotificationLevel *string `json:"NotificationLevel,omitempty"` + ServiceSid *string `json:"ServiceSid,omitempty"` + Status *string `json:"Status,omitempty"` + UnreadMessagesCount *int32 `json:"UnreadMessagesCount,omitempty"` + Url *string `json:"Url,omitempty"` + UserSid *string `json:"UserSid,omitempty"` } diff --git a/twilio/rest/lookups/v1/docs/LookupsV1PhoneNumber.md b/twilio/rest/lookups/v1/docs/LookupsV1PhoneNumber.md index 2c48842fa..d9008df69 100644 --- a/twilio/rest/lookups/v1/docs/LookupsV1PhoneNumber.md +++ b/twilio/rest/lookups/v1/docs/LookupsV1PhoneNumber.md @@ -1,15 +1,15 @@ # LookupsV1PhoneNumber ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AddOns** | Pointer to **map[string]interface{}** | -**CallerName** | Pointer to **map[string]interface{}** | -**Carrier** | Pointer to **map[string]interface{}** | -**CountryCode** | Pointer to **string** | -**NationalFormat** | Pointer to **string** | -**PhoneNumber** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AddOns** | Pointer to **map[string]interface{}** | A JSON string with the results of the Add-ons you specified | +**CallerName** | Pointer to **map[string]interface{}** | The name of the phone number's owner | +**Carrier** | Pointer to **map[string]interface{}** | The telecom company that provides the phone number | +**CountryCode** | Pointer to **string** | The ISO country code for the phone number | +**NationalFormat** | Pointer to **string** | The phone number, in national format | +**PhoneNumber** | Pointer to **string** | The phone number in E.164 format | +**Url** | Pointer to **string** | The absolute URL of the resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/lookups/v1/model_lookups_v1_phone_number.go b/twilio/rest/lookups/v1/model_lookups_v1_phone_number.go index 276bfad91..86ce02bfe 100644 --- a/twilio/rest/lookups/v1/model_lookups_v1_phone_number.go +++ b/twilio/rest/lookups/v1/model_lookups_v1_phone_number.go @@ -13,11 +13,18 @@ package openapi // LookupsV1PhoneNumber struct for LookupsV1PhoneNumber type LookupsV1PhoneNumber struct { - AddOns *map[string]interface{} `json:"AddOns,omitempty"` - CallerName *map[string]interface{} `json:"CallerName,omitempty"` - Carrier *map[string]interface{} `json:"Carrier,omitempty"` - CountryCode *string `json:"CountryCode,omitempty"` - NationalFormat *string `json:"NationalFormat,omitempty"` - PhoneNumber *string `json:"PhoneNumber,omitempty"` - Url *string `json:"Url,omitempty"` + // A JSON string with the results of the Add-ons you specified + AddOns *map[string]interface{} `json:"AddOns,omitempty"` + // The name of the phone number's owner + CallerName *map[string]interface{} `json:"CallerName,omitempty"` + // The telecom company that provides the phone number + Carrier *map[string]interface{} `json:"Carrier,omitempty"` + // The ISO country code for the phone number + CountryCode *string `json:"CountryCode,omitempty"` + // The phone number, in national format + NationalFormat *string `json:"NationalFormat,omitempty"` + // The phone number in E.164 format + PhoneNumber *string `json:"PhoneNumber,omitempty"` + // The absolute URL of the resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/messaging/v1/README.md b/twilio/rest/messaging/v1/README.md index fb73fd16e..75db94606 100644 --- a/twilio/rest/messaging/v1/README.md +++ b/twilio/rest/messaging/v1/README.md @@ -56,8 +56,6 @@ Class | Method | HTTP request | Description ## Documentation For Models - - [BrandRegistrationsStatus](docs/BrandRegistrationsStatus.md) - - [HttpMethod](docs/HttpMethod.md) - [ListAlphaSenderResponse](docs/ListAlphaSenderResponse.md) - [ListBrandRegistrationsResponse](docs/ListBrandRegistrationsResponse.md) - [ListPhoneNumberResponse](docs/ListPhoneNumberResponse.md) @@ -70,7 +68,6 @@ Class | Method | HTTP request | Description - [MessagingV1ServiceAlphaSender](docs/MessagingV1ServiceAlphaSender.md) - [MessagingV1ServicePhoneNumber](docs/MessagingV1ServicePhoneNumber.md) - [MessagingV1ServiceShortCode](docs/MessagingV1ServiceShortCode.md) - - [ServiceScanMessageContent](docs/ServiceScanMessageContent.md) ## Documentation For Authorization diff --git a/twilio/rest/messaging/v1/docs/ListAlphaSenderResponse.md b/twilio/rest/messaging/v1/docs/ListAlphaSenderResponse.md index bf677c8c2..0522e9b9f 100644 --- a/twilio/rest/messaging/v1/docs/ListAlphaSenderResponse.md +++ b/twilio/rest/messaging/v1/docs/ListAlphaSenderResponse.md @@ -1,10 +1,10 @@ # ListAlphaSenderResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AlphaSenders** | [**[]MessagingV1ServiceAlphaSender**](messaging.v1.service.alpha_sender.md) | [optional] -**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AlphaSenders** | [**[]MessagingV1ServiceAlphaSender**](messaging.v1.service.alpha_sender.md) | |[optional] +**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/messaging/v1/docs/ListBrandRegistrationsResponse.md b/twilio/rest/messaging/v1/docs/ListBrandRegistrationsResponse.md index 489845131..75748e75b 100644 --- a/twilio/rest/messaging/v1/docs/ListBrandRegistrationsResponse.md +++ b/twilio/rest/messaging/v1/docs/ListBrandRegistrationsResponse.md @@ -1,10 +1,10 @@ # ListBrandRegistrationsResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Data** | [**[]MessagingV1BrandRegistrations**](messaging.v1.brand_registrations.md) | [optional] -**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**[]MessagingV1BrandRegistrations**](messaging.v1.brand_registrations.md) | |[optional] +**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/messaging/v1/docs/ListPhoneNumberResponse.md b/twilio/rest/messaging/v1/docs/ListPhoneNumberResponse.md index c2499c89f..894cb26d5 100644 --- a/twilio/rest/messaging/v1/docs/ListPhoneNumberResponse.md +++ b/twilio/rest/messaging/v1/docs/ListPhoneNumberResponse.md @@ -1,10 +1,10 @@ # ListPhoneNumberResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | [optional] -**PhoneNumbers** | [**[]MessagingV1ServicePhoneNumber**](messaging.v1.service.phone_number.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | |[optional] +**PhoneNumbers** | [**[]MessagingV1ServicePhoneNumber**](messaging.v1.service.phone_number.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/messaging/v1/docs/ListServiceResponse.md b/twilio/rest/messaging/v1/docs/ListServiceResponse.md index 62184a954..8f0e5ead3 100644 --- a/twilio/rest/messaging/v1/docs/ListServiceResponse.md +++ b/twilio/rest/messaging/v1/docs/ListServiceResponse.md @@ -1,10 +1,10 @@ # ListServiceResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | [optional] -**Services** | [**[]MessagingV1Service**](messaging.v1.service.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | |[optional] +**Services** | [**[]MessagingV1Service**](messaging.v1.service.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/messaging/v1/docs/ListServiceResponseMeta.md b/twilio/rest/messaging/v1/docs/ListServiceResponseMeta.md index ce4085ffe..6628758e1 100644 --- a/twilio/rest/messaging/v1/docs/ListServiceResponseMeta.md +++ b/twilio/rest/messaging/v1/docs/ListServiceResponseMeta.md @@ -1,15 +1,15 @@ # ListServiceResponseMeta ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**FirstPageUrl** | **string** | [optional] -**Key** | **string** | [optional] -**NextPageUrl** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUrl** | **string** | [optional] -**Url** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstPageUrl** | **string** | |[optional] +**Key** | **string** | |[optional] +**NextPageUrl** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUrl** | **string** | |[optional] +**Url** | **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/twilio/rest/messaging/v1/docs/ListShortCodeResponse.md b/twilio/rest/messaging/v1/docs/ListShortCodeResponse.md index c257531ee..7ad276ea2 100644 --- a/twilio/rest/messaging/v1/docs/ListShortCodeResponse.md +++ b/twilio/rest/messaging/v1/docs/ListShortCodeResponse.md @@ -1,10 +1,10 @@ # ListShortCodeResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | [optional] -**ShortCodes** | [**[]MessagingV1ServiceShortCode**](messaging.v1.service.short_code.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | |[optional] +**ShortCodes** | [**[]MessagingV1ServiceShortCode**](messaging.v1.service.short_code.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/messaging/v1/docs/MessagingV1BrandRegistrations.md b/twilio/rest/messaging/v1/docs/MessagingV1BrandRegistrations.md index 9316e8407..dfcd1e372 100644 --- a/twilio/rest/messaging/v1/docs/MessagingV1BrandRegistrations.md +++ b/twilio/rest/messaging/v1/docs/MessagingV1BrandRegistrations.md @@ -1,18 +1,18 @@ # MessagingV1BrandRegistrations ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**A2pProfileBundleSid** | Pointer to **string** | -**AccountSid** | Pointer to **string** | -**CustomerProfileBundleSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**FailureReason** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Status** | Pointer to [**BrandRegistrationsStatus**](brand_registrations_status.md) | -**TcrId** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**A2pProfileBundleSid** | Pointer to **string** | A2P Messaging Profile Bundle BundleSid | +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**CustomerProfileBundleSid** | Pointer to **string** | A2P Messaging Profile Bundle BundleSid | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was last updated | +**FailureReason** | Pointer to **string** | A reason why brand registration has failed | +**Sid** | Pointer to **string** | A2P BrandRegistration Sid | +**Status** | Pointer to **string** | Brand Registration status | +**TcrId** | Pointer to **string** | Campaign Registry (TCR) Brand ID | +**Url** | Pointer to **string** | The absolute URL of the Brand Registration | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/messaging/v1/docs/MessagingV1Deactivation.md b/twilio/rest/messaging/v1/docs/MessagingV1Deactivation.md index 35113039b..fd3a14d53 100644 --- a/twilio/rest/messaging/v1/docs/MessagingV1Deactivation.md +++ b/twilio/rest/messaging/v1/docs/MessagingV1Deactivation.md @@ -1,9 +1,9 @@ # MessagingV1Deactivation ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**RedirectTo** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RedirectTo** | Pointer to **string** | Redirect url to the list of deactivated numbers. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/messaging/v1/docs/MessagingV1Service.md b/twilio/rest/messaging/v1/docs/MessagingV1Service.md index 466dcc7b6..7e76c474b 100644 --- a/twilio/rest/messaging/v1/docs/MessagingV1Service.md +++ b/twilio/rest/messaging/v1/docs/MessagingV1Service.md @@ -1,28 +1,28 @@ # MessagingV1Service ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**AreaCodeGeomatch** | Pointer to **bool** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**FallbackMethod** | Pointer to [**HttpMethod**](http_method.md) | -**FallbackToLongCode** | Pointer to **bool** | -**FallbackUrl** | Pointer to **string** | -**FriendlyName** | Pointer to **string** | -**InboundMethod** | Pointer to [**HttpMethod**](http_method.md) | -**InboundRequestUrl** | Pointer to **string** | -**Links** | Pointer to **map[string]interface{}** | -**MmsConverter** | Pointer to **bool** | -**ScanMessageContent** | Pointer to [**ServiceScanMessageContent**](service_scan_message_content.md) | -**Sid** | Pointer to **string** | -**SmartEncoding** | Pointer to **bool** | -**StatusCallback** | Pointer to **string** | -**StickySender** | Pointer to **bool** | -**SynchronousValidation** | Pointer to **bool** | -**Url** | Pointer to **string** | -**ValidityPeriod** | Pointer to **int32** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**AreaCodeGeomatch** | Pointer to **bool** | Whether to enable Area Code Geomatch on the Service Instance | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was last updated | +**FallbackMethod** | Pointer to **string** | The HTTP method we use to call fallback_url | +**FallbackToLongCode** | Pointer to **bool** | Whether to enable Fallback to Long Code for messages sent through the Service instance | +**FallbackUrl** | Pointer to **string** | The URL that we call using fallback_method if an error occurs while retrieving or executing the TwiML from the Inbound Request URL | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the resource | +**InboundMethod** | Pointer to **string** | The HTTP method we use to call inbound_request_url | +**InboundRequestUrl** | Pointer to **string** | The URL we call using inbound_method when a message is received by any phone number or short code in the Service | +**Links** | Pointer to **map[string]interface{}** | The absolute URLs of related resources | +**MmsConverter** | Pointer to **bool** | Whether to enable the MMS Converter for messages sent through the Service instance | +**ScanMessageContent** | Pointer to **string** | Reserved | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**SmartEncoding** | Pointer to **bool** | Whether to enable Encoding for messages sent through the Service instance | +**StatusCallback** | Pointer to **string** | The URL we call to pass status updates about message delivery | +**StickySender** | Pointer to **bool** | Whether to enable Sticky Sender on the Service instance | +**SynchronousValidation** | Pointer to **bool** | Reserved | +**Url** | Pointer to **string** | The absolute URL of the Service resource | +**ValidityPeriod** | Pointer to **int32** | How long, in seconds, messages sent from the Service are valid | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/messaging/v1/docs/MessagingV1ServiceAlphaSender.md b/twilio/rest/messaging/v1/docs/MessagingV1ServiceAlphaSender.md index e337071da..ef5f63f27 100644 --- a/twilio/rest/messaging/v1/docs/MessagingV1ServiceAlphaSender.md +++ b/twilio/rest/messaging/v1/docs/MessagingV1ServiceAlphaSender.md @@ -1,16 +1,16 @@ # MessagingV1ServiceAlphaSender ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**AlphaSender** | Pointer to **string** | -**Capabilities** | Pointer to **[]string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**ServiceSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**AlphaSender** | Pointer to **string** | The Alphanumeric Sender ID string | +**Capabilities** | Pointer to **[]string** | An array of values that describe whether the number can receive calls or messages | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was last updated | +**ServiceSid** | Pointer to **string** | The SID of the Service that the resource is associated with | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Url** | Pointer to **string** | The absolute URL of the AlphaSender resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/messaging/v1/docs/MessagingV1ServicePhoneNumber.md b/twilio/rest/messaging/v1/docs/MessagingV1ServicePhoneNumber.md index 20550b1e4..f6a4f8668 100644 --- a/twilio/rest/messaging/v1/docs/MessagingV1ServicePhoneNumber.md +++ b/twilio/rest/messaging/v1/docs/MessagingV1ServicePhoneNumber.md @@ -1,17 +1,17 @@ # MessagingV1ServicePhoneNumber ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Capabilities** | Pointer to **[]string** | -**CountryCode** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**PhoneNumber** | Pointer to **string** | -**ServiceSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**Capabilities** | Pointer to **[]string** | An array of values that describe whether the number can receive calls or messages | +**CountryCode** | Pointer to **string** | The 2-character ISO Country Code of the number | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was last updated | +**PhoneNumber** | Pointer to **string** | The phone number in E.164 format | +**ServiceSid** | Pointer to **string** | The SID of the Service that the resource is associated with | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Url** | Pointer to **string** | The absolute URL of the PhoneNumber resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/messaging/v1/docs/MessagingV1ServiceShortCode.md b/twilio/rest/messaging/v1/docs/MessagingV1ServiceShortCode.md index 5631ecb8c..841442351 100644 --- a/twilio/rest/messaging/v1/docs/MessagingV1ServiceShortCode.md +++ b/twilio/rest/messaging/v1/docs/MessagingV1ServiceShortCode.md @@ -1,17 +1,17 @@ # MessagingV1ServiceShortCode ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Capabilities** | Pointer to **[]string** | -**CountryCode** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**ServiceSid** | Pointer to **string** | -**ShortCode** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**Capabilities** | Pointer to **[]string** | An array of values that describe whether the number can receive calls or messages | +**CountryCode** | Pointer to **string** | The 2-character ISO Country Code of the number | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was last updated | +**ServiceSid** | Pointer to **string** | The SID of the Service that the resource is associated with | +**ShortCode** | Pointer to **string** | The E.164 format of the short code | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Url** | Pointer to **string** | The absolute URL of the ShortCode resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/messaging/v1/model_messaging_v1_brand_registrations.go b/twilio/rest/messaging/v1/model_messaging_v1_brand_registrations.go index 25aa0ac07..0bd2b5c0e 100644 --- a/twilio/rest/messaging/v1/model_messaging_v1_brand_registrations.go +++ b/twilio/rest/messaging/v1/model_messaging_v1_brand_registrations.go @@ -17,14 +17,24 @@ import ( // MessagingV1BrandRegistrations struct for MessagingV1BrandRegistrations type MessagingV1BrandRegistrations struct { - A2pProfileBundleSid *string `json:"A2pProfileBundleSid,omitempty"` - AccountSid *string `json:"AccountSid,omitempty"` - CustomerProfileBundleSid *string `json:"CustomerProfileBundleSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FailureReason *string `json:"FailureReason,omitempty"` - Sid *string `json:"Sid,omitempty"` - Status *BrandRegistrationsStatus `json:"Status,omitempty"` - TcrId *string `json:"TcrId,omitempty"` - Url *string `json:"Url,omitempty"` + // A2P Messaging Profile Bundle BundleSid + A2pProfileBundleSid *string `json:"A2pProfileBundleSid,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // A2P Messaging Profile Bundle BundleSid + CustomerProfileBundleSid *string `json:"CustomerProfileBundleSid,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // A reason why brand registration has failed + FailureReason *string `json:"FailureReason,omitempty"` + // A2P BrandRegistration Sid + Sid *string `json:"Sid,omitempty"` + // Brand Registration status + Status *string `json:"Status,omitempty"` + // Campaign Registry (TCR) Brand ID + TcrId *string `json:"TcrId,omitempty"` + // The absolute URL of the Brand Registration + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/messaging/v1/model_messaging_v1_deactivation.go b/twilio/rest/messaging/v1/model_messaging_v1_deactivation.go index 0b5e9da49..2fbe36298 100644 --- a/twilio/rest/messaging/v1/model_messaging_v1_deactivation.go +++ b/twilio/rest/messaging/v1/model_messaging_v1_deactivation.go @@ -13,5 +13,6 @@ package openapi // MessagingV1Deactivation struct for MessagingV1Deactivation type MessagingV1Deactivation struct { + // Redirect url to the list of deactivated numbers. RedirectTo *string `json:"RedirectTo,omitempty"` } diff --git a/twilio/rest/messaging/v1/model_messaging_v1_service.go b/twilio/rest/messaging/v1/model_messaging_v1_service.go index e747b52ac..b844a93fd 100644 --- a/twilio/rest/messaging/v1/model_messaging_v1_service.go +++ b/twilio/rest/messaging/v1/model_messaging_v1_service.go @@ -17,24 +17,44 @@ import ( // MessagingV1Service struct for MessagingV1Service type MessagingV1Service struct { - AccountSid *string `json:"AccountSid,omitempty"` - AreaCodeGeomatch *bool `json:"AreaCodeGeomatch,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FallbackMethod *HttpMethod `json:"FallbackMethod,omitempty"` - FallbackToLongCode *bool `json:"FallbackToLongCode,omitempty"` - FallbackUrl *string `json:"FallbackUrl,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - InboundMethod *HttpMethod `json:"InboundMethod,omitempty"` - InboundRequestUrl *string `json:"InboundRequestUrl,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - MmsConverter *bool `json:"MmsConverter,omitempty"` - ScanMessageContent *ServiceScanMessageContent `json:"ScanMessageContent,omitempty"` - Sid *string `json:"Sid,omitempty"` - SmartEncoding *bool `json:"SmartEncoding,omitempty"` - StatusCallback *string `json:"StatusCallback,omitempty"` - StickySender *bool `json:"StickySender,omitempty"` - SynchronousValidation *bool `json:"SynchronousValidation,omitempty"` - Url *string `json:"Url,omitempty"` - ValidityPeriod *int32 `json:"ValidityPeriod,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // Whether to enable Area Code Geomatch on the Service Instance + AreaCodeGeomatch *bool `json:"AreaCodeGeomatch,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The HTTP method we use to call fallback_url + FallbackMethod *string `json:"FallbackMethod,omitempty"` + // Whether to enable Fallback to Long Code for messages sent through the Service instance + FallbackToLongCode *bool `json:"FallbackToLongCode,omitempty"` + // The URL that we call using fallback_method if an error occurs while retrieving or executing the TwiML from the Inbound Request URL + FallbackUrl *string `json:"FallbackUrl,omitempty"` + // The string that you assigned to describe the resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // The HTTP method we use to call inbound_request_url + InboundMethod *string `json:"InboundMethod,omitempty"` + // The URL we call using inbound_method when a message is received by any phone number or short code in the Service + InboundRequestUrl *string `json:"InboundRequestUrl,omitempty"` + // The absolute URLs of related resources + Links *map[string]interface{} `json:"Links,omitempty"` + // Whether to enable the MMS Converter for messages sent through the Service instance + MmsConverter *bool `json:"MmsConverter,omitempty"` + // Reserved + ScanMessageContent *string `json:"ScanMessageContent,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // Whether to enable Encoding for messages sent through the Service instance + SmartEncoding *bool `json:"SmartEncoding,omitempty"` + // The URL we call to pass status updates about message delivery + StatusCallback *string `json:"StatusCallback,omitempty"` + // Whether to enable Sticky Sender on the Service instance + StickySender *bool `json:"StickySender,omitempty"` + // Reserved + SynchronousValidation *bool `json:"SynchronousValidation,omitempty"` + // The absolute URL of the Service resource + Url *string `json:"Url,omitempty"` + // How long, in seconds, messages sent from the Service are valid + ValidityPeriod *int32 `json:"ValidityPeriod,omitempty"` } diff --git a/twilio/rest/messaging/v1/model_messaging_v1_service_alpha_sender.go b/twilio/rest/messaging/v1/model_messaging_v1_service_alpha_sender.go index a0e5a4906..c3b694996 100644 --- a/twilio/rest/messaging/v1/model_messaging_v1_service_alpha_sender.go +++ b/twilio/rest/messaging/v1/model_messaging_v1_service_alpha_sender.go @@ -17,12 +17,20 @@ import ( // MessagingV1ServiceAlphaSender struct for MessagingV1ServiceAlphaSender type MessagingV1ServiceAlphaSender struct { - AccountSid *string `json:"AccountSid,omitempty"` - AlphaSender *string `json:"AlphaSender,omitempty"` - Capabilities *[]string `json:"Capabilities,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The Alphanumeric Sender ID string + AlphaSender *string `json:"AlphaSender,omitempty"` + // An array of values that describe whether the number can receive calls or messages + Capabilities *[]string `json:"Capabilities,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The SID of the Service that the resource is associated with + ServiceSid *string `json:"ServiceSid,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The absolute URL of the AlphaSender resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/messaging/v1/model_messaging_v1_service_phone_number.go b/twilio/rest/messaging/v1/model_messaging_v1_service_phone_number.go index 7b2706a2c..528255668 100644 --- a/twilio/rest/messaging/v1/model_messaging_v1_service_phone_number.go +++ b/twilio/rest/messaging/v1/model_messaging_v1_service_phone_number.go @@ -17,13 +17,22 @@ import ( // MessagingV1ServicePhoneNumber struct for MessagingV1ServicePhoneNumber type MessagingV1ServicePhoneNumber struct { - AccountSid *string `json:"AccountSid,omitempty"` - Capabilities *[]string `json:"Capabilities,omitempty"` - CountryCode *string `json:"CountryCode,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - PhoneNumber *string `json:"PhoneNumber,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // An array of values that describe whether the number can receive calls or messages + Capabilities *[]string `json:"Capabilities,omitempty"` + // The 2-character ISO Country Code of the number + CountryCode *string `json:"CountryCode,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The phone number in E.164 format + PhoneNumber *string `json:"PhoneNumber,omitempty"` + // The SID of the Service that the resource is associated with + ServiceSid *string `json:"ServiceSid,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The absolute URL of the PhoneNumber resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/messaging/v1/model_messaging_v1_service_short_code.go b/twilio/rest/messaging/v1/model_messaging_v1_service_short_code.go index 6136a2da1..409f85468 100644 --- a/twilio/rest/messaging/v1/model_messaging_v1_service_short_code.go +++ b/twilio/rest/messaging/v1/model_messaging_v1_service_short_code.go @@ -17,13 +17,22 @@ import ( // MessagingV1ServiceShortCode struct for MessagingV1ServiceShortCode type MessagingV1ServiceShortCode struct { - AccountSid *string `json:"AccountSid,omitempty"` - Capabilities *[]string `json:"Capabilities,omitempty"` - CountryCode *string `json:"CountryCode,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - ShortCode *string `json:"ShortCode,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // An array of values that describe whether the number can receive calls or messages + Capabilities *[]string `json:"Capabilities,omitempty"` + // The 2-character ISO Country Code of the number + CountryCode *string `json:"CountryCode,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The SID of the Service that the resource is associated with + ServiceSid *string `json:"ServiceSid,omitempty"` + // The E.164 format of the short code + ShortCode *string `json:"ShortCode,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The absolute URL of the ShortCode resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/monitor/v1/README.md b/twilio/rest/monitor/v1/README.md index 70a06da49..c2e34e7b9 100644 --- a/twilio/rest/monitor/v1/README.md +++ b/twilio/rest/monitor/v1/README.md @@ -39,7 +39,6 @@ Class | Method | HTTP request | Description ## Documentation For Models - - [HttpMethod](docs/HttpMethod.md) - [ListAlertResponse](docs/ListAlertResponse.md) - [ListAlertResponseMeta](docs/ListAlertResponseMeta.md) - [ListEventResponse](docs/ListEventResponse.md) diff --git a/twilio/rest/monitor/v1/docs/ListAlertResponse.md b/twilio/rest/monitor/v1/docs/ListAlertResponse.md index 0016e5a4c..053d861c5 100644 --- a/twilio/rest/monitor/v1/docs/ListAlertResponse.md +++ b/twilio/rest/monitor/v1/docs/ListAlertResponse.md @@ -1,10 +1,10 @@ # ListAlertResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Alerts** | [**[]MonitorV1Alert**](monitor.v1.alert.md) | [optional] -**Meta** | [**ListAlertResponseMeta**](ListAlertResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Alerts** | [**[]MonitorV1Alert**](monitor.v1.alert.md) | |[optional] +**Meta** | [**ListAlertResponseMeta**](ListAlertResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/monitor/v1/docs/ListAlertResponseMeta.md b/twilio/rest/monitor/v1/docs/ListAlertResponseMeta.md index e4c02196e..b6cd68bac 100644 --- a/twilio/rest/monitor/v1/docs/ListAlertResponseMeta.md +++ b/twilio/rest/monitor/v1/docs/ListAlertResponseMeta.md @@ -1,15 +1,15 @@ # ListAlertResponseMeta ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**FirstPageUrl** | **string** | [optional] -**Key** | **string** | [optional] -**NextPageUrl** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUrl** | **string** | [optional] -**Url** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstPageUrl** | **string** | |[optional] +**Key** | **string** | |[optional] +**NextPageUrl** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUrl** | **string** | |[optional] +**Url** | **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/twilio/rest/monitor/v1/docs/ListEventResponse.md b/twilio/rest/monitor/v1/docs/ListEventResponse.md index 8e817298d..7f19fcfce 100644 --- a/twilio/rest/monitor/v1/docs/ListEventResponse.md +++ b/twilio/rest/monitor/v1/docs/ListEventResponse.md @@ -1,10 +1,10 @@ # ListEventResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Events** | [**[]MonitorV1Event**](monitor.v1.event.md) | [optional] -**Meta** | [**ListAlertResponseMeta**](ListAlertResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Events** | [**[]MonitorV1Event**](monitor.v1.event.md) | |[optional] +**Meta** | [**ListAlertResponseMeta**](ListAlertResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/monitor/v1/docs/MonitorV1Alert.md b/twilio/rest/monitor/v1/docs/MonitorV1Alert.md index 27f5f26a9..e70bb34ab 100644 --- a/twilio/rest/monitor/v1/docs/MonitorV1Alert.md +++ b/twilio/rest/monitor/v1/docs/MonitorV1Alert.md @@ -1,23 +1,23 @@ # MonitorV1Alert ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**AlertText** | Pointer to **string** | -**ApiVersion** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateGenerated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**ErrorCode** | Pointer to **string** | -**LogLevel** | Pointer to **string** | -**MoreInfo** | Pointer to **string** | -**RequestMethod** | Pointer to [**HttpMethod**](http_method.md) | -**RequestUrl** | Pointer to **string** | -**ResourceSid** | Pointer to **string** | -**ServiceSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**AlertText** | Pointer to **string** | The text of the alert | +**ApiVersion** | Pointer to **string** | The API version used when the alert was generated | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**DateGenerated** | Pointer to [**time.Time**](time.Time.md) | The date and time when the alert was generated specified in ISO 8601 format | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was last updated | +**ErrorCode** | Pointer to **string** | The error code for the condition that generated the alert | +**LogLevel** | Pointer to **string** | The log level | +**MoreInfo** | Pointer to **string** | The URL of the page in our Error Dictionary with more information about the error condition | +**RequestMethod** | Pointer to **string** | The method used by the request that generated the alert | +**RequestUrl** | Pointer to **string** | The URL of the request that generated the alert | +**ResourceSid** | Pointer to **string** | The SID of the resource for which the alert was generated | +**ServiceSid** | Pointer to **string** | The SID of the service or resource that generated the alert | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Url** | Pointer to **string** | The absolute URL of the Alert resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/monitor/v1/docs/MonitorV1AlertInstance.md b/twilio/rest/monitor/v1/docs/MonitorV1AlertInstance.md index 0a1a51175..68fce8db2 100644 --- a/twilio/rest/monitor/v1/docs/MonitorV1AlertInstance.md +++ b/twilio/rest/monitor/v1/docs/MonitorV1AlertInstance.md @@ -1,27 +1,27 @@ # MonitorV1AlertInstance ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**AlertText** | Pointer to **string** | -**ApiVersion** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateGenerated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**ErrorCode** | Pointer to **string** | -**LogLevel** | Pointer to **string** | -**MoreInfo** | Pointer to **string** | -**RequestHeaders** | Pointer to **string** | -**RequestMethod** | Pointer to [**HttpMethod**](http_method.md) | -**RequestUrl** | Pointer to **string** | -**RequestVariables** | Pointer to **string** | -**ResourceSid** | Pointer to **string** | -**ResponseBody** | Pointer to **string** | -**ResponseHeaders** | Pointer to **string** | -**ServiceSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**AlertText** | Pointer to **string** | The text of the alert | +**ApiVersion** | Pointer to **string** | The API version used when the alert was generated | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**DateGenerated** | Pointer to [**time.Time**](time.Time.md) | The date and time when the alert was generated specified in ISO 8601 format | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was last updated | +**ErrorCode** | Pointer to **string** | The error code for the condition that generated the alert | +**LogLevel** | Pointer to **string** | The log level | +**MoreInfo** | Pointer to **string** | The URL of the page in our Error Dictionary with more information about the error condition | +**RequestHeaders** | Pointer to **string** | The request headers of the request that generated the alert | +**RequestMethod** | Pointer to **string** | The method used by the request that generated the alert | +**RequestUrl** | Pointer to **string** | The URL of the request that generated the alert | +**RequestVariables** | Pointer to **string** | The variables passed in the request that generated the alert | +**ResourceSid** | Pointer to **string** | The SID of the resource for which the alert was generated | +**ResponseBody** | Pointer to **string** | The response body of the request that generated the alert | +**ResponseHeaders** | Pointer to **string** | The response headers of the request that generated the alert | +**ServiceSid** | Pointer to **string** | The SID of the service or resource that generated the alert | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Url** | Pointer to **string** | The absolute URL of the Alert resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/monitor/v1/docs/MonitorV1Event.md b/twilio/rest/monitor/v1/docs/MonitorV1Event.md index 2d17ac91f..3f3013ea4 100644 --- a/twilio/rest/monitor/v1/docs/MonitorV1Event.md +++ b/twilio/rest/monitor/v1/docs/MonitorV1Event.md @@ -1,22 +1,22 @@ # MonitorV1Event ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**ActorSid** | Pointer to **string** | -**ActorType** | Pointer to **string** | -**Description** | Pointer to **string** | -**EventData** | Pointer to **map[string]interface{}** | -**EventDate** | Pointer to [**time.Time**](time.Time.md) | -**EventType** | Pointer to **string** | -**Links** | Pointer to **map[string]interface{}** | -**ResourceSid** | Pointer to **string** | -**ResourceType** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Source** | Pointer to **string** | -**SourceIpAddress** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**ActorSid** | Pointer to **string** | The SID of the actor that caused the event, if available | +**ActorType** | Pointer to **string** | The type of actor that caused the event | +**Description** | Pointer to **string** | A description of the event | +**EventData** | Pointer to **map[string]interface{}** | A JSON string that represents an object with additional data about the event | +**EventDate** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the event was recorded | +**EventType** | Pointer to **string** | The event's type | +**Links** | Pointer to **map[string]interface{}** | The absolute URLs of related resources | +**ResourceSid** | Pointer to **string** | The SID of the resource that was affected | +**ResourceType** | Pointer to **string** | The type of resource that was affected | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Source** | Pointer to **string** | The originating system or interface that caused the event | +**SourceIpAddress** | Pointer to **string** | The IP address of the source | +**Url** | Pointer to **string** | The absolute URL of the resource that was affected | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/monitor/v1/model_monitor_v1_alert.go b/twilio/rest/monitor/v1/model_monitor_v1_alert.go index 941fa2134..afa5a531a 100644 --- a/twilio/rest/monitor/v1/model_monitor_v1_alert.go +++ b/twilio/rest/monitor/v1/model_monitor_v1_alert.go @@ -17,19 +17,34 @@ import ( // MonitorV1Alert struct for MonitorV1Alert type MonitorV1Alert struct { - AccountSid *string `json:"AccountSid,omitempty"` - AlertText *string `json:"AlertText,omitempty"` - ApiVersion *string `json:"ApiVersion,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateGenerated *time.Time `json:"DateGenerated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - ErrorCode *string `json:"ErrorCode,omitempty"` - LogLevel *string `json:"LogLevel,omitempty"` - MoreInfo *string `json:"MoreInfo,omitempty"` - RequestMethod *HttpMethod `json:"RequestMethod,omitempty"` - RequestUrl *string `json:"RequestUrl,omitempty"` - ResourceSid *string `json:"ResourceSid,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The text of the alert + AlertText *string `json:"AlertText,omitempty"` + // The API version used when the alert was generated + ApiVersion *string `json:"ApiVersion,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The date and time when the alert was generated specified in ISO 8601 format + DateGenerated *time.Time `json:"DateGenerated,omitempty"` + // The ISO 8601 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The error code for the condition that generated the alert + ErrorCode *string `json:"ErrorCode,omitempty"` + // The log level + LogLevel *string `json:"LogLevel,omitempty"` + // The URL of the page in our Error Dictionary with more information about the error condition + MoreInfo *string `json:"MoreInfo,omitempty"` + // The method used by the request that generated the alert + RequestMethod *string `json:"RequestMethod,omitempty"` + // The URL of the request that generated the alert + RequestUrl *string `json:"RequestUrl,omitempty"` + // The SID of the resource for which the alert was generated + ResourceSid *string `json:"ResourceSid,omitempty"` + // The SID of the service or resource that generated the alert + ServiceSid *string `json:"ServiceSid,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The absolute URL of the Alert resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/monitor/v1/model_monitor_v1_alert_instance.go b/twilio/rest/monitor/v1/model_monitor_v1_alert_instance.go index 567960847..c81a94feb 100644 --- a/twilio/rest/monitor/v1/model_monitor_v1_alert_instance.go +++ b/twilio/rest/monitor/v1/model_monitor_v1_alert_instance.go @@ -17,23 +17,42 @@ import ( // MonitorV1AlertInstance struct for MonitorV1AlertInstance type MonitorV1AlertInstance struct { - AccountSid *string `json:"AccountSid,omitempty"` - AlertText *string `json:"AlertText,omitempty"` - ApiVersion *string `json:"ApiVersion,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateGenerated *time.Time `json:"DateGenerated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - ErrorCode *string `json:"ErrorCode,omitempty"` - LogLevel *string `json:"LogLevel,omitempty"` - MoreInfo *string `json:"MoreInfo,omitempty"` - RequestHeaders *string `json:"RequestHeaders,omitempty"` - RequestMethod *HttpMethod `json:"RequestMethod,omitempty"` - RequestUrl *string `json:"RequestUrl,omitempty"` - RequestVariables *string `json:"RequestVariables,omitempty"` - ResourceSid *string `json:"ResourceSid,omitempty"` - ResponseBody *string `json:"ResponseBody,omitempty"` - ResponseHeaders *string `json:"ResponseHeaders,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The text of the alert + AlertText *string `json:"AlertText,omitempty"` + // The API version used when the alert was generated + ApiVersion *string `json:"ApiVersion,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The date and time when the alert was generated specified in ISO 8601 format + DateGenerated *time.Time `json:"DateGenerated,omitempty"` + // The ISO 8601 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The error code for the condition that generated the alert + ErrorCode *string `json:"ErrorCode,omitempty"` + // The log level + LogLevel *string `json:"LogLevel,omitempty"` + // The URL of the page in our Error Dictionary with more information about the error condition + MoreInfo *string `json:"MoreInfo,omitempty"` + // The request headers of the request that generated the alert + RequestHeaders *string `json:"RequestHeaders,omitempty"` + // The method used by the request that generated the alert + RequestMethod *string `json:"RequestMethod,omitempty"` + // The URL of the request that generated the alert + RequestUrl *string `json:"RequestUrl,omitempty"` + // The variables passed in the request that generated the alert + RequestVariables *string `json:"RequestVariables,omitempty"` + // The SID of the resource for which the alert was generated + ResourceSid *string `json:"ResourceSid,omitempty"` + // The response body of the request that generated the alert + ResponseBody *string `json:"ResponseBody,omitempty"` + // The response headers of the request that generated the alert + ResponseHeaders *string `json:"ResponseHeaders,omitempty"` + // The SID of the service or resource that generated the alert + ServiceSid *string `json:"ServiceSid,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The absolute URL of the Alert resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/monitor/v1/model_monitor_v1_event.go b/twilio/rest/monitor/v1/model_monitor_v1_event.go index c8ae5ae33..6a9087130 100644 --- a/twilio/rest/monitor/v1/model_monitor_v1_event.go +++ b/twilio/rest/monitor/v1/model_monitor_v1_event.go @@ -17,18 +17,32 @@ import ( // MonitorV1Event struct for MonitorV1Event type MonitorV1Event struct { - AccountSid *string `json:"AccountSid,omitempty"` - ActorSid *string `json:"ActorSid,omitempty"` - ActorType *string `json:"ActorType,omitempty"` - Description *string `json:"Description,omitempty"` - EventData *map[string]interface{} `json:"EventData,omitempty"` - EventDate *time.Time `json:"EventDate,omitempty"` - EventType *string `json:"EventType,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - ResourceSid *string `json:"ResourceSid,omitempty"` - ResourceType *string `json:"ResourceType,omitempty"` - Sid *string `json:"Sid,omitempty"` - Source *string `json:"Source,omitempty"` - SourceIpAddress *string `json:"SourceIpAddress,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The SID of the actor that caused the event, if available + ActorSid *string `json:"ActorSid,omitempty"` + // The type of actor that caused the event + ActorType *string `json:"ActorType,omitempty"` + // A description of the event + Description *string `json:"Description,omitempty"` + // A JSON string that represents an object with additional data about the event + EventData *map[string]interface{} `json:"EventData,omitempty"` + // The ISO 8601 date and time in GMT when the event was recorded + EventDate *time.Time `json:"EventDate,omitempty"` + // The event's type + EventType *string `json:"EventType,omitempty"` + // The absolute URLs of related resources + Links *map[string]interface{} `json:"Links,omitempty"` + // The SID of the resource that was affected + ResourceSid *string `json:"ResourceSid,omitempty"` + // The type of resource that was affected + ResourceType *string `json:"ResourceType,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The originating system or interface that caused the event + Source *string `json:"Source,omitempty"` + // The IP address of the source + SourceIpAddress *string `json:"SourceIpAddress,omitempty"` + // The absolute URL of the resource that was affected + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/notify/v1/README.md b/twilio/rest/notify/v1/README.md index aefa451be..49b984d66 100644 --- a/twilio/rest/notify/v1/README.md +++ b/twilio/rest/notify/v1/README.md @@ -50,12 +50,10 @@ Class | Method | HTTP request | Description ## Documentation For Models - - [CredentialPushService](docs/CredentialPushService.md) - [ListBindingResponse](docs/ListBindingResponse.md) - [ListCredentialResponse](docs/ListCredentialResponse.md) - [ListCredentialResponseMeta](docs/ListCredentialResponseMeta.md) - [ListServiceResponse](docs/ListServiceResponse.md) - - [NotificationPriority](docs/NotificationPriority.md) - [NotifyV1Credential](docs/NotifyV1Credential.md) - [NotifyV1Service](docs/NotifyV1Service.md) - [NotifyV1ServiceBinding](docs/NotifyV1ServiceBinding.md) diff --git a/twilio/rest/notify/v1/docs/ListBindingResponse.md b/twilio/rest/notify/v1/docs/ListBindingResponse.md index a34ff01b5..9d86d3ba1 100644 --- a/twilio/rest/notify/v1/docs/ListBindingResponse.md +++ b/twilio/rest/notify/v1/docs/ListBindingResponse.md @@ -1,10 +1,10 @@ # ListBindingResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Bindings** | [**[]NotifyV1ServiceBinding**](notify.v1.service.binding.md) | [optional] -**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Bindings** | [**[]NotifyV1ServiceBinding**](notify.v1.service.binding.md) | |[optional] +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/notify/v1/docs/ListCredentialResponse.md b/twilio/rest/notify/v1/docs/ListCredentialResponse.md index e02641779..d1baebddd 100644 --- a/twilio/rest/notify/v1/docs/ListCredentialResponse.md +++ b/twilio/rest/notify/v1/docs/ListCredentialResponse.md @@ -1,10 +1,10 @@ # ListCredentialResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Credentials** | [**[]NotifyV1Credential**](notify.v1.credential.md) | [optional] -**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Credentials** | [**[]NotifyV1Credential**](notify.v1.credential.md) | |[optional] +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/notify/v1/docs/ListCredentialResponseMeta.md b/twilio/rest/notify/v1/docs/ListCredentialResponseMeta.md index fdaf9c314..1de617a01 100644 --- a/twilio/rest/notify/v1/docs/ListCredentialResponseMeta.md +++ b/twilio/rest/notify/v1/docs/ListCredentialResponseMeta.md @@ -1,15 +1,15 @@ # ListCredentialResponseMeta ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**FirstPageUrl** | **string** | [optional] -**Key** | **string** | [optional] -**NextPageUrl** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUrl** | **string** | [optional] -**Url** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstPageUrl** | **string** | |[optional] +**Key** | **string** | |[optional] +**NextPageUrl** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUrl** | **string** | |[optional] +**Url** | **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/twilio/rest/notify/v1/docs/ListServiceResponse.md b/twilio/rest/notify/v1/docs/ListServiceResponse.md index 86c1238a6..db7136995 100644 --- a/twilio/rest/notify/v1/docs/ListServiceResponse.md +++ b/twilio/rest/notify/v1/docs/ListServiceResponse.md @@ -1,10 +1,10 @@ # ListServiceResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | [optional] -**Services** | [**[]NotifyV1Service**](notify.v1.service.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | |[optional] +**Services** | [**[]NotifyV1Service**](notify.v1.service.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/notify/v1/docs/NotifyV1Credential.md b/twilio/rest/notify/v1/docs/NotifyV1Credential.md index 3a4c14364..344c2e5ae 100644 --- a/twilio/rest/notify/v1/docs/NotifyV1Credential.md +++ b/twilio/rest/notify/v1/docs/NotifyV1Credential.md @@ -1,16 +1,16 @@ # NotifyV1Credential ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**FriendlyName** | Pointer to **string** | -**Sandbox** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Type** | Pointer to [**CredentialPushService**](credential_push_service.md) | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was last updated | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the resource | +**Sandbox** | Pointer to **string** | [APN only] Whether to send the credential to sandbox APNs | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Type** | Pointer to **string** | The Credential type, one of `gcm`, `fcm`, or `apn` | +**Url** | Pointer to **string** | The absolute URL of the Credential resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/notify/v1/docs/NotifyV1Service.md b/twilio/rest/notify/v1/docs/NotifyV1Service.md index 05ffd6c35..446c293b1 100644 --- a/twilio/rest/notify/v1/docs/NotifyV1Service.md +++ b/twilio/rest/notify/v1/docs/NotifyV1Service.md @@ -1,28 +1,28 @@ # NotifyV1Service ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**AlexaSkillId** | Pointer to **string** | -**ApnCredentialSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**DefaultAlexaNotificationProtocolVersion** | Pointer to **string** | -**DefaultApnNotificationProtocolVersion** | Pointer to **string** | -**DefaultFcmNotificationProtocolVersion** | Pointer to **string** | -**DefaultGcmNotificationProtocolVersion** | Pointer to **string** | -**DeliveryCallbackEnabled** | Pointer to **bool** | -**DeliveryCallbackUrl** | Pointer to **string** | -**FacebookMessengerPageId** | Pointer to **string** | -**FcmCredentialSid** | Pointer to **string** | -**FriendlyName** | Pointer to **string** | -**GcmCredentialSid** | Pointer to **string** | -**Links** | Pointer to **map[string]interface{}** | -**LogEnabled** | Pointer to **bool** | -**MessagingServiceSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**AlexaSkillId** | Pointer to **string** | Deprecated | +**ApnCredentialSid** | Pointer to **string** | The SID of the Credential to use for APN Bindings | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was last updated | +**DefaultAlexaNotificationProtocolVersion** | Pointer to **string** | Deprecated | +**DefaultApnNotificationProtocolVersion** | Pointer to **string** | The protocol version to use for sending APNS notifications | +**DefaultFcmNotificationProtocolVersion** | Pointer to **string** | The protocol version to use for sending FCM notifications | +**DefaultGcmNotificationProtocolVersion** | Pointer to **string** | The protocol version to use for sending GCM notifications | +**DeliveryCallbackEnabled** | Pointer to **bool** | Enable delivery callbacks | +**DeliveryCallbackUrl** | Pointer to **string** | Webhook URL | +**FacebookMessengerPageId** | Pointer to **string** | Deprecated | +**FcmCredentialSid** | Pointer to **string** | The SID of the Credential to use for FCM Bindings | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the resource | +**GcmCredentialSid** | Pointer to **string** | The SID of the Credential to use for GCM Bindings | +**Links** | Pointer to **map[string]interface{}** | The URLs of the resources related to the service | +**LogEnabled** | Pointer to **bool** | Whether to log notifications | +**MessagingServiceSid** | Pointer to **string** | The SID of the Messaging Service to use for SMS Bindings | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Url** | Pointer to **string** | The absolute URL of the Service resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/notify/v1/docs/NotifyV1ServiceBinding.md b/twilio/rest/notify/v1/docs/NotifyV1ServiceBinding.md index 0b81bc66c..dcf79ca31 100644 --- a/twilio/rest/notify/v1/docs/NotifyV1ServiceBinding.md +++ b/twilio/rest/notify/v1/docs/NotifyV1ServiceBinding.md @@ -1,22 +1,22 @@ # NotifyV1ServiceBinding ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Address** | Pointer to **string** | -**BindingType** | Pointer to **string** | -**CredentialSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**Endpoint** | Pointer to **string** | -**Identity** | Pointer to **string** | -**Links** | Pointer to **map[string]interface{}** | -**NotificationProtocolVersion** | Pointer to **string** | -**ServiceSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Tags** | Pointer to **[]string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**Address** | Pointer to **string** | The channel-specific address | +**BindingType** | Pointer to **string** | The type of the Binding | +**CredentialSid** | Pointer to **string** | The SID of the Credential resource to be used to send notifications to this Binding | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was last updated | +**Endpoint** | Pointer to **string** | Deprecated | +**Identity** | Pointer to **string** | The `identity` value that identifies the new resource's User | +**Links** | Pointer to **map[string]interface{}** | The URLs of related resources | +**NotificationProtocolVersion** | Pointer to **string** | The protocol version to use to send the notification | +**ServiceSid** | Pointer to **string** | The SID of the Service that the resource is associated with | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Tags** | Pointer to **[]string** | The list of tags associated with this Binding | +**Url** | Pointer to **string** | The absolute URL of the Binding resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/notify/v1/docs/NotifyV1ServiceNotification.md b/twilio/rest/notify/v1/docs/NotifyV1ServiceNotification.md index 1681b87f0..1da27f60a 100644 --- a/twilio/rest/notify/v1/docs/NotifyV1ServiceNotification.md +++ b/twilio/rest/notify/v1/docs/NotifyV1ServiceNotification.md @@ -1,28 +1,28 @@ # NotifyV1ServiceNotification ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Action** | Pointer to **string** | -**Alexa** | Pointer to **map[string]interface{}** | -**Apn** | Pointer to **map[string]interface{}** | -**Body** | Pointer to **string** | -**Data** | Pointer to **map[string]interface{}** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**FacebookMessenger** | Pointer to **map[string]interface{}** | -**Fcm** | Pointer to **map[string]interface{}** | -**Gcm** | Pointer to **map[string]interface{}** | -**Identities** | Pointer to **[]string** | -**Priority** | Pointer to [**NotificationPriority**](notification_priority.md) | -**Segments** | Pointer to **[]string** | -**ServiceSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Sms** | Pointer to **map[string]interface{}** | -**Sound** | Pointer to **string** | -**Tags** | Pointer to **[]string** | -**Title** | Pointer to **string** | -**Ttl** | Pointer to **int32** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**Action** | Pointer to **string** | The actions to display for the notification | +**Alexa** | Pointer to **map[string]interface{}** | Deprecated | +**Apn** | Pointer to **map[string]interface{}** | The APNS-specific payload that overrides corresponding attributes in a generic payload for APNS Bindings | +**Body** | Pointer to **string** | The notification body text | +**Data** | Pointer to **map[string]interface{}** | The custom key-value pairs of the notification's payload | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was created | +**FacebookMessenger** | Pointer to **map[string]interface{}** | Deprecated | +**Fcm** | Pointer to **map[string]interface{}** | The FCM-specific payload that overrides corresponding attributes in generic payload for FCM Bindings | +**Gcm** | Pointer to **map[string]interface{}** | The GCM-specific payload that overrides corresponding attributes in generic payload for GCM Bindings | +**Identities** | Pointer to **[]string** | The list of identity values of the Users to notify | +**Priority** | Pointer to **string** | The priority of the notification | +**Segments** | Pointer to **[]string** | The list of Segments to notify | +**ServiceSid** | Pointer to **string** | The SID of the Service that the resource is associated with | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Sms** | Pointer to **map[string]interface{}** | The SMS-specific payload that overrides corresponding attributes in generic payload for SMS Bindings | +**Sound** | Pointer to **string** | The name of the sound to be played for the notification | +**Tags** | Pointer to **[]string** | The tags that select the Bindings to notify | +**Title** | Pointer to **string** | The notification title | +**Ttl** | Pointer to **int32** | How long, in seconds, the notification is valid | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/notify/v1/model_notify_v1_credential.go b/twilio/rest/notify/v1/model_notify_v1_credential.go index 8c9ed9fb1..45708b33d 100644 --- a/twilio/rest/notify/v1/model_notify_v1_credential.go +++ b/twilio/rest/notify/v1/model_notify_v1_credential.go @@ -17,12 +17,20 @@ import ( // NotifyV1Credential struct for NotifyV1Credential type NotifyV1Credential struct { - AccountSid *string `json:"AccountSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Sandbox *string `json:"Sandbox,omitempty"` - Sid *string `json:"Sid,omitempty"` - Type *CredentialPushService `json:"Type,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The RFC 2822 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The string that you assigned to describe the resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // [APN only] Whether to send the credential to sandbox APNs + Sandbox *string `json:"Sandbox,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The Credential type, one of `gcm`, `fcm`, or `apn` + Type *string `json:"Type,omitempty"` + // The absolute URL of the Credential resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/notify/v1/model_notify_v1_service.go b/twilio/rest/notify/v1/model_notify_v1_service.go index 55d9b5db1..69dd55901 100644 --- a/twilio/rest/notify/v1/model_notify_v1_service.go +++ b/twilio/rest/notify/v1/model_notify_v1_service.go @@ -17,24 +17,44 @@ import ( // NotifyV1Service struct for NotifyV1Service type NotifyV1Service struct { - AccountSid *string `json:"AccountSid,omitempty"` - AlexaSkillId *string `json:"AlexaSkillId,omitempty"` - ApnCredentialSid *string `json:"ApnCredentialSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - DefaultAlexaNotificationProtocolVersion *string `json:"DefaultAlexaNotificationProtocolVersion,omitempty"` - DefaultApnNotificationProtocolVersion *string `json:"DefaultApnNotificationProtocolVersion,omitempty"` - DefaultFcmNotificationProtocolVersion *string `json:"DefaultFcmNotificationProtocolVersion,omitempty"` - DefaultGcmNotificationProtocolVersion *string `json:"DefaultGcmNotificationProtocolVersion,omitempty"` - DeliveryCallbackEnabled *bool `json:"DeliveryCallbackEnabled,omitempty"` - DeliveryCallbackUrl *string `json:"DeliveryCallbackUrl,omitempty"` - FacebookMessengerPageId *string `json:"FacebookMessengerPageId,omitempty"` - FcmCredentialSid *string `json:"FcmCredentialSid,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - GcmCredentialSid *string `json:"GcmCredentialSid,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - LogEnabled *bool `json:"LogEnabled,omitempty"` - MessagingServiceSid *string `json:"MessagingServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // Deprecated + AlexaSkillId *string `json:"AlexaSkillId,omitempty"` + // The SID of the Credential to use for APN Bindings + ApnCredentialSid *string `json:"ApnCredentialSid,omitempty"` + // The RFC 2822 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // Deprecated + DefaultAlexaNotificationProtocolVersion *string `json:"DefaultAlexaNotificationProtocolVersion,omitempty"` + // The protocol version to use for sending APNS notifications + DefaultApnNotificationProtocolVersion *string `json:"DefaultApnNotificationProtocolVersion,omitempty"` + // The protocol version to use for sending FCM notifications + DefaultFcmNotificationProtocolVersion *string `json:"DefaultFcmNotificationProtocolVersion,omitempty"` + // The protocol version to use for sending GCM notifications + DefaultGcmNotificationProtocolVersion *string `json:"DefaultGcmNotificationProtocolVersion,omitempty"` + // Enable delivery callbacks + DeliveryCallbackEnabled *bool `json:"DeliveryCallbackEnabled,omitempty"` + // Webhook URL + DeliveryCallbackUrl *string `json:"DeliveryCallbackUrl,omitempty"` + // Deprecated + FacebookMessengerPageId *string `json:"FacebookMessengerPageId,omitempty"` + // The SID of the Credential to use for FCM Bindings + FcmCredentialSid *string `json:"FcmCredentialSid,omitempty"` + // The string that you assigned to describe the resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // The SID of the Credential to use for GCM Bindings + GcmCredentialSid *string `json:"GcmCredentialSid,omitempty"` + // The URLs of the resources related to the service + Links *map[string]interface{} `json:"Links,omitempty"` + // Whether to log notifications + LogEnabled *bool `json:"LogEnabled,omitempty"` + // The SID of the Messaging Service to use for SMS Bindings + MessagingServiceSid *string `json:"MessagingServiceSid,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The absolute URL of the Service resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/notify/v1/model_notify_v1_service_binding.go b/twilio/rest/notify/v1/model_notify_v1_service_binding.go index a04ac4180..6e051ba70 100644 --- a/twilio/rest/notify/v1/model_notify_v1_service_binding.go +++ b/twilio/rest/notify/v1/model_notify_v1_service_binding.go @@ -17,18 +17,32 @@ import ( // NotifyV1ServiceBinding struct for NotifyV1ServiceBinding type NotifyV1ServiceBinding struct { - AccountSid *string `json:"AccountSid,omitempty"` - Address *string `json:"Address,omitempty"` - BindingType *string `json:"BindingType,omitempty"` - CredentialSid *string `json:"CredentialSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Endpoint *string `json:"Endpoint,omitempty"` - Identity *string `json:"Identity,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - NotificationProtocolVersion *string `json:"NotificationProtocolVersion,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Tags *[]string `json:"Tags,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The channel-specific address + Address *string `json:"Address,omitempty"` + // The type of the Binding + BindingType *string `json:"BindingType,omitempty"` + // The SID of the Credential resource to be used to send notifications to this Binding + CredentialSid *string `json:"CredentialSid,omitempty"` + // The RFC 2822 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // Deprecated + Endpoint *string `json:"Endpoint,omitempty"` + // The `identity` value that identifies the new resource's User + Identity *string `json:"Identity,omitempty"` + // The URLs of related resources + Links *map[string]interface{} `json:"Links,omitempty"` + // The protocol version to use to send the notification + NotificationProtocolVersion *string `json:"NotificationProtocolVersion,omitempty"` + // The SID of the Service that the resource is associated with + ServiceSid *string `json:"ServiceSid,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The list of tags associated with this Binding + Tags *[]string `json:"Tags,omitempty"` + // The absolute URL of the Binding resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/notify/v1/model_notify_v1_service_notification.go b/twilio/rest/notify/v1/model_notify_v1_service_notification.go index 9a650145a..402a73940 100644 --- a/twilio/rest/notify/v1/model_notify_v1_service_notification.go +++ b/twilio/rest/notify/v1/model_notify_v1_service_notification.go @@ -17,24 +17,44 @@ import ( // NotifyV1ServiceNotification struct for NotifyV1ServiceNotification type NotifyV1ServiceNotification struct { - AccountSid *string `json:"AccountSid,omitempty"` - Action *string `json:"Action,omitempty"` - Alexa *map[string]interface{} `json:"Alexa,omitempty"` - Apn *map[string]interface{} `json:"Apn,omitempty"` - Body *string `json:"Body,omitempty"` - Data *map[string]interface{} `json:"Data,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The actions to display for the notification + Action *string `json:"Action,omitempty"` + // Deprecated + Alexa *map[string]interface{} `json:"Alexa,omitempty"` + // The APNS-specific payload that overrides corresponding attributes in a generic payload for APNS Bindings + Apn *map[string]interface{} `json:"Apn,omitempty"` + // The notification body text + Body *string `json:"Body,omitempty"` + // The custom key-value pairs of the notification's payload + Data *map[string]interface{} `json:"Data,omitempty"` + // The RFC 2822 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // Deprecated FacebookMessenger *map[string]interface{} `json:"FacebookMessenger,omitempty"` - Fcm *map[string]interface{} `json:"Fcm,omitempty"` - Gcm *map[string]interface{} `json:"Gcm,omitempty"` - Identities *[]string `json:"Identities,omitempty"` - Priority *NotificationPriority `json:"Priority,omitempty"` - Segments *[]string `json:"Segments,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Sms *map[string]interface{} `json:"Sms,omitempty"` - Sound *string `json:"Sound,omitempty"` - Tags *[]string `json:"Tags,omitempty"` - Title *string `json:"Title,omitempty"` - Ttl *int32 `json:"Ttl,omitempty"` + // The FCM-specific payload that overrides corresponding attributes in generic payload for FCM Bindings + Fcm *map[string]interface{} `json:"Fcm,omitempty"` + // The GCM-specific payload that overrides corresponding attributes in generic payload for GCM Bindings + Gcm *map[string]interface{} `json:"Gcm,omitempty"` + // The list of identity values of the Users to notify + Identities *[]string `json:"Identities,omitempty"` + // The priority of the notification + Priority *string `json:"Priority,omitempty"` + // The list of Segments to notify + Segments *[]string `json:"Segments,omitempty"` + // The SID of the Service that the resource is associated with + ServiceSid *string `json:"ServiceSid,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The SMS-specific payload that overrides corresponding attributes in generic payload for SMS Bindings + Sms *map[string]interface{} `json:"Sms,omitempty"` + // The name of the sound to be played for the notification + Sound *string `json:"Sound,omitempty"` + // The tags that select the Bindings to notify + Tags *[]string `json:"Tags,omitempty"` + // The notification title + Title *string `json:"Title,omitempty"` + // How long, in seconds, the notification is valid + Ttl *int32 `json:"Ttl,omitempty"` } diff --git a/twilio/rest/numbers/v2/README.md b/twilio/rest/numbers/v2/README.md index d846a5003..8603f9969 100644 --- a/twilio/rest/numbers/v2/README.md +++ b/twilio/rest/numbers/v2/README.md @@ -63,9 +63,6 @@ Class | Method | HTTP request | Description ## Documentation For Models - - [BundleStatus](docs/BundleStatus.md) - - [EndUserType](docs/EndUserType.md) - - [EvaluationStatus](docs/EvaluationStatus.md) - [ListBundleResponse](docs/ListBundleResponse.md) - [ListBundleResponseMeta](docs/ListBundleResponseMeta.md) - [ListEndUserResponse](docs/ListEndUserResponse.md) @@ -83,8 +80,6 @@ Class | Method | HTTP request | Description - [NumbersV2RegulatoryComplianceRegulation](docs/NumbersV2RegulatoryComplianceRegulation.md) - [NumbersV2RegulatoryComplianceSupportingDocument](docs/NumbersV2RegulatoryComplianceSupportingDocument.md) - [NumbersV2RegulatoryComplianceSupportingDocumentType](docs/NumbersV2RegulatoryComplianceSupportingDocumentType.md) - - [RegulationEndUserType](docs/RegulationEndUserType.md) - - [SupportingDocumentStatus](docs/SupportingDocumentStatus.md) ## Documentation For Authorization diff --git a/twilio/rest/numbers/v2/docs/ListBundleResponse.md b/twilio/rest/numbers/v2/docs/ListBundleResponse.md index 5a850b8cb..558e30301 100644 --- a/twilio/rest/numbers/v2/docs/ListBundleResponse.md +++ b/twilio/rest/numbers/v2/docs/ListBundleResponse.md @@ -1,10 +1,10 @@ # ListBundleResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListBundleResponseMeta**](ListBundleResponse_meta.md) | [optional] -**Results** | [**[]NumbersV2RegulatoryComplianceBundle**](numbers.v2.regulatory_compliance.bundle.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListBundleResponseMeta**](ListBundleResponse_meta.md) | |[optional] +**Results** | [**[]NumbersV2RegulatoryComplianceBundle**](numbers.v2.regulatory_compliance.bundle.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/numbers/v2/docs/ListBundleResponseMeta.md b/twilio/rest/numbers/v2/docs/ListBundleResponseMeta.md index dbb9b4f10..ccce86f69 100644 --- a/twilio/rest/numbers/v2/docs/ListBundleResponseMeta.md +++ b/twilio/rest/numbers/v2/docs/ListBundleResponseMeta.md @@ -1,15 +1,15 @@ # ListBundleResponseMeta ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**FirstPageUrl** | **string** | [optional] -**Key** | **string** | [optional] -**NextPageUrl** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUrl** | **string** | [optional] -**Url** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstPageUrl** | **string** | |[optional] +**Key** | **string** | |[optional] +**NextPageUrl** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUrl** | **string** | |[optional] +**Url** | **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/twilio/rest/numbers/v2/docs/ListEndUserResponse.md b/twilio/rest/numbers/v2/docs/ListEndUserResponse.md index 94a575da8..58062443f 100644 --- a/twilio/rest/numbers/v2/docs/ListEndUserResponse.md +++ b/twilio/rest/numbers/v2/docs/ListEndUserResponse.md @@ -1,10 +1,10 @@ # ListEndUserResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListBundleResponseMeta**](ListBundleResponse_meta.md) | [optional] -**Results** | [**[]NumbersV2RegulatoryComplianceEndUser**](numbers.v2.regulatory_compliance.end_user.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListBundleResponseMeta**](ListBundleResponse_meta.md) | |[optional] +**Results** | [**[]NumbersV2RegulatoryComplianceEndUser**](numbers.v2.regulatory_compliance.end_user.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/numbers/v2/docs/ListEndUserTypeResponse.md b/twilio/rest/numbers/v2/docs/ListEndUserTypeResponse.md index 93f3f346f..6972744a1 100644 --- a/twilio/rest/numbers/v2/docs/ListEndUserTypeResponse.md +++ b/twilio/rest/numbers/v2/docs/ListEndUserTypeResponse.md @@ -1,10 +1,10 @@ # ListEndUserTypeResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**EndUserTypes** | [**[]NumbersV2RegulatoryComplianceEndUserType**](numbers.v2.regulatory_compliance.end_user_type.md) | [optional] -**Meta** | [**ListBundleResponseMeta**](ListBundleResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**EndUserTypes** | [**[]NumbersV2RegulatoryComplianceEndUserType**](numbers.v2.regulatory_compliance.end_user_type.md) | |[optional] +**Meta** | [**ListBundleResponseMeta**](ListBundleResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/numbers/v2/docs/ListEvaluationResponse.md b/twilio/rest/numbers/v2/docs/ListEvaluationResponse.md index ee79a33a8..bbe464d7b 100644 --- a/twilio/rest/numbers/v2/docs/ListEvaluationResponse.md +++ b/twilio/rest/numbers/v2/docs/ListEvaluationResponse.md @@ -1,10 +1,10 @@ # ListEvaluationResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListBundleResponseMeta**](ListBundleResponse_meta.md) | [optional] -**Results** | [**[]NumbersV2RegulatoryComplianceBundleEvaluation**](numbers.v2.regulatory_compliance.bundle.evaluation.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListBundleResponseMeta**](ListBundleResponse_meta.md) | |[optional] +**Results** | [**[]NumbersV2RegulatoryComplianceBundleEvaluation**](numbers.v2.regulatory_compliance.bundle.evaluation.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/numbers/v2/docs/ListItemAssignmentResponse.md b/twilio/rest/numbers/v2/docs/ListItemAssignmentResponse.md index 698998359..93c83900f 100644 --- a/twilio/rest/numbers/v2/docs/ListItemAssignmentResponse.md +++ b/twilio/rest/numbers/v2/docs/ListItemAssignmentResponse.md @@ -1,10 +1,10 @@ # ListItemAssignmentResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListBundleResponseMeta**](ListBundleResponse_meta.md) | [optional] -**Results** | [**[]NumbersV2RegulatoryComplianceBundleItemAssignment**](numbers.v2.regulatory_compliance.bundle.item_assignment.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListBundleResponseMeta**](ListBundleResponse_meta.md) | |[optional] +**Results** | [**[]NumbersV2RegulatoryComplianceBundleItemAssignment**](numbers.v2.regulatory_compliance.bundle.item_assignment.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/numbers/v2/docs/ListRegulationResponse.md b/twilio/rest/numbers/v2/docs/ListRegulationResponse.md index d72b6a8fa..503a668dc 100644 --- a/twilio/rest/numbers/v2/docs/ListRegulationResponse.md +++ b/twilio/rest/numbers/v2/docs/ListRegulationResponse.md @@ -1,10 +1,10 @@ # ListRegulationResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListBundleResponseMeta**](ListBundleResponse_meta.md) | [optional] -**Results** | [**[]NumbersV2RegulatoryComplianceRegulation**](numbers.v2.regulatory_compliance.regulation.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListBundleResponseMeta**](ListBundleResponse_meta.md) | |[optional] +**Results** | [**[]NumbersV2RegulatoryComplianceRegulation**](numbers.v2.regulatory_compliance.regulation.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/numbers/v2/docs/ListSupportingDocumentResponse.md b/twilio/rest/numbers/v2/docs/ListSupportingDocumentResponse.md index 11c6e2d53..afedfa2b7 100644 --- a/twilio/rest/numbers/v2/docs/ListSupportingDocumentResponse.md +++ b/twilio/rest/numbers/v2/docs/ListSupportingDocumentResponse.md @@ -1,10 +1,10 @@ # ListSupportingDocumentResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListBundleResponseMeta**](ListBundleResponse_meta.md) | [optional] -**Results** | [**[]NumbersV2RegulatoryComplianceSupportingDocument**](numbers.v2.regulatory_compliance.supporting_document.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListBundleResponseMeta**](ListBundleResponse_meta.md) | |[optional] +**Results** | [**[]NumbersV2RegulatoryComplianceSupportingDocument**](numbers.v2.regulatory_compliance.supporting_document.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/numbers/v2/docs/ListSupportingDocumentTypeResponse.md b/twilio/rest/numbers/v2/docs/ListSupportingDocumentTypeResponse.md index a5e7f30ec..e2f1d84df 100644 --- a/twilio/rest/numbers/v2/docs/ListSupportingDocumentTypeResponse.md +++ b/twilio/rest/numbers/v2/docs/ListSupportingDocumentTypeResponse.md @@ -1,10 +1,10 @@ # ListSupportingDocumentTypeResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListBundleResponseMeta**](ListBundleResponse_meta.md) | [optional] -**SupportingDocumentTypes** | [**[]NumbersV2RegulatoryComplianceSupportingDocumentType**](numbers.v2.regulatory_compliance.supporting_document_type.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListBundleResponseMeta**](ListBundleResponse_meta.md) | |[optional] +**SupportingDocumentTypes** | [**[]NumbersV2RegulatoryComplianceSupportingDocumentType**](numbers.v2.regulatory_compliance.supporting_document_type.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/numbers/v2/docs/NumbersV2RegulatoryComplianceBundle.md b/twilio/rest/numbers/v2/docs/NumbersV2RegulatoryComplianceBundle.md index d902170f3..bf0d100aa 100644 --- a/twilio/rest/numbers/v2/docs/NumbersV2RegulatoryComplianceBundle.md +++ b/twilio/rest/numbers/v2/docs/NumbersV2RegulatoryComplianceBundle.md @@ -1,20 +1,20 @@ # NumbersV2RegulatoryComplianceBundle ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**Email** | Pointer to **string** | -**FriendlyName** | Pointer to **string** | -**Links** | Pointer to **map[string]interface{}** | -**RegulationSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Status** | Pointer to [**BundleStatus**](bundle_status.md) | -**StatusCallback** | Pointer to **string** | -**Url** | Pointer to **string** | -**ValidUntil** | Pointer to [**time.Time**](time.Time.md) | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was last updated | +**Email** | Pointer to **string** | The email address | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the resource | +**Links** | Pointer to **map[string]interface{}** | The URLs of the Assigned Items of the Bundle resource | +**RegulationSid** | Pointer to **string** | The unique string of a regulation. | +**Sid** | Pointer to **string** | The unique string that identifies the resource. | +**Status** | Pointer to **string** | The verification status of the Bundle resource | +**StatusCallback** | Pointer to **string** | The URL we call to inform your application of status changes. | +**Url** | Pointer to **string** | The absolute URL of the Bundle resource | +**ValidUntil** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource will be valid until. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/numbers/v2/docs/NumbersV2RegulatoryComplianceBundleEvaluation.md b/twilio/rest/numbers/v2/docs/NumbersV2RegulatoryComplianceBundleEvaluation.md index d39e42068..adc099401 100644 --- a/twilio/rest/numbers/v2/docs/NumbersV2RegulatoryComplianceBundleEvaluation.md +++ b/twilio/rest/numbers/v2/docs/NumbersV2RegulatoryComplianceBundleEvaluation.md @@ -1,16 +1,16 @@ # NumbersV2RegulatoryComplianceBundleEvaluation ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**BundleSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**RegulationSid** | Pointer to **string** | -**Results** | Pointer to **[]map[string]interface{}** | -**Sid** | Pointer to **string** | -**Status** | Pointer to [**EvaluationStatus**](evaluation_status.md) | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**BundleSid** | Pointer to **string** | The unique string that identifies the resource | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | | +**RegulationSid** | Pointer to **string** | The unique string of a regulation | +**Results** | Pointer to **[]map[string]interface{}** | The results of the Evaluation resource | +**Sid** | Pointer to **string** | The unique string that identifies the Evaluation resource | +**Status** | Pointer to **string** | The compliance status of the Evaluation resource | +**Url** | Pointer to **string** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/numbers/v2/docs/NumbersV2RegulatoryComplianceBundleItemAssignment.md b/twilio/rest/numbers/v2/docs/NumbersV2RegulatoryComplianceBundleItemAssignment.md index a1f849157..ee609d121 100644 --- a/twilio/rest/numbers/v2/docs/NumbersV2RegulatoryComplianceBundleItemAssignment.md +++ b/twilio/rest/numbers/v2/docs/NumbersV2RegulatoryComplianceBundleItemAssignment.md @@ -1,14 +1,14 @@ # NumbersV2RegulatoryComplianceBundleItemAssignment ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**BundleSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**ObjectSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**BundleSid** | Pointer to **string** | The unique string that identifies the Bundle resource. | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**ObjectSid** | Pointer to **string** | The sid of an object bag | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Url** | Pointer to **string** | The absolute URL of the Identity resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/numbers/v2/docs/NumbersV2RegulatoryComplianceEndUser.md b/twilio/rest/numbers/v2/docs/NumbersV2RegulatoryComplianceEndUser.md index 7eadb7fd2..571d7e53c 100644 --- a/twilio/rest/numbers/v2/docs/NumbersV2RegulatoryComplianceEndUser.md +++ b/twilio/rest/numbers/v2/docs/NumbersV2RegulatoryComplianceEndUser.md @@ -1,16 +1,16 @@ # NumbersV2RegulatoryComplianceEndUser ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Attributes** | Pointer to **map[string]interface{}** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**FriendlyName** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Type** | Pointer to [**EndUserType**](end_user_type.md) | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**Attributes** | Pointer to **map[string]interface{}** | The set of parameters that compose the End Users resource | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was last updated | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the resource | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Type** | Pointer to **string** | The type of end user of the Bundle resource | +**Url** | Pointer to **string** | The absolute URL of the End User resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/numbers/v2/docs/NumbersV2RegulatoryComplianceEndUserType.md b/twilio/rest/numbers/v2/docs/NumbersV2RegulatoryComplianceEndUserType.md index 82768c154..7366b295b 100644 --- a/twilio/rest/numbers/v2/docs/NumbersV2RegulatoryComplianceEndUserType.md +++ b/twilio/rest/numbers/v2/docs/NumbersV2RegulatoryComplianceEndUserType.md @@ -1,13 +1,13 @@ # NumbersV2RegulatoryComplianceEndUserType ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Fields** | Pointer to **[]map[string]interface{}** | -**FriendlyName** | Pointer to **string** | -**MachineName** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Fields** | Pointer to **[]map[string]interface{}** | The required information for creating an End-User. | +**FriendlyName** | Pointer to **string** | A human-readable description of the End-User Type resource | +**MachineName** | Pointer to **string** | A machine-readable description of the End-User Type resource | +**Sid** | Pointer to **string** | The unique string that identifies the End-User Type resource | +**Url** | Pointer to **string** | The absolute URL of the End-User Type resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/numbers/v2/docs/NumbersV2RegulatoryComplianceRegulation.md b/twilio/rest/numbers/v2/docs/NumbersV2RegulatoryComplianceRegulation.md index 973c95173..3345ae8bb 100644 --- a/twilio/rest/numbers/v2/docs/NumbersV2RegulatoryComplianceRegulation.md +++ b/twilio/rest/numbers/v2/docs/NumbersV2RegulatoryComplianceRegulation.md @@ -1,15 +1,15 @@ # NumbersV2RegulatoryComplianceRegulation ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**EndUserType** | Pointer to [**RegulationEndUserType**](regulation_end_user_type.md) | -**FriendlyName** | Pointer to **string** | -**IsoCountry** | Pointer to **string** | -**NumberType** | Pointer to **string** | -**Requirements** | Pointer to **map[string]interface{}** | -**Sid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**EndUserType** | Pointer to **string** | The type of End User of the Regulation resource | +**FriendlyName** | Pointer to **string** | A human-readable description of the Regulation resource | +**IsoCountry** | Pointer to **string** | The ISO country code of the phone number's country | +**NumberType** | Pointer to **string** | The type of phone number restricted by the regulatory requirement | +**Requirements** | Pointer to **map[string]interface{}** | The sid of a regulation object that dictates requirements | +**Sid** | Pointer to **string** | The unique string that identifies the Regulation resource | +**Url** | Pointer to **string** | The absolute URL of the Regulation resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/numbers/v2/docs/NumbersV2RegulatoryComplianceSupportingDocument.md b/twilio/rest/numbers/v2/docs/NumbersV2RegulatoryComplianceSupportingDocument.md index b47e58a5b..6109e8f09 100644 --- a/twilio/rest/numbers/v2/docs/NumbersV2RegulatoryComplianceSupportingDocument.md +++ b/twilio/rest/numbers/v2/docs/NumbersV2RegulatoryComplianceSupportingDocument.md @@ -1,18 +1,18 @@ # NumbersV2RegulatoryComplianceSupportingDocument ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Attributes** | Pointer to **map[string]interface{}** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**FriendlyName** | Pointer to **string** | -**MimeType** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Status** | Pointer to [**SupportingDocumentStatus**](supporting_document_status.md) | -**Type** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**Attributes** | Pointer to **map[string]interface{}** | The set of parameters that compose the Supporting Documents resource | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was last updated | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the resource | +**MimeType** | Pointer to **string** | The image type of the file | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Status** | Pointer to **string** | The verification status of the Supporting Document resource | +**Type** | Pointer to **string** | The type of the Supporting Document | +**Url** | Pointer to **string** | The absolute URL of the Supporting Document resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/numbers/v2/docs/NumbersV2RegulatoryComplianceSupportingDocumentType.md b/twilio/rest/numbers/v2/docs/NumbersV2RegulatoryComplianceSupportingDocumentType.md index 1130f1425..7dc755afb 100644 --- a/twilio/rest/numbers/v2/docs/NumbersV2RegulatoryComplianceSupportingDocumentType.md +++ b/twilio/rest/numbers/v2/docs/NumbersV2RegulatoryComplianceSupportingDocumentType.md @@ -1,13 +1,13 @@ # NumbersV2RegulatoryComplianceSupportingDocumentType ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Fields** | Pointer to **[]map[string]interface{}** | -**FriendlyName** | Pointer to **string** | -**MachineName** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Fields** | Pointer to **[]map[string]interface{}** | The required information for creating a Supporting Document | +**FriendlyName** | Pointer to **string** | A human-readable description of the Supporting Document Type resource | +**MachineName** | Pointer to **string** | The machine-readable description of the Supporting Document Type resource | +**Sid** | Pointer to **string** | The unique string that identifies the Supporting Document Type resource | +**Url** | Pointer to **string** | The absolute URL of the Supporting Document Type resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_bundle.go b/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_bundle.go index 87c0ff0fa..bdf7e9547 100644 --- a/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_bundle.go +++ b/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_bundle.go @@ -17,16 +17,28 @@ import ( // NumbersV2RegulatoryComplianceBundle struct for NumbersV2RegulatoryComplianceBundle type NumbersV2RegulatoryComplianceBundle struct { - AccountSid *string `json:"AccountSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Email *string `json:"Email,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - RegulationSid *string `json:"RegulationSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Status *BundleStatus `json:"Status,omitempty"` - StatusCallback *string `json:"StatusCallback,omitempty"` - Url *string `json:"Url,omitempty"` - ValidUntil *time.Time `json:"ValidUntil,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The email address + Email *string `json:"Email,omitempty"` + // The string that you assigned to describe the resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // The URLs of the Assigned Items of the Bundle resource + Links *map[string]interface{} `json:"Links,omitempty"` + // The unique string of a regulation. + RegulationSid *string `json:"RegulationSid,omitempty"` + // The unique string that identifies the resource. + Sid *string `json:"Sid,omitempty"` + // The verification status of the Bundle resource + Status *string `json:"Status,omitempty"` + // The URL we call to inform your application of status changes. + StatusCallback *string `json:"StatusCallback,omitempty"` + // The absolute URL of the Bundle resource + Url *string `json:"Url,omitempty"` + // The ISO 8601 date and time in GMT when the resource will be valid until. + ValidUntil *time.Time `json:"ValidUntil,omitempty"` } diff --git a/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_bundle_evaluation.go b/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_bundle_evaluation.go index bf077450f..2db73e245 100644 --- a/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_bundle_evaluation.go +++ b/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_bundle_evaluation.go @@ -17,12 +17,18 @@ import ( // NumbersV2RegulatoryComplianceBundleEvaluation struct for NumbersV2RegulatoryComplianceBundleEvaluation type NumbersV2RegulatoryComplianceBundleEvaluation struct { - AccountSid *string `json:"AccountSid,omitempty"` - BundleSid *string `json:"BundleSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - RegulationSid *string `json:"RegulationSid,omitempty"` - Results *[]map[string]interface{} `json:"Results,omitempty"` - Sid *string `json:"Sid,omitempty"` - Status *EvaluationStatus `json:"Status,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The unique string that identifies the resource + BundleSid *string `json:"BundleSid,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The unique string of a regulation + RegulationSid *string `json:"RegulationSid,omitempty"` + // The results of the Evaluation resource + Results *[]map[string]interface{} `json:"Results,omitempty"` + // The unique string that identifies the Evaluation resource + Sid *string `json:"Sid,omitempty"` + // The compliance status of the Evaluation resource + Status *string `json:"Status,omitempty"` + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_bundle_item_assignment.go b/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_bundle_item_assignment.go index 3465fd697..baebc8887 100644 --- a/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_bundle_item_assignment.go +++ b/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_bundle_item_assignment.go @@ -17,10 +17,16 @@ import ( // NumbersV2RegulatoryComplianceBundleItemAssignment struct for NumbersV2RegulatoryComplianceBundleItemAssignment type NumbersV2RegulatoryComplianceBundleItemAssignment struct { - AccountSid *string `json:"AccountSid,omitempty"` - BundleSid *string `json:"BundleSid,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The unique string that identifies the Bundle resource. + BundleSid *string `json:"BundleSid,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created DateCreated *time.Time `json:"DateCreated,omitempty"` - ObjectSid *string `json:"ObjectSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` + // The sid of an object bag + ObjectSid *string `json:"ObjectSid,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The absolute URL of the Identity resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_end_user.go b/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_end_user.go index eee30289a..fad844f70 100644 --- a/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_end_user.go +++ b/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_end_user.go @@ -17,12 +17,20 @@ import ( // NumbersV2RegulatoryComplianceEndUser struct for NumbersV2RegulatoryComplianceEndUser type NumbersV2RegulatoryComplianceEndUser struct { - AccountSid *string `json:"AccountSid,omitempty"` - Attributes *map[string]interface{} `json:"Attributes,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Sid *string `json:"Sid,omitempty"` - Type *EndUserType `json:"Type,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The set of parameters that compose the End Users resource + Attributes *map[string]interface{} `json:"Attributes,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The string that you assigned to describe the resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The type of end user of the Bundle resource + Type *string `json:"Type,omitempty"` + // The absolute URL of the End User resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_end_user_type.go b/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_end_user_type.go index 1e71260ab..ed40740ff 100644 --- a/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_end_user_type.go +++ b/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_end_user_type.go @@ -13,9 +13,14 @@ package openapi // NumbersV2RegulatoryComplianceEndUserType struct for NumbersV2RegulatoryComplianceEndUserType type NumbersV2RegulatoryComplianceEndUserType struct { - Fields *[]map[string]interface{} `json:"Fields,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - MachineName *string `json:"MachineName,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` + // The required information for creating an End-User. + Fields *[]map[string]interface{} `json:"Fields,omitempty"` + // A human-readable description of the End-User Type resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // A machine-readable description of the End-User Type resource + MachineName *string `json:"MachineName,omitempty"` + // The unique string that identifies the End-User Type resource + Sid *string `json:"Sid,omitempty"` + // The absolute URL of the End-User Type resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_regulation.go b/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_regulation.go index 554110055..a0e9df577 100644 --- a/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_regulation.go +++ b/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_regulation.go @@ -13,11 +13,18 @@ package openapi // NumbersV2RegulatoryComplianceRegulation struct for NumbersV2RegulatoryComplianceRegulation type NumbersV2RegulatoryComplianceRegulation struct { - EndUserType *RegulationEndUserType `json:"EndUserType,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - IsoCountry *string `json:"IsoCountry,omitempty"` - NumberType *string `json:"NumberType,omitempty"` + // The type of End User of the Regulation resource + EndUserType *string `json:"EndUserType,omitempty"` + // A human-readable description of the Regulation resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // The ISO country code of the phone number's country + IsoCountry *string `json:"IsoCountry,omitempty"` + // The type of phone number restricted by the regulatory requirement + NumberType *string `json:"NumberType,omitempty"` + // The sid of a regulation object that dictates requirements Requirements *map[string]interface{} `json:"Requirements,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` + // The unique string that identifies the Regulation resource + Sid *string `json:"Sid,omitempty"` + // The absolute URL of the Regulation resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_supporting_document.go b/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_supporting_document.go index 3d2475c88..4c5dd75fe 100644 --- a/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_supporting_document.go +++ b/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_supporting_document.go @@ -17,14 +17,24 @@ import ( // NumbersV2RegulatoryComplianceSupportingDocument struct for NumbersV2RegulatoryComplianceSupportingDocument type NumbersV2RegulatoryComplianceSupportingDocument struct { - AccountSid *string `json:"AccountSid,omitempty"` - Attributes *map[string]interface{} `json:"Attributes,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - MimeType *string `json:"MimeType,omitempty"` - Sid *string `json:"Sid,omitempty"` - Status *SupportingDocumentStatus `json:"Status,omitempty"` - Type *string `json:"Type,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The set of parameters that compose the Supporting Documents resource + Attributes *map[string]interface{} `json:"Attributes,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The string that you assigned to describe the resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // The image type of the file + MimeType *string `json:"MimeType,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The verification status of the Supporting Document resource + Status *string `json:"Status,omitempty"` + // The type of the Supporting Document + Type *string `json:"Type,omitempty"` + // The absolute URL of the Supporting Document resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_supporting_document_type.go b/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_supporting_document_type.go index 8b9646e1d..53b8665eb 100644 --- a/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_supporting_document_type.go +++ b/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_supporting_document_type.go @@ -13,9 +13,14 @@ package openapi // NumbersV2RegulatoryComplianceSupportingDocumentType struct for NumbersV2RegulatoryComplianceSupportingDocumentType type NumbersV2RegulatoryComplianceSupportingDocumentType struct { - Fields *[]map[string]interface{} `json:"Fields,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - MachineName *string `json:"MachineName,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` + // The required information for creating a Supporting Document + Fields *[]map[string]interface{} `json:"Fields,omitempty"` + // A human-readable description of the Supporting Document Type resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // The machine-readable description of the Supporting Document Type resource + MachineName *string `json:"MachineName,omitempty"` + // The unique string that identifies the Supporting Document Type resource + Sid *string `json:"Sid,omitempty"` + // The absolute URL of the Supporting Document Type resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/pricing/v1/README.md b/twilio/rest/pricing/v1/README.md index f118cd558..389b5dc7a 100644 --- a/twilio/rest/pricing/v1/README.md +++ b/twilio/rest/pricing/v1/README.md @@ -42,22 +42,25 @@ Class | Method | HTTP request | Description ## Documentation For Models - - [InboundCallPrice](docs/InboundCallPrice.md) - [ListMessagingCountryResponse](docs/ListMessagingCountryResponse.md) - [ListMessagingCountryResponseMeta](docs/ListMessagingCountryResponseMeta.md) - [ListPhoneNumberCountryResponse](docs/ListPhoneNumberCountryResponse.md) - [ListVoiceCountryResponse](docs/ListVoiceCountryResponse.md) - - [OutboundCallPrice](docs/OutboundCallPrice.md) - [PricingV1Messaging](docs/PricingV1Messaging.md) - [PricingV1MessagingMessagingCountry](docs/PricingV1MessagingMessagingCountry.md) - [PricingV1MessagingMessagingCountryInstance](docs/PricingV1MessagingMessagingCountryInstance.md) + - [PricingV1MessagingMessagingCountryInstanceInboundSmsPrices](docs/PricingV1MessagingMessagingCountryInstanceInboundSmsPrices.md) + - [PricingV1MessagingMessagingCountryInstanceOutboundSmsPrices](docs/PricingV1MessagingMessagingCountryInstanceOutboundSmsPrices.md) - [PricingV1PhoneNumber](docs/PricingV1PhoneNumber.md) - [PricingV1PhoneNumberPhoneNumberCountry](docs/PricingV1PhoneNumberPhoneNumberCountry.md) - [PricingV1PhoneNumberPhoneNumberCountryInstance](docs/PricingV1PhoneNumberPhoneNumberCountryInstance.md) - [PricingV1Voice](docs/PricingV1Voice.md) - [PricingV1VoiceVoiceCountry](docs/PricingV1VoiceVoiceCountry.md) - [PricingV1VoiceVoiceCountryInstance](docs/PricingV1VoiceVoiceCountryInstance.md) + - [PricingV1VoiceVoiceCountryInstanceOutboundPrefixPrices](docs/PricingV1VoiceVoiceCountryInstanceOutboundPrefixPrices.md) - [PricingV1VoiceVoiceNumber](docs/PricingV1VoiceVoiceNumber.md) + - [PricingV1VoiceVoiceNumberInboundCallPrice](docs/PricingV1VoiceVoiceNumberInboundCallPrice.md) + - [PricingV1VoiceVoiceNumberOutboundCallPrice](docs/PricingV1VoiceVoiceNumberOutboundCallPrice.md) ## Documentation For Authorization diff --git a/twilio/rest/pricing/v1/docs/ListMessagingCountryResponse.md b/twilio/rest/pricing/v1/docs/ListMessagingCountryResponse.md index 077cac138..e157932e3 100644 --- a/twilio/rest/pricing/v1/docs/ListMessagingCountryResponse.md +++ b/twilio/rest/pricing/v1/docs/ListMessagingCountryResponse.md @@ -1,10 +1,10 @@ # ListMessagingCountryResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Countries** | [**[]PricingV1MessagingMessagingCountry**](pricing.v1.messaging.messaging_country.md) | [optional] -**Meta** | [**ListMessagingCountryResponseMeta**](ListMessagingCountryResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Countries** | [**[]PricingV1MessagingMessagingCountry**](pricing.v1.messaging.messaging_country.md) | |[optional] +**Meta** | [**ListMessagingCountryResponseMeta**](ListMessagingCountryResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/pricing/v1/docs/ListMessagingCountryResponseMeta.md b/twilio/rest/pricing/v1/docs/ListMessagingCountryResponseMeta.md index b0d1c0cf3..ede085dee 100644 --- a/twilio/rest/pricing/v1/docs/ListMessagingCountryResponseMeta.md +++ b/twilio/rest/pricing/v1/docs/ListMessagingCountryResponseMeta.md @@ -1,15 +1,15 @@ # ListMessagingCountryResponseMeta ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**FirstPageUrl** | **string** | [optional] -**Key** | **string** | [optional] -**NextPageUrl** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUrl** | **string** | [optional] -**Url** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstPageUrl** | **string** | |[optional] +**Key** | **string** | |[optional] +**NextPageUrl** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUrl** | **string** | |[optional] +**Url** | **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/twilio/rest/pricing/v1/docs/ListPhoneNumberCountryResponse.md b/twilio/rest/pricing/v1/docs/ListPhoneNumberCountryResponse.md index bcfebff45..d503a0d20 100644 --- a/twilio/rest/pricing/v1/docs/ListPhoneNumberCountryResponse.md +++ b/twilio/rest/pricing/v1/docs/ListPhoneNumberCountryResponse.md @@ -1,10 +1,10 @@ # ListPhoneNumberCountryResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Countries** | [**[]PricingV1PhoneNumberPhoneNumberCountry**](pricing.v1.phone_number.phone_number_country.md) | [optional] -**Meta** | [**ListMessagingCountryResponseMeta**](ListMessagingCountryResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Countries** | [**[]PricingV1PhoneNumberPhoneNumberCountry**](pricing.v1.phone_number.phone_number_country.md) | |[optional] +**Meta** | [**ListMessagingCountryResponseMeta**](ListMessagingCountryResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/pricing/v1/docs/ListVoiceCountryResponse.md b/twilio/rest/pricing/v1/docs/ListVoiceCountryResponse.md index 2146d5e1a..3fcf22d20 100644 --- a/twilio/rest/pricing/v1/docs/ListVoiceCountryResponse.md +++ b/twilio/rest/pricing/v1/docs/ListVoiceCountryResponse.md @@ -1,10 +1,10 @@ # ListVoiceCountryResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Countries** | [**[]PricingV1VoiceVoiceCountry**](pricing.v1.voice.voice_country.md) | [optional] -**Meta** | [**ListMessagingCountryResponseMeta**](ListMessagingCountryResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Countries** | [**[]PricingV1VoiceVoiceCountry**](pricing.v1.voice.voice_country.md) | |[optional] +**Meta** | [**ListMessagingCountryResponseMeta**](ListMessagingCountryResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/pricing/v1/docs/PricingV1Messaging.md b/twilio/rest/pricing/v1/docs/PricingV1Messaging.md index a69299812..d06ca7da0 100644 --- a/twilio/rest/pricing/v1/docs/PricingV1Messaging.md +++ b/twilio/rest/pricing/v1/docs/PricingV1Messaging.md @@ -1,11 +1,11 @@ # PricingV1Messaging ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Links** | Pointer to **map[string]interface{}** | -**Name** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Links** | Pointer to **map[string]interface{}** | | +**Name** | Pointer to **string** | | +**Url** | Pointer to **string** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/pricing/v1/docs/PricingV1MessagingMessagingCountry.md b/twilio/rest/pricing/v1/docs/PricingV1MessagingMessagingCountry.md index 170b18e7b..cd33c9b10 100644 --- a/twilio/rest/pricing/v1/docs/PricingV1MessagingMessagingCountry.md +++ b/twilio/rest/pricing/v1/docs/PricingV1MessagingMessagingCountry.md @@ -1,11 +1,11 @@ # PricingV1MessagingMessagingCountry ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Country** | Pointer to **string** | -**IsoCountry** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Country** | Pointer to **string** | The name of the country | +**IsoCountry** | Pointer to **string** | The ISO country code | +**Url** | Pointer to **string** | The absolute URL of the resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/pricing/v1/docs/PricingV1MessagingMessagingCountryInstance.md b/twilio/rest/pricing/v1/docs/PricingV1MessagingMessagingCountryInstance.md index 0baf2870b..f7eac028a 100644 --- a/twilio/rest/pricing/v1/docs/PricingV1MessagingMessagingCountryInstance.md +++ b/twilio/rest/pricing/v1/docs/PricingV1MessagingMessagingCountryInstance.md @@ -1,14 +1,14 @@ # PricingV1MessagingMessagingCountryInstance ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Country** | Pointer to **string** | -**InboundSmsPrices** | Pointer to **[]map[string]interface{}** | -**IsoCountry** | Pointer to **string** | -**OutboundSmsPrices** | Pointer to **[]map[string]interface{}** | -**PriceUnit** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Country** | Pointer to **string** | The name of the country | +**InboundSmsPrices** | Pointer to [**[]PricingV1MessagingMessagingCountryInstanceInboundSmsPrices**](pricing_v1_messaging_messaging_country_instance_inbound_sms_prices.md) | The list of InboundPrice records | +**IsoCountry** | Pointer to **string** | The ISO country code | +**OutboundSmsPrices** | Pointer to [**[]PricingV1MessagingMessagingCountryInstanceOutboundSmsPrices**](pricing_v1_messaging_messaging_country_instance_outbound_sms_prices.md) | The list of OutboundSMSPrice records | +**PriceUnit** | Pointer to **string** | The currency in which prices are measured, in ISO 4127 format (e.g. usd, eur, jpy) | +**Url** | Pointer to **string** | The absolute URL of the resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/pricing/v1/docs/PricingV1MessagingMessagingCountryInstanceInboundSmsPrices.md b/twilio/rest/pricing/v1/docs/PricingV1MessagingMessagingCountryInstanceInboundSmsPrices.md new file mode 100644 index 000000000..f77bd5beb --- /dev/null +++ b/twilio/rest/pricing/v1/docs/PricingV1MessagingMessagingCountryInstanceInboundSmsPrices.md @@ -0,0 +1,12 @@ +# PricingV1MessagingMessagingCountryInstanceInboundSmsPrices + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**BasePrice** | **float32** | |[optional] +**CurrentPrice** | **float32** | |[optional] +**NumberType** | **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/twilio/rest/pricing/v1/docs/PricingV1MessagingMessagingCountryInstanceOutboundSmsPrices.md b/twilio/rest/pricing/v1/docs/PricingV1MessagingMessagingCountryInstanceOutboundSmsPrices.md new file mode 100644 index 000000000..139400de8 --- /dev/null +++ b/twilio/rest/pricing/v1/docs/PricingV1MessagingMessagingCountryInstanceOutboundSmsPrices.md @@ -0,0 +1,13 @@ +# PricingV1MessagingMessagingCountryInstanceOutboundSmsPrices + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Carrier** | **string** | |[optional] +**Mcc** | **string** | |[optional] +**Mnc** | **string** | |[optional] +**Prices** | [**[]PricingV1MessagingMessagingCountryInstanceInboundSmsPrices**](pricing_v1_messaging_messaging_country_instance_inbound_sms_prices.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/twilio/rest/pricing/v1/docs/PricingV1PhoneNumber.md b/twilio/rest/pricing/v1/docs/PricingV1PhoneNumber.md index 8f51e6e24..1c043d350 100644 --- a/twilio/rest/pricing/v1/docs/PricingV1PhoneNumber.md +++ b/twilio/rest/pricing/v1/docs/PricingV1PhoneNumber.md @@ -1,11 +1,11 @@ # PricingV1PhoneNumber ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Links** | Pointer to **map[string]interface{}** | -**Name** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Links** | Pointer to **map[string]interface{}** | | +**Name** | Pointer to **string** | | +**Url** | Pointer to **string** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/pricing/v1/docs/PricingV1PhoneNumberPhoneNumberCountry.md b/twilio/rest/pricing/v1/docs/PricingV1PhoneNumberPhoneNumberCountry.md index 0496cc898..16d14b8ae 100644 --- a/twilio/rest/pricing/v1/docs/PricingV1PhoneNumberPhoneNumberCountry.md +++ b/twilio/rest/pricing/v1/docs/PricingV1PhoneNumberPhoneNumberCountry.md @@ -1,11 +1,11 @@ # PricingV1PhoneNumberPhoneNumberCountry ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Country** | Pointer to **string** | -**IsoCountry** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Country** | Pointer to **string** | The name of the country | +**IsoCountry** | Pointer to **string** | The ISO country code | +**Url** | Pointer to **string** | The absolute URL of the resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/pricing/v1/docs/PricingV1PhoneNumberPhoneNumberCountryInstance.md b/twilio/rest/pricing/v1/docs/PricingV1PhoneNumberPhoneNumberCountryInstance.md index 4a6e9a028..1cc3b75f9 100644 --- a/twilio/rest/pricing/v1/docs/PricingV1PhoneNumberPhoneNumberCountryInstance.md +++ b/twilio/rest/pricing/v1/docs/PricingV1PhoneNumberPhoneNumberCountryInstance.md @@ -1,13 +1,13 @@ # PricingV1PhoneNumberPhoneNumberCountryInstance ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Country** | Pointer to **string** | -**IsoCountry** | Pointer to **string** | -**PhoneNumberPrices** | Pointer to **[]map[string]interface{}** | -**PriceUnit** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Country** | Pointer to **string** | The name of the country | +**IsoCountry** | Pointer to **string** | The ISO country code | +**PhoneNumberPrices** | Pointer to [**[]PricingV1MessagingMessagingCountryInstanceInboundSmsPrices**](pricing_v1_messaging_messaging_country_instance_inbound_sms_prices.md) | The list of PhoneNumberPrices records | +**PriceUnit** | Pointer to **string** | The currency in which prices are measured, in ISO 4127 format (e.g. usd, eur, jpy) | +**Url** | Pointer to **string** | The absolute URL of the resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/pricing/v1/docs/PricingV1Voice.md b/twilio/rest/pricing/v1/docs/PricingV1Voice.md index 703ebfe77..c3ae8a825 100644 --- a/twilio/rest/pricing/v1/docs/PricingV1Voice.md +++ b/twilio/rest/pricing/v1/docs/PricingV1Voice.md @@ -1,11 +1,11 @@ # PricingV1Voice ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Links** | Pointer to **map[string]interface{}** | -**Name** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Links** | Pointer to **map[string]interface{}** | | +**Name** | Pointer to **string** | | +**Url** | Pointer to **string** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/pricing/v1/docs/PricingV1VoiceVoiceCountry.md b/twilio/rest/pricing/v1/docs/PricingV1VoiceVoiceCountry.md index 1d927c137..3978633dd 100644 --- a/twilio/rest/pricing/v1/docs/PricingV1VoiceVoiceCountry.md +++ b/twilio/rest/pricing/v1/docs/PricingV1VoiceVoiceCountry.md @@ -1,11 +1,11 @@ # PricingV1VoiceVoiceCountry ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Country** | Pointer to **string** | -**IsoCountry** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Country** | Pointer to **string** | The name of the country | +**IsoCountry** | Pointer to **string** | The ISO country code | +**Url** | Pointer to **string** | The absolute URL of the resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/pricing/v1/docs/PricingV1VoiceVoiceCountryInstance.md b/twilio/rest/pricing/v1/docs/PricingV1VoiceVoiceCountryInstance.md index 5498d62f4..d01d1de1b 100644 --- a/twilio/rest/pricing/v1/docs/PricingV1VoiceVoiceCountryInstance.md +++ b/twilio/rest/pricing/v1/docs/PricingV1VoiceVoiceCountryInstance.md @@ -1,14 +1,14 @@ # PricingV1VoiceVoiceCountryInstance ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Country** | Pointer to **string** | -**InboundCallPrices** | Pointer to **[]map[string]interface{}** | -**IsoCountry** | Pointer to **string** | -**OutboundPrefixPrices** | Pointer to **[]map[string]interface{}** | -**PriceUnit** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Country** | Pointer to **string** | The name of the country | +**InboundCallPrices** | Pointer to [**[]PricingV1MessagingMessagingCountryInstanceInboundSmsPrices**](pricing_v1_messaging_messaging_country_instance_inbound_sms_prices.md) | The list of InboundCallPrice records | +**IsoCountry** | Pointer to **string** | The ISO country code | +**OutboundPrefixPrices** | Pointer to [**[]PricingV1VoiceVoiceCountryInstanceOutboundPrefixPrices**](pricing_v1_voice_voice_country_instance_outbound_prefix_prices.md) | The list of OutboundPrefixPrice records | +**PriceUnit** | Pointer to **string** | The currency in which prices are measured, in ISO 4127 format (e.g. usd, eur, jpy) | +**Url** | Pointer to **string** | The absolute URL of the resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/pricing/v1/docs/PricingV1VoiceVoiceCountryInstanceOutboundPrefixPrices.md b/twilio/rest/pricing/v1/docs/PricingV1VoiceVoiceCountryInstanceOutboundPrefixPrices.md new file mode 100644 index 000000000..6d8ee33cf --- /dev/null +++ b/twilio/rest/pricing/v1/docs/PricingV1VoiceVoiceCountryInstanceOutboundPrefixPrices.md @@ -0,0 +1,13 @@ +# PricingV1VoiceVoiceCountryInstanceOutboundPrefixPrices + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**BasePrice** | **float32** | |[optional] +**CurrentPrice** | **float32** | |[optional] +**FriendlyName** | **string** | |[optional] +**Prefixes** | **[]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/twilio/rest/pricing/v1/docs/PricingV1VoiceVoiceNumber.md b/twilio/rest/pricing/v1/docs/PricingV1VoiceVoiceNumber.md index ea0a3b8df..8b31ab117 100644 --- a/twilio/rest/pricing/v1/docs/PricingV1VoiceVoiceNumber.md +++ b/twilio/rest/pricing/v1/docs/PricingV1VoiceVoiceNumber.md @@ -1,15 +1,15 @@ # PricingV1VoiceVoiceNumber ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Country** | Pointer to **string** | -**InboundCallPrice** | Pointer to [**InboundCallPrice**](inbound_call_price.md) | -**IsoCountry** | Pointer to **string** | -**Number** | Pointer to **string** | -**OutboundCallPrice** | Pointer to [**OutboundCallPrice**](outbound_call_price.md) | -**PriceUnit** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Country** | Pointer to **string** | The name of the country | +**InboundCallPrice** | Pointer to [**PricingV1VoiceVoiceNumberInboundCallPrice**](pricing_v1_voice_voice_number_inbound_call_price.md) | | +**IsoCountry** | Pointer to **string** | The ISO country code | +**Number** | Pointer to **string** | The phone number | +**OutboundCallPrice** | Pointer to [**PricingV1VoiceVoiceNumberOutboundCallPrice**](pricing_v1_voice_voice_number_outbound_call_price.md) | | +**PriceUnit** | Pointer to **string** | The currency in which prices are measured, in ISO 4127 format (e.g. usd, eur, jpy) | +**Url** | Pointer to **string** | The absolute URL of the resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/pricing/v1/docs/PricingV1VoiceVoiceNumberInboundCallPrice.md b/twilio/rest/pricing/v1/docs/PricingV1VoiceVoiceNumberInboundCallPrice.md new file mode 100644 index 000000000..9d90bb56c --- /dev/null +++ b/twilio/rest/pricing/v1/docs/PricingV1VoiceVoiceNumberInboundCallPrice.md @@ -0,0 +1,12 @@ +# PricingV1VoiceVoiceNumberInboundCallPrice + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**BasePrice** | **float32** | |[optional] +**CurrentPrice** | **float32** | |[optional] +**NumberType** | **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/twilio/rest/pricing/v1/docs/PricingV1VoiceVoiceNumberOutboundCallPrice.md b/twilio/rest/pricing/v1/docs/PricingV1VoiceVoiceNumberOutboundCallPrice.md new file mode 100644 index 000000000..a9743278c --- /dev/null +++ b/twilio/rest/pricing/v1/docs/PricingV1VoiceVoiceNumberOutboundCallPrice.md @@ -0,0 +1,11 @@ +# PricingV1VoiceVoiceNumberOutboundCallPrice + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**BasePrice** | **float32** | |[optional] +**CurrentPrice** | **float32** | |[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/twilio/rest/pricing/v1/model_pricing_v1_messaging_messaging_country.go b/twilio/rest/pricing/v1/model_pricing_v1_messaging_messaging_country.go index 7bbdba261..7aa303631 100644 --- a/twilio/rest/pricing/v1/model_pricing_v1_messaging_messaging_country.go +++ b/twilio/rest/pricing/v1/model_pricing_v1_messaging_messaging_country.go @@ -13,7 +13,10 @@ package openapi // PricingV1MessagingMessagingCountry struct for PricingV1MessagingMessagingCountry type PricingV1MessagingMessagingCountry struct { - Country *string `json:"Country,omitempty"` + // The name of the country + Country *string `json:"Country,omitempty"` + // The ISO country code IsoCountry *string `json:"IsoCountry,omitempty"` - Url *string `json:"Url,omitempty"` + // The absolute URL of the resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/pricing/v1/model_pricing_v1_messaging_messaging_country_instance.go b/twilio/rest/pricing/v1/model_pricing_v1_messaging_messaging_country_instance.go index 79a1eec28..319631551 100644 --- a/twilio/rest/pricing/v1/model_pricing_v1_messaging_messaging_country_instance.go +++ b/twilio/rest/pricing/v1/model_pricing_v1_messaging_messaging_country_instance.go @@ -13,10 +13,16 @@ package openapi // PricingV1MessagingMessagingCountryInstance struct for PricingV1MessagingMessagingCountryInstance type PricingV1MessagingMessagingCountryInstance struct { - Country *string `json:"Country,omitempty"` - InboundSmsPrices *[]map[string]interface{} `json:"InboundSmsPrices,omitempty"` - IsoCountry *string `json:"IsoCountry,omitempty"` - OutboundSmsPrices *[]map[string]interface{} `json:"OutboundSmsPrices,omitempty"` - PriceUnit *string `json:"PriceUnit,omitempty"` - Url *string `json:"Url,omitempty"` + // The name of the country + Country *string `json:"Country,omitempty"` + // The list of InboundPrice records + InboundSmsPrices *[]PricingV1MessagingMessagingCountryInstanceInboundSmsPrices `json:"InboundSmsPrices,omitempty"` + // The ISO country code + IsoCountry *string `json:"IsoCountry,omitempty"` + // The list of OutboundSMSPrice records + OutboundSmsPrices *[]PricingV1MessagingMessagingCountryInstanceOutboundSmsPrices `json:"OutboundSmsPrices,omitempty"` + // The currency in which prices are measured, in ISO 4127 format (e.g. usd, eur, jpy) + PriceUnit *string `json:"PriceUnit,omitempty"` + // The absolute URL of the resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/pricing/v1/model_pricing_v1_messaging_messaging_country_instance_inbound_sms_prices.go b/twilio/rest/pricing/v1/model_pricing_v1_messaging_messaging_country_instance_inbound_sms_prices.go new file mode 100644 index 000000000..12a393e15 --- /dev/null +++ b/twilio/rest/pricing/v1/model_pricing_v1_messaging_messaging_country_instance_inbound_sms_prices.go @@ -0,0 +1,19 @@ +/* + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +// PricingV1MessagingMessagingCountryInstanceInboundSmsPrices struct for PricingV1MessagingMessagingCountryInstanceInboundSmsPrices +type PricingV1MessagingMessagingCountryInstanceInboundSmsPrices struct { + BasePrice float32 `json:"BasePrice,omitempty"` + CurrentPrice float32 `json:"CurrentPrice,omitempty"` + NumberType string `json:"NumberType,omitempty"` +} diff --git a/twilio/rest/pricing/v1/model_pricing_v1_messaging_messaging_country_instance_outbound_sms_prices.go b/twilio/rest/pricing/v1/model_pricing_v1_messaging_messaging_country_instance_outbound_sms_prices.go new file mode 100644 index 000000000..5211bf193 --- /dev/null +++ b/twilio/rest/pricing/v1/model_pricing_v1_messaging_messaging_country_instance_outbound_sms_prices.go @@ -0,0 +1,20 @@ +/* + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +// PricingV1MessagingMessagingCountryInstanceOutboundSmsPrices struct for PricingV1MessagingMessagingCountryInstanceOutboundSmsPrices +type PricingV1MessagingMessagingCountryInstanceOutboundSmsPrices struct { + Carrier string `json:"Carrier,omitempty"` + Mcc string `json:"Mcc,omitempty"` + Mnc string `json:"Mnc,omitempty"` + Prices []PricingV1MessagingMessagingCountryInstanceInboundSmsPrices `json:"Prices,omitempty"` +} diff --git a/twilio/rest/pricing/v1/model_pricing_v1_phone_number_phone_number_country.go b/twilio/rest/pricing/v1/model_pricing_v1_phone_number_phone_number_country.go index 87654b678..5f0a46886 100644 --- a/twilio/rest/pricing/v1/model_pricing_v1_phone_number_phone_number_country.go +++ b/twilio/rest/pricing/v1/model_pricing_v1_phone_number_phone_number_country.go @@ -13,7 +13,10 @@ package openapi // PricingV1PhoneNumberPhoneNumberCountry struct for PricingV1PhoneNumberPhoneNumberCountry type PricingV1PhoneNumberPhoneNumberCountry struct { - Country *string `json:"Country,omitempty"` + // The name of the country + Country *string `json:"Country,omitempty"` + // The ISO country code IsoCountry *string `json:"IsoCountry,omitempty"` - Url *string `json:"Url,omitempty"` + // The absolute URL of the resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/pricing/v1/model_pricing_v1_phone_number_phone_number_country_instance.go b/twilio/rest/pricing/v1/model_pricing_v1_phone_number_phone_number_country_instance.go index a28c9eec6..339b12d8b 100644 --- a/twilio/rest/pricing/v1/model_pricing_v1_phone_number_phone_number_country_instance.go +++ b/twilio/rest/pricing/v1/model_pricing_v1_phone_number_phone_number_country_instance.go @@ -13,9 +13,14 @@ package openapi // PricingV1PhoneNumberPhoneNumberCountryInstance struct for PricingV1PhoneNumberPhoneNumberCountryInstance type PricingV1PhoneNumberPhoneNumberCountryInstance struct { - Country *string `json:"Country,omitempty"` - IsoCountry *string `json:"IsoCountry,omitempty"` - PhoneNumberPrices *[]map[string]interface{} `json:"PhoneNumberPrices,omitempty"` - PriceUnit *string `json:"PriceUnit,omitempty"` - Url *string `json:"Url,omitempty"` + // The name of the country + Country *string `json:"Country,omitempty"` + // The ISO country code + IsoCountry *string `json:"IsoCountry,omitempty"` + // The list of PhoneNumberPrices records + PhoneNumberPrices *[]PricingV1MessagingMessagingCountryInstanceInboundSmsPrices `json:"PhoneNumberPrices,omitempty"` + // The currency in which prices are measured, in ISO 4127 format (e.g. usd, eur, jpy) + PriceUnit *string `json:"PriceUnit,omitempty"` + // The absolute URL of the resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/pricing/v1/model_pricing_v1_voice_voice_country.go b/twilio/rest/pricing/v1/model_pricing_v1_voice_voice_country.go index 452ea3efc..10fc21bdb 100644 --- a/twilio/rest/pricing/v1/model_pricing_v1_voice_voice_country.go +++ b/twilio/rest/pricing/v1/model_pricing_v1_voice_voice_country.go @@ -13,7 +13,10 @@ package openapi // PricingV1VoiceVoiceCountry struct for PricingV1VoiceVoiceCountry type PricingV1VoiceVoiceCountry struct { - Country *string `json:"Country,omitempty"` + // The name of the country + Country *string `json:"Country,omitempty"` + // The ISO country code IsoCountry *string `json:"IsoCountry,omitempty"` - Url *string `json:"Url,omitempty"` + // The absolute URL of the resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/pricing/v1/model_pricing_v1_voice_voice_country_instance.go b/twilio/rest/pricing/v1/model_pricing_v1_voice_voice_country_instance.go index 422934a7a..ad10a94d1 100644 --- a/twilio/rest/pricing/v1/model_pricing_v1_voice_voice_country_instance.go +++ b/twilio/rest/pricing/v1/model_pricing_v1_voice_voice_country_instance.go @@ -13,10 +13,16 @@ package openapi // PricingV1VoiceVoiceCountryInstance struct for PricingV1VoiceVoiceCountryInstance type PricingV1VoiceVoiceCountryInstance struct { - Country *string `json:"Country,omitempty"` - InboundCallPrices *[]map[string]interface{} `json:"InboundCallPrices,omitempty"` - IsoCountry *string `json:"IsoCountry,omitempty"` - OutboundPrefixPrices *[]map[string]interface{} `json:"OutboundPrefixPrices,omitempty"` - PriceUnit *string `json:"PriceUnit,omitempty"` - Url *string `json:"Url,omitempty"` + // The name of the country + Country *string `json:"Country,omitempty"` + // The list of InboundCallPrice records + InboundCallPrices *[]PricingV1MessagingMessagingCountryInstanceInboundSmsPrices `json:"InboundCallPrices,omitempty"` + // The ISO country code + IsoCountry *string `json:"IsoCountry,omitempty"` + // The list of OutboundPrefixPrice records + OutboundPrefixPrices *[]PricingV1VoiceVoiceCountryInstanceOutboundPrefixPrices `json:"OutboundPrefixPrices,omitempty"` + // The currency in which prices are measured, in ISO 4127 format (e.g. usd, eur, jpy) + PriceUnit *string `json:"PriceUnit,omitempty"` + // The absolute URL of the resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/pricing/v1/model_pricing_v1_voice_voice_country_instance_outbound_prefix_prices.go b/twilio/rest/pricing/v1/model_pricing_v1_voice_voice_country_instance_outbound_prefix_prices.go new file mode 100644 index 000000000..c084c649e --- /dev/null +++ b/twilio/rest/pricing/v1/model_pricing_v1_voice_voice_country_instance_outbound_prefix_prices.go @@ -0,0 +1,20 @@ +/* + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +// PricingV1VoiceVoiceCountryInstanceOutboundPrefixPrices struct for PricingV1VoiceVoiceCountryInstanceOutboundPrefixPrices +type PricingV1VoiceVoiceCountryInstanceOutboundPrefixPrices struct { + BasePrice float32 `json:"BasePrice,omitempty"` + CurrentPrice float32 `json:"CurrentPrice,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Prefixes []string `json:"Prefixes,omitempty"` +} diff --git a/twilio/rest/pricing/v1/model_pricing_v1_voice_voice_number.go b/twilio/rest/pricing/v1/model_pricing_v1_voice_voice_number.go index ce59d04a2..200cb9f4b 100644 --- a/twilio/rest/pricing/v1/model_pricing_v1_voice_voice_number.go +++ b/twilio/rest/pricing/v1/model_pricing_v1_voice_voice_number.go @@ -13,11 +13,16 @@ package openapi // PricingV1VoiceVoiceNumber struct for PricingV1VoiceVoiceNumber type PricingV1VoiceVoiceNumber struct { - Country *string `json:"Country,omitempty"` - InboundCallPrice *InboundCallPrice `json:"InboundCallPrice,omitempty"` - IsoCountry *string `json:"IsoCountry,omitempty"` - Number *string `json:"Number,omitempty"` - OutboundCallPrice *OutboundCallPrice `json:"OutboundCallPrice,omitempty"` - PriceUnit *string `json:"PriceUnit,omitempty"` - Url *string `json:"Url,omitempty"` + // The name of the country + Country *string `json:"Country,omitempty"` + InboundCallPrice *PricingV1VoiceVoiceNumberInboundCallPrice `json:"InboundCallPrice,omitempty"` + // The ISO country code + IsoCountry *string `json:"IsoCountry,omitempty"` + // The phone number + Number *string `json:"Number,omitempty"` + OutboundCallPrice *PricingV1VoiceVoiceNumberOutboundCallPrice `json:"OutboundCallPrice,omitempty"` + // The currency in which prices are measured, in ISO 4127 format (e.g. usd, eur, jpy) + PriceUnit *string `json:"PriceUnit,omitempty"` + // The absolute URL of the resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/pricing/v1/model_pricing_v1_voice_voice_number_inbound_call_price.go b/twilio/rest/pricing/v1/model_pricing_v1_voice_voice_number_inbound_call_price.go new file mode 100644 index 000000000..340823499 --- /dev/null +++ b/twilio/rest/pricing/v1/model_pricing_v1_voice_voice_number_inbound_call_price.go @@ -0,0 +1,19 @@ +/* + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +// PricingV1VoiceVoiceNumberInboundCallPrice The InboundCallPrice record +type PricingV1VoiceVoiceNumberInboundCallPrice struct { + BasePrice float32 `json:"BasePrice,omitempty"` + CurrentPrice float32 `json:"CurrentPrice,omitempty"` + NumberType string `json:"NumberType,omitempty"` +} diff --git a/twilio/rest/pricing/v1/model_pricing_v1_voice_voice_number_outbound_call_price.go b/twilio/rest/pricing/v1/model_pricing_v1_voice_voice_number_outbound_call_price.go new file mode 100644 index 000000000..ba708dc2a --- /dev/null +++ b/twilio/rest/pricing/v1/model_pricing_v1_voice_voice_number_outbound_call_price.go @@ -0,0 +1,18 @@ +/* + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +// PricingV1VoiceVoiceNumberOutboundCallPrice The OutboundCallPrice record +type PricingV1VoiceVoiceNumberOutboundCallPrice struct { + BasePrice float32 `json:"BasePrice,omitempty"` + CurrentPrice float32 `json:"CurrentPrice,omitempty"` +} diff --git a/twilio/rest/pricing/v2/README.md b/twilio/rest/pricing/v2/README.md index 859a210d1..5cbc895c8 100644 --- a/twilio/rest/pricing/v2/README.md +++ b/twilio/rest/pricing/v2/README.md @@ -38,13 +38,16 @@ Class | Method | HTTP request | Description ## Documentation For Models - - [InboundCallPrice](docs/InboundCallPrice.md) - [ListVoiceCountryResponse](docs/ListVoiceCountryResponse.md) - [ListVoiceCountryResponseMeta](docs/ListVoiceCountryResponseMeta.md) - [PricingV2Voice](docs/PricingV2Voice.md) - [PricingV2VoiceVoiceCountry](docs/PricingV2VoiceVoiceCountry.md) - [PricingV2VoiceVoiceCountryInstance](docs/PricingV2VoiceVoiceCountryInstance.md) + - [PricingV2VoiceVoiceCountryInstanceInboundCallPrices](docs/PricingV2VoiceVoiceCountryInstanceInboundCallPrices.md) + - [PricingV2VoiceVoiceCountryInstanceOutboundPrefixPrices](docs/PricingV2VoiceVoiceCountryInstanceOutboundPrefixPrices.md) - [PricingV2VoiceVoiceNumber](docs/PricingV2VoiceVoiceNumber.md) + - [PricingV2VoiceVoiceNumberInboundCallPrice](docs/PricingV2VoiceVoiceNumberInboundCallPrice.md) + - [PricingV2VoiceVoiceNumberOutboundCallPrices](docs/PricingV2VoiceVoiceNumberOutboundCallPrices.md) ## Documentation For Authorization diff --git a/twilio/rest/pricing/v2/docs/ListVoiceCountryResponse.md b/twilio/rest/pricing/v2/docs/ListVoiceCountryResponse.md index 7fa679cb0..cd18790a0 100644 --- a/twilio/rest/pricing/v2/docs/ListVoiceCountryResponse.md +++ b/twilio/rest/pricing/v2/docs/ListVoiceCountryResponse.md @@ -1,10 +1,10 @@ # ListVoiceCountryResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Countries** | [**[]PricingV2VoiceVoiceCountry**](pricing.v2.voice.voice_country.md) | [optional] -**Meta** | [**ListVoiceCountryResponseMeta**](ListVoiceCountryResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Countries** | [**[]PricingV2VoiceVoiceCountry**](pricing.v2.voice.voice_country.md) | |[optional] +**Meta** | [**ListVoiceCountryResponseMeta**](ListVoiceCountryResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/pricing/v2/docs/ListVoiceCountryResponseMeta.md b/twilio/rest/pricing/v2/docs/ListVoiceCountryResponseMeta.md index ce6963444..1451c8b59 100644 --- a/twilio/rest/pricing/v2/docs/ListVoiceCountryResponseMeta.md +++ b/twilio/rest/pricing/v2/docs/ListVoiceCountryResponseMeta.md @@ -1,15 +1,15 @@ # ListVoiceCountryResponseMeta ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**FirstPageUrl** | **string** | [optional] -**Key** | **string** | [optional] -**NextPageUrl** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUrl** | **string** | [optional] -**Url** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstPageUrl** | **string** | |[optional] +**Key** | **string** | |[optional] +**NextPageUrl** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUrl** | **string** | |[optional] +**Url** | **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/twilio/rest/pricing/v2/docs/PricingV2Voice.md b/twilio/rest/pricing/v2/docs/PricingV2Voice.md index fe91e9117..1090f448d 100644 --- a/twilio/rest/pricing/v2/docs/PricingV2Voice.md +++ b/twilio/rest/pricing/v2/docs/PricingV2Voice.md @@ -1,11 +1,11 @@ # PricingV2Voice ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Links** | Pointer to **map[string]interface{}** | -**Name** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Links** | Pointer to **map[string]interface{}** | The URLs of the related Countries and Numbers resources | +**Name** | Pointer to **string** | The resource name | +**Url** | Pointer to **string** | The absolute URL of the resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/pricing/v2/docs/PricingV2VoiceVoiceCountry.md b/twilio/rest/pricing/v2/docs/PricingV2VoiceVoiceCountry.md index 0695120a2..d574a2b2c 100644 --- a/twilio/rest/pricing/v2/docs/PricingV2VoiceVoiceCountry.md +++ b/twilio/rest/pricing/v2/docs/PricingV2VoiceVoiceCountry.md @@ -1,11 +1,11 @@ # PricingV2VoiceVoiceCountry ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Country** | Pointer to **string** | -**IsoCountry** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Country** | Pointer to **string** | The name of the country | +**IsoCountry** | Pointer to **string** | The ISO country code | +**Url** | Pointer to **string** | The absolute URL of the resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/pricing/v2/docs/PricingV2VoiceVoiceCountryInstance.md b/twilio/rest/pricing/v2/docs/PricingV2VoiceVoiceCountryInstance.md index ef28cf7f7..fafc9bc37 100644 --- a/twilio/rest/pricing/v2/docs/PricingV2VoiceVoiceCountryInstance.md +++ b/twilio/rest/pricing/v2/docs/PricingV2VoiceVoiceCountryInstance.md @@ -1,14 +1,14 @@ # PricingV2VoiceVoiceCountryInstance ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Country** | Pointer to **string** | -**InboundCallPrices** | Pointer to **[]map[string]interface{}** | -**IsoCountry** | Pointer to **string** | -**OutboundPrefixPrices** | Pointer to **[]map[string]interface{}** | -**PriceUnit** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Country** | Pointer to **string** | The name of the country | +**InboundCallPrices** | Pointer to [**[]PricingV2VoiceVoiceCountryInstanceInboundCallPrices**](pricing_v2_voice_voice_country_instance_inbound_call_prices.md) | The list of InboundCallPrice records | +**IsoCountry** | Pointer to **string** | The ISO country code | +**OutboundPrefixPrices** | Pointer to [**[]PricingV2VoiceVoiceCountryInstanceOutboundPrefixPrices**](pricing_v2_voice_voice_country_instance_outbound_prefix_prices.md) | The list of OutboundPrefixPriceWithOrigin records | +**PriceUnit** | Pointer to **string** | The currency in which prices are measured, in ISO 4127 format (e.g. usd, eur, jpy) | +**Url** | Pointer to **string** | The absolute URL of the resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/pricing/v2/docs/PricingV2VoiceVoiceCountryInstanceInboundCallPrices.md b/twilio/rest/pricing/v2/docs/PricingV2VoiceVoiceCountryInstanceInboundCallPrices.md new file mode 100644 index 000000000..46767d623 --- /dev/null +++ b/twilio/rest/pricing/v2/docs/PricingV2VoiceVoiceCountryInstanceInboundCallPrices.md @@ -0,0 +1,12 @@ +# PricingV2VoiceVoiceCountryInstanceInboundCallPrices + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**BasePrice** | **float32** | |[optional] +**CurrentPrice** | **float32** | |[optional] +**NumberType** | **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/twilio/rest/pricing/v2/docs/PricingV2VoiceVoiceCountryInstanceOutboundPrefixPrices.md b/twilio/rest/pricing/v2/docs/PricingV2VoiceVoiceCountryInstanceOutboundPrefixPrices.md new file mode 100644 index 000000000..978b691fd --- /dev/null +++ b/twilio/rest/pricing/v2/docs/PricingV2VoiceVoiceCountryInstanceOutboundPrefixPrices.md @@ -0,0 +1,14 @@ +# PricingV2VoiceVoiceCountryInstanceOutboundPrefixPrices + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**BasePrice** | **float32** | |[optional] +**CurrentPrice** | **float32** | |[optional] +**DestinationPrefixes** | **[]string** | |[optional] +**FriendlyName** | **string** | |[optional] +**OriginationPrefixes** | **[]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/twilio/rest/pricing/v2/docs/PricingV2VoiceVoiceNumber.md b/twilio/rest/pricing/v2/docs/PricingV2VoiceVoiceNumber.md index ea36710ec..16c158080 100644 --- a/twilio/rest/pricing/v2/docs/PricingV2VoiceVoiceNumber.md +++ b/twilio/rest/pricing/v2/docs/PricingV2VoiceVoiceNumber.md @@ -1,16 +1,16 @@ # PricingV2VoiceVoiceNumber ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Country** | Pointer to **string** | -**DestinationNumber** | Pointer to **string** | -**InboundCallPrice** | Pointer to [**InboundCallPrice**](inbound_call_price.md) | -**IsoCountry** | Pointer to **string** | -**OriginationNumber** | Pointer to **string** | -**OutboundCallPrices** | Pointer to **[]map[string]interface{}** | -**PriceUnit** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Country** | Pointer to **string** | The name of the country | +**DestinationNumber** | Pointer to **string** | The destination phone number, in E.164 format | +**InboundCallPrice** | Pointer to [**PricingV2VoiceVoiceNumberInboundCallPrice**](pricing_v2_voice_voice_number_inbound_call_price.md) | | +**IsoCountry** | Pointer to **string** | The ISO country code | +**OriginationNumber** | Pointer to **string** | The origination phone number, in E.164 format | +**OutboundCallPrices** | Pointer to [**[]PricingV2VoiceVoiceNumberOutboundCallPrices**](pricing_v2_voice_voice_number_outbound_call_prices.md) | The list of OutboundCallPriceWithOrigin records | +**PriceUnit** | Pointer to **string** | The currency in which prices are measured, in ISO 4127 format (e.g. usd, eur, jpy) | +**Url** | Pointer to **string** | The absolute URL of the resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/pricing/v2/docs/PricingV2VoiceVoiceNumberInboundCallPrice.md b/twilio/rest/pricing/v2/docs/PricingV2VoiceVoiceNumberInboundCallPrice.md new file mode 100644 index 000000000..5a3ca94be --- /dev/null +++ b/twilio/rest/pricing/v2/docs/PricingV2VoiceVoiceNumberInboundCallPrice.md @@ -0,0 +1,12 @@ +# PricingV2VoiceVoiceNumberInboundCallPrice + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**BasePrice** | **float32** | |[optional] +**CurrentPrice** | **float32** | |[optional] +**NumberType** | **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/twilio/rest/pricing/v2/docs/PricingV2VoiceVoiceNumberOutboundCallPrices.md b/twilio/rest/pricing/v2/docs/PricingV2VoiceVoiceNumberOutboundCallPrices.md new file mode 100644 index 000000000..83d2ea791 --- /dev/null +++ b/twilio/rest/pricing/v2/docs/PricingV2VoiceVoiceNumberOutboundCallPrices.md @@ -0,0 +1,12 @@ +# PricingV2VoiceVoiceNumberOutboundCallPrices + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**BasePrice** | **float32** | |[optional] +**CurrentPrice** | **float32** | |[optional] +**OriginationPrefixes** | **[]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/twilio/rest/pricing/v2/model_pricing_v2_voice.go b/twilio/rest/pricing/v2/model_pricing_v2_voice.go index 3356f9897..a595d69dc 100644 --- a/twilio/rest/pricing/v2/model_pricing_v2_voice.go +++ b/twilio/rest/pricing/v2/model_pricing_v2_voice.go @@ -13,7 +13,10 @@ package openapi // PricingV2Voice struct for PricingV2Voice type PricingV2Voice struct { + // The URLs of the related Countries and Numbers resources Links *map[string]interface{} `json:"Links,omitempty"` - Name *string `json:"Name,omitempty"` - Url *string `json:"Url,omitempty"` + // The resource name + Name *string `json:"Name,omitempty"` + // The absolute URL of the resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_country.go b/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_country.go index 8819ec0a5..cee3cb968 100644 --- a/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_country.go +++ b/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_country.go @@ -13,7 +13,10 @@ package openapi // PricingV2VoiceVoiceCountry struct for PricingV2VoiceVoiceCountry type PricingV2VoiceVoiceCountry struct { - Country *string `json:"Country,omitempty"` + // The name of the country + Country *string `json:"Country,omitempty"` + // The ISO country code IsoCountry *string `json:"IsoCountry,omitempty"` - Url *string `json:"Url,omitempty"` + // The absolute URL of the resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_country_instance.go b/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_country_instance.go index f8d49e302..4085704b4 100644 --- a/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_country_instance.go +++ b/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_country_instance.go @@ -13,10 +13,16 @@ package openapi // PricingV2VoiceVoiceCountryInstance struct for PricingV2VoiceVoiceCountryInstance type PricingV2VoiceVoiceCountryInstance struct { - Country *string `json:"Country,omitempty"` - InboundCallPrices *[]map[string]interface{} `json:"InboundCallPrices,omitempty"` - IsoCountry *string `json:"IsoCountry,omitempty"` - OutboundPrefixPrices *[]map[string]interface{} `json:"OutboundPrefixPrices,omitempty"` - PriceUnit *string `json:"PriceUnit,omitempty"` - Url *string `json:"Url,omitempty"` + // The name of the country + Country *string `json:"Country,omitempty"` + // The list of InboundCallPrice records + InboundCallPrices *[]PricingV2VoiceVoiceCountryInstanceInboundCallPrices `json:"InboundCallPrices,omitempty"` + // The ISO country code + IsoCountry *string `json:"IsoCountry,omitempty"` + // The list of OutboundPrefixPriceWithOrigin records + OutboundPrefixPrices *[]PricingV2VoiceVoiceCountryInstanceOutboundPrefixPrices `json:"OutboundPrefixPrices,omitempty"` + // The currency in which prices are measured, in ISO 4127 format (e.g. usd, eur, jpy) + PriceUnit *string `json:"PriceUnit,omitempty"` + // The absolute URL of the resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_country_instance_inbound_call_prices.go b/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_country_instance_inbound_call_prices.go new file mode 100644 index 000000000..4c9fc3138 --- /dev/null +++ b/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_country_instance_inbound_call_prices.go @@ -0,0 +1,19 @@ +/* + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +// PricingV2VoiceVoiceCountryInstanceInboundCallPrices struct for PricingV2VoiceVoiceCountryInstanceInboundCallPrices +type PricingV2VoiceVoiceCountryInstanceInboundCallPrices struct { + BasePrice float32 `json:"BasePrice,omitempty"` + CurrentPrice float32 `json:"CurrentPrice,omitempty"` + NumberType string `json:"NumberType,omitempty"` +} diff --git a/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_country_instance_outbound_prefix_prices.go b/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_country_instance_outbound_prefix_prices.go new file mode 100644 index 000000000..52842775d --- /dev/null +++ b/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_country_instance_outbound_prefix_prices.go @@ -0,0 +1,21 @@ +/* + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +// PricingV2VoiceVoiceCountryInstanceOutboundPrefixPrices struct for PricingV2VoiceVoiceCountryInstanceOutboundPrefixPrices +type PricingV2VoiceVoiceCountryInstanceOutboundPrefixPrices struct { + BasePrice float32 `json:"BasePrice,omitempty"` + CurrentPrice float32 `json:"CurrentPrice,omitempty"` + DestinationPrefixes []string `json:"DestinationPrefixes,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + OriginationPrefixes []string `json:"OriginationPrefixes,omitempty"` +} diff --git a/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_number.go b/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_number.go index a024d4f86..0afead333 100644 --- a/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_number.go +++ b/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_number.go @@ -13,12 +13,19 @@ package openapi // PricingV2VoiceVoiceNumber struct for PricingV2VoiceVoiceNumber type PricingV2VoiceVoiceNumber struct { - Country *string `json:"Country,omitempty"` - DestinationNumber *string `json:"DestinationNumber,omitempty"` - InboundCallPrice *InboundCallPrice `json:"InboundCallPrice,omitempty"` - IsoCountry *string `json:"IsoCountry,omitempty"` - OriginationNumber *string `json:"OriginationNumber,omitempty"` - OutboundCallPrices *[]map[string]interface{} `json:"OutboundCallPrices,omitempty"` - PriceUnit *string `json:"PriceUnit,omitempty"` - Url *string `json:"Url,omitempty"` + // The name of the country + Country *string `json:"Country,omitempty"` + // The destination phone number, in E.164 format + DestinationNumber *string `json:"DestinationNumber,omitempty"` + InboundCallPrice *PricingV2VoiceVoiceNumberInboundCallPrice `json:"InboundCallPrice,omitempty"` + // The ISO country code + IsoCountry *string `json:"IsoCountry,omitempty"` + // The origination phone number, in E.164 format + OriginationNumber *string `json:"OriginationNumber,omitempty"` + // The list of OutboundCallPriceWithOrigin records + OutboundCallPrices *[]PricingV2VoiceVoiceNumberOutboundCallPrices `json:"OutboundCallPrices,omitempty"` + // The currency in which prices are measured, in ISO 4127 format (e.g. usd, eur, jpy) + PriceUnit *string `json:"PriceUnit,omitempty"` + // The absolute URL of the resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_number_inbound_call_price.go b/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_number_inbound_call_price.go new file mode 100644 index 000000000..da9db3ec0 --- /dev/null +++ b/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_number_inbound_call_price.go @@ -0,0 +1,19 @@ +/* + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +// PricingV2VoiceVoiceNumberInboundCallPrice The InboundCallPrice record +type PricingV2VoiceVoiceNumberInboundCallPrice struct { + BasePrice float32 `json:"BasePrice,omitempty"` + CurrentPrice float32 `json:"CurrentPrice,omitempty"` + NumberType string `json:"NumberType,omitempty"` +} diff --git a/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_number_outbound_call_prices.go b/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_number_outbound_call_prices.go new file mode 100644 index 000000000..08855a660 --- /dev/null +++ b/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_number_outbound_call_prices.go @@ -0,0 +1,19 @@ +/* + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +// PricingV2VoiceVoiceNumberOutboundCallPrices struct for PricingV2VoiceVoiceNumberOutboundCallPrices +type PricingV2VoiceVoiceNumberOutboundCallPrices struct { + BasePrice float32 `json:"BasePrice,omitempty"` + CurrentPrice float32 `json:"CurrentPrice,omitempty"` + OriginationPrefixes []string `json:"OriginationPrefixes,omitempty"` +} diff --git a/twilio/rest/proxy/v1/README.md b/twilio/rest/proxy/v1/README.md index 77f140064..6df3385a1 100644 --- a/twilio/rest/proxy/v1/README.md +++ b/twilio/rest/proxy/v1/README.md @@ -65,8 +65,6 @@ Class | Method | HTTP request | Description ## Documentation For Models - - [InteractionResourceStatus](docs/InteractionResourceStatus.md) - - [InteractionType](docs/InteractionType.md) - [ListInteractionResponse](docs/ListInteractionResponse.md) - [ListMessageInteractionResponse](docs/ListMessageInteractionResponse.md) - [ListParticipantResponse](docs/ListParticipantResponse.md) @@ -75,20 +73,15 @@ Class | Method | HTTP request | Description - [ListServiceResponseMeta](docs/ListServiceResponseMeta.md) - [ListSessionResponse](docs/ListSessionResponse.md) - [ListShortCodeResponse](docs/ListShortCodeResponse.md) - - [MessageInteractionResourceStatus](docs/MessageInteractionResourceStatus.md) - - [MessageInteractionType](docs/MessageInteractionType.md) - - [PhoneNumberCapabilities](docs/PhoneNumberCapabilities.md) - [ProxyV1Service](docs/ProxyV1Service.md) - [ProxyV1ServicePhoneNumber](docs/ProxyV1ServicePhoneNumber.md) + - [ProxyV1ServicePhoneNumberCapabilities](docs/ProxyV1ServicePhoneNumberCapabilities.md) - [ProxyV1ServiceSession](docs/ProxyV1ServiceSession.md) - [ProxyV1ServiceSessionInteraction](docs/ProxyV1ServiceSessionInteraction.md) - [ProxyV1ServiceSessionParticipant](docs/ProxyV1ServiceSessionParticipant.md) - [ProxyV1ServiceSessionParticipantMessageInteraction](docs/ProxyV1ServiceSessionParticipantMessageInteraction.md) - [ProxyV1ServiceShortCode](docs/ProxyV1ServiceShortCode.md) - - [ServiceGeoMatchLevel](docs/ServiceGeoMatchLevel.md) - - [ServiceNumberSelectionBehavior](docs/ServiceNumberSelectionBehavior.md) - - [SessionMode](docs/SessionMode.md) - - [SessionStatus](docs/SessionStatus.md) + - [ProxyV1ServiceShortCodeCapabilities](docs/ProxyV1ServiceShortCodeCapabilities.md) ## Documentation For Authorization diff --git a/twilio/rest/proxy/v1/docs/ListInteractionResponse.md b/twilio/rest/proxy/v1/docs/ListInteractionResponse.md index b6d3222d1..953578ba9 100644 --- a/twilio/rest/proxy/v1/docs/ListInteractionResponse.md +++ b/twilio/rest/proxy/v1/docs/ListInteractionResponse.md @@ -1,10 +1,10 @@ # ListInteractionResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Interactions** | [**[]ProxyV1ServiceSessionInteraction**](proxy.v1.service.session.interaction.md) | [optional] -**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Interactions** | [**[]ProxyV1ServiceSessionInteraction**](proxy.v1.service.session.interaction.md) | |[optional] +**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/proxy/v1/docs/ListMessageInteractionResponse.md b/twilio/rest/proxy/v1/docs/ListMessageInteractionResponse.md index a8c64b0b8..30df46683 100644 --- a/twilio/rest/proxy/v1/docs/ListMessageInteractionResponse.md +++ b/twilio/rest/proxy/v1/docs/ListMessageInteractionResponse.md @@ -1,10 +1,10 @@ # ListMessageInteractionResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Interactions** | [**[]ProxyV1ServiceSessionParticipantMessageInteraction**](proxy.v1.service.session.participant.message_interaction.md) | [optional] -**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Interactions** | [**[]ProxyV1ServiceSessionParticipantMessageInteraction**](proxy.v1.service.session.participant.message_interaction.md) | |[optional] +**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/proxy/v1/docs/ListParticipantResponse.md b/twilio/rest/proxy/v1/docs/ListParticipantResponse.md index d76edba61..7aebca8c0 100644 --- a/twilio/rest/proxy/v1/docs/ListParticipantResponse.md +++ b/twilio/rest/proxy/v1/docs/ListParticipantResponse.md @@ -1,10 +1,10 @@ # ListParticipantResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | [optional] -**Participants** | [**[]ProxyV1ServiceSessionParticipant**](proxy.v1.service.session.participant.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | |[optional] +**Participants** | [**[]ProxyV1ServiceSessionParticipant**](proxy.v1.service.session.participant.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/proxy/v1/docs/ListPhoneNumberResponse.md b/twilio/rest/proxy/v1/docs/ListPhoneNumberResponse.md index 979bb974f..5e9556106 100644 --- a/twilio/rest/proxy/v1/docs/ListPhoneNumberResponse.md +++ b/twilio/rest/proxy/v1/docs/ListPhoneNumberResponse.md @@ -1,10 +1,10 @@ # ListPhoneNumberResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | [optional] -**PhoneNumbers** | [**[]ProxyV1ServicePhoneNumber**](proxy.v1.service.phone_number.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | |[optional] +**PhoneNumbers** | [**[]ProxyV1ServicePhoneNumber**](proxy.v1.service.phone_number.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/proxy/v1/docs/ListServiceResponse.md b/twilio/rest/proxy/v1/docs/ListServiceResponse.md index 46f733e62..42d682fea 100644 --- a/twilio/rest/proxy/v1/docs/ListServiceResponse.md +++ b/twilio/rest/proxy/v1/docs/ListServiceResponse.md @@ -1,10 +1,10 @@ # ListServiceResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | [optional] -**Services** | [**[]ProxyV1Service**](proxy.v1.service.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | |[optional] +**Services** | [**[]ProxyV1Service**](proxy.v1.service.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/proxy/v1/docs/ListServiceResponseMeta.md b/twilio/rest/proxy/v1/docs/ListServiceResponseMeta.md index ce4085ffe..6628758e1 100644 --- a/twilio/rest/proxy/v1/docs/ListServiceResponseMeta.md +++ b/twilio/rest/proxy/v1/docs/ListServiceResponseMeta.md @@ -1,15 +1,15 @@ # ListServiceResponseMeta ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**FirstPageUrl** | **string** | [optional] -**Key** | **string** | [optional] -**NextPageUrl** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUrl** | **string** | [optional] -**Url** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstPageUrl** | **string** | |[optional] +**Key** | **string** | |[optional] +**NextPageUrl** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUrl** | **string** | |[optional] +**Url** | **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/twilio/rest/proxy/v1/docs/ListSessionResponse.md b/twilio/rest/proxy/v1/docs/ListSessionResponse.md index a2d2d3ece..d0e79a7f3 100644 --- a/twilio/rest/proxy/v1/docs/ListSessionResponse.md +++ b/twilio/rest/proxy/v1/docs/ListSessionResponse.md @@ -1,10 +1,10 @@ # ListSessionResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | [optional] -**Sessions** | [**[]ProxyV1ServiceSession**](proxy.v1.service.session.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | |[optional] +**Sessions** | [**[]ProxyV1ServiceSession**](proxy.v1.service.session.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/proxy/v1/docs/ListShortCodeResponse.md b/twilio/rest/proxy/v1/docs/ListShortCodeResponse.md index c4d5d6bef..b187d87f3 100644 --- a/twilio/rest/proxy/v1/docs/ListShortCodeResponse.md +++ b/twilio/rest/proxy/v1/docs/ListShortCodeResponse.md @@ -1,10 +1,10 @@ # ListShortCodeResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | [optional] -**ShortCodes** | [**[]ProxyV1ServiceShortCode**](proxy.v1.service.short_code.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | |[optional] +**ShortCodes** | [**[]ProxyV1ServiceShortCode**](proxy.v1.service.short_code.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/proxy/v1/docs/ProxyV1Service.md b/twilio/rest/proxy/v1/docs/ProxyV1Service.md index dcfeea177..4ce8882c3 100644 --- a/twilio/rest/proxy/v1/docs/ProxyV1Service.md +++ b/twilio/rest/proxy/v1/docs/ProxyV1Service.md @@ -1,22 +1,22 @@ # ProxyV1Service ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**CallbackUrl** | Pointer to **string** | -**ChatInstanceSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**DefaultTtl** | Pointer to **int32** | -**GeoMatchLevel** | Pointer to [**ServiceGeoMatchLevel**](service_geo_match_level.md) | -**InterceptCallbackUrl** | Pointer to **string** | -**Links** | Pointer to **map[string]interface{}** | -**NumberSelectionBehavior** | Pointer to [**ServiceNumberSelectionBehavior**](service_number_selection_behavior.md) | -**OutOfSessionCallbackUrl** | Pointer to **string** | -**Sid** | Pointer to **string** | -**UniqueName** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**CallbackUrl** | Pointer to **string** | The URL we call when the interaction status changes | +**ChatInstanceSid** | Pointer to **string** | The SID of the Chat Service Instance | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was last updated | +**DefaultTtl** | Pointer to **int32** | Default TTL for a Session, in seconds | +**GeoMatchLevel** | Pointer to **string** | Where a proxy number must be located relative to the participant identifier | +**InterceptCallbackUrl** | Pointer to **string** | The URL we call on each interaction | +**Links** | Pointer to **map[string]interface{}** | The URLs of resources related to the Service | +**NumberSelectionBehavior** | Pointer to **string** | The preference for Proxy Number selection for the Service instance | +**OutOfSessionCallbackUrl** | Pointer to **string** | The URL we call when an inbound call or SMS action occurs on a closed or non-existent Session | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**UniqueName** | Pointer to **string** | An application-defined string that uniquely identifies the resource | +**Url** | Pointer to **string** | The absolute URL of the Service resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/proxy/v1/docs/ProxyV1ServicePhoneNumber.md b/twilio/rest/proxy/v1/docs/ProxyV1ServicePhoneNumber.md index fcd5c4124..8a9a66a40 100644 --- a/twilio/rest/proxy/v1/docs/ProxyV1ServicePhoneNumber.md +++ b/twilio/rest/proxy/v1/docs/ProxyV1ServicePhoneNumber.md @@ -1,20 +1,20 @@ # ProxyV1ServicePhoneNumber ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Capabilities** | Pointer to [**PhoneNumberCapabilities**](phone_number_capabilities.md) | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**FriendlyName** | Pointer to **string** | -**InUse** | Pointer to **int32** | -**IsReserved** | Pointer to **bool** | -**IsoCountry** | Pointer to **string** | -**PhoneNumber** | Pointer to **string** | -**ServiceSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**Capabilities** | Pointer to [**ProxyV1ServicePhoneNumberCapabilities**](proxy_v1_service_phone_number_capabilities.md) | | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was last updated | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the resource | +**InUse** | Pointer to **int32** | The number of open session assigned to the number. | +**IsReserved** | Pointer to **bool** | Reserve the phone number for manual assignment to participants only | +**IsoCountry** | Pointer to **string** | The ISO Country Code | +**PhoneNumber** | Pointer to **string** | The phone number in E.164 format | +**ServiceSid** | Pointer to **string** | The SID of the PhoneNumber resource's parent Service resource | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Url** | Pointer to **string** | The absolute URL of the PhoneNumber resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/proxy/v1/docs/ProxyV1ServicePhoneNumberCapabilities.md b/twilio/rest/proxy/v1/docs/ProxyV1ServicePhoneNumberCapabilities.md new file mode 100644 index 000000000..3c1e3a3c2 --- /dev/null +++ b/twilio/rest/proxy/v1/docs/ProxyV1ServicePhoneNumberCapabilities.md @@ -0,0 +1,13 @@ +# ProxyV1ServicePhoneNumberCapabilities + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Fax** | **bool** | |[optional] +**Mms** | **bool** | |[optional] +**Sms** | **bool** | |[optional] +**Voice** | **bool** | |[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/twilio/rest/proxy/v1/docs/ProxyV1ServiceSession.md b/twilio/rest/proxy/v1/docs/ProxyV1ServiceSession.md index b5fd6443b..2257cc882 100644 --- a/twilio/rest/proxy/v1/docs/ProxyV1ServiceSession.md +++ b/twilio/rest/proxy/v1/docs/ProxyV1ServiceSession.md @@ -1,24 +1,24 @@ # ProxyV1ServiceSession ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**ClosedReason** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateEnded** | Pointer to [**time.Time**](time.Time.md) | -**DateExpiry** | Pointer to [**time.Time**](time.Time.md) | -**DateLastInteraction** | Pointer to [**time.Time**](time.Time.md) | -**DateStarted** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**Links** | Pointer to **map[string]interface{}** | -**Mode** | Pointer to [**SessionMode**](session_mode.md) | -**ServiceSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Status** | Pointer to [**SessionStatus**](session_status.md) | -**Ttl** | Pointer to **int32** | -**UniqueName** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**ClosedReason** | Pointer to **string** | The reason the Session ended | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**DateEnded** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date when the Session ended | +**DateExpiry** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date when the Session should expire | +**DateLastInteraction** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date when the Session last had an interaction | +**DateStarted** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date when the Session started | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was last updated | +**Links** | Pointer to **map[string]interface{}** | The URLs of resources related to the Session | +**Mode** | Pointer to **string** | The Mode of the Session | +**ServiceSid** | Pointer to **string** | The SID of the resource's parent Service | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Status** | Pointer to **string** | The status of the Session | +**Ttl** | Pointer to **int32** | When the session will expire | +**UniqueName** | Pointer to **string** | An application-defined string that uniquely identifies the resource | +**Url** | Pointer to **string** | The absolute URL of the Session resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/proxy/v1/docs/ProxyV1ServiceSessionInteraction.md b/twilio/rest/proxy/v1/docs/ProxyV1ServiceSessionInteraction.md index 99f83de30..732de81c9 100644 --- a/twilio/rest/proxy/v1/docs/ProxyV1ServiceSessionInteraction.md +++ b/twilio/rest/proxy/v1/docs/ProxyV1ServiceSessionInteraction.md @@ -1,27 +1,27 @@ # ProxyV1ServiceSessionInteraction ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Data** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**InboundParticipantSid** | Pointer to **string** | -**InboundResourceSid** | Pointer to **string** | -**InboundResourceStatus** | Pointer to [**InteractionResourceStatus**](interaction_resource_status.md) | -**InboundResourceType** | Pointer to **string** | -**InboundResourceUrl** | Pointer to **string** | -**OutboundParticipantSid** | Pointer to **string** | -**OutboundResourceSid** | Pointer to **string** | -**OutboundResourceStatus** | Pointer to [**InteractionResourceStatus**](interaction_resource_status.md) | -**OutboundResourceType** | Pointer to **string** | -**OutboundResourceUrl** | Pointer to **string** | -**ServiceSid** | Pointer to **string** | -**SessionSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Type** | Pointer to [**InteractionType**](interaction_type.md) | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**Data** | Pointer to **string** | A JSON string that includes the message body of message interactions | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the Interaction was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was last updated | +**InboundParticipantSid** | Pointer to **string** | The SID of the inbound Participant resource | +**InboundResourceSid** | Pointer to **string** | The SID of the inbound resource | +**InboundResourceStatus** | Pointer to **string** | The inbound resource status of the Interaction | +**InboundResourceType** | Pointer to **string** | The inbound resource type | +**InboundResourceUrl** | Pointer to **string** | The URL of the Twilio inbound resource | +**OutboundParticipantSid** | Pointer to **string** | The SID of the outbound Participant | +**OutboundResourceSid** | Pointer to **string** | The SID of the outbound resource | +**OutboundResourceStatus** | Pointer to **string** | The outbound resource status of the Interaction | +**OutboundResourceType** | Pointer to **string** | The outbound resource type | +**OutboundResourceUrl** | Pointer to **string** | The URL of the Twilio outbound resource | +**ServiceSid** | Pointer to **string** | The SID of the resource's parent Service | +**SessionSid** | Pointer to **string** | The SID of the resource's parent Session | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Type** | Pointer to **string** | The Type of the Interaction | +**Url** | Pointer to **string** | The absolute URL of the Interaction resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/proxy/v1/docs/ProxyV1ServiceSessionParticipant.md b/twilio/rest/proxy/v1/docs/ProxyV1ServiceSessionParticipant.md index 6dc3fbb2d..fe036ecb5 100644 --- a/twilio/rest/proxy/v1/docs/ProxyV1ServiceSessionParticipant.md +++ b/twilio/rest/proxy/v1/docs/ProxyV1ServiceSessionParticipant.md @@ -1,21 +1,21 @@ # ProxyV1ServiceSessionParticipant ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateDeleted** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**FriendlyName** | Pointer to **string** | -**Identifier** | Pointer to **string** | -**Links** | Pointer to **map[string]interface{}** | -**ProxyIdentifier** | Pointer to **string** | -**ProxyIdentifierSid** | Pointer to **string** | -**ServiceSid** | Pointer to **string** | -**SessionSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**DateDeleted** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date the Participant was removed | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was last updated | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the participant | +**Identifier** | Pointer to **string** | The phone number of the Participant | +**Links** | Pointer to **map[string]interface{}** | The URLs to resources related the participant | +**ProxyIdentifier** | Pointer to **string** | The phone number or short code of the participant's partner | +**ProxyIdentifierSid** | Pointer to **string** | The SID of the Proxy Identifier assigned to the Participant | +**ServiceSid** | Pointer to **string** | The SID of the resource's parent Service | +**SessionSid** | Pointer to **string** | The SID of the resource's parent Session | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Url** | Pointer to **string** | The absolute URL of the Participant resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/proxy/v1/docs/ProxyV1ServiceSessionParticipantMessageInteraction.md b/twilio/rest/proxy/v1/docs/ProxyV1ServiceSessionParticipantMessageInteraction.md index c414e6cb7..e55ec49e4 100644 --- a/twilio/rest/proxy/v1/docs/ProxyV1ServiceSessionParticipantMessageInteraction.md +++ b/twilio/rest/proxy/v1/docs/ProxyV1ServiceSessionParticipantMessageInteraction.md @@ -1,28 +1,28 @@ # ProxyV1ServiceSessionParticipantMessageInteraction ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Data** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**InboundParticipantSid** | Pointer to **string** | -**InboundResourceSid** | Pointer to **string** | -**InboundResourceStatus** | Pointer to [**MessageInteractionResourceStatus**](message_interaction_resource_status.md) | -**InboundResourceType** | Pointer to **string** | -**InboundResourceUrl** | Pointer to **string** | -**OutboundParticipantSid** | Pointer to **string** | -**OutboundResourceSid** | Pointer to **string** | -**OutboundResourceStatus** | Pointer to [**MessageInteractionResourceStatus**](message_interaction_resource_status.md) | -**OutboundResourceType** | Pointer to **string** | -**OutboundResourceUrl** | Pointer to **string** | -**ParticipantSid** | Pointer to **string** | -**ServiceSid** | Pointer to **string** | -**SessionSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Type** | Pointer to [**MessageInteractionType**](message_interaction_type.md) | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**Data** | Pointer to **string** | A JSON string that includes the message body sent to the participant | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was last updated | +**InboundParticipantSid** | Pointer to **string** | Always empty for Message Interactions | +**InboundResourceSid** | Pointer to **string** | Always empty for Message Interactions | +**InboundResourceStatus** | Pointer to **string** | Always empty for Message Interactions | +**InboundResourceType** | Pointer to **string** | Always empty for Message Interactions | +**InboundResourceUrl** | Pointer to **string** | Always empty for Message Interactions | +**OutboundParticipantSid** | Pointer to **string** | The SID of the outbound Participant resource | +**OutboundResourceSid** | Pointer to **string** | The SID of the outbound Message resource | +**OutboundResourceStatus** | Pointer to **string** | The outbound resource status | +**OutboundResourceType** | Pointer to **string** | The outbound resource type | +**OutboundResourceUrl** | Pointer to **string** | The URL of the Twilio message resource | +**ParticipantSid** | Pointer to **string** | The SID of the Participant resource | +**ServiceSid** | Pointer to **string** | The SID of the resource's parent Service | +**SessionSid** | Pointer to **string** | The SID of the resource's parent Session | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Type** | Pointer to **string** | The Type of Message Interaction | +**Url** | Pointer to **string** | The absolute URL of the MessageInteraction resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/proxy/v1/docs/ProxyV1ServiceShortCode.md b/twilio/rest/proxy/v1/docs/ProxyV1ServiceShortCode.md index f0dafd44e..f4b57b3f6 100644 --- a/twilio/rest/proxy/v1/docs/ProxyV1ServiceShortCode.md +++ b/twilio/rest/proxy/v1/docs/ProxyV1ServiceShortCode.md @@ -1,18 +1,18 @@ # ProxyV1ServiceShortCode ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Capabilities** | Pointer to [**PhoneNumberCapabilities**](phone_number_capabilities.md) | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**IsReserved** | Pointer to **bool** | -**IsoCountry** | Pointer to **string** | -**ServiceSid** | Pointer to **string** | -**ShortCode** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**Capabilities** | Pointer to [**ProxyV1ServiceShortCodeCapabilities**](proxy_v1_service_short_code_capabilities.md) | | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was last updated | +**IsReserved** | Pointer to **bool** | Whether the short code should be reserved for manual assignment to participants only | +**IsoCountry** | Pointer to **string** | The ISO Country Code | +**ServiceSid** | Pointer to **string** | The SID of the resource's parent Service | +**ShortCode** | Pointer to **string** | The short code's number | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Url** | Pointer to **string** | The absolute URL of the ShortCode resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/proxy/v1/docs/ProxyV1ServiceShortCodeCapabilities.md b/twilio/rest/proxy/v1/docs/ProxyV1ServiceShortCodeCapabilities.md new file mode 100644 index 000000000..5c9c1438c --- /dev/null +++ b/twilio/rest/proxy/v1/docs/ProxyV1ServiceShortCodeCapabilities.md @@ -0,0 +1,13 @@ +# ProxyV1ServiceShortCodeCapabilities + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Fax** | **bool** | |[optional] +**Mms** | **bool** | |[optional] +**Sms** | **bool** | |[optional] +**Voice** | **bool** | |[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/twilio/rest/proxy/v1/model_proxy_v1_service.go b/twilio/rest/proxy/v1/model_proxy_v1_service.go index a65aa68da..2bd02c8d8 100644 --- a/twilio/rest/proxy/v1/model_proxy_v1_service.go +++ b/twilio/rest/proxy/v1/model_proxy_v1_service.go @@ -17,18 +17,32 @@ import ( // ProxyV1Service struct for ProxyV1Service type ProxyV1Service struct { - AccountSid *string `json:"AccountSid,omitempty"` - CallbackUrl *string `json:"CallbackUrl,omitempty"` - ChatInstanceSid *string `json:"ChatInstanceSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - DefaultTtl *int32 `json:"DefaultTtl,omitempty"` - GeoMatchLevel *ServiceGeoMatchLevel `json:"GeoMatchLevel,omitempty"` - InterceptCallbackUrl *string `json:"InterceptCallbackUrl,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - NumberSelectionBehavior *ServiceNumberSelectionBehavior `json:"NumberSelectionBehavior,omitempty"` - OutOfSessionCallbackUrl *string `json:"OutOfSessionCallbackUrl,omitempty"` - Sid *string `json:"Sid,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The URL we call when the interaction status changes + CallbackUrl *string `json:"CallbackUrl,omitempty"` + // The SID of the Chat Service Instance + ChatInstanceSid *string `json:"ChatInstanceSid,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // Default TTL for a Session, in seconds + DefaultTtl *int32 `json:"DefaultTtl,omitempty"` + // Where a proxy number must be located relative to the participant identifier + GeoMatchLevel *string `json:"GeoMatchLevel,omitempty"` + // The URL we call on each interaction + InterceptCallbackUrl *string `json:"InterceptCallbackUrl,omitempty"` + // The URLs of resources related to the Service + Links *map[string]interface{} `json:"Links,omitempty"` + // The preference for Proxy Number selection for the Service instance + NumberSelectionBehavior *string `json:"NumberSelectionBehavior,omitempty"` + // The URL we call when an inbound call or SMS action occurs on a closed or non-existent Session + OutOfSessionCallbackUrl *string `json:"OutOfSessionCallbackUrl,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // An application-defined string that uniquely identifies the resource + UniqueName *string `json:"UniqueName,omitempty"` + // The absolute URL of the Service resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/proxy/v1/model_proxy_v1_service_phone_number.go b/twilio/rest/proxy/v1/model_proxy_v1_service_phone_number.go index e943d5d36..6a90f910c 100644 --- a/twilio/rest/proxy/v1/model_proxy_v1_service_phone_number.go +++ b/twilio/rest/proxy/v1/model_proxy_v1_service_phone_number.go @@ -17,16 +17,27 @@ import ( // ProxyV1ServicePhoneNumber struct for ProxyV1ServicePhoneNumber type ProxyV1ServicePhoneNumber struct { - AccountSid *string `json:"AccountSid,omitempty"` - Capabilities *PhoneNumberCapabilities `json:"Capabilities,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - InUse *int32 `json:"InUse,omitempty"` - IsReserved *bool `json:"IsReserved,omitempty"` - IsoCountry *string `json:"IsoCountry,omitempty"` - PhoneNumber *string `json:"PhoneNumber,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + Capabilities *ProxyV1ServicePhoneNumberCapabilities `json:"Capabilities,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The string that you assigned to describe the resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // The number of open session assigned to the number. + InUse *int32 `json:"InUse,omitempty"` + // Reserve the phone number for manual assignment to participants only + IsReserved *bool `json:"IsReserved,omitempty"` + // The ISO Country Code + IsoCountry *string `json:"IsoCountry,omitempty"` + // The phone number in E.164 format + PhoneNumber *string `json:"PhoneNumber,omitempty"` + // The SID of the PhoneNumber resource's parent Service resource + ServiceSid *string `json:"ServiceSid,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The absolute URL of the PhoneNumber resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/proxy/v1/model_proxy_v1_service_phone_number_capabilities.go b/twilio/rest/proxy/v1/model_proxy_v1_service_phone_number_capabilities.go new file mode 100644 index 000000000..666f614d5 --- /dev/null +++ b/twilio/rest/proxy/v1/model_proxy_v1_service_phone_number_capabilities.go @@ -0,0 +1,20 @@ +/* + * Twilio - Proxy + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +// ProxyV1ServicePhoneNumberCapabilities The capabilities of the phone number +type ProxyV1ServicePhoneNumberCapabilities struct { + Fax bool `json:"Fax,omitempty"` + Mms bool `json:"Mms,omitempty"` + Sms bool `json:"Sms,omitempty"` + Voice bool `json:"Voice,omitempty"` +} diff --git a/twilio/rest/proxy/v1/model_proxy_v1_service_session.go b/twilio/rest/proxy/v1/model_proxy_v1_service_session.go index 3f424f449..e4c6c3a09 100644 --- a/twilio/rest/proxy/v1/model_proxy_v1_service_session.go +++ b/twilio/rest/proxy/v1/model_proxy_v1_service_session.go @@ -17,20 +17,36 @@ import ( // ProxyV1ServiceSession struct for ProxyV1ServiceSession type ProxyV1ServiceSession struct { - AccountSid *string `json:"AccountSid,omitempty"` - ClosedReason *string `json:"ClosedReason,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateEnded *time.Time `json:"DateEnded,omitempty"` - DateExpiry *time.Time `json:"DateExpiry,omitempty"` - DateLastInteraction *time.Time `json:"DateLastInteraction,omitempty"` - DateStarted *time.Time `json:"DateStarted,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - Mode *SessionMode `json:"Mode,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Status *SessionStatus `json:"Status,omitempty"` - Ttl *int32 `json:"Ttl,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The reason the Session ended + ClosedReason *string `json:"ClosedReason,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date when the Session ended + DateEnded *time.Time `json:"DateEnded,omitempty"` + // The ISO 8601 date when the Session should expire + DateExpiry *time.Time `json:"DateExpiry,omitempty"` + // The ISO 8601 date when the Session last had an interaction + DateLastInteraction *time.Time `json:"DateLastInteraction,omitempty"` + // The ISO 8601 date when the Session started + DateStarted *time.Time `json:"DateStarted,omitempty"` + // The ISO 8601 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The URLs of resources related to the Session + Links *map[string]interface{} `json:"Links,omitempty"` + // The Mode of the Session + Mode *string `json:"Mode,omitempty"` + // The SID of the resource's parent Service + ServiceSid *string `json:"ServiceSid,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The status of the Session + Status *string `json:"Status,omitempty"` + // When the session will expire + Ttl *int32 `json:"Ttl,omitempty"` + // An application-defined string that uniquely identifies the resource + UniqueName *string `json:"UniqueName,omitempty"` + // The absolute URL of the Session resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/proxy/v1/model_proxy_v1_service_session_interaction.go b/twilio/rest/proxy/v1/model_proxy_v1_service_session_interaction.go index f751c8d45..23b30e212 100644 --- a/twilio/rest/proxy/v1/model_proxy_v1_service_session_interaction.go +++ b/twilio/rest/proxy/v1/model_proxy_v1_service_session_interaction.go @@ -17,23 +17,42 @@ import ( // ProxyV1ServiceSessionInteraction struct for ProxyV1ServiceSessionInteraction type ProxyV1ServiceSessionInteraction struct { - AccountSid *string `json:"AccountSid,omitempty"` - Data *string `json:"Data,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - InboundParticipantSid *string `json:"InboundParticipantSid,omitempty"` - InboundResourceSid *string `json:"InboundResourceSid,omitempty"` - InboundResourceStatus *InteractionResourceStatus `json:"InboundResourceStatus,omitempty"` - InboundResourceType *string `json:"InboundResourceType,omitempty"` - InboundResourceUrl *string `json:"InboundResourceUrl,omitempty"` - OutboundParticipantSid *string `json:"OutboundParticipantSid,omitempty"` - OutboundResourceSid *string `json:"OutboundResourceSid,omitempty"` - OutboundResourceStatus *InteractionResourceStatus `json:"OutboundResourceStatus,omitempty"` - OutboundResourceType *string `json:"OutboundResourceType,omitempty"` - OutboundResourceUrl *string `json:"OutboundResourceUrl,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - SessionSid *string `json:"SessionSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Type *InteractionType `json:"Type,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // A JSON string that includes the message body of message interactions + Data *string `json:"Data,omitempty"` + // The ISO 8601 date and time in GMT when the Interaction was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The SID of the inbound Participant resource + InboundParticipantSid *string `json:"InboundParticipantSid,omitempty"` + // The SID of the inbound resource + InboundResourceSid *string `json:"InboundResourceSid,omitempty"` + // The inbound resource status of the Interaction + InboundResourceStatus *string `json:"InboundResourceStatus,omitempty"` + // The inbound resource type + InboundResourceType *string `json:"InboundResourceType,omitempty"` + // The URL of the Twilio inbound resource + InboundResourceUrl *string `json:"InboundResourceUrl,omitempty"` + // The SID of the outbound Participant + OutboundParticipantSid *string `json:"OutboundParticipantSid,omitempty"` + // The SID of the outbound resource + OutboundResourceSid *string `json:"OutboundResourceSid,omitempty"` + // The outbound resource status of the Interaction + OutboundResourceStatus *string `json:"OutboundResourceStatus,omitempty"` + // The outbound resource type + OutboundResourceType *string `json:"OutboundResourceType,omitempty"` + // The URL of the Twilio outbound resource + OutboundResourceUrl *string `json:"OutboundResourceUrl,omitempty"` + // The SID of the resource's parent Service + ServiceSid *string `json:"ServiceSid,omitempty"` + // The SID of the resource's parent Session + SessionSid *string `json:"SessionSid,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The Type of the Interaction + Type *string `json:"Type,omitempty"` + // The absolute URL of the Interaction resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/proxy/v1/model_proxy_v1_service_session_participant.go b/twilio/rest/proxy/v1/model_proxy_v1_service_session_participant.go index 050925c3e..01862d695 100644 --- a/twilio/rest/proxy/v1/model_proxy_v1_service_session_participant.go +++ b/twilio/rest/proxy/v1/model_proxy_v1_service_session_participant.go @@ -17,17 +17,30 @@ import ( // ProxyV1ServiceSessionParticipant struct for ProxyV1ServiceSessionParticipant type ProxyV1ServiceSessionParticipant struct { - AccountSid *string `json:"AccountSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateDeleted *time.Time `json:"DateDeleted,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Identifier *string `json:"Identifier,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - ProxyIdentifier *string `json:"ProxyIdentifier,omitempty"` - ProxyIdentifierSid *string `json:"ProxyIdentifierSid,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - SessionSid *string `json:"SessionSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date the Participant was removed + DateDeleted *time.Time `json:"DateDeleted,omitempty"` + // The ISO 8601 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The string that you assigned to describe the participant + FriendlyName *string `json:"FriendlyName,omitempty"` + // The phone number of the Participant + Identifier *string `json:"Identifier,omitempty"` + // The URLs to resources related the participant + Links *map[string]interface{} `json:"Links,omitempty"` + // The phone number or short code of the participant's partner + ProxyIdentifier *string `json:"ProxyIdentifier,omitempty"` + // The SID of the Proxy Identifier assigned to the Participant + ProxyIdentifierSid *string `json:"ProxyIdentifierSid,omitempty"` + // The SID of the resource's parent Service + ServiceSid *string `json:"ServiceSid,omitempty"` + // The SID of the resource's parent Session + SessionSid *string `json:"SessionSid,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The absolute URL of the Participant resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/proxy/v1/model_proxy_v1_service_session_participant_message_interaction.go b/twilio/rest/proxy/v1/model_proxy_v1_service_session_participant_message_interaction.go index 1206e102e..fee12332b 100644 --- a/twilio/rest/proxy/v1/model_proxy_v1_service_session_participant_message_interaction.go +++ b/twilio/rest/proxy/v1/model_proxy_v1_service_session_participant_message_interaction.go @@ -17,24 +17,44 @@ import ( // ProxyV1ServiceSessionParticipantMessageInteraction struct for ProxyV1ServiceSessionParticipantMessageInteraction type ProxyV1ServiceSessionParticipantMessageInteraction struct { - AccountSid *string `json:"AccountSid,omitempty"` - Data *string `json:"Data,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - InboundParticipantSid *string `json:"InboundParticipantSid,omitempty"` - InboundResourceSid *string `json:"InboundResourceSid,omitempty"` - InboundResourceStatus *MessageInteractionResourceStatus `json:"InboundResourceStatus,omitempty"` - InboundResourceType *string `json:"InboundResourceType,omitempty"` - InboundResourceUrl *string `json:"InboundResourceUrl,omitempty"` - OutboundParticipantSid *string `json:"OutboundParticipantSid,omitempty"` - OutboundResourceSid *string `json:"OutboundResourceSid,omitempty"` - OutboundResourceStatus *MessageInteractionResourceStatus `json:"OutboundResourceStatus,omitempty"` - OutboundResourceType *string `json:"OutboundResourceType,omitempty"` - OutboundResourceUrl *string `json:"OutboundResourceUrl,omitempty"` - ParticipantSid *string `json:"ParticipantSid,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - SessionSid *string `json:"SessionSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Type *MessageInteractionType `json:"Type,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // A JSON string that includes the message body sent to the participant + Data *string `json:"Data,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // Always empty for Message Interactions + InboundParticipantSid *string `json:"InboundParticipantSid,omitempty"` + // Always empty for Message Interactions + InboundResourceSid *string `json:"InboundResourceSid,omitempty"` + // Always empty for Message Interactions + InboundResourceStatus *string `json:"InboundResourceStatus,omitempty"` + // Always empty for Message Interactions + InboundResourceType *string `json:"InboundResourceType,omitempty"` + // Always empty for Message Interactions + InboundResourceUrl *string `json:"InboundResourceUrl,omitempty"` + // The SID of the outbound Participant resource + OutboundParticipantSid *string `json:"OutboundParticipantSid,omitempty"` + // The SID of the outbound Message resource + OutboundResourceSid *string `json:"OutboundResourceSid,omitempty"` + // The outbound resource status + OutboundResourceStatus *string `json:"OutboundResourceStatus,omitempty"` + // The outbound resource type + OutboundResourceType *string `json:"OutboundResourceType,omitempty"` + // The URL of the Twilio message resource + OutboundResourceUrl *string `json:"OutboundResourceUrl,omitempty"` + // The SID of the Participant resource + ParticipantSid *string `json:"ParticipantSid,omitempty"` + // The SID of the resource's parent Service + ServiceSid *string `json:"ServiceSid,omitempty"` + // The SID of the resource's parent Session + SessionSid *string `json:"SessionSid,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The Type of Message Interaction + Type *string `json:"Type,omitempty"` + // The absolute URL of the MessageInteraction resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/proxy/v1/model_proxy_v1_service_short_code.go b/twilio/rest/proxy/v1/model_proxy_v1_service_short_code.go index b3d424c3d..e2a78f985 100644 --- a/twilio/rest/proxy/v1/model_proxy_v1_service_short_code.go +++ b/twilio/rest/proxy/v1/model_proxy_v1_service_short_code.go @@ -17,14 +17,23 @@ import ( // ProxyV1ServiceShortCode struct for ProxyV1ServiceShortCode type ProxyV1ServiceShortCode struct { - AccountSid *string `json:"AccountSid,omitempty"` - Capabilities *PhoneNumberCapabilities `json:"Capabilities,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - IsReserved *bool `json:"IsReserved,omitempty"` - IsoCountry *string `json:"IsoCountry,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - ShortCode *string `json:"ShortCode,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + Capabilities *ProxyV1ServiceShortCodeCapabilities `json:"Capabilities,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // Whether the short code should be reserved for manual assignment to participants only + IsReserved *bool `json:"IsReserved,omitempty"` + // The ISO Country Code + IsoCountry *string `json:"IsoCountry,omitempty"` + // The SID of the resource's parent Service + ServiceSid *string `json:"ServiceSid,omitempty"` + // The short code's number + ShortCode *string `json:"ShortCode,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The absolute URL of the ShortCode resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/proxy/v1/model_proxy_v1_service_short_code_capabilities.go b/twilio/rest/proxy/v1/model_proxy_v1_service_short_code_capabilities.go new file mode 100644 index 000000000..8a43f4e2d --- /dev/null +++ b/twilio/rest/proxy/v1/model_proxy_v1_service_short_code_capabilities.go @@ -0,0 +1,20 @@ +/* + * Twilio - Proxy + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +// ProxyV1ServiceShortCodeCapabilities The capabilities of the short code +type ProxyV1ServiceShortCodeCapabilities struct { + Fax bool `json:"Fax,omitempty"` + Mms bool `json:"Mms,omitempty"` + Sms bool `json:"Sms,omitempty"` + Voice bool `json:"Voice,omitempty"` +} diff --git a/twilio/rest/serverless/v1/README.md b/twilio/rest/serverless/v1/README.md index d85bc9b6f..e558a8b1e 100644 --- a/twilio/rest/serverless/v1/README.md +++ b/twilio/rest/serverless/v1/README.md @@ -74,11 +74,6 @@ Class | Method | HTTP request | Description ## Documentation For Models - - [AssetVersionVisibility](docs/AssetVersionVisibility.md) - - [BuildRuntime](docs/BuildRuntime.md) - - [BuildStatus](docs/BuildStatus.md) - - [BuildStatusStatus](docs/BuildStatusStatus.md) - - [FunctionVersionVisibility](docs/FunctionVersionVisibility.md) - [ListAssetResponse](docs/ListAssetResponse.md) - [ListAssetVersionResponse](docs/ListAssetVersionResponse.md) - [ListBuildResponse](docs/ListBuildResponse.md) @@ -90,7 +85,6 @@ Class | Method | HTTP request | Description - [ListServiceResponse](docs/ListServiceResponse.md) - [ListServiceResponseMeta](docs/ListServiceResponseMeta.md) - [ListVariableResponse](docs/ListVariableResponse.md) - - [LogLevel](docs/LogLevel.md) - [ServerlessV1Service](docs/ServerlessV1Service.md) - [ServerlessV1ServiceAsset](docs/ServerlessV1ServiceAsset.md) - [ServerlessV1ServiceAssetAssetVersion](docs/ServerlessV1ServiceAssetAssetVersion.md) diff --git a/twilio/rest/serverless/v1/docs/ListAssetResponse.md b/twilio/rest/serverless/v1/docs/ListAssetResponse.md index 67c1cd213..83964da23 100644 --- a/twilio/rest/serverless/v1/docs/ListAssetResponse.md +++ b/twilio/rest/serverless/v1/docs/ListAssetResponse.md @@ -1,10 +1,10 @@ # ListAssetResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Assets** | [**[]ServerlessV1ServiceAsset**](serverless.v1.service.asset.md) | [optional] -**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Assets** | [**[]ServerlessV1ServiceAsset**](serverless.v1.service.asset.md) | |[optional] +**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/serverless/v1/docs/ListAssetVersionResponse.md b/twilio/rest/serverless/v1/docs/ListAssetVersionResponse.md index 627773a27..4a95d5a68 100644 --- a/twilio/rest/serverless/v1/docs/ListAssetVersionResponse.md +++ b/twilio/rest/serverless/v1/docs/ListAssetVersionResponse.md @@ -1,10 +1,10 @@ # ListAssetVersionResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AssetVersions** | [**[]ServerlessV1ServiceAssetAssetVersion**](serverless.v1.service.asset.asset_version.md) | [optional] -**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AssetVersions** | [**[]ServerlessV1ServiceAssetAssetVersion**](serverless.v1.service.asset.asset_version.md) | |[optional] +**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/serverless/v1/docs/ListBuildResponse.md b/twilio/rest/serverless/v1/docs/ListBuildResponse.md index 28cbbbec7..7452d468a 100644 --- a/twilio/rest/serverless/v1/docs/ListBuildResponse.md +++ b/twilio/rest/serverless/v1/docs/ListBuildResponse.md @@ -1,10 +1,10 @@ # ListBuildResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Builds** | [**[]ServerlessV1ServiceBuild**](serverless.v1.service.build.md) | [optional] -**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Builds** | [**[]ServerlessV1ServiceBuild**](serverless.v1.service.build.md) | |[optional] +**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/serverless/v1/docs/ListDeploymentResponse.md b/twilio/rest/serverless/v1/docs/ListDeploymentResponse.md index 0064605e9..198c607ba 100644 --- a/twilio/rest/serverless/v1/docs/ListDeploymentResponse.md +++ b/twilio/rest/serverless/v1/docs/ListDeploymentResponse.md @@ -1,10 +1,10 @@ # ListDeploymentResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Deployments** | [**[]ServerlessV1ServiceEnvironmentDeployment**](serverless.v1.service.environment.deployment.md) | [optional] -**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Deployments** | [**[]ServerlessV1ServiceEnvironmentDeployment**](serverless.v1.service.environment.deployment.md) | |[optional] +**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/serverless/v1/docs/ListEnvironmentResponse.md b/twilio/rest/serverless/v1/docs/ListEnvironmentResponse.md index 5811bd0ea..6d4cc7c10 100644 --- a/twilio/rest/serverless/v1/docs/ListEnvironmentResponse.md +++ b/twilio/rest/serverless/v1/docs/ListEnvironmentResponse.md @@ -1,10 +1,10 @@ # ListEnvironmentResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Environments** | [**[]ServerlessV1ServiceEnvironment**](serverless.v1.service.environment.md) | [optional] -**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Environments** | [**[]ServerlessV1ServiceEnvironment**](serverless.v1.service.environment.md) | |[optional] +**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/serverless/v1/docs/ListFunctionResponse.md b/twilio/rest/serverless/v1/docs/ListFunctionResponse.md index b239300c8..678a8100b 100644 --- a/twilio/rest/serverless/v1/docs/ListFunctionResponse.md +++ b/twilio/rest/serverless/v1/docs/ListFunctionResponse.md @@ -1,10 +1,10 @@ # ListFunctionResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Functions** | [**[]ServerlessV1ServiceFunction**](serverless.v1.service.function.md) | [optional] -**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Functions** | [**[]ServerlessV1ServiceFunction**](serverless.v1.service.function.md) | |[optional] +**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/serverless/v1/docs/ListFunctionVersionResponse.md b/twilio/rest/serverless/v1/docs/ListFunctionVersionResponse.md index 735ec75d1..ca995e7c1 100644 --- a/twilio/rest/serverless/v1/docs/ListFunctionVersionResponse.md +++ b/twilio/rest/serverless/v1/docs/ListFunctionVersionResponse.md @@ -1,10 +1,10 @@ # ListFunctionVersionResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**FunctionVersions** | [**[]ServerlessV1ServiceFunctionFunctionVersion**](serverless.v1.service.function.function_version.md) | [optional] -**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FunctionVersions** | [**[]ServerlessV1ServiceFunctionFunctionVersion**](serverless.v1.service.function.function_version.md) | |[optional] +**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/serverless/v1/docs/ListLogResponse.md b/twilio/rest/serverless/v1/docs/ListLogResponse.md index ed2d4ecfc..5556deae0 100644 --- a/twilio/rest/serverless/v1/docs/ListLogResponse.md +++ b/twilio/rest/serverless/v1/docs/ListLogResponse.md @@ -1,10 +1,10 @@ # ListLogResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Logs** | [**[]ServerlessV1ServiceEnvironmentLog**](serverless.v1.service.environment.log.md) | [optional] -**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Logs** | [**[]ServerlessV1ServiceEnvironmentLog**](serverless.v1.service.environment.log.md) | |[optional] +**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/serverless/v1/docs/ListServiceResponse.md b/twilio/rest/serverless/v1/docs/ListServiceResponse.md index 60638431f..45b89fba1 100644 --- a/twilio/rest/serverless/v1/docs/ListServiceResponse.md +++ b/twilio/rest/serverless/v1/docs/ListServiceResponse.md @@ -1,10 +1,10 @@ # ListServiceResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | [optional] -**Services** | [**[]ServerlessV1Service**](serverless.v1.service.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | |[optional] +**Services** | [**[]ServerlessV1Service**](serverless.v1.service.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/serverless/v1/docs/ListServiceResponseMeta.md b/twilio/rest/serverless/v1/docs/ListServiceResponseMeta.md index ce4085ffe..6628758e1 100644 --- a/twilio/rest/serverless/v1/docs/ListServiceResponseMeta.md +++ b/twilio/rest/serverless/v1/docs/ListServiceResponseMeta.md @@ -1,15 +1,15 @@ # ListServiceResponseMeta ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**FirstPageUrl** | **string** | [optional] -**Key** | **string** | [optional] -**NextPageUrl** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUrl** | **string** | [optional] -**Url** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstPageUrl** | **string** | |[optional] +**Key** | **string** | |[optional] +**NextPageUrl** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUrl** | **string** | |[optional] +**Url** | **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/twilio/rest/serverless/v1/docs/ListVariableResponse.md b/twilio/rest/serverless/v1/docs/ListVariableResponse.md index 8c955b675..210edc6bf 100644 --- a/twilio/rest/serverless/v1/docs/ListVariableResponse.md +++ b/twilio/rest/serverless/v1/docs/ListVariableResponse.md @@ -1,10 +1,10 @@ # ListVariableResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | [optional] -**Variables** | [**[]ServerlessV1ServiceEnvironmentVariable**](serverless.v1.service.environment.variable.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | |[optional] +**Variables** | [**[]ServerlessV1ServiceEnvironmentVariable**](serverless.v1.service.environment.variable.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/serverless/v1/docs/ServerlessV1Service.md b/twilio/rest/serverless/v1/docs/ServerlessV1Service.md index 184221a93..a5473055e 100644 --- a/twilio/rest/serverless/v1/docs/ServerlessV1Service.md +++ b/twilio/rest/serverless/v1/docs/ServerlessV1Service.md @@ -1,18 +1,18 @@ # ServerlessV1Service ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**FriendlyName** | Pointer to **string** | -**IncludeCredentials** | Pointer to **bool** | -**Links** | Pointer to **map[string]interface{}** | -**Sid** | Pointer to **string** | -**UiEditable** | Pointer to **bool** | -**UniqueName** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the Service resource | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the Service resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the Service resource was last updated | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the Service resource | +**IncludeCredentials** | Pointer to **bool** | Whether to inject Account credentials into a function invocation context | +**Links** | Pointer to **map[string]interface{}** | The URLs of the Service's nested resources | +**Sid** | Pointer to **string** | The unique string that identifies the Service resource | +**UiEditable** | Pointer to **bool** | Whether the Service resource's properties and subresources can be edited via the UI | +**UniqueName** | Pointer to **string** | A user-defined string that uniquely identifies the Service resource | +**Url** | Pointer to **string** | The absolute URL of the Service resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/serverless/v1/docs/ServerlessV1ServiceAsset.md b/twilio/rest/serverless/v1/docs/ServerlessV1ServiceAsset.md index 2882a89ae..4481ae6e6 100644 --- a/twilio/rest/serverless/v1/docs/ServerlessV1ServiceAsset.md +++ b/twilio/rest/serverless/v1/docs/ServerlessV1ServiceAsset.md @@ -1,16 +1,16 @@ # ServerlessV1ServiceAsset ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**FriendlyName** | Pointer to **string** | -**Links** | Pointer to **map[string]interface{}** | -**ServiceSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the Asset resource | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the Asset resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the Asset resource was last updated | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the Asset resource | +**Links** | Pointer to **map[string]interface{}** | The URLs of the Asset resource's nested resources | +**ServiceSid** | Pointer to **string** | The SID of the Service that the Asset resource is associated with | +**Sid** | Pointer to **string** | The unique string that identifies the Asset resource | +**Url** | Pointer to **string** | The absolute URL of the Asset resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/serverless/v1/docs/ServerlessV1ServiceAssetAssetVersion.md b/twilio/rest/serverless/v1/docs/ServerlessV1ServiceAssetAssetVersion.md index 0d84e165f..bdb831e1f 100644 --- a/twilio/rest/serverless/v1/docs/ServerlessV1ServiceAssetAssetVersion.md +++ b/twilio/rest/serverless/v1/docs/ServerlessV1ServiceAssetAssetVersion.md @@ -1,16 +1,16 @@ # ServerlessV1ServiceAssetAssetVersion ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**AssetSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**Path** | Pointer to **string** | -**ServiceSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Url** | Pointer to **string** | -**Visibility** | Pointer to [**AssetVersionVisibility**](asset_version_visibility.md) | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the Asset Version resource | +**AssetSid** | Pointer to **string** | The SID of the Asset resource that is the parent of the Asset Version | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the Asset Version resource was created | +**Path** | Pointer to **string** | The URL-friendly string by which the Asset Version can be referenced | +**ServiceSid** | Pointer to **string** | The SID of the Service that the Asset Version resource is associated with | +**Sid** | Pointer to **string** | The unique string that identifies the Asset Version resource | +**Url** | Pointer to **string** | The absolute URL of the Asset Version resource | +**Visibility** | Pointer to **string** | The access control that determines how the Asset Version can be accessed | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/serverless/v1/docs/ServerlessV1ServiceBuild.md b/twilio/rest/serverless/v1/docs/ServerlessV1ServiceBuild.md index 17057c57d..a5d799dcd 100644 --- a/twilio/rest/serverless/v1/docs/ServerlessV1ServiceBuild.md +++ b/twilio/rest/serverless/v1/docs/ServerlessV1ServiceBuild.md @@ -1,20 +1,20 @@ # ServerlessV1ServiceBuild ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**AssetVersions** | Pointer to **[]map[string]interface{}** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**Dependencies** | Pointer to **[]map[string]interface{}** | -**FunctionVersions** | Pointer to **[]map[string]interface{}** | -**Links** | Pointer to **map[string]interface{}** | -**Runtime** | Pointer to [**BuildRuntime**](build_runtime.md) | -**ServiceSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Status** | Pointer to [**BuildStatus**](build_status.md) | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the Build resource | +**AssetVersions** | Pointer to **[]map[string]interface{}** | The list of Asset Version resource SIDs that are included in the Build | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the Build resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the Build resource was last updated | +**Dependencies** | Pointer to **[]map[string]interface{}** | A list of objects that describe the Dependencies included in the Build | +**FunctionVersions** | Pointer to **[]map[string]interface{}** | The list of Function Version resource SIDs that are included in the Build | +**Links** | Pointer to **map[string]interface{}** | | +**Runtime** | Pointer to **string** | The Runtime version that will be used to run the Build. | +**ServiceSid** | Pointer to **string** | The SID of the Service that the Build resource is associated with | +**Sid** | Pointer to **string** | The unique string that identifies the Build resource | +**Status** | Pointer to **string** | The status of the Build | +**Url** | Pointer to **string** | The absolute URL of the Build resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/serverless/v1/docs/ServerlessV1ServiceBuildBuildStatus.md b/twilio/rest/serverless/v1/docs/ServerlessV1ServiceBuildBuildStatus.md index de470df87..d842f2eb1 100644 --- a/twilio/rest/serverless/v1/docs/ServerlessV1ServiceBuildBuildStatus.md +++ b/twilio/rest/serverless/v1/docs/ServerlessV1ServiceBuildBuildStatus.md @@ -1,13 +1,13 @@ # ServerlessV1ServiceBuildBuildStatus ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**ServiceSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Status** | Pointer to [**BuildStatusStatus**](build_status_status.md) | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the Build resource | +**ServiceSid** | Pointer to **string** | The SID of the Service that the Build resource is associated with | +**Sid** | Pointer to **string** | The unique string that identifies the Build resource | +**Status** | Pointer to **string** | The status of the Build | +**Url** | Pointer to **string** | The absolute URL of the Build Status resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/serverless/v1/docs/ServerlessV1ServiceEnvironment.md b/twilio/rest/serverless/v1/docs/ServerlessV1ServiceEnvironment.md index 6900de1ef..def6975c3 100644 --- a/twilio/rest/serverless/v1/docs/ServerlessV1ServiceEnvironment.md +++ b/twilio/rest/serverless/v1/docs/ServerlessV1ServiceEnvironment.md @@ -1,19 +1,19 @@ # ServerlessV1ServiceEnvironment ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**BuildSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**DomainName** | Pointer to **string** | -**DomainSuffix** | Pointer to **string** | -**Links** | Pointer to **map[string]interface{}** | -**ServiceSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**UniqueName** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the Environment resource | +**BuildSid** | Pointer to **string** | The SID of the build deployed in the environment | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the Environment resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the Environment resource was last updated | +**DomainName** | Pointer to **string** | The base domain name for all Functions and Assets deployed in the Environment | +**DomainSuffix** | Pointer to **string** | A URL-friendly name that represents the environment | +**Links** | Pointer to **map[string]interface{}** | The URLs of the Environment resource's nested resources | +**ServiceSid** | Pointer to **string** | The SID of the Service that the Environment resource is associated with | +**Sid** | Pointer to **string** | The unique string that identifies the Environment resource | +**UniqueName** | Pointer to **string** | A user-defined string that uniquely identifies the Environment resource | +**Url** | Pointer to **string** | The absolute URL of the Environment resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/serverless/v1/docs/ServerlessV1ServiceEnvironmentDeployment.md b/twilio/rest/serverless/v1/docs/ServerlessV1ServiceEnvironmentDeployment.md index 7b28b5f20..46d0d8b7f 100644 --- a/twilio/rest/serverless/v1/docs/ServerlessV1ServiceEnvironmentDeployment.md +++ b/twilio/rest/serverless/v1/docs/ServerlessV1ServiceEnvironmentDeployment.md @@ -1,16 +1,16 @@ # ServerlessV1ServiceEnvironmentDeployment ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**BuildSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**EnvironmentSid** | Pointer to **string** | -**ServiceSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the Deployment resource | +**BuildSid** | Pointer to **string** | The SID of the Build for the deployment | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the Deployment resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the Deployment resource was last updated | +**EnvironmentSid** | Pointer to **string** | The SID of the Environment for the Deployment | +**ServiceSid** | Pointer to **string** | The SID of the Service that the Deployment resource is associated with | +**Sid** | Pointer to **string** | The unique string that identifies the Deployment resource | +**Url** | Pointer to **string** | The absolute URL of the Deployment resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/serverless/v1/docs/ServerlessV1ServiceEnvironmentLog.md b/twilio/rest/serverless/v1/docs/ServerlessV1ServiceEnvironmentLog.md index de64ef1ea..9c490226a 100644 --- a/twilio/rest/serverless/v1/docs/ServerlessV1ServiceEnvironmentLog.md +++ b/twilio/rest/serverless/v1/docs/ServerlessV1ServiceEnvironmentLog.md @@ -1,20 +1,20 @@ # ServerlessV1ServiceEnvironmentLog ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**BuildSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DeploymentSid** | Pointer to **string** | -**EnvironmentSid** | Pointer to **string** | -**FunctionSid** | Pointer to **string** | -**Level** | Pointer to [**LogLevel**](log_level.md) | -**Message** | Pointer to **string** | -**RequestSid** | Pointer to **string** | -**ServiceSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the Log resource | +**BuildSid** | Pointer to **string** | The SID of the build that corresponds to the log | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the Log resource was created | +**DeploymentSid** | Pointer to **string** | The SID of the deployment that corresponds to the log | +**EnvironmentSid** | Pointer to **string** | The SID of the environment in which the log occurred | +**FunctionSid** | Pointer to **string** | The SID of the function whose invocation produced the log | +**Level** | Pointer to **string** | The log level | +**Message** | Pointer to **string** | The log message | +**RequestSid** | Pointer to **string** | The SID of the request associated with the log | +**ServiceSid** | Pointer to **string** | The SID of the Service that the Log resource is associated with | +**Sid** | Pointer to **string** | The unique string that identifies the Log resource | +**Url** | Pointer to **string** | The absolute URL of the Log resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/serverless/v1/docs/ServerlessV1ServiceEnvironmentVariable.md b/twilio/rest/serverless/v1/docs/ServerlessV1ServiceEnvironmentVariable.md index e7b8aa759..30e26a667 100644 --- a/twilio/rest/serverless/v1/docs/ServerlessV1ServiceEnvironmentVariable.md +++ b/twilio/rest/serverless/v1/docs/ServerlessV1ServiceEnvironmentVariable.md @@ -1,17 +1,17 @@ # ServerlessV1ServiceEnvironmentVariable ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**EnvironmentSid** | Pointer to **string** | -**Key** | Pointer to **string** | -**ServiceSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Url** | Pointer to **string** | -**Value** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the Variable resource | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the Variable resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the Variable resource was last updated | +**EnvironmentSid** | Pointer to **string** | The SID of the Environment in which the Variable exists | +**Key** | Pointer to **string** | A string by which the Variable resource can be referenced | +**ServiceSid** | Pointer to **string** | The SID of the Service that the Variable resource is associated with | +**Sid** | Pointer to **string** | The unique string that identifies the Variable resource | +**Url** | Pointer to **string** | The absolute URL of the Variable resource | +**Value** | Pointer to **string** | A string that contains the actual value of the Variable | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/serverless/v1/docs/ServerlessV1ServiceFunction.md b/twilio/rest/serverless/v1/docs/ServerlessV1ServiceFunction.md index 96c4ed8d1..a6c22c778 100644 --- a/twilio/rest/serverless/v1/docs/ServerlessV1ServiceFunction.md +++ b/twilio/rest/serverless/v1/docs/ServerlessV1ServiceFunction.md @@ -1,16 +1,16 @@ # ServerlessV1ServiceFunction ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**FriendlyName** | Pointer to **string** | -**Links** | Pointer to **map[string]interface{}** | -**ServiceSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the Function resource | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the Function resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the Function resource was last updated | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the Function resource | +**Links** | Pointer to **map[string]interface{}** | The URLs of nested resources of the Function resource | +**ServiceSid** | Pointer to **string** | The SID of the Service that the Function resource is associated with | +**Sid** | Pointer to **string** | The unique string that identifies the Function resource | +**Url** | Pointer to **string** | The absolute URL of the Function resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/serverless/v1/docs/ServerlessV1ServiceFunctionFunctionVersion.md b/twilio/rest/serverless/v1/docs/ServerlessV1ServiceFunctionFunctionVersion.md index d296641e2..0551404ba 100644 --- a/twilio/rest/serverless/v1/docs/ServerlessV1ServiceFunctionFunctionVersion.md +++ b/twilio/rest/serverless/v1/docs/ServerlessV1ServiceFunctionFunctionVersion.md @@ -1,17 +1,17 @@ # ServerlessV1ServiceFunctionFunctionVersion ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**FunctionSid** | Pointer to **string** | -**Links** | Pointer to **map[string]interface{}** | -**Path** | Pointer to **string** | -**ServiceSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Url** | Pointer to **string** | -**Visibility** | Pointer to [**FunctionVersionVisibility**](function_version_visibility.md) | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the Function Version resource | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the Function Version resource was created | +**FunctionSid** | Pointer to **string** | The SID of the Function resource that is the parent of the Function Version resource | +**Links** | Pointer to **map[string]interface{}** | | +**Path** | Pointer to **string** | The URL-friendly string by which the Function Version resource can be referenced | +**ServiceSid** | Pointer to **string** | The SID of the Service that the Function Version resource is associated with | +**Sid** | Pointer to **string** | The unique string that identifies the Function Version resource | +**Url** | Pointer to **string** | The absolute URL of the Function Version resource | +**Visibility** | Pointer to **string** | The access control that determines how the Function Version resource can be accessed | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/serverless/v1/docs/ServerlessV1ServiceFunctionFunctionVersionFunctionVersionContent.md b/twilio/rest/serverless/v1/docs/ServerlessV1ServiceFunctionFunctionVersionFunctionVersionContent.md index d9862435c..32a3d9bf4 100644 --- a/twilio/rest/serverless/v1/docs/ServerlessV1ServiceFunctionFunctionVersionFunctionVersionContent.md +++ b/twilio/rest/serverless/v1/docs/ServerlessV1ServiceFunctionFunctionVersionFunctionVersionContent.md @@ -1,14 +1,14 @@ # ServerlessV1ServiceFunctionFunctionVersionFunctionVersionContent ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Content** | Pointer to **string** | -**FunctionSid** | Pointer to **string** | -**ServiceSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the Function Version resource | +**Content** | Pointer to **string** | The content of the Function Version resource | +**FunctionSid** | Pointer to **string** | The SID of the Function that is the parent of the Function Version | +**ServiceSid** | Pointer to **string** | The SID of the Service that the Function Version resource is associated with | +**Sid** | Pointer to **string** | The unique string that identifies the Function Version resource | +**Url** | Pointer to **string** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/serverless/v1/model_serverless_v1_service.go b/twilio/rest/serverless/v1/model_serverless_v1_service.go index f2797ee1b..f0cdf88d7 100644 --- a/twilio/rest/serverless/v1/model_serverless_v1_service.go +++ b/twilio/rest/serverless/v1/model_serverless_v1_service.go @@ -17,14 +17,24 @@ import ( // ServerlessV1Service struct for ServerlessV1Service type ServerlessV1Service struct { - AccountSid *string `json:"AccountSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - IncludeCredentials *bool `json:"IncludeCredentials,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - Sid *string `json:"Sid,omitempty"` - UiEditable *bool `json:"UiEditable,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the Service resource + AccountSid *string `json:"AccountSid,omitempty"` + // The ISO 8601 date and time in GMT when the Service resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the Service resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The string that you assigned to describe the Service resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // Whether to inject Account credentials into a function invocation context + IncludeCredentials *bool `json:"IncludeCredentials,omitempty"` + // The URLs of the Service's nested resources + Links *map[string]interface{} `json:"Links,omitempty"` + // The unique string that identifies the Service resource + Sid *string `json:"Sid,omitempty"` + // Whether the Service resource's properties and subresources can be edited via the UI + UiEditable *bool `json:"UiEditable,omitempty"` + // A user-defined string that uniquely identifies the Service resource + UniqueName *string `json:"UniqueName,omitempty"` + // The absolute URL of the Service resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/serverless/v1/model_serverless_v1_service_asset.go b/twilio/rest/serverless/v1/model_serverless_v1_service_asset.go index 20318153a..f4c4fe47d 100644 --- a/twilio/rest/serverless/v1/model_serverless_v1_service_asset.go +++ b/twilio/rest/serverless/v1/model_serverless_v1_service_asset.go @@ -17,12 +17,20 @@ import ( // ServerlessV1ServiceAsset struct for ServerlessV1ServiceAsset type ServerlessV1ServiceAsset struct { - AccountSid *string `json:"AccountSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the Asset resource + AccountSid *string `json:"AccountSid,omitempty"` + // The ISO 8601 date and time in GMT when the Asset resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the Asset resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The string that you assigned to describe the Asset resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // The URLs of the Asset resource's nested resources + Links *map[string]interface{} `json:"Links,omitempty"` + // The SID of the Service that the Asset resource is associated with + ServiceSid *string `json:"ServiceSid,omitempty"` + // The unique string that identifies the Asset resource + Sid *string `json:"Sid,omitempty"` + // The absolute URL of the Asset resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/serverless/v1/model_serverless_v1_service_asset_asset_version.go b/twilio/rest/serverless/v1/model_serverless_v1_service_asset_asset_version.go index 873c4e82e..426d20729 100644 --- a/twilio/rest/serverless/v1/model_serverless_v1_service_asset_asset_version.go +++ b/twilio/rest/serverless/v1/model_serverless_v1_service_asset_asset_version.go @@ -17,12 +17,20 @@ import ( // ServerlessV1ServiceAssetAssetVersion struct for ServerlessV1ServiceAssetAssetVersion type ServerlessV1ServiceAssetAssetVersion struct { - AccountSid *string `json:"AccountSid,omitempty"` - AssetSid *string `json:"AssetSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - Path *string `json:"Path,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` - Visibility *AssetVersionVisibility `json:"Visibility,omitempty"` + // The SID of the Account that created the Asset Version resource + AccountSid *string `json:"AccountSid,omitempty"` + // The SID of the Asset resource that is the parent of the Asset Version + AssetSid *string `json:"AssetSid,omitempty"` + // The ISO 8601 date and time in GMT when the Asset Version resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The URL-friendly string by which the Asset Version can be referenced + Path *string `json:"Path,omitempty"` + // The SID of the Service that the Asset Version resource is associated with + ServiceSid *string `json:"ServiceSid,omitempty"` + // The unique string that identifies the Asset Version resource + Sid *string `json:"Sid,omitempty"` + // The absolute URL of the Asset Version resource + Url *string `json:"Url,omitempty"` + // The access control that determines how the Asset Version can be accessed + Visibility *string `json:"Visibility,omitempty"` } diff --git a/twilio/rest/serverless/v1/model_serverless_v1_service_build.go b/twilio/rest/serverless/v1/model_serverless_v1_service_build.go index 0bb1e2f00..4d0e5569f 100644 --- a/twilio/rest/serverless/v1/model_serverless_v1_service_build.go +++ b/twilio/rest/serverless/v1/model_serverless_v1_service_build.go @@ -17,16 +17,27 @@ import ( // ServerlessV1ServiceBuild struct for ServerlessV1ServiceBuild type ServerlessV1ServiceBuild struct { - AccountSid *string `json:"AccountSid,omitempty"` - AssetVersions *[]map[string]interface{} `json:"AssetVersions,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Dependencies *[]map[string]interface{} `json:"Dependencies,omitempty"` + // The SID of the Account that created the Build resource + AccountSid *string `json:"AccountSid,omitempty"` + // The list of Asset Version resource SIDs that are included in the Build + AssetVersions *[]map[string]interface{} `json:"AssetVersions,omitempty"` + // The ISO 8601 date and time in GMT when the Build resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the Build resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // A list of objects that describe the Dependencies included in the Build + Dependencies *[]map[string]interface{} `json:"Dependencies,omitempty"` + // The list of Function Version resource SIDs that are included in the Build FunctionVersions *[]map[string]interface{} `json:"FunctionVersions,omitempty"` Links *map[string]interface{} `json:"Links,omitempty"` - Runtime *BuildRuntime `json:"Runtime,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Status *BuildStatus `json:"Status,omitempty"` - Url *string `json:"Url,omitempty"` + // The Runtime version that will be used to run the Build. + Runtime *string `json:"Runtime,omitempty"` + // The SID of the Service that the Build resource is associated with + ServiceSid *string `json:"ServiceSid,omitempty"` + // The unique string that identifies the Build resource + Sid *string `json:"Sid,omitempty"` + // The status of the Build + Status *string `json:"Status,omitempty"` + // The absolute URL of the Build resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/serverless/v1/model_serverless_v1_service_build_build_status.go b/twilio/rest/serverless/v1/model_serverless_v1_service_build_build_status.go index 77f67d607..3d44319b2 100644 --- a/twilio/rest/serverless/v1/model_serverless_v1_service_build_build_status.go +++ b/twilio/rest/serverless/v1/model_serverless_v1_service_build_build_status.go @@ -13,9 +13,14 @@ package openapi // ServerlessV1ServiceBuildBuildStatus struct for ServerlessV1ServiceBuildBuildStatus type ServerlessV1ServiceBuildBuildStatus struct { - AccountSid *string `json:"AccountSid,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Status *BuildStatusStatus `json:"Status,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the Build resource + AccountSid *string `json:"AccountSid,omitempty"` + // The SID of the Service that the Build resource is associated with + ServiceSid *string `json:"ServiceSid,omitempty"` + // The unique string that identifies the Build resource + Sid *string `json:"Sid,omitempty"` + // The status of the Build + Status *string `json:"Status,omitempty"` + // The absolute URL of the Build Status resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/serverless/v1/model_serverless_v1_service_environment.go b/twilio/rest/serverless/v1/model_serverless_v1_service_environment.go index d20bd0688..de25f2828 100644 --- a/twilio/rest/serverless/v1/model_serverless_v1_service_environment.go +++ b/twilio/rest/serverless/v1/model_serverless_v1_service_environment.go @@ -17,15 +17,26 @@ import ( // ServerlessV1ServiceEnvironment struct for ServerlessV1ServiceEnvironment type ServerlessV1ServiceEnvironment struct { - AccountSid *string `json:"AccountSid,omitempty"` - BuildSid *string `json:"BuildSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - DomainName *string `json:"DomainName,omitempty"` - DomainSuffix *string `json:"DomainSuffix,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the Environment resource + AccountSid *string `json:"AccountSid,omitempty"` + // The SID of the build deployed in the environment + BuildSid *string `json:"BuildSid,omitempty"` + // The ISO 8601 date and time in GMT when the Environment resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the Environment resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The base domain name for all Functions and Assets deployed in the Environment + DomainName *string `json:"DomainName,omitempty"` + // A URL-friendly name that represents the environment + DomainSuffix *string `json:"DomainSuffix,omitempty"` + // The URLs of the Environment resource's nested resources + Links *map[string]interface{} `json:"Links,omitempty"` + // The SID of the Service that the Environment resource is associated with + ServiceSid *string `json:"ServiceSid,omitempty"` + // The unique string that identifies the Environment resource + Sid *string `json:"Sid,omitempty"` + // A user-defined string that uniquely identifies the Environment resource + UniqueName *string `json:"UniqueName,omitempty"` + // The absolute URL of the Environment resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/serverless/v1/model_serverless_v1_service_environment_deployment.go b/twilio/rest/serverless/v1/model_serverless_v1_service_environment_deployment.go index 5c97f2dcf..d12841f3d 100644 --- a/twilio/rest/serverless/v1/model_serverless_v1_service_environment_deployment.go +++ b/twilio/rest/serverless/v1/model_serverless_v1_service_environment_deployment.go @@ -17,12 +17,20 @@ import ( // ServerlessV1ServiceEnvironmentDeployment struct for ServerlessV1ServiceEnvironmentDeployment type ServerlessV1ServiceEnvironmentDeployment struct { - AccountSid *string `json:"AccountSid,omitempty"` - BuildSid *string `json:"BuildSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - EnvironmentSid *string `json:"EnvironmentSid,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the Deployment resource + AccountSid *string `json:"AccountSid,omitempty"` + // The SID of the Build for the deployment + BuildSid *string `json:"BuildSid,omitempty"` + // The ISO 8601 date and time in GMT when the Deployment resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the Deployment resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The SID of the Environment for the Deployment + EnvironmentSid *string `json:"EnvironmentSid,omitempty"` + // The SID of the Service that the Deployment resource is associated with + ServiceSid *string `json:"ServiceSid,omitempty"` + // The unique string that identifies the Deployment resource + Sid *string `json:"Sid,omitempty"` + // The absolute URL of the Deployment resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/serverless/v1/model_serverless_v1_service_environment_log.go b/twilio/rest/serverless/v1/model_serverless_v1_service_environment_log.go index 4878de602..407e22ac4 100644 --- a/twilio/rest/serverless/v1/model_serverless_v1_service_environment_log.go +++ b/twilio/rest/serverless/v1/model_serverless_v1_service_environment_log.go @@ -17,16 +17,28 @@ import ( // ServerlessV1ServiceEnvironmentLog struct for ServerlessV1ServiceEnvironmentLog type ServerlessV1ServiceEnvironmentLog struct { - AccountSid *string `json:"AccountSid,omitempty"` - BuildSid *string `json:"BuildSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DeploymentSid *string `json:"DeploymentSid,omitempty"` - EnvironmentSid *string `json:"EnvironmentSid,omitempty"` - FunctionSid *string `json:"FunctionSid,omitempty"` - Level *LogLevel `json:"Level,omitempty"` - Message *string `json:"Message,omitempty"` - RequestSid *string `json:"RequestSid,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the Log resource + AccountSid *string `json:"AccountSid,omitempty"` + // The SID of the build that corresponds to the log + BuildSid *string `json:"BuildSid,omitempty"` + // The ISO 8601 date and time in GMT when the Log resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The SID of the deployment that corresponds to the log + DeploymentSid *string `json:"DeploymentSid,omitempty"` + // The SID of the environment in which the log occurred + EnvironmentSid *string `json:"EnvironmentSid,omitempty"` + // The SID of the function whose invocation produced the log + FunctionSid *string `json:"FunctionSid,omitempty"` + // The log level + Level *string `json:"Level,omitempty"` + // The log message + Message *string `json:"Message,omitempty"` + // The SID of the request associated with the log + RequestSid *string `json:"RequestSid,omitempty"` + // The SID of the Service that the Log resource is associated with + ServiceSid *string `json:"ServiceSid,omitempty"` + // The unique string that identifies the Log resource + Sid *string `json:"Sid,omitempty"` + // The absolute URL of the Log resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/serverless/v1/model_serverless_v1_service_environment_variable.go b/twilio/rest/serverless/v1/model_serverless_v1_service_environment_variable.go index 6bd50d7e0..f1f2e08a3 100644 --- a/twilio/rest/serverless/v1/model_serverless_v1_service_environment_variable.go +++ b/twilio/rest/serverless/v1/model_serverless_v1_service_environment_variable.go @@ -17,13 +17,22 @@ import ( // ServerlessV1ServiceEnvironmentVariable struct for ServerlessV1ServiceEnvironmentVariable type ServerlessV1ServiceEnvironmentVariable struct { - AccountSid *string `json:"AccountSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - EnvironmentSid *string `json:"EnvironmentSid,omitempty"` - Key *string `json:"Key,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` - Value *string `json:"Value,omitempty"` + // The SID of the Account that created the Variable resource + AccountSid *string `json:"AccountSid,omitempty"` + // The ISO 8601 date and time in GMT when the Variable resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the Variable resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The SID of the Environment in which the Variable exists + EnvironmentSid *string `json:"EnvironmentSid,omitempty"` + // A string by which the Variable resource can be referenced + Key *string `json:"Key,omitempty"` + // The SID of the Service that the Variable resource is associated with + ServiceSid *string `json:"ServiceSid,omitempty"` + // The unique string that identifies the Variable resource + Sid *string `json:"Sid,omitempty"` + // The absolute URL of the Variable resource + Url *string `json:"Url,omitempty"` + // A string that contains the actual value of the Variable + Value *string `json:"Value,omitempty"` } diff --git a/twilio/rest/serverless/v1/model_serverless_v1_service_function.go b/twilio/rest/serverless/v1/model_serverless_v1_service_function.go index 71d7f3ead..0fb500e90 100644 --- a/twilio/rest/serverless/v1/model_serverless_v1_service_function.go +++ b/twilio/rest/serverless/v1/model_serverless_v1_service_function.go @@ -17,12 +17,20 @@ import ( // ServerlessV1ServiceFunction struct for ServerlessV1ServiceFunction type ServerlessV1ServiceFunction struct { - AccountSid *string `json:"AccountSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the Function resource + AccountSid *string `json:"AccountSid,omitempty"` + // The ISO 8601 date and time in GMT when the Function resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the Function resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The string that you assigned to describe the Function resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // The URLs of nested resources of the Function resource + Links *map[string]interface{} `json:"Links,omitempty"` + // The SID of the Service that the Function resource is associated with + ServiceSid *string `json:"ServiceSid,omitempty"` + // The unique string that identifies the Function resource + Sid *string `json:"Sid,omitempty"` + // The absolute URL of the Function resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/serverless/v1/model_serverless_v1_service_function_function_version.go b/twilio/rest/serverless/v1/model_serverless_v1_service_function_function_version.go index c8d8fc438..a541e9ff1 100644 --- a/twilio/rest/serverless/v1/model_serverless_v1_service_function_function_version.go +++ b/twilio/rest/serverless/v1/model_serverless_v1_service_function_function_version.go @@ -17,13 +17,21 @@ import ( // ServerlessV1ServiceFunctionFunctionVersion struct for ServerlessV1ServiceFunctionFunctionVersion type ServerlessV1ServiceFunctionFunctionVersion struct { - AccountSid *string `json:"AccountSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - FunctionSid *string `json:"FunctionSid,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - Path *string `json:"Path,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` - Visibility *FunctionVersionVisibility `json:"Visibility,omitempty"` + // The SID of the Account that created the Function Version resource + AccountSid *string `json:"AccountSid,omitempty"` + // The ISO 8601 date and time in GMT when the Function Version resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The SID of the Function resource that is the parent of the Function Version resource + FunctionSid *string `json:"FunctionSid,omitempty"` + Links *map[string]interface{} `json:"Links,omitempty"` + // The URL-friendly string by which the Function Version resource can be referenced + Path *string `json:"Path,omitempty"` + // The SID of the Service that the Function Version resource is associated with + ServiceSid *string `json:"ServiceSid,omitempty"` + // The unique string that identifies the Function Version resource + Sid *string `json:"Sid,omitempty"` + // The absolute URL of the Function Version resource + Url *string `json:"Url,omitempty"` + // The access control that determines how the Function Version resource can be accessed + Visibility *string `json:"Visibility,omitempty"` } diff --git a/twilio/rest/serverless/v1/model_serverless_v1_service_function_function_version_function_version_content.go b/twilio/rest/serverless/v1/model_serverless_v1_service_function_function_version_function_version_content.go index 4793cace6..b1656394d 100644 --- a/twilio/rest/serverless/v1/model_serverless_v1_service_function_function_version_function_version_content.go +++ b/twilio/rest/serverless/v1/model_serverless_v1_service_function_function_version_function_version_content.go @@ -13,10 +13,15 @@ package openapi // ServerlessV1ServiceFunctionFunctionVersionFunctionVersionContent struct for ServerlessV1ServiceFunctionFunctionVersionFunctionVersionContent type ServerlessV1ServiceFunctionFunctionVersionFunctionVersionContent struct { - AccountSid *string `json:"AccountSid,omitempty"` - Content *string `json:"Content,omitempty"` + // The SID of the Account that created the Function Version resource + AccountSid *string `json:"AccountSid,omitempty"` + // The content of the Function Version resource + Content *string `json:"Content,omitempty"` + // The SID of the Function that is the parent of the Function Version FunctionSid *string `json:"FunctionSid,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Service that the Function Version resource is associated with + ServiceSid *string `json:"ServiceSid,omitempty"` + // The unique string that identifies the Function Version resource + Sid *string `json:"Sid,omitempty"` + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/studio/v1/README.md b/twilio/rest/studio/v1/README.md index f989a1187..8db673536 100644 --- a/twilio/rest/studio/v1/README.md +++ b/twilio/rest/studio/v1/README.md @@ -55,9 +55,6 @@ Class | Method | HTTP request | Description ## Documentation For Models - - [EngagementStatus](docs/EngagementStatus.md) - - [ExecutionStatus](docs/ExecutionStatus.md) - - [FlowStatus](docs/FlowStatus.md) - [ListEngagementResponse](docs/ListEngagementResponse.md) - [ListExecutionResponse](docs/ListExecutionResponse.md) - [ListExecutionStepResponse](docs/ListExecutionStepResponse.md) diff --git a/twilio/rest/studio/v1/docs/ListEngagementResponse.md b/twilio/rest/studio/v1/docs/ListEngagementResponse.md index 08dd62839..a799c1714 100644 --- a/twilio/rest/studio/v1/docs/ListEngagementResponse.md +++ b/twilio/rest/studio/v1/docs/ListEngagementResponse.md @@ -1,10 +1,10 @@ # ListEngagementResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Engagements** | [**[]StudioV1FlowEngagement**](studio.v1.flow.engagement.md) | [optional] -**Meta** | [**ListFlowResponseMeta**](ListFlowResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Engagements** | [**[]StudioV1FlowEngagement**](studio.v1.flow.engagement.md) | |[optional] +**Meta** | [**ListFlowResponseMeta**](ListFlowResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/studio/v1/docs/ListExecutionResponse.md b/twilio/rest/studio/v1/docs/ListExecutionResponse.md index da01433ed..47891a97e 100644 --- a/twilio/rest/studio/v1/docs/ListExecutionResponse.md +++ b/twilio/rest/studio/v1/docs/ListExecutionResponse.md @@ -1,10 +1,10 @@ # ListExecutionResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Executions** | [**[]StudioV1FlowExecution**](studio.v1.flow.execution.md) | [optional] -**Meta** | [**ListFlowResponseMeta**](ListFlowResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Executions** | [**[]StudioV1FlowExecution**](studio.v1.flow.execution.md) | |[optional] +**Meta** | [**ListFlowResponseMeta**](ListFlowResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/studio/v1/docs/ListExecutionStepResponse.md b/twilio/rest/studio/v1/docs/ListExecutionStepResponse.md index 9660364de..479e6f308 100644 --- a/twilio/rest/studio/v1/docs/ListExecutionStepResponse.md +++ b/twilio/rest/studio/v1/docs/ListExecutionStepResponse.md @@ -1,10 +1,10 @@ # ListExecutionStepResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListFlowResponseMeta**](ListFlowResponse_meta.md) | [optional] -**Steps** | [**[]StudioV1FlowExecutionExecutionStep**](studio.v1.flow.execution.execution_step.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListFlowResponseMeta**](ListFlowResponse_meta.md) | |[optional] +**Steps** | [**[]StudioV1FlowExecutionExecutionStep**](studio.v1.flow.execution.execution_step.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/studio/v1/docs/ListFlowResponse.md b/twilio/rest/studio/v1/docs/ListFlowResponse.md index e8c756634..fa8588ce2 100644 --- a/twilio/rest/studio/v1/docs/ListFlowResponse.md +++ b/twilio/rest/studio/v1/docs/ListFlowResponse.md @@ -1,10 +1,10 @@ # ListFlowResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Flows** | [**[]StudioV1Flow**](studio.v1.flow.md) | [optional] -**Meta** | [**ListFlowResponseMeta**](ListFlowResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Flows** | [**[]StudioV1Flow**](studio.v1.flow.md) | |[optional] +**Meta** | [**ListFlowResponseMeta**](ListFlowResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/studio/v1/docs/ListFlowResponseMeta.md b/twilio/rest/studio/v1/docs/ListFlowResponseMeta.md index 5cd4951a8..157372953 100644 --- a/twilio/rest/studio/v1/docs/ListFlowResponseMeta.md +++ b/twilio/rest/studio/v1/docs/ListFlowResponseMeta.md @@ -1,15 +1,15 @@ # ListFlowResponseMeta ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**FirstPageUrl** | **string** | [optional] -**Key** | **string** | [optional] -**NextPageUrl** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUrl** | **string** | [optional] -**Url** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstPageUrl** | **string** | |[optional] +**Key** | **string** | |[optional] +**NextPageUrl** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUrl** | **string** | |[optional] +**Url** | **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/twilio/rest/studio/v1/docs/ListStepResponse.md b/twilio/rest/studio/v1/docs/ListStepResponse.md index cbe7ae70d..937da829a 100644 --- a/twilio/rest/studio/v1/docs/ListStepResponse.md +++ b/twilio/rest/studio/v1/docs/ListStepResponse.md @@ -1,10 +1,10 @@ # ListStepResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListFlowResponseMeta**](ListFlowResponse_meta.md) | [optional] -**Steps** | [**[]StudioV1FlowEngagementStep**](studio.v1.flow.engagement.step.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListFlowResponseMeta**](ListFlowResponse_meta.md) | |[optional] +**Steps** | [**[]StudioV1FlowEngagementStep**](studio.v1.flow.engagement.step.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/studio/v1/docs/StudioV1Flow.md b/twilio/rest/studio/v1/docs/StudioV1Flow.md index 88b252f5f..ccbe6f527 100644 --- a/twilio/rest/studio/v1/docs/StudioV1Flow.md +++ b/twilio/rest/studio/v1/docs/StudioV1Flow.md @@ -1,17 +1,17 @@ # StudioV1Flow ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**FriendlyName** | Pointer to **string** | -**Links** | Pointer to **map[string]interface{}** | -**Sid** | Pointer to **string** | -**Status** | Pointer to [**FlowStatus**](flow_status.md) | -**Url** | Pointer to **string** | -**Version** | Pointer to **int32** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was last updated | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the Flow | +**Links** | Pointer to **map[string]interface{}** | Nested resource URLs | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Status** | Pointer to **string** | The status of the Flow | +**Url** | Pointer to **string** | The absolute URL of the resource | +**Version** | Pointer to **int32** | The latest version number of the Flow's definition | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/studio/v1/docs/StudioV1FlowEngagement.md b/twilio/rest/studio/v1/docs/StudioV1FlowEngagement.md index c7bd5c897..05d4a41ba 100644 --- a/twilio/rest/studio/v1/docs/StudioV1FlowEngagement.md +++ b/twilio/rest/studio/v1/docs/StudioV1FlowEngagement.md @@ -1,19 +1,19 @@ # StudioV1FlowEngagement ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**ContactChannelAddress** | Pointer to **string** | -**ContactSid** | Pointer to **string** | -**Context** | Pointer to **map[string]interface{}** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**FlowSid** | Pointer to **string** | -**Links** | Pointer to **map[string]interface{}** | -**Sid** | Pointer to **string** | -**Status** | Pointer to [**EngagementStatus**](engagement_status.md) | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**ContactChannelAddress** | Pointer to **string** | The phone number, SIP address or Client identifier that triggered this Engagement | +**ContactSid** | Pointer to **string** | The SID of the Contact | +**Context** | Pointer to **map[string]interface{}** | The current state of the execution flow | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the Engagement was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the Engagement was last updated | +**FlowSid** | Pointer to **string** | The SID of the Flow | +**Links** | Pointer to **map[string]interface{}** | The URLs of the Engagement's nested resources | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Status** | Pointer to **string** | The status of the Engagement | +**Url** | Pointer to **string** | The absolute URL of the resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/studio/v1/docs/StudioV1FlowEngagementEngagementContext.md b/twilio/rest/studio/v1/docs/StudioV1FlowEngagementEngagementContext.md index 0f8bd469e..13f957d3b 100644 --- a/twilio/rest/studio/v1/docs/StudioV1FlowEngagementEngagementContext.md +++ b/twilio/rest/studio/v1/docs/StudioV1FlowEngagementEngagementContext.md @@ -1,13 +1,13 @@ # StudioV1FlowEngagementEngagementContext ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Context** | Pointer to **map[string]interface{}** | -**EngagementSid** | Pointer to **string** | -**FlowSid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | Account SID | +**Context** | Pointer to **map[string]interface{}** | Flow state | +**EngagementSid** | Pointer to **string** | Engagement SID | +**FlowSid** | Pointer to **string** | Flow SID | +**Url** | Pointer to **string** | The URL of the resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/studio/v1/docs/StudioV1FlowEngagementStep.md b/twilio/rest/studio/v1/docs/StudioV1FlowEngagementStep.md index 697ea8363..5057cc163 100644 --- a/twilio/rest/studio/v1/docs/StudioV1FlowEngagementStep.md +++ b/twilio/rest/studio/v1/docs/StudioV1FlowEngagementStep.md @@ -1,20 +1,20 @@ # StudioV1FlowEngagementStep ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Context** | Pointer to **map[string]interface{}** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**EngagementSid** | Pointer to **string** | -**FlowSid** | Pointer to **string** | -**Links** | Pointer to **map[string]interface{}** | -**Name** | Pointer to **string** | -**Sid** | Pointer to **string** | -**TransitionedFrom** | Pointer to **string** | -**TransitionedTo** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**Context** | Pointer to **map[string]interface{}** | The current state of the flow | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was last updated | +**EngagementSid** | Pointer to **string** | The SID of the Engagement | +**FlowSid** | Pointer to **string** | The SID of the Flow | +**Links** | Pointer to **map[string]interface{}** | The URLs of related resources | +**Name** | Pointer to **string** | The event that caused the Flow to transition to the Step | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**TransitionedFrom** | Pointer to **string** | The Widget that preceded the Widget for the Step | +**TransitionedTo** | Pointer to **string** | The Widget that will follow the Widget for the Step | +**Url** | Pointer to **string** | The absolute URL of the resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/studio/v1/docs/StudioV1FlowEngagementStepStepContext.md b/twilio/rest/studio/v1/docs/StudioV1FlowEngagementStepStepContext.md index 1d6d50bd4..4d3556282 100644 --- a/twilio/rest/studio/v1/docs/StudioV1FlowEngagementStepStepContext.md +++ b/twilio/rest/studio/v1/docs/StudioV1FlowEngagementStepStepContext.md @@ -1,14 +1,14 @@ # StudioV1FlowEngagementStepStepContext ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Context** | Pointer to **map[string]interface{}** | -**EngagementSid** | Pointer to **string** | -**FlowSid** | Pointer to **string** | -**StepSid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**Context** | Pointer to **map[string]interface{}** | The current state of the flow | +**EngagementSid** | Pointer to **string** | The SID of the Engagement | +**FlowSid** | Pointer to **string** | The SID of the Flow | +**StepSid** | Pointer to **string** | Step SID | +**Url** | Pointer to **string** | The absolute URL of the resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/studio/v1/docs/StudioV1FlowExecution.md b/twilio/rest/studio/v1/docs/StudioV1FlowExecution.md index eea366baf..e8f0aa327 100644 --- a/twilio/rest/studio/v1/docs/StudioV1FlowExecution.md +++ b/twilio/rest/studio/v1/docs/StudioV1FlowExecution.md @@ -1,19 +1,19 @@ # StudioV1FlowExecution ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**ContactChannelAddress** | Pointer to **string** | -**ContactSid** | Pointer to **string** | -**Context** | Pointer to **map[string]interface{}** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**FlowSid** | Pointer to **string** | -**Links** | Pointer to **map[string]interface{}** | -**Sid** | Pointer to **string** | -**Status** | Pointer to [**ExecutionStatus**](execution_status.md) | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**ContactChannelAddress** | Pointer to **string** | The phone number, SIP address or Client identifier that triggered the Execution | +**ContactSid** | Pointer to **string** | The SID of the Contact | +**Context** | Pointer to **map[string]interface{}** | The current state of the flow | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was last updated | +**FlowSid** | Pointer to **string** | The SID of the Flow | +**Links** | Pointer to **map[string]interface{}** | Nested resource URLs | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Status** | Pointer to **string** | The status of the Execution | +**Url** | Pointer to **string** | The absolute URL of the resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/studio/v1/docs/StudioV1FlowExecutionExecutionContext.md b/twilio/rest/studio/v1/docs/StudioV1FlowExecutionExecutionContext.md index e2ab53036..805a22360 100644 --- a/twilio/rest/studio/v1/docs/StudioV1FlowExecutionExecutionContext.md +++ b/twilio/rest/studio/v1/docs/StudioV1FlowExecutionExecutionContext.md @@ -1,13 +1,13 @@ # StudioV1FlowExecutionExecutionContext ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Context** | Pointer to **map[string]interface{}** | -**ExecutionSid** | Pointer to **string** | -**FlowSid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**Context** | Pointer to **map[string]interface{}** | The current state of the flow | +**ExecutionSid** | Pointer to **string** | The SID of the Execution | +**FlowSid** | Pointer to **string** | The SID of the Flow | +**Url** | Pointer to **string** | The absolute URL of the resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/studio/v1/docs/StudioV1FlowExecutionExecutionStep.md b/twilio/rest/studio/v1/docs/StudioV1FlowExecutionExecutionStep.md index 4b2037759..c083184d7 100644 --- a/twilio/rest/studio/v1/docs/StudioV1FlowExecutionExecutionStep.md +++ b/twilio/rest/studio/v1/docs/StudioV1FlowExecutionExecutionStep.md @@ -1,20 +1,20 @@ # StudioV1FlowExecutionExecutionStep ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Context** | Pointer to **map[string]interface{}** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**ExecutionSid** | Pointer to **string** | -**FlowSid** | Pointer to **string** | -**Links** | Pointer to **map[string]interface{}** | -**Name** | Pointer to **string** | -**Sid** | Pointer to **string** | -**TransitionedFrom** | Pointer to **string** | -**TransitionedTo** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**Context** | Pointer to **map[string]interface{}** | The current state of the flow | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was last updated | +**ExecutionSid** | Pointer to **string** | The SID of the Execution | +**FlowSid** | Pointer to **string** | The SID of the Flow | +**Links** | Pointer to **map[string]interface{}** | The URLs of related resources | +**Name** | Pointer to **string** | The event that caused the Flow to transition to the Step | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**TransitionedFrom** | Pointer to **string** | The Widget that preceded the Widget for the Step | +**TransitionedTo** | Pointer to **string** | The Widget that will follow the Widget for the Step | +**Url** | Pointer to **string** | The absolute URL of the resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/studio/v1/docs/StudioV1FlowExecutionExecutionStepExecutionStepContext.md b/twilio/rest/studio/v1/docs/StudioV1FlowExecutionExecutionStepExecutionStepContext.md index 9c78830f1..9359f292f 100644 --- a/twilio/rest/studio/v1/docs/StudioV1FlowExecutionExecutionStepExecutionStepContext.md +++ b/twilio/rest/studio/v1/docs/StudioV1FlowExecutionExecutionStepExecutionStepContext.md @@ -1,14 +1,14 @@ # StudioV1FlowExecutionExecutionStepExecutionStepContext ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Context** | Pointer to **map[string]interface{}** | -**ExecutionSid** | Pointer to **string** | -**FlowSid** | Pointer to **string** | -**StepSid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**Context** | Pointer to **map[string]interface{}** | The current state of the flow | +**ExecutionSid** | Pointer to **string** | The SID of the Execution | +**FlowSid** | Pointer to **string** | The SID of the Flow | +**StepSid** | Pointer to **string** | Step SID | +**Url** | Pointer to **string** | The absolute URL of the resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/studio/v1/model_studio_v1_flow.go b/twilio/rest/studio/v1/model_studio_v1_flow.go index c56ddd7c6..49599f861 100644 --- a/twilio/rest/studio/v1/model_studio_v1_flow.go +++ b/twilio/rest/studio/v1/model_studio_v1_flow.go @@ -17,13 +17,22 @@ import ( // StudioV1Flow struct for StudioV1Flow type StudioV1Flow struct { - AccountSid *string `json:"AccountSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - Sid *string `json:"Sid,omitempty"` - Status *FlowStatus `json:"Status,omitempty"` - Url *string `json:"Url,omitempty"` - Version *int32 `json:"Version,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The string that you assigned to describe the Flow + FriendlyName *string `json:"FriendlyName,omitempty"` + // Nested resource URLs + Links *map[string]interface{} `json:"Links,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The status of the Flow + Status *string `json:"Status,omitempty"` + // The absolute URL of the resource + Url *string `json:"Url,omitempty"` + // The latest version number of the Flow's definition + Version *int32 `json:"Version,omitempty"` } diff --git a/twilio/rest/studio/v1/model_studio_v1_flow_engagement.go b/twilio/rest/studio/v1/model_studio_v1_flow_engagement.go index 746eff1bb..3353f429e 100644 --- a/twilio/rest/studio/v1/model_studio_v1_flow_engagement.go +++ b/twilio/rest/studio/v1/model_studio_v1_flow_engagement.go @@ -17,15 +17,26 @@ import ( // StudioV1FlowEngagement struct for StudioV1FlowEngagement type StudioV1FlowEngagement struct { - AccountSid *string `json:"AccountSid,omitempty"` - ContactChannelAddress *string `json:"ContactChannelAddress,omitempty"` - ContactSid *string `json:"ContactSid,omitempty"` - Context *map[string]interface{} `json:"Context,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FlowSid *string `json:"FlowSid,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - Sid *string `json:"Sid,omitempty"` - Status *EngagementStatus `json:"Status,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The phone number, SIP address or Client identifier that triggered this Engagement + ContactChannelAddress *string `json:"ContactChannelAddress,omitempty"` + // The SID of the Contact + ContactSid *string `json:"ContactSid,omitempty"` + // The current state of the execution flow + Context *map[string]interface{} `json:"Context,omitempty"` + // The ISO 8601 date and time in GMT when the Engagement was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the Engagement was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The SID of the Flow + FlowSid *string `json:"FlowSid,omitempty"` + // The URLs of the Engagement's nested resources + Links *map[string]interface{} `json:"Links,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The status of the Engagement + Status *string `json:"Status,omitempty"` + // The absolute URL of the resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/studio/v1/model_studio_v1_flow_engagement_engagement_context.go b/twilio/rest/studio/v1/model_studio_v1_flow_engagement_engagement_context.go index 23491a5b7..535f5b93f 100644 --- a/twilio/rest/studio/v1/model_studio_v1_flow_engagement_engagement_context.go +++ b/twilio/rest/studio/v1/model_studio_v1_flow_engagement_engagement_context.go @@ -13,9 +13,14 @@ package openapi // StudioV1FlowEngagementEngagementContext struct for StudioV1FlowEngagementEngagementContext type StudioV1FlowEngagementEngagementContext struct { - AccountSid *string `json:"AccountSid,omitempty"` - Context *map[string]interface{} `json:"Context,omitempty"` - EngagementSid *string `json:"EngagementSid,omitempty"` - FlowSid *string `json:"FlowSid,omitempty"` - Url *string `json:"Url,omitempty"` + // Account SID + AccountSid *string `json:"AccountSid,omitempty"` + // Flow state + Context *map[string]interface{} `json:"Context,omitempty"` + // Engagement SID + EngagementSid *string `json:"EngagementSid,omitempty"` + // Flow SID + FlowSid *string `json:"FlowSid,omitempty"` + // The URL of the resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/studio/v1/model_studio_v1_flow_engagement_step.go b/twilio/rest/studio/v1/model_studio_v1_flow_engagement_step.go index 5b74e858c..960e75c2f 100644 --- a/twilio/rest/studio/v1/model_studio_v1_flow_engagement_step.go +++ b/twilio/rest/studio/v1/model_studio_v1_flow_engagement_step.go @@ -17,16 +17,28 @@ import ( // StudioV1FlowEngagementStep struct for StudioV1FlowEngagementStep type StudioV1FlowEngagementStep struct { - AccountSid *string `json:"AccountSid,omitempty"` - Context *map[string]interface{} `json:"Context,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - EngagementSid *string `json:"EngagementSid,omitempty"` - FlowSid *string `json:"FlowSid,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - Name *string `json:"Name,omitempty"` - Sid *string `json:"Sid,omitempty"` - TransitionedFrom *string `json:"TransitionedFrom,omitempty"` - TransitionedTo *string `json:"TransitionedTo,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The current state of the flow + Context *map[string]interface{} `json:"Context,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The SID of the Engagement + EngagementSid *string `json:"EngagementSid,omitempty"` + // The SID of the Flow + FlowSid *string `json:"FlowSid,omitempty"` + // The URLs of related resources + Links *map[string]interface{} `json:"Links,omitempty"` + // The event that caused the Flow to transition to the Step + Name *string `json:"Name,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The Widget that preceded the Widget for the Step + TransitionedFrom *string `json:"TransitionedFrom,omitempty"` + // The Widget that will follow the Widget for the Step + TransitionedTo *string `json:"TransitionedTo,omitempty"` + // The absolute URL of the resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/studio/v1/model_studio_v1_flow_engagement_step_step_context.go b/twilio/rest/studio/v1/model_studio_v1_flow_engagement_step_step_context.go index c4af45245..4b27cb7d6 100644 --- a/twilio/rest/studio/v1/model_studio_v1_flow_engagement_step_step_context.go +++ b/twilio/rest/studio/v1/model_studio_v1_flow_engagement_step_step_context.go @@ -13,10 +13,16 @@ package openapi // StudioV1FlowEngagementStepStepContext struct for StudioV1FlowEngagementStepStepContext type StudioV1FlowEngagementStepStepContext struct { - AccountSid *string `json:"AccountSid,omitempty"` - Context *map[string]interface{} `json:"Context,omitempty"` - EngagementSid *string `json:"EngagementSid,omitempty"` - FlowSid *string `json:"FlowSid,omitempty"` - StepSid *string `json:"StepSid,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The current state of the flow + Context *map[string]interface{} `json:"Context,omitempty"` + // The SID of the Engagement + EngagementSid *string `json:"EngagementSid,omitempty"` + // The SID of the Flow + FlowSid *string `json:"FlowSid,omitempty"` + // Step SID + StepSid *string `json:"StepSid,omitempty"` + // The absolute URL of the resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/studio/v1/model_studio_v1_flow_execution.go b/twilio/rest/studio/v1/model_studio_v1_flow_execution.go index 345da18e5..f2015cb47 100644 --- a/twilio/rest/studio/v1/model_studio_v1_flow_execution.go +++ b/twilio/rest/studio/v1/model_studio_v1_flow_execution.go @@ -17,15 +17,26 @@ import ( // StudioV1FlowExecution struct for StudioV1FlowExecution type StudioV1FlowExecution struct { - AccountSid *string `json:"AccountSid,omitempty"` - ContactChannelAddress *string `json:"ContactChannelAddress,omitempty"` - ContactSid *string `json:"ContactSid,omitempty"` - Context *map[string]interface{} `json:"Context,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FlowSid *string `json:"FlowSid,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - Sid *string `json:"Sid,omitempty"` - Status *ExecutionStatus `json:"Status,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The phone number, SIP address or Client identifier that triggered the Execution + ContactChannelAddress *string `json:"ContactChannelAddress,omitempty"` + // The SID of the Contact + ContactSid *string `json:"ContactSid,omitempty"` + // The current state of the flow + Context *map[string]interface{} `json:"Context,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The SID of the Flow + FlowSid *string `json:"FlowSid,omitempty"` + // Nested resource URLs + Links *map[string]interface{} `json:"Links,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The status of the Execution + Status *string `json:"Status,omitempty"` + // The absolute URL of the resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/studio/v1/model_studio_v1_flow_execution_execution_context.go b/twilio/rest/studio/v1/model_studio_v1_flow_execution_execution_context.go index 676bebf60..266978753 100644 --- a/twilio/rest/studio/v1/model_studio_v1_flow_execution_execution_context.go +++ b/twilio/rest/studio/v1/model_studio_v1_flow_execution_execution_context.go @@ -13,9 +13,14 @@ package openapi // StudioV1FlowExecutionExecutionContext struct for StudioV1FlowExecutionExecutionContext type StudioV1FlowExecutionExecutionContext struct { - AccountSid *string `json:"AccountSid,omitempty"` - Context *map[string]interface{} `json:"Context,omitempty"` - ExecutionSid *string `json:"ExecutionSid,omitempty"` - FlowSid *string `json:"FlowSid,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The current state of the flow + Context *map[string]interface{} `json:"Context,omitempty"` + // The SID of the Execution + ExecutionSid *string `json:"ExecutionSid,omitempty"` + // The SID of the Flow + FlowSid *string `json:"FlowSid,omitempty"` + // The absolute URL of the resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/studio/v1/model_studio_v1_flow_execution_execution_step.go b/twilio/rest/studio/v1/model_studio_v1_flow_execution_execution_step.go index e9d01998e..517cb9454 100644 --- a/twilio/rest/studio/v1/model_studio_v1_flow_execution_execution_step.go +++ b/twilio/rest/studio/v1/model_studio_v1_flow_execution_execution_step.go @@ -17,16 +17,28 @@ import ( // StudioV1FlowExecutionExecutionStep struct for StudioV1FlowExecutionExecutionStep type StudioV1FlowExecutionExecutionStep struct { - AccountSid *string `json:"AccountSid,omitempty"` - Context *map[string]interface{} `json:"Context,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - ExecutionSid *string `json:"ExecutionSid,omitempty"` - FlowSid *string `json:"FlowSid,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - Name *string `json:"Name,omitempty"` - Sid *string `json:"Sid,omitempty"` - TransitionedFrom *string `json:"TransitionedFrom,omitempty"` - TransitionedTo *string `json:"TransitionedTo,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The current state of the flow + Context *map[string]interface{} `json:"Context,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The SID of the Execution + ExecutionSid *string `json:"ExecutionSid,omitempty"` + // The SID of the Flow + FlowSid *string `json:"FlowSid,omitempty"` + // The URLs of related resources + Links *map[string]interface{} `json:"Links,omitempty"` + // The event that caused the Flow to transition to the Step + Name *string `json:"Name,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The Widget that preceded the Widget for the Step + TransitionedFrom *string `json:"TransitionedFrom,omitempty"` + // The Widget that will follow the Widget for the Step + TransitionedTo *string `json:"TransitionedTo,omitempty"` + // The absolute URL of the resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/studio/v1/model_studio_v1_flow_execution_execution_step_execution_step_context.go b/twilio/rest/studio/v1/model_studio_v1_flow_execution_execution_step_execution_step_context.go index 5cb2fa431..e5fceb9ef 100644 --- a/twilio/rest/studio/v1/model_studio_v1_flow_execution_execution_step_execution_step_context.go +++ b/twilio/rest/studio/v1/model_studio_v1_flow_execution_execution_step_execution_step_context.go @@ -13,10 +13,16 @@ package openapi // StudioV1FlowExecutionExecutionStepExecutionStepContext struct for StudioV1FlowExecutionExecutionStepExecutionStepContext type StudioV1FlowExecutionExecutionStepExecutionStepContext struct { - AccountSid *string `json:"AccountSid,omitempty"` - Context *map[string]interface{} `json:"Context,omitempty"` - ExecutionSid *string `json:"ExecutionSid,omitempty"` - FlowSid *string `json:"FlowSid,omitempty"` - StepSid *string `json:"StepSid,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The current state of the flow + Context *map[string]interface{} `json:"Context,omitempty"` + // The SID of the Execution + ExecutionSid *string `json:"ExecutionSid,omitempty"` + // The SID of the Flow + FlowSid *string `json:"FlowSid,omitempty"` + // Step SID + StepSid *string `json:"StepSid,omitempty"` + // The absolute URL of the resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/studio/v2/README.md b/twilio/rest/studio/v2/README.md index 30cf66e00..da9c03e31 100644 --- a/twilio/rest/studio/v2/README.md +++ b/twilio/rest/studio/v2/README.md @@ -54,9 +54,6 @@ Class | Method | HTTP request | Description ## Documentation For Models - - [ExecutionStatus](docs/ExecutionStatus.md) - - [FlowRevisionStatus](docs/FlowRevisionStatus.md) - - [FlowStatus](docs/FlowStatus.md) - [ListExecutionResponse](docs/ListExecutionResponse.md) - [ListExecutionStepResponse](docs/ListExecutionStepResponse.md) - [ListFlowResponse](docs/ListFlowResponse.md) diff --git a/twilio/rest/studio/v2/docs/ListExecutionResponse.md b/twilio/rest/studio/v2/docs/ListExecutionResponse.md index 9def83ad8..003d144c4 100644 --- a/twilio/rest/studio/v2/docs/ListExecutionResponse.md +++ b/twilio/rest/studio/v2/docs/ListExecutionResponse.md @@ -1,10 +1,10 @@ # ListExecutionResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Executions** | [**[]StudioV2FlowExecution**](studio.v2.flow.execution.md) | [optional] -**Meta** | [**ListFlowResponseMeta**](ListFlowResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Executions** | [**[]StudioV2FlowExecution**](studio.v2.flow.execution.md) | |[optional] +**Meta** | [**ListFlowResponseMeta**](ListFlowResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/studio/v2/docs/ListExecutionStepResponse.md b/twilio/rest/studio/v2/docs/ListExecutionStepResponse.md index dd7ab24e4..7f37376a3 100644 --- a/twilio/rest/studio/v2/docs/ListExecutionStepResponse.md +++ b/twilio/rest/studio/v2/docs/ListExecutionStepResponse.md @@ -1,10 +1,10 @@ # ListExecutionStepResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListFlowResponseMeta**](ListFlowResponse_meta.md) | [optional] -**Steps** | [**[]StudioV2FlowExecutionExecutionStep**](studio.v2.flow.execution.execution_step.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListFlowResponseMeta**](ListFlowResponse_meta.md) | |[optional] +**Steps** | [**[]StudioV2FlowExecutionExecutionStep**](studio.v2.flow.execution.execution_step.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/studio/v2/docs/ListFlowResponse.md b/twilio/rest/studio/v2/docs/ListFlowResponse.md index acc69c723..fab89c820 100644 --- a/twilio/rest/studio/v2/docs/ListFlowResponse.md +++ b/twilio/rest/studio/v2/docs/ListFlowResponse.md @@ -1,10 +1,10 @@ # ListFlowResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Flows** | [**[]StudioV2Flow**](studio.v2.flow.md) | [optional] -**Meta** | [**ListFlowResponseMeta**](ListFlowResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Flows** | [**[]StudioV2Flow**](studio.v2.flow.md) | |[optional] +**Meta** | [**ListFlowResponseMeta**](ListFlowResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/studio/v2/docs/ListFlowResponseMeta.md b/twilio/rest/studio/v2/docs/ListFlowResponseMeta.md index 5cd4951a8..157372953 100644 --- a/twilio/rest/studio/v2/docs/ListFlowResponseMeta.md +++ b/twilio/rest/studio/v2/docs/ListFlowResponseMeta.md @@ -1,15 +1,15 @@ # ListFlowResponseMeta ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**FirstPageUrl** | **string** | [optional] -**Key** | **string** | [optional] -**NextPageUrl** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUrl** | **string** | [optional] -**Url** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstPageUrl** | **string** | |[optional] +**Key** | **string** | |[optional] +**NextPageUrl** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUrl** | **string** | |[optional] +**Url** | **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/twilio/rest/studio/v2/docs/ListFlowRevisionResponse.md b/twilio/rest/studio/v2/docs/ListFlowRevisionResponse.md index 4744dc5e7..ab82a60cb 100644 --- a/twilio/rest/studio/v2/docs/ListFlowRevisionResponse.md +++ b/twilio/rest/studio/v2/docs/ListFlowRevisionResponse.md @@ -1,10 +1,10 @@ # ListFlowRevisionResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListFlowResponseMeta**](ListFlowResponse_meta.md) | [optional] -**Revisions** | [**[]StudioV2FlowFlowRevision**](studio.v2.flow.flow_revision.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListFlowResponseMeta**](ListFlowResponse_meta.md) | |[optional] +**Revisions** | [**[]StudioV2FlowFlowRevision**](studio.v2.flow.flow_revision.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/studio/v2/docs/StudioV2Flow.md b/twilio/rest/studio/v2/docs/StudioV2Flow.md index 9566a120b..c2359ae75 100644 --- a/twilio/rest/studio/v2/docs/StudioV2Flow.md +++ b/twilio/rest/studio/v2/docs/StudioV2Flow.md @@ -1,23 +1,23 @@ # StudioV2Flow ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**CommitMessage** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**Definition** | Pointer to **map[string]interface{}** | -**Errors** | Pointer to **[]map[string]interface{}** | -**FriendlyName** | Pointer to **string** | -**Links** | Pointer to **map[string]interface{}** | -**Revision** | Pointer to **int32** | -**Sid** | Pointer to **string** | -**Status** | Pointer to [**FlowStatus**](flow_status.md) | -**Url** | Pointer to **string** | -**Valid** | Pointer to **bool** | -**Warnings** | Pointer to **[]map[string]interface{}** | -**WebhookUrl** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**CommitMessage** | Pointer to **string** | Description of change made in the revision | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was last updated | +**Definition** | Pointer to **map[string]interface{}** | JSON representation of flow definition | +**Errors** | Pointer to **[]map[string]interface{}** | List of error in the flow definition | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the Flow | +**Links** | Pointer to **map[string]interface{}** | Nested resource URLs | +**Revision** | Pointer to **int32** | The latest revision number of the Flow's definition | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Status** | Pointer to **string** | The status of the Flow | +**Url** | Pointer to **string** | The absolute URL of the resource | +**Valid** | Pointer to **bool** | Boolean if the flow definition is valid | +**Warnings** | Pointer to **[]map[string]interface{}** | List of warnings in the flow definition | +**WebhookUrl** | Pointer to **string** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/studio/v2/docs/StudioV2FlowExecution.md b/twilio/rest/studio/v2/docs/StudioV2FlowExecution.md index 6a1ebbda3..a2e00443b 100644 --- a/twilio/rest/studio/v2/docs/StudioV2FlowExecution.md +++ b/twilio/rest/studio/v2/docs/StudioV2FlowExecution.md @@ -1,18 +1,18 @@ # StudioV2FlowExecution ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**ContactChannelAddress** | Pointer to **string** | -**Context** | Pointer to **map[string]interface{}** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**FlowSid** | Pointer to **string** | -**Links** | Pointer to **map[string]interface{}** | -**Sid** | Pointer to **string** | -**Status** | Pointer to [**ExecutionStatus**](execution_status.md) | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**ContactChannelAddress** | Pointer to **string** | The phone number, SIP address or Client identifier that triggered the Execution | +**Context** | Pointer to **map[string]interface{}** | The current state of the flow | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was last updated | +**FlowSid** | Pointer to **string** | The SID of the Flow | +**Links** | Pointer to **map[string]interface{}** | Nested resource URLs | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Status** | Pointer to **string** | The status of the Execution | +**Url** | Pointer to **string** | The absolute URL of the resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/studio/v2/docs/StudioV2FlowExecutionExecutionContext.md b/twilio/rest/studio/v2/docs/StudioV2FlowExecutionExecutionContext.md index 92e0ac913..bde0c3da2 100644 --- a/twilio/rest/studio/v2/docs/StudioV2FlowExecutionExecutionContext.md +++ b/twilio/rest/studio/v2/docs/StudioV2FlowExecutionExecutionContext.md @@ -1,13 +1,13 @@ # StudioV2FlowExecutionExecutionContext ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Context** | Pointer to **map[string]interface{}** | -**ExecutionSid** | Pointer to **string** | -**FlowSid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**Context** | Pointer to **map[string]interface{}** | The current state of the flow | +**ExecutionSid** | Pointer to **string** | The SID of the Execution | +**FlowSid** | Pointer to **string** | The SID of the Flow | +**Url** | Pointer to **string** | The absolute URL of the resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/studio/v2/docs/StudioV2FlowExecutionExecutionStep.md b/twilio/rest/studio/v2/docs/StudioV2FlowExecutionExecutionStep.md index 874232bba..8f84f9bb2 100644 --- a/twilio/rest/studio/v2/docs/StudioV2FlowExecutionExecutionStep.md +++ b/twilio/rest/studio/v2/docs/StudioV2FlowExecutionExecutionStep.md @@ -1,20 +1,20 @@ # StudioV2FlowExecutionExecutionStep ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Context** | Pointer to **map[string]interface{}** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**ExecutionSid** | Pointer to **string** | -**FlowSid** | Pointer to **string** | -**Links** | Pointer to **map[string]interface{}** | -**Name** | Pointer to **string** | -**Sid** | Pointer to **string** | -**TransitionedFrom** | Pointer to **string** | -**TransitionedTo** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**Context** | Pointer to **map[string]interface{}** | The current state of the flow | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was last updated | +**ExecutionSid** | Pointer to **string** | The SID of the Execution | +**FlowSid** | Pointer to **string** | The SID of the Flow | +**Links** | Pointer to **map[string]interface{}** | The URLs of related resources | +**Name** | Pointer to **string** | The event that caused the Flow to transition to the Step | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**TransitionedFrom** | Pointer to **string** | The Widget that preceded the Widget for the Step | +**TransitionedTo** | Pointer to **string** | The Widget that will follow the Widget for the Step | +**Url** | Pointer to **string** | The absolute URL of the resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/studio/v2/docs/StudioV2FlowExecutionExecutionStepExecutionStepContext.md b/twilio/rest/studio/v2/docs/StudioV2FlowExecutionExecutionStepExecutionStepContext.md index d21219444..085a62b0d 100644 --- a/twilio/rest/studio/v2/docs/StudioV2FlowExecutionExecutionStepExecutionStepContext.md +++ b/twilio/rest/studio/v2/docs/StudioV2FlowExecutionExecutionStepExecutionStepContext.md @@ -1,14 +1,14 @@ # StudioV2FlowExecutionExecutionStepExecutionStepContext ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Context** | Pointer to **map[string]interface{}** | -**ExecutionSid** | Pointer to **string** | -**FlowSid** | Pointer to **string** | -**StepSid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**Context** | Pointer to **map[string]interface{}** | The current state of the flow | +**ExecutionSid** | Pointer to **string** | The SID of the Execution | +**FlowSid** | Pointer to **string** | The SID of the Flow | +**StepSid** | Pointer to **string** | Step SID | +**Url** | Pointer to **string** | The absolute URL of the resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/studio/v2/docs/StudioV2FlowFlowRevision.md b/twilio/rest/studio/v2/docs/StudioV2FlowFlowRevision.md index 1cf0d059b..472ce0b9d 100644 --- a/twilio/rest/studio/v2/docs/StudioV2FlowFlowRevision.md +++ b/twilio/rest/studio/v2/docs/StudioV2FlowFlowRevision.md @@ -1,20 +1,20 @@ # StudioV2FlowFlowRevision ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**CommitMessage** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**Definition** | Pointer to **map[string]interface{}** | -**Errors** | Pointer to **[]map[string]interface{}** | -**FriendlyName** | Pointer to **string** | -**Revision** | Pointer to **int32** | -**Sid** | Pointer to **string** | -**Status** | Pointer to [**FlowRevisionStatus**](flow_revision_status.md) | -**Url** | Pointer to **string** | -**Valid** | Pointer to **bool** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**CommitMessage** | Pointer to **string** | Description of change made in the revision | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was last updated | +**Definition** | Pointer to **map[string]interface{}** | JSON representation of flow definition | +**Errors** | Pointer to **[]map[string]interface{}** | List of error in the flow definition | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the Flow | +**Revision** | Pointer to **int32** | The latest revision number of the Flow's definition | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Status** | Pointer to **string** | The status of the Flow | +**Url** | Pointer to **string** | The absolute URL of the resource | +**Valid** | Pointer to **bool** | Boolean if the flow definition is valid | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/studio/v2/docs/StudioV2FlowTestUser.md b/twilio/rest/studio/v2/docs/StudioV2FlowTestUser.md index 045b9f5a4..7aa988608 100644 --- a/twilio/rest/studio/v2/docs/StudioV2FlowTestUser.md +++ b/twilio/rest/studio/v2/docs/StudioV2FlowTestUser.md @@ -1,11 +1,11 @@ # StudioV2FlowTestUser ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Sid** | Pointer to **string** | -**TestUsers** | Pointer to **[]string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Sid** | Pointer to **string** | Unique identifier of the flow. | +**TestUsers** | Pointer to **[]string** | List of test user identities that can test draft versions of the flow. | +**Url** | Pointer to **string** | The URL of this resource. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/studio/v2/docs/StudioV2FlowValidate.md b/twilio/rest/studio/v2/docs/StudioV2FlowValidate.md index 61e86dc00..e8acabfdc 100644 --- a/twilio/rest/studio/v2/docs/StudioV2FlowValidate.md +++ b/twilio/rest/studio/v2/docs/StudioV2FlowValidate.md @@ -1,9 +1,9 @@ # StudioV2FlowValidate ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Valid** | Pointer to **bool** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Valid** | Pointer to **bool** | Boolean if the flow definition is valid | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/studio/v2/model_studio_v2_flow.go b/twilio/rest/studio/v2/model_studio_v2_flow.go index e9309db80..b5a82970b 100644 --- a/twilio/rest/studio/v2/model_studio_v2_flow.go +++ b/twilio/rest/studio/v2/model_studio_v2_flow.go @@ -17,19 +17,33 @@ import ( // StudioV2Flow struct for StudioV2Flow type StudioV2Flow struct { - AccountSid *string `json:"AccountSid,omitempty"` - CommitMessage *string `json:"CommitMessage,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Definition *map[string]interface{} `json:"Definition,omitempty"` - Errors *[]map[string]interface{} `json:"Errors,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - Revision *int32 `json:"Revision,omitempty"` - Sid *string `json:"Sid,omitempty"` - Status *FlowStatus `json:"Status,omitempty"` - Url *string `json:"Url,omitempty"` - Valid *bool `json:"Valid,omitempty"` - Warnings *[]map[string]interface{} `json:"Warnings,omitempty"` - WebhookUrl *string `json:"WebhookUrl,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // Description of change made in the revision + CommitMessage *string `json:"CommitMessage,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // JSON representation of flow definition + Definition *map[string]interface{} `json:"Definition,omitempty"` + // List of error in the flow definition + Errors *[]map[string]interface{} `json:"Errors,omitempty"` + // The string that you assigned to describe the Flow + FriendlyName *string `json:"FriendlyName,omitempty"` + // Nested resource URLs + Links *map[string]interface{} `json:"Links,omitempty"` + // The latest revision number of the Flow's definition + Revision *int32 `json:"Revision,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The status of the Flow + Status *string `json:"Status,omitempty"` + // The absolute URL of the resource + Url *string `json:"Url,omitempty"` + // Boolean if the flow definition is valid + Valid *bool `json:"Valid,omitempty"` + // List of warnings in the flow definition + Warnings *[]map[string]interface{} `json:"Warnings,omitempty"` + WebhookUrl *string `json:"WebhookUrl,omitempty"` } diff --git a/twilio/rest/studio/v2/model_studio_v2_flow_execution.go b/twilio/rest/studio/v2/model_studio_v2_flow_execution.go index 31f12f234..894df521b 100644 --- a/twilio/rest/studio/v2/model_studio_v2_flow_execution.go +++ b/twilio/rest/studio/v2/model_studio_v2_flow_execution.go @@ -17,14 +17,24 @@ import ( // StudioV2FlowExecution struct for StudioV2FlowExecution type StudioV2FlowExecution struct { - AccountSid *string `json:"AccountSid,omitempty"` - ContactChannelAddress *string `json:"ContactChannelAddress,omitempty"` - Context *map[string]interface{} `json:"Context,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FlowSid *string `json:"FlowSid,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - Sid *string `json:"Sid,omitempty"` - Status *ExecutionStatus `json:"Status,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The phone number, SIP address or Client identifier that triggered the Execution + ContactChannelAddress *string `json:"ContactChannelAddress,omitempty"` + // The current state of the flow + Context *map[string]interface{} `json:"Context,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The SID of the Flow + FlowSid *string `json:"FlowSid,omitempty"` + // Nested resource URLs + Links *map[string]interface{} `json:"Links,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The status of the Execution + Status *string `json:"Status,omitempty"` + // The absolute URL of the resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/studio/v2/model_studio_v2_flow_execution_execution_context.go b/twilio/rest/studio/v2/model_studio_v2_flow_execution_execution_context.go index a24f177b0..3d74c5537 100644 --- a/twilio/rest/studio/v2/model_studio_v2_flow_execution_execution_context.go +++ b/twilio/rest/studio/v2/model_studio_v2_flow_execution_execution_context.go @@ -13,9 +13,14 @@ package openapi // StudioV2FlowExecutionExecutionContext struct for StudioV2FlowExecutionExecutionContext type StudioV2FlowExecutionExecutionContext struct { - AccountSid *string `json:"AccountSid,omitempty"` - Context *map[string]interface{} `json:"Context,omitempty"` - ExecutionSid *string `json:"ExecutionSid,omitempty"` - FlowSid *string `json:"FlowSid,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The current state of the flow + Context *map[string]interface{} `json:"Context,omitempty"` + // The SID of the Execution + ExecutionSid *string `json:"ExecutionSid,omitempty"` + // The SID of the Flow + FlowSid *string `json:"FlowSid,omitempty"` + // The absolute URL of the resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/studio/v2/model_studio_v2_flow_execution_execution_step.go b/twilio/rest/studio/v2/model_studio_v2_flow_execution_execution_step.go index 9f10139d2..307f7c077 100644 --- a/twilio/rest/studio/v2/model_studio_v2_flow_execution_execution_step.go +++ b/twilio/rest/studio/v2/model_studio_v2_flow_execution_execution_step.go @@ -17,16 +17,28 @@ import ( // StudioV2FlowExecutionExecutionStep struct for StudioV2FlowExecutionExecutionStep type StudioV2FlowExecutionExecutionStep struct { - AccountSid *string `json:"AccountSid,omitempty"` - Context *map[string]interface{} `json:"Context,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - ExecutionSid *string `json:"ExecutionSid,omitempty"` - FlowSid *string `json:"FlowSid,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - Name *string `json:"Name,omitempty"` - Sid *string `json:"Sid,omitempty"` - TransitionedFrom *string `json:"TransitionedFrom,omitempty"` - TransitionedTo *string `json:"TransitionedTo,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The current state of the flow + Context *map[string]interface{} `json:"Context,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The SID of the Execution + ExecutionSid *string `json:"ExecutionSid,omitempty"` + // The SID of the Flow + FlowSid *string `json:"FlowSid,omitempty"` + // The URLs of related resources + Links *map[string]interface{} `json:"Links,omitempty"` + // The event that caused the Flow to transition to the Step + Name *string `json:"Name,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The Widget that preceded the Widget for the Step + TransitionedFrom *string `json:"TransitionedFrom,omitempty"` + // The Widget that will follow the Widget for the Step + TransitionedTo *string `json:"TransitionedTo,omitempty"` + // The absolute URL of the resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/studio/v2/model_studio_v2_flow_execution_execution_step_execution_step_context.go b/twilio/rest/studio/v2/model_studio_v2_flow_execution_execution_step_execution_step_context.go index d5103b244..bc4aff514 100644 --- a/twilio/rest/studio/v2/model_studio_v2_flow_execution_execution_step_execution_step_context.go +++ b/twilio/rest/studio/v2/model_studio_v2_flow_execution_execution_step_execution_step_context.go @@ -13,10 +13,16 @@ package openapi // StudioV2FlowExecutionExecutionStepExecutionStepContext struct for StudioV2FlowExecutionExecutionStepExecutionStepContext type StudioV2FlowExecutionExecutionStepExecutionStepContext struct { - AccountSid *string `json:"AccountSid,omitempty"` - Context *map[string]interface{} `json:"Context,omitempty"` - ExecutionSid *string `json:"ExecutionSid,omitempty"` - FlowSid *string `json:"FlowSid,omitempty"` - StepSid *string `json:"StepSid,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The current state of the flow + Context *map[string]interface{} `json:"Context,omitempty"` + // The SID of the Execution + ExecutionSid *string `json:"ExecutionSid,omitempty"` + // The SID of the Flow + FlowSid *string `json:"FlowSid,omitempty"` + // Step SID + StepSid *string `json:"StepSid,omitempty"` + // The absolute URL of the resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/studio/v2/model_studio_v2_flow_flow_revision.go b/twilio/rest/studio/v2/model_studio_v2_flow_flow_revision.go index 3d89abed2..3a5d305de 100644 --- a/twilio/rest/studio/v2/model_studio_v2_flow_flow_revision.go +++ b/twilio/rest/studio/v2/model_studio_v2_flow_flow_revision.go @@ -17,16 +17,28 @@ import ( // StudioV2FlowFlowRevision struct for StudioV2FlowFlowRevision type StudioV2FlowFlowRevision struct { - AccountSid *string `json:"AccountSid,omitempty"` - CommitMessage *string `json:"CommitMessage,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Definition *map[string]interface{} `json:"Definition,omitempty"` - Errors *[]map[string]interface{} `json:"Errors,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Revision *int32 `json:"Revision,omitempty"` - Sid *string `json:"Sid,omitempty"` - Status *FlowRevisionStatus `json:"Status,omitempty"` - Url *string `json:"Url,omitempty"` - Valid *bool `json:"Valid,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // Description of change made in the revision + CommitMessage *string `json:"CommitMessage,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // JSON representation of flow definition + Definition *map[string]interface{} `json:"Definition,omitempty"` + // List of error in the flow definition + Errors *[]map[string]interface{} `json:"Errors,omitempty"` + // The string that you assigned to describe the Flow + FriendlyName *string `json:"FriendlyName,omitempty"` + // The latest revision number of the Flow's definition + Revision *int32 `json:"Revision,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The status of the Flow + Status *string `json:"Status,omitempty"` + // The absolute URL of the resource + Url *string `json:"Url,omitempty"` + // Boolean if the flow definition is valid + Valid *bool `json:"Valid,omitempty"` } diff --git a/twilio/rest/studio/v2/model_studio_v2_flow_test_user.go b/twilio/rest/studio/v2/model_studio_v2_flow_test_user.go index b039a3c2d..efa0a555a 100644 --- a/twilio/rest/studio/v2/model_studio_v2_flow_test_user.go +++ b/twilio/rest/studio/v2/model_studio_v2_flow_test_user.go @@ -13,7 +13,10 @@ package openapi // StudioV2FlowTestUser struct for StudioV2FlowTestUser type StudioV2FlowTestUser struct { - Sid *string `json:"Sid,omitempty"` + // Unique identifier of the flow. + Sid *string `json:"Sid,omitempty"` + // List of test user identities that can test draft versions of the flow. TestUsers *[]string `json:"TestUsers,omitempty"` - Url *string `json:"Url,omitempty"` + // The URL of this resource. + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/studio/v2/model_studio_v2_flow_validate.go b/twilio/rest/studio/v2/model_studio_v2_flow_validate.go index 8086d07a9..efad64eb0 100644 --- a/twilio/rest/studio/v2/model_studio_v2_flow_validate.go +++ b/twilio/rest/studio/v2/model_studio_v2_flow_validate.go @@ -13,5 +13,6 @@ package openapi // StudioV2FlowValidate struct for StudioV2FlowValidate type StudioV2FlowValidate struct { + // Boolean if the flow definition is valid Valid *bool `json:"Valid,omitempty"` } diff --git a/twilio/rest/supersim/v1/README.md b/twilio/rest/supersim/v1/README.md index b51b1ab8d..3a0075c83 100644 --- a/twilio/rest/supersim/v1/README.md +++ b/twilio/rest/supersim/v1/README.md @@ -56,10 +56,6 @@ Class | Method | HTTP request | Description ## Documentation For Models - - [CommandDirection](docs/CommandDirection.md) - - [CommandStatus](docs/CommandStatus.md) - - [FleetDataMetering](docs/FleetDataMetering.md) - - [HttpMethod](docs/HttpMethod.md) - [ListCommandResponse](docs/ListCommandResponse.md) - [ListCommandResponseMeta](docs/ListCommandResponseMeta.md) - [ListFleetResponse](docs/ListFleetResponse.md) @@ -68,7 +64,6 @@ Class | Method | HTTP request | Description - [ListNetworkResponse](docs/ListNetworkResponse.md) - [ListSimResponse](docs/ListSimResponse.md) - [ListUsageRecordResponse](docs/ListUsageRecordResponse.md) - - [SimStatus](docs/SimStatus.md) - [SupersimV1Command](docs/SupersimV1Command.md) - [SupersimV1Fleet](docs/SupersimV1Fleet.md) - [SupersimV1Network](docs/SupersimV1Network.md) diff --git a/twilio/rest/supersim/v1/docs/ListCommandResponse.md b/twilio/rest/supersim/v1/docs/ListCommandResponse.md index 37437518d..aa16fd1ef 100644 --- a/twilio/rest/supersim/v1/docs/ListCommandResponse.md +++ b/twilio/rest/supersim/v1/docs/ListCommandResponse.md @@ -1,10 +1,10 @@ # ListCommandResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Commands** | [**[]SupersimV1Command**](supersim.v1.command.md) | [optional] -**Meta** | [**ListCommandResponseMeta**](ListCommandResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Commands** | [**[]SupersimV1Command**](supersim.v1.command.md) | |[optional] +**Meta** | [**ListCommandResponseMeta**](ListCommandResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/supersim/v1/docs/ListCommandResponseMeta.md b/twilio/rest/supersim/v1/docs/ListCommandResponseMeta.md index 4ed98de65..919cb757a 100644 --- a/twilio/rest/supersim/v1/docs/ListCommandResponseMeta.md +++ b/twilio/rest/supersim/v1/docs/ListCommandResponseMeta.md @@ -1,15 +1,15 @@ # ListCommandResponseMeta ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**FirstPageUrl** | **string** | [optional] -**Key** | **string** | [optional] -**NextPageUrl** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUrl** | **string** | [optional] -**Url** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstPageUrl** | **string** | |[optional] +**Key** | **string** | |[optional] +**NextPageUrl** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUrl** | **string** | |[optional] +**Url** | **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/twilio/rest/supersim/v1/docs/ListFleetResponse.md b/twilio/rest/supersim/v1/docs/ListFleetResponse.md index a1ebed5c1..cd3668a5a 100644 --- a/twilio/rest/supersim/v1/docs/ListFleetResponse.md +++ b/twilio/rest/supersim/v1/docs/ListFleetResponse.md @@ -1,10 +1,10 @@ # ListFleetResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Fleets** | [**[]SupersimV1Fleet**](supersim.v1.fleet.md) | [optional] -**Meta** | [**ListCommandResponseMeta**](ListCommandResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Fleets** | [**[]SupersimV1Fleet**](supersim.v1.fleet.md) | |[optional] +**Meta** | [**ListCommandResponseMeta**](ListCommandResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/supersim/v1/docs/ListNetworkAccessProfileNetworkResponse.md b/twilio/rest/supersim/v1/docs/ListNetworkAccessProfileNetworkResponse.md index c98ae5bdf..be05f09ce 100644 --- a/twilio/rest/supersim/v1/docs/ListNetworkAccessProfileNetworkResponse.md +++ b/twilio/rest/supersim/v1/docs/ListNetworkAccessProfileNetworkResponse.md @@ -1,10 +1,10 @@ # ListNetworkAccessProfileNetworkResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListCommandResponseMeta**](ListCommandResponse_meta.md) | [optional] -**Networks** | [**[]SupersimV1NetworkAccessProfileNetworkAccessProfileNetwork**](supersim.v1.network_access_profile.network_access_profile_network.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListCommandResponseMeta**](ListCommandResponse_meta.md) | |[optional] +**Networks** | [**[]SupersimV1NetworkAccessProfileNetworkAccessProfileNetwork**](supersim.v1.network_access_profile.network_access_profile_network.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/supersim/v1/docs/ListNetworkAccessProfileResponse.md b/twilio/rest/supersim/v1/docs/ListNetworkAccessProfileResponse.md index c6c12deb3..7d4939e9f 100644 --- a/twilio/rest/supersim/v1/docs/ListNetworkAccessProfileResponse.md +++ b/twilio/rest/supersim/v1/docs/ListNetworkAccessProfileResponse.md @@ -1,10 +1,10 @@ # ListNetworkAccessProfileResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListCommandResponseMeta**](ListCommandResponse_meta.md) | [optional] -**NetworkAccessProfiles** | [**[]SupersimV1NetworkAccessProfile**](supersim.v1.network_access_profile.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListCommandResponseMeta**](ListCommandResponse_meta.md) | |[optional] +**NetworkAccessProfiles** | [**[]SupersimV1NetworkAccessProfile**](supersim.v1.network_access_profile.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/supersim/v1/docs/ListNetworkResponse.md b/twilio/rest/supersim/v1/docs/ListNetworkResponse.md index 100d94105..d3f16a798 100644 --- a/twilio/rest/supersim/v1/docs/ListNetworkResponse.md +++ b/twilio/rest/supersim/v1/docs/ListNetworkResponse.md @@ -1,10 +1,10 @@ # ListNetworkResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListCommandResponseMeta**](ListCommandResponse_meta.md) | [optional] -**Networks** | [**[]SupersimV1Network**](supersim.v1.network.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListCommandResponseMeta**](ListCommandResponse_meta.md) | |[optional] +**Networks** | [**[]SupersimV1Network**](supersim.v1.network.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/supersim/v1/docs/ListSimResponse.md b/twilio/rest/supersim/v1/docs/ListSimResponse.md index c02bcc1da..aa17ef77e 100644 --- a/twilio/rest/supersim/v1/docs/ListSimResponse.md +++ b/twilio/rest/supersim/v1/docs/ListSimResponse.md @@ -1,10 +1,10 @@ # ListSimResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListCommandResponseMeta**](ListCommandResponse_meta.md) | [optional] -**Sims** | [**[]SupersimV1Sim**](supersim.v1.sim.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListCommandResponseMeta**](ListCommandResponse_meta.md) | |[optional] +**Sims** | [**[]SupersimV1Sim**](supersim.v1.sim.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/supersim/v1/docs/ListUsageRecordResponse.md b/twilio/rest/supersim/v1/docs/ListUsageRecordResponse.md index d69764a85..d6b03ec8e 100644 --- a/twilio/rest/supersim/v1/docs/ListUsageRecordResponse.md +++ b/twilio/rest/supersim/v1/docs/ListUsageRecordResponse.md @@ -1,10 +1,10 @@ # ListUsageRecordResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListCommandResponseMeta**](ListCommandResponse_meta.md) | [optional] -**UsageRecords** | [**[]SupersimV1UsageRecord**](supersim.v1.usage_record.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListCommandResponseMeta**](ListCommandResponse_meta.md) | |[optional] +**UsageRecords** | [**[]SupersimV1UsageRecord**](supersim.v1.usage_record.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/supersim/v1/docs/SupersimV1Command.md b/twilio/rest/supersim/v1/docs/SupersimV1Command.md index c5996c15e..e8d8360c5 100644 --- a/twilio/rest/supersim/v1/docs/SupersimV1Command.md +++ b/twilio/rest/supersim/v1/docs/SupersimV1Command.md @@ -1,17 +1,17 @@ # SupersimV1Command ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Command** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**Direction** | Pointer to [**CommandDirection**](command_direction.md) | -**Sid** | Pointer to **string** | -**SimSid** | Pointer to **string** | -**Status** | Pointer to [**CommandStatus**](command_status.md) | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**Command** | Pointer to **string** | The message body of the command sent to or from the SIM | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was last updated | +**Direction** | Pointer to **string** | The direction of the Command | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**SimSid** | Pointer to **string** | The SID of the SIM that this Command was sent to or from | +**Status** | Pointer to **string** | The status of the Command | +**Url** | Pointer to **string** | The absolute URL of the Command resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/supersim/v1/docs/SupersimV1Fleet.md b/twilio/rest/supersim/v1/docs/SupersimV1Fleet.md index 1b7d9e04b..2024a837b 100644 --- a/twilio/rest/supersim/v1/docs/SupersimV1Fleet.md +++ b/twilio/rest/supersim/v1/docs/SupersimV1Fleet.md @@ -1,21 +1,21 @@ # SupersimV1Fleet ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**CommandsEnabled** | Pointer to **bool** | -**CommandsMethod** | Pointer to [**HttpMethod**](http_method.md) | -**CommandsUrl** | Pointer to **string** | -**DataEnabled** | Pointer to **bool** | -**DataLimit** | Pointer to **int32** | -**DataMetering** | Pointer to [**FleetDataMetering**](fleet_data_metering.md) | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**NetworkAccessProfileSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**UniqueName** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**CommandsEnabled** | Pointer to **bool** | Defines whether SIMs in the Fleet are capable of sending and receiving machine-to-machine SMS via Commands | +**CommandsMethod** | Pointer to **string** | A string representing the HTTP method to use when making a request to `commands_url` | +**CommandsUrl** | Pointer to **string** | The URL that will receive a webhook when a Super SIM in the Fleet is used to send an SMS from your device to the Commands number | +**DataEnabled** | Pointer to **bool** | Defines whether SIMs in the Fleet are capable of using data connectivity | +**DataLimit** | Pointer to **int32** | The total data usage (download and upload combined) in Megabytes that each Sim resource assigned to the Fleet resource can consume | +**DataMetering** | Pointer to **string** | The model by which a SIM is metered and billed | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was last updated | +**NetworkAccessProfileSid** | Pointer to **string** | The SID of the Network Access Profile of the Fleet | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**UniqueName** | Pointer to **string** | An application-defined string that uniquely identifies the resource | +**Url** | Pointer to **string** | The absolute URL of the Fleet resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/supersim/v1/docs/SupersimV1Network.md b/twilio/rest/supersim/v1/docs/SupersimV1Network.md index f6a531d10..968354edd 100644 --- a/twilio/rest/supersim/v1/docs/SupersimV1Network.md +++ b/twilio/rest/supersim/v1/docs/SupersimV1Network.md @@ -1,13 +1,13 @@ # SupersimV1Network ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**FriendlyName** | Pointer to **string** | -**Identifiers** | Pointer to **[]map[string]interface{}** | -**IsoCountry** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FriendlyName** | Pointer to **string** | A human readable identifier of this resource | +**Identifiers** | Pointer to **[]map[string]interface{}** | The MCC/MNCs included in the Network resource | +**IsoCountry** | Pointer to **string** | The ISO country code of the Network resource | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Url** | Pointer to **string** | The absolute URL of the Network resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/supersim/v1/docs/SupersimV1NetworkAccessProfile.md b/twilio/rest/supersim/v1/docs/SupersimV1NetworkAccessProfile.md index 5f2ffb738..f664a2c7b 100644 --- a/twilio/rest/supersim/v1/docs/SupersimV1NetworkAccessProfile.md +++ b/twilio/rest/supersim/v1/docs/SupersimV1NetworkAccessProfile.md @@ -1,15 +1,15 @@ # SupersimV1NetworkAccessProfile ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**Links** | Pointer to **map[string]interface{}** | -**Sid** | Pointer to **string** | -**UniqueName** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that the Network Access Profile belongs to | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was last updated | +**Links** | Pointer to **map[string]interface{}** | | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**UniqueName** | Pointer to **string** | An application-defined string that uniquely identifies the resource | +**Url** | Pointer to **string** | The absolute URL of the resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/supersim/v1/docs/SupersimV1NetworkAccessProfileNetworkAccessProfileNetwork.md b/twilio/rest/supersim/v1/docs/SupersimV1NetworkAccessProfileNetworkAccessProfileNetwork.md index 5496cfa87..bae7ab2e0 100644 --- a/twilio/rest/supersim/v1/docs/SupersimV1NetworkAccessProfileNetworkAccessProfileNetwork.md +++ b/twilio/rest/supersim/v1/docs/SupersimV1NetworkAccessProfileNetworkAccessProfileNetwork.md @@ -1,14 +1,14 @@ # SupersimV1NetworkAccessProfileNetworkAccessProfileNetwork ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**FriendlyName** | Pointer to **string** | -**Identifiers** | Pointer to **[]map[string]interface{}** | -**IsoCountry** | Pointer to **string** | -**NetworkAccessProfileSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FriendlyName** | Pointer to **string** | A human readable identifier of this resource | +**Identifiers** | Pointer to **[]map[string]interface{}** | The MCC/MNCs included in the resource | +**IsoCountry** | Pointer to **string** | The ISO country code of the Network resource | +**NetworkAccessProfileSid** | Pointer to **string** | The unique string that identifies the Network Access Profile resource | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Url** | Pointer to **string** | The absolute URL of the resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/supersim/v1/docs/SupersimV1Sim.md b/twilio/rest/supersim/v1/docs/SupersimV1Sim.md index 70d21b227..776087df9 100644 --- a/twilio/rest/supersim/v1/docs/SupersimV1Sim.md +++ b/twilio/rest/supersim/v1/docs/SupersimV1Sim.md @@ -1,17 +1,17 @@ # SupersimV1Sim ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**FleetSid** | Pointer to **string** | -**Iccid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Status** | Pointer to [**SimStatus**](sim_status.md) | -**UniqueName** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that the Super SIM belongs to | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was last updated | +**FleetSid** | Pointer to **string** | The unique ID of the Fleet configured for this SIM | +**Iccid** | Pointer to **string** | The ICCID associated with the SIM | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Status** | Pointer to **string** | The status of the Super SIM | +**UniqueName** | Pointer to **string** | An application-defined string that uniquely identifies the resource | +**Url** | Pointer to **string** | The absolute URL of the Sim Resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/supersim/v1/docs/SupersimV1UsageRecord.md b/twilio/rest/supersim/v1/docs/SupersimV1UsageRecord.md index ed61508af..793dc6860 100644 --- a/twilio/rest/supersim/v1/docs/SupersimV1UsageRecord.md +++ b/twilio/rest/supersim/v1/docs/SupersimV1UsageRecord.md @@ -1,17 +1,17 @@ # SupersimV1UsageRecord ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**DataDownload** | Pointer to **int32** | -**DataTotal** | Pointer to **int32** | -**DataUpload** | Pointer to **int32** | -**FleetSid** | Pointer to **string** | -**IsoCountry** | Pointer to **string** | -**NetworkSid** | Pointer to **string** | -**Period** | Pointer to **map[string]interface{}** | -**SimSid** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that incurred the usage. | +**DataDownload** | Pointer to **int32** | Total data downloaded in bytes, aggregated by the query parameters. | +**DataTotal** | Pointer to **int32** | Total of data_upload and data_download. | +**DataUpload** | Pointer to **int32** | Total data uploaded in bytes, aggregated by the query parameters. | +**FleetSid** | Pointer to **string** | SID of the Fleet resource on which the usage occurred. | +**IsoCountry** | Pointer to **string** | Alpha-2 ISO Country Code of the country the usage occurred in. | +**NetworkSid** | Pointer to **string** | SID of the Network resource on which the usage occurred. | +**Period** | Pointer to **map[string]interface{}** | The time period for which the usage is reported. | +**SimSid** | Pointer to **string** | SID of a Sim resource to which the UsageRecord belongs. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/supersim/v1/model_supersim_v1_command.go b/twilio/rest/supersim/v1/model_supersim_v1_command.go index 47d824e01..01b6fd38b 100644 --- a/twilio/rest/supersim/v1/model_supersim_v1_command.go +++ b/twilio/rest/supersim/v1/model_supersim_v1_command.go @@ -17,13 +17,22 @@ import ( // SupersimV1Command struct for SupersimV1Command type SupersimV1Command struct { - AccountSid *string `json:"AccountSid,omitempty"` - Command *string `json:"Command,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Direction *CommandDirection `json:"Direction,omitempty"` - Sid *string `json:"Sid,omitempty"` - SimSid *string `json:"SimSid,omitempty"` - Status *CommandStatus `json:"Status,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The message body of the command sent to or from the SIM + Command *string `json:"Command,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The direction of the Command + Direction *string `json:"Direction,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The SID of the SIM that this Command was sent to or from + SimSid *string `json:"SimSid,omitempty"` + // The status of the Command + Status *string `json:"Status,omitempty"` + // The absolute URL of the Command resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/supersim/v1/model_supersim_v1_fleet.go b/twilio/rest/supersim/v1/model_supersim_v1_fleet.go index 66ad5faf7..5238bc900 100644 --- a/twilio/rest/supersim/v1/model_supersim_v1_fleet.go +++ b/twilio/rest/supersim/v1/model_supersim_v1_fleet.go @@ -17,17 +17,30 @@ import ( // SupersimV1Fleet struct for SupersimV1Fleet type SupersimV1Fleet struct { - AccountSid *string `json:"AccountSid,omitempty"` - CommandsEnabled *bool `json:"CommandsEnabled,omitempty"` - CommandsMethod *HttpMethod `json:"CommandsMethod,omitempty"` - CommandsUrl *string `json:"CommandsUrl,omitempty"` - DataEnabled *bool `json:"DataEnabled,omitempty"` - DataLimit *int32 `json:"DataLimit,omitempty"` - DataMetering *FleetDataMetering `json:"DataMetering,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - NetworkAccessProfileSid *string `json:"NetworkAccessProfileSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // Defines whether SIMs in the Fleet are capable of sending and receiving machine-to-machine SMS via Commands + CommandsEnabled *bool `json:"CommandsEnabled,omitempty"` + // A string representing the HTTP method to use when making a request to `commands_url` + CommandsMethod *string `json:"CommandsMethod,omitempty"` + // The URL that will receive a webhook when a Super SIM in the Fleet is used to send an SMS from your device to the Commands number + CommandsUrl *string `json:"CommandsUrl,omitempty"` + // Defines whether SIMs in the Fleet are capable of using data connectivity + DataEnabled *bool `json:"DataEnabled,omitempty"` + // The total data usage (download and upload combined) in Megabytes that each Sim resource assigned to the Fleet resource can consume + DataLimit *int32 `json:"DataLimit,omitempty"` + // The model by which a SIM is metered and billed + DataMetering *string `json:"DataMetering,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The SID of the Network Access Profile of the Fleet + NetworkAccessProfileSid *string `json:"NetworkAccessProfileSid,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // An application-defined string that uniquely identifies the resource + UniqueName *string `json:"UniqueName,omitempty"` + // The absolute URL of the Fleet resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/supersim/v1/model_supersim_v1_network.go b/twilio/rest/supersim/v1/model_supersim_v1_network.go index 554c9aa1c..a1261cb2c 100644 --- a/twilio/rest/supersim/v1/model_supersim_v1_network.go +++ b/twilio/rest/supersim/v1/model_supersim_v1_network.go @@ -13,9 +13,14 @@ package openapi // SupersimV1Network struct for SupersimV1Network type SupersimV1Network struct { - FriendlyName *string `json:"FriendlyName,omitempty"` - Identifiers *[]map[string]interface{} `json:"Identifiers,omitempty"` - IsoCountry *string `json:"IsoCountry,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` + // A human readable identifier of this resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // The MCC/MNCs included in the Network resource + Identifiers *[]map[string]interface{} `json:"Identifiers,omitempty"` + // The ISO country code of the Network resource + IsoCountry *string `json:"IsoCountry,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The absolute URL of the Network resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/supersim/v1/model_supersim_v1_network_access_profile.go b/twilio/rest/supersim/v1/model_supersim_v1_network_access_profile.go index 8813bb5f3..d10d9d6f0 100644 --- a/twilio/rest/supersim/v1/model_supersim_v1_network_access_profile.go +++ b/twilio/rest/supersim/v1/model_supersim_v1_network_access_profile.go @@ -17,11 +17,17 @@ import ( // SupersimV1NetworkAccessProfile struct for SupersimV1NetworkAccessProfile type SupersimV1NetworkAccessProfile struct { - AccountSid *string `json:"AccountSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` + // The SID of the Account that the Network Access Profile belongs to + AccountSid *string `json:"AccountSid,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the resource was last updated DateUpdated *time.Time `json:"DateUpdated,omitempty"` Links *map[string]interface{} `json:"Links,omitempty"` - Sid *string `json:"Sid,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` - Url *string `json:"Url,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // An application-defined string that uniquely identifies the resource + UniqueName *string `json:"UniqueName,omitempty"` + // The absolute URL of the resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/supersim/v1/model_supersim_v1_network_access_profile_network_access_profile_network.go b/twilio/rest/supersim/v1/model_supersim_v1_network_access_profile_network_access_profile_network.go index fba82f572..475a10894 100644 --- a/twilio/rest/supersim/v1/model_supersim_v1_network_access_profile_network_access_profile_network.go +++ b/twilio/rest/supersim/v1/model_supersim_v1_network_access_profile_network_access_profile_network.go @@ -13,10 +13,16 @@ package openapi // SupersimV1NetworkAccessProfileNetworkAccessProfileNetwork struct for SupersimV1NetworkAccessProfileNetworkAccessProfileNetwork type SupersimV1NetworkAccessProfileNetworkAccessProfileNetwork struct { - FriendlyName *string `json:"FriendlyName,omitempty"` - Identifiers *[]map[string]interface{} `json:"Identifiers,omitempty"` - IsoCountry *string `json:"IsoCountry,omitempty"` - NetworkAccessProfileSid *string `json:"NetworkAccessProfileSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` + // A human readable identifier of this resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // The MCC/MNCs included in the resource + Identifiers *[]map[string]interface{} `json:"Identifiers,omitempty"` + // The ISO country code of the Network resource + IsoCountry *string `json:"IsoCountry,omitempty"` + // The unique string that identifies the Network Access Profile resource + NetworkAccessProfileSid *string `json:"NetworkAccessProfileSid,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The absolute URL of the resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/supersim/v1/model_supersim_v1_sim.go b/twilio/rest/supersim/v1/model_supersim_v1_sim.go index 1b4e18885..bc437849f 100644 --- a/twilio/rest/supersim/v1/model_supersim_v1_sim.go +++ b/twilio/rest/supersim/v1/model_supersim_v1_sim.go @@ -17,13 +17,22 @@ import ( // SupersimV1Sim struct for SupersimV1Sim type SupersimV1Sim struct { - AccountSid *string `json:"AccountSid,omitempty"` + // The SID of the Account that the Super SIM belongs to + AccountSid *string `json:"AccountSid,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the resource was last updated DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FleetSid *string `json:"FleetSid,omitempty"` - Iccid *string `json:"Iccid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Status *SimStatus `json:"Status,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` - Url *string `json:"Url,omitempty"` + // The unique ID of the Fleet configured for this SIM + FleetSid *string `json:"FleetSid,omitempty"` + // The ICCID associated with the SIM + Iccid *string `json:"Iccid,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The status of the Super SIM + Status *string `json:"Status,omitempty"` + // An application-defined string that uniquely identifies the resource + UniqueName *string `json:"UniqueName,omitempty"` + // The absolute URL of the Sim Resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/supersim/v1/model_supersim_v1_usage_record.go b/twilio/rest/supersim/v1/model_supersim_v1_usage_record.go index 95946771f..354d67e99 100644 --- a/twilio/rest/supersim/v1/model_supersim_v1_usage_record.go +++ b/twilio/rest/supersim/v1/model_supersim_v1_usage_record.go @@ -13,13 +13,22 @@ package openapi // SupersimV1UsageRecord struct for SupersimV1UsageRecord type SupersimV1UsageRecord struct { - AccountSid *string `json:"AccountSid,omitempty"` - DataDownload *int32 `json:"DataDownload,omitempty"` - DataTotal *int32 `json:"DataTotal,omitempty"` - DataUpload *int32 `json:"DataUpload,omitempty"` - FleetSid *string `json:"FleetSid,omitempty"` - IsoCountry *string `json:"IsoCountry,omitempty"` - NetworkSid *string `json:"NetworkSid,omitempty"` - Period *map[string]interface{} `json:"Period,omitempty"` - SimSid *string `json:"SimSid,omitempty"` + // The SID of the Account that incurred the usage. + AccountSid *string `json:"AccountSid,omitempty"` + // Total data downloaded in bytes, aggregated by the query parameters. + DataDownload *int32 `json:"DataDownload,omitempty"` + // Total of data_upload and data_download. + DataTotal *int32 `json:"DataTotal,omitempty"` + // Total data uploaded in bytes, aggregated by the query parameters. + DataUpload *int32 `json:"DataUpload,omitempty"` + // SID of the Fleet resource on which the usage occurred. + FleetSid *string `json:"FleetSid,omitempty"` + // Alpha-2 ISO Country Code of the country the usage occurred in. + IsoCountry *string `json:"IsoCountry,omitempty"` + // SID of the Network resource on which the usage occurred. + NetworkSid *string `json:"NetworkSid,omitempty"` + // The time period for which the usage is reported. + Period *map[string]interface{} `json:"Period,omitempty"` + // SID of a Sim resource to which the UsageRecord belongs. + SimSid *string `json:"SimSid,omitempty"` } diff --git a/twilio/rest/sync/v1/docs/ListDocumentPermissionResponse.md b/twilio/rest/sync/v1/docs/ListDocumentPermissionResponse.md index 97e35ca6c..900228364 100644 --- a/twilio/rest/sync/v1/docs/ListDocumentPermissionResponse.md +++ b/twilio/rest/sync/v1/docs/ListDocumentPermissionResponse.md @@ -1,10 +1,10 @@ # ListDocumentPermissionResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | [optional] -**Permissions** | [**[]SyncV1ServiceDocumentDocumentPermission**](sync.v1.service.document.document_permission.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | |[optional] +**Permissions** | [**[]SyncV1ServiceDocumentDocumentPermission**](sync.v1.service.document.document_permission.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/sync/v1/docs/ListDocumentResponse.md b/twilio/rest/sync/v1/docs/ListDocumentResponse.md index 6dff200be..46f474b01 100644 --- a/twilio/rest/sync/v1/docs/ListDocumentResponse.md +++ b/twilio/rest/sync/v1/docs/ListDocumentResponse.md @@ -1,10 +1,10 @@ # ListDocumentResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Documents** | [**[]SyncV1ServiceDocument**](sync.v1.service.document.md) | [optional] -**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Documents** | [**[]SyncV1ServiceDocument**](sync.v1.service.document.md) | |[optional] +**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/sync/v1/docs/ListServiceResponse.md b/twilio/rest/sync/v1/docs/ListServiceResponse.md index 7589a8915..9bc75840d 100644 --- a/twilio/rest/sync/v1/docs/ListServiceResponse.md +++ b/twilio/rest/sync/v1/docs/ListServiceResponse.md @@ -1,10 +1,10 @@ # ListServiceResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | [optional] -**Services** | [**[]SyncV1Service**](sync.v1.service.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | |[optional] +**Services** | [**[]SyncV1Service**](sync.v1.service.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/sync/v1/docs/ListServiceResponseMeta.md b/twilio/rest/sync/v1/docs/ListServiceResponseMeta.md index ce4085ffe..6628758e1 100644 --- a/twilio/rest/sync/v1/docs/ListServiceResponseMeta.md +++ b/twilio/rest/sync/v1/docs/ListServiceResponseMeta.md @@ -1,15 +1,15 @@ # ListServiceResponseMeta ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**FirstPageUrl** | **string** | [optional] -**Key** | **string** | [optional] -**NextPageUrl** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUrl** | **string** | [optional] -**Url** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstPageUrl** | **string** | |[optional] +**Key** | **string** | |[optional] +**NextPageUrl** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUrl** | **string** | |[optional] +**Url** | **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/twilio/rest/sync/v1/docs/ListSyncListItemResponse.md b/twilio/rest/sync/v1/docs/ListSyncListItemResponse.md index 5dcec4cec..461f53f8a 100644 --- a/twilio/rest/sync/v1/docs/ListSyncListItemResponse.md +++ b/twilio/rest/sync/v1/docs/ListSyncListItemResponse.md @@ -1,10 +1,10 @@ # ListSyncListItemResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Items** | [**[]SyncV1ServiceSyncListSyncListItem**](sync.v1.service.sync_list.sync_list_item.md) | [optional] -**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Items** | [**[]SyncV1ServiceSyncListSyncListItem**](sync.v1.service.sync_list.sync_list_item.md) | |[optional] +**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/sync/v1/docs/ListSyncListPermissionResponse.md b/twilio/rest/sync/v1/docs/ListSyncListPermissionResponse.md index beca2b148..eb51a30ed 100644 --- a/twilio/rest/sync/v1/docs/ListSyncListPermissionResponse.md +++ b/twilio/rest/sync/v1/docs/ListSyncListPermissionResponse.md @@ -1,10 +1,10 @@ # ListSyncListPermissionResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | [optional] -**Permissions** | [**[]SyncV1ServiceSyncListSyncListPermission**](sync.v1.service.sync_list.sync_list_permission.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | |[optional] +**Permissions** | [**[]SyncV1ServiceSyncListSyncListPermission**](sync.v1.service.sync_list.sync_list_permission.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/sync/v1/docs/ListSyncListResponse.md b/twilio/rest/sync/v1/docs/ListSyncListResponse.md index f57511ac2..6f58c66f0 100644 --- a/twilio/rest/sync/v1/docs/ListSyncListResponse.md +++ b/twilio/rest/sync/v1/docs/ListSyncListResponse.md @@ -1,10 +1,10 @@ # ListSyncListResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Lists** | [**[]SyncV1ServiceSyncList**](sync.v1.service.sync_list.md) | [optional] -**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Lists** | [**[]SyncV1ServiceSyncList**](sync.v1.service.sync_list.md) | |[optional] +**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/sync/v1/docs/ListSyncMapItemResponse.md b/twilio/rest/sync/v1/docs/ListSyncMapItemResponse.md index 1d323d602..bb4d883d7 100644 --- a/twilio/rest/sync/v1/docs/ListSyncMapItemResponse.md +++ b/twilio/rest/sync/v1/docs/ListSyncMapItemResponse.md @@ -1,10 +1,10 @@ # ListSyncMapItemResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Items** | [**[]SyncV1ServiceSyncMapSyncMapItem**](sync.v1.service.sync_map.sync_map_item.md) | [optional] -**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Items** | [**[]SyncV1ServiceSyncMapSyncMapItem**](sync.v1.service.sync_map.sync_map_item.md) | |[optional] +**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/sync/v1/docs/ListSyncMapPermissionResponse.md b/twilio/rest/sync/v1/docs/ListSyncMapPermissionResponse.md index 509e69e82..a1506b39b 100644 --- a/twilio/rest/sync/v1/docs/ListSyncMapPermissionResponse.md +++ b/twilio/rest/sync/v1/docs/ListSyncMapPermissionResponse.md @@ -1,10 +1,10 @@ # ListSyncMapPermissionResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | [optional] -**Permissions** | [**[]SyncV1ServiceSyncMapSyncMapPermission**](sync.v1.service.sync_map.sync_map_permission.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | |[optional] +**Permissions** | [**[]SyncV1ServiceSyncMapSyncMapPermission**](sync.v1.service.sync_map.sync_map_permission.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/sync/v1/docs/ListSyncMapResponse.md b/twilio/rest/sync/v1/docs/ListSyncMapResponse.md index b5caf84fa..2d0d5a19e 100644 --- a/twilio/rest/sync/v1/docs/ListSyncMapResponse.md +++ b/twilio/rest/sync/v1/docs/ListSyncMapResponse.md @@ -1,10 +1,10 @@ # ListSyncMapResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Maps** | [**[]SyncV1ServiceSyncMap**](sync.v1.service.sync_map.md) | [optional] -**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Maps** | [**[]SyncV1ServiceSyncMap**](sync.v1.service.sync_map.md) | |[optional] +**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/sync/v1/docs/ListSyncStreamResponse.md b/twilio/rest/sync/v1/docs/ListSyncStreamResponse.md index 4978a2d44..6236178bb 100644 --- a/twilio/rest/sync/v1/docs/ListSyncStreamResponse.md +++ b/twilio/rest/sync/v1/docs/ListSyncStreamResponse.md @@ -1,10 +1,10 @@ # ListSyncStreamResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | [optional] -**Streams** | [**[]SyncV1ServiceSyncStream**](sync.v1.service.sync_stream.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | |[optional] +**Streams** | [**[]SyncV1ServiceSyncStream**](sync.v1.service.sync_stream.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/sync/v1/docs/SyncV1Service.md b/twilio/rest/sync/v1/docs/SyncV1Service.md index db3cd026f..9ee594921 100644 --- a/twilio/rest/sync/v1/docs/SyncV1Service.md +++ b/twilio/rest/sync/v1/docs/SyncV1Service.md @@ -1,22 +1,22 @@ # SyncV1Service ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**AclEnabled** | Pointer to **bool** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**FriendlyName** | Pointer to **string** | -**Links** | Pointer to **map[string]interface{}** | -**ReachabilityDebouncingEnabled** | Pointer to **bool** | -**ReachabilityDebouncingWindow** | Pointer to **int32** | -**ReachabilityWebhooksEnabled** | Pointer to **bool** | -**Sid** | Pointer to **string** | -**UniqueName** | Pointer to **string** | -**Url** | Pointer to **string** | -**WebhookUrl** | Pointer to **string** | -**WebhooksFromRestEnabled** | Pointer to **bool** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**AclEnabled** | Pointer to **bool** | Whether token identities in the Service must be granted access to Sync objects by using the Permissions resource | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was last updated | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the resource | +**Links** | Pointer to **map[string]interface{}** | The URLs of related resources | +**ReachabilityDebouncingEnabled** | Pointer to **bool** | Whether every endpoint_disconnected event occurs after a configurable delay | +**ReachabilityDebouncingWindow** | Pointer to **int32** | The reachability event delay in milliseconds | +**ReachabilityWebhooksEnabled** | Pointer to **bool** | Whether the service instance calls webhook_url when client endpoints connect to Sync | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**UniqueName** | Pointer to **string** | An application-defined string that uniquely identifies the resource | +**Url** | Pointer to **string** | The absolute URL of the Service resource | +**WebhookUrl** | Pointer to **string** | The URL we call when Sync objects are manipulated | +**WebhooksFromRestEnabled** | Pointer to **bool** | Whether the Service instance should call webhook_url when the REST API is used to update Sync objects | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/sync/v1/docs/SyncV1ServiceDocument.md b/twilio/rest/sync/v1/docs/SyncV1ServiceDocument.md index 13a638d4b..8eb008b59 100644 --- a/twilio/rest/sync/v1/docs/SyncV1ServiceDocument.md +++ b/twilio/rest/sync/v1/docs/SyncV1ServiceDocument.md @@ -1,20 +1,20 @@ # SyncV1ServiceDocument ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**CreatedBy** | Pointer to **string** | -**Data** | Pointer to **map[string]interface{}** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateExpires** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**Links** | Pointer to **map[string]interface{}** | -**Revision** | Pointer to **string** | -**ServiceSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**UniqueName** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**CreatedBy** | Pointer to **string** | The identity of the Sync Document's creator | +**Data** | Pointer to **map[string]interface{}** | An arbitrary, schema-less object that the Sync Document stores | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**DateExpires** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the Sync Document expires | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was last updated | +**Links** | Pointer to **map[string]interface{}** | The URLs of resources related to the Sync Document | +**Revision** | Pointer to **string** | The current revision of the Sync Document, represented by a string identifier | +**ServiceSid** | Pointer to **string** | The SID of the Sync Service that the resource is associated with | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**UniqueName** | Pointer to **string** | An application-defined string that uniquely identifies the resource | +**Url** | Pointer to **string** | The absolute URL of the Document resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/sync/v1/docs/SyncV1ServiceDocumentDocumentPermission.md b/twilio/rest/sync/v1/docs/SyncV1ServiceDocumentDocumentPermission.md index 067507fa5..5f3597871 100644 --- a/twilio/rest/sync/v1/docs/SyncV1ServiceDocumentDocumentPermission.md +++ b/twilio/rest/sync/v1/docs/SyncV1ServiceDocumentDocumentPermission.md @@ -1,16 +1,16 @@ # SyncV1ServiceDocumentDocumentPermission ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**DocumentSid** | Pointer to **string** | -**Identity** | Pointer to **string** | -**Manage** | Pointer to **bool** | -**Read** | Pointer to **bool** | -**ServiceSid** | Pointer to **string** | -**Url** | Pointer to **string** | -**Write** | Pointer to **bool** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**DocumentSid** | Pointer to **string** | The Sync Document SID | +**Identity** | Pointer to **string** | The identity of the user to whom the Sync Document Permission applies | +**Manage** | Pointer to **bool** | Manage access | +**Read** | Pointer to **bool** | Read access | +**ServiceSid** | Pointer to **string** | The SID of the Sync Service that the resource is associated with | +**Url** | Pointer to **string** | The absolute URL of the Sync Document Permission resource | +**Write** | Pointer to **bool** | Write access | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/sync/v1/docs/SyncV1ServiceSyncList.md b/twilio/rest/sync/v1/docs/SyncV1ServiceSyncList.md index fab7ba055..14baeac0d 100644 --- a/twilio/rest/sync/v1/docs/SyncV1ServiceSyncList.md +++ b/twilio/rest/sync/v1/docs/SyncV1ServiceSyncList.md @@ -1,19 +1,19 @@ # SyncV1ServiceSyncList ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**CreatedBy** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateExpires** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**Links** | Pointer to **map[string]interface{}** | -**Revision** | Pointer to **string** | -**ServiceSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**UniqueName** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**CreatedBy** | Pointer to **string** | The identity of the Sync List's creator | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**DateExpires** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the Sync List expires | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was last updated | +**Links** | Pointer to **map[string]interface{}** | The URLs of the Sync List's nested resources | +**Revision** | Pointer to **string** | The current revision of the Sync List, represented as a string | +**ServiceSid** | Pointer to **string** | The SID of the Sync Service that the resource is associated with | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**UniqueName** | Pointer to **string** | An application-defined string that uniquely identifies the resource | +**Url** | Pointer to **string** | The absolute URL of the Sync List resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/sync/v1/docs/SyncV1ServiceSyncListSyncListItem.md b/twilio/rest/sync/v1/docs/SyncV1ServiceSyncListSyncListItem.md index 4016b59de..4f196b86f 100644 --- a/twilio/rest/sync/v1/docs/SyncV1ServiceSyncListSyncListItem.md +++ b/twilio/rest/sync/v1/docs/SyncV1ServiceSyncListSyncListItem.md @@ -1,19 +1,19 @@ # SyncV1ServiceSyncListSyncListItem ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**CreatedBy** | Pointer to **string** | -**Data** | Pointer to **map[string]interface{}** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateExpires** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**Index** | Pointer to **int32** | -**ListSid** | Pointer to **string** | -**Revision** | Pointer to **string** | -**ServiceSid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**CreatedBy** | Pointer to **string** | The identity of the List Item's creator | +**Data** | Pointer to **map[string]interface{}** | An arbitrary, schema-less object that the List Item stores | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**DateExpires** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the List Item expires | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was last updated | +**Index** | Pointer to **int32** | The automatically generated index of the List Item | +**ListSid** | Pointer to **string** | The SID of the Sync List that contains the List Item | +**Revision** | Pointer to **string** | The current revision of the item, represented as a string | +**ServiceSid** | Pointer to **string** | The SID of the Sync Service that the resource is associated with | +**Url** | Pointer to **string** | The absolute URL of the List Item resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/sync/v1/docs/SyncV1ServiceSyncListSyncListPermission.md b/twilio/rest/sync/v1/docs/SyncV1ServiceSyncListSyncListPermission.md index ccb03dddc..739a76d63 100644 --- a/twilio/rest/sync/v1/docs/SyncV1ServiceSyncListSyncListPermission.md +++ b/twilio/rest/sync/v1/docs/SyncV1ServiceSyncListSyncListPermission.md @@ -1,16 +1,16 @@ # SyncV1ServiceSyncListSyncListPermission ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Identity** | Pointer to **string** | -**ListSid** | Pointer to **string** | -**Manage** | Pointer to **bool** | -**Read** | Pointer to **bool** | -**ServiceSid** | Pointer to **string** | -**Url** | Pointer to **string** | -**Write** | Pointer to **bool** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**Identity** | Pointer to **string** | The identity of the user to whom the Sync List Permission applies | +**ListSid** | Pointer to **string** | The SID of the Sync List to which the Permission applies | +**Manage** | Pointer to **bool** | Manage access | +**Read** | Pointer to **bool** | Read access | +**ServiceSid** | Pointer to **string** | The SID of the Sync Service that the resource is associated with | +**Url** | Pointer to **string** | The absolute URL of the Sync List Permission resource | +**Write** | Pointer to **bool** | Write access | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/sync/v1/docs/SyncV1ServiceSyncMap.md b/twilio/rest/sync/v1/docs/SyncV1ServiceSyncMap.md index f6f6a9a97..7dd664717 100644 --- a/twilio/rest/sync/v1/docs/SyncV1ServiceSyncMap.md +++ b/twilio/rest/sync/v1/docs/SyncV1ServiceSyncMap.md @@ -1,19 +1,19 @@ # SyncV1ServiceSyncMap ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**CreatedBy** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateExpires** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**Links** | Pointer to **map[string]interface{}** | -**Revision** | Pointer to **string** | -**ServiceSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**UniqueName** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**CreatedBy** | Pointer to **string** | The identity of the Sync Map's creator | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**DateExpires** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the Sync Map expires | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was last updated | +**Links** | Pointer to **map[string]interface{}** | The URLs of the Sync Map's nested resources | +**Revision** | Pointer to **string** | The current revision of the Sync Map, represented as a string | +**ServiceSid** | Pointer to **string** | The SID of the Sync Service that the resource is associated with | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**UniqueName** | Pointer to **string** | An application-defined string that uniquely identifies the resource | +**Url** | Pointer to **string** | The absolute URL of the Sync Map resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/sync/v1/docs/SyncV1ServiceSyncMapSyncMapItem.md b/twilio/rest/sync/v1/docs/SyncV1ServiceSyncMapSyncMapItem.md index d0697a4a5..7200903c3 100644 --- a/twilio/rest/sync/v1/docs/SyncV1ServiceSyncMapSyncMapItem.md +++ b/twilio/rest/sync/v1/docs/SyncV1ServiceSyncMapSyncMapItem.md @@ -1,19 +1,19 @@ # SyncV1ServiceSyncMapSyncMapItem ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**CreatedBy** | Pointer to **string** | -**Data** | Pointer to **map[string]interface{}** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateExpires** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**Key** | Pointer to **string** | -**MapSid** | Pointer to **string** | -**Revision** | Pointer to **string** | -**ServiceSid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**CreatedBy** | Pointer to **string** | The identity of the Map Item's creator | +**Data** | Pointer to **map[string]interface{}** | An arbitrary, schema-less object that the Map Item stores | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**DateExpires** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the Map Item expires | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was last updated | +**Key** | Pointer to **string** | The unique, user-defined key for the Map Item | +**MapSid** | Pointer to **string** | The SID of the Sync Map that contains the Map Item | +**Revision** | Pointer to **string** | The current revision of the Map Item, represented as a string | +**ServiceSid** | Pointer to **string** | The SID of the Sync Service that the resource is associated with | +**Url** | Pointer to **string** | The absolute URL of the Map Item resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/sync/v1/docs/SyncV1ServiceSyncMapSyncMapPermission.md b/twilio/rest/sync/v1/docs/SyncV1ServiceSyncMapSyncMapPermission.md index 5ccfe17d5..2e48279a8 100644 --- a/twilio/rest/sync/v1/docs/SyncV1ServiceSyncMapSyncMapPermission.md +++ b/twilio/rest/sync/v1/docs/SyncV1ServiceSyncMapSyncMapPermission.md @@ -1,16 +1,16 @@ # SyncV1ServiceSyncMapSyncMapPermission ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Identity** | Pointer to **string** | -**Manage** | Pointer to **bool** | -**MapSid** | Pointer to **string** | -**Read** | Pointer to **bool** | -**ServiceSid** | Pointer to **string** | -**Url** | Pointer to **string** | -**Write** | Pointer to **bool** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**Identity** | Pointer to **string** | The identity of the user to whom the Sync Document Permission applies | +**Manage** | Pointer to **bool** | Manage access | +**MapSid** | Pointer to **string** | Sync Map SID | +**Read** | Pointer to **bool** | Read access | +**ServiceSid** | Pointer to **string** | The SID of the Sync Service that the resource is associated with | +**Url** | Pointer to **string** | The absolute URL of the Sync Map Permission resource | +**Write** | Pointer to **bool** | Write access | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/sync/v1/docs/SyncV1ServiceSyncStream.md b/twilio/rest/sync/v1/docs/SyncV1ServiceSyncStream.md index 4f8a38ec8..b144d8c67 100644 --- a/twilio/rest/sync/v1/docs/SyncV1ServiceSyncStream.md +++ b/twilio/rest/sync/v1/docs/SyncV1ServiceSyncStream.md @@ -1,18 +1,18 @@ # SyncV1ServiceSyncStream ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**CreatedBy** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateExpires** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**Links** | Pointer to **map[string]interface{}** | -**ServiceSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**UniqueName** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**CreatedBy** | Pointer to **string** | The Identity of the Stream's creator | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**DateExpires** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the Message Stream expires | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was last updated | +**Links** | Pointer to **map[string]interface{}** | The URLs of the Stream's nested resources | +**ServiceSid** | Pointer to **string** | The SID of the Sync Service that the resource is associated with | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**UniqueName** | Pointer to **string** | An application-defined string that uniquely identifies the resource | +**Url** | Pointer to **string** | The absolute URL of the Message Stream resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/sync/v1/docs/SyncV1ServiceSyncStreamStreamMessage.md b/twilio/rest/sync/v1/docs/SyncV1ServiceSyncStreamStreamMessage.md index fff617082..a3175258c 100644 --- a/twilio/rest/sync/v1/docs/SyncV1ServiceSyncStreamStreamMessage.md +++ b/twilio/rest/sync/v1/docs/SyncV1ServiceSyncStreamStreamMessage.md @@ -1,10 +1,10 @@ # SyncV1ServiceSyncStreamStreamMessage ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Data** | Pointer to **map[string]interface{}** | -**Sid** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to **map[string]interface{}** | Stream Message body | +**Sid** | Pointer to **string** | The unique string that identifies the resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/sync/v1/model_sync_v1_service.go b/twilio/rest/sync/v1/model_sync_v1_service.go index 28778e342..3a1566374 100644 --- a/twilio/rest/sync/v1/model_sync_v1_service.go +++ b/twilio/rest/sync/v1/model_sync_v1_service.go @@ -17,18 +17,32 @@ import ( // SyncV1Service struct for SyncV1Service type SyncV1Service struct { - AccountSid *string `json:"AccountSid,omitempty"` - AclEnabled *bool `json:"AclEnabled,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - ReachabilityDebouncingEnabled *bool `json:"ReachabilityDebouncingEnabled,omitempty"` - ReachabilityDebouncingWindow *int32 `json:"ReachabilityDebouncingWindow,omitempty"` - ReachabilityWebhooksEnabled *bool `json:"ReachabilityWebhooksEnabled,omitempty"` - Sid *string `json:"Sid,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` - Url *string `json:"Url,omitempty"` - WebhookUrl *string `json:"WebhookUrl,omitempty"` - WebhooksFromRestEnabled *bool `json:"WebhooksFromRestEnabled,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // Whether token identities in the Service must be granted access to Sync objects by using the Permissions resource + AclEnabled *bool `json:"AclEnabled,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The string that you assigned to describe the resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // The URLs of related resources + Links *map[string]interface{} `json:"Links,omitempty"` + // Whether every endpoint_disconnected event occurs after a configurable delay + ReachabilityDebouncingEnabled *bool `json:"ReachabilityDebouncingEnabled,omitempty"` + // The reachability event delay in milliseconds + ReachabilityDebouncingWindow *int32 `json:"ReachabilityDebouncingWindow,omitempty"` + // Whether the service instance calls webhook_url when client endpoints connect to Sync + ReachabilityWebhooksEnabled *bool `json:"ReachabilityWebhooksEnabled,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // An application-defined string that uniquely identifies the resource + UniqueName *string `json:"UniqueName,omitempty"` + // The absolute URL of the Service resource + Url *string `json:"Url,omitempty"` + // The URL we call when Sync objects are manipulated + WebhookUrl *string `json:"WebhookUrl,omitempty"` + // Whether the Service instance should call webhook_url when the REST API is used to update Sync objects + WebhooksFromRestEnabled *bool `json:"WebhooksFromRestEnabled,omitempty"` } diff --git a/twilio/rest/sync/v1/model_sync_v1_service_document.go b/twilio/rest/sync/v1/model_sync_v1_service_document.go index 294c3b058..5bcbf4f73 100644 --- a/twilio/rest/sync/v1/model_sync_v1_service_document.go +++ b/twilio/rest/sync/v1/model_sync_v1_service_document.go @@ -17,16 +17,28 @@ import ( // SyncV1ServiceDocument struct for SyncV1ServiceDocument type SyncV1ServiceDocument struct { - AccountSid *string `json:"AccountSid,omitempty"` - CreatedBy *string `json:"CreatedBy,omitempty"` - Data *map[string]interface{} `json:"Data,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateExpires *time.Time `json:"DateExpires,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - Revision *string `json:"Revision,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The identity of the Sync Document's creator + CreatedBy *string `json:"CreatedBy,omitempty"` + // An arbitrary, schema-less object that the Sync Document stores + Data *map[string]interface{} `json:"Data,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the Sync Document expires + DateExpires *time.Time `json:"DateExpires,omitempty"` + // The ISO 8601 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The URLs of resources related to the Sync Document + Links *map[string]interface{} `json:"Links,omitempty"` + // The current revision of the Sync Document, represented by a string identifier + Revision *string `json:"Revision,omitempty"` + // The SID of the Sync Service that the resource is associated with + ServiceSid *string `json:"ServiceSid,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // An application-defined string that uniquely identifies the resource + UniqueName *string `json:"UniqueName,omitempty"` + // The absolute URL of the Document resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/sync/v1/model_sync_v1_service_document_document_permission.go b/twilio/rest/sync/v1/model_sync_v1_service_document_document_permission.go index 5c2a0a917..16bc4177a 100644 --- a/twilio/rest/sync/v1/model_sync_v1_service_document_document_permission.go +++ b/twilio/rest/sync/v1/model_sync_v1_service_document_document_permission.go @@ -13,12 +13,20 @@ package openapi // SyncV1ServiceDocumentDocumentPermission struct for SyncV1ServiceDocumentDocumentPermission type SyncV1ServiceDocumentDocumentPermission struct { - AccountSid *string `json:"AccountSid,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The Sync Document SID DocumentSid *string `json:"DocumentSid,omitempty"` - Identity *string `json:"Identity,omitempty"` - Manage *bool `json:"Manage,omitempty"` - Read *bool `json:"Read,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Url *string `json:"Url,omitempty"` - Write *bool `json:"Write,omitempty"` + // The identity of the user to whom the Sync Document Permission applies + Identity *string `json:"Identity,omitempty"` + // Manage access + Manage *bool `json:"Manage,omitempty"` + // Read access + Read *bool `json:"Read,omitempty"` + // The SID of the Sync Service that the resource is associated with + ServiceSid *string `json:"ServiceSid,omitempty"` + // The absolute URL of the Sync Document Permission resource + Url *string `json:"Url,omitempty"` + // Write access + Write *bool `json:"Write,omitempty"` } diff --git a/twilio/rest/sync/v1/model_sync_v1_service_sync_list.go b/twilio/rest/sync/v1/model_sync_v1_service_sync_list.go index 8c08fd412..804206a5f 100644 --- a/twilio/rest/sync/v1/model_sync_v1_service_sync_list.go +++ b/twilio/rest/sync/v1/model_sync_v1_service_sync_list.go @@ -17,15 +17,26 @@ import ( // SyncV1ServiceSyncList struct for SyncV1ServiceSyncList type SyncV1ServiceSyncList struct { - AccountSid *string `json:"AccountSid,omitempty"` - CreatedBy *string `json:"CreatedBy,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateExpires *time.Time `json:"DateExpires,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - Revision *string `json:"Revision,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The identity of the Sync List's creator + CreatedBy *string `json:"CreatedBy,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the Sync List expires + DateExpires *time.Time `json:"DateExpires,omitempty"` + // The ISO 8601 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The URLs of the Sync List's nested resources + Links *map[string]interface{} `json:"Links,omitempty"` + // The current revision of the Sync List, represented as a string + Revision *string `json:"Revision,omitempty"` + // The SID of the Sync Service that the resource is associated with + ServiceSid *string `json:"ServiceSid,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // An application-defined string that uniquely identifies the resource + UniqueName *string `json:"UniqueName,omitempty"` + // The absolute URL of the Sync List resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/sync/v1/model_sync_v1_service_sync_list_sync_list_item.go b/twilio/rest/sync/v1/model_sync_v1_service_sync_list_sync_list_item.go index 9a6a454df..f48dc36ac 100644 --- a/twilio/rest/sync/v1/model_sync_v1_service_sync_list_sync_list_item.go +++ b/twilio/rest/sync/v1/model_sync_v1_service_sync_list_sync_list_item.go @@ -17,15 +17,26 @@ import ( // SyncV1ServiceSyncListSyncListItem struct for SyncV1ServiceSyncListSyncListItem type SyncV1ServiceSyncListSyncListItem struct { - AccountSid *string `json:"AccountSid,omitempty"` - CreatedBy *string `json:"CreatedBy,omitempty"` - Data *map[string]interface{} `json:"Data,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateExpires *time.Time `json:"DateExpires,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Index *int32 `json:"Index,omitempty"` - ListSid *string `json:"ListSid,omitempty"` - Revision *string `json:"Revision,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The identity of the List Item's creator + CreatedBy *string `json:"CreatedBy,omitempty"` + // An arbitrary, schema-less object that the List Item stores + Data *map[string]interface{} `json:"Data,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the List Item expires + DateExpires *time.Time `json:"DateExpires,omitempty"` + // The ISO 8601 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The automatically generated index of the List Item + Index *int32 `json:"Index,omitempty"` + // The SID of the Sync List that contains the List Item + ListSid *string `json:"ListSid,omitempty"` + // The current revision of the item, represented as a string + Revision *string `json:"Revision,omitempty"` + // The SID of the Sync Service that the resource is associated with + ServiceSid *string `json:"ServiceSid,omitempty"` + // The absolute URL of the List Item resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/sync/v1/model_sync_v1_service_sync_list_sync_list_permission.go b/twilio/rest/sync/v1/model_sync_v1_service_sync_list_sync_list_permission.go index b5e083823..0c932f3a7 100644 --- a/twilio/rest/sync/v1/model_sync_v1_service_sync_list_sync_list_permission.go +++ b/twilio/rest/sync/v1/model_sync_v1_service_sync_list_sync_list_permission.go @@ -13,12 +13,20 @@ package openapi // SyncV1ServiceSyncListSyncListPermission struct for SyncV1ServiceSyncListSyncListPermission type SyncV1ServiceSyncListSyncListPermission struct { + // The SID of the Account that created the resource AccountSid *string `json:"AccountSid,omitempty"` - Identity *string `json:"Identity,omitempty"` - ListSid *string `json:"ListSid,omitempty"` - Manage *bool `json:"Manage,omitempty"` - Read *bool `json:"Read,omitempty"` + // The identity of the user to whom the Sync List Permission applies + Identity *string `json:"Identity,omitempty"` + // The SID of the Sync List to which the Permission applies + ListSid *string `json:"ListSid,omitempty"` + // Manage access + Manage *bool `json:"Manage,omitempty"` + // Read access + Read *bool `json:"Read,omitempty"` + // The SID of the Sync Service that the resource is associated with ServiceSid *string `json:"ServiceSid,omitempty"` - Url *string `json:"Url,omitempty"` - Write *bool `json:"Write,omitempty"` + // The absolute URL of the Sync List Permission resource + Url *string `json:"Url,omitempty"` + // Write access + Write *bool `json:"Write,omitempty"` } diff --git a/twilio/rest/sync/v1/model_sync_v1_service_sync_map.go b/twilio/rest/sync/v1/model_sync_v1_service_sync_map.go index 3cc53ec76..66877b36a 100644 --- a/twilio/rest/sync/v1/model_sync_v1_service_sync_map.go +++ b/twilio/rest/sync/v1/model_sync_v1_service_sync_map.go @@ -17,15 +17,26 @@ import ( // SyncV1ServiceSyncMap struct for SyncV1ServiceSyncMap type SyncV1ServiceSyncMap struct { - AccountSid *string `json:"AccountSid,omitempty"` - CreatedBy *string `json:"CreatedBy,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateExpires *time.Time `json:"DateExpires,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - Revision *string `json:"Revision,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The identity of the Sync Map's creator + CreatedBy *string `json:"CreatedBy,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the Sync Map expires + DateExpires *time.Time `json:"DateExpires,omitempty"` + // The ISO 8601 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The URLs of the Sync Map's nested resources + Links *map[string]interface{} `json:"Links,omitempty"` + // The current revision of the Sync Map, represented as a string + Revision *string `json:"Revision,omitempty"` + // The SID of the Sync Service that the resource is associated with + ServiceSid *string `json:"ServiceSid,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // An application-defined string that uniquely identifies the resource + UniqueName *string `json:"UniqueName,omitempty"` + // The absolute URL of the Sync Map resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/sync/v1/model_sync_v1_service_sync_map_sync_map_item.go b/twilio/rest/sync/v1/model_sync_v1_service_sync_map_sync_map_item.go index 2d809761d..707181731 100644 --- a/twilio/rest/sync/v1/model_sync_v1_service_sync_map_sync_map_item.go +++ b/twilio/rest/sync/v1/model_sync_v1_service_sync_map_sync_map_item.go @@ -17,15 +17,26 @@ import ( // SyncV1ServiceSyncMapSyncMapItem struct for SyncV1ServiceSyncMapSyncMapItem type SyncV1ServiceSyncMapSyncMapItem struct { - AccountSid *string `json:"AccountSid,omitempty"` - CreatedBy *string `json:"CreatedBy,omitempty"` - Data *map[string]interface{} `json:"Data,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateExpires *time.Time `json:"DateExpires,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Key *string `json:"Key,omitempty"` - MapSid *string `json:"MapSid,omitempty"` - Revision *string `json:"Revision,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The identity of the Map Item's creator + CreatedBy *string `json:"CreatedBy,omitempty"` + // An arbitrary, schema-less object that the Map Item stores + Data *map[string]interface{} `json:"Data,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the Map Item expires + DateExpires *time.Time `json:"DateExpires,omitempty"` + // The ISO 8601 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The unique, user-defined key for the Map Item + Key *string `json:"Key,omitempty"` + // The SID of the Sync Map that contains the Map Item + MapSid *string `json:"MapSid,omitempty"` + // The current revision of the Map Item, represented as a string + Revision *string `json:"Revision,omitempty"` + // The SID of the Sync Service that the resource is associated with + ServiceSid *string `json:"ServiceSid,omitempty"` + // The absolute URL of the Map Item resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/sync/v1/model_sync_v1_service_sync_map_sync_map_permission.go b/twilio/rest/sync/v1/model_sync_v1_service_sync_map_sync_map_permission.go index cf0ddb214..284c6bda4 100644 --- a/twilio/rest/sync/v1/model_sync_v1_service_sync_map_sync_map_permission.go +++ b/twilio/rest/sync/v1/model_sync_v1_service_sync_map_sync_map_permission.go @@ -13,12 +13,20 @@ package openapi // SyncV1ServiceSyncMapSyncMapPermission struct for SyncV1ServiceSyncMapSyncMapPermission type SyncV1ServiceSyncMapSyncMapPermission struct { + // The SID of the Account that created the resource AccountSid *string `json:"AccountSid,omitempty"` - Identity *string `json:"Identity,omitempty"` - Manage *bool `json:"Manage,omitempty"` - MapSid *string `json:"MapSid,omitempty"` - Read *bool `json:"Read,omitempty"` + // The identity of the user to whom the Sync Document Permission applies + Identity *string `json:"Identity,omitempty"` + // Manage access + Manage *bool `json:"Manage,omitempty"` + // Sync Map SID + MapSid *string `json:"MapSid,omitempty"` + // Read access + Read *bool `json:"Read,omitempty"` + // The SID of the Sync Service that the resource is associated with ServiceSid *string `json:"ServiceSid,omitempty"` - Url *string `json:"Url,omitempty"` - Write *bool `json:"Write,omitempty"` + // The absolute URL of the Sync Map Permission resource + Url *string `json:"Url,omitempty"` + // Write access + Write *bool `json:"Write,omitempty"` } diff --git a/twilio/rest/sync/v1/model_sync_v1_service_sync_stream.go b/twilio/rest/sync/v1/model_sync_v1_service_sync_stream.go index 4eb6b4df4..b0e1c66f0 100644 --- a/twilio/rest/sync/v1/model_sync_v1_service_sync_stream.go +++ b/twilio/rest/sync/v1/model_sync_v1_service_sync_stream.go @@ -17,14 +17,24 @@ import ( // SyncV1ServiceSyncStream struct for SyncV1ServiceSyncStream type SyncV1ServiceSyncStream struct { - AccountSid *string `json:"AccountSid,omitempty"` - CreatedBy *string `json:"CreatedBy,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateExpires *time.Time `json:"DateExpires,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The Identity of the Stream's creator + CreatedBy *string `json:"CreatedBy,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the Message Stream expires + DateExpires *time.Time `json:"DateExpires,omitempty"` + // The ISO 8601 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The URLs of the Stream's nested resources + Links *map[string]interface{} `json:"Links,omitempty"` + // The SID of the Sync Service that the resource is associated with + ServiceSid *string `json:"ServiceSid,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // An application-defined string that uniquely identifies the resource + UniqueName *string `json:"UniqueName,omitempty"` + // The absolute URL of the Message Stream resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/sync/v1/model_sync_v1_service_sync_stream_stream_message.go b/twilio/rest/sync/v1/model_sync_v1_service_sync_stream_stream_message.go index ffc2caddc..f4df9f1ed 100644 --- a/twilio/rest/sync/v1/model_sync_v1_service_sync_stream_stream_message.go +++ b/twilio/rest/sync/v1/model_sync_v1_service_sync_stream_stream_message.go @@ -13,6 +13,8 @@ package openapi // SyncV1ServiceSyncStreamStreamMessage struct for SyncV1ServiceSyncStreamStreamMessage type SyncV1ServiceSyncStreamStreamMessage struct { + // Stream Message body Data *map[string]interface{} `json:"Data,omitempty"` - Sid *string `json:"Sid,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` } diff --git a/twilio/rest/taskrouter/v1/README.md b/twilio/rest/taskrouter/v1/README.md index 225fe39bc..4657a761e 100644 --- a/twilio/rest/taskrouter/v1/README.md +++ b/twilio/rest/taskrouter/v1/README.md @@ -108,9 +108,6 @@ Class | Method | HTTP request | Description - [ListWorkflowResponse](docs/ListWorkflowResponse.md) - [ListWorkspaceResponse](docs/ListWorkspaceResponse.md) - [ListWorkspaceResponseMeta](docs/ListWorkspaceResponseMeta.md) - - [TaskQueueTaskOrder](docs/TaskQueueTaskOrder.md) - - [TaskReservationStatus](docs/TaskReservationStatus.md) - - [TaskStatus](docs/TaskStatus.md) - [TaskrouterV1Workspace](docs/TaskrouterV1Workspace.md) - [TaskrouterV1WorkspaceActivity](docs/TaskrouterV1WorkspaceActivity.md) - [TaskrouterV1WorkspaceEvent](docs/TaskrouterV1WorkspaceEvent.md) @@ -136,8 +133,6 @@ Class | Method | HTTP request | Description - [TaskrouterV1WorkspaceWorkspaceCumulativeStatistics](docs/TaskrouterV1WorkspaceWorkspaceCumulativeStatistics.md) - [TaskrouterV1WorkspaceWorkspaceRealTimeStatistics](docs/TaskrouterV1WorkspaceWorkspaceRealTimeStatistics.md) - [TaskrouterV1WorkspaceWorkspaceStatistics](docs/TaskrouterV1WorkspaceWorkspaceStatistics.md) - - [WorkerReservationStatus](docs/WorkerReservationStatus.md) - - [WorkspaceQueueOrder](docs/WorkspaceQueueOrder.md) ## Documentation For Authorization diff --git a/twilio/rest/taskrouter/v1/docs/ListActivityResponse.md b/twilio/rest/taskrouter/v1/docs/ListActivityResponse.md index 738dfa385..5ccb4f358 100644 --- a/twilio/rest/taskrouter/v1/docs/ListActivityResponse.md +++ b/twilio/rest/taskrouter/v1/docs/ListActivityResponse.md @@ -1,10 +1,10 @@ # ListActivityResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Activities** | [**[]TaskrouterV1WorkspaceActivity**](taskrouter.v1.workspace.activity.md) | [optional] -**Meta** | [**ListWorkspaceResponseMeta**](ListWorkspaceResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Activities** | [**[]TaskrouterV1WorkspaceActivity**](taskrouter.v1.workspace.activity.md) | |[optional] +**Meta** | [**ListWorkspaceResponseMeta**](ListWorkspaceResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/taskrouter/v1/docs/ListEventResponse.md b/twilio/rest/taskrouter/v1/docs/ListEventResponse.md index a1a6fb35d..fa5918359 100644 --- a/twilio/rest/taskrouter/v1/docs/ListEventResponse.md +++ b/twilio/rest/taskrouter/v1/docs/ListEventResponse.md @@ -1,10 +1,10 @@ # ListEventResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Events** | [**[]TaskrouterV1WorkspaceEvent**](taskrouter.v1.workspace.event.md) | [optional] -**Meta** | [**ListWorkspaceResponseMeta**](ListWorkspaceResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Events** | [**[]TaskrouterV1WorkspaceEvent**](taskrouter.v1.workspace.event.md) | |[optional] +**Meta** | [**ListWorkspaceResponseMeta**](ListWorkspaceResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/taskrouter/v1/docs/ListTaskChannelResponse.md b/twilio/rest/taskrouter/v1/docs/ListTaskChannelResponse.md index 29c0f9150..80e417bb8 100644 --- a/twilio/rest/taskrouter/v1/docs/ListTaskChannelResponse.md +++ b/twilio/rest/taskrouter/v1/docs/ListTaskChannelResponse.md @@ -1,10 +1,10 @@ # ListTaskChannelResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Channels** | [**[]TaskrouterV1WorkspaceTaskChannel**](taskrouter.v1.workspace.task_channel.md) | [optional] -**Meta** | [**ListWorkspaceResponseMeta**](ListWorkspaceResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Channels** | [**[]TaskrouterV1WorkspaceTaskChannel**](taskrouter.v1.workspace.task_channel.md) | |[optional] +**Meta** | [**ListWorkspaceResponseMeta**](ListWorkspaceResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/taskrouter/v1/docs/ListTaskQueueResponse.md b/twilio/rest/taskrouter/v1/docs/ListTaskQueueResponse.md index fdc636abb..93951a3cc 100644 --- a/twilio/rest/taskrouter/v1/docs/ListTaskQueueResponse.md +++ b/twilio/rest/taskrouter/v1/docs/ListTaskQueueResponse.md @@ -1,10 +1,10 @@ # ListTaskQueueResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListWorkspaceResponseMeta**](ListWorkspaceResponse_meta.md) | [optional] -**TaskQueues** | [**[]TaskrouterV1WorkspaceTaskQueue**](taskrouter.v1.workspace.task_queue.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListWorkspaceResponseMeta**](ListWorkspaceResponse_meta.md) | |[optional] +**TaskQueues** | [**[]TaskrouterV1WorkspaceTaskQueue**](taskrouter.v1.workspace.task_queue.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/taskrouter/v1/docs/ListTaskQueuesStatisticsResponse.md b/twilio/rest/taskrouter/v1/docs/ListTaskQueuesStatisticsResponse.md index 52f6cb8dd..082486738 100644 --- a/twilio/rest/taskrouter/v1/docs/ListTaskQueuesStatisticsResponse.md +++ b/twilio/rest/taskrouter/v1/docs/ListTaskQueuesStatisticsResponse.md @@ -1,10 +1,10 @@ # ListTaskQueuesStatisticsResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListWorkspaceResponseMeta**](ListWorkspaceResponse_meta.md) | [optional] -**TaskQueuesStatistics** | [**[]TaskrouterV1WorkspaceTaskQueueTaskQueuesStatistics**](taskrouter.v1.workspace.task_queue.task_queues_statistics.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListWorkspaceResponseMeta**](ListWorkspaceResponse_meta.md) | |[optional] +**TaskQueuesStatistics** | [**[]TaskrouterV1WorkspaceTaskQueueTaskQueuesStatistics**](taskrouter.v1.workspace.task_queue.task_queues_statistics.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/taskrouter/v1/docs/ListTaskReservationResponse.md b/twilio/rest/taskrouter/v1/docs/ListTaskReservationResponse.md index eb398c163..2b106358c 100644 --- a/twilio/rest/taskrouter/v1/docs/ListTaskReservationResponse.md +++ b/twilio/rest/taskrouter/v1/docs/ListTaskReservationResponse.md @@ -1,10 +1,10 @@ # ListTaskReservationResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListWorkspaceResponseMeta**](ListWorkspaceResponse_meta.md) | [optional] -**Reservations** | [**[]TaskrouterV1WorkspaceTaskTaskReservation**](taskrouter.v1.workspace.task.task_reservation.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListWorkspaceResponseMeta**](ListWorkspaceResponse_meta.md) | |[optional] +**Reservations** | [**[]TaskrouterV1WorkspaceTaskTaskReservation**](taskrouter.v1.workspace.task.task_reservation.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/taskrouter/v1/docs/ListTaskResponse.md b/twilio/rest/taskrouter/v1/docs/ListTaskResponse.md index 2b865911f..ce43f1fee 100644 --- a/twilio/rest/taskrouter/v1/docs/ListTaskResponse.md +++ b/twilio/rest/taskrouter/v1/docs/ListTaskResponse.md @@ -1,10 +1,10 @@ # ListTaskResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListWorkspaceResponseMeta**](ListWorkspaceResponse_meta.md) | [optional] -**Tasks** | [**[]TaskrouterV1WorkspaceTask**](taskrouter.v1.workspace.task.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListWorkspaceResponseMeta**](ListWorkspaceResponse_meta.md) | |[optional] +**Tasks** | [**[]TaskrouterV1WorkspaceTask**](taskrouter.v1.workspace.task.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/taskrouter/v1/docs/ListWorkerChannelResponse.md b/twilio/rest/taskrouter/v1/docs/ListWorkerChannelResponse.md index d68af4455..7123c6407 100644 --- a/twilio/rest/taskrouter/v1/docs/ListWorkerChannelResponse.md +++ b/twilio/rest/taskrouter/v1/docs/ListWorkerChannelResponse.md @@ -1,10 +1,10 @@ # ListWorkerChannelResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Channels** | [**[]TaskrouterV1WorkspaceWorkerWorkerChannel**](taskrouter.v1.workspace.worker.worker_channel.md) | [optional] -**Meta** | [**ListWorkspaceResponseMeta**](ListWorkspaceResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Channels** | [**[]TaskrouterV1WorkspaceWorkerWorkerChannel**](taskrouter.v1.workspace.worker.worker_channel.md) | |[optional] +**Meta** | [**ListWorkspaceResponseMeta**](ListWorkspaceResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/taskrouter/v1/docs/ListWorkerReservationResponse.md b/twilio/rest/taskrouter/v1/docs/ListWorkerReservationResponse.md index fbcc37e5a..1dd476038 100644 --- a/twilio/rest/taskrouter/v1/docs/ListWorkerReservationResponse.md +++ b/twilio/rest/taskrouter/v1/docs/ListWorkerReservationResponse.md @@ -1,10 +1,10 @@ # ListWorkerReservationResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListWorkspaceResponseMeta**](ListWorkspaceResponse_meta.md) | [optional] -**Reservations** | [**[]TaskrouterV1WorkspaceWorkerWorkerReservation**](taskrouter.v1.workspace.worker.worker_reservation.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListWorkspaceResponseMeta**](ListWorkspaceResponse_meta.md) | |[optional] +**Reservations** | [**[]TaskrouterV1WorkspaceWorkerWorkerReservation**](taskrouter.v1.workspace.worker.worker_reservation.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/taskrouter/v1/docs/ListWorkerResponse.md b/twilio/rest/taskrouter/v1/docs/ListWorkerResponse.md index 6e67e5436..2ba7ed191 100644 --- a/twilio/rest/taskrouter/v1/docs/ListWorkerResponse.md +++ b/twilio/rest/taskrouter/v1/docs/ListWorkerResponse.md @@ -1,10 +1,10 @@ # ListWorkerResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListWorkspaceResponseMeta**](ListWorkspaceResponse_meta.md) | [optional] -**Workers** | [**[]TaskrouterV1WorkspaceWorker**](taskrouter.v1.workspace.worker.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListWorkspaceResponseMeta**](ListWorkspaceResponse_meta.md) | |[optional] +**Workers** | [**[]TaskrouterV1WorkspaceWorker**](taskrouter.v1.workspace.worker.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/taskrouter/v1/docs/ListWorkflowResponse.md b/twilio/rest/taskrouter/v1/docs/ListWorkflowResponse.md index fbae94358..4207952eb 100644 --- a/twilio/rest/taskrouter/v1/docs/ListWorkflowResponse.md +++ b/twilio/rest/taskrouter/v1/docs/ListWorkflowResponse.md @@ -1,10 +1,10 @@ # ListWorkflowResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListWorkspaceResponseMeta**](ListWorkspaceResponse_meta.md) | [optional] -**Workflows** | [**[]TaskrouterV1WorkspaceWorkflow**](taskrouter.v1.workspace.workflow.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListWorkspaceResponseMeta**](ListWorkspaceResponse_meta.md) | |[optional] +**Workflows** | [**[]TaskrouterV1WorkspaceWorkflow**](taskrouter.v1.workspace.workflow.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/taskrouter/v1/docs/ListWorkspaceResponse.md b/twilio/rest/taskrouter/v1/docs/ListWorkspaceResponse.md index c99664f78..f71a0fec7 100644 --- a/twilio/rest/taskrouter/v1/docs/ListWorkspaceResponse.md +++ b/twilio/rest/taskrouter/v1/docs/ListWorkspaceResponse.md @@ -1,10 +1,10 @@ # ListWorkspaceResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListWorkspaceResponseMeta**](ListWorkspaceResponse_meta.md) | [optional] -**Workspaces** | [**[]TaskrouterV1Workspace**](taskrouter.v1.workspace.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListWorkspaceResponseMeta**](ListWorkspaceResponse_meta.md) | |[optional] +**Workspaces** | [**[]TaskrouterV1Workspace**](taskrouter.v1.workspace.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/taskrouter/v1/docs/ListWorkspaceResponseMeta.md b/twilio/rest/taskrouter/v1/docs/ListWorkspaceResponseMeta.md index 19b8a0722..b7b5b9f9b 100644 --- a/twilio/rest/taskrouter/v1/docs/ListWorkspaceResponseMeta.md +++ b/twilio/rest/taskrouter/v1/docs/ListWorkspaceResponseMeta.md @@ -1,15 +1,15 @@ # ListWorkspaceResponseMeta ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**FirstPageUrl** | **string** | [optional] -**Key** | **string** | [optional] -**NextPageUrl** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUrl** | **string** | [optional] -**Url** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstPageUrl** | **string** | |[optional] +**Key** | **string** | |[optional] +**NextPageUrl** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUrl** | **string** | |[optional] +**Url** | **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/twilio/rest/taskrouter/v1/docs/TaskrouterV1Workspace.md b/twilio/rest/taskrouter/v1/docs/TaskrouterV1Workspace.md index 22c843ef0..a2634168c 100644 --- a/twilio/rest/taskrouter/v1/docs/TaskrouterV1Workspace.md +++ b/twilio/rest/taskrouter/v1/docs/TaskrouterV1Workspace.md @@ -1,23 +1,23 @@ # TaskrouterV1Workspace ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**DefaultActivityName** | Pointer to **string** | -**DefaultActivitySid** | Pointer to **string** | -**EventCallbackUrl** | Pointer to **string** | -**EventsFilter** | Pointer to **string** | -**FriendlyName** | Pointer to **string** | -**Links** | Pointer to **map[string]interface{}** | -**MultiTaskEnabled** | Pointer to **bool** | -**PrioritizeQueueOrder** | Pointer to [**WorkspaceQueueOrder**](workspace_queue_order.md) | -**Sid** | Pointer to **string** | -**TimeoutActivityName** | Pointer to **string** | -**TimeoutActivitySid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was last updated | +**DefaultActivityName** | Pointer to **string** | The name of the default activity | +**DefaultActivitySid** | Pointer to **string** | The SID of the Activity that will be used when new Workers are created in the Workspace | +**EventCallbackUrl** | Pointer to **string** | The URL we call when an event occurs | +**EventsFilter** | Pointer to **string** | The list of Workspace events for which to call event_callback_url | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the Workspace resource | +**Links** | Pointer to **map[string]interface{}** | The URLs of related resources | +**MultiTaskEnabled** | Pointer to **bool** | Whether multi-tasking is enabled | +**PrioritizeQueueOrder** | Pointer to **string** | The type of TaskQueue to prioritize when Workers are receiving Tasks from both types of TaskQueues | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**TimeoutActivityName** | Pointer to **string** | The name of the timeout activity | +**TimeoutActivitySid** | Pointer to **string** | The SID of the Activity that will be assigned to a Worker when a Task reservation times out without a response | +**Url** | Pointer to **string** | The absolute URL of the Workspace resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceActivity.md b/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceActivity.md index 5a1ae811a..879fdfe4b 100644 --- a/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceActivity.md +++ b/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceActivity.md @@ -1,16 +1,16 @@ # TaskrouterV1WorkspaceActivity ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Available** | Pointer to **bool** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**FriendlyName** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Url** | Pointer to **string** | -**WorkspaceSid** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**Available** | Pointer to **bool** | Whether the Worker should be eligible to receive a Task when it occupies the Activity | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was last updated | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the Activity resource | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Url** | Pointer to **string** | The absolute URL of the Activity resource | +**WorkspaceSid** | Pointer to **string** | The SID of the Workspace that contains the Activity | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceEvent.md b/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceEvent.md index c7c0e9f67..11137a571 100644 --- a/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceEvent.md +++ b/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceEvent.md @@ -1,25 +1,25 @@ # TaskrouterV1WorkspaceEvent ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**ActorSid** | Pointer to **string** | -**ActorType** | Pointer to **string** | -**ActorUrl** | Pointer to **string** | -**Description** | Pointer to **string** | -**EventData** | Pointer to **map[string]interface{}** | -**EventDate** | Pointer to [**time.Time**](time.Time.md) | -**EventDateMs** | Pointer to **int32** | -**EventType** | Pointer to **string** | -**ResourceSid** | Pointer to **string** | -**ResourceType** | Pointer to **string** | -**ResourceUrl** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Source** | Pointer to **string** | -**SourceIpAddress** | Pointer to **string** | -**Url** | Pointer to **string** | -**WorkspaceSid** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**ActorSid** | Pointer to **string** | The SID of the resource that triggered the event | +**ActorType** | Pointer to **string** | The type of resource that triggered the event | +**ActorUrl** | Pointer to **string** | The absolute URL of the resource that triggered the event | +**Description** | Pointer to **string** | A description of the event | +**EventData** | Pointer to **map[string]interface{}** | Data about the event | +**EventDate** | Pointer to [**time.Time**](time.Time.md) | The time the event was sent | +**EventDateMs** | Pointer to **int32** | The time the event was sent in milliseconds | +**EventType** | Pointer to **string** | The identifier for the event | +**ResourceSid** | Pointer to **string** | The SID of the object the event is most relevant to | +**ResourceType** | Pointer to **string** | The type of object the event is most relevant to | +**ResourceUrl** | Pointer to **string** | The URL of the resource the event is most relevant to | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Source** | Pointer to **string** | Where the Event originated | +**SourceIpAddress** | Pointer to **string** | The IP from which the Event originated | +**Url** | Pointer to **string** | The absolute URL of the Event resource | +**WorkspaceSid** | Pointer to **string** | The SID of the Workspace that contains the Event | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceTask.md b/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceTask.md index f1ecefdbd..9b851bb68 100644 --- a/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceTask.md +++ b/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceTask.md @@ -1,29 +1,29 @@ # TaskrouterV1WorkspaceTask ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Addons** | Pointer to **string** | -**Age** | Pointer to **int32** | -**AssignmentStatus** | Pointer to [**TaskStatus**](task_status.md) | -**Attributes** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**Links** | Pointer to **map[string]interface{}** | -**Priority** | Pointer to **int32** | -**Reason** | Pointer to **string** | -**Sid** | Pointer to **string** | -**TaskChannelSid** | Pointer to **string** | -**TaskChannelUniqueName** | Pointer to **string** | -**TaskQueueEnteredDate** | Pointer to [**time.Time**](time.Time.md) | -**TaskQueueFriendlyName** | Pointer to **string** | -**TaskQueueSid** | Pointer to **string** | -**Timeout** | Pointer to **int32** | -**Url** | Pointer to **string** | -**WorkflowFriendlyName** | Pointer to **string** | -**WorkflowSid** | Pointer to **string** | -**WorkspaceSid** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**Addons** | Pointer to **string** | An object that contains the addon data for all installed addons | +**Age** | Pointer to **int32** | The number of seconds since the Task was created | +**AssignmentStatus** | Pointer to **string** | The current status of the Task's assignment | +**Attributes** | Pointer to **string** | The JSON string with custom attributes of the work | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was last updated | +**Links** | Pointer to **map[string]interface{}** | The URLs of related resources | +**Priority** | Pointer to **int32** | Retrieve the list of all Tasks in the Workspace with the specified priority | +**Reason** | Pointer to **string** | The reason the Task was canceled or completed | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**TaskChannelSid** | Pointer to **string** | The SID of the TaskChannel | +**TaskChannelUniqueName** | Pointer to **string** | The unique name of the TaskChannel | +**TaskQueueEnteredDate** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the Task entered the TaskQueue. | +**TaskQueueFriendlyName** | Pointer to **string** | The friendly name of the TaskQueue | +**TaskQueueSid** | Pointer to **string** | The SID of the TaskQueue | +**Timeout** | Pointer to **int32** | The amount of time in seconds that the Task can live before being assigned | +**Url** | Pointer to **string** | The absolute URL of the Task resource | +**WorkflowFriendlyName** | Pointer to **string** | The friendly name of the Workflow that is controlling the Task | +**WorkflowSid** | Pointer to **string** | The SID of the Workflow that is controlling the Task | +**WorkspaceSid** | Pointer to **string** | The SID of the Workspace that contains the Task | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceTaskChannel.md b/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceTaskChannel.md index 981947185..f41c713f5 100644 --- a/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceTaskChannel.md +++ b/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceTaskChannel.md @@ -1,18 +1,18 @@ # TaskrouterV1WorkspaceTaskChannel ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**ChannelOptimizedRouting** | Pointer to **bool** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**FriendlyName** | Pointer to **string** | -**Links** | Pointer to **map[string]interface{}** | -**Sid** | Pointer to **string** | -**UniqueName** | Pointer to **string** | -**Url** | Pointer to **string** | -**WorkspaceSid** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**ChannelOptimizedRouting** | Pointer to **bool** | Whether the Task Channel will prioritize Workers that have been idle | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was last updated | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the resource | +**Links** | Pointer to **map[string]interface{}** | The URLs of related resources | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**UniqueName** | Pointer to **string** | An application-defined string that uniquely identifies the Task Channel | +**Url** | Pointer to **string** | The absolute URL of the Task Channel resource | +**WorkspaceSid** | Pointer to **string** | The SID of the Workspace that contains the Task Channel | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceTaskQueue.md b/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceTaskQueue.md index 312121629..7c78a93ec 100644 --- a/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceTaskQueue.md +++ b/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceTaskQueue.md @@ -1,23 +1,23 @@ # TaskrouterV1WorkspaceTaskQueue ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**AssignmentActivityName** | Pointer to **string** | -**AssignmentActivitySid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**FriendlyName** | Pointer to **string** | -**Links** | Pointer to **map[string]interface{}** | -**MaxReservedWorkers** | Pointer to **int32** | -**ReservationActivityName** | Pointer to **string** | -**ReservationActivitySid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**TargetWorkers** | Pointer to **string** | -**TaskOrder** | Pointer to [**TaskQueueTaskOrder**](task_queue_task_order.md) | -**Url** | Pointer to **string** | -**WorkspaceSid** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**AssignmentActivityName** | Pointer to **string** | The name of the Activity to assign Workers when a task is assigned for them | +**AssignmentActivitySid** | Pointer to **string** | The SID of the Activity to assign Workers when a task is assigned for them | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was last updated | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the resource | +**Links** | Pointer to **map[string]interface{}** | The URLs of related resources | +**MaxReservedWorkers** | Pointer to **int32** | The maximum number of Workers to reserve | +**ReservationActivityName** | Pointer to **string** | The name of the Activity to assign Workers once a task is reserved for them | +**ReservationActivitySid** | Pointer to **string** | The SID of the Activity to assign Workers once a task is reserved for them | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**TargetWorkers** | Pointer to **string** | A string describing the Worker selection criteria for any Tasks that enter the TaskQueue | +**TaskOrder** | Pointer to **string** | How Tasks will be assigned to Workers | +**Url** | Pointer to **string** | The absolute URL of the TaskQueue resource | +**WorkspaceSid** | Pointer to **string** | The SID of the Workspace that contains the TaskQueue | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceTaskQueueTaskQueueCumulativeStatistics.md b/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceTaskQueueTaskQueueCumulativeStatistics.md index 418291c63..aca7fc5dd 100644 --- a/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceTaskQueueTaskQueueCumulativeStatistics.md +++ b/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceTaskQueueTaskQueueCumulativeStatistics.md @@ -1,30 +1,30 @@ # TaskrouterV1WorkspaceTaskQueueTaskQueueCumulativeStatistics ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**AvgTaskAcceptanceTime** | Pointer to **int32** | -**EndTime** | Pointer to [**time.Time**](time.Time.md) | -**ReservationsAccepted** | Pointer to **int32** | -**ReservationsCanceled** | Pointer to **int32** | -**ReservationsCreated** | Pointer to **int32** | -**ReservationsRejected** | Pointer to **int32** | -**ReservationsRescinded** | Pointer to **int32** | -**ReservationsTimedOut** | Pointer to **int32** | -**SplitByWaitTime** | Pointer to **map[string]interface{}** | -**StartTime** | Pointer to [**time.Time**](time.Time.md) | -**TaskQueueSid** | Pointer to **string** | -**TasksCanceled** | Pointer to **int32** | -**TasksCompleted** | Pointer to **int32** | -**TasksDeleted** | Pointer to **int32** | -**TasksEntered** | Pointer to **int32** | -**TasksMoved** | Pointer to **int32** | -**Url** | Pointer to **string** | -**WaitDurationInQueueUntilAccepted** | Pointer to **map[string]interface{}** | -**WaitDurationUntilAccepted** | Pointer to **map[string]interface{}** | -**WaitDurationUntilCanceled** | Pointer to **map[string]interface{}** | -**WorkspaceSid** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**AvgTaskAcceptanceTime** | Pointer to **int32** | The average time in seconds between Task creation and acceptance | +**EndTime** | Pointer to [**time.Time**](time.Time.md) | The end of the interval during which these statistics were calculated | +**ReservationsAccepted** | Pointer to **int32** | The total number of Reservations accepted for Tasks in the TaskQueue | +**ReservationsCanceled** | Pointer to **int32** | The total number of Reservations canceled for Tasks in the TaskQueue | +**ReservationsCreated** | Pointer to **int32** | The total number of Reservations created for Tasks in the TaskQueue | +**ReservationsRejected** | Pointer to **int32** | The total number of Reservations rejected for Tasks in the TaskQueue | +**ReservationsRescinded** | Pointer to **int32** | The total number of Reservations rescinded | +**ReservationsTimedOut** | Pointer to **int32** | The total number of Reservations that timed out for Tasks in the TaskQueue | +**SplitByWaitTime** | Pointer to **map[string]interface{}** | A list of objects that describe the Tasks canceled and reservations accepted above and below the specified thresholds | +**StartTime** | Pointer to [**time.Time**](time.Time.md) | The beginning of the interval during which these statistics were calculated | +**TaskQueueSid** | Pointer to **string** | The SID of the TaskQueue from which these statistics were calculated | +**TasksCanceled** | Pointer to **int32** | The total number of Tasks canceled in the TaskQueue | +**TasksCompleted** | Pointer to **int32** | The total number of Tasks completed in the TaskQueue | +**TasksDeleted** | Pointer to **int32** | The total number of Tasks deleted in the TaskQueue | +**TasksEntered** | Pointer to **int32** | The total number of Tasks entered into the TaskQueue | +**TasksMoved** | Pointer to **int32** | The total number of Tasks that were moved from one queue to another | +**Url** | Pointer to **string** | The absolute URL of the TaskQueue statistics resource | +**WaitDurationInQueueUntilAccepted** | Pointer to **map[string]interface{}** | The relative wait duration statistics for Tasks accepted while in the TaskQueue | +**WaitDurationUntilAccepted** | Pointer to **map[string]interface{}** | The wait duration statistics for Tasks accepted while in the TaskQueue | +**WaitDurationUntilCanceled** | Pointer to **map[string]interface{}** | The wait duration statistics for Tasks canceled while in the TaskQueue | +**WorkspaceSid** | Pointer to **string** | The SID of the Workspace that contains the TaskQueue | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceTaskQueueTaskQueueRealTimeStatistics.md b/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceTaskQueueTaskQueueRealTimeStatistics.md index faabb7665..d045df6c3 100644 --- a/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceTaskQueueTaskQueueRealTimeStatistics.md +++ b/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceTaskQueueTaskQueueRealTimeStatistics.md @@ -1,22 +1,22 @@ # TaskrouterV1WorkspaceTaskQueueTaskQueueRealTimeStatistics ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**ActivityStatistics** | Pointer to **[]map[string]interface{}** | -**LongestRelativeTaskAgeInQueue** | Pointer to **int32** | -**LongestRelativeTaskSidInQueue** | Pointer to **string** | -**LongestTaskWaitingAge** | Pointer to **int32** | -**LongestTaskWaitingSid** | Pointer to **string** | -**TaskQueueSid** | Pointer to **string** | -**TasksByPriority** | Pointer to **map[string]interface{}** | -**TasksByStatus** | Pointer to **map[string]interface{}** | -**TotalAvailableWorkers** | Pointer to **int32** | -**TotalEligibleWorkers** | Pointer to **int32** | -**TotalTasks** | Pointer to **int32** | -**Url** | Pointer to **string** | -**WorkspaceSid** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**ActivityStatistics** | Pointer to **[]map[string]interface{}** | The number of current Workers by Activity | +**LongestRelativeTaskAgeInQueue** | Pointer to **int32** | The relative age in the TaskQueue for the longest waiting Task. | +**LongestRelativeTaskSidInQueue** | Pointer to **string** | The SID of the Task waiting in the TaskQueue the longest. | +**LongestTaskWaitingAge** | Pointer to **int32** | The age of the longest waiting Task | +**LongestTaskWaitingSid** | Pointer to **string** | The SID of the longest waiting Task | +**TaskQueueSid** | Pointer to **string** | The SID of the TaskQueue from which these statistics were calculated | +**TasksByPriority** | Pointer to **map[string]interface{}** | The number of Tasks by priority | +**TasksByStatus** | Pointer to **map[string]interface{}** | The number of Tasks by their current status | +**TotalAvailableWorkers** | Pointer to **int32** | The total number of Workers available for Tasks in the TaskQueue | +**TotalEligibleWorkers** | Pointer to **int32** | The total number of Workers eligible for Tasks in the TaskQueue, independent of their Activity state | +**TotalTasks** | Pointer to **int32** | The total number of Tasks | +**Url** | Pointer to **string** | The absolute URL of the TaskQueue statistics resource | +**WorkspaceSid** | Pointer to **string** | The SID of the Workspace that contains the TaskQueue | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceTaskQueueTaskQueueStatistics.md b/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceTaskQueueTaskQueueStatistics.md index 2cc2df08c..80d663f08 100644 --- a/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceTaskQueueTaskQueueStatistics.md +++ b/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceTaskQueueTaskQueueStatistics.md @@ -1,14 +1,14 @@ # TaskrouterV1WorkspaceTaskQueueTaskQueueStatistics ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Cumulative** | Pointer to **map[string]interface{}** | -**Realtime** | Pointer to **map[string]interface{}** | -**TaskQueueSid** | Pointer to **string** | -**Url** | Pointer to **string** | -**WorkspaceSid** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**Cumulative** | Pointer to **map[string]interface{}** | An object that contains the cumulative statistics for the TaskQueue | +**Realtime** | Pointer to **map[string]interface{}** | An object that contains the real-time statistics for the TaskQueue | +**TaskQueueSid** | Pointer to **string** | The SID of the TaskQueue from which these statistics were calculated | +**Url** | Pointer to **string** | The absolute URL of the TaskQueue statistics resource | +**WorkspaceSid** | Pointer to **string** | The SID of the Workspace that contains the TaskQueue | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceTaskQueueTaskQueuesStatistics.md b/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceTaskQueueTaskQueuesStatistics.md index a3a6cdcdf..b412fe930 100644 --- a/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceTaskQueueTaskQueuesStatistics.md +++ b/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceTaskQueueTaskQueuesStatistics.md @@ -1,13 +1,13 @@ # TaskrouterV1WorkspaceTaskQueueTaskQueuesStatistics ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Cumulative** | Pointer to **map[string]interface{}** | -**Realtime** | Pointer to **map[string]interface{}** | -**TaskQueueSid** | Pointer to **string** | -**WorkspaceSid** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**Cumulative** | Pointer to **map[string]interface{}** | An object that contains the cumulative statistics for the TaskQueues | +**Realtime** | Pointer to **map[string]interface{}** | An object that contains the real-time statistics for the TaskQueues | +**TaskQueueSid** | Pointer to **string** | The SID of the TaskQueue from which these statistics were calculated | +**WorkspaceSid** | Pointer to **string** | The SID of the Workspace that contains the TaskQueues | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceTaskTaskReservation.md b/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceTaskTaskReservation.md index cd54ee176..9714ed548 100644 --- a/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceTaskTaskReservation.md +++ b/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceTaskTaskReservation.md @@ -1,19 +1,19 @@ # TaskrouterV1WorkspaceTaskTaskReservation ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**Links** | Pointer to **map[string]interface{}** | -**ReservationStatus** | Pointer to [**TaskReservationStatus**](task_reservation_status.md) | -**Sid** | Pointer to **string** | -**TaskSid** | Pointer to **string** | -**Url** | Pointer to **string** | -**WorkerName** | Pointer to **string** | -**WorkerSid** | Pointer to **string** | -**WorkspaceSid** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was last updated | +**Links** | Pointer to **map[string]interface{}** | The URLs of related resources | +**ReservationStatus** | Pointer to **string** | The current status of the reservation | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**TaskSid** | Pointer to **string** | The SID of the reserved Task resource | +**Url** | Pointer to **string** | The absolute URL of the TaskReservation reservation | +**WorkerName** | Pointer to **string** | The friendly_name of the Worker that is reserved | +**WorkerSid** | Pointer to **string** | The SID of the reserved Worker resource | +**WorkspaceSid** | Pointer to **string** | The SID of the Workspace that this task is contained within. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorker.md b/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorker.md index 9d537e123..584d1a107 100644 --- a/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorker.md +++ b/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorker.md @@ -1,21 +1,21 @@ # TaskrouterV1WorkspaceWorker ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**ActivityName** | Pointer to **string** | -**ActivitySid** | Pointer to **string** | -**Attributes** | Pointer to **string** | -**Available** | Pointer to **bool** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateStatusChanged** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**FriendlyName** | Pointer to **string** | -**Links** | Pointer to **map[string]interface{}** | -**Sid** | Pointer to **string** | -**Url** | Pointer to **string** | -**WorkspaceSid** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**ActivityName** | Pointer to **string** | The friendly_name of the Worker's current Activity | +**ActivitySid** | Pointer to **string** | The SID of the Worker's current Activity | +**Attributes** | Pointer to **string** | The JSON string that describes the Worker | +**Available** | Pointer to **bool** | Whether the Worker is available to perform tasks | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**DateStatusChanged** | Pointer to [**time.Time**](time.Time.md) | The date and time in GMT of the last change to the Worker's activity | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was last updated | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the resource | +**Links** | Pointer to **map[string]interface{}** | The URLs of related resources | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Url** | Pointer to **string** | The absolute URL of the Worker resource | +**WorkspaceSid** | Pointer to **string** | The SID of the Workspace that contains the Worker | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkerWorkerChannel.md b/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkerWorkerChannel.md index 444de4360..ace715ecd 100644 --- a/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkerWorkerChannel.md +++ b/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkerWorkerChannel.md @@ -1,21 +1,21 @@ # TaskrouterV1WorkspaceWorkerWorkerChannel ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**AssignedTasks** | Pointer to **int32** | -**Available** | Pointer to **bool** | -**AvailableCapacityPercentage** | Pointer to **int32** | -**ConfiguredCapacity** | Pointer to **int32** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**Sid** | Pointer to **string** | -**TaskChannelSid** | Pointer to **string** | -**TaskChannelUniqueName** | Pointer to **string** | -**Url** | Pointer to **string** | -**WorkerSid** | Pointer to **string** | -**WorkspaceSid** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**AssignedTasks** | Pointer to **int32** | The total number of Tasks assigned to Worker for the TaskChannel type | +**Available** | Pointer to **bool** | Whether the Worker should receive Tasks of the TaskChannel type | +**AvailableCapacityPercentage** | Pointer to **int32** | The current available capacity between 0 to 100 for the TaskChannel | +**ConfiguredCapacity** | Pointer to **int32** | The current configured capacity for the WorkerChannel | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was last updated | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**TaskChannelSid** | Pointer to **string** | The SID of the TaskChannel | +**TaskChannelUniqueName** | Pointer to **string** | The unique name of the TaskChannel, such as 'voice' or 'sms' | +**Url** | Pointer to **string** | The absolute URL of the WorkerChannel resource | +**WorkerSid** | Pointer to **string** | The SID of the Worker that contains the WorkerChannel | +**WorkspaceSid** | Pointer to **string** | The SID of the Workspace that contains the WorkerChannel | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkerWorkerInstanceStatistics.md b/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkerWorkerInstanceStatistics.md index 5da61566c..c35e702d7 100644 --- a/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkerWorkerInstanceStatistics.md +++ b/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkerWorkerInstanceStatistics.md @@ -1,13 +1,13 @@ # TaskrouterV1WorkspaceWorkerWorkerInstanceStatistics ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Cumulative** | Pointer to **map[string]interface{}** | -**Url** | Pointer to **string** | -**WorkerSid** | Pointer to **string** | -**WorkspaceSid** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**Cumulative** | Pointer to **map[string]interface{}** | An object that contains the cumulative statistics for the Worker | +**Url** | Pointer to **string** | The absolute URL of the WorkerChannel statistics resource | +**WorkerSid** | Pointer to **string** | The SID of the Worker that contains the WorkerChannel | +**WorkspaceSid** | Pointer to **string** | The SID of the Workspace that contains the WorkerChannel | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkerWorkerReservation.md b/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkerWorkerReservation.md index 76ecd66ec..abaeb24d9 100644 --- a/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkerWorkerReservation.md +++ b/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkerWorkerReservation.md @@ -1,19 +1,19 @@ # TaskrouterV1WorkspaceWorkerWorkerReservation ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**Links** | Pointer to **map[string]interface{}** | -**ReservationStatus** | Pointer to [**WorkerReservationStatus**](worker_reservation_status.md) | -**Sid** | Pointer to **string** | -**TaskSid** | Pointer to **string** | -**Url** | Pointer to **string** | -**WorkerName** | Pointer to **string** | -**WorkerSid** | Pointer to **string** | -**WorkspaceSid** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was last updated | +**Links** | Pointer to **map[string]interface{}** | The URLs of related resources | +**ReservationStatus** | Pointer to **string** | The current status of the reservation | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**TaskSid** | Pointer to **string** | The SID of the reserved Task resource | +**Url** | Pointer to **string** | The absolute URL of the WorkerReservation resource | +**WorkerName** | Pointer to **string** | The friendly_name of the Worker that is reserved | +**WorkerSid** | Pointer to **string** | The SID of the reserved Worker resource | +**WorkspaceSid** | Pointer to **string** | The SID of the Workspace that this worker is contained within. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkerWorkerStatistics.md b/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkerWorkerStatistics.md index 45ebb7895..ff71810d2 100644 --- a/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkerWorkerStatistics.md +++ b/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkerWorkerStatistics.md @@ -1,13 +1,13 @@ # TaskrouterV1WorkspaceWorkerWorkerStatistics ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Cumulative** | Pointer to **map[string]interface{}** | -**Realtime** | Pointer to **map[string]interface{}** | -**Url** | Pointer to **string** | -**WorkspaceSid** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**Cumulative** | Pointer to **map[string]interface{}** | An object that contains the cumulative statistics for the Worker | +**Realtime** | Pointer to **map[string]interface{}** | An object that contains the real-time statistics for the Worker | +**Url** | Pointer to **string** | The absolute URL of the Worker statistics resource | +**WorkspaceSid** | Pointer to **string** | The SID of the Workspace that contains the Worker | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkerWorkersCumulativeStatistics.md b/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkerWorkersCumulativeStatistics.md index df2b04d2e..0fe8c8ac1 100644 --- a/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkerWorkersCumulativeStatistics.md +++ b/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkerWorkersCumulativeStatistics.md @@ -1,20 +1,20 @@ # TaskrouterV1WorkspaceWorkerWorkersCumulativeStatistics ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**ActivityDurations** | Pointer to **[]map[string]interface{}** | -**EndTime** | Pointer to [**time.Time**](time.Time.md) | -**ReservationsAccepted** | Pointer to **int32** | -**ReservationsCanceled** | Pointer to **int32** | -**ReservationsCreated** | Pointer to **int32** | -**ReservationsRejected** | Pointer to **int32** | -**ReservationsRescinded** | Pointer to **int32** | -**ReservationsTimedOut** | Pointer to **int32** | -**StartTime** | Pointer to [**time.Time**](time.Time.md) | -**Url** | Pointer to **string** | -**WorkspaceSid** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**ActivityDurations** | Pointer to **[]map[string]interface{}** | The minimum, average, maximum, and total time that Workers spent in each Activity | +**EndTime** | Pointer to [**time.Time**](time.Time.md) | The end of the interval during which these statistics were calculated | +**ReservationsAccepted** | Pointer to **int32** | The total number of Reservations that were accepted | +**ReservationsCanceled** | Pointer to **int32** | The total number of Reservations that were canceled | +**ReservationsCreated** | Pointer to **int32** | The total number of Reservations that were created | +**ReservationsRejected** | Pointer to **int32** | The total number of Reservations that were rejected | +**ReservationsRescinded** | Pointer to **int32** | The total number of Reservations that were rescinded | +**ReservationsTimedOut** | Pointer to **int32** | The total number of Reservations that were timed out | +**StartTime** | Pointer to [**time.Time**](time.Time.md) | The beginning of the interval during which these statistics were calculated | +**Url** | Pointer to **string** | The absolute URL of the Workers statistics resource | +**WorkspaceSid** | Pointer to **string** | The SID of the Workspace that contains the Workers | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkerWorkersRealTimeStatistics.md b/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkerWorkersRealTimeStatistics.md index a2a300427..ba81aa338 100644 --- a/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkerWorkersRealTimeStatistics.md +++ b/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkerWorkersRealTimeStatistics.md @@ -1,13 +1,13 @@ # TaskrouterV1WorkspaceWorkerWorkersRealTimeStatistics ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**ActivityStatistics** | Pointer to **[]map[string]interface{}** | -**TotalWorkers** | Pointer to **int32** | -**Url** | Pointer to **string** | -**WorkspaceSid** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**ActivityStatistics** | Pointer to **[]map[string]interface{}** | The number of current Workers by Activity | +**TotalWorkers** | Pointer to **int32** | The total number of Workers | +**Url** | Pointer to **string** | The absolute URL of the Workers statistics resource | +**WorkspaceSid** | Pointer to **string** | The SID of the Workspace that contains the Workers | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkflow.md b/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkflow.md index 792e30415..df5109932 100644 --- a/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkflow.md +++ b/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkflow.md @@ -1,21 +1,21 @@ # TaskrouterV1WorkspaceWorkflow ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**AssignmentCallbackUrl** | Pointer to **string** | -**Configuration** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**DocumentContentType** | Pointer to **string** | -**FallbackAssignmentCallbackUrl** | Pointer to **string** | -**FriendlyName** | Pointer to **string** | -**Links** | Pointer to **map[string]interface{}** | -**Sid** | Pointer to **string** | -**TaskReservationTimeout** | Pointer to **int32** | -**Url** | Pointer to **string** | -**WorkspaceSid** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**AssignmentCallbackUrl** | Pointer to **string** | The URL that we call when a task managed by the Workflow is assigned to a Worker | +**Configuration** | Pointer to **string** | A JSON string that contains the Workflow's configuration | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was last updated | +**DocumentContentType** | Pointer to **string** | The MIME type of the document | +**FallbackAssignmentCallbackUrl** | Pointer to **string** | The URL that we call when a call to the `assignment_callback_url` fails | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the Workflow resource | +**Links** | Pointer to **map[string]interface{}** | The URLs of related resources | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**TaskReservationTimeout** | Pointer to **int32** | How long TaskRouter will wait for a confirmation response from your application after it assigns a Task to a Worker | +**Url** | Pointer to **string** | The absolute URL of the Workflow resource | +**WorkspaceSid** | Pointer to **string** | The SID of the Workspace that contains the Workflow | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkflowWorkflowCumulativeStatistics.md b/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkflowWorkflowCumulativeStatistics.md index 53903431f..f004028cd 100644 --- a/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkflowWorkflowCumulativeStatistics.md +++ b/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkflowWorkflowCumulativeStatistics.md @@ -1,30 +1,30 @@ # TaskrouterV1WorkspaceWorkflowWorkflowCumulativeStatistics ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**AvgTaskAcceptanceTime** | Pointer to **int32** | -**EndTime** | Pointer to [**time.Time**](time.Time.md) | -**ReservationsAccepted** | Pointer to **int32** | -**ReservationsCanceled** | Pointer to **int32** | -**ReservationsCreated** | Pointer to **int32** | -**ReservationsRejected** | Pointer to **int32** | -**ReservationsRescinded** | Pointer to **int32** | -**ReservationsTimedOut** | Pointer to **int32** | -**SplitByWaitTime** | Pointer to **map[string]interface{}** | -**StartTime** | Pointer to [**time.Time**](time.Time.md) | -**TasksCanceled** | Pointer to **int32** | -**TasksCompleted** | Pointer to **int32** | -**TasksDeleted** | Pointer to **int32** | -**TasksEntered** | Pointer to **int32** | -**TasksMoved** | Pointer to **int32** | -**TasksTimedOutInWorkflow** | Pointer to **int32** | -**Url** | Pointer to **string** | -**WaitDurationUntilAccepted** | Pointer to **map[string]interface{}** | -**WaitDurationUntilCanceled** | Pointer to **map[string]interface{}** | -**WorkflowSid** | Pointer to **string** | -**WorkspaceSid** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**AvgTaskAcceptanceTime** | Pointer to **int32** | The average time in seconds between Task creation and acceptance | +**EndTime** | Pointer to [**time.Time**](time.Time.md) | The end of the interval during which these statistics were calculated | +**ReservationsAccepted** | Pointer to **int32** | The total number of Reservations accepted by Workers | +**ReservationsCanceled** | Pointer to **int32** | The total number of Reservations that were canceled | +**ReservationsCreated** | Pointer to **int32** | The total number of Reservations that were created for Workers | +**ReservationsRejected** | Pointer to **int32** | The total number of Reservations that were rejected | +**ReservationsRescinded** | Pointer to **int32** | The total number of Reservations that were rescinded | +**ReservationsTimedOut** | Pointer to **int32** | The total number of Reservations that were timed out | +**SplitByWaitTime** | Pointer to **map[string]interface{}** | A list of objects that describe the Tasks canceled and reservations accepted above and below the specified thresholds | +**StartTime** | Pointer to [**time.Time**](time.Time.md) | The beginning of the interval during which these statistics were calculated | +**TasksCanceled** | Pointer to **int32** | The total number of Tasks that were canceled | +**TasksCompleted** | Pointer to **int32** | The total number of Tasks that were completed | +**TasksDeleted** | Pointer to **int32** | The total number of Tasks that were deleted | +**TasksEntered** | Pointer to **int32** | The total number of Tasks that entered the Workflow | +**TasksMoved** | Pointer to **int32** | The total number of Tasks that were moved from one queue to another | +**TasksTimedOutInWorkflow** | Pointer to **int32** | The total number of Tasks that were timed out of their Workflows | +**Url** | Pointer to **string** | The absolute URL of the Workflow statistics resource | +**WaitDurationUntilAccepted** | Pointer to **map[string]interface{}** | The wait duration statistics for Tasks that were accepted | +**WaitDurationUntilCanceled** | Pointer to **map[string]interface{}** | The wait duration statistics for Tasks that were canceled | +**WorkflowSid** | Pointer to **string** | Returns the list of Tasks that are being controlled by the Workflow with the specified Sid value | +**WorkspaceSid** | Pointer to **string** | The SID of the Workspace that contains the Workflow. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkflowWorkflowRealTimeStatistics.md b/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkflowWorkflowRealTimeStatistics.md index 029847442..a46d13bb9 100644 --- a/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkflowWorkflowRealTimeStatistics.md +++ b/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkflowWorkflowRealTimeStatistics.md @@ -1,17 +1,17 @@ # TaskrouterV1WorkspaceWorkflowWorkflowRealTimeStatistics ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**LongestTaskWaitingAge** | Pointer to **int32** | -**LongestTaskWaitingSid** | Pointer to **string** | -**TasksByPriority** | Pointer to **map[string]interface{}** | -**TasksByStatus** | Pointer to **map[string]interface{}** | -**TotalTasks** | Pointer to **int32** | -**Url** | Pointer to **string** | -**WorkflowSid** | Pointer to **string** | -**WorkspaceSid** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**LongestTaskWaitingAge** | Pointer to **int32** | The age of the longest waiting Task | +**LongestTaskWaitingSid** | Pointer to **string** | The SID of the longest waiting Task | +**TasksByPriority** | Pointer to **map[string]interface{}** | The number of Tasks by priority | +**TasksByStatus** | Pointer to **map[string]interface{}** | The number of Tasks by their current status | +**TotalTasks** | Pointer to **int32** | The total number of Tasks | +**Url** | Pointer to **string** | The absolute URL of the Workflow statistics resource | +**WorkflowSid** | Pointer to **string** | Returns the list of Tasks that are being controlled by the Workflow with the specified SID value | +**WorkspaceSid** | Pointer to **string** | The SID of the Workspace that contains the Workflow. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkflowWorkflowStatistics.md b/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkflowWorkflowStatistics.md index cf034d26e..c84ca732b 100644 --- a/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkflowWorkflowStatistics.md +++ b/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkflowWorkflowStatistics.md @@ -1,14 +1,14 @@ # TaskrouterV1WorkspaceWorkflowWorkflowStatistics ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Cumulative** | Pointer to **map[string]interface{}** | -**Realtime** | Pointer to **map[string]interface{}** | -**Url** | Pointer to **string** | -**WorkflowSid** | Pointer to **string** | -**WorkspaceSid** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**Cumulative** | Pointer to **map[string]interface{}** | An object that contains the cumulative statistics for the Workflow | +**Realtime** | Pointer to **map[string]interface{}** | An object that contains the real-time statistics for the Workflow | +**Url** | Pointer to **string** | The absolute URL of the Workflow statistics resource | +**WorkflowSid** | Pointer to **string** | Returns the list of Tasks that are being controlled by the Workflow with the specified SID value | +**WorkspaceSid** | Pointer to **string** | The SID of the Workspace that contains the Workflow | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkspaceCumulativeStatistics.md b/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkspaceCumulativeStatistics.md index 30f7dde84..a02629da8 100644 --- a/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkspaceCumulativeStatistics.md +++ b/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkspaceCumulativeStatistics.md @@ -1,29 +1,29 @@ # TaskrouterV1WorkspaceWorkspaceCumulativeStatistics ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**AvgTaskAcceptanceTime** | Pointer to **int32** | -**EndTime** | Pointer to [**time.Time**](time.Time.md) | -**ReservationsAccepted** | Pointer to **int32** | -**ReservationsCanceled** | Pointer to **int32** | -**ReservationsCreated** | Pointer to **int32** | -**ReservationsRejected** | Pointer to **int32** | -**ReservationsRescinded** | Pointer to **int32** | -**ReservationsTimedOut** | Pointer to **int32** | -**SplitByWaitTime** | Pointer to **map[string]interface{}** | -**StartTime** | Pointer to [**time.Time**](time.Time.md) | -**TasksCanceled** | Pointer to **int32** | -**TasksCompleted** | Pointer to **int32** | -**TasksCreated** | Pointer to **int32** | -**TasksDeleted** | Pointer to **int32** | -**TasksMoved** | Pointer to **int32** | -**TasksTimedOutInWorkflow** | Pointer to **int32** | -**Url** | Pointer to **string** | -**WaitDurationUntilAccepted** | Pointer to **map[string]interface{}** | -**WaitDurationUntilCanceled** | Pointer to **map[string]interface{}** | -**WorkspaceSid** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**AvgTaskAcceptanceTime** | Pointer to **int32** | The average time in seconds between Task creation and acceptance | +**EndTime** | Pointer to [**time.Time**](time.Time.md) | The end of the interval during which these statistics were calculated | +**ReservationsAccepted** | Pointer to **int32** | The total number of Reservations accepted by Workers | +**ReservationsCanceled** | Pointer to **int32** | The total number of Reservations that were canceled | +**ReservationsCreated** | Pointer to **int32** | The total number of Reservations that were created for Workers | +**ReservationsRejected** | Pointer to **int32** | The total number of Reservations that were rejected | +**ReservationsRescinded** | Pointer to **int32** | The total number of Reservations that were rescinded | +**ReservationsTimedOut** | Pointer to **int32** | The total number of Reservations that were timed out | +**SplitByWaitTime** | Pointer to **map[string]interface{}** | A list of objects that describe the Tasks canceled and reservations accepted above and below the specified thresholds | +**StartTime** | Pointer to [**time.Time**](time.Time.md) | The beginning of the interval during which these statistics were calculated | +**TasksCanceled** | Pointer to **int32** | The total number of Tasks that were canceled | +**TasksCompleted** | Pointer to **int32** | The total number of Tasks that were completed | +**TasksCreated** | Pointer to **int32** | The total number of Tasks created | +**TasksDeleted** | Pointer to **int32** | The total number of Tasks that were deleted | +**TasksMoved** | Pointer to **int32** | The total number of Tasks that were moved from one queue to another | +**TasksTimedOutInWorkflow** | Pointer to **int32** | The total number of Tasks that were timed out of their Workflows | +**Url** | Pointer to **string** | The absolute URL of the Workspace statistics resource | +**WaitDurationUntilAccepted** | Pointer to **map[string]interface{}** | The wait duration statistics for Tasks that were accepted | +**WaitDurationUntilCanceled** | Pointer to **map[string]interface{}** | The wait duration statistics for Tasks that were canceled | +**WorkspaceSid** | Pointer to **string** | The SID of the Workspace | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkspaceRealTimeStatistics.md b/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkspaceRealTimeStatistics.md index c1655b2eb..94cd931a2 100644 --- a/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkspaceRealTimeStatistics.md +++ b/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkspaceRealTimeStatistics.md @@ -1,18 +1,18 @@ # TaskrouterV1WorkspaceWorkspaceRealTimeStatistics ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**ActivityStatistics** | Pointer to **[]map[string]interface{}** | -**LongestTaskWaitingAge** | Pointer to **int32** | -**LongestTaskWaitingSid** | Pointer to **string** | -**TasksByPriority** | Pointer to **map[string]interface{}** | -**TasksByStatus** | Pointer to **map[string]interface{}** | -**TotalTasks** | Pointer to **int32** | -**TotalWorkers** | Pointer to **int32** | -**Url** | Pointer to **string** | -**WorkspaceSid** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**ActivityStatistics** | Pointer to **[]map[string]interface{}** | The number of current Workers by Activity | +**LongestTaskWaitingAge** | Pointer to **int32** | The age of the longest waiting Task | +**LongestTaskWaitingSid** | Pointer to **string** | The SID of the longest waiting Task | +**TasksByPriority** | Pointer to **map[string]interface{}** | The number of Tasks by priority | +**TasksByStatus** | Pointer to **map[string]interface{}** | The number of Tasks by their current status | +**TotalTasks** | Pointer to **int32** | The total number of Tasks | +**TotalWorkers** | Pointer to **int32** | The total number of Workers in the Workspace | +**Url** | Pointer to **string** | The absolute URL of the Workspace statistics resource | +**WorkspaceSid** | Pointer to **string** | The SID of the Workspace | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkspaceStatistics.md b/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkspaceStatistics.md index 0b53fa5d6..ae81da4ed 100644 --- a/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkspaceStatistics.md +++ b/twilio/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkspaceStatistics.md @@ -1,13 +1,13 @@ # TaskrouterV1WorkspaceWorkspaceStatistics ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Cumulative** | Pointer to **map[string]interface{}** | -**Realtime** | Pointer to **map[string]interface{}** | -**Url** | Pointer to **string** | -**WorkspaceSid** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**Cumulative** | Pointer to **map[string]interface{}** | An object that contains the cumulative statistics for the Workspace | +**Realtime** | Pointer to **map[string]interface{}** | n object that contains the real-time statistics for the Workspace | +**Url** | Pointer to **string** | The absolute URL of the Workspace statistics resource | +**WorkspaceSid** | Pointer to **string** | The SID of the Workspace | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace.go index 787af18e3..fb28b9c14 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace.go @@ -17,19 +17,34 @@ import ( // TaskrouterV1Workspace struct for TaskrouterV1Workspace type TaskrouterV1Workspace struct { - AccountSid *string `json:"AccountSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - DefaultActivityName *string `json:"DefaultActivityName,omitempty"` - DefaultActivitySid *string `json:"DefaultActivitySid,omitempty"` - EventCallbackUrl *string `json:"EventCallbackUrl,omitempty"` - EventsFilter *string `json:"EventsFilter,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - MultiTaskEnabled *bool `json:"MultiTaskEnabled,omitempty"` - PrioritizeQueueOrder *WorkspaceQueueOrder `json:"PrioritizeQueueOrder,omitempty"` - Sid *string `json:"Sid,omitempty"` - TimeoutActivityName *string `json:"TimeoutActivityName,omitempty"` - TimeoutActivitySid *string `json:"TimeoutActivitySid,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The name of the default activity + DefaultActivityName *string `json:"DefaultActivityName,omitempty"` + // The SID of the Activity that will be used when new Workers are created in the Workspace + DefaultActivitySid *string `json:"DefaultActivitySid,omitempty"` + // The URL we call when an event occurs + EventCallbackUrl *string `json:"EventCallbackUrl,omitempty"` + // The list of Workspace events for which to call event_callback_url + EventsFilter *string `json:"EventsFilter,omitempty"` + // The string that you assigned to describe the Workspace resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // The URLs of related resources + Links *map[string]interface{} `json:"Links,omitempty"` + // Whether multi-tasking is enabled + MultiTaskEnabled *bool `json:"MultiTaskEnabled,omitempty"` + // The type of TaskQueue to prioritize when Workers are receiving Tasks from both types of TaskQueues + PrioritizeQueueOrder *string `json:"PrioritizeQueueOrder,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The name of the timeout activity + TimeoutActivityName *string `json:"TimeoutActivityName,omitempty"` + // The SID of the Activity that will be assigned to a Worker when a Task reservation times out without a response + TimeoutActivitySid *string `json:"TimeoutActivitySid,omitempty"` + // The absolute URL of the Workspace resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_activity.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_activity.go index 0989219aa..77a9d0b66 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_activity.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_activity.go @@ -17,12 +17,20 @@ import ( // TaskrouterV1WorkspaceActivity struct for TaskrouterV1WorkspaceActivity type TaskrouterV1WorkspaceActivity struct { - AccountSid *string `json:"AccountSid,omitempty"` - Available *bool `json:"Available,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` - WorkspaceSid *string `json:"WorkspaceSid,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // Whether the Worker should be eligible to receive a Task when it occupies the Activity + Available *bool `json:"Available,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The string that you assigned to describe the Activity resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The absolute URL of the Activity resource + Url *string `json:"Url,omitempty"` + // The SID of the Workspace that contains the Activity + WorkspaceSid *string `json:"WorkspaceSid,omitempty"` } diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_event.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_event.go index 067984019..4e62f7713 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_event.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_event.go @@ -17,21 +17,38 @@ import ( // TaskrouterV1WorkspaceEvent struct for TaskrouterV1WorkspaceEvent type TaskrouterV1WorkspaceEvent struct { - AccountSid *string `json:"AccountSid,omitempty"` - ActorSid *string `json:"ActorSid,omitempty"` - ActorType *string `json:"ActorType,omitempty"` - ActorUrl *string `json:"ActorUrl,omitempty"` - Description *string `json:"Description,omitempty"` - EventData *map[string]interface{} `json:"EventData,omitempty"` - EventDate *time.Time `json:"EventDate,omitempty"` - EventDateMs *int32 `json:"EventDateMs,omitempty"` - EventType *string `json:"EventType,omitempty"` - ResourceSid *string `json:"ResourceSid,omitempty"` - ResourceType *string `json:"ResourceType,omitempty"` - ResourceUrl *string `json:"ResourceUrl,omitempty"` - Sid *string `json:"Sid,omitempty"` - Source *string `json:"Source,omitempty"` - SourceIpAddress *string `json:"SourceIpAddress,omitempty"` - Url *string `json:"Url,omitempty"` - WorkspaceSid *string `json:"WorkspaceSid,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The SID of the resource that triggered the event + ActorSid *string `json:"ActorSid,omitempty"` + // The type of resource that triggered the event + ActorType *string `json:"ActorType,omitempty"` + // The absolute URL of the resource that triggered the event + ActorUrl *string `json:"ActorUrl,omitempty"` + // A description of the event + Description *string `json:"Description,omitempty"` + // Data about the event + EventData *map[string]interface{} `json:"EventData,omitempty"` + // The time the event was sent + EventDate *time.Time `json:"EventDate,omitempty"` + // The time the event was sent in milliseconds + EventDateMs *int32 `json:"EventDateMs,omitempty"` + // The identifier for the event + EventType *string `json:"EventType,omitempty"` + // The SID of the object the event is most relevant to + ResourceSid *string `json:"ResourceSid,omitempty"` + // The type of object the event is most relevant to + ResourceType *string `json:"ResourceType,omitempty"` + // The URL of the resource the event is most relevant to + ResourceUrl *string `json:"ResourceUrl,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // Where the Event originated + Source *string `json:"Source,omitempty"` + // The IP from which the Event originated + SourceIpAddress *string `json:"SourceIpAddress,omitempty"` + // The absolute URL of the Event resource + Url *string `json:"Url,omitempty"` + // The SID of the Workspace that contains the Event + WorkspaceSid *string `json:"WorkspaceSid,omitempty"` } diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task.go index e37fd36aa..2ebb1eb23 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task.go @@ -17,25 +17,46 @@ import ( // TaskrouterV1WorkspaceTask struct for TaskrouterV1WorkspaceTask type TaskrouterV1WorkspaceTask struct { - AccountSid *string `json:"AccountSid,omitempty"` - Addons *string `json:"Addons,omitempty"` - Age *int32 `json:"Age,omitempty"` - AssignmentStatus *TaskStatus `json:"AssignmentStatus,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - Priority *int32 `json:"Priority,omitempty"` - Reason *string `json:"Reason,omitempty"` - Sid *string `json:"Sid,omitempty"` - TaskChannelSid *string `json:"TaskChannelSid,omitempty"` - TaskChannelUniqueName *string `json:"TaskChannelUniqueName,omitempty"` - TaskQueueEnteredDate *time.Time `json:"TaskQueueEnteredDate,omitempty"` - TaskQueueFriendlyName *string `json:"TaskQueueFriendlyName,omitempty"` - TaskQueueSid *string `json:"TaskQueueSid,omitempty"` - Timeout *int32 `json:"Timeout,omitempty"` - Url *string `json:"Url,omitempty"` - WorkflowFriendlyName *string `json:"WorkflowFriendlyName,omitempty"` - WorkflowSid *string `json:"WorkflowSid,omitempty"` - WorkspaceSid *string `json:"WorkspaceSid,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // An object that contains the addon data for all installed addons + Addons *string `json:"Addons,omitempty"` + // The number of seconds since the Task was created + Age *int32 `json:"Age,omitempty"` + // The current status of the Task's assignment + AssignmentStatus *string `json:"AssignmentStatus,omitempty"` + // The JSON string with custom attributes of the work + Attributes *string `json:"Attributes,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The URLs of related resources + Links *map[string]interface{} `json:"Links,omitempty"` + // Retrieve the list of all Tasks in the Workspace with the specified priority + Priority *int32 `json:"Priority,omitempty"` + // The reason the Task was canceled or completed + Reason *string `json:"Reason,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The SID of the TaskChannel + TaskChannelSid *string `json:"TaskChannelSid,omitempty"` + // The unique name of the TaskChannel + TaskChannelUniqueName *string `json:"TaskChannelUniqueName,omitempty"` + // The ISO 8601 date and time in GMT when the Task entered the TaskQueue. + TaskQueueEnteredDate *time.Time `json:"TaskQueueEnteredDate,omitempty"` + // The friendly name of the TaskQueue + TaskQueueFriendlyName *string `json:"TaskQueueFriendlyName,omitempty"` + // The SID of the TaskQueue + TaskQueueSid *string `json:"TaskQueueSid,omitempty"` + // The amount of time in seconds that the Task can live before being assigned + Timeout *int32 `json:"Timeout,omitempty"` + // The absolute URL of the Task resource + Url *string `json:"Url,omitempty"` + // The friendly name of the Workflow that is controlling the Task + WorkflowFriendlyName *string `json:"WorkflowFriendlyName,omitempty"` + // The SID of the Workflow that is controlling the Task + WorkflowSid *string `json:"WorkflowSid,omitempty"` + // The SID of the Workspace that contains the Task + WorkspaceSid *string `json:"WorkspaceSid,omitempty"` } diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_channel.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_channel.go index ccf7fbd59..a2af030b3 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_channel.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_channel.go @@ -17,14 +17,24 @@ import ( // TaskrouterV1WorkspaceTaskChannel struct for TaskrouterV1WorkspaceTaskChannel type TaskrouterV1WorkspaceTaskChannel struct { - AccountSid *string `json:"AccountSid,omitempty"` - ChannelOptimizedRouting *bool `json:"ChannelOptimizedRouting,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - Sid *string `json:"Sid,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` - Url *string `json:"Url,omitempty"` - WorkspaceSid *string `json:"WorkspaceSid,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // Whether the Task Channel will prioritize Workers that have been idle + ChannelOptimizedRouting *bool `json:"ChannelOptimizedRouting,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The string that you assigned to describe the resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // The URLs of related resources + Links *map[string]interface{} `json:"Links,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // An application-defined string that uniquely identifies the Task Channel + UniqueName *string `json:"UniqueName,omitempty"` + // The absolute URL of the Task Channel resource + Url *string `json:"Url,omitempty"` + // The SID of the Workspace that contains the Task Channel + WorkspaceSid *string `json:"WorkspaceSid,omitempty"` } diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue.go index db88e0357..a3bea67ab 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue.go @@ -17,19 +17,34 @@ import ( // TaskrouterV1WorkspaceTaskQueue struct for TaskrouterV1WorkspaceTaskQueue type TaskrouterV1WorkspaceTaskQueue struct { - AccountSid *string `json:"AccountSid,omitempty"` - AssignmentActivityName *string `json:"AssignmentActivityName,omitempty"` - AssignmentActivitySid *string `json:"AssignmentActivitySid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - MaxReservedWorkers *int32 `json:"MaxReservedWorkers,omitempty"` - ReservationActivityName *string `json:"ReservationActivityName,omitempty"` - ReservationActivitySid *string `json:"ReservationActivitySid,omitempty"` - Sid *string `json:"Sid,omitempty"` - TargetWorkers *string `json:"TargetWorkers,omitempty"` - TaskOrder *TaskQueueTaskOrder `json:"TaskOrder,omitempty"` - Url *string `json:"Url,omitempty"` - WorkspaceSid *string `json:"WorkspaceSid,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The name of the Activity to assign Workers when a task is assigned for them + AssignmentActivityName *string `json:"AssignmentActivityName,omitempty"` + // The SID of the Activity to assign Workers when a task is assigned for them + AssignmentActivitySid *string `json:"AssignmentActivitySid,omitempty"` + // The RFC 2822 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The string that you assigned to describe the resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // The URLs of related resources + Links *map[string]interface{} `json:"Links,omitempty"` + // The maximum number of Workers to reserve + MaxReservedWorkers *int32 `json:"MaxReservedWorkers,omitempty"` + // The name of the Activity to assign Workers once a task is reserved for them + ReservationActivityName *string `json:"ReservationActivityName,omitempty"` + // The SID of the Activity to assign Workers once a task is reserved for them + ReservationActivitySid *string `json:"ReservationActivitySid,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // A string describing the Worker selection criteria for any Tasks that enter the TaskQueue + TargetWorkers *string `json:"TargetWorkers,omitempty"` + // How Tasks will be assigned to Workers + TaskOrder *string `json:"TaskOrder,omitempty"` + // The absolute URL of the TaskQueue resource + Url *string `json:"Url,omitempty"` + // The SID of the Workspace that contains the TaskQueue + WorkspaceSid *string `json:"WorkspaceSid,omitempty"` } diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue_task_queue_cumulative_statistics.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue_task_queue_cumulative_statistics.go index 0e458c636..5dec663eb 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue_task_queue_cumulative_statistics.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue_task_queue_cumulative_statistics.go @@ -17,26 +17,48 @@ import ( // TaskrouterV1WorkspaceTaskQueueTaskQueueCumulativeStatistics struct for TaskrouterV1WorkspaceTaskQueueTaskQueueCumulativeStatistics type TaskrouterV1WorkspaceTaskQueueTaskQueueCumulativeStatistics struct { - AccountSid *string `json:"AccountSid,omitempty"` - AvgTaskAcceptanceTime *int32 `json:"AvgTaskAcceptanceTime,omitempty"` - EndTime *time.Time `json:"EndTime,omitempty"` - ReservationsAccepted *int32 `json:"ReservationsAccepted,omitempty"` - ReservationsCanceled *int32 `json:"ReservationsCanceled,omitempty"` - ReservationsCreated *int32 `json:"ReservationsCreated,omitempty"` - ReservationsRejected *int32 `json:"ReservationsRejected,omitempty"` - ReservationsRescinded *int32 `json:"ReservationsRescinded,omitempty"` - ReservationsTimedOut *int32 `json:"ReservationsTimedOut,omitempty"` - SplitByWaitTime *map[string]interface{} `json:"SplitByWaitTime,omitempty"` - StartTime *time.Time `json:"StartTime,omitempty"` - TaskQueueSid *string `json:"TaskQueueSid,omitempty"` - TasksCanceled *int32 `json:"TasksCanceled,omitempty"` - TasksCompleted *int32 `json:"TasksCompleted,omitempty"` - TasksDeleted *int32 `json:"TasksDeleted,omitempty"` - TasksEntered *int32 `json:"TasksEntered,omitempty"` - TasksMoved *int32 `json:"TasksMoved,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The average time in seconds between Task creation and acceptance + AvgTaskAcceptanceTime *int32 `json:"AvgTaskAcceptanceTime,omitempty"` + // The end of the interval during which these statistics were calculated + EndTime *time.Time `json:"EndTime,omitempty"` + // The total number of Reservations accepted for Tasks in the TaskQueue + ReservationsAccepted *int32 `json:"ReservationsAccepted,omitempty"` + // The total number of Reservations canceled for Tasks in the TaskQueue + ReservationsCanceled *int32 `json:"ReservationsCanceled,omitempty"` + // The total number of Reservations created for Tasks in the TaskQueue + ReservationsCreated *int32 `json:"ReservationsCreated,omitempty"` + // The total number of Reservations rejected for Tasks in the TaskQueue + ReservationsRejected *int32 `json:"ReservationsRejected,omitempty"` + // The total number of Reservations rescinded + ReservationsRescinded *int32 `json:"ReservationsRescinded,omitempty"` + // The total number of Reservations that timed out for Tasks in the TaskQueue + ReservationsTimedOut *int32 `json:"ReservationsTimedOut,omitempty"` + // A list of objects that describe the Tasks canceled and reservations accepted above and below the specified thresholds + SplitByWaitTime *map[string]interface{} `json:"SplitByWaitTime,omitempty"` + // The beginning of the interval during which these statistics were calculated + StartTime *time.Time `json:"StartTime,omitempty"` + // The SID of the TaskQueue from which these statistics were calculated + TaskQueueSid *string `json:"TaskQueueSid,omitempty"` + // The total number of Tasks canceled in the TaskQueue + TasksCanceled *int32 `json:"TasksCanceled,omitempty"` + // The total number of Tasks completed in the TaskQueue + TasksCompleted *int32 `json:"TasksCompleted,omitempty"` + // The total number of Tasks deleted in the TaskQueue + TasksDeleted *int32 `json:"TasksDeleted,omitempty"` + // The total number of Tasks entered into the TaskQueue + TasksEntered *int32 `json:"TasksEntered,omitempty"` + // The total number of Tasks that were moved from one queue to another + TasksMoved *int32 `json:"TasksMoved,omitempty"` + // The absolute URL of the TaskQueue statistics resource + Url *string `json:"Url,omitempty"` + // The relative wait duration statistics for Tasks accepted while in the TaskQueue WaitDurationInQueueUntilAccepted *map[string]interface{} `json:"WaitDurationInQueueUntilAccepted,omitempty"` - WaitDurationUntilAccepted *map[string]interface{} `json:"WaitDurationUntilAccepted,omitempty"` - WaitDurationUntilCanceled *map[string]interface{} `json:"WaitDurationUntilCanceled,omitempty"` - WorkspaceSid *string `json:"WorkspaceSid,omitempty"` + // The wait duration statistics for Tasks accepted while in the TaskQueue + WaitDurationUntilAccepted *map[string]interface{} `json:"WaitDurationUntilAccepted,omitempty"` + // The wait duration statistics for Tasks canceled while in the TaskQueue + WaitDurationUntilCanceled *map[string]interface{} `json:"WaitDurationUntilCanceled,omitempty"` + // The SID of the Workspace that contains the TaskQueue + WorkspaceSid *string `json:"WorkspaceSid,omitempty"` } diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue_task_queue_real_time_statistics.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue_task_queue_real_time_statistics.go index a1490110f..2c1824292 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue_task_queue_real_time_statistics.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue_task_queue_real_time_statistics.go @@ -13,18 +13,32 @@ package openapi // TaskrouterV1WorkspaceTaskQueueTaskQueueRealTimeStatistics struct for TaskrouterV1WorkspaceTaskQueueTaskQueueRealTimeStatistics type TaskrouterV1WorkspaceTaskQueueTaskQueueRealTimeStatistics struct { - AccountSid *string `json:"AccountSid,omitempty"` - ActivityStatistics *[]map[string]interface{} `json:"ActivityStatistics,omitempty"` - LongestRelativeTaskAgeInQueue *int32 `json:"LongestRelativeTaskAgeInQueue,omitempty"` - LongestRelativeTaskSidInQueue *string `json:"LongestRelativeTaskSidInQueue,omitempty"` - LongestTaskWaitingAge *int32 `json:"LongestTaskWaitingAge,omitempty"` - LongestTaskWaitingSid *string `json:"LongestTaskWaitingSid,omitempty"` - TaskQueueSid *string `json:"TaskQueueSid,omitempty"` - TasksByPriority *map[string]interface{} `json:"TasksByPriority,omitempty"` - TasksByStatus *map[string]interface{} `json:"TasksByStatus,omitempty"` - TotalAvailableWorkers *int32 `json:"TotalAvailableWorkers,omitempty"` - TotalEligibleWorkers *int32 `json:"TotalEligibleWorkers,omitempty"` - TotalTasks *int32 `json:"TotalTasks,omitempty"` - Url *string `json:"Url,omitempty"` - WorkspaceSid *string `json:"WorkspaceSid,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The number of current Workers by Activity + ActivityStatistics *[]map[string]interface{} `json:"ActivityStatistics,omitempty"` + // The relative age in the TaskQueue for the longest waiting Task. + LongestRelativeTaskAgeInQueue *int32 `json:"LongestRelativeTaskAgeInQueue,omitempty"` + // The SID of the Task waiting in the TaskQueue the longest. + LongestRelativeTaskSidInQueue *string `json:"LongestRelativeTaskSidInQueue,omitempty"` + // The age of the longest waiting Task + LongestTaskWaitingAge *int32 `json:"LongestTaskWaitingAge,omitempty"` + // The SID of the longest waiting Task + LongestTaskWaitingSid *string `json:"LongestTaskWaitingSid,omitempty"` + // The SID of the TaskQueue from which these statistics were calculated + TaskQueueSid *string `json:"TaskQueueSid,omitempty"` + // The number of Tasks by priority + TasksByPriority *map[string]interface{} `json:"TasksByPriority,omitempty"` + // The number of Tasks by their current status + TasksByStatus *map[string]interface{} `json:"TasksByStatus,omitempty"` + // The total number of Workers available for Tasks in the TaskQueue + TotalAvailableWorkers *int32 `json:"TotalAvailableWorkers,omitempty"` + // The total number of Workers eligible for Tasks in the TaskQueue, independent of their Activity state + TotalEligibleWorkers *int32 `json:"TotalEligibleWorkers,omitempty"` + // The total number of Tasks + TotalTasks *int32 `json:"TotalTasks,omitempty"` + // The absolute URL of the TaskQueue statistics resource + Url *string `json:"Url,omitempty"` + // The SID of the Workspace that contains the TaskQueue + WorkspaceSid *string `json:"WorkspaceSid,omitempty"` } diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue_task_queue_statistics.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue_task_queue_statistics.go index a3868bfe8..ae92903a2 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue_task_queue_statistics.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue_task_queue_statistics.go @@ -13,10 +13,16 @@ package openapi // TaskrouterV1WorkspaceTaskQueueTaskQueueStatistics struct for TaskrouterV1WorkspaceTaskQueueTaskQueueStatistics type TaskrouterV1WorkspaceTaskQueueTaskQueueStatistics struct { - AccountSid *string `json:"AccountSid,omitempty"` - Cumulative *map[string]interface{} `json:"Cumulative,omitempty"` - Realtime *map[string]interface{} `json:"Realtime,omitempty"` - TaskQueueSid *string `json:"TaskQueueSid,omitempty"` - Url *string `json:"Url,omitempty"` - WorkspaceSid *string `json:"WorkspaceSid,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // An object that contains the cumulative statistics for the TaskQueue + Cumulative *map[string]interface{} `json:"Cumulative,omitempty"` + // An object that contains the real-time statistics for the TaskQueue + Realtime *map[string]interface{} `json:"Realtime,omitempty"` + // The SID of the TaskQueue from which these statistics were calculated + TaskQueueSid *string `json:"TaskQueueSid,omitempty"` + // The absolute URL of the TaskQueue statistics resource + Url *string `json:"Url,omitempty"` + // The SID of the Workspace that contains the TaskQueue + WorkspaceSid *string `json:"WorkspaceSid,omitempty"` } diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue_task_queues_statistics.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue_task_queues_statistics.go index 4124ffef8..cb658e252 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue_task_queues_statistics.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue_task_queues_statistics.go @@ -13,9 +13,14 @@ package openapi // TaskrouterV1WorkspaceTaskQueueTaskQueuesStatistics struct for TaskrouterV1WorkspaceTaskQueueTaskQueuesStatistics type TaskrouterV1WorkspaceTaskQueueTaskQueuesStatistics struct { - AccountSid *string `json:"AccountSid,omitempty"` - Cumulative *map[string]interface{} `json:"Cumulative,omitempty"` - Realtime *map[string]interface{} `json:"Realtime,omitempty"` - TaskQueueSid *string `json:"TaskQueueSid,omitempty"` - WorkspaceSid *string `json:"WorkspaceSid,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // An object that contains the cumulative statistics for the TaskQueues + Cumulative *map[string]interface{} `json:"Cumulative,omitempty"` + // An object that contains the real-time statistics for the TaskQueues + Realtime *map[string]interface{} `json:"Realtime,omitempty"` + // The SID of the TaskQueue from which these statistics were calculated + TaskQueueSid *string `json:"TaskQueueSid,omitempty"` + // The SID of the Workspace that contains the TaskQueues + WorkspaceSid *string `json:"WorkspaceSid,omitempty"` } diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_task_reservation.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_task_reservation.go index 53293200c..00f342de2 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_task_reservation.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_task_reservation.go @@ -17,15 +17,26 @@ import ( // TaskrouterV1WorkspaceTaskTaskReservation struct for TaskrouterV1WorkspaceTaskTaskReservation type TaskrouterV1WorkspaceTaskTaskReservation struct { - AccountSid *string `json:"AccountSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - ReservationStatus *TaskReservationStatus `json:"ReservationStatus,omitempty"` - Sid *string `json:"Sid,omitempty"` - TaskSid *string `json:"TaskSid,omitempty"` - Url *string `json:"Url,omitempty"` - WorkerName *string `json:"WorkerName,omitempty"` - WorkerSid *string `json:"WorkerSid,omitempty"` - WorkspaceSid *string `json:"WorkspaceSid,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The URLs of related resources + Links *map[string]interface{} `json:"Links,omitempty"` + // The current status of the reservation + ReservationStatus *string `json:"ReservationStatus,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The SID of the reserved Task resource + TaskSid *string `json:"TaskSid,omitempty"` + // The absolute URL of the TaskReservation reservation + Url *string `json:"Url,omitempty"` + // The friendly_name of the Worker that is reserved + WorkerName *string `json:"WorkerName,omitempty"` + // The SID of the reserved Worker resource + WorkerSid *string `json:"WorkerSid,omitempty"` + // The SID of the Workspace that this task is contained within. + WorkspaceSid *string `json:"WorkspaceSid,omitempty"` } diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker.go index d648449d4..9a1c4d5af 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker.go @@ -17,17 +17,30 @@ import ( // TaskrouterV1WorkspaceWorker struct for TaskrouterV1WorkspaceWorker type TaskrouterV1WorkspaceWorker struct { - AccountSid *string `json:"AccountSid,omitempty"` - ActivityName *string `json:"ActivityName,omitempty"` - ActivitySid *string `json:"ActivitySid,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - Available *bool `json:"Available,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateStatusChanged *time.Time `json:"DateStatusChanged,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` - WorkspaceSid *string `json:"WorkspaceSid,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The friendly_name of the Worker's current Activity + ActivityName *string `json:"ActivityName,omitempty"` + // The SID of the Worker's current Activity + ActivitySid *string `json:"ActivitySid,omitempty"` + // The JSON string that describes the Worker + Attributes *string `json:"Attributes,omitempty"` + // Whether the Worker is available to perform tasks + Available *bool `json:"Available,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The date and time in GMT of the last change to the Worker's activity + DateStatusChanged *time.Time `json:"DateStatusChanged,omitempty"` + // The ISO 8601 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The string that you assigned to describe the resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // The URLs of related resources + Links *map[string]interface{} `json:"Links,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The absolute URL of the Worker resource + Url *string `json:"Url,omitempty"` + // The SID of the Workspace that contains the Worker + WorkspaceSid *string `json:"WorkspaceSid,omitempty"` } diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_worker_channel.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_worker_channel.go index aa382a01e..fd969ad35 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_worker_channel.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_worker_channel.go @@ -17,17 +17,30 @@ import ( // TaskrouterV1WorkspaceWorkerWorkerChannel struct for TaskrouterV1WorkspaceWorkerWorkerChannel type TaskrouterV1WorkspaceWorkerWorkerChannel struct { - AccountSid *string `json:"AccountSid,omitempty"` - AssignedTasks *int32 `json:"AssignedTasks,omitempty"` - Available *bool `json:"Available,omitempty"` - AvailableCapacityPercentage *int32 `json:"AvailableCapacityPercentage,omitempty"` - ConfiguredCapacity *int32 `json:"ConfiguredCapacity,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Sid *string `json:"Sid,omitempty"` - TaskChannelSid *string `json:"TaskChannelSid,omitempty"` - TaskChannelUniqueName *string `json:"TaskChannelUniqueName,omitempty"` - Url *string `json:"Url,omitempty"` - WorkerSid *string `json:"WorkerSid,omitempty"` - WorkspaceSid *string `json:"WorkspaceSid,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The total number of Tasks assigned to Worker for the TaskChannel type + AssignedTasks *int32 `json:"AssignedTasks,omitempty"` + // Whether the Worker should receive Tasks of the TaskChannel type + Available *bool `json:"Available,omitempty"` + // The current available capacity between 0 to 100 for the TaskChannel + AvailableCapacityPercentage *int32 `json:"AvailableCapacityPercentage,omitempty"` + // The current configured capacity for the WorkerChannel + ConfiguredCapacity *int32 `json:"ConfiguredCapacity,omitempty"` + // The RFC 2822 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The SID of the TaskChannel + TaskChannelSid *string `json:"TaskChannelSid,omitempty"` + // The unique name of the TaskChannel, such as 'voice' or 'sms' + TaskChannelUniqueName *string `json:"TaskChannelUniqueName,omitempty"` + // The absolute URL of the WorkerChannel resource + Url *string `json:"Url,omitempty"` + // The SID of the Worker that contains the WorkerChannel + WorkerSid *string `json:"WorkerSid,omitempty"` + // The SID of the Workspace that contains the WorkerChannel + WorkspaceSid *string `json:"WorkspaceSid,omitempty"` } diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_worker_instance_statistics.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_worker_instance_statistics.go index 88f5154ca..86875ae7a 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_worker_instance_statistics.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_worker_instance_statistics.go @@ -13,9 +13,14 @@ package openapi // TaskrouterV1WorkspaceWorkerWorkerInstanceStatistics struct for TaskrouterV1WorkspaceWorkerWorkerInstanceStatistics type TaskrouterV1WorkspaceWorkerWorkerInstanceStatistics struct { - AccountSid *string `json:"AccountSid,omitempty"` - Cumulative *map[string]interface{} `json:"Cumulative,omitempty"` - Url *string `json:"Url,omitempty"` - WorkerSid *string `json:"WorkerSid,omitempty"` - WorkspaceSid *string `json:"WorkspaceSid,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // An object that contains the cumulative statistics for the Worker + Cumulative *map[string]interface{} `json:"Cumulative,omitempty"` + // The absolute URL of the WorkerChannel statistics resource + Url *string `json:"Url,omitempty"` + // The SID of the Worker that contains the WorkerChannel + WorkerSid *string `json:"WorkerSid,omitempty"` + // The SID of the Workspace that contains the WorkerChannel + WorkspaceSid *string `json:"WorkspaceSid,omitempty"` } diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_worker_reservation.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_worker_reservation.go index 4573026d9..6edfb2192 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_worker_reservation.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_worker_reservation.go @@ -17,15 +17,26 @@ import ( // TaskrouterV1WorkspaceWorkerWorkerReservation struct for TaskrouterV1WorkspaceWorkerWorkerReservation type TaskrouterV1WorkspaceWorkerWorkerReservation struct { - AccountSid *string `json:"AccountSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - ReservationStatus *WorkerReservationStatus `json:"ReservationStatus,omitempty"` - Sid *string `json:"Sid,omitempty"` - TaskSid *string `json:"TaskSid,omitempty"` - Url *string `json:"Url,omitempty"` - WorkerName *string `json:"WorkerName,omitempty"` - WorkerSid *string `json:"WorkerSid,omitempty"` - WorkspaceSid *string `json:"WorkspaceSid,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The URLs of related resources + Links *map[string]interface{} `json:"Links,omitempty"` + // The current status of the reservation + ReservationStatus *string `json:"ReservationStatus,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The SID of the reserved Task resource + TaskSid *string `json:"TaskSid,omitempty"` + // The absolute URL of the WorkerReservation resource + Url *string `json:"Url,omitempty"` + // The friendly_name of the Worker that is reserved + WorkerName *string `json:"WorkerName,omitempty"` + // The SID of the reserved Worker resource + WorkerSid *string `json:"WorkerSid,omitempty"` + // The SID of the Workspace that this worker is contained within. + WorkspaceSid *string `json:"WorkspaceSid,omitempty"` } diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_worker_statistics.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_worker_statistics.go index f7c41d5cd..510eaa0cd 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_worker_statistics.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_worker_statistics.go @@ -13,9 +13,14 @@ package openapi // TaskrouterV1WorkspaceWorkerWorkerStatistics struct for TaskrouterV1WorkspaceWorkerWorkerStatistics type TaskrouterV1WorkspaceWorkerWorkerStatistics struct { - AccountSid *string `json:"AccountSid,omitempty"` - Cumulative *map[string]interface{} `json:"Cumulative,omitempty"` - Realtime *map[string]interface{} `json:"Realtime,omitempty"` - Url *string `json:"Url,omitempty"` - WorkspaceSid *string `json:"WorkspaceSid,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // An object that contains the cumulative statistics for the Worker + Cumulative *map[string]interface{} `json:"Cumulative,omitempty"` + // An object that contains the real-time statistics for the Worker + Realtime *map[string]interface{} `json:"Realtime,omitempty"` + // The absolute URL of the Worker statistics resource + Url *string `json:"Url,omitempty"` + // The SID of the Workspace that contains the Worker + WorkspaceSid *string `json:"WorkspaceSid,omitempty"` } diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_workers_cumulative_statistics.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_workers_cumulative_statistics.go index edfb23398..7e16eb857 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_workers_cumulative_statistics.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_workers_cumulative_statistics.go @@ -17,16 +17,28 @@ import ( // TaskrouterV1WorkspaceWorkerWorkersCumulativeStatistics struct for TaskrouterV1WorkspaceWorkerWorkersCumulativeStatistics type TaskrouterV1WorkspaceWorkerWorkersCumulativeStatistics struct { - AccountSid *string `json:"AccountSid,omitempty"` - ActivityDurations *[]map[string]interface{} `json:"ActivityDurations,omitempty"` - EndTime *time.Time `json:"EndTime,omitempty"` - ReservationsAccepted *int32 `json:"ReservationsAccepted,omitempty"` - ReservationsCanceled *int32 `json:"ReservationsCanceled,omitempty"` - ReservationsCreated *int32 `json:"ReservationsCreated,omitempty"` - ReservationsRejected *int32 `json:"ReservationsRejected,omitempty"` - ReservationsRescinded *int32 `json:"ReservationsRescinded,omitempty"` - ReservationsTimedOut *int32 `json:"ReservationsTimedOut,omitempty"` - StartTime *time.Time `json:"StartTime,omitempty"` - Url *string `json:"Url,omitempty"` - WorkspaceSid *string `json:"WorkspaceSid,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The minimum, average, maximum, and total time that Workers spent in each Activity + ActivityDurations *[]map[string]interface{} `json:"ActivityDurations,omitempty"` + // The end of the interval during which these statistics were calculated + EndTime *time.Time `json:"EndTime,omitempty"` + // The total number of Reservations that were accepted + ReservationsAccepted *int32 `json:"ReservationsAccepted,omitempty"` + // The total number of Reservations that were canceled + ReservationsCanceled *int32 `json:"ReservationsCanceled,omitempty"` + // The total number of Reservations that were created + ReservationsCreated *int32 `json:"ReservationsCreated,omitempty"` + // The total number of Reservations that were rejected + ReservationsRejected *int32 `json:"ReservationsRejected,omitempty"` + // The total number of Reservations that were rescinded + ReservationsRescinded *int32 `json:"ReservationsRescinded,omitempty"` + // The total number of Reservations that were timed out + ReservationsTimedOut *int32 `json:"ReservationsTimedOut,omitempty"` + // The beginning of the interval during which these statistics were calculated + StartTime *time.Time `json:"StartTime,omitempty"` + // The absolute URL of the Workers statistics resource + Url *string `json:"Url,omitempty"` + // The SID of the Workspace that contains the Workers + WorkspaceSid *string `json:"WorkspaceSid,omitempty"` } diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_workers_real_time_statistics.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_workers_real_time_statistics.go index fb1d9faef..08f02c990 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_workers_real_time_statistics.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_workers_real_time_statistics.go @@ -13,9 +13,14 @@ package openapi // TaskrouterV1WorkspaceWorkerWorkersRealTimeStatistics struct for TaskrouterV1WorkspaceWorkerWorkersRealTimeStatistics type TaskrouterV1WorkspaceWorkerWorkersRealTimeStatistics struct { - AccountSid *string `json:"AccountSid,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The number of current Workers by Activity ActivityStatistics *[]map[string]interface{} `json:"ActivityStatistics,omitempty"` - TotalWorkers *int32 `json:"TotalWorkers,omitempty"` - Url *string `json:"Url,omitempty"` - WorkspaceSid *string `json:"WorkspaceSid,omitempty"` + // The total number of Workers + TotalWorkers *int32 `json:"TotalWorkers,omitempty"` + // The absolute URL of the Workers statistics resource + Url *string `json:"Url,omitempty"` + // The SID of the Workspace that contains the Workers + WorkspaceSid *string `json:"WorkspaceSid,omitempty"` } diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workflow.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workflow.go index 3d9f159b0..5416a696c 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workflow.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workflow.go @@ -17,17 +17,30 @@ import ( // TaskrouterV1WorkspaceWorkflow struct for TaskrouterV1WorkspaceWorkflow type TaskrouterV1WorkspaceWorkflow struct { - AccountSid *string `json:"AccountSid,omitempty"` - AssignmentCallbackUrl *string `json:"AssignmentCallbackUrl,omitempty"` - Configuration *string `json:"Configuration,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - DocumentContentType *string `json:"DocumentContentType,omitempty"` - FallbackAssignmentCallbackUrl *string `json:"FallbackAssignmentCallbackUrl,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - Sid *string `json:"Sid,omitempty"` - TaskReservationTimeout *int32 `json:"TaskReservationTimeout,omitempty"` - Url *string `json:"Url,omitempty"` - WorkspaceSid *string `json:"WorkspaceSid,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The URL that we call when a task managed by the Workflow is assigned to a Worker + AssignmentCallbackUrl *string `json:"AssignmentCallbackUrl,omitempty"` + // A JSON string that contains the Workflow's configuration + Configuration *string `json:"Configuration,omitempty"` + // The RFC 2822 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The MIME type of the document + DocumentContentType *string `json:"DocumentContentType,omitempty"` + // The URL that we call when a call to the `assignment_callback_url` fails + FallbackAssignmentCallbackUrl *string `json:"FallbackAssignmentCallbackUrl,omitempty"` + // The string that you assigned to describe the Workflow resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // The URLs of related resources + Links *map[string]interface{} `json:"Links,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // How long TaskRouter will wait for a confirmation response from your application after it assigns a Task to a Worker + TaskReservationTimeout *int32 `json:"TaskReservationTimeout,omitempty"` + // The absolute URL of the Workflow resource + Url *string `json:"Url,omitempty"` + // The SID of the Workspace that contains the Workflow + WorkspaceSid *string `json:"WorkspaceSid,omitempty"` } diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workflow_workflow_cumulative_statistics.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workflow_workflow_cumulative_statistics.go index b8ceccc88..176f5cc56 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workflow_workflow_cumulative_statistics.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workflow_workflow_cumulative_statistics.go @@ -17,26 +17,48 @@ import ( // TaskrouterV1WorkspaceWorkflowWorkflowCumulativeStatistics struct for TaskrouterV1WorkspaceWorkflowWorkflowCumulativeStatistics type TaskrouterV1WorkspaceWorkflowWorkflowCumulativeStatistics struct { - AccountSid *string `json:"AccountSid,omitempty"` - AvgTaskAcceptanceTime *int32 `json:"AvgTaskAcceptanceTime,omitempty"` - EndTime *time.Time `json:"EndTime,omitempty"` - ReservationsAccepted *int32 `json:"ReservationsAccepted,omitempty"` - ReservationsCanceled *int32 `json:"ReservationsCanceled,omitempty"` - ReservationsCreated *int32 `json:"ReservationsCreated,omitempty"` - ReservationsRejected *int32 `json:"ReservationsRejected,omitempty"` - ReservationsRescinded *int32 `json:"ReservationsRescinded,omitempty"` - ReservationsTimedOut *int32 `json:"ReservationsTimedOut,omitempty"` - SplitByWaitTime *map[string]interface{} `json:"SplitByWaitTime,omitempty"` - StartTime *time.Time `json:"StartTime,omitempty"` - TasksCanceled *int32 `json:"TasksCanceled,omitempty"` - TasksCompleted *int32 `json:"TasksCompleted,omitempty"` - TasksDeleted *int32 `json:"TasksDeleted,omitempty"` - TasksEntered *int32 `json:"TasksEntered,omitempty"` - TasksMoved *int32 `json:"TasksMoved,omitempty"` - TasksTimedOutInWorkflow *int32 `json:"TasksTimedOutInWorkflow,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The average time in seconds between Task creation and acceptance + AvgTaskAcceptanceTime *int32 `json:"AvgTaskAcceptanceTime,omitempty"` + // The end of the interval during which these statistics were calculated + EndTime *time.Time `json:"EndTime,omitempty"` + // The total number of Reservations accepted by Workers + ReservationsAccepted *int32 `json:"ReservationsAccepted,omitempty"` + // The total number of Reservations that were canceled + ReservationsCanceled *int32 `json:"ReservationsCanceled,omitempty"` + // The total number of Reservations that were created for Workers + ReservationsCreated *int32 `json:"ReservationsCreated,omitempty"` + // The total number of Reservations that were rejected + ReservationsRejected *int32 `json:"ReservationsRejected,omitempty"` + // The total number of Reservations that were rescinded + ReservationsRescinded *int32 `json:"ReservationsRescinded,omitempty"` + // The total number of Reservations that were timed out + ReservationsTimedOut *int32 `json:"ReservationsTimedOut,omitempty"` + // A list of objects that describe the Tasks canceled and reservations accepted above and below the specified thresholds + SplitByWaitTime *map[string]interface{} `json:"SplitByWaitTime,omitempty"` + // The beginning of the interval during which these statistics were calculated + StartTime *time.Time `json:"StartTime,omitempty"` + // The total number of Tasks that were canceled + TasksCanceled *int32 `json:"TasksCanceled,omitempty"` + // The total number of Tasks that were completed + TasksCompleted *int32 `json:"TasksCompleted,omitempty"` + // The total number of Tasks that were deleted + TasksDeleted *int32 `json:"TasksDeleted,omitempty"` + // The total number of Tasks that entered the Workflow + TasksEntered *int32 `json:"TasksEntered,omitempty"` + // The total number of Tasks that were moved from one queue to another + TasksMoved *int32 `json:"TasksMoved,omitempty"` + // The total number of Tasks that were timed out of their Workflows + TasksTimedOutInWorkflow *int32 `json:"TasksTimedOutInWorkflow,omitempty"` + // The absolute URL of the Workflow statistics resource + Url *string `json:"Url,omitempty"` + // The wait duration statistics for Tasks that were accepted WaitDurationUntilAccepted *map[string]interface{} `json:"WaitDurationUntilAccepted,omitempty"` + // The wait duration statistics for Tasks that were canceled WaitDurationUntilCanceled *map[string]interface{} `json:"WaitDurationUntilCanceled,omitempty"` - WorkflowSid *string `json:"WorkflowSid,omitempty"` - WorkspaceSid *string `json:"WorkspaceSid,omitempty"` + // Returns the list of Tasks that are being controlled by the Workflow with the specified Sid value + WorkflowSid *string `json:"WorkflowSid,omitempty"` + // The SID of the Workspace that contains the Workflow. + WorkspaceSid *string `json:"WorkspaceSid,omitempty"` } diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workflow_workflow_real_time_statistics.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workflow_workflow_real_time_statistics.go index ed34312ff..31c58f35f 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workflow_workflow_real_time_statistics.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workflow_workflow_real_time_statistics.go @@ -13,13 +13,22 @@ package openapi // TaskrouterV1WorkspaceWorkflowWorkflowRealTimeStatistics struct for TaskrouterV1WorkspaceWorkflowWorkflowRealTimeStatistics type TaskrouterV1WorkspaceWorkflowWorkflowRealTimeStatistics struct { - AccountSid *string `json:"AccountSid,omitempty"` - LongestTaskWaitingAge *int32 `json:"LongestTaskWaitingAge,omitempty"` - LongestTaskWaitingSid *string `json:"LongestTaskWaitingSid,omitempty"` - TasksByPriority *map[string]interface{} `json:"TasksByPriority,omitempty"` - TasksByStatus *map[string]interface{} `json:"TasksByStatus,omitempty"` - TotalTasks *int32 `json:"TotalTasks,omitempty"` - Url *string `json:"Url,omitempty"` - WorkflowSid *string `json:"WorkflowSid,omitempty"` - WorkspaceSid *string `json:"WorkspaceSid,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The age of the longest waiting Task + LongestTaskWaitingAge *int32 `json:"LongestTaskWaitingAge,omitempty"` + // The SID of the longest waiting Task + LongestTaskWaitingSid *string `json:"LongestTaskWaitingSid,omitempty"` + // The number of Tasks by priority + TasksByPriority *map[string]interface{} `json:"TasksByPriority,omitempty"` + // The number of Tasks by their current status + TasksByStatus *map[string]interface{} `json:"TasksByStatus,omitempty"` + // The total number of Tasks + TotalTasks *int32 `json:"TotalTasks,omitempty"` + // The absolute URL of the Workflow statistics resource + Url *string `json:"Url,omitempty"` + // Returns the list of Tasks that are being controlled by the Workflow with the specified SID value + WorkflowSid *string `json:"WorkflowSid,omitempty"` + // The SID of the Workspace that contains the Workflow. + WorkspaceSid *string `json:"WorkspaceSid,omitempty"` } diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workflow_workflow_statistics.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workflow_workflow_statistics.go index 9a6fe1acf..04a5acabc 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workflow_workflow_statistics.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workflow_workflow_statistics.go @@ -13,10 +13,16 @@ package openapi // TaskrouterV1WorkspaceWorkflowWorkflowStatistics struct for TaskrouterV1WorkspaceWorkflowWorkflowStatistics type TaskrouterV1WorkspaceWorkflowWorkflowStatistics struct { - AccountSid *string `json:"AccountSid,omitempty"` - Cumulative *map[string]interface{} `json:"Cumulative,omitempty"` - Realtime *map[string]interface{} `json:"Realtime,omitempty"` - Url *string `json:"Url,omitempty"` - WorkflowSid *string `json:"WorkflowSid,omitempty"` - WorkspaceSid *string `json:"WorkspaceSid,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // An object that contains the cumulative statistics for the Workflow + Cumulative *map[string]interface{} `json:"Cumulative,omitempty"` + // An object that contains the real-time statistics for the Workflow + Realtime *map[string]interface{} `json:"Realtime,omitempty"` + // The absolute URL of the Workflow statistics resource + Url *string `json:"Url,omitempty"` + // Returns the list of Tasks that are being controlled by the Workflow with the specified SID value + WorkflowSid *string `json:"WorkflowSid,omitempty"` + // The SID of the Workspace that contains the Workflow + WorkspaceSid *string `json:"WorkspaceSid,omitempty"` } diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workspace_cumulative_statistics.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workspace_cumulative_statistics.go index 9546c178c..fad6ca928 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workspace_cumulative_statistics.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workspace_cumulative_statistics.go @@ -17,25 +17,46 @@ import ( // TaskrouterV1WorkspaceWorkspaceCumulativeStatistics struct for TaskrouterV1WorkspaceWorkspaceCumulativeStatistics type TaskrouterV1WorkspaceWorkspaceCumulativeStatistics struct { - AccountSid *string `json:"AccountSid,omitempty"` - AvgTaskAcceptanceTime *int32 `json:"AvgTaskAcceptanceTime,omitempty"` - EndTime *time.Time `json:"EndTime,omitempty"` - ReservationsAccepted *int32 `json:"ReservationsAccepted,omitempty"` - ReservationsCanceled *int32 `json:"ReservationsCanceled,omitempty"` - ReservationsCreated *int32 `json:"ReservationsCreated,omitempty"` - ReservationsRejected *int32 `json:"ReservationsRejected,omitempty"` - ReservationsRescinded *int32 `json:"ReservationsRescinded,omitempty"` - ReservationsTimedOut *int32 `json:"ReservationsTimedOut,omitempty"` - SplitByWaitTime *map[string]interface{} `json:"SplitByWaitTime,omitempty"` - StartTime *time.Time `json:"StartTime,omitempty"` - TasksCanceled *int32 `json:"TasksCanceled,omitempty"` - TasksCompleted *int32 `json:"TasksCompleted,omitempty"` - TasksCreated *int32 `json:"TasksCreated,omitempty"` - TasksDeleted *int32 `json:"TasksDeleted,omitempty"` - TasksMoved *int32 `json:"TasksMoved,omitempty"` - TasksTimedOutInWorkflow *int32 `json:"TasksTimedOutInWorkflow,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The average time in seconds between Task creation and acceptance + AvgTaskAcceptanceTime *int32 `json:"AvgTaskAcceptanceTime,omitempty"` + // The end of the interval during which these statistics were calculated + EndTime *time.Time `json:"EndTime,omitempty"` + // The total number of Reservations accepted by Workers + ReservationsAccepted *int32 `json:"ReservationsAccepted,omitempty"` + // The total number of Reservations that were canceled + ReservationsCanceled *int32 `json:"ReservationsCanceled,omitempty"` + // The total number of Reservations that were created for Workers + ReservationsCreated *int32 `json:"ReservationsCreated,omitempty"` + // The total number of Reservations that were rejected + ReservationsRejected *int32 `json:"ReservationsRejected,omitempty"` + // The total number of Reservations that were rescinded + ReservationsRescinded *int32 `json:"ReservationsRescinded,omitempty"` + // The total number of Reservations that were timed out + ReservationsTimedOut *int32 `json:"ReservationsTimedOut,omitempty"` + // A list of objects that describe the Tasks canceled and reservations accepted above and below the specified thresholds + SplitByWaitTime *map[string]interface{} `json:"SplitByWaitTime,omitempty"` + // The beginning of the interval during which these statistics were calculated + StartTime *time.Time `json:"StartTime,omitempty"` + // The total number of Tasks that were canceled + TasksCanceled *int32 `json:"TasksCanceled,omitempty"` + // The total number of Tasks that were completed + TasksCompleted *int32 `json:"TasksCompleted,omitempty"` + // The total number of Tasks created + TasksCreated *int32 `json:"TasksCreated,omitempty"` + // The total number of Tasks that were deleted + TasksDeleted *int32 `json:"TasksDeleted,omitempty"` + // The total number of Tasks that were moved from one queue to another + TasksMoved *int32 `json:"TasksMoved,omitempty"` + // The total number of Tasks that were timed out of their Workflows + TasksTimedOutInWorkflow *int32 `json:"TasksTimedOutInWorkflow,omitempty"` + // The absolute URL of the Workspace statistics resource + Url *string `json:"Url,omitempty"` + // The wait duration statistics for Tasks that were accepted WaitDurationUntilAccepted *map[string]interface{} `json:"WaitDurationUntilAccepted,omitempty"` + // The wait duration statistics for Tasks that were canceled WaitDurationUntilCanceled *map[string]interface{} `json:"WaitDurationUntilCanceled,omitempty"` - WorkspaceSid *string `json:"WorkspaceSid,omitempty"` + // The SID of the Workspace + WorkspaceSid *string `json:"WorkspaceSid,omitempty"` } diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workspace_real_time_statistics.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workspace_real_time_statistics.go index 0e7d23bc3..b5414c357 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workspace_real_time_statistics.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workspace_real_time_statistics.go @@ -13,14 +13,24 @@ package openapi // TaskrouterV1WorkspaceWorkspaceRealTimeStatistics struct for TaskrouterV1WorkspaceWorkspaceRealTimeStatistics type TaskrouterV1WorkspaceWorkspaceRealTimeStatistics struct { - AccountSid *string `json:"AccountSid,omitempty"` - ActivityStatistics *[]map[string]interface{} `json:"ActivityStatistics,omitempty"` - LongestTaskWaitingAge *int32 `json:"LongestTaskWaitingAge,omitempty"` - LongestTaskWaitingSid *string `json:"LongestTaskWaitingSid,omitempty"` - TasksByPriority *map[string]interface{} `json:"TasksByPriority,omitempty"` - TasksByStatus *map[string]interface{} `json:"TasksByStatus,omitempty"` - TotalTasks *int32 `json:"TotalTasks,omitempty"` - TotalWorkers *int32 `json:"TotalWorkers,omitempty"` - Url *string `json:"Url,omitempty"` - WorkspaceSid *string `json:"WorkspaceSid,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The number of current Workers by Activity + ActivityStatistics *[]map[string]interface{} `json:"ActivityStatistics,omitempty"` + // The age of the longest waiting Task + LongestTaskWaitingAge *int32 `json:"LongestTaskWaitingAge,omitempty"` + // The SID of the longest waiting Task + LongestTaskWaitingSid *string `json:"LongestTaskWaitingSid,omitempty"` + // The number of Tasks by priority + TasksByPriority *map[string]interface{} `json:"TasksByPriority,omitempty"` + // The number of Tasks by their current status + TasksByStatus *map[string]interface{} `json:"TasksByStatus,omitempty"` + // The total number of Tasks + TotalTasks *int32 `json:"TotalTasks,omitempty"` + // The total number of Workers in the Workspace + TotalWorkers *int32 `json:"TotalWorkers,omitempty"` + // The absolute URL of the Workspace statistics resource + Url *string `json:"Url,omitempty"` + // The SID of the Workspace + WorkspaceSid *string `json:"WorkspaceSid,omitempty"` } diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workspace_statistics.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workspace_statistics.go index 00e5738da..3423ac0b9 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workspace_statistics.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workspace_statistics.go @@ -13,9 +13,14 @@ package openapi // TaskrouterV1WorkspaceWorkspaceStatistics struct for TaskrouterV1WorkspaceWorkspaceStatistics type TaskrouterV1WorkspaceWorkspaceStatistics struct { - AccountSid *string `json:"AccountSid,omitempty"` - Cumulative *map[string]interface{} `json:"Cumulative,omitempty"` - Realtime *map[string]interface{} `json:"Realtime,omitempty"` - Url *string `json:"Url,omitempty"` - WorkspaceSid *string `json:"WorkspaceSid,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // An object that contains the cumulative statistics for the Workspace + Cumulative *map[string]interface{} `json:"Cumulative,omitempty"` + // n object that contains the real-time statistics for the Workspace + Realtime *map[string]interface{} `json:"Realtime,omitempty"` + // The absolute URL of the Workspace statistics resource + Url *string `json:"Url,omitempty"` + // The SID of the Workspace + WorkspaceSid *string `json:"WorkspaceSid,omitempty"` } diff --git a/twilio/rest/trunking/v1/README.md b/twilio/rest/trunking/v1/README.md index 59a044c37..6522f3944 100644 --- a/twilio/rest/trunking/v1/README.md +++ b/twilio/rest/trunking/v1/README.md @@ -59,17 +59,12 @@ Class | Method | HTTP request | Description ## Documentation For Models - - [HttpMethod](docs/HttpMethod.md) - [ListCredentialListResponse](docs/ListCredentialListResponse.md) - [ListIpAccessControlListResponse](docs/ListIpAccessControlListResponse.md) - [ListOriginationUrlResponse](docs/ListOriginationUrlResponse.md) - [ListPhoneNumberResponse](docs/ListPhoneNumberResponse.md) - [ListTrunkResponse](docs/ListTrunkResponse.md) - [ListTrunkResponseMeta](docs/ListTrunkResponseMeta.md) - - [PhoneNumberAddressRequirement](docs/PhoneNumberAddressRequirement.md) - - [RecordingRecordingMode](docs/RecordingRecordingMode.md) - - [RecordingRecordingTrim](docs/RecordingRecordingTrim.md) - - [TrunkTransferSetting](docs/TrunkTransferSetting.md) - [TrunkingV1Trunk](docs/TrunkingV1Trunk.md) - [TrunkingV1TrunkCredentialList](docs/TrunkingV1TrunkCredentialList.md) - [TrunkingV1TrunkIpAccessControlList](docs/TrunkingV1TrunkIpAccessControlList.md) diff --git a/twilio/rest/trunking/v1/docs/ListCredentialListResponse.md b/twilio/rest/trunking/v1/docs/ListCredentialListResponse.md index 7002dab8f..654c7f814 100644 --- a/twilio/rest/trunking/v1/docs/ListCredentialListResponse.md +++ b/twilio/rest/trunking/v1/docs/ListCredentialListResponse.md @@ -1,10 +1,10 @@ # ListCredentialListResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**CredentialLists** | [**[]TrunkingV1TrunkCredentialList**](trunking.v1.trunk.credential_list.md) | [optional] -**Meta** | [**ListTrunkResponseMeta**](ListTrunkResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CredentialLists** | [**[]TrunkingV1TrunkCredentialList**](trunking.v1.trunk.credential_list.md) | |[optional] +**Meta** | [**ListTrunkResponseMeta**](ListTrunkResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/trunking/v1/docs/ListIpAccessControlListResponse.md b/twilio/rest/trunking/v1/docs/ListIpAccessControlListResponse.md index 395386326..52acf0ead 100644 --- a/twilio/rest/trunking/v1/docs/ListIpAccessControlListResponse.md +++ b/twilio/rest/trunking/v1/docs/ListIpAccessControlListResponse.md @@ -1,10 +1,10 @@ # ListIpAccessControlListResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**IpAccessControlLists** | [**[]TrunkingV1TrunkIpAccessControlList**](trunking.v1.trunk.ip_access_control_list.md) | [optional] -**Meta** | [**ListTrunkResponseMeta**](ListTrunkResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**IpAccessControlLists** | [**[]TrunkingV1TrunkIpAccessControlList**](trunking.v1.trunk.ip_access_control_list.md) | |[optional] +**Meta** | [**ListTrunkResponseMeta**](ListTrunkResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/trunking/v1/docs/ListOriginationUrlResponse.md b/twilio/rest/trunking/v1/docs/ListOriginationUrlResponse.md index b80d43601..bc7fa3a91 100644 --- a/twilio/rest/trunking/v1/docs/ListOriginationUrlResponse.md +++ b/twilio/rest/trunking/v1/docs/ListOriginationUrlResponse.md @@ -1,10 +1,10 @@ # ListOriginationUrlResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListTrunkResponseMeta**](ListTrunkResponse_meta.md) | [optional] -**OriginationUrls** | [**[]TrunkingV1TrunkOriginationUrl**](trunking.v1.trunk.origination_url.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListTrunkResponseMeta**](ListTrunkResponse_meta.md) | |[optional] +**OriginationUrls** | [**[]TrunkingV1TrunkOriginationUrl**](trunking.v1.trunk.origination_url.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/trunking/v1/docs/ListPhoneNumberResponse.md b/twilio/rest/trunking/v1/docs/ListPhoneNumberResponse.md index f36443a0c..5d042ffa4 100644 --- a/twilio/rest/trunking/v1/docs/ListPhoneNumberResponse.md +++ b/twilio/rest/trunking/v1/docs/ListPhoneNumberResponse.md @@ -1,10 +1,10 @@ # ListPhoneNumberResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListTrunkResponseMeta**](ListTrunkResponse_meta.md) | [optional] -**PhoneNumbers** | [**[]TrunkingV1TrunkPhoneNumber**](trunking.v1.trunk.phone_number.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListTrunkResponseMeta**](ListTrunkResponse_meta.md) | |[optional] +**PhoneNumbers** | [**[]TrunkingV1TrunkPhoneNumber**](trunking.v1.trunk.phone_number.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/trunking/v1/docs/ListTrunkResponse.md b/twilio/rest/trunking/v1/docs/ListTrunkResponse.md index a9912e56d..f5970e2c9 100644 --- a/twilio/rest/trunking/v1/docs/ListTrunkResponse.md +++ b/twilio/rest/trunking/v1/docs/ListTrunkResponse.md @@ -1,10 +1,10 @@ # ListTrunkResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListTrunkResponseMeta**](ListTrunkResponse_meta.md) | [optional] -**Trunks** | [**[]TrunkingV1Trunk**](trunking.v1.trunk.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListTrunkResponseMeta**](ListTrunkResponse_meta.md) | |[optional] +**Trunks** | [**[]TrunkingV1Trunk**](trunking.v1.trunk.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/trunking/v1/docs/ListTrunkResponseMeta.md b/twilio/rest/trunking/v1/docs/ListTrunkResponseMeta.md index c2fb0a31e..ed22b6310 100644 --- a/twilio/rest/trunking/v1/docs/ListTrunkResponseMeta.md +++ b/twilio/rest/trunking/v1/docs/ListTrunkResponseMeta.md @@ -1,15 +1,15 @@ # ListTrunkResponseMeta ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**FirstPageUrl** | **string** | [optional] -**Key** | **string** | [optional] -**NextPageUrl** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUrl** | **string** | [optional] -**Url** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstPageUrl** | **string** | |[optional] +**Key** | **string** | |[optional] +**NextPageUrl** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUrl** | **string** | |[optional] +**Url** | **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/twilio/rest/trunking/v1/docs/TrunkingV1Trunk.md b/twilio/rest/trunking/v1/docs/TrunkingV1Trunk.md index b51db4922..2f8412d33 100644 --- a/twilio/rest/trunking/v1/docs/TrunkingV1Trunk.md +++ b/twilio/rest/trunking/v1/docs/TrunkingV1Trunk.md @@ -1,24 +1,24 @@ # TrunkingV1Trunk ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**AuthType** | Pointer to **string** | -**AuthTypeSet** | Pointer to **[]string** | -**CnamLookupEnabled** | Pointer to **bool** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**DisasterRecoveryMethod** | Pointer to [**HttpMethod**](http_method.md) | -**DisasterRecoveryUrl** | Pointer to **string** | -**DomainName** | Pointer to **string** | -**FriendlyName** | Pointer to **string** | -**Links** | Pointer to **map[string]interface{}** | -**Recording** | Pointer to **map[string]interface{}** | -**Secure** | Pointer to **bool** | -**Sid** | Pointer to **string** | -**TransferMode** | Pointer to [**TrunkTransferSetting**](trunk_transfer_setting.md) | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**AuthType** | Pointer to **string** | The types of authentication mapped to the domain | +**AuthTypeSet** | Pointer to **[]string** | Reserved | +**CnamLookupEnabled** | Pointer to **bool** | Whether Caller ID Name (CNAM) lookup is enabled for the trunk | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was last updated | +**DisasterRecoveryMethod** | Pointer to **string** | The HTTP method we use to call the disaster_recovery_url | +**DisasterRecoveryUrl** | Pointer to **string** | The HTTP URL that we call if an error occurs while sending SIP traffic towards your configured Origination URL | +**DomainName** | Pointer to **string** | The unique address you reserve on Twilio to which you route your SIP traffic | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the resource | +**Links** | Pointer to **map[string]interface{}** | The URLs of related resources | +**Recording** | Pointer to **map[string]interface{}** | The recording settings for the trunk | +**Secure** | Pointer to **bool** | Whether Secure Trunking is enabled for the trunk | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**TransferMode** | Pointer to **string** | The call transfer settings for the trunk | +**Url** | Pointer to **string** | The absolute URL of the resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/trunking/v1/docs/TrunkingV1TrunkCredentialList.md b/twilio/rest/trunking/v1/docs/TrunkingV1TrunkCredentialList.md index d9cea5f7e..9da4753a6 100644 --- a/twilio/rest/trunking/v1/docs/TrunkingV1TrunkCredentialList.md +++ b/twilio/rest/trunking/v1/docs/TrunkingV1TrunkCredentialList.md @@ -1,15 +1,15 @@ # TrunkingV1TrunkCredentialList ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**FriendlyName** | Pointer to **string** | -**Sid** | Pointer to **string** | -**TrunkSid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was last updated | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the resource | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**TrunkSid** | Pointer to **string** | The SID of the Trunk the credential list in associated with | +**Url** | Pointer to **string** | The absolute URL of the resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/trunking/v1/docs/TrunkingV1TrunkIpAccessControlList.md b/twilio/rest/trunking/v1/docs/TrunkingV1TrunkIpAccessControlList.md index 312f422ad..204cc43ec 100644 --- a/twilio/rest/trunking/v1/docs/TrunkingV1TrunkIpAccessControlList.md +++ b/twilio/rest/trunking/v1/docs/TrunkingV1TrunkIpAccessControlList.md @@ -1,15 +1,15 @@ # TrunkingV1TrunkIpAccessControlList ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**FriendlyName** | Pointer to **string** | -**Sid** | Pointer to **string** | -**TrunkSid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was last updated | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the resource | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**TrunkSid** | Pointer to **string** | The SID of the Trunk the resource is associated with | +**Url** | Pointer to **string** | The absolute URL of the resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/trunking/v1/docs/TrunkingV1TrunkOriginationUrl.md b/twilio/rest/trunking/v1/docs/TrunkingV1TrunkOriginationUrl.md index 6e2cf52d2..23ad29ae0 100644 --- a/twilio/rest/trunking/v1/docs/TrunkingV1TrunkOriginationUrl.md +++ b/twilio/rest/trunking/v1/docs/TrunkingV1TrunkOriginationUrl.md @@ -1,19 +1,19 @@ # TrunkingV1TrunkOriginationUrl ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**Enabled** | Pointer to **bool** | -**FriendlyName** | Pointer to **string** | -**Priority** | Pointer to **int32** | -**Sid** | Pointer to **string** | -**SipUrl** | Pointer to **string** | -**TrunkSid** | Pointer to **string** | -**Url** | Pointer to **string** | -**Weight** | Pointer to **int32** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was last updated | +**Enabled** | Pointer to **bool** | Whether the URL is enabled | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the resource | +**Priority** | Pointer to **int32** | The relative importance of the URI | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**SipUrl** | Pointer to **string** | The SIP address you want Twilio to route your Origination calls to | +**TrunkSid** | Pointer to **string** | The SID of the Trunk that owns the Origination URL | +**Url** | Pointer to **string** | The absolute URL of the resource | +**Weight** | Pointer to **int32** | The value that determines the relative load the URI should receive compared to others with the same priority | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/trunking/v1/docs/TrunkingV1TrunkPhoneNumber.md b/twilio/rest/trunking/v1/docs/TrunkingV1TrunkPhoneNumber.md index ab0ea83e2..fe17aab1e 100644 --- a/twilio/rest/trunking/v1/docs/TrunkingV1TrunkPhoneNumber.md +++ b/twilio/rest/trunking/v1/docs/TrunkingV1TrunkPhoneNumber.md @@ -1,34 +1,34 @@ # TrunkingV1TrunkPhoneNumber ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**AddressRequirements** | Pointer to [**PhoneNumberAddressRequirement**](phone_number_address_requirement.md) | -**ApiVersion** | Pointer to **string** | -**Beta** | Pointer to **bool** | -**Capabilities** | Pointer to **map[string]interface{}** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**FriendlyName** | Pointer to **string** | -**Links** | Pointer to **map[string]interface{}** | -**PhoneNumber** | Pointer to **string** | -**Sid** | Pointer to **string** | -**SmsApplicationSid** | Pointer to **string** | -**SmsFallbackMethod** | Pointer to [**HttpMethod**](http_method.md) | -**SmsFallbackUrl** | Pointer to **string** | -**SmsMethod** | Pointer to [**HttpMethod**](http_method.md) | -**SmsUrl** | Pointer to **string** | -**StatusCallback** | Pointer to **string** | -**StatusCallbackMethod** | Pointer to [**HttpMethod**](http_method.md) | -**TrunkSid** | Pointer to **string** | -**Url** | Pointer to **string** | -**VoiceApplicationSid** | Pointer to **string** | -**VoiceCallerIdLookup** | Pointer to **bool** | -**VoiceFallbackMethod** | Pointer to [**HttpMethod**](http_method.md) | -**VoiceFallbackUrl** | Pointer to **string** | -**VoiceMethod** | Pointer to [**HttpMethod**](http_method.md) | -**VoiceUrl** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**AddressRequirements** | Pointer to **string** | Whether the phone number requires an Address registered with Twilio | +**ApiVersion** | Pointer to **string** | The API version used to start a new TwiML session | +**Beta** | Pointer to **bool** | Whether the phone number is new to the Twilio platform | +**Capabilities** | Pointer to **map[string]interface{}** | Indicate if a phone can receive calls or messages | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was last updated | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the resource | +**Links** | Pointer to **map[string]interface{}** | The URLs of related resources | +**PhoneNumber** | Pointer to **string** | The phone number in E.164 format | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**SmsApplicationSid** | Pointer to **string** | The SID of the application that handles SMS messages sent to the phone number | +**SmsFallbackMethod** | Pointer to **string** | The HTTP method used with sms_fallback_url | +**SmsFallbackUrl** | Pointer to **string** | The URL that we call when an error occurs while retrieving or executing the TwiML | +**SmsMethod** | Pointer to **string** | The HTTP method to use with sms_url | +**SmsUrl** | Pointer to **string** | The URL we call when the phone number receives an incoming SMS message | +**StatusCallback** | Pointer to **string** | The URL to send status information to your application | +**StatusCallbackMethod** | Pointer to **string** | The HTTP method we use to call status_callback | +**TrunkSid** | Pointer to **string** | The SID of the Trunk that handles calls to the phone number | +**Url** | Pointer to **string** | The absolute URL of the resource | +**VoiceApplicationSid** | Pointer to **string** | The SID of the application that handles calls to the phone number | +**VoiceCallerIdLookup** | Pointer to **bool** | Whether to lookup the caller's name | +**VoiceFallbackMethod** | Pointer to **string** | The HTTP method that we use to call voice_fallback_url | +**VoiceFallbackUrl** | Pointer to **string** | The URL we call when an error occurs in TwiML | +**VoiceMethod** | Pointer to **string** | The HTTP method used with the voice_url | +**VoiceUrl** | Pointer to **string** | The URL we call when the phone number receives a call | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/trunking/v1/docs/TrunkingV1TrunkRecording.md b/twilio/rest/trunking/v1/docs/TrunkingV1TrunkRecording.md index d5d86be58..2a8e532be 100644 --- a/twilio/rest/trunking/v1/docs/TrunkingV1TrunkRecording.md +++ b/twilio/rest/trunking/v1/docs/TrunkingV1TrunkRecording.md @@ -1,10 +1,10 @@ # TrunkingV1TrunkRecording ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Mode** | Pointer to [**RecordingRecordingMode**](recording_recording_mode.md) | -**Trim** | Pointer to [**RecordingRecordingTrim**](recording_recording_trim.md) | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Mode** | Pointer to **string** | The recording mode for the trunk. | +**Trim** | Pointer to **string** | The recording trim setting for the trunk. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/trunking/v1/model_trunking_v1_trunk.go b/twilio/rest/trunking/v1/model_trunking_v1_trunk.go index 20edc7943..120618ec5 100644 --- a/twilio/rest/trunking/v1/model_trunking_v1_trunk.go +++ b/twilio/rest/trunking/v1/model_trunking_v1_trunk.go @@ -17,20 +17,36 @@ import ( // TrunkingV1Trunk struct for TrunkingV1Trunk type TrunkingV1Trunk struct { - AccountSid *string `json:"AccountSid,omitempty"` - AuthType *string `json:"AuthType,omitempty"` - AuthTypeSet *[]string `json:"AuthTypeSet,omitempty"` - CnamLookupEnabled *bool `json:"CnamLookupEnabled,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - DisasterRecoveryMethod *HttpMethod `json:"DisasterRecoveryMethod,omitempty"` - DisasterRecoveryUrl *string `json:"DisasterRecoveryUrl,omitempty"` - DomainName *string `json:"DomainName,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - Recording *map[string]interface{} `json:"Recording,omitempty"` - Secure *bool `json:"Secure,omitempty"` - Sid *string `json:"Sid,omitempty"` - TransferMode *TrunkTransferSetting `json:"TransferMode,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The types of authentication mapped to the domain + AuthType *string `json:"AuthType,omitempty"` + // Reserved + AuthTypeSet *[]string `json:"AuthTypeSet,omitempty"` + // Whether Caller ID Name (CNAM) lookup is enabled for the trunk + CnamLookupEnabled *bool `json:"CnamLookupEnabled,omitempty"` + // The RFC 2822 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The HTTP method we use to call the disaster_recovery_url + DisasterRecoveryMethod *string `json:"DisasterRecoveryMethod,omitempty"` + // The HTTP URL that we call if an error occurs while sending SIP traffic towards your configured Origination URL + DisasterRecoveryUrl *string `json:"DisasterRecoveryUrl,omitempty"` + // The unique address you reserve on Twilio to which you route your SIP traffic + DomainName *string `json:"DomainName,omitempty"` + // The string that you assigned to describe the resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // The URLs of related resources + Links *map[string]interface{} `json:"Links,omitempty"` + // The recording settings for the trunk + Recording *map[string]interface{} `json:"Recording,omitempty"` + // Whether Secure Trunking is enabled for the trunk + Secure *bool `json:"Secure,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The call transfer settings for the trunk + TransferMode *string `json:"TransferMode,omitempty"` + // The absolute URL of the resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/trunking/v1/model_trunking_v1_trunk_credential_list.go b/twilio/rest/trunking/v1/model_trunking_v1_trunk_credential_list.go index 0ea889131..a1ab61abe 100644 --- a/twilio/rest/trunking/v1/model_trunking_v1_trunk_credential_list.go +++ b/twilio/rest/trunking/v1/model_trunking_v1_trunk_credential_list.go @@ -17,11 +17,18 @@ import ( // TrunkingV1TrunkCredentialList struct for TrunkingV1TrunkCredentialList type TrunkingV1TrunkCredentialList struct { - AccountSid *string `json:"AccountSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Sid *string `json:"Sid,omitempty"` - TrunkSid *string `json:"TrunkSid,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The RFC 2822 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The string that you assigned to describe the resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The SID of the Trunk the credential list in associated with + TrunkSid *string `json:"TrunkSid,omitempty"` + // The absolute URL of the resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/trunking/v1/model_trunking_v1_trunk_ip_access_control_list.go b/twilio/rest/trunking/v1/model_trunking_v1_trunk_ip_access_control_list.go index 0c11d90b5..ed2a45a52 100644 --- a/twilio/rest/trunking/v1/model_trunking_v1_trunk_ip_access_control_list.go +++ b/twilio/rest/trunking/v1/model_trunking_v1_trunk_ip_access_control_list.go @@ -17,11 +17,18 @@ import ( // TrunkingV1TrunkIpAccessControlList struct for TrunkingV1TrunkIpAccessControlList type TrunkingV1TrunkIpAccessControlList struct { - AccountSid *string `json:"AccountSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Sid *string `json:"Sid,omitempty"` - TrunkSid *string `json:"TrunkSid,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The RFC 2822 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The string that you assigned to describe the resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The SID of the Trunk the resource is associated with + TrunkSid *string `json:"TrunkSid,omitempty"` + // The absolute URL of the resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/trunking/v1/model_trunking_v1_trunk_origination_url.go b/twilio/rest/trunking/v1/model_trunking_v1_trunk_origination_url.go index d3d24f461..96ec4a900 100644 --- a/twilio/rest/trunking/v1/model_trunking_v1_trunk_origination_url.go +++ b/twilio/rest/trunking/v1/model_trunking_v1_trunk_origination_url.go @@ -17,15 +17,26 @@ import ( // TrunkingV1TrunkOriginationUrl struct for TrunkingV1TrunkOriginationUrl type TrunkingV1TrunkOriginationUrl struct { - AccountSid *string `json:"AccountSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Enabled *bool `json:"Enabled,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Priority *int32 `json:"Priority,omitempty"` - Sid *string `json:"Sid,omitempty"` - SipUrl *string `json:"SipUrl,omitempty"` - TrunkSid *string `json:"TrunkSid,omitempty"` - Url *string `json:"Url,omitempty"` - Weight *int32 `json:"Weight,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The RFC 2822 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // Whether the URL is enabled + Enabled *bool `json:"Enabled,omitempty"` + // The string that you assigned to describe the resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // The relative importance of the URI + Priority *int32 `json:"Priority,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The SIP address you want Twilio to route your Origination calls to + SipUrl *string `json:"SipUrl,omitempty"` + // The SID of the Trunk that owns the Origination URL + TrunkSid *string `json:"TrunkSid,omitempty"` + // The absolute URL of the resource + Url *string `json:"Url,omitempty"` + // The value that determines the relative load the URI should receive compared to others with the same priority + Weight *int32 `json:"Weight,omitempty"` } diff --git a/twilio/rest/trunking/v1/model_trunking_v1_trunk_phone_number.go b/twilio/rest/trunking/v1/model_trunking_v1_trunk_phone_number.go index 41a69fe3c..1a55e7b21 100644 --- a/twilio/rest/trunking/v1/model_trunking_v1_trunk_phone_number.go +++ b/twilio/rest/trunking/v1/model_trunking_v1_trunk_phone_number.go @@ -17,30 +17,56 @@ import ( // TrunkingV1TrunkPhoneNumber struct for TrunkingV1TrunkPhoneNumber type TrunkingV1TrunkPhoneNumber struct { - AccountSid *string `json:"AccountSid,omitempty"` - AddressRequirements *PhoneNumberAddressRequirement `json:"AddressRequirements,omitempty"` - ApiVersion *string `json:"ApiVersion,omitempty"` - Beta *bool `json:"Beta,omitempty"` - Capabilities *map[string]interface{} `json:"Capabilities,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - PhoneNumber *string `json:"PhoneNumber,omitempty"` - Sid *string `json:"Sid,omitempty"` - SmsApplicationSid *string `json:"SmsApplicationSid,omitempty"` - SmsFallbackMethod *HttpMethod `json:"SmsFallbackMethod,omitempty"` - SmsFallbackUrl *string `json:"SmsFallbackUrl,omitempty"` - SmsMethod *HttpMethod `json:"SmsMethod,omitempty"` - SmsUrl *string `json:"SmsUrl,omitempty"` - StatusCallback *string `json:"StatusCallback,omitempty"` - StatusCallbackMethod *HttpMethod `json:"StatusCallbackMethod,omitempty"` - TrunkSid *string `json:"TrunkSid,omitempty"` - Url *string `json:"Url,omitempty"` - VoiceApplicationSid *string `json:"VoiceApplicationSid,omitempty"` - VoiceCallerIdLookup *bool `json:"VoiceCallerIdLookup,omitempty"` - VoiceFallbackMethod *HttpMethod `json:"VoiceFallbackMethod,omitempty"` - VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` - VoiceMethod *HttpMethod `json:"VoiceMethod,omitempty"` - VoiceUrl *string `json:"VoiceUrl,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // Whether the phone number requires an Address registered with Twilio + AddressRequirements *string `json:"AddressRequirements,omitempty"` + // The API version used to start a new TwiML session + ApiVersion *string `json:"ApiVersion,omitempty"` + // Whether the phone number is new to the Twilio platform + Beta *bool `json:"Beta,omitempty"` + // Indicate if a phone can receive calls or messages + Capabilities *map[string]interface{} `json:"Capabilities,omitempty"` + // The RFC 2822 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The string that you assigned to describe the resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // The URLs of related resources + Links *map[string]interface{} `json:"Links,omitempty"` + // The phone number in E.164 format + PhoneNumber *string `json:"PhoneNumber,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The SID of the application that handles SMS messages sent to the phone number + SmsApplicationSid *string `json:"SmsApplicationSid,omitempty"` + // The HTTP method used with sms_fallback_url + SmsFallbackMethod *string `json:"SmsFallbackMethod,omitempty"` + // The URL that we call when an error occurs while retrieving or executing the TwiML + SmsFallbackUrl *string `json:"SmsFallbackUrl,omitempty"` + // The HTTP method to use with sms_url + SmsMethod *string `json:"SmsMethod,omitempty"` + // The URL we call when the phone number receives an incoming SMS message + SmsUrl *string `json:"SmsUrl,omitempty"` + // The URL to send status information to your application + StatusCallback *string `json:"StatusCallback,omitempty"` + // The HTTP method we use to call status_callback + StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` + // The SID of the Trunk that handles calls to the phone number + TrunkSid *string `json:"TrunkSid,omitempty"` + // The absolute URL of the resource + Url *string `json:"Url,omitempty"` + // The SID of the application that handles calls to the phone number + VoiceApplicationSid *string `json:"VoiceApplicationSid,omitempty"` + // Whether to lookup the caller's name + VoiceCallerIdLookup *bool `json:"VoiceCallerIdLookup,omitempty"` + // The HTTP method that we use to call voice_fallback_url + VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"` + // The URL we call when an error occurs in TwiML + VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` + // The HTTP method used with the voice_url + VoiceMethod *string `json:"VoiceMethod,omitempty"` + // The URL we call when the phone number receives a call + VoiceUrl *string `json:"VoiceUrl,omitempty"` } diff --git a/twilio/rest/trunking/v1/model_trunking_v1_trunk_recording.go b/twilio/rest/trunking/v1/model_trunking_v1_trunk_recording.go index 448e26dfc..1e9b2d51f 100644 --- a/twilio/rest/trunking/v1/model_trunking_v1_trunk_recording.go +++ b/twilio/rest/trunking/v1/model_trunking_v1_trunk_recording.go @@ -13,6 +13,8 @@ package openapi // TrunkingV1TrunkRecording struct for TrunkingV1TrunkRecording type TrunkingV1TrunkRecording struct { - Mode *RecordingRecordingMode `json:"Mode,omitempty"` - Trim *RecordingRecordingTrim `json:"Trim,omitempty"` + // The recording mode for the trunk. + Mode *string `json:"Mode,omitempty"` + // The recording trim setting for the trunk. + Trim *string `json:"Trim,omitempty"` } diff --git a/twilio/rest/trusthub/v1/README.md b/twilio/rest/trusthub/v1/README.md index 909736289..23b5cb956 100644 --- a/twilio/rest/trusthub/v1/README.md +++ b/twilio/rest/trusthub/v1/README.md @@ -83,8 +83,6 @@ Class | Method | HTTP request | Description ## Documentation For Models - - [CustomerProfileEvaluationStatus](docs/CustomerProfileEvaluationStatus.md) - - [CustomerProfileStatus](docs/CustomerProfileStatus.md) - [ListCustomerProfileChannelEndpointAssignmentResponse](docs/ListCustomerProfileChannelEndpointAssignmentResponse.md) - [ListCustomerProfileEntityAssignmentResponse](docs/ListCustomerProfileEntityAssignmentResponse.md) - [ListCustomerProfileEvaluationResponse](docs/ListCustomerProfileEvaluationResponse.md) @@ -99,9 +97,6 @@ Class | Method | HTTP request | Description - [ListTrustProductEntityAssignmentResponse](docs/ListTrustProductEntityAssignmentResponse.md) - [ListTrustProductEvaluationResponse](docs/ListTrustProductEvaluationResponse.md) - [ListTrustProductResponse](docs/ListTrustProductResponse.md) - - [SupportingDocumentStatus](docs/SupportingDocumentStatus.md) - - [TrustProductEvaluationStatus](docs/TrustProductEvaluationStatus.md) - - [TrustProductStatus](docs/TrustProductStatus.md) - [TrusthubV1CustomerProfile](docs/TrusthubV1CustomerProfile.md) - [TrusthubV1CustomerProfileCustomerProfileChannelEndpointAssignment](docs/TrusthubV1CustomerProfileCustomerProfileChannelEndpointAssignment.md) - [TrusthubV1CustomerProfileCustomerProfileEntityAssignment](docs/TrusthubV1CustomerProfileCustomerProfileEntityAssignment.md) diff --git a/twilio/rest/trusthub/v1/docs/ListCustomerProfileChannelEndpointAssignmentResponse.md b/twilio/rest/trusthub/v1/docs/ListCustomerProfileChannelEndpointAssignmentResponse.md index cce85286f..92390a8da 100644 --- a/twilio/rest/trusthub/v1/docs/ListCustomerProfileChannelEndpointAssignmentResponse.md +++ b/twilio/rest/trusthub/v1/docs/ListCustomerProfileChannelEndpointAssignmentResponse.md @@ -1,10 +1,10 @@ # ListCustomerProfileChannelEndpointAssignmentResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListCustomerProfileResponseMeta**](ListCustomerProfileResponse_meta.md) | [optional] -**Results** | [**[]TrusthubV1CustomerProfileCustomerProfileChannelEndpointAssignment**](trusthub.v1.customer_profile.customer_profile_channel_endpoint_assignment.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListCustomerProfileResponseMeta**](ListCustomerProfileResponse_meta.md) | |[optional] +**Results** | [**[]TrusthubV1CustomerProfileCustomerProfileChannelEndpointAssignment**](trusthub.v1.customer_profile.customer_profile_channel_endpoint_assignment.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/trusthub/v1/docs/ListCustomerProfileEntityAssignmentResponse.md b/twilio/rest/trusthub/v1/docs/ListCustomerProfileEntityAssignmentResponse.md index 01339f277..6b8f650e3 100644 --- a/twilio/rest/trusthub/v1/docs/ListCustomerProfileEntityAssignmentResponse.md +++ b/twilio/rest/trusthub/v1/docs/ListCustomerProfileEntityAssignmentResponse.md @@ -1,10 +1,10 @@ # ListCustomerProfileEntityAssignmentResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListCustomerProfileResponseMeta**](ListCustomerProfileResponse_meta.md) | [optional] -**Results** | [**[]TrusthubV1CustomerProfileCustomerProfileEntityAssignment**](trusthub.v1.customer_profile.customer_profile_entity_assignment.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListCustomerProfileResponseMeta**](ListCustomerProfileResponse_meta.md) | |[optional] +**Results** | [**[]TrusthubV1CustomerProfileCustomerProfileEntityAssignment**](trusthub.v1.customer_profile.customer_profile_entity_assignment.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/trusthub/v1/docs/ListCustomerProfileEvaluationResponse.md b/twilio/rest/trusthub/v1/docs/ListCustomerProfileEvaluationResponse.md index c9c6552e6..64a4c66d8 100644 --- a/twilio/rest/trusthub/v1/docs/ListCustomerProfileEvaluationResponse.md +++ b/twilio/rest/trusthub/v1/docs/ListCustomerProfileEvaluationResponse.md @@ -1,10 +1,10 @@ # ListCustomerProfileEvaluationResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListCustomerProfileResponseMeta**](ListCustomerProfileResponse_meta.md) | [optional] -**Results** | [**[]TrusthubV1CustomerProfileCustomerProfileEvaluation**](trusthub.v1.customer_profile.customer_profile_evaluation.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListCustomerProfileResponseMeta**](ListCustomerProfileResponse_meta.md) | |[optional] +**Results** | [**[]TrusthubV1CustomerProfileCustomerProfileEvaluation**](trusthub.v1.customer_profile.customer_profile_evaluation.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/trusthub/v1/docs/ListCustomerProfileResponse.md b/twilio/rest/trusthub/v1/docs/ListCustomerProfileResponse.md index 9ef4eba87..f2fc5848d 100644 --- a/twilio/rest/trusthub/v1/docs/ListCustomerProfileResponse.md +++ b/twilio/rest/trusthub/v1/docs/ListCustomerProfileResponse.md @@ -1,10 +1,10 @@ # ListCustomerProfileResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListCustomerProfileResponseMeta**](ListCustomerProfileResponse_meta.md) | [optional] -**Results** | [**[]TrusthubV1CustomerProfile**](trusthub.v1.customer_profile.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListCustomerProfileResponseMeta**](ListCustomerProfileResponse_meta.md) | |[optional] +**Results** | [**[]TrusthubV1CustomerProfile**](trusthub.v1.customer_profile.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/trusthub/v1/docs/ListCustomerProfileResponseMeta.md b/twilio/rest/trusthub/v1/docs/ListCustomerProfileResponseMeta.md index d9018b5fb..ffe3a30ff 100644 --- a/twilio/rest/trusthub/v1/docs/ListCustomerProfileResponseMeta.md +++ b/twilio/rest/trusthub/v1/docs/ListCustomerProfileResponseMeta.md @@ -1,15 +1,15 @@ # ListCustomerProfileResponseMeta ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**FirstPageUrl** | **string** | [optional] -**Key** | **string** | [optional] -**NextPageUrl** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUrl** | **string** | [optional] -**Url** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstPageUrl** | **string** | |[optional] +**Key** | **string** | |[optional] +**NextPageUrl** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUrl** | **string** | |[optional] +**Url** | **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/twilio/rest/trusthub/v1/docs/ListEndUserResponse.md b/twilio/rest/trusthub/v1/docs/ListEndUserResponse.md index 9c9995562..8806a1ad3 100644 --- a/twilio/rest/trusthub/v1/docs/ListEndUserResponse.md +++ b/twilio/rest/trusthub/v1/docs/ListEndUserResponse.md @@ -1,10 +1,10 @@ # ListEndUserResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListCustomerProfileResponseMeta**](ListCustomerProfileResponse_meta.md) | [optional] -**Results** | [**[]TrusthubV1EndUser**](trusthub.v1.end_user.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListCustomerProfileResponseMeta**](ListCustomerProfileResponse_meta.md) | |[optional] +**Results** | [**[]TrusthubV1EndUser**](trusthub.v1.end_user.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/trusthub/v1/docs/ListEndUserTypeResponse.md b/twilio/rest/trusthub/v1/docs/ListEndUserTypeResponse.md index 3f6605b9b..2d2e7bbd2 100644 --- a/twilio/rest/trusthub/v1/docs/ListEndUserTypeResponse.md +++ b/twilio/rest/trusthub/v1/docs/ListEndUserTypeResponse.md @@ -1,10 +1,10 @@ # ListEndUserTypeResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**EndUserTypes** | [**[]TrusthubV1EndUserType**](trusthub.v1.end_user_type.md) | [optional] -**Meta** | [**ListCustomerProfileResponseMeta**](ListCustomerProfileResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**EndUserTypes** | [**[]TrusthubV1EndUserType**](trusthub.v1.end_user_type.md) | |[optional] +**Meta** | [**ListCustomerProfileResponseMeta**](ListCustomerProfileResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/trusthub/v1/docs/ListPoliciesResponse.md b/twilio/rest/trusthub/v1/docs/ListPoliciesResponse.md index 695f013c5..5366e0d99 100644 --- a/twilio/rest/trusthub/v1/docs/ListPoliciesResponse.md +++ b/twilio/rest/trusthub/v1/docs/ListPoliciesResponse.md @@ -1,10 +1,10 @@ # ListPoliciesResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListCustomerProfileResponseMeta**](ListCustomerProfileResponse_meta.md) | [optional] -**Results** | [**[]TrusthubV1Policies**](trusthub.v1.policies.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListCustomerProfileResponseMeta**](ListCustomerProfileResponse_meta.md) | |[optional] +**Results** | [**[]TrusthubV1Policies**](trusthub.v1.policies.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/trusthub/v1/docs/ListSupportingDocumentResponse.md b/twilio/rest/trusthub/v1/docs/ListSupportingDocumentResponse.md index 52a230602..74dc5766b 100644 --- a/twilio/rest/trusthub/v1/docs/ListSupportingDocumentResponse.md +++ b/twilio/rest/trusthub/v1/docs/ListSupportingDocumentResponse.md @@ -1,10 +1,10 @@ # ListSupportingDocumentResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListCustomerProfileResponseMeta**](ListCustomerProfileResponse_meta.md) | [optional] -**Results** | [**[]TrusthubV1SupportingDocument**](trusthub.v1.supporting_document.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListCustomerProfileResponseMeta**](ListCustomerProfileResponse_meta.md) | |[optional] +**Results** | [**[]TrusthubV1SupportingDocument**](trusthub.v1.supporting_document.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/trusthub/v1/docs/ListSupportingDocumentTypeResponse.md b/twilio/rest/trusthub/v1/docs/ListSupportingDocumentTypeResponse.md index 20021e880..ec4e90823 100644 --- a/twilio/rest/trusthub/v1/docs/ListSupportingDocumentTypeResponse.md +++ b/twilio/rest/trusthub/v1/docs/ListSupportingDocumentTypeResponse.md @@ -1,10 +1,10 @@ # ListSupportingDocumentTypeResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListCustomerProfileResponseMeta**](ListCustomerProfileResponse_meta.md) | [optional] -**SupportingDocumentTypes** | [**[]TrusthubV1SupportingDocumentType**](trusthub.v1.supporting_document_type.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListCustomerProfileResponseMeta**](ListCustomerProfileResponse_meta.md) | |[optional] +**SupportingDocumentTypes** | [**[]TrusthubV1SupportingDocumentType**](trusthub.v1.supporting_document_type.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/trusthub/v1/docs/ListTrustProductChannelEndpointAssignmentResponse.md b/twilio/rest/trusthub/v1/docs/ListTrustProductChannelEndpointAssignmentResponse.md index f44d78644..13c047677 100644 --- a/twilio/rest/trusthub/v1/docs/ListTrustProductChannelEndpointAssignmentResponse.md +++ b/twilio/rest/trusthub/v1/docs/ListTrustProductChannelEndpointAssignmentResponse.md @@ -1,10 +1,10 @@ # ListTrustProductChannelEndpointAssignmentResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListCustomerProfileResponseMeta**](ListCustomerProfileResponse_meta.md) | [optional] -**Results** | [**[]TrusthubV1TrustProductTrustProductChannelEndpointAssignment**](trusthub.v1.trust_product.trust_product_channel_endpoint_assignment.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListCustomerProfileResponseMeta**](ListCustomerProfileResponse_meta.md) | |[optional] +**Results** | [**[]TrusthubV1TrustProductTrustProductChannelEndpointAssignment**](trusthub.v1.trust_product.trust_product_channel_endpoint_assignment.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/trusthub/v1/docs/ListTrustProductEntityAssignmentResponse.md b/twilio/rest/trusthub/v1/docs/ListTrustProductEntityAssignmentResponse.md index 5b48d63be..10c5e48f9 100644 --- a/twilio/rest/trusthub/v1/docs/ListTrustProductEntityAssignmentResponse.md +++ b/twilio/rest/trusthub/v1/docs/ListTrustProductEntityAssignmentResponse.md @@ -1,10 +1,10 @@ # ListTrustProductEntityAssignmentResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListCustomerProfileResponseMeta**](ListCustomerProfileResponse_meta.md) | [optional] -**Results** | [**[]TrusthubV1TrustProductTrustProductEntityAssignment**](trusthub.v1.trust_product.trust_product_entity_assignment.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListCustomerProfileResponseMeta**](ListCustomerProfileResponse_meta.md) | |[optional] +**Results** | [**[]TrusthubV1TrustProductTrustProductEntityAssignment**](trusthub.v1.trust_product.trust_product_entity_assignment.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/trusthub/v1/docs/ListTrustProductEvaluationResponse.md b/twilio/rest/trusthub/v1/docs/ListTrustProductEvaluationResponse.md index c96c8f618..84a135cb1 100644 --- a/twilio/rest/trusthub/v1/docs/ListTrustProductEvaluationResponse.md +++ b/twilio/rest/trusthub/v1/docs/ListTrustProductEvaluationResponse.md @@ -1,10 +1,10 @@ # ListTrustProductEvaluationResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListCustomerProfileResponseMeta**](ListCustomerProfileResponse_meta.md) | [optional] -**Results** | [**[]TrusthubV1TrustProductTrustProductEvaluation**](trusthub.v1.trust_product.trust_product_evaluation.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListCustomerProfileResponseMeta**](ListCustomerProfileResponse_meta.md) | |[optional] +**Results** | [**[]TrusthubV1TrustProductTrustProductEvaluation**](trusthub.v1.trust_product.trust_product_evaluation.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/trusthub/v1/docs/ListTrustProductResponse.md b/twilio/rest/trusthub/v1/docs/ListTrustProductResponse.md index 4ae28b728..6a352aa6a 100644 --- a/twilio/rest/trusthub/v1/docs/ListTrustProductResponse.md +++ b/twilio/rest/trusthub/v1/docs/ListTrustProductResponse.md @@ -1,10 +1,10 @@ # ListTrustProductResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListCustomerProfileResponseMeta**](ListCustomerProfileResponse_meta.md) | [optional] -**Results** | [**[]TrusthubV1TrustProduct**](trusthub.v1.trust_product.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListCustomerProfileResponseMeta**](ListCustomerProfileResponse_meta.md) | |[optional] +**Results** | [**[]TrusthubV1TrustProduct**](trusthub.v1.trust_product.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/trusthub/v1/docs/TrusthubV1CustomerProfile.md b/twilio/rest/trusthub/v1/docs/TrusthubV1CustomerProfile.md index 7a66017d7..f9c05d542 100644 --- a/twilio/rest/trusthub/v1/docs/TrusthubV1CustomerProfile.md +++ b/twilio/rest/trusthub/v1/docs/TrusthubV1CustomerProfile.md @@ -1,20 +1,20 @@ # TrusthubV1CustomerProfile ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**Email** | Pointer to **string** | -**FriendlyName** | Pointer to **string** | -**Links** | Pointer to **map[string]interface{}** | -**PolicySid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Status** | Pointer to [**CustomerProfileStatus**](customer_profile_status.md) | -**StatusCallback** | Pointer to **string** | -**Url** | Pointer to **string** | -**ValidUntil** | Pointer to [**time.Time**](time.Time.md) | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was last updated | +**Email** | Pointer to **string** | The email address | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the resource | +**Links** | Pointer to **map[string]interface{}** | The URLs of the Assigned Items of the Customer-Profile resource | +**PolicySid** | Pointer to **string** | The unique string of a policy. | +**Sid** | Pointer to **string** | The unique string that identifies the resource. | +**Status** | Pointer to **string** | The verification status of the Customer-Profile resource | +**StatusCallback** | Pointer to **string** | The URL we call to inform your application of status changes. | +**Url** | Pointer to **string** | The absolute URL of the Customer-Profile resource | +**ValidUntil** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource will be valid until. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/trusthub/v1/docs/TrusthubV1CustomerProfileCustomerProfileChannelEndpointAssignment.md b/twilio/rest/trusthub/v1/docs/TrusthubV1CustomerProfileCustomerProfileChannelEndpointAssignment.md index 2d209548d..74f592b7c 100644 --- a/twilio/rest/trusthub/v1/docs/TrusthubV1CustomerProfileCustomerProfileChannelEndpointAssignment.md +++ b/twilio/rest/trusthub/v1/docs/TrusthubV1CustomerProfileCustomerProfileChannelEndpointAssignment.md @@ -1,15 +1,15 @@ # TrusthubV1CustomerProfileCustomerProfileChannelEndpointAssignment ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**ChannelEndpointSid** | Pointer to **string** | -**ChannelEndpointType** | Pointer to **string** | -**CustomerProfileSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**Sid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**ChannelEndpointSid** | Pointer to **string** | The sid of an channel endpoint | +**ChannelEndpointType** | Pointer to **string** | The type of channel endpoint | +**CustomerProfileSid** | Pointer to **string** | The unique string that identifies the CustomerProfile resource. | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Url** | Pointer to **string** | The absolute URL of the Identity resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/trusthub/v1/docs/TrusthubV1CustomerProfileCustomerProfileEntityAssignment.md b/twilio/rest/trusthub/v1/docs/TrusthubV1CustomerProfileCustomerProfileEntityAssignment.md index 8dc43f50d..ee89eeb68 100644 --- a/twilio/rest/trusthub/v1/docs/TrusthubV1CustomerProfileCustomerProfileEntityAssignment.md +++ b/twilio/rest/trusthub/v1/docs/TrusthubV1CustomerProfileCustomerProfileEntityAssignment.md @@ -1,14 +1,14 @@ # TrusthubV1CustomerProfileCustomerProfileEntityAssignment ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**CustomerProfileSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**ObjectSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**CustomerProfileSid** | Pointer to **string** | The unique string that identifies the CustomerProfile resource. | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**ObjectSid** | Pointer to **string** | The sid of an object bag | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Url** | Pointer to **string** | The absolute URL of the Identity resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/trusthub/v1/docs/TrusthubV1CustomerProfileCustomerProfileEvaluation.md b/twilio/rest/trusthub/v1/docs/TrusthubV1CustomerProfileCustomerProfileEvaluation.md index 84a5dd7bf..6b66a1a04 100644 --- a/twilio/rest/trusthub/v1/docs/TrusthubV1CustomerProfileCustomerProfileEvaluation.md +++ b/twilio/rest/trusthub/v1/docs/TrusthubV1CustomerProfileCustomerProfileEvaluation.md @@ -1,16 +1,16 @@ # TrusthubV1CustomerProfileCustomerProfileEvaluation ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**CustomerProfileSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**PolicySid** | Pointer to **string** | -**Results** | Pointer to **[]map[string]interface{}** | -**Sid** | Pointer to **string** | -**Status** | Pointer to [**CustomerProfileEvaluationStatus**](customer_profile_evaluation_status.md) | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**CustomerProfileSid** | Pointer to **string** | The unique string that identifies the resource | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | | +**PolicySid** | Pointer to **string** | The unique string of a policy | +**Results** | Pointer to **[]map[string]interface{}** | The results of the Evaluation resource | +**Sid** | Pointer to **string** | The unique string that identifies the Evaluation resource | +**Status** | Pointer to **string** | The compliance status of the Evaluation resource | +**Url** | Pointer to **string** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/trusthub/v1/docs/TrusthubV1EndUser.md b/twilio/rest/trusthub/v1/docs/TrusthubV1EndUser.md index 053dc4fa0..3d6ad92b8 100644 --- a/twilio/rest/trusthub/v1/docs/TrusthubV1EndUser.md +++ b/twilio/rest/trusthub/v1/docs/TrusthubV1EndUser.md @@ -1,16 +1,16 @@ # TrusthubV1EndUser ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Attributes** | Pointer to **map[string]interface{}** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**FriendlyName** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Type** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**Attributes** | Pointer to **map[string]interface{}** | The set of parameters that compose the End Users resource | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was last updated | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the resource | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Type** | Pointer to **string** | The type of end user of the Bundle resource | +**Url** | Pointer to **string** | The absolute URL of the End User resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/trusthub/v1/docs/TrusthubV1EndUserType.md b/twilio/rest/trusthub/v1/docs/TrusthubV1EndUserType.md index e2a757f84..8a7e2099a 100644 --- a/twilio/rest/trusthub/v1/docs/TrusthubV1EndUserType.md +++ b/twilio/rest/trusthub/v1/docs/TrusthubV1EndUserType.md @@ -1,13 +1,13 @@ # TrusthubV1EndUserType ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Fields** | Pointer to **[]map[string]interface{}** | -**FriendlyName** | Pointer to **string** | -**MachineName** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Fields** | Pointer to **[]map[string]interface{}** | The required information for creating an End-User. | +**FriendlyName** | Pointer to **string** | A human-readable description of the End-User Type resource | +**MachineName** | Pointer to **string** | A machine-readable description of the End-User Type resource | +**Sid** | Pointer to **string** | The unique string that identifies the End-User Type resource | +**Url** | Pointer to **string** | The absolute URL of the End-User Type resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/trusthub/v1/docs/TrusthubV1Policies.md b/twilio/rest/trusthub/v1/docs/TrusthubV1Policies.md index 4c8d81738..efbbbf4d6 100644 --- a/twilio/rest/trusthub/v1/docs/TrusthubV1Policies.md +++ b/twilio/rest/trusthub/v1/docs/TrusthubV1Policies.md @@ -1,12 +1,12 @@ # TrusthubV1Policies ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**FriendlyName** | Pointer to **string** | -**Requirements** | Pointer to **map[string]interface{}** | -**Sid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FriendlyName** | Pointer to **string** | A human-readable description of the Policy resource | +**Requirements** | Pointer to **map[string]interface{}** | The sid of a Policy object that dictates requirements | +**Sid** | Pointer to **string** | The unique string that identifies the Policy resource | +**Url** | Pointer to **string** | The absolute URL of the Policy resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/trusthub/v1/docs/TrusthubV1SupportingDocument.md b/twilio/rest/trusthub/v1/docs/TrusthubV1SupportingDocument.md index 4d8e51cf5..14b6dc406 100644 --- a/twilio/rest/trusthub/v1/docs/TrusthubV1SupportingDocument.md +++ b/twilio/rest/trusthub/v1/docs/TrusthubV1SupportingDocument.md @@ -1,18 +1,18 @@ # TrusthubV1SupportingDocument ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Attributes** | Pointer to **map[string]interface{}** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**FriendlyName** | Pointer to **string** | -**MimeType** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Status** | Pointer to [**SupportingDocumentStatus**](supporting_document_status.md) | -**Type** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**Attributes** | Pointer to **map[string]interface{}** | The set of parameters that compose the Supporting Documents resource | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was last updated | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the resource | +**MimeType** | Pointer to **string** | The image type of the file | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Status** | Pointer to **string** | The verification status of the Supporting Document resource | +**Type** | Pointer to **string** | The type of the Supporting Document | +**Url** | Pointer to **string** | The absolute URL of the Supporting Document resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/trusthub/v1/docs/TrusthubV1SupportingDocumentType.md b/twilio/rest/trusthub/v1/docs/TrusthubV1SupportingDocumentType.md index a819e3b26..7ec076d89 100644 --- a/twilio/rest/trusthub/v1/docs/TrusthubV1SupportingDocumentType.md +++ b/twilio/rest/trusthub/v1/docs/TrusthubV1SupportingDocumentType.md @@ -1,13 +1,13 @@ # TrusthubV1SupportingDocumentType ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Fields** | Pointer to **[]map[string]interface{}** | -**FriendlyName** | Pointer to **string** | -**MachineName** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Fields** | Pointer to **[]map[string]interface{}** | The required information for creating a Supporting Document | +**FriendlyName** | Pointer to **string** | A human-readable description of the Supporting Document Type resource | +**MachineName** | Pointer to **string** | The machine-readable description of the Supporting Document Type resource | +**Sid** | Pointer to **string** | The unique string that identifies the Supporting Document Type resource | +**Url** | Pointer to **string** | The absolute URL of the Supporting Document Type resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/trusthub/v1/docs/TrusthubV1TrustProduct.md b/twilio/rest/trusthub/v1/docs/TrusthubV1TrustProduct.md index d14c97871..aa21cb788 100644 --- a/twilio/rest/trusthub/v1/docs/TrusthubV1TrustProduct.md +++ b/twilio/rest/trusthub/v1/docs/TrusthubV1TrustProduct.md @@ -1,20 +1,20 @@ # TrusthubV1TrustProduct ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**Email** | Pointer to **string** | -**FriendlyName** | Pointer to **string** | -**Links** | Pointer to **map[string]interface{}** | -**PolicySid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Status** | Pointer to [**TrustProductStatus**](trust_product_status.md) | -**StatusCallback** | Pointer to **string** | -**Url** | Pointer to **string** | -**ValidUntil** | Pointer to [**time.Time**](time.Time.md) | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was last updated | +**Email** | Pointer to **string** | The email address | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the resource | +**Links** | Pointer to **map[string]interface{}** | The URLs of the Assigned Items of the Customer-Profile resource | +**PolicySid** | Pointer to **string** | The unique string of a policy. | +**Sid** | Pointer to **string** | The unique string that identifies the resource. | +**Status** | Pointer to **string** | The verification status of the Customer-Profile resource | +**StatusCallback** | Pointer to **string** | The URL we call to inform your application of status changes. | +**Url** | Pointer to **string** | The absolute URL of the Customer-Profile resource | +**ValidUntil** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource will be valid until. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/trusthub/v1/docs/TrusthubV1TrustProductTrustProductChannelEndpointAssignment.md b/twilio/rest/trusthub/v1/docs/TrusthubV1TrustProductTrustProductChannelEndpointAssignment.md index 5fe5af049..bd19adc36 100644 --- a/twilio/rest/trusthub/v1/docs/TrusthubV1TrustProductTrustProductChannelEndpointAssignment.md +++ b/twilio/rest/trusthub/v1/docs/TrusthubV1TrustProductTrustProductChannelEndpointAssignment.md @@ -1,15 +1,15 @@ # TrusthubV1TrustProductTrustProductChannelEndpointAssignment ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**ChannelEndpointSid** | Pointer to **string** | -**ChannelEndpointType** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**Sid** | Pointer to **string** | -**TrustProductSid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**ChannelEndpointSid** | Pointer to **string** | The sid of an channel endpoint | +**ChannelEndpointType** | Pointer to **string** | The type of channel endpoint | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**TrustProductSid** | Pointer to **string** | The unique string that identifies the CustomerProfile resource. | +**Url** | Pointer to **string** | The absolute URL of the Identity resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/trusthub/v1/docs/TrusthubV1TrustProductTrustProductEntityAssignment.md b/twilio/rest/trusthub/v1/docs/TrusthubV1TrustProductTrustProductEntityAssignment.md index 4e2f6dbf1..af06de813 100644 --- a/twilio/rest/trusthub/v1/docs/TrusthubV1TrustProductTrustProductEntityAssignment.md +++ b/twilio/rest/trusthub/v1/docs/TrusthubV1TrustProductTrustProductEntityAssignment.md @@ -1,14 +1,14 @@ # TrusthubV1TrustProductTrustProductEntityAssignment ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**ObjectSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**TrustProductSid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**ObjectSid** | Pointer to **string** | The sid of an object bag | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**TrustProductSid** | Pointer to **string** | The unique string that identifies the TrustProduct resource. | +**Url** | Pointer to **string** | The absolute URL of the Identity resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/trusthub/v1/docs/TrusthubV1TrustProductTrustProductEvaluation.md b/twilio/rest/trusthub/v1/docs/TrusthubV1TrustProductTrustProductEvaluation.md index bea97e2bb..16a66221c 100644 --- a/twilio/rest/trusthub/v1/docs/TrusthubV1TrustProductTrustProductEvaluation.md +++ b/twilio/rest/trusthub/v1/docs/TrusthubV1TrustProductTrustProductEvaluation.md @@ -1,16 +1,16 @@ # TrusthubV1TrustProductTrustProductEvaluation ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**PolicySid** | Pointer to **string** | -**Results** | Pointer to **[]map[string]interface{}** | -**Sid** | Pointer to **string** | -**Status** | Pointer to [**TrustProductEvaluationStatus**](trust_product_evaluation_status.md) | -**TrustProductSid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | | +**PolicySid** | Pointer to **string** | The unique string of a policy | +**Results** | Pointer to **[]map[string]interface{}** | The results of the Evaluation resource | +**Sid** | Pointer to **string** | The unique string that identifies the Evaluation resource | +**Status** | Pointer to **string** | The compliance status of the Evaluation resource | +**TrustProductSid** | Pointer to **string** | The unique string that identifies the resource | +**Url** | Pointer to **string** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/trusthub/v1/model_trusthub_v1_customer_profile.go b/twilio/rest/trusthub/v1/model_trusthub_v1_customer_profile.go index ec3a24e0b..5f0da972d 100644 --- a/twilio/rest/trusthub/v1/model_trusthub_v1_customer_profile.go +++ b/twilio/rest/trusthub/v1/model_trusthub_v1_customer_profile.go @@ -17,16 +17,28 @@ import ( // TrusthubV1CustomerProfile struct for TrusthubV1CustomerProfile type TrusthubV1CustomerProfile struct { - AccountSid *string `json:"AccountSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Email *string `json:"Email,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - PolicySid *string `json:"PolicySid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Status *CustomerProfileStatus `json:"Status,omitempty"` - StatusCallback *string `json:"StatusCallback,omitempty"` - Url *string `json:"Url,omitempty"` - ValidUntil *time.Time `json:"ValidUntil,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The email address + Email *string `json:"Email,omitempty"` + // The string that you assigned to describe the resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // The URLs of the Assigned Items of the Customer-Profile resource + Links *map[string]interface{} `json:"Links,omitempty"` + // The unique string of a policy. + PolicySid *string `json:"PolicySid,omitempty"` + // The unique string that identifies the resource. + Sid *string `json:"Sid,omitempty"` + // The verification status of the Customer-Profile resource + Status *string `json:"Status,omitempty"` + // The URL we call to inform your application of status changes. + StatusCallback *string `json:"StatusCallback,omitempty"` + // The absolute URL of the Customer-Profile resource + Url *string `json:"Url,omitempty"` + // The ISO 8601 date and time in GMT when the resource will be valid until. + ValidUntil *time.Time `json:"ValidUntil,omitempty"` } diff --git a/twilio/rest/trusthub/v1/model_trusthub_v1_customer_profile_customer_profile_channel_endpoint_assignment.go b/twilio/rest/trusthub/v1/model_trusthub_v1_customer_profile_customer_profile_channel_endpoint_assignment.go index 231822e56..849e4b9d2 100644 --- a/twilio/rest/trusthub/v1/model_trusthub_v1_customer_profile_customer_profile_channel_endpoint_assignment.go +++ b/twilio/rest/trusthub/v1/model_trusthub_v1_customer_profile_customer_profile_channel_endpoint_assignment.go @@ -17,11 +17,18 @@ import ( // TrusthubV1CustomerProfileCustomerProfileChannelEndpointAssignment struct for TrusthubV1CustomerProfileCustomerProfileChannelEndpointAssignment type TrusthubV1CustomerProfileCustomerProfileChannelEndpointAssignment struct { - AccountSid *string `json:"AccountSid,omitempty"` - ChannelEndpointSid *string `json:"ChannelEndpointSid,omitempty"` - ChannelEndpointType *string `json:"ChannelEndpointType,omitempty"` - CustomerProfileSid *string `json:"CustomerProfileSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The sid of an channel endpoint + ChannelEndpointSid *string `json:"ChannelEndpointSid,omitempty"` + // The type of channel endpoint + ChannelEndpointType *string `json:"ChannelEndpointType,omitempty"` + // The unique string that identifies the CustomerProfile resource. + CustomerProfileSid *string `json:"CustomerProfileSid,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The absolute URL of the Identity resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/trusthub/v1/model_trusthub_v1_customer_profile_customer_profile_entity_assignment.go b/twilio/rest/trusthub/v1/model_trusthub_v1_customer_profile_customer_profile_entity_assignment.go index 61c37beb1..efdee8f59 100644 --- a/twilio/rest/trusthub/v1/model_trusthub_v1_customer_profile_customer_profile_entity_assignment.go +++ b/twilio/rest/trusthub/v1/model_trusthub_v1_customer_profile_customer_profile_entity_assignment.go @@ -17,10 +17,16 @@ import ( // TrusthubV1CustomerProfileCustomerProfileEntityAssignment struct for TrusthubV1CustomerProfileCustomerProfileEntityAssignment type TrusthubV1CustomerProfileCustomerProfileEntityAssignment struct { - AccountSid *string `json:"AccountSid,omitempty"` - CustomerProfileSid *string `json:"CustomerProfileSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - ObjectSid *string `json:"ObjectSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The unique string that identifies the CustomerProfile resource. + CustomerProfileSid *string `json:"CustomerProfileSid,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The sid of an object bag + ObjectSid *string `json:"ObjectSid,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The absolute URL of the Identity resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/trusthub/v1/model_trusthub_v1_customer_profile_customer_profile_evaluation.go b/twilio/rest/trusthub/v1/model_trusthub_v1_customer_profile_customer_profile_evaluation.go index c756322b4..89f015fbf 100644 --- a/twilio/rest/trusthub/v1/model_trusthub_v1_customer_profile_customer_profile_evaluation.go +++ b/twilio/rest/trusthub/v1/model_trusthub_v1_customer_profile_customer_profile_evaluation.go @@ -17,12 +17,18 @@ import ( // TrusthubV1CustomerProfileCustomerProfileEvaluation struct for TrusthubV1CustomerProfileCustomerProfileEvaluation type TrusthubV1CustomerProfileCustomerProfileEvaluation struct { - AccountSid *string `json:"AccountSid,omitempty"` - CustomerProfileSid *string `json:"CustomerProfileSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - PolicySid *string `json:"PolicySid,omitempty"` - Results *[]map[string]interface{} `json:"Results,omitempty"` - Sid *string `json:"Sid,omitempty"` - Status *CustomerProfileEvaluationStatus `json:"Status,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The unique string that identifies the resource + CustomerProfileSid *string `json:"CustomerProfileSid,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The unique string of a policy + PolicySid *string `json:"PolicySid,omitempty"` + // The results of the Evaluation resource + Results *[]map[string]interface{} `json:"Results,omitempty"` + // The unique string that identifies the Evaluation resource + Sid *string `json:"Sid,omitempty"` + // The compliance status of the Evaluation resource + Status *string `json:"Status,omitempty"` + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/trusthub/v1/model_trusthub_v1_end_user.go b/twilio/rest/trusthub/v1/model_trusthub_v1_end_user.go index 3138d0911..0f7d6e7c3 100644 --- a/twilio/rest/trusthub/v1/model_trusthub_v1_end_user.go +++ b/twilio/rest/trusthub/v1/model_trusthub_v1_end_user.go @@ -17,12 +17,20 @@ import ( // TrusthubV1EndUser struct for TrusthubV1EndUser type TrusthubV1EndUser struct { - AccountSid *string `json:"AccountSid,omitempty"` - Attributes *map[string]interface{} `json:"Attributes,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Sid *string `json:"Sid,omitempty"` - Type *string `json:"Type,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The set of parameters that compose the End Users resource + Attributes *map[string]interface{} `json:"Attributes,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The string that you assigned to describe the resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The type of end user of the Bundle resource + Type *string `json:"Type,omitempty"` + // The absolute URL of the End User resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/trusthub/v1/model_trusthub_v1_end_user_type.go b/twilio/rest/trusthub/v1/model_trusthub_v1_end_user_type.go index 56f3f132c..f48d49e5e 100644 --- a/twilio/rest/trusthub/v1/model_trusthub_v1_end_user_type.go +++ b/twilio/rest/trusthub/v1/model_trusthub_v1_end_user_type.go @@ -13,9 +13,14 @@ package openapi // TrusthubV1EndUserType struct for TrusthubV1EndUserType type TrusthubV1EndUserType struct { - Fields *[]map[string]interface{} `json:"Fields,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - MachineName *string `json:"MachineName,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` + // The required information for creating an End-User. + Fields *[]map[string]interface{} `json:"Fields,omitempty"` + // A human-readable description of the End-User Type resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // A machine-readable description of the End-User Type resource + MachineName *string `json:"MachineName,omitempty"` + // The unique string that identifies the End-User Type resource + Sid *string `json:"Sid,omitempty"` + // The absolute URL of the End-User Type resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/trusthub/v1/model_trusthub_v1_policies.go b/twilio/rest/trusthub/v1/model_trusthub_v1_policies.go index 6ea9c38a4..055f57d84 100644 --- a/twilio/rest/trusthub/v1/model_trusthub_v1_policies.go +++ b/twilio/rest/trusthub/v1/model_trusthub_v1_policies.go @@ -13,8 +13,12 @@ package openapi // TrusthubV1Policies struct for TrusthubV1Policies type TrusthubV1Policies struct { - FriendlyName *string `json:"FriendlyName,omitempty"` + // A human-readable description of the Policy resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // The sid of a Policy object that dictates requirements Requirements *map[string]interface{} `json:"Requirements,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` + // The unique string that identifies the Policy resource + Sid *string `json:"Sid,omitempty"` + // The absolute URL of the Policy resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/trusthub/v1/model_trusthub_v1_supporting_document.go b/twilio/rest/trusthub/v1/model_trusthub_v1_supporting_document.go index 09a580b5f..d690c23bb 100644 --- a/twilio/rest/trusthub/v1/model_trusthub_v1_supporting_document.go +++ b/twilio/rest/trusthub/v1/model_trusthub_v1_supporting_document.go @@ -17,14 +17,24 @@ import ( // TrusthubV1SupportingDocument struct for TrusthubV1SupportingDocument type TrusthubV1SupportingDocument struct { - AccountSid *string `json:"AccountSid,omitempty"` - Attributes *map[string]interface{} `json:"Attributes,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - MimeType *string `json:"MimeType,omitempty"` - Sid *string `json:"Sid,omitempty"` - Status *SupportingDocumentStatus `json:"Status,omitempty"` - Type *string `json:"Type,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The set of parameters that compose the Supporting Documents resource + Attributes *map[string]interface{} `json:"Attributes,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The string that you assigned to describe the resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // The image type of the file + MimeType *string `json:"MimeType,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The verification status of the Supporting Document resource + Status *string `json:"Status,omitempty"` + // The type of the Supporting Document + Type *string `json:"Type,omitempty"` + // The absolute URL of the Supporting Document resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/trusthub/v1/model_trusthub_v1_supporting_document_type.go b/twilio/rest/trusthub/v1/model_trusthub_v1_supporting_document_type.go index cf785a6a0..353ffa97f 100644 --- a/twilio/rest/trusthub/v1/model_trusthub_v1_supporting_document_type.go +++ b/twilio/rest/trusthub/v1/model_trusthub_v1_supporting_document_type.go @@ -13,9 +13,14 @@ package openapi // TrusthubV1SupportingDocumentType struct for TrusthubV1SupportingDocumentType type TrusthubV1SupportingDocumentType struct { - Fields *[]map[string]interface{} `json:"Fields,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - MachineName *string `json:"MachineName,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` + // The required information for creating a Supporting Document + Fields *[]map[string]interface{} `json:"Fields,omitempty"` + // A human-readable description of the Supporting Document Type resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // The machine-readable description of the Supporting Document Type resource + MachineName *string `json:"MachineName,omitempty"` + // The unique string that identifies the Supporting Document Type resource + Sid *string `json:"Sid,omitempty"` + // The absolute URL of the Supporting Document Type resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/trusthub/v1/model_trusthub_v1_trust_product.go b/twilio/rest/trusthub/v1/model_trusthub_v1_trust_product.go index c7c894f78..c54c6547a 100644 --- a/twilio/rest/trusthub/v1/model_trusthub_v1_trust_product.go +++ b/twilio/rest/trusthub/v1/model_trusthub_v1_trust_product.go @@ -17,16 +17,28 @@ import ( // TrusthubV1TrustProduct struct for TrusthubV1TrustProduct type TrusthubV1TrustProduct struct { - AccountSid *string `json:"AccountSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Email *string `json:"Email,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - PolicySid *string `json:"PolicySid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Status *TrustProductStatus `json:"Status,omitempty"` - StatusCallback *string `json:"StatusCallback,omitempty"` - Url *string `json:"Url,omitempty"` - ValidUntil *time.Time `json:"ValidUntil,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The email address + Email *string `json:"Email,omitempty"` + // The string that you assigned to describe the resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // The URLs of the Assigned Items of the Customer-Profile resource + Links *map[string]interface{} `json:"Links,omitempty"` + // The unique string of a policy. + PolicySid *string `json:"PolicySid,omitempty"` + // The unique string that identifies the resource. + Sid *string `json:"Sid,omitempty"` + // The verification status of the Customer-Profile resource + Status *string `json:"Status,omitempty"` + // The URL we call to inform your application of status changes. + StatusCallback *string `json:"StatusCallback,omitempty"` + // The absolute URL of the Customer-Profile resource + Url *string `json:"Url,omitempty"` + // The ISO 8601 date and time in GMT when the resource will be valid until. + ValidUntil *time.Time `json:"ValidUntil,omitempty"` } diff --git a/twilio/rest/trusthub/v1/model_trusthub_v1_trust_product_trust_product_channel_endpoint_assignment.go b/twilio/rest/trusthub/v1/model_trusthub_v1_trust_product_trust_product_channel_endpoint_assignment.go index 7a7a97f26..49692db28 100644 --- a/twilio/rest/trusthub/v1/model_trusthub_v1_trust_product_trust_product_channel_endpoint_assignment.go +++ b/twilio/rest/trusthub/v1/model_trusthub_v1_trust_product_trust_product_channel_endpoint_assignment.go @@ -17,11 +17,18 @@ import ( // TrusthubV1TrustProductTrustProductChannelEndpointAssignment struct for TrusthubV1TrustProductTrustProductChannelEndpointAssignment type TrusthubV1TrustProductTrustProductChannelEndpointAssignment struct { - AccountSid *string `json:"AccountSid,omitempty"` - ChannelEndpointSid *string `json:"ChannelEndpointSid,omitempty"` - ChannelEndpointType *string `json:"ChannelEndpointType,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - Sid *string `json:"Sid,omitempty"` - TrustProductSid *string `json:"TrustProductSid,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The sid of an channel endpoint + ChannelEndpointSid *string `json:"ChannelEndpointSid,omitempty"` + // The type of channel endpoint + ChannelEndpointType *string `json:"ChannelEndpointType,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The unique string that identifies the CustomerProfile resource. + TrustProductSid *string `json:"TrustProductSid,omitempty"` + // The absolute URL of the Identity resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/trusthub/v1/model_trusthub_v1_trust_product_trust_product_entity_assignment.go b/twilio/rest/trusthub/v1/model_trusthub_v1_trust_product_trust_product_entity_assignment.go index adbcefcb2..183da6793 100644 --- a/twilio/rest/trusthub/v1/model_trusthub_v1_trust_product_trust_product_entity_assignment.go +++ b/twilio/rest/trusthub/v1/model_trusthub_v1_trust_product_trust_product_entity_assignment.go @@ -17,10 +17,16 @@ import ( // TrusthubV1TrustProductTrustProductEntityAssignment struct for TrusthubV1TrustProductTrustProductEntityAssignment type TrusthubV1TrustProductTrustProductEntityAssignment struct { - AccountSid *string `json:"AccountSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - ObjectSid *string `json:"ObjectSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - TrustProductSid *string `json:"TrustProductSid,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The sid of an object bag + ObjectSid *string `json:"ObjectSid,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The unique string that identifies the TrustProduct resource. + TrustProductSid *string `json:"TrustProductSid,omitempty"` + // The absolute URL of the Identity resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/trusthub/v1/model_trusthub_v1_trust_product_trust_product_evaluation.go b/twilio/rest/trusthub/v1/model_trusthub_v1_trust_product_trust_product_evaluation.go index cbcc1f4bd..f6b6269c3 100644 --- a/twilio/rest/trusthub/v1/model_trusthub_v1_trust_product_trust_product_evaluation.go +++ b/twilio/rest/trusthub/v1/model_trusthub_v1_trust_product_trust_product_evaluation.go @@ -17,12 +17,18 @@ import ( // TrusthubV1TrustProductTrustProductEvaluation struct for TrusthubV1TrustProductTrustProductEvaluation type TrusthubV1TrustProductTrustProductEvaluation struct { - AccountSid *string `json:"AccountSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - PolicySid *string `json:"PolicySid,omitempty"` - Results *[]map[string]interface{} `json:"Results,omitempty"` - Sid *string `json:"Sid,omitempty"` - Status *TrustProductEvaluationStatus `json:"Status,omitempty"` - TrustProductSid *string `json:"TrustProductSid,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The unique string of a policy + PolicySid *string `json:"PolicySid,omitempty"` + // The results of the Evaluation resource + Results *[]map[string]interface{} `json:"Results,omitempty"` + // The unique string that identifies the Evaluation resource + Sid *string `json:"Sid,omitempty"` + // The compliance status of the Evaluation resource + Status *string `json:"Status,omitempty"` + // The unique string that identifies the resource + TrustProductSid *string `json:"TrustProductSid,omitempty"` + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/verify/v2/README.md b/twilio/rest/verify/v2/README.md index fe7a79d55..ebcea2fa8 100644 --- a/twilio/rest/verify/v2/README.md +++ b/twilio/rest/verify/v2/README.md @@ -81,12 +81,6 @@ Class | Method | HTTP request | Description ## Documentation For Models - - [ChallengeChallengeReasons](docs/ChallengeChallengeReasons.md) - - [ChallengeChallengeStatuses](docs/ChallengeChallengeStatuses.md) - - [ChallengeFactorTypes](docs/ChallengeFactorTypes.md) - - [FactorFactorStatuses](docs/FactorFactorStatuses.md) - - [FactorFactorTypes](docs/FactorFactorTypes.md) - - [FormFormTypes](docs/FormFormTypes.md) - [ListBucketResponse](docs/ListBucketResponse.md) - [ListChallengeResponse](docs/ListChallengeResponse.md) - [ListEntityResponse](docs/ListEntityResponse.md) @@ -97,10 +91,6 @@ Class | Method | HTTP request | Description - [ListVerificationAttemptResponse](docs/ListVerificationAttemptResponse.md) - [ListVerificationAttemptResponseMeta](docs/ListVerificationAttemptResponseMeta.md) - [ListWebhookResponse](docs/ListWebhookResponse.md) - - [VerificationAttemptChannels](docs/VerificationAttemptChannels.md) - - [VerificationAttemptConversionStatus](docs/VerificationAttemptConversionStatus.md) - - [VerificationChannel](docs/VerificationChannel.md) - - [VerificationCheckChannel](docs/VerificationCheckChannel.md) - [VerifyV2Form](docs/VerifyV2Form.md) - [VerifyV2Service](docs/VerifyV2Service.md) - [VerifyV2ServiceAccessToken](docs/VerifyV2ServiceAccessToken.md) @@ -114,8 +104,6 @@ Class | Method | HTTP request | Description - [VerifyV2ServiceVerificationCheck](docs/VerifyV2ServiceVerificationCheck.md) - [VerifyV2ServiceWebhook](docs/VerifyV2ServiceWebhook.md) - [VerifyV2VerificationAttempt](docs/VerifyV2VerificationAttempt.md) - - [WebhookMethods](docs/WebhookMethods.md) - - [WebhookStatus](docs/WebhookStatus.md) ## Documentation For Authorization diff --git a/twilio/rest/verify/v2/docs/ListBucketResponse.md b/twilio/rest/verify/v2/docs/ListBucketResponse.md index 61e4d8f31..51ca86d2d 100644 --- a/twilio/rest/verify/v2/docs/ListBucketResponse.md +++ b/twilio/rest/verify/v2/docs/ListBucketResponse.md @@ -1,10 +1,10 @@ # ListBucketResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Buckets** | [**[]VerifyV2ServiceRateLimitBucket**](verify.v2.service.rate_limit.bucket.md) | [optional] -**Meta** | [**ListVerificationAttemptResponseMeta**](ListVerificationAttemptResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Buckets** | [**[]VerifyV2ServiceRateLimitBucket**](verify.v2.service.rate_limit.bucket.md) | |[optional] +**Meta** | [**ListVerificationAttemptResponseMeta**](ListVerificationAttemptResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/verify/v2/docs/ListChallengeResponse.md b/twilio/rest/verify/v2/docs/ListChallengeResponse.md index c0596bdd0..ba0b2ad8d 100644 --- a/twilio/rest/verify/v2/docs/ListChallengeResponse.md +++ b/twilio/rest/verify/v2/docs/ListChallengeResponse.md @@ -1,10 +1,10 @@ # ListChallengeResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Challenges** | [**[]VerifyV2ServiceEntityChallenge**](verify.v2.service.entity.challenge.md) | [optional] -**Meta** | [**ListVerificationAttemptResponseMeta**](ListVerificationAttemptResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Challenges** | [**[]VerifyV2ServiceEntityChallenge**](verify.v2.service.entity.challenge.md) | |[optional] +**Meta** | [**ListVerificationAttemptResponseMeta**](ListVerificationAttemptResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/verify/v2/docs/ListEntityResponse.md b/twilio/rest/verify/v2/docs/ListEntityResponse.md index edd674556..3b74d9f75 100644 --- a/twilio/rest/verify/v2/docs/ListEntityResponse.md +++ b/twilio/rest/verify/v2/docs/ListEntityResponse.md @@ -1,10 +1,10 @@ # ListEntityResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Entities** | [**[]VerifyV2ServiceEntity**](verify.v2.service.entity.md) | [optional] -**Meta** | [**ListVerificationAttemptResponseMeta**](ListVerificationAttemptResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Entities** | [**[]VerifyV2ServiceEntity**](verify.v2.service.entity.md) | |[optional] +**Meta** | [**ListVerificationAttemptResponseMeta**](ListVerificationAttemptResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/verify/v2/docs/ListFactorResponse.md b/twilio/rest/verify/v2/docs/ListFactorResponse.md index 45b6ac183..fac93b43b 100644 --- a/twilio/rest/verify/v2/docs/ListFactorResponse.md +++ b/twilio/rest/verify/v2/docs/ListFactorResponse.md @@ -1,10 +1,10 @@ # ListFactorResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Factors** | [**[]VerifyV2ServiceEntityFactor**](verify.v2.service.entity.factor.md) | [optional] -**Meta** | [**ListVerificationAttemptResponseMeta**](ListVerificationAttemptResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Factors** | [**[]VerifyV2ServiceEntityFactor**](verify.v2.service.entity.factor.md) | |[optional] +**Meta** | [**ListVerificationAttemptResponseMeta**](ListVerificationAttemptResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/verify/v2/docs/ListMessagingConfigurationResponse.md b/twilio/rest/verify/v2/docs/ListMessagingConfigurationResponse.md index cd0ac423a..5196428cc 100644 --- a/twilio/rest/verify/v2/docs/ListMessagingConfigurationResponse.md +++ b/twilio/rest/verify/v2/docs/ListMessagingConfigurationResponse.md @@ -1,10 +1,10 @@ # ListMessagingConfigurationResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**MessagingConfigurations** | [**[]VerifyV2ServiceMessagingConfiguration**](verify.v2.service.messaging_configuration.md) | [optional] -**Meta** | [**ListVerificationAttemptResponseMeta**](ListVerificationAttemptResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**MessagingConfigurations** | [**[]VerifyV2ServiceMessagingConfiguration**](verify.v2.service.messaging_configuration.md) | |[optional] +**Meta** | [**ListVerificationAttemptResponseMeta**](ListVerificationAttemptResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/verify/v2/docs/ListRateLimitResponse.md b/twilio/rest/verify/v2/docs/ListRateLimitResponse.md index 22de01f15..b6df06228 100644 --- a/twilio/rest/verify/v2/docs/ListRateLimitResponse.md +++ b/twilio/rest/verify/v2/docs/ListRateLimitResponse.md @@ -1,10 +1,10 @@ # ListRateLimitResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListVerificationAttemptResponseMeta**](ListVerificationAttemptResponse_meta.md) | [optional] -**RateLimits** | [**[]VerifyV2ServiceRateLimit**](verify.v2.service.rate_limit.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListVerificationAttemptResponseMeta**](ListVerificationAttemptResponse_meta.md) | |[optional] +**RateLimits** | [**[]VerifyV2ServiceRateLimit**](verify.v2.service.rate_limit.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/verify/v2/docs/ListServiceResponse.md b/twilio/rest/verify/v2/docs/ListServiceResponse.md index 42538ef23..9f6a84c28 100644 --- a/twilio/rest/verify/v2/docs/ListServiceResponse.md +++ b/twilio/rest/verify/v2/docs/ListServiceResponse.md @@ -1,10 +1,10 @@ # ListServiceResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListVerificationAttemptResponseMeta**](ListVerificationAttemptResponse_meta.md) | [optional] -**Services** | [**[]VerifyV2Service**](verify.v2.service.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListVerificationAttemptResponseMeta**](ListVerificationAttemptResponse_meta.md) | |[optional] +**Services** | [**[]VerifyV2Service**](verify.v2.service.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/verify/v2/docs/ListVerificationAttemptResponse.md b/twilio/rest/verify/v2/docs/ListVerificationAttemptResponse.md index 424134eeb..9d73c1685 100644 --- a/twilio/rest/verify/v2/docs/ListVerificationAttemptResponse.md +++ b/twilio/rest/verify/v2/docs/ListVerificationAttemptResponse.md @@ -1,10 +1,10 @@ # ListVerificationAttemptResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Attempts** | [**[]VerifyV2VerificationAttempt**](verify.v2.verification_attempt.md) | [optional] -**Meta** | [**ListVerificationAttemptResponseMeta**](ListVerificationAttemptResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Attempts** | [**[]VerifyV2VerificationAttempt**](verify.v2.verification_attempt.md) | |[optional] +**Meta** | [**ListVerificationAttemptResponseMeta**](ListVerificationAttemptResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/verify/v2/docs/ListVerificationAttemptResponseMeta.md b/twilio/rest/verify/v2/docs/ListVerificationAttemptResponseMeta.md index 4c17e7882..c9a5b04de 100644 --- a/twilio/rest/verify/v2/docs/ListVerificationAttemptResponseMeta.md +++ b/twilio/rest/verify/v2/docs/ListVerificationAttemptResponseMeta.md @@ -1,15 +1,15 @@ # ListVerificationAttemptResponseMeta ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**FirstPageUrl** | **string** | [optional] -**Key** | **string** | [optional] -**NextPageUrl** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUrl** | **string** | [optional] -**Url** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstPageUrl** | **string** | |[optional] +**Key** | **string** | |[optional] +**NextPageUrl** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUrl** | **string** | |[optional] +**Url** | **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/twilio/rest/verify/v2/docs/ListWebhookResponse.md b/twilio/rest/verify/v2/docs/ListWebhookResponse.md index 4d2560229..ca02ea281 100644 --- a/twilio/rest/verify/v2/docs/ListWebhookResponse.md +++ b/twilio/rest/verify/v2/docs/ListWebhookResponse.md @@ -1,10 +1,10 @@ # ListWebhookResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListVerificationAttemptResponseMeta**](ListVerificationAttemptResponse_meta.md) | [optional] -**Webhooks** | [**[]VerifyV2ServiceWebhook**](verify.v2.service.webhook.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListVerificationAttemptResponseMeta**](ListVerificationAttemptResponse_meta.md) | |[optional] +**Webhooks** | [**[]VerifyV2ServiceWebhook**](verify.v2.service.webhook.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/verify/v2/docs/VerifyV2Form.md b/twilio/rest/verify/v2/docs/VerifyV2Form.md index f599bf820..e101b6bca 100644 --- a/twilio/rest/verify/v2/docs/VerifyV2Form.md +++ b/twilio/rest/verify/v2/docs/VerifyV2Form.md @@ -1,12 +1,12 @@ # VerifyV2Form ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**FormMeta** | Pointer to **map[string]interface{}** | -**FormType** | Pointer to [**FormFormTypes**](form_form_types.md) | -**Forms** | Pointer to **map[string]interface{}** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FormMeta** | Pointer to **map[string]interface{}** | Additional information for the available forms for this type. | +**FormType** | Pointer to **string** | The Type of this Form | +**Forms** | Pointer to **map[string]interface{}** | Object that contains the available forms for this type. | +**Url** | Pointer to **string** | The URL to access the forms for this type. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/verify/v2/docs/VerifyV2Service.md b/twilio/rest/verify/v2/docs/VerifyV2Service.md index a400ad31a..b163dd553 100644 --- a/twilio/rest/verify/v2/docs/VerifyV2Service.md +++ b/twilio/rest/verify/v2/docs/VerifyV2Service.md @@ -1,24 +1,24 @@ # VerifyV2Service ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**CodeLength** | Pointer to **int32** | -**CustomCodeEnabled** | Pointer to **bool** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**DoNotShareWarningEnabled** | Pointer to **bool** | -**DtmfInputRequired** | Pointer to **bool** | -**FriendlyName** | Pointer to **string** | -**Links** | Pointer to **map[string]interface{}** | -**LookupEnabled** | Pointer to **bool** | -**Psd2Enabled** | Pointer to **bool** | -**Push** | Pointer to **map[string]interface{}** | -**Sid** | Pointer to **string** | -**SkipSmsToLandlines** | Pointer to **bool** | -**TtsName** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**CodeLength** | Pointer to **int32** | The length of the verification code | +**CustomCodeEnabled** | Pointer to **bool** | Whether to allow sending verifications with a custom code. | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was last updated | +**DoNotShareWarningEnabled** | Pointer to **bool** | Whether to add a security warning at the end of an SMS. | +**DtmfInputRequired** | Pointer to **bool** | Whether to ask the user to press a number before delivering the verify code in a phone call | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the verification service | +**Links** | Pointer to **map[string]interface{}** | The URLs of related resources | +**LookupEnabled** | Pointer to **bool** | Whether to perform a lookup with each verification | +**Psd2Enabled** | Pointer to **bool** | Whether to pass PSD2 transaction parameters when starting a verification | +**Push** | Pointer to **map[string]interface{}** | The service level configuration of factor push type. | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**SkipSmsToLandlines** | Pointer to **bool** | Whether to skip sending SMS verifications to landlines | +**TtsName** | Pointer to **string** | The name of an alternative text-to-speech service to use in phone calls | +**Url** | Pointer to **string** | The absolute URL of the resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/verify/v2/docs/VerifyV2ServiceAccessToken.md b/twilio/rest/verify/v2/docs/VerifyV2ServiceAccessToken.md index a46dc239f..f720c2388 100644 --- a/twilio/rest/verify/v2/docs/VerifyV2ServiceAccessToken.md +++ b/twilio/rest/verify/v2/docs/VerifyV2ServiceAccessToken.md @@ -1,9 +1,9 @@ # VerifyV2ServiceAccessToken ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Token** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Token** | Pointer to **string** | Generated access token. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/verify/v2/docs/VerifyV2ServiceEntity.md b/twilio/rest/verify/v2/docs/VerifyV2ServiceEntity.md index 1fc6c82f9..d0399ea98 100644 --- a/twilio/rest/verify/v2/docs/VerifyV2ServiceEntity.md +++ b/twilio/rest/verify/v2/docs/VerifyV2ServiceEntity.md @@ -1,16 +1,16 @@ # VerifyV2ServiceEntity ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**Identity** | Pointer to **string** | -**Links** | Pointer to **map[string]interface{}** | -**ServiceSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | Account Sid. | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The date this Entity was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The date this Entity was updated | +**Identity** | Pointer to **string** | Unique external identifier of the Entity | +**Links** | Pointer to **map[string]interface{}** | Nested resource URLs. | +**ServiceSid** | Pointer to **string** | Service Sid. | +**Sid** | Pointer to **string** | A string that uniquely identifies this Entity. | +**Url** | Pointer to **string** | The URL of this resource. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/verify/v2/docs/VerifyV2ServiceEntityChallenge.md b/twilio/rest/verify/v2/docs/VerifyV2ServiceEntityChallenge.md index f1ae2492c..8dc069df3 100644 --- a/twilio/rest/verify/v2/docs/VerifyV2ServiceEntityChallenge.md +++ b/twilio/rest/verify/v2/docs/VerifyV2ServiceEntityChallenge.md @@ -1,24 +1,24 @@ # VerifyV2ServiceEntityChallenge ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateResponded** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**Details** | Pointer to **map[string]interface{}** | -**EntitySid** | Pointer to **string** | -**ExpirationDate** | Pointer to [**time.Time**](time.Time.md) | -**FactorSid** | Pointer to **string** | -**FactorType** | Pointer to [**ChallengeFactorTypes**](challenge_factor_types.md) | -**HiddenDetails** | Pointer to **map[string]interface{}** | -**Identity** | Pointer to **string** | -**RespondedReason** | Pointer to [**ChallengeChallengeReasons**](challenge_challenge_reasons.md) | -**ServiceSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Status** | Pointer to [**ChallengeChallengeStatuses**](challenge_challenge_statuses.md) | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | Account Sid. | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The date this Challenge was created | +**DateResponded** | Pointer to [**time.Time**](time.Time.md) | The date this Challenge was responded | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The date this Challenge was updated | +**Details** | Pointer to **map[string]interface{}** | Details about the Challenge. | +**EntitySid** | Pointer to **string** | Entity Sid. | +**ExpirationDate** | Pointer to [**time.Time**](time.Time.md) | The date-time when this Challenge expires | +**FactorSid** | Pointer to **string** | Factor Sid. | +**FactorType** | Pointer to **string** | The Factor Type of this Challenge | +**HiddenDetails** | Pointer to **map[string]interface{}** | Hidden details about the Challenge | +**Identity** | Pointer to **string** | Unique external identifier of the Entity | +**RespondedReason** | Pointer to **string** | The Reason of this Challenge `status` | +**ServiceSid** | Pointer to **string** | Service Sid. | +**Sid** | Pointer to **string** | A string that uniquely identifies this Challenge. | +**Status** | Pointer to **string** | The Status of this Challenge | +**Url** | Pointer to **string** | The URL of this resource. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/verify/v2/docs/VerifyV2ServiceEntityFactor.md b/twilio/rest/verify/v2/docs/VerifyV2ServiceEntityFactor.md index 8db4105cb..958e54c30 100644 --- a/twilio/rest/verify/v2/docs/VerifyV2ServiceEntityFactor.md +++ b/twilio/rest/verify/v2/docs/VerifyV2ServiceEntityFactor.md @@ -1,20 +1,20 @@ # VerifyV2ServiceEntityFactor ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Config** | Pointer to **map[string]interface{}** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**EntitySid** | Pointer to **string** | -**FactorType** | Pointer to [**FactorFactorTypes**](factor_factor_types.md) | -**FriendlyName** | Pointer to **string** | -**Identity** | Pointer to **string** | -**ServiceSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Status** | Pointer to [**FactorFactorStatuses**](factor_factor_statuses.md) | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | Account Sid. | +**Config** | Pointer to **map[string]interface{}** | Configurations for a `factor_type`. | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The date this Factor was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The date this Factor was updated | +**EntitySid** | Pointer to **string** | Entity Sid. | +**FactorType** | Pointer to **string** | The Type of this Factor | +**FriendlyName** | Pointer to **string** | A human readable description of this resource. | +**Identity** | Pointer to **string** | Unique external identifier of the Entity | +**ServiceSid** | Pointer to **string** | Service Sid. | +**Sid** | Pointer to **string** | A string that uniquely identifies this Factor. | +**Status** | Pointer to **string** | The Status of this Factor | +**Url** | Pointer to **string** | The URL of this resource. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/verify/v2/docs/VerifyV2ServiceMessagingConfiguration.md b/twilio/rest/verify/v2/docs/VerifyV2ServiceMessagingConfiguration.md index 56430a138..b2289d7f6 100644 --- a/twilio/rest/verify/v2/docs/VerifyV2ServiceMessagingConfiguration.md +++ b/twilio/rest/verify/v2/docs/VerifyV2ServiceMessagingConfiguration.md @@ -1,15 +1,15 @@ # VerifyV2ServiceMessagingConfiguration ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Country** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**MessagingServiceSid** | Pointer to **string** | -**ServiceSid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**Country** | Pointer to **string** | The ISO-3166-1 country code of the country or `all`. | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was last updated | +**MessagingServiceSid** | Pointer to **string** | The SID of the Messaging Service used for this configuration. | +**ServiceSid** | Pointer to **string** | The SID of the Service that the resource is associated with | +**Url** | Pointer to **string** | The URL of this resource. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/verify/v2/docs/VerifyV2ServiceRateLimit.md b/twilio/rest/verify/v2/docs/VerifyV2ServiceRateLimit.md index c18884bf5..7d4e6c117 100644 --- a/twilio/rest/verify/v2/docs/VerifyV2ServiceRateLimit.md +++ b/twilio/rest/verify/v2/docs/VerifyV2ServiceRateLimit.md @@ -1,17 +1,17 @@ # VerifyV2ServiceRateLimit ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**Description** | Pointer to **string** | -**Links** | Pointer to **map[string]interface{}** | -**ServiceSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**UniqueName** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was last updated | +**Description** | Pointer to **string** | Description of this Rate Limit | +**Links** | Pointer to **map[string]interface{}** | The URLs of related resources | +**ServiceSid** | Pointer to **string** | The SID of the Service that the resource is associated with | +**Sid** | Pointer to **string** | A string that uniquely identifies this Rate Limit. | +**UniqueName** | Pointer to **string** | A unique, developer assigned name of this Rate Limit. | +**Url** | Pointer to **string** | The URL of this resource. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/verify/v2/docs/VerifyV2ServiceRateLimitBucket.md b/twilio/rest/verify/v2/docs/VerifyV2ServiceRateLimitBucket.md index ee5981cc1..c70f8a3e8 100644 --- a/twilio/rest/verify/v2/docs/VerifyV2ServiceRateLimitBucket.md +++ b/twilio/rest/verify/v2/docs/VerifyV2ServiceRateLimitBucket.md @@ -1,17 +1,17 @@ # VerifyV2ServiceRateLimitBucket ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**Interval** | Pointer to **int32** | -**Max** | Pointer to **int32** | -**RateLimitSid** | Pointer to **string** | -**ServiceSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was last updated | +**Interval** | Pointer to **int32** | Number of seconds that the rate limit will be enforced over. | +**Max** | Pointer to **int32** | Max number of requests. | +**RateLimitSid** | Pointer to **string** | Rate Limit Sid. | +**ServiceSid** | Pointer to **string** | The SID of the Service that the resource is associated with | +**Sid** | Pointer to **string** | A string that uniquely identifies this Bucket. | +**Url** | Pointer to **string** | The URL of this resource. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/verify/v2/docs/VerifyV2ServiceVerification.md b/twilio/rest/verify/v2/docs/VerifyV2ServiceVerification.md index c5e108990..5a4528ab2 100644 --- a/twilio/rest/verify/v2/docs/VerifyV2ServiceVerification.md +++ b/twilio/rest/verify/v2/docs/VerifyV2ServiceVerification.md @@ -1,22 +1,22 @@ # VerifyV2ServiceVerification ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Amount** | Pointer to **string** | -**Channel** | Pointer to [**VerificationChannel**](verification_channel.md) | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**Lookup** | Pointer to **map[string]interface{}** | -**Payee** | Pointer to **string** | -**SendCodeAttempts** | Pointer to **[]map[string]interface{}** | -**ServiceSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Status** | Pointer to **string** | -**To** | Pointer to **string** | -**Url** | Pointer to **string** | -**Valid** | Pointer to **bool** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**Amount** | Pointer to **string** | The amount of the associated PSD2 compliant transaction. | +**Channel** | Pointer to **string** | The verification method used. | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was last updated | +**Lookup** | Pointer to **map[string]interface{}** | Information about the phone number being verified | +**Payee** | Pointer to **string** | The payee of the associated PSD2 compliant transaction | +**SendCodeAttempts** | Pointer to **[]map[string]interface{}** | An array of verification attempt objects. | +**ServiceSid** | Pointer to **string** | The SID of the Service that the resource is associated with | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Status** | Pointer to **string** | The status of the verification resource | +**To** | Pointer to **string** | The phone number or email being verified | +**Url** | Pointer to **string** | The absolute URL of the Verification resource | +**Valid** | Pointer to **bool** | Whether the verification was successful | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/verify/v2/docs/VerifyV2ServiceVerificationCheck.md b/twilio/rest/verify/v2/docs/VerifyV2ServiceVerificationCheck.md index 8d81a888e..456e390a5 100644 --- a/twilio/rest/verify/v2/docs/VerifyV2ServiceVerificationCheck.md +++ b/twilio/rest/verify/v2/docs/VerifyV2ServiceVerificationCheck.md @@ -1,19 +1,19 @@ # VerifyV2ServiceVerificationCheck ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Amount** | Pointer to **string** | -**Channel** | Pointer to [**VerificationCheckChannel**](verification_check_channel.md) | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**Payee** | Pointer to **string** | -**ServiceSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Status** | Pointer to **string** | -**To** | Pointer to **string** | -**Valid** | Pointer to **bool** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**Amount** | Pointer to **string** | The amount of the associated PSD2 compliant transaction. | +**Channel** | Pointer to **string** | The verification method to use | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the Verification Check resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the Verification Check resource was last updated | +**Payee** | Pointer to **string** | The payee of the associated PSD2 compliant transaction | +**ServiceSid** | Pointer to **string** | The SID of the Service that the resource is associated with | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Status** | Pointer to **string** | The status of the verification resource | +**To** | Pointer to **string** | The phone number or email being verified | +**Valid** | Pointer to **bool** | Whether the verification was successful | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/verify/v2/docs/VerifyV2ServiceWebhook.md b/twilio/rest/verify/v2/docs/VerifyV2ServiceWebhook.md index 58cb35752..f53ac7940 100644 --- a/twilio/rest/verify/v2/docs/VerifyV2ServiceWebhook.md +++ b/twilio/rest/verify/v2/docs/VerifyV2ServiceWebhook.md @@ -1,19 +1,19 @@ # VerifyV2ServiceWebhook ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**EventTypes** | Pointer to **[]string** | -**FriendlyName** | Pointer to **string** | -**ServiceSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Status** | Pointer to [**WebhookStatus**](webhook_status.md) | -**Url** | Pointer to **string** | -**WebhookMethod** | Pointer to [**WebhookMethods**](webhook_methods.md) | -**WebhookUrl** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was last updated | +**EventTypes** | Pointer to **[]string** | The array of events that this Webhook is subscribed to. | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the webhook | +**ServiceSid** | Pointer to **string** | Service Sid. | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Status** | Pointer to **string** | The webhook status | +**Url** | Pointer to **string** | The absolute URL of the Webhook resource | +**WebhookMethod** | Pointer to **string** | The method used when calling the webhook's URL. | +**WebhookUrl** | Pointer to **string** | The URL associated with this Webhook. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/verify/v2/docs/VerifyV2VerificationAttempt.md b/twilio/rest/verify/v2/docs/VerifyV2VerificationAttempt.md index 0eb3822bd..f8132856b 100644 --- a/twilio/rest/verify/v2/docs/VerifyV2VerificationAttempt.md +++ b/twilio/rest/verify/v2/docs/VerifyV2VerificationAttempt.md @@ -1,17 +1,17 @@ # VerifyV2VerificationAttempt ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Channel** | Pointer to [**VerificationAttemptChannels**](verification_attempt_channels.md) | -**ChannelData** | Pointer to **map[string]interface{}** | -**ConversionStatus** | Pointer to [**VerificationAttemptConversionStatus**](verification_attempt_conversion_status.md) | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**ServiceSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | Account Sid | +**Channel** | Pointer to **string** | Channel used for the attempt | +**ChannelData** | Pointer to **map[string]interface{}** | Object with the channel information for an attempt | +**ConversionStatus** | Pointer to **string** | Status of a conversion | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The date this Attempt was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The date this Attempt was updated | +**ServiceSid** | Pointer to **string** | | +**Sid** | Pointer to **string** | A string that uniquely identifies this Verification Attempt | +**Url** | Pointer to **string** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/verify/v2/model_verify_v2_form.go b/twilio/rest/verify/v2/model_verify_v2_form.go index 8b8dd67e1..15b4185c1 100644 --- a/twilio/rest/verify/v2/model_verify_v2_form.go +++ b/twilio/rest/verify/v2/model_verify_v2_form.go @@ -13,8 +13,12 @@ package openapi // VerifyV2Form struct for VerifyV2Form type VerifyV2Form struct { + // Additional information for the available forms for this type. FormMeta *map[string]interface{} `json:"FormMeta,omitempty"` - FormType *FormFormTypes `json:"FormType,omitempty"` - Forms *map[string]interface{} `json:"Forms,omitempty"` - Url *string `json:"Url,omitempty"` + // The Type of this Form + FormType *string `json:"FormType,omitempty"` + // Object that contains the available forms for this type. + Forms *map[string]interface{} `json:"Forms,omitempty"` + // The URL to access the forms for this type. + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/verify/v2/model_verify_v2_service.go b/twilio/rest/verify/v2/model_verify_v2_service.go index dc05a79fb..615a3098a 100644 --- a/twilio/rest/verify/v2/model_verify_v2_service.go +++ b/twilio/rest/verify/v2/model_verify_v2_service.go @@ -17,20 +17,36 @@ import ( // VerifyV2Service struct for VerifyV2Service type VerifyV2Service struct { - AccountSid *string `json:"AccountSid,omitempty"` - CodeLength *int32 `json:"CodeLength,omitempty"` - CustomCodeEnabled *bool `json:"CustomCodeEnabled,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - DoNotShareWarningEnabled *bool `json:"DoNotShareWarningEnabled,omitempty"` - DtmfInputRequired *bool `json:"DtmfInputRequired,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - LookupEnabled *bool `json:"LookupEnabled,omitempty"` - Psd2Enabled *bool `json:"Psd2Enabled,omitempty"` - Push *map[string]interface{} `json:"Push,omitempty"` - Sid *string `json:"Sid,omitempty"` - SkipSmsToLandlines *bool `json:"SkipSmsToLandlines,omitempty"` - TtsName *string `json:"TtsName,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The length of the verification code + CodeLength *int32 `json:"CodeLength,omitempty"` + // Whether to allow sending verifications with a custom code. + CustomCodeEnabled *bool `json:"CustomCodeEnabled,omitempty"` + // The RFC 2822 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // Whether to add a security warning at the end of an SMS. + DoNotShareWarningEnabled *bool `json:"DoNotShareWarningEnabled,omitempty"` + // Whether to ask the user to press a number before delivering the verify code in a phone call + DtmfInputRequired *bool `json:"DtmfInputRequired,omitempty"` + // The string that you assigned to describe the verification service + FriendlyName *string `json:"FriendlyName,omitempty"` + // The URLs of related resources + Links *map[string]interface{} `json:"Links,omitempty"` + // Whether to perform a lookup with each verification + LookupEnabled *bool `json:"LookupEnabled,omitempty"` + // Whether to pass PSD2 transaction parameters when starting a verification + Psd2Enabled *bool `json:"Psd2Enabled,omitempty"` + // The service level configuration of factor push type. + Push *map[string]interface{} `json:"Push,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // Whether to skip sending SMS verifications to landlines + SkipSmsToLandlines *bool `json:"SkipSmsToLandlines,omitempty"` + // The name of an alternative text-to-speech service to use in phone calls + TtsName *string `json:"TtsName,omitempty"` + // The absolute URL of the resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/verify/v2/model_verify_v2_service_access_token.go b/twilio/rest/verify/v2/model_verify_v2_service_access_token.go index 6cfdfc1c9..d9ac6a72d 100644 --- a/twilio/rest/verify/v2/model_verify_v2_service_access_token.go +++ b/twilio/rest/verify/v2/model_verify_v2_service_access_token.go @@ -13,5 +13,6 @@ package openapi // VerifyV2ServiceAccessToken struct for VerifyV2ServiceAccessToken type VerifyV2ServiceAccessToken struct { + // Generated access token. Token *string `json:"Token,omitempty"` } diff --git a/twilio/rest/verify/v2/model_verify_v2_service_entity.go b/twilio/rest/verify/v2/model_verify_v2_service_entity.go index 3a556d1ff..bbba7c3ac 100644 --- a/twilio/rest/verify/v2/model_verify_v2_service_entity.go +++ b/twilio/rest/verify/v2/model_verify_v2_service_entity.go @@ -17,12 +17,20 @@ import ( // VerifyV2ServiceEntity struct for VerifyV2ServiceEntity type VerifyV2ServiceEntity struct { - AccountSid *string `json:"AccountSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Identity *string `json:"Identity,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` + // Account Sid. + AccountSid *string `json:"AccountSid,omitempty"` + // The date this Entity was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The date this Entity was updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // Unique external identifier of the Entity + Identity *string `json:"Identity,omitempty"` + // Nested resource URLs. + Links *map[string]interface{} `json:"Links,omitempty"` + // Service Sid. + ServiceSid *string `json:"ServiceSid,omitempty"` + // A string that uniquely identifies this Entity. + Sid *string `json:"Sid,omitempty"` + // The URL of this resource. + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/verify/v2/model_verify_v2_service_entity_challenge.go b/twilio/rest/verify/v2/model_verify_v2_service_entity_challenge.go index 8d99e130f..f61392beb 100644 --- a/twilio/rest/verify/v2/model_verify_v2_service_entity_challenge.go +++ b/twilio/rest/verify/v2/model_verify_v2_service_entity_challenge.go @@ -17,20 +17,36 @@ import ( // VerifyV2ServiceEntityChallenge struct for VerifyV2ServiceEntityChallenge type VerifyV2ServiceEntityChallenge struct { - AccountSid *string `json:"AccountSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateResponded *time.Time `json:"DateResponded,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Details *map[string]interface{} `json:"Details,omitempty"` - EntitySid *string `json:"EntitySid,omitempty"` - ExpirationDate *time.Time `json:"ExpirationDate,omitempty"` - FactorSid *string `json:"FactorSid,omitempty"` - FactorType *ChallengeFactorTypes `json:"FactorType,omitempty"` - HiddenDetails *map[string]interface{} `json:"HiddenDetails,omitempty"` - Identity *string `json:"Identity,omitempty"` - RespondedReason *ChallengeChallengeReasons `json:"RespondedReason,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Status *ChallengeChallengeStatuses `json:"Status,omitempty"` - Url *string `json:"Url,omitempty"` + // Account Sid. + AccountSid *string `json:"AccountSid,omitempty"` + // The date this Challenge was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The date this Challenge was responded + DateResponded *time.Time `json:"DateResponded,omitempty"` + // The date this Challenge was updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // Details about the Challenge. + Details *map[string]interface{} `json:"Details,omitempty"` + // Entity Sid. + EntitySid *string `json:"EntitySid,omitempty"` + // The date-time when this Challenge expires + ExpirationDate *time.Time `json:"ExpirationDate,omitempty"` + // Factor Sid. + FactorSid *string `json:"FactorSid,omitempty"` + // The Factor Type of this Challenge + FactorType *string `json:"FactorType,omitempty"` + // Hidden details about the Challenge + HiddenDetails *map[string]interface{} `json:"HiddenDetails,omitempty"` + // Unique external identifier of the Entity + Identity *string `json:"Identity,omitempty"` + // The Reason of this Challenge `status` + RespondedReason *string `json:"RespondedReason,omitempty"` + // Service Sid. + ServiceSid *string `json:"ServiceSid,omitempty"` + // A string that uniquely identifies this Challenge. + Sid *string `json:"Sid,omitempty"` + // The Status of this Challenge + Status *string `json:"Status,omitempty"` + // The URL of this resource. + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/verify/v2/model_verify_v2_service_entity_factor.go b/twilio/rest/verify/v2/model_verify_v2_service_entity_factor.go index a17568b35..6ffc37406 100644 --- a/twilio/rest/verify/v2/model_verify_v2_service_entity_factor.go +++ b/twilio/rest/verify/v2/model_verify_v2_service_entity_factor.go @@ -17,16 +17,28 @@ import ( // VerifyV2ServiceEntityFactor struct for VerifyV2ServiceEntityFactor type VerifyV2ServiceEntityFactor struct { - AccountSid *string `json:"AccountSid,omitempty"` - Config *map[string]interface{} `json:"Config,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - EntitySid *string `json:"EntitySid,omitempty"` - FactorType *FactorFactorTypes `json:"FactorType,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Identity *string `json:"Identity,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Status *FactorFactorStatuses `json:"Status,omitempty"` - Url *string `json:"Url,omitempty"` + // Account Sid. + AccountSid *string `json:"AccountSid,omitempty"` + // Configurations for a `factor_type`. + Config *map[string]interface{} `json:"Config,omitempty"` + // The date this Factor was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The date this Factor was updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // Entity Sid. + EntitySid *string `json:"EntitySid,omitempty"` + // The Type of this Factor + FactorType *string `json:"FactorType,omitempty"` + // A human readable description of this resource. + FriendlyName *string `json:"FriendlyName,omitempty"` + // Unique external identifier of the Entity + Identity *string `json:"Identity,omitempty"` + // Service Sid. + ServiceSid *string `json:"ServiceSid,omitempty"` + // A string that uniquely identifies this Factor. + Sid *string `json:"Sid,omitempty"` + // The Status of this Factor + Status *string `json:"Status,omitempty"` + // The URL of this resource. + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/verify/v2/model_verify_v2_service_messaging_configuration.go b/twilio/rest/verify/v2/model_verify_v2_service_messaging_configuration.go index 0e3f87829..f9ab31337 100644 --- a/twilio/rest/verify/v2/model_verify_v2_service_messaging_configuration.go +++ b/twilio/rest/verify/v2/model_verify_v2_service_messaging_configuration.go @@ -17,11 +17,18 @@ import ( // VerifyV2ServiceMessagingConfiguration struct for VerifyV2ServiceMessagingConfiguration type VerifyV2ServiceMessagingConfiguration struct { - AccountSid *string `json:"AccountSid,omitempty"` - Country *string `json:"Country,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - MessagingServiceSid *string `json:"MessagingServiceSid,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The ISO-3166-1 country code of the country or `all`. + Country *string `json:"Country,omitempty"` + // The RFC 2822 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The SID of the Messaging Service used for this configuration. + MessagingServiceSid *string `json:"MessagingServiceSid,omitempty"` + // The SID of the Service that the resource is associated with + ServiceSid *string `json:"ServiceSid,omitempty"` + // The URL of this resource. + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/verify/v2/model_verify_v2_service_rate_limit.go b/twilio/rest/verify/v2/model_verify_v2_service_rate_limit.go index 1cacc5fb0..d81665816 100644 --- a/twilio/rest/verify/v2/model_verify_v2_service_rate_limit.go +++ b/twilio/rest/verify/v2/model_verify_v2_service_rate_limit.go @@ -17,13 +17,22 @@ import ( // VerifyV2ServiceRateLimit struct for VerifyV2ServiceRateLimit type VerifyV2ServiceRateLimit struct { - AccountSid *string `json:"AccountSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Description *string `json:"Description,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The RFC 2822 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // Description of this Rate Limit + Description *string `json:"Description,omitempty"` + // The URLs of related resources + Links *map[string]interface{} `json:"Links,omitempty"` + // The SID of the Service that the resource is associated with + ServiceSid *string `json:"ServiceSid,omitempty"` + // A string that uniquely identifies this Rate Limit. + Sid *string `json:"Sid,omitempty"` + // A unique, developer assigned name of this Rate Limit. + UniqueName *string `json:"UniqueName,omitempty"` + // The URL of this resource. + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/verify/v2/model_verify_v2_service_rate_limit_bucket.go b/twilio/rest/verify/v2/model_verify_v2_service_rate_limit_bucket.go index 666f2ca18..8c1e7cd2a 100644 --- a/twilio/rest/verify/v2/model_verify_v2_service_rate_limit_bucket.go +++ b/twilio/rest/verify/v2/model_verify_v2_service_rate_limit_bucket.go @@ -17,13 +17,22 @@ import ( // VerifyV2ServiceRateLimitBucket struct for VerifyV2ServiceRateLimitBucket type VerifyV2ServiceRateLimitBucket struct { - AccountSid *string `json:"AccountSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Interval *int32 `json:"Interval,omitempty"` - Max *int32 `json:"Max,omitempty"` - RateLimitSid *string `json:"RateLimitSid,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The RFC 2822 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // Number of seconds that the rate limit will be enforced over. + Interval *int32 `json:"Interval,omitempty"` + // Max number of requests. + Max *int32 `json:"Max,omitempty"` + // Rate Limit Sid. + RateLimitSid *string `json:"RateLimitSid,omitempty"` + // The SID of the Service that the resource is associated with + ServiceSid *string `json:"ServiceSid,omitempty"` + // A string that uniquely identifies this Bucket. + Sid *string `json:"Sid,omitempty"` + // The URL of this resource. + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/verify/v2/model_verify_v2_service_verification.go b/twilio/rest/verify/v2/model_verify_v2_service_verification.go index 93fea0e48..5c95ac235 100644 --- a/twilio/rest/verify/v2/model_verify_v2_service_verification.go +++ b/twilio/rest/verify/v2/model_verify_v2_service_verification.go @@ -17,18 +17,32 @@ import ( // VerifyV2ServiceVerification struct for VerifyV2ServiceVerification type VerifyV2ServiceVerification struct { - AccountSid *string `json:"AccountSid,omitempty"` - Amount *string `json:"Amount,omitempty"` - Channel *VerificationChannel `json:"Channel,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Lookup *map[string]interface{} `json:"Lookup,omitempty"` - Payee *string `json:"Payee,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The amount of the associated PSD2 compliant transaction. + Amount *string `json:"Amount,omitempty"` + // The verification method used. + Channel *string `json:"Channel,omitempty"` + // The RFC 2822 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // Information about the phone number being verified + Lookup *map[string]interface{} `json:"Lookup,omitempty"` + // The payee of the associated PSD2 compliant transaction + Payee *string `json:"Payee,omitempty"` + // An array of verification attempt objects. SendCodeAttempts *[]map[string]interface{} `json:"SendCodeAttempts,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Status *string `json:"Status,omitempty"` - To *string `json:"To,omitempty"` - Url *string `json:"Url,omitempty"` - Valid *bool `json:"Valid,omitempty"` + // The SID of the Service that the resource is associated with + ServiceSid *string `json:"ServiceSid,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The status of the verification resource + Status *string `json:"Status,omitempty"` + // The phone number or email being verified + To *string `json:"To,omitempty"` + // The absolute URL of the Verification resource + Url *string `json:"Url,omitempty"` + // Whether the verification was successful + Valid *bool `json:"Valid,omitempty"` } diff --git a/twilio/rest/verify/v2/model_verify_v2_service_verification_check.go b/twilio/rest/verify/v2/model_verify_v2_service_verification_check.go index 41af38c7d..3b12c77cb 100644 --- a/twilio/rest/verify/v2/model_verify_v2_service_verification_check.go +++ b/twilio/rest/verify/v2/model_verify_v2_service_verification_check.go @@ -17,15 +17,26 @@ import ( // VerifyV2ServiceVerificationCheck struct for VerifyV2ServiceVerificationCheck type VerifyV2ServiceVerificationCheck struct { - AccountSid *string `json:"AccountSid,omitempty"` - Amount *string `json:"Amount,omitempty"` - Channel *VerificationCheckChannel `json:"Channel,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Payee *string `json:"Payee,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Status *string `json:"Status,omitempty"` - To *string `json:"To,omitempty"` - Valid *bool `json:"Valid,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The amount of the associated PSD2 compliant transaction. + Amount *string `json:"Amount,omitempty"` + // The verification method to use + Channel *string `json:"Channel,omitempty"` + // The ISO 8601 date and time in GMT when the Verification Check resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the Verification Check resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The payee of the associated PSD2 compliant transaction + Payee *string `json:"Payee,omitempty"` + // The SID of the Service that the resource is associated with + ServiceSid *string `json:"ServiceSid,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The status of the verification resource + Status *string `json:"Status,omitempty"` + // The phone number or email being verified + To *string `json:"To,omitempty"` + // Whether the verification was successful + Valid *bool `json:"Valid,omitempty"` } diff --git a/twilio/rest/verify/v2/model_verify_v2_service_webhook.go b/twilio/rest/verify/v2/model_verify_v2_service_webhook.go index df4d0b7d6..851842c79 100644 --- a/twilio/rest/verify/v2/model_verify_v2_service_webhook.go +++ b/twilio/rest/verify/v2/model_verify_v2_service_webhook.go @@ -17,15 +17,26 @@ import ( // VerifyV2ServiceWebhook struct for VerifyV2ServiceWebhook type VerifyV2ServiceWebhook struct { - AccountSid *string `json:"AccountSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - EventTypes *[]string `json:"EventTypes,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Status *WebhookStatus `json:"Status,omitempty"` - Url *string `json:"Url,omitempty"` - WebhookMethod *WebhookMethods `json:"WebhookMethod,omitempty"` - WebhookUrl *string `json:"WebhookUrl,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The RFC 2822 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The array of events that this Webhook is subscribed to. + EventTypes *[]string `json:"EventTypes,omitempty"` + // The string that you assigned to describe the webhook + FriendlyName *string `json:"FriendlyName,omitempty"` + // Service Sid. + ServiceSid *string `json:"ServiceSid,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The webhook status + Status *string `json:"Status,omitempty"` + // The absolute URL of the Webhook resource + Url *string `json:"Url,omitempty"` + // The method used when calling the webhook's URL. + WebhookMethod *string `json:"WebhookMethod,omitempty"` + // The URL associated with this Webhook. + WebhookUrl *string `json:"WebhookUrl,omitempty"` } diff --git a/twilio/rest/verify/v2/model_verify_v2_verification_attempt.go b/twilio/rest/verify/v2/model_verify_v2_verification_attempt.go index 3bda7b211..5c0d53a10 100644 --- a/twilio/rest/verify/v2/model_verify_v2_verification_attempt.go +++ b/twilio/rest/verify/v2/model_verify_v2_verification_attempt.go @@ -17,13 +17,20 @@ import ( // VerifyV2VerificationAttempt struct for VerifyV2VerificationAttempt type VerifyV2VerificationAttempt struct { - AccountSid *string `json:"AccountSid,omitempty"` - Channel *VerificationAttemptChannels `json:"Channel,omitempty"` - ChannelData *map[string]interface{} `json:"ChannelData,omitempty"` - ConversionStatus *VerificationAttemptConversionStatus `json:"ConversionStatus,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` + // Account Sid + AccountSid *string `json:"AccountSid,omitempty"` + // Channel used for the attempt + Channel *string `json:"Channel,omitempty"` + // Object with the channel information for an attempt + ChannelData *map[string]interface{} `json:"ChannelData,omitempty"` + // Status of a conversion + ConversionStatus *string `json:"ConversionStatus,omitempty"` + // The date this Attempt was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The date this Attempt was updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + ServiceSid *string `json:"ServiceSid,omitempty"` + // A string that uniquely identifies this Verification Attempt + Sid *string `json:"Sid,omitempty"` + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/video/v1/README.md b/twilio/rest/video/v1/README.md index 329d9da63..676e1424f 100644 --- a/twilio/rest/video/v1/README.md +++ b/twilio/rest/video/v1/README.md @@ -69,10 +69,6 @@ Class | Method | HTTP request | Description ## Documentation For Models - - [CompositionFormat](docs/CompositionFormat.md) - - [CompositionHookFormat](docs/CompositionHookFormat.md) - - [CompositionStatus](docs/CompositionStatus.md) - - [HttpMethod](docs/HttpMethod.md) - [ListCompositionHookResponse](docs/ListCompositionHookResponse.md) - [ListCompositionHookResponseMeta](docs/ListCompositionHookResponseMeta.md) - [ListCompositionResponse](docs/ListCompositionResponse.md) @@ -82,19 +78,6 @@ Class | Method | HTTP request | Description - [ListRoomParticipantSubscribedTrackResponse](docs/ListRoomParticipantSubscribedTrackResponse.md) - [ListRoomRecordingResponse](docs/ListRoomRecordingResponse.md) - [ListRoomResponse](docs/ListRoomResponse.md) - - [RecordingCodec](docs/RecordingCodec.md) - - [RecordingFormat](docs/RecordingFormat.md) - - [RecordingStatus](docs/RecordingStatus.md) - - [RecordingType](docs/RecordingType.md) - - [RoomParticipantPublishedTrackKind](docs/RoomParticipantPublishedTrackKind.md) - - [RoomParticipantStatus](docs/RoomParticipantStatus.md) - - [RoomParticipantSubscribedTrackKind](docs/RoomParticipantSubscribedTrackKind.md) - - [RoomRecordingCodec](docs/RoomRecordingCodec.md) - - [RoomRecordingFormat](docs/RoomRecordingFormat.md) - - [RoomRecordingStatus](docs/RoomRecordingStatus.md) - - [RoomRecordingType](docs/RoomRecordingType.md) - - [RoomRoomStatus](docs/RoomRoomStatus.md) - - [RoomRoomType](docs/RoomRoomType.md) - [VideoV1Composition](docs/VideoV1Composition.md) - [VideoV1CompositionHook](docs/VideoV1CompositionHook.md) - [VideoV1CompositionSettings](docs/VideoV1CompositionSettings.md) @@ -107,6 +90,7 @@ Class | Method | HTTP request | Description - [VideoV1RoomRoomParticipantRoomParticipantSubscribedTrack](docs/VideoV1RoomRoomParticipantRoomParticipantSubscribedTrack.md) - [VideoV1RoomRoomRecording](docs/VideoV1RoomRoomRecording.md) - [VideoV1RoomRoomRecordingRule](docs/VideoV1RoomRoomRecordingRule.md) + - [VideoV1RoomRoomRecordingRuleRules](docs/VideoV1RoomRoomRecordingRuleRules.md) ## Documentation For Authorization diff --git a/twilio/rest/video/v1/docs/ListCompositionHookResponse.md b/twilio/rest/video/v1/docs/ListCompositionHookResponse.md index f42b7f46b..9a5267522 100644 --- a/twilio/rest/video/v1/docs/ListCompositionHookResponse.md +++ b/twilio/rest/video/v1/docs/ListCompositionHookResponse.md @@ -1,10 +1,10 @@ # ListCompositionHookResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**CompositionHooks** | [**[]VideoV1CompositionHook**](video.v1.composition_hook.md) | [optional] -**Meta** | [**ListCompositionHookResponseMeta**](ListCompositionHookResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CompositionHooks** | [**[]VideoV1CompositionHook**](video.v1.composition_hook.md) | |[optional] +**Meta** | [**ListCompositionHookResponseMeta**](ListCompositionHookResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/video/v1/docs/ListCompositionHookResponseMeta.md b/twilio/rest/video/v1/docs/ListCompositionHookResponseMeta.md index 6f48dd60b..5ac900941 100644 --- a/twilio/rest/video/v1/docs/ListCompositionHookResponseMeta.md +++ b/twilio/rest/video/v1/docs/ListCompositionHookResponseMeta.md @@ -1,15 +1,15 @@ # ListCompositionHookResponseMeta ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**FirstPageUrl** | **string** | [optional] -**Key** | **string** | [optional] -**NextPageUrl** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUrl** | **string** | [optional] -**Url** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstPageUrl** | **string** | |[optional] +**Key** | **string** | |[optional] +**NextPageUrl** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUrl** | **string** | |[optional] +**Url** | **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/twilio/rest/video/v1/docs/ListCompositionResponse.md b/twilio/rest/video/v1/docs/ListCompositionResponse.md index 5fae2e3a5..24c62f1ca 100644 --- a/twilio/rest/video/v1/docs/ListCompositionResponse.md +++ b/twilio/rest/video/v1/docs/ListCompositionResponse.md @@ -1,10 +1,10 @@ # ListCompositionResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Compositions** | [**[]VideoV1Composition**](video.v1.composition.md) | [optional] -**Meta** | [**ListCompositionHookResponseMeta**](ListCompositionHookResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Compositions** | [**[]VideoV1Composition**](video.v1.composition.md) | |[optional] +**Meta** | [**ListCompositionHookResponseMeta**](ListCompositionHookResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/video/v1/docs/ListRecordingResponse.md b/twilio/rest/video/v1/docs/ListRecordingResponse.md index f8cbd6649..59f484f21 100644 --- a/twilio/rest/video/v1/docs/ListRecordingResponse.md +++ b/twilio/rest/video/v1/docs/ListRecordingResponse.md @@ -1,10 +1,10 @@ # ListRecordingResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListCompositionHookResponseMeta**](ListCompositionHookResponse_meta.md) | [optional] -**Recordings** | [**[]VideoV1Recording**](video.v1.recording.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListCompositionHookResponseMeta**](ListCompositionHookResponse_meta.md) | |[optional] +**Recordings** | [**[]VideoV1Recording**](video.v1.recording.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/video/v1/docs/ListRoomParticipantPublishedTrackResponse.md b/twilio/rest/video/v1/docs/ListRoomParticipantPublishedTrackResponse.md index 80080c06c..0f1c81ce7 100644 --- a/twilio/rest/video/v1/docs/ListRoomParticipantPublishedTrackResponse.md +++ b/twilio/rest/video/v1/docs/ListRoomParticipantPublishedTrackResponse.md @@ -1,10 +1,10 @@ # ListRoomParticipantPublishedTrackResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListCompositionHookResponseMeta**](ListCompositionHookResponse_meta.md) | [optional] -**PublishedTracks** | [**[]VideoV1RoomRoomParticipantRoomParticipantPublishedTrack**](video.v1.room.room_participant.room_participant_published_track.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListCompositionHookResponseMeta**](ListCompositionHookResponse_meta.md) | |[optional] +**PublishedTracks** | [**[]VideoV1RoomRoomParticipantRoomParticipantPublishedTrack**](video.v1.room.room_participant.room_participant_published_track.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/video/v1/docs/ListRoomParticipantResponse.md b/twilio/rest/video/v1/docs/ListRoomParticipantResponse.md index f5760a6db..522d0cb20 100644 --- a/twilio/rest/video/v1/docs/ListRoomParticipantResponse.md +++ b/twilio/rest/video/v1/docs/ListRoomParticipantResponse.md @@ -1,10 +1,10 @@ # ListRoomParticipantResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListCompositionHookResponseMeta**](ListCompositionHookResponse_meta.md) | [optional] -**Participants** | [**[]VideoV1RoomRoomParticipant**](video.v1.room.room_participant.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListCompositionHookResponseMeta**](ListCompositionHookResponse_meta.md) | |[optional] +**Participants** | [**[]VideoV1RoomRoomParticipant**](video.v1.room.room_participant.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/video/v1/docs/ListRoomParticipantSubscribedTrackResponse.md b/twilio/rest/video/v1/docs/ListRoomParticipantSubscribedTrackResponse.md index f43d76bbb..1fc3f62db 100644 --- a/twilio/rest/video/v1/docs/ListRoomParticipantSubscribedTrackResponse.md +++ b/twilio/rest/video/v1/docs/ListRoomParticipantSubscribedTrackResponse.md @@ -1,10 +1,10 @@ # ListRoomParticipantSubscribedTrackResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListCompositionHookResponseMeta**](ListCompositionHookResponse_meta.md) | [optional] -**SubscribedTracks** | [**[]VideoV1RoomRoomParticipantRoomParticipantSubscribedTrack**](video.v1.room.room_participant.room_participant_subscribed_track.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListCompositionHookResponseMeta**](ListCompositionHookResponse_meta.md) | |[optional] +**SubscribedTracks** | [**[]VideoV1RoomRoomParticipantRoomParticipantSubscribedTrack**](video.v1.room.room_participant.room_participant_subscribed_track.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/video/v1/docs/ListRoomRecordingResponse.md b/twilio/rest/video/v1/docs/ListRoomRecordingResponse.md index e44187ab8..5ce6da255 100644 --- a/twilio/rest/video/v1/docs/ListRoomRecordingResponse.md +++ b/twilio/rest/video/v1/docs/ListRoomRecordingResponse.md @@ -1,10 +1,10 @@ # ListRoomRecordingResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListCompositionHookResponseMeta**](ListCompositionHookResponse_meta.md) | [optional] -**Recordings** | [**[]VideoV1RoomRoomRecording**](video.v1.room.room_recording.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListCompositionHookResponseMeta**](ListCompositionHookResponse_meta.md) | |[optional] +**Recordings** | [**[]VideoV1RoomRoomRecording**](video.v1.room.room_recording.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/video/v1/docs/ListRoomResponse.md b/twilio/rest/video/v1/docs/ListRoomResponse.md index be7ffcd1f..770fd2ef7 100644 --- a/twilio/rest/video/v1/docs/ListRoomResponse.md +++ b/twilio/rest/video/v1/docs/ListRoomResponse.md @@ -1,10 +1,10 @@ # ListRoomResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListCompositionHookResponseMeta**](ListCompositionHookResponse_meta.md) | [optional] -**Rooms** | [**[]VideoV1Room**](video.v1.room.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListCompositionHookResponseMeta**](ListCompositionHookResponse_meta.md) | |[optional] +**Rooms** | [**[]VideoV1Room**](video.v1.room.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/video/v1/docs/VideoV1Composition.md b/twilio/rest/video/v1/docs/VideoV1Composition.md index 06e2afab3..6b7c08f54 100644 --- a/twilio/rest/video/v1/docs/VideoV1Composition.md +++ b/twilio/rest/video/v1/docs/VideoV1Composition.md @@ -1,26 +1,26 @@ # VideoV1Composition ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**AudioSources** | Pointer to **[]string** | -**AudioSourcesExcluded** | Pointer to **[]string** | -**Bitrate** | Pointer to **int32** | -**DateCompleted** | Pointer to [**time.Time**](time.Time.md) | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateDeleted** | Pointer to [**time.Time**](time.Time.md) | -**Duration** | Pointer to **int32** | -**Format** | Pointer to [**CompositionFormat**](composition_format.md) | -**Links** | Pointer to **map[string]interface{}** | -**Resolution** | Pointer to **string** | -**RoomSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Size** | Pointer to **int32** | -**Status** | Pointer to [**CompositionStatus**](composition_status.md) | -**Trim** | Pointer to **bool** | -**Url** | Pointer to **string** | -**VideoLayout** | Pointer to **map[string]interface{}** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**AudioSources** | Pointer to **[]string** | The array of track names to include in the composition | +**AudioSourcesExcluded** | Pointer to **[]string** | The array of track names to exclude from the composition | +**Bitrate** | Pointer to **int32** | The average bit rate of the composition's media | +**DateCompleted** | Pointer to [**time.Time**](time.Time.md) | Date when the media processing task finished | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**DateDeleted** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the composition generated media was deleted | +**Duration** | Pointer to **int32** | The duration of the composition's media file in seconds | +**Format** | Pointer to **string** | The container format of the composition's media files as specified in the POST request that created the Composition resource | +**Links** | Pointer to **map[string]interface{}** | The URL of the media file associated with the composition | +**Resolution** | Pointer to **string** | The dimensions of the video image in pixels expressed as columns (width) and rows (height) | +**RoomSid** | Pointer to **string** | The SID of the Group Room that generated the audio and video tracks used in the composition | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Size** | Pointer to **int32** | The size of the composed media file in bytes | +**Status** | Pointer to **string** | The status of the composition | +**Trim** | Pointer to **bool** | Whether to remove intervals with no media | +**Url** | Pointer to **string** | The absolute URL of the resource | +**VideoLayout** | Pointer to **map[string]interface{}** | An object that describes the video layout of the composition | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/video/v1/docs/VideoV1CompositionHook.md b/twilio/rest/video/v1/docs/VideoV1CompositionHook.md index 971073d28..78cf92522 100644 --- a/twilio/rest/video/v1/docs/VideoV1CompositionHook.md +++ b/twilio/rest/video/v1/docs/VideoV1CompositionHook.md @@ -1,23 +1,23 @@ # VideoV1CompositionHook ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**AudioSources** | Pointer to **[]string** | -**AudioSourcesExcluded** | Pointer to **[]string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**Enabled** | Pointer to **bool** | -**Format** | Pointer to [**CompositionHookFormat**](composition_hook_format.md) | -**FriendlyName** | Pointer to **string** | -**Resolution** | Pointer to **string** | -**Sid** | Pointer to **string** | -**StatusCallback** | Pointer to **string** | -**StatusCallbackMethod** | Pointer to [**HttpMethod**](http_method.md) | -**Trim** | Pointer to **bool** | -**Url** | Pointer to **string** | -**VideoLayout** | Pointer to **map[string]interface{}** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**AudioSources** | Pointer to **[]string** | The array of track names to include in the compositions created by the composition hook | +**AudioSourcesExcluded** | Pointer to **[]string** | The array of track names to exclude from the compositions created by the composition hook | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was last updated | +**Enabled** | Pointer to **bool** | Whether the CompositionHook is active | +**Format** | Pointer to **string** | The container format of the media files used by the compositions created by the composition hook | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the resource | +**Resolution** | Pointer to **string** | The dimensions of the video image in pixels expressed as columns (width) and rows (height) | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**StatusCallback** | Pointer to **string** | The URL to send status information to your application | +**StatusCallbackMethod** | Pointer to **string** | The HTTP method we should use to call status_callback | +**Trim** | Pointer to **bool** | Whether intervals with no media are clipped | +**Url** | Pointer to **string** | The absolute URL of the resource | +**VideoLayout** | Pointer to **map[string]interface{}** | A JSON object that describes the video layout of the Composition | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/video/v1/docs/VideoV1CompositionSettings.md b/twilio/rest/video/v1/docs/VideoV1CompositionSettings.md index 2f2adc27f..b858a3a4c 100644 --- a/twilio/rest/video/v1/docs/VideoV1CompositionSettings.md +++ b/twilio/rest/video/v1/docs/VideoV1CompositionSettings.md @@ -1,16 +1,16 @@ # VideoV1CompositionSettings ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**AwsCredentialsSid** | Pointer to **string** | -**AwsS3Url** | Pointer to **string** | -**AwsStorageEnabled** | Pointer to **bool** | -**EncryptionEnabled** | Pointer to **bool** | -**EncryptionKeySid** | Pointer to **string** | -**FriendlyName** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**AwsCredentialsSid** | Pointer to **string** | The SID of the stored Credential resource | +**AwsS3Url** | Pointer to **string** | The URL of the AWS S3 bucket where the compositions are stored | +**AwsStorageEnabled** | Pointer to **bool** | Whether all compositions are written to the aws_s3_url | +**EncryptionEnabled** | Pointer to **bool** | Whether all compositions are stored in an encrypted form | +**EncryptionKeySid** | Pointer to **string** | The SID of the Public Key resource used for encryption | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the resource | +**Url** | Pointer to **string** | The absolute URL of the resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/video/v1/docs/VideoV1Recording.md b/twilio/rest/video/v1/docs/VideoV1Recording.md index ae481ee3a..9df361539 100644 --- a/twilio/rest/video/v1/docs/VideoV1Recording.md +++ b/twilio/rest/video/v1/docs/VideoV1Recording.md @@ -1,23 +1,23 @@ # VideoV1Recording ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Codec** | Pointer to [**RecordingCodec**](recording_codec.md) | -**ContainerFormat** | Pointer to [**RecordingFormat**](recording_format.md) | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**Duration** | Pointer to **int32** | -**GroupingSids** | Pointer to **map[string]interface{}** | -**Links** | Pointer to **map[string]interface{}** | -**Offset** | Pointer to **int32** | -**Sid** | Pointer to **string** | -**Size** | Pointer to **int32** | -**SourceSid** | Pointer to **string** | -**Status** | Pointer to [**RecordingStatus**](recording_status.md) | -**TrackName** | Pointer to **string** | -**Type** | Pointer to [**RecordingType**](recording_type.md) | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**Codec** | Pointer to **string** | The codec used to encode the track | +**ContainerFormat** | Pointer to **string** | The file format for the recording | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**Duration** | Pointer to **int32** | The duration of the recording in seconds | +**GroupingSids** | Pointer to **map[string]interface{}** | A list of SIDs related to the recording | +**Links** | Pointer to **map[string]interface{}** | The URLs of related resources | +**Offset** | Pointer to **int32** | The number of milliseconds between a point in time that is common to all rooms in a group and when the source room of the recording started | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Size** | Pointer to **int32** | The size of the recorded track, in bytes | +**SourceSid** | Pointer to **string** | The SID of the recording source | +**Status** | Pointer to **string** | The status of the recording | +**TrackName** | Pointer to **string** | The name that was given to the source track of the recording | +**Type** | Pointer to **string** | The recording's media type | +**Url** | Pointer to **string** | The absolute URL of the resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/video/v1/docs/VideoV1RecordingSettings.md b/twilio/rest/video/v1/docs/VideoV1RecordingSettings.md index f55aee549..7a867689e 100644 --- a/twilio/rest/video/v1/docs/VideoV1RecordingSettings.md +++ b/twilio/rest/video/v1/docs/VideoV1RecordingSettings.md @@ -1,16 +1,16 @@ # VideoV1RecordingSettings ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**AwsCredentialsSid** | Pointer to **string** | -**AwsS3Url** | Pointer to **string** | -**AwsStorageEnabled** | Pointer to **bool** | -**EncryptionEnabled** | Pointer to **bool** | -**EncryptionKeySid** | Pointer to **string** | -**FriendlyName** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**AwsCredentialsSid** | Pointer to **string** | The SID of the stored Credential resource | +**AwsS3Url** | Pointer to **string** | The URL of the AWS S3 bucket where the recordings are stored | +**AwsStorageEnabled** | Pointer to **bool** | Whether all recordings are written to the aws_s3_url | +**EncryptionEnabled** | Pointer to **bool** | Whether all recordings are stored in an encrypted form | +**EncryptionKeySid** | Pointer to **string** | The SID of the Public Key resource used for encryption | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the resource | +**Url** | Pointer to **string** | The absolute URL of the resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/video/v1/docs/VideoV1Room.md b/twilio/rest/video/v1/docs/VideoV1Room.md index 7c9ccab32..85a1ae2a2 100644 --- a/twilio/rest/video/v1/docs/VideoV1Room.md +++ b/twilio/rest/video/v1/docs/VideoV1Room.md @@ -1,27 +1,27 @@ # VideoV1Room ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**Duration** | Pointer to **int32** | -**EnableTurn** | Pointer to **bool** | -**EndTime** | Pointer to [**time.Time**](time.Time.md) | -**Links** | Pointer to **map[string]interface{}** | -**MaxConcurrentPublishedTracks** | Pointer to **int32** | -**MaxParticipants** | Pointer to **int32** | -**MediaRegion** | Pointer to **string** | -**RecordParticipantsOnConnect** | Pointer to **bool** | -**Sid** | Pointer to **string** | -**Status** | Pointer to [**RoomRoomStatus**](room_room_status.md) | -**StatusCallback** | Pointer to **string** | -**StatusCallbackMethod** | Pointer to [**HttpMethod**](http_method.md) | -**Type** | Pointer to [**RoomRoomType**](room_room_type.md) | -**UniqueName** | Pointer to **string** | -**Url** | Pointer to **string** | -**VideoCodecs** | Pointer to **[]string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was last updated | +**Duration** | Pointer to **int32** | The duration of the room in seconds | +**EnableTurn** | Pointer to **bool** | Enable Twilio's Network Traversal TURN service | +**EndTime** | Pointer to [**time.Time**](time.Time.md) | The UTC end time of the room in UTC ISO 8601 format | +**Links** | Pointer to **map[string]interface{}** | The URLs of related resources | +**MaxConcurrentPublishedTracks** | Pointer to **int32** | The maximum number of published tracks allowed in the room at the same time | +**MaxParticipants** | Pointer to **int32** | The maximum number of concurrent Participants allowed in the room | +**MediaRegion** | Pointer to **string** | The region for the media server in Group Rooms | +**RecordParticipantsOnConnect** | Pointer to **bool** | Whether to start recording when Participants connect | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Status** | Pointer to **string** | The status of the room | +**StatusCallback** | Pointer to **string** | The URL to send status information to your application | +**StatusCallbackMethod** | Pointer to **string** | The HTTP method we use to call status_callback | +**Type** | Pointer to **string** | The type of room | +**UniqueName** | Pointer to **string** | An application-defined string that uniquely identifies the resource | +**Url** | Pointer to **string** | The absolute URL of the resource | +**VideoCodecs** | Pointer to **[]string** | An array of the video codecs that are supported when publishing a track in the room | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/video/v1/docs/VideoV1RoomRoomParticipant.md b/twilio/rest/video/v1/docs/VideoV1RoomRoomParticipant.md index 6819e55bf..2e8358290 100644 --- a/twilio/rest/video/v1/docs/VideoV1RoomRoomParticipant.md +++ b/twilio/rest/video/v1/docs/VideoV1RoomRoomParticipant.md @@ -1,20 +1,20 @@ # VideoV1RoomRoomParticipant ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**Duration** | Pointer to **int32** | -**EndTime** | Pointer to [**time.Time**](time.Time.md) | -**Identity** | Pointer to **string** | -**Links** | Pointer to **map[string]interface{}** | -**RoomSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**StartTime** | Pointer to [**time.Time**](time.Time.md) | -**Status** | Pointer to [**RoomParticipantStatus**](room_participant_status.md) | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was last updated | +**Duration** | Pointer to **int32** | Duration of time in seconds the participant was connected | +**EndTime** | Pointer to [**time.Time**](time.Time.md) | The time when the participant disconnected from the room in ISO 8601 format | +**Identity** | Pointer to **string** | The string that identifies the resource's User | +**Links** | Pointer to **map[string]interface{}** | The URLs of related resources | +**RoomSid** | Pointer to **string** | The SID of the participant's room | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**StartTime** | Pointer to [**time.Time**](time.Time.md) | The time of participant connected to the room in ISO 8601 format | +**Status** | Pointer to **string** | The status of the Participant | +**Url** | Pointer to **string** | The absolute URL of the resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/video/v1/docs/VideoV1RoomRoomParticipantRoomParticipantPublishedTrack.md b/twilio/rest/video/v1/docs/VideoV1RoomRoomParticipantRoomParticipantPublishedTrack.md index 5d703f3b3..7f9903dda 100644 --- a/twilio/rest/video/v1/docs/VideoV1RoomRoomParticipantRoomParticipantPublishedTrack.md +++ b/twilio/rest/video/v1/docs/VideoV1RoomRoomParticipantRoomParticipantPublishedTrack.md @@ -1,17 +1,17 @@ # VideoV1RoomRoomParticipantRoomParticipantPublishedTrack ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**Enabled** | Pointer to **bool** | -**Kind** | Pointer to [**RoomParticipantPublishedTrackKind**](room_participant_published_track_kind.md) | -**Name** | Pointer to **string** | -**ParticipantSid** | Pointer to **string** | -**RoomSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was last updated | +**Enabled** | Pointer to **bool** | Whether the track is enabled | +**Kind** | Pointer to **string** | The track type | +**Name** | Pointer to **string** | The track name | +**ParticipantSid** | Pointer to **string** | The SID of the Participant resource with the published track | +**RoomSid** | Pointer to **string** | The SID of the Room resource where the track is published | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Url** | Pointer to **string** | The absolute URL of the resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/video/v1/docs/VideoV1RoomRoomParticipantRoomParticipantSubscribeRule.md b/twilio/rest/video/v1/docs/VideoV1RoomRoomParticipantRoomParticipantSubscribeRule.md index 6c71d979e..f6d8fd65e 100644 --- a/twilio/rest/video/v1/docs/VideoV1RoomRoomParticipantRoomParticipantSubscribeRule.md +++ b/twilio/rest/video/v1/docs/VideoV1RoomRoomParticipantRoomParticipantSubscribeRule.md @@ -1,13 +1,13 @@ # VideoV1RoomRoomParticipantRoomParticipantSubscribeRule ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**ParticipantSid** | Pointer to **string** | -**RoomSid** | Pointer to **string** | -**Rules** | Pointer to **[]map[string]interface{}** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was last updated | +**ParticipantSid** | Pointer to **string** | The SID of the Participant resource for the Subscribe Rules | +**RoomSid** | Pointer to **string** | The SID of the Room resource for the Subscribe Rules | +**Rules** | Pointer to **[]map[string]interface{}** | A collection of Subscribe Rules that describe how to include or exclude matching tracks | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/video/v1/docs/VideoV1RoomRoomParticipantRoomParticipantSubscribedTrack.md b/twilio/rest/video/v1/docs/VideoV1RoomRoomParticipantRoomParticipantSubscribedTrack.md index dce93b88b..beda16905 100644 --- a/twilio/rest/video/v1/docs/VideoV1RoomRoomParticipantRoomParticipantSubscribedTrack.md +++ b/twilio/rest/video/v1/docs/VideoV1RoomRoomParticipantRoomParticipantSubscribedTrack.md @@ -1,18 +1,18 @@ # VideoV1RoomRoomParticipantRoomParticipantSubscribedTrack ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**Enabled** | Pointer to **bool** | -**Kind** | Pointer to [**RoomParticipantSubscribedTrackKind**](room_participant_subscribed_track_kind.md) | -**Name** | Pointer to **string** | -**ParticipantSid** | Pointer to **string** | -**PublisherSid** | Pointer to **string** | -**RoomSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was last updated | +**Enabled** | Pointer to **bool** | Whether the track is enabled | +**Kind** | Pointer to **string** | The track type | +**Name** | Pointer to **string** | The track name | +**ParticipantSid** | Pointer to **string** | The SID of the participant that subscribes to the track | +**PublisherSid** | Pointer to **string** | The SID of the participant that publishes the track | +**RoomSid** | Pointer to **string** | The SID of the room where the track is published | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Url** | Pointer to **string** | The absolute URL of the resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/video/v1/docs/VideoV1RoomRoomRecording.md b/twilio/rest/video/v1/docs/VideoV1RoomRoomRecording.md index 9616c1daf..e7c044439 100644 --- a/twilio/rest/video/v1/docs/VideoV1RoomRoomRecording.md +++ b/twilio/rest/video/v1/docs/VideoV1RoomRoomRecording.md @@ -1,24 +1,24 @@ # VideoV1RoomRoomRecording ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Codec** | Pointer to [**RoomRecordingCodec**](room_recording_codec.md) | -**ContainerFormat** | Pointer to [**RoomRecordingFormat**](room_recording_format.md) | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**Duration** | Pointer to **int32** | -**GroupingSids** | Pointer to **map[string]interface{}** | -**Links** | Pointer to **map[string]interface{}** | -**Offset** | Pointer to **int32** | -**RoomSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Size** | Pointer to **int32** | -**SourceSid** | Pointer to **string** | -**Status** | Pointer to [**RoomRecordingStatus**](room_recording_status.md) | -**TrackName** | Pointer to **string** | -**Type** | Pointer to [**RoomRecordingType**](room_recording_type.md) | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**Codec** | Pointer to **string** | The codec used for the recording | +**ContainerFormat** | Pointer to **string** | The file format for the recording | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**Duration** | Pointer to **int32** | The duration of the recording in seconds | +**GroupingSids** | Pointer to **map[string]interface{}** | A list of SIDs related to the Recording | +**Links** | Pointer to **map[string]interface{}** | The URLs of related resources | +**Offset** | Pointer to **int32** | The number of milliseconds between a point in time that is common to all rooms in a group and when the source room of the recording started | +**RoomSid** | Pointer to **string** | The SID of the Room resource the recording is associated with | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Size** | Pointer to **int32** | The size of the recorded track in bytes | +**SourceSid** | Pointer to **string** | The SID of the recording source | +**Status** | Pointer to **string** | The status of the recording | +**TrackName** | Pointer to **string** | The name that was given to the source track of the recording | +**Type** | Pointer to **string** | The recording's media type | +**Url** | Pointer to **string** | The absolute URL of the resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/video/v1/docs/VideoV1RoomRoomRecordingRule.md b/twilio/rest/video/v1/docs/VideoV1RoomRoomRecordingRule.md index 274735fa2..c1ea80219 100644 --- a/twilio/rest/video/v1/docs/VideoV1RoomRoomRecordingRule.md +++ b/twilio/rest/video/v1/docs/VideoV1RoomRoomRecordingRule.md @@ -1,12 +1,12 @@ # VideoV1RoomRoomRecordingRule ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**RoomSid** | Pointer to **string** | -**Rules** | Pointer to **[]map[string]interface{}** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was last updated | +**RoomSid** | Pointer to **string** | The SID of the Room resource for the Recording Rules | +**Rules** | Pointer to [**[]VideoV1RoomRoomRecordingRuleRules**](video_v1_room_room_recording_rule_rules.md) | A collection of recording Rules that describe how to include or exclude matching tracks for recording | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/video/v1/docs/VideoV1RoomRoomRecordingRuleRules.md b/twilio/rest/video/v1/docs/VideoV1RoomRoomRecordingRuleRules.md new file mode 100644 index 000000000..08a070f57 --- /dev/null +++ b/twilio/rest/video/v1/docs/VideoV1RoomRoomRecordingRuleRules.md @@ -0,0 +1,14 @@ +# VideoV1RoomRoomRecordingRuleRules + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**All** | **bool** | |[optional] +**Kind** | **string** | |[optional] +**Publisher** | **string** | |[optional] +**Track** | **string** | |[optional] +**Type** | **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/twilio/rest/video/v1/model_video_v1_composition.go b/twilio/rest/video/v1/model_video_v1_composition.go index 9aaf5281e..f96603bcb 100644 --- a/twilio/rest/video/v1/model_video_v1_composition.go +++ b/twilio/rest/video/v1/model_video_v1_composition.go @@ -17,22 +17,40 @@ import ( // VideoV1Composition struct for VideoV1Composition type VideoV1Composition struct { - AccountSid *string `json:"AccountSid,omitempty"` - AudioSources *[]string `json:"AudioSources,omitempty"` - AudioSourcesExcluded *[]string `json:"AudioSourcesExcluded,omitempty"` - Bitrate *int32 `json:"Bitrate,omitempty"` - DateCompleted *time.Time `json:"DateCompleted,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateDeleted *time.Time `json:"DateDeleted,omitempty"` - Duration *int32 `json:"Duration,omitempty"` - Format *CompositionFormat `json:"Format,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - Resolution *string `json:"Resolution,omitempty"` - RoomSid *string `json:"RoomSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Size *int32 `json:"Size,omitempty"` - Status *CompositionStatus `json:"Status,omitempty"` - Trim *bool `json:"Trim,omitempty"` - Url *string `json:"Url,omitempty"` - VideoLayout *map[string]interface{} `json:"VideoLayout,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The array of track names to include in the composition + AudioSources *[]string `json:"AudioSources,omitempty"` + // The array of track names to exclude from the composition + AudioSourcesExcluded *[]string `json:"AudioSourcesExcluded,omitempty"` + // The average bit rate of the composition's media + Bitrate *int32 `json:"Bitrate,omitempty"` + // Date when the media processing task finished + DateCompleted *time.Time `json:"DateCompleted,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the composition generated media was deleted + DateDeleted *time.Time `json:"DateDeleted,omitempty"` + // The duration of the composition's media file in seconds + Duration *int32 `json:"Duration,omitempty"` + // The container format of the composition's media files as specified in the POST request that created the Composition resource + Format *string `json:"Format,omitempty"` + // The URL of the media file associated with the composition + Links *map[string]interface{} `json:"Links,omitempty"` + // The dimensions of the video image in pixels expressed as columns (width) and rows (height) + Resolution *string `json:"Resolution,omitempty"` + // The SID of the Group Room that generated the audio and video tracks used in the composition + RoomSid *string `json:"RoomSid,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The size of the composed media file in bytes + Size *int32 `json:"Size,omitempty"` + // The status of the composition + Status *string `json:"Status,omitempty"` + // Whether to remove intervals with no media + Trim *bool `json:"Trim,omitempty"` + // The absolute URL of the resource + Url *string `json:"Url,omitempty"` + // An object that describes the video layout of the composition + VideoLayout *map[string]interface{} `json:"VideoLayout,omitempty"` } diff --git a/twilio/rest/video/v1/model_video_v1_composition_hook.go b/twilio/rest/video/v1/model_video_v1_composition_hook.go index c532877a7..a531e9087 100644 --- a/twilio/rest/video/v1/model_video_v1_composition_hook.go +++ b/twilio/rest/video/v1/model_video_v1_composition_hook.go @@ -17,19 +17,34 @@ import ( // VideoV1CompositionHook struct for VideoV1CompositionHook type VideoV1CompositionHook struct { - AccountSid *string `json:"AccountSid,omitempty"` - AudioSources *[]string `json:"AudioSources,omitempty"` - AudioSourcesExcluded *[]string `json:"AudioSourcesExcluded,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Enabled *bool `json:"Enabled,omitempty"` - Format *CompositionHookFormat `json:"Format,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Resolution *string `json:"Resolution,omitempty"` - Sid *string `json:"Sid,omitempty"` - StatusCallback *string `json:"StatusCallback,omitempty"` - StatusCallbackMethod *HttpMethod `json:"StatusCallbackMethod,omitempty"` - Trim *bool `json:"Trim,omitempty"` - Url *string `json:"Url,omitempty"` - VideoLayout *map[string]interface{} `json:"VideoLayout,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The array of track names to include in the compositions created by the composition hook + AudioSources *[]string `json:"AudioSources,omitempty"` + // The array of track names to exclude from the compositions created by the composition hook + AudioSourcesExcluded *[]string `json:"AudioSourcesExcluded,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // Whether the CompositionHook is active + Enabled *bool `json:"Enabled,omitempty"` + // The container format of the media files used by the compositions created by the composition hook + Format *string `json:"Format,omitempty"` + // The string that you assigned to describe the resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // The dimensions of the video image in pixels expressed as columns (width) and rows (height) + Resolution *string `json:"Resolution,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The URL to send status information to your application + StatusCallback *string `json:"StatusCallback,omitempty"` + // The HTTP method we should use to call status_callback + StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` + // Whether intervals with no media are clipped + Trim *bool `json:"Trim,omitempty"` + // The absolute URL of the resource + Url *string `json:"Url,omitempty"` + // A JSON object that describes the video layout of the Composition + VideoLayout *map[string]interface{} `json:"VideoLayout,omitempty"` } diff --git a/twilio/rest/video/v1/model_video_v1_composition_settings.go b/twilio/rest/video/v1/model_video_v1_composition_settings.go index 1ff46b86f..c1dfbdb26 100644 --- a/twilio/rest/video/v1/model_video_v1_composition_settings.go +++ b/twilio/rest/video/v1/model_video_v1_composition_settings.go @@ -13,12 +13,20 @@ package openapi // VideoV1CompositionSettings struct for VideoV1CompositionSettings type VideoV1CompositionSettings struct { - AccountSid *string `json:"AccountSid,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The SID of the stored Credential resource AwsCredentialsSid *string `json:"AwsCredentialsSid,omitempty"` - AwsS3Url *string `json:"AwsS3Url,omitempty"` - AwsStorageEnabled *bool `json:"AwsStorageEnabled,omitempty"` - EncryptionEnabled *bool `json:"EncryptionEnabled,omitempty"` - EncryptionKeySid *string `json:"EncryptionKeySid,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Url *string `json:"Url,omitempty"` + // The URL of the AWS S3 bucket where the compositions are stored + AwsS3Url *string `json:"AwsS3Url,omitempty"` + // Whether all compositions are written to the aws_s3_url + AwsStorageEnabled *bool `json:"AwsStorageEnabled,omitempty"` + // Whether all compositions are stored in an encrypted form + EncryptionEnabled *bool `json:"EncryptionEnabled,omitempty"` + // The SID of the Public Key resource used for encryption + EncryptionKeySid *string `json:"EncryptionKeySid,omitempty"` + // The string that you assigned to describe the resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // The absolute URL of the resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/video/v1/model_video_v1_recording.go b/twilio/rest/video/v1/model_video_v1_recording.go index 31b1b6fff..e7a69695f 100644 --- a/twilio/rest/video/v1/model_video_v1_recording.go +++ b/twilio/rest/video/v1/model_video_v1_recording.go @@ -17,19 +17,34 @@ import ( // VideoV1Recording struct for VideoV1Recording type VideoV1Recording struct { - AccountSid *string `json:"AccountSid,omitempty"` - Codec *RecordingCodec `json:"Codec,omitempty"` - ContainerFormat *RecordingFormat `json:"ContainerFormat,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - Duration *int32 `json:"Duration,omitempty"` - GroupingSids *map[string]interface{} `json:"GroupingSids,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - Offset *int32 `json:"Offset,omitempty"` - Sid *string `json:"Sid,omitempty"` - Size *int32 `json:"Size,omitempty"` - SourceSid *string `json:"SourceSid,omitempty"` - Status *RecordingStatus `json:"Status,omitempty"` - TrackName *string `json:"TrackName,omitempty"` - Type *RecordingType `json:"Type,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The codec used to encode the track + Codec *string `json:"Codec,omitempty"` + // The file format for the recording + ContainerFormat *string `json:"ContainerFormat,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The duration of the recording in seconds + Duration *int32 `json:"Duration,omitempty"` + // A list of SIDs related to the recording + GroupingSids *map[string]interface{} `json:"GroupingSids,omitempty"` + // The URLs of related resources + Links *map[string]interface{} `json:"Links,omitempty"` + // The number of milliseconds between a point in time that is common to all rooms in a group and when the source room of the recording started + Offset *int32 `json:"Offset,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The size of the recorded track, in bytes + Size *int32 `json:"Size,omitempty"` + // The SID of the recording source + SourceSid *string `json:"SourceSid,omitempty"` + // The status of the recording + Status *string `json:"Status,omitempty"` + // The name that was given to the source track of the recording + TrackName *string `json:"TrackName,omitempty"` + // The recording's media type + Type *string `json:"Type,omitempty"` + // The absolute URL of the resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/video/v1/model_video_v1_recording_settings.go b/twilio/rest/video/v1/model_video_v1_recording_settings.go index e9db3c0bf..b2b309779 100644 --- a/twilio/rest/video/v1/model_video_v1_recording_settings.go +++ b/twilio/rest/video/v1/model_video_v1_recording_settings.go @@ -13,12 +13,20 @@ package openapi // VideoV1RecordingSettings struct for VideoV1RecordingSettings type VideoV1RecordingSettings struct { - AccountSid *string `json:"AccountSid,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The SID of the stored Credential resource AwsCredentialsSid *string `json:"AwsCredentialsSid,omitempty"` - AwsS3Url *string `json:"AwsS3Url,omitempty"` - AwsStorageEnabled *bool `json:"AwsStorageEnabled,omitempty"` - EncryptionEnabled *bool `json:"EncryptionEnabled,omitempty"` - EncryptionKeySid *string `json:"EncryptionKeySid,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Url *string `json:"Url,omitempty"` + // The URL of the AWS S3 bucket where the recordings are stored + AwsS3Url *string `json:"AwsS3Url,omitempty"` + // Whether all recordings are written to the aws_s3_url + AwsStorageEnabled *bool `json:"AwsStorageEnabled,omitempty"` + // Whether all recordings are stored in an encrypted form + EncryptionEnabled *bool `json:"EncryptionEnabled,omitempty"` + // The SID of the Public Key resource used for encryption + EncryptionKeySid *string `json:"EncryptionKeySid,omitempty"` + // The string that you assigned to describe the resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // The absolute URL of the resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/video/v1/model_video_v1_room.go b/twilio/rest/video/v1/model_video_v1_room.go index afb2f37aa..4cbd6421c 100644 --- a/twilio/rest/video/v1/model_video_v1_room.go +++ b/twilio/rest/video/v1/model_video_v1_room.go @@ -17,23 +17,42 @@ import ( // VideoV1Room struct for VideoV1Room type VideoV1Room struct { - AccountSid *string `json:"AccountSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Duration *int32 `json:"Duration,omitempty"` - EnableTurn *bool `json:"EnableTurn,omitempty"` - EndTime *time.Time `json:"EndTime,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - MaxConcurrentPublishedTracks *int32 `json:"MaxConcurrentPublishedTracks,omitempty"` - MaxParticipants *int32 `json:"MaxParticipants,omitempty"` - MediaRegion *string `json:"MediaRegion,omitempty"` - RecordParticipantsOnConnect *bool `json:"RecordParticipantsOnConnect,omitempty"` - Sid *string `json:"Sid,omitempty"` - Status *RoomRoomStatus `json:"Status,omitempty"` - StatusCallback *string `json:"StatusCallback,omitempty"` - StatusCallbackMethod *HttpMethod `json:"StatusCallbackMethod,omitempty"` - Type *RoomRoomType `json:"Type,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` - Url *string `json:"Url,omitempty"` - VideoCodecs *[]string `json:"VideoCodecs,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The duration of the room in seconds + Duration *int32 `json:"Duration,omitempty"` + // Enable Twilio's Network Traversal TURN service + EnableTurn *bool `json:"EnableTurn,omitempty"` + // The UTC end time of the room in UTC ISO 8601 format + EndTime *time.Time `json:"EndTime,omitempty"` + // The URLs of related resources + Links *map[string]interface{} `json:"Links,omitempty"` + // The maximum number of published tracks allowed in the room at the same time + MaxConcurrentPublishedTracks *int32 `json:"MaxConcurrentPublishedTracks,omitempty"` + // The maximum number of concurrent Participants allowed in the room + MaxParticipants *int32 `json:"MaxParticipants,omitempty"` + // The region for the media server in Group Rooms + MediaRegion *string `json:"MediaRegion,omitempty"` + // Whether to start recording when Participants connect + RecordParticipantsOnConnect *bool `json:"RecordParticipantsOnConnect,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The status of the room + Status *string `json:"Status,omitempty"` + // The URL to send status information to your application + StatusCallback *string `json:"StatusCallback,omitempty"` + // The HTTP method we use to call status_callback + StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` + // The type of room + Type *string `json:"Type,omitempty"` + // An application-defined string that uniquely identifies the resource + UniqueName *string `json:"UniqueName,omitempty"` + // The absolute URL of the resource + Url *string `json:"Url,omitempty"` + // An array of the video codecs that are supported when publishing a track in the room + VideoCodecs *[]string `json:"VideoCodecs,omitempty"` } diff --git a/twilio/rest/video/v1/model_video_v1_room_room_participant.go b/twilio/rest/video/v1/model_video_v1_room_room_participant.go index b13d4710b..0a052e2cb 100644 --- a/twilio/rest/video/v1/model_video_v1_room_room_participant.go +++ b/twilio/rest/video/v1/model_video_v1_room_room_participant.go @@ -17,16 +17,28 @@ import ( // VideoV1RoomRoomParticipant struct for VideoV1RoomRoomParticipant type VideoV1RoomRoomParticipant struct { - AccountSid *string `json:"AccountSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Duration *int32 `json:"Duration,omitempty"` - EndTime *time.Time `json:"EndTime,omitempty"` - Identity *string `json:"Identity,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - RoomSid *string `json:"RoomSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - StartTime *time.Time `json:"StartTime,omitempty"` - Status *RoomParticipantStatus `json:"Status,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // Duration of time in seconds the participant was connected + Duration *int32 `json:"Duration,omitempty"` + // The time when the participant disconnected from the room in ISO 8601 format + EndTime *time.Time `json:"EndTime,omitempty"` + // The string that identifies the resource's User + Identity *string `json:"Identity,omitempty"` + // The URLs of related resources + Links *map[string]interface{} `json:"Links,omitempty"` + // The SID of the participant's room + RoomSid *string `json:"RoomSid,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The time of participant connected to the room in ISO 8601 format + StartTime *time.Time `json:"StartTime,omitempty"` + // The status of the Participant + Status *string `json:"Status,omitempty"` + // The absolute URL of the resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/video/v1/model_video_v1_room_room_participant_room_participant_published_track.go b/twilio/rest/video/v1/model_video_v1_room_room_participant_room_participant_published_track.go index 025023571..31354dec0 100644 --- a/twilio/rest/video/v1/model_video_v1_room_room_participant_room_participant_published_track.go +++ b/twilio/rest/video/v1/model_video_v1_room_room_participant_room_participant_published_track.go @@ -17,13 +17,22 @@ import ( // VideoV1RoomRoomParticipantRoomParticipantPublishedTrack struct for VideoV1RoomRoomParticipantRoomParticipantPublishedTrack type VideoV1RoomRoomParticipantRoomParticipantPublishedTrack struct { - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Enabled *bool `json:"Enabled,omitempty"` - Kind *RoomParticipantPublishedTrackKind `json:"Kind,omitempty"` - Name *string `json:"Name,omitempty"` - ParticipantSid *string `json:"ParticipantSid,omitempty"` - RoomSid *string `json:"RoomSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // Whether the track is enabled + Enabled *bool `json:"Enabled,omitempty"` + // The track type + Kind *string `json:"Kind,omitempty"` + // The track name + Name *string `json:"Name,omitempty"` + // The SID of the Participant resource with the published track + ParticipantSid *string `json:"ParticipantSid,omitempty"` + // The SID of the Room resource where the track is published + RoomSid *string `json:"RoomSid,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The absolute URL of the resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/video/v1/model_video_v1_room_room_participant_room_participant_subscribe_rule.go b/twilio/rest/video/v1/model_video_v1_room_room_participant_room_participant_subscribe_rule.go index 2cce39e3d..5da5b600b 100644 --- a/twilio/rest/video/v1/model_video_v1_room_room_participant_room_participant_subscribe_rule.go +++ b/twilio/rest/video/v1/model_video_v1_room_room_participant_room_participant_subscribe_rule.go @@ -17,9 +17,14 @@ import ( // VideoV1RoomRoomParticipantRoomParticipantSubscribeRule struct for VideoV1RoomRoomParticipantRoomParticipantSubscribeRule type VideoV1RoomRoomParticipantRoomParticipantSubscribeRule struct { - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - ParticipantSid *string `json:"ParticipantSid,omitempty"` - RoomSid *string `json:"RoomSid,omitempty"` - Rules *[]map[string]interface{} `json:"Rules,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The SID of the Participant resource for the Subscribe Rules + ParticipantSid *string `json:"ParticipantSid,omitempty"` + // The SID of the Room resource for the Subscribe Rules + RoomSid *string `json:"RoomSid,omitempty"` + // A collection of Subscribe Rules that describe how to include or exclude matching tracks + Rules *[]map[string]interface{} `json:"Rules,omitempty"` } diff --git a/twilio/rest/video/v1/model_video_v1_room_room_participant_room_participant_subscribed_track.go b/twilio/rest/video/v1/model_video_v1_room_room_participant_room_participant_subscribed_track.go index 3aebbf2b8..0d94d3f9e 100644 --- a/twilio/rest/video/v1/model_video_v1_room_room_participant_room_participant_subscribed_track.go +++ b/twilio/rest/video/v1/model_video_v1_room_room_participant_room_participant_subscribed_track.go @@ -17,14 +17,24 @@ import ( // VideoV1RoomRoomParticipantRoomParticipantSubscribedTrack struct for VideoV1RoomRoomParticipantRoomParticipantSubscribedTrack type VideoV1RoomRoomParticipantRoomParticipantSubscribedTrack struct { - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Enabled *bool `json:"Enabled,omitempty"` - Kind *RoomParticipantSubscribedTrackKind `json:"Kind,omitempty"` - Name *string `json:"Name,omitempty"` - ParticipantSid *string `json:"ParticipantSid,omitempty"` - PublisherSid *string `json:"PublisherSid,omitempty"` - RoomSid *string `json:"RoomSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // Whether the track is enabled + Enabled *bool `json:"Enabled,omitempty"` + // The track type + Kind *string `json:"Kind,omitempty"` + // The track name + Name *string `json:"Name,omitempty"` + // The SID of the participant that subscribes to the track + ParticipantSid *string `json:"ParticipantSid,omitempty"` + // The SID of the participant that publishes the track + PublisherSid *string `json:"PublisherSid,omitempty"` + // The SID of the room where the track is published + RoomSid *string `json:"RoomSid,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The absolute URL of the resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/video/v1/model_video_v1_room_room_recording.go b/twilio/rest/video/v1/model_video_v1_room_room_recording.go index 98473a823..a2d33ecc1 100644 --- a/twilio/rest/video/v1/model_video_v1_room_room_recording.go +++ b/twilio/rest/video/v1/model_video_v1_room_room_recording.go @@ -17,20 +17,36 @@ import ( // VideoV1RoomRoomRecording struct for VideoV1RoomRoomRecording type VideoV1RoomRoomRecording struct { - AccountSid *string `json:"AccountSid,omitempty"` - Codec *RoomRecordingCodec `json:"Codec,omitempty"` - ContainerFormat *RoomRecordingFormat `json:"ContainerFormat,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - Duration *int32 `json:"Duration,omitempty"` - GroupingSids *map[string]interface{} `json:"GroupingSids,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - Offset *int32 `json:"Offset,omitempty"` - RoomSid *string `json:"RoomSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Size *int32 `json:"Size,omitempty"` - SourceSid *string `json:"SourceSid,omitempty"` - Status *RoomRecordingStatus `json:"Status,omitempty"` - TrackName *string `json:"TrackName,omitempty"` - Type *RoomRecordingType `json:"Type,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The codec used for the recording + Codec *string `json:"Codec,omitempty"` + // The file format for the recording + ContainerFormat *string `json:"ContainerFormat,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The duration of the recording in seconds + Duration *int32 `json:"Duration,omitempty"` + // A list of SIDs related to the Recording + GroupingSids *map[string]interface{} `json:"GroupingSids,omitempty"` + // The URLs of related resources + Links *map[string]interface{} `json:"Links,omitempty"` + // The number of milliseconds between a point in time that is common to all rooms in a group and when the source room of the recording started + Offset *int32 `json:"Offset,omitempty"` + // The SID of the Room resource the recording is associated with + RoomSid *string `json:"RoomSid,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The size of the recorded track in bytes + Size *int32 `json:"Size,omitempty"` + // The SID of the recording source + SourceSid *string `json:"SourceSid,omitempty"` + // The status of the recording + Status *string `json:"Status,omitempty"` + // The name that was given to the source track of the recording + TrackName *string `json:"TrackName,omitempty"` + // The recording's media type + Type *string `json:"Type,omitempty"` + // The absolute URL of the resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/video/v1/model_video_v1_room_room_recording_rule.go b/twilio/rest/video/v1/model_video_v1_room_room_recording_rule.go index 5055e1524..6df7ada4d 100644 --- a/twilio/rest/video/v1/model_video_v1_room_room_recording_rule.go +++ b/twilio/rest/video/v1/model_video_v1_room_room_recording_rule.go @@ -17,8 +17,12 @@ import ( // VideoV1RoomRoomRecordingRule struct for VideoV1RoomRoomRecordingRule type VideoV1RoomRoomRecordingRule struct { - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - RoomSid *string `json:"RoomSid,omitempty"` - Rules *[]map[string]interface{} `json:"Rules,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The SID of the Room resource for the Recording Rules + RoomSid *string `json:"RoomSid,omitempty"` + // A collection of recording Rules that describe how to include or exclude matching tracks for recording + Rules *[]VideoV1RoomRoomRecordingRuleRules `json:"Rules,omitempty"` } diff --git a/twilio/rest/video/v1/model_video_v1_room_room_recording_rule_rules.go b/twilio/rest/video/v1/model_video_v1_room_room_recording_rule_rules.go new file mode 100644 index 000000000..b5f57ac20 --- /dev/null +++ b/twilio/rest/video/v1/model_video_v1_room_room_recording_rule_rules.go @@ -0,0 +1,21 @@ +/* + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +// VideoV1RoomRoomRecordingRuleRules struct for VideoV1RoomRoomRecordingRuleRules +type VideoV1RoomRoomRecordingRuleRules struct { + All bool `json:"All,omitempty"` + Kind string `json:"Kind,omitempty"` + Publisher string `json:"Publisher,omitempty"` + Track string `json:"Track,omitempty"` + Type string `json:"Type,omitempty"` +} diff --git a/twilio/rest/voice/v1/README.md b/twilio/rest/voice/v1/README.md index 483493cc7..d68dcdb28 100644 --- a/twilio/rest/voice/v1/README.md +++ b/twilio/rest/voice/v1/README.md @@ -66,7 +66,6 @@ Class | Method | HTTP request | Description ## Documentation For Models - - [HttpMethod](docs/HttpMethod.md) - [ListByocTrunkResponse](docs/ListByocTrunkResponse.md) - [ListByocTrunkResponseMeta](docs/ListByocTrunkResponseMeta.md) - [ListConnectionPolicyResponse](docs/ListConnectionPolicyResponse.md) diff --git a/twilio/rest/voice/v1/docs/ListByocTrunkResponse.md b/twilio/rest/voice/v1/docs/ListByocTrunkResponse.md index 6b095c6c9..1326d935f 100644 --- a/twilio/rest/voice/v1/docs/ListByocTrunkResponse.md +++ b/twilio/rest/voice/v1/docs/ListByocTrunkResponse.md @@ -1,10 +1,10 @@ # ListByocTrunkResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**ByocTrunks** | [**[]VoiceV1ByocTrunk**](voice.v1.byoc_trunk.md) | [optional] -**Meta** | [**ListByocTrunkResponseMeta**](ListByocTrunkResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ByocTrunks** | [**[]VoiceV1ByocTrunk**](voice.v1.byoc_trunk.md) | |[optional] +**Meta** | [**ListByocTrunkResponseMeta**](ListByocTrunkResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/voice/v1/docs/ListByocTrunkResponseMeta.md b/twilio/rest/voice/v1/docs/ListByocTrunkResponseMeta.md index 77b2cd09b..7d226b014 100644 --- a/twilio/rest/voice/v1/docs/ListByocTrunkResponseMeta.md +++ b/twilio/rest/voice/v1/docs/ListByocTrunkResponseMeta.md @@ -1,15 +1,15 @@ # ListByocTrunkResponseMeta ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**FirstPageUrl** | **string** | [optional] -**Key** | **string** | [optional] -**NextPageUrl** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUrl** | **string** | [optional] -**Url** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstPageUrl** | **string** | |[optional] +**Key** | **string** | |[optional] +**NextPageUrl** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUrl** | **string** | |[optional] +**Url** | **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/twilio/rest/voice/v1/docs/ListConnectionPolicyResponse.md b/twilio/rest/voice/v1/docs/ListConnectionPolicyResponse.md index 6e0af44fd..0874546c3 100644 --- a/twilio/rest/voice/v1/docs/ListConnectionPolicyResponse.md +++ b/twilio/rest/voice/v1/docs/ListConnectionPolicyResponse.md @@ -1,10 +1,10 @@ # ListConnectionPolicyResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**ConnectionPolicies** | [**[]VoiceV1ConnectionPolicy**](voice.v1.connection_policy.md) | [optional] -**Meta** | [**ListByocTrunkResponseMeta**](ListByocTrunkResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ConnectionPolicies** | [**[]VoiceV1ConnectionPolicy**](voice.v1.connection_policy.md) | |[optional] +**Meta** | [**ListByocTrunkResponseMeta**](ListByocTrunkResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/voice/v1/docs/ListConnectionPolicyTargetResponse.md b/twilio/rest/voice/v1/docs/ListConnectionPolicyTargetResponse.md index 84c4a02ee..f85a4c624 100644 --- a/twilio/rest/voice/v1/docs/ListConnectionPolicyTargetResponse.md +++ b/twilio/rest/voice/v1/docs/ListConnectionPolicyTargetResponse.md @@ -1,10 +1,10 @@ # ListConnectionPolicyTargetResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListByocTrunkResponseMeta**](ListByocTrunkResponse_meta.md) | [optional] -**Targets** | [**[]VoiceV1ConnectionPolicyConnectionPolicyTarget**](voice.v1.connection_policy.connection_policy_target.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListByocTrunkResponseMeta**](ListByocTrunkResponse_meta.md) | |[optional] +**Targets** | [**[]VoiceV1ConnectionPolicyConnectionPolicyTarget**](voice.v1.connection_policy.connection_policy_target.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/voice/v1/docs/ListDialingPermissionsCountryResponse.md b/twilio/rest/voice/v1/docs/ListDialingPermissionsCountryResponse.md index 020f5febe..9cd2ecbc7 100644 --- a/twilio/rest/voice/v1/docs/ListDialingPermissionsCountryResponse.md +++ b/twilio/rest/voice/v1/docs/ListDialingPermissionsCountryResponse.md @@ -1,10 +1,10 @@ # ListDialingPermissionsCountryResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Content** | [**[]VoiceV1DialingPermissionsDialingPermissionsCountry**](voice.v1.dialing_permissions.dialing_permissions_country.md) | [optional] -**Meta** | [**ListByocTrunkResponseMeta**](ListByocTrunkResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Content** | [**[]VoiceV1DialingPermissionsDialingPermissionsCountry**](voice.v1.dialing_permissions.dialing_permissions_country.md) | |[optional] +**Meta** | [**ListByocTrunkResponseMeta**](ListByocTrunkResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/voice/v1/docs/ListDialingPermissionsHrsPrefixesResponse.md b/twilio/rest/voice/v1/docs/ListDialingPermissionsHrsPrefixesResponse.md index 81804c793..e7c09dade 100644 --- a/twilio/rest/voice/v1/docs/ListDialingPermissionsHrsPrefixesResponse.md +++ b/twilio/rest/voice/v1/docs/ListDialingPermissionsHrsPrefixesResponse.md @@ -1,10 +1,10 @@ # ListDialingPermissionsHrsPrefixesResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Content** | [**[]VoiceV1DialingPermissionsDialingPermissionsCountryDialingPermissionsHrsPrefixes**](voice.v1.dialing_permissions.dialing_permissions_country.dialing_permissions_hrs_prefixes.md) | [optional] -**Meta** | [**ListByocTrunkResponseMeta**](ListByocTrunkResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Content** | [**[]VoiceV1DialingPermissionsDialingPermissionsCountryDialingPermissionsHrsPrefixes**](voice.v1.dialing_permissions.dialing_permissions_country.dialing_permissions_hrs_prefixes.md) | |[optional] +**Meta** | [**ListByocTrunkResponseMeta**](ListByocTrunkResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/voice/v1/docs/ListIpRecordResponse.md b/twilio/rest/voice/v1/docs/ListIpRecordResponse.md index 4d7334638..163bdedac 100644 --- a/twilio/rest/voice/v1/docs/ListIpRecordResponse.md +++ b/twilio/rest/voice/v1/docs/ListIpRecordResponse.md @@ -1,10 +1,10 @@ # ListIpRecordResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**IpRecords** | [**[]VoiceV1IpRecord**](voice.v1.ip_record.md) | [optional] -**Meta** | [**ListByocTrunkResponseMeta**](ListByocTrunkResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**IpRecords** | [**[]VoiceV1IpRecord**](voice.v1.ip_record.md) | |[optional] +**Meta** | [**ListByocTrunkResponseMeta**](ListByocTrunkResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/voice/v1/docs/ListSourceIpMappingResponse.md b/twilio/rest/voice/v1/docs/ListSourceIpMappingResponse.md index 0cc82e1a9..356535860 100644 --- a/twilio/rest/voice/v1/docs/ListSourceIpMappingResponse.md +++ b/twilio/rest/voice/v1/docs/ListSourceIpMappingResponse.md @@ -1,10 +1,10 @@ # ListSourceIpMappingResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListByocTrunkResponseMeta**](ListByocTrunkResponse_meta.md) | [optional] -**SourceIpMappings** | [**[]VoiceV1SourceIpMapping**](voice.v1.source_ip_mapping.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListByocTrunkResponseMeta**](ListByocTrunkResponse_meta.md) | |[optional] +**SourceIpMappings** | [**[]VoiceV1SourceIpMapping**](voice.v1.source_ip_mapping.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/voice/v1/docs/VoiceV1ByocTrunk.md b/twilio/rest/voice/v1/docs/VoiceV1ByocTrunk.md index 93be43ca6..fb6a430b9 100644 --- a/twilio/rest/voice/v1/docs/VoiceV1ByocTrunk.md +++ b/twilio/rest/voice/v1/docs/VoiceV1ByocTrunk.md @@ -1,23 +1,23 @@ # VoiceV1ByocTrunk ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**CnamLookupEnabled** | Pointer to **bool** | -**ConnectionPolicySid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**FriendlyName** | Pointer to **string** | -**FromDomainSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**StatusCallbackMethod** | Pointer to [**HttpMethod**](http_method.md) | -**StatusCallbackUrl** | Pointer to **string** | -**Url** | Pointer to **string** | -**VoiceFallbackMethod** | Pointer to [**HttpMethod**](http_method.md) | -**VoiceFallbackUrl** | Pointer to **string** | -**VoiceMethod** | Pointer to [**HttpMethod**](http_method.md) | -**VoiceUrl** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**CnamLookupEnabled** | Pointer to **bool** | Whether Caller ID Name (CNAM) lookup is enabled for the trunk | +**ConnectionPolicySid** | Pointer to **string** | Origination Connection Policy (to your Carrier) | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT that the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT that the resource was last updated | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the resource | +**FromDomainSid** | Pointer to **string** | The SID of the SIP Domain that should be used in the `From` header of originating calls | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**StatusCallbackMethod** | Pointer to **string** | The HTTP method we use to call status_callback_url | +**StatusCallbackUrl** | Pointer to **string** | The URL that we call with status updates | +**Url** | Pointer to **string** | The absolute URL of the resource | +**VoiceFallbackMethod** | Pointer to **string** | The HTTP method used with voice_fallback_url | +**VoiceFallbackUrl** | Pointer to **string** | The URL we call when an error occurs while executing TwiML | +**VoiceMethod** | Pointer to **string** | The HTTP method to use with voice_url | +**VoiceUrl** | Pointer to **string** | The URL we call when receiving a call | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/voice/v1/docs/VoiceV1ConnectionPolicy.md b/twilio/rest/voice/v1/docs/VoiceV1ConnectionPolicy.md index b8ed77377..508952f34 100644 --- a/twilio/rest/voice/v1/docs/VoiceV1ConnectionPolicy.md +++ b/twilio/rest/voice/v1/docs/VoiceV1ConnectionPolicy.md @@ -1,15 +1,15 @@ # VoiceV1ConnectionPolicy ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**FriendlyName** | Pointer to **string** | -**Links** | Pointer to **map[string]interface{}** | -**Sid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was last updated | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the resource | +**Links** | Pointer to **map[string]interface{}** | The URLs of related resources | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Url** | Pointer to **string** | The absolute URL of the resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/voice/v1/docs/VoiceV1ConnectionPolicyConnectionPolicyTarget.md b/twilio/rest/voice/v1/docs/VoiceV1ConnectionPolicyConnectionPolicyTarget.md index c607b2dde..18e799bbd 100644 --- a/twilio/rest/voice/v1/docs/VoiceV1ConnectionPolicyConnectionPolicyTarget.md +++ b/twilio/rest/voice/v1/docs/VoiceV1ConnectionPolicyConnectionPolicyTarget.md @@ -1,19 +1,19 @@ # VoiceV1ConnectionPolicyConnectionPolicyTarget ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**ConnectionPolicySid** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**Enabled** | Pointer to **bool** | -**FriendlyName** | Pointer to **string** | -**Priority** | Pointer to **int32** | -**Sid** | Pointer to **string** | -**Target** | Pointer to **string** | -**Url** | Pointer to **string** | -**Weight** | Pointer to **int32** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**ConnectionPolicySid** | Pointer to **string** | The SID of the Connection Policy that owns the Target | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT when the resource was last updated | +**Enabled** | Pointer to **bool** | Whether the target is enabled | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the resource | +**Priority** | Pointer to **int32** | The relative importance of the target | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Target** | Pointer to **string** | The SIP address you want Twilio to route your calls to | +**Url** | Pointer to **string** | The absolute URL of the resource | +**Weight** | Pointer to **int32** | The value that determines the relative load the Target should receive compared to others with the same priority | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/voice/v1/docs/VoiceV1DialingPermissionsDialingPermissionsCountry.md b/twilio/rest/voice/v1/docs/VoiceV1DialingPermissionsDialingPermissionsCountry.md index b333e7bae..7b274142c 100644 --- a/twilio/rest/voice/v1/docs/VoiceV1DialingPermissionsDialingPermissionsCountry.md +++ b/twilio/rest/voice/v1/docs/VoiceV1DialingPermissionsDialingPermissionsCountry.md @@ -1,17 +1,17 @@ # VoiceV1DialingPermissionsDialingPermissionsCountry ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Continent** | Pointer to **string** | -**CountryCodes** | Pointer to **[]string** | -**HighRiskSpecialNumbersEnabled** | Pointer to **bool** | -**HighRiskTollfraudNumbersEnabled** | Pointer to **bool** | -**IsoCode** | Pointer to **string** | -**Links** | Pointer to **map[string]interface{}** | -**LowRiskNumbersEnabled** | Pointer to **bool** | -**Name** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Continent** | Pointer to **string** | The name of the continent in which the country is located | +**CountryCodes** | Pointer to **[]string** | The E.164 assigned country codes(s) | +**HighRiskSpecialNumbersEnabled** | Pointer to **bool** | Whether dialing to high-risk special services numbers is enabled | +**HighRiskTollfraudNumbersEnabled** | Pointer to **bool** | Whether dialing to high-risk toll fraud numbers is enabled, else `false` | +**IsoCode** | Pointer to **string** | The ISO country code | +**Links** | Pointer to **map[string]interface{}** | A list of URLs related to this resource | +**LowRiskNumbersEnabled** | Pointer to **bool** | Whether dialing to low-risk numbers is enabled | +**Name** | Pointer to **string** | The name of the country | +**Url** | Pointer to **string** | The absolute URL of this resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/voice/v1/docs/VoiceV1DialingPermissionsDialingPermissionsCountryBulkUpdate.md b/twilio/rest/voice/v1/docs/VoiceV1DialingPermissionsDialingPermissionsCountryBulkUpdate.md index 00350d38d..6921903c6 100644 --- a/twilio/rest/voice/v1/docs/VoiceV1DialingPermissionsDialingPermissionsCountryBulkUpdate.md +++ b/twilio/rest/voice/v1/docs/VoiceV1DialingPermissionsDialingPermissionsCountryBulkUpdate.md @@ -1,10 +1,10 @@ # VoiceV1DialingPermissionsDialingPermissionsCountryBulkUpdate ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**UpdateCount** | Pointer to **int32** | -**UpdateRequest** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**UpdateCount** | Pointer to **int32** | The number of countries updated | +**UpdateRequest** | Pointer to **string** | A URL encoded JSON array of update objects | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/voice/v1/docs/VoiceV1DialingPermissionsDialingPermissionsCountryDialingPermissionsHrsPrefixes.md b/twilio/rest/voice/v1/docs/VoiceV1DialingPermissionsDialingPermissionsCountryDialingPermissionsHrsPrefixes.md index 5905a9a85..397f39b66 100644 --- a/twilio/rest/voice/v1/docs/VoiceV1DialingPermissionsDialingPermissionsCountryDialingPermissionsHrsPrefixes.md +++ b/twilio/rest/voice/v1/docs/VoiceV1DialingPermissionsDialingPermissionsCountryDialingPermissionsHrsPrefixes.md @@ -1,9 +1,9 @@ # VoiceV1DialingPermissionsDialingPermissionsCountryDialingPermissionsHrsPrefixes ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Prefix** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Prefix** | Pointer to **string** | A prefix that includes the E.164 assigned country code | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/voice/v1/docs/VoiceV1DialingPermissionsDialingPermissionsCountryInstance.md b/twilio/rest/voice/v1/docs/VoiceV1DialingPermissionsDialingPermissionsCountryInstance.md index 71481aa98..34d46ac7e 100644 --- a/twilio/rest/voice/v1/docs/VoiceV1DialingPermissionsDialingPermissionsCountryInstance.md +++ b/twilio/rest/voice/v1/docs/VoiceV1DialingPermissionsDialingPermissionsCountryInstance.md @@ -1,17 +1,17 @@ # VoiceV1DialingPermissionsDialingPermissionsCountryInstance ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Continent** | Pointer to **string** | -**CountryCodes** | Pointer to **[]string** | -**HighRiskSpecialNumbersEnabled** | Pointer to **bool** | -**HighRiskTollfraudNumbersEnabled** | Pointer to **bool** | -**IsoCode** | Pointer to **string** | -**Links** | Pointer to **map[string]interface{}** | -**LowRiskNumbersEnabled** | Pointer to **bool** | -**Name** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Continent** | Pointer to **string** | The name of the continent in which the country is located | +**CountryCodes** | Pointer to **[]string** | The E.164 assigned country codes(s) | +**HighRiskSpecialNumbersEnabled** | Pointer to **bool** | Whether dialing to high-risk special services numbers is enabled | +**HighRiskTollfraudNumbersEnabled** | Pointer to **bool** | Whether dialing to high-risk toll fraud numbers is enabled, else `false` | +**IsoCode** | Pointer to **string** | The ISO country code | +**Links** | Pointer to **map[string]interface{}** | A list of URLs related to this resource | +**LowRiskNumbersEnabled** | Pointer to **bool** | Whether dialing to low-risk numbers is enabled | +**Name** | Pointer to **string** | The name of the country | +**Url** | Pointer to **string** | The absolute URL of this resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/voice/v1/docs/VoiceV1DialingPermissionsDialingPermissionsSettings.md b/twilio/rest/voice/v1/docs/VoiceV1DialingPermissionsDialingPermissionsSettings.md index 62ee909d1..75e307d7e 100644 --- a/twilio/rest/voice/v1/docs/VoiceV1DialingPermissionsDialingPermissionsSettings.md +++ b/twilio/rest/voice/v1/docs/VoiceV1DialingPermissionsDialingPermissionsSettings.md @@ -1,10 +1,10 @@ # VoiceV1DialingPermissionsDialingPermissionsSettings ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**DialingPermissionsInheritance** | Pointer to **bool** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DialingPermissionsInheritance** | Pointer to **bool** | `true` if the sub-account will inherit voice dialing permissions from the Master Project; otherwise `false` | +**Url** | Pointer to **string** | The absolute URL of this resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/voice/v1/docs/VoiceV1IpRecord.md b/twilio/rest/voice/v1/docs/VoiceV1IpRecord.md index 557c878bd..d298b0b1a 100644 --- a/twilio/rest/voice/v1/docs/VoiceV1IpRecord.md +++ b/twilio/rest/voice/v1/docs/VoiceV1IpRecord.md @@ -1,16 +1,16 @@ # VoiceV1IpRecord ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**CidrPrefixLength** | Pointer to **int32** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**FriendlyName** | Pointer to **string** | -**IpAddress** | Pointer to **string** | -**Sid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**CidrPrefixLength** | Pointer to **int32** | An integer representing the length of the [CIDR](https://tools.ietf.org/html/rfc4632) prefix to use with this IP address. By default the entire IP address is used, which for IPv4 is value 32. | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT that the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT that the resource was last updated | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the resource | +**IpAddress** | Pointer to **string** | An IP address in dotted decimal notation, IPv4 only. | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**Url** | Pointer to **string** | The absolute URL of the resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/voice/v1/docs/VoiceV1SourceIpMapping.md b/twilio/rest/voice/v1/docs/VoiceV1SourceIpMapping.md index 0f68bddb0..f56ccaa5c 100644 --- a/twilio/rest/voice/v1/docs/VoiceV1SourceIpMapping.md +++ b/twilio/rest/voice/v1/docs/VoiceV1SourceIpMapping.md @@ -1,14 +1,14 @@ # VoiceV1SourceIpMapping ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**IpRecordSid** | Pointer to **string** | -**Sid** | Pointer to **string** | -**SipDomainSid** | Pointer to **string** | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT that the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The RFC 2822 date and time in GMT that the resource was last updated | +**IpRecordSid** | Pointer to **string** | The unique string that identifies an IP Record | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**SipDomainSid** | Pointer to **string** | The unique string that identifies a SIP Domain | +**Url** | Pointer to **string** | The absolute URL of the resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/voice/v1/model_voice_v1_byoc_trunk.go b/twilio/rest/voice/v1/model_voice_v1_byoc_trunk.go index 81b138fcb..5fe758965 100644 --- a/twilio/rest/voice/v1/model_voice_v1_byoc_trunk.go +++ b/twilio/rest/voice/v1/model_voice_v1_byoc_trunk.go @@ -17,19 +17,34 @@ import ( // VoiceV1ByocTrunk struct for VoiceV1ByocTrunk type VoiceV1ByocTrunk struct { - AccountSid *string `json:"AccountSid,omitempty"` - CnamLookupEnabled *bool `json:"CnamLookupEnabled,omitempty"` - ConnectionPolicySid *string `json:"ConnectionPolicySid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - FromDomainSid *string `json:"FromDomainSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - StatusCallbackMethod *HttpMethod `json:"StatusCallbackMethod,omitempty"` - StatusCallbackUrl *string `json:"StatusCallbackUrl,omitempty"` - Url *string `json:"Url,omitempty"` - VoiceFallbackMethod *HttpMethod `json:"VoiceFallbackMethod,omitempty"` - VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` - VoiceMethod *HttpMethod `json:"VoiceMethod,omitempty"` - VoiceUrl *string `json:"VoiceUrl,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // Whether Caller ID Name (CNAM) lookup is enabled for the trunk + CnamLookupEnabled *bool `json:"CnamLookupEnabled,omitempty"` + // Origination Connection Policy (to your Carrier) + ConnectionPolicySid *string `json:"ConnectionPolicySid,omitempty"` + // The RFC 2822 date and time in GMT that the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT that the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The string that you assigned to describe the resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // The SID of the SIP Domain that should be used in the `From` header of originating calls + FromDomainSid *string `json:"FromDomainSid,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The HTTP method we use to call status_callback_url + StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` + // The URL that we call with status updates + StatusCallbackUrl *string `json:"StatusCallbackUrl,omitempty"` + // The absolute URL of the resource + Url *string `json:"Url,omitempty"` + // The HTTP method used with voice_fallback_url + VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"` + // The URL we call when an error occurs while executing TwiML + VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` + // The HTTP method to use with voice_url + VoiceMethod *string `json:"VoiceMethod,omitempty"` + // The URL we call when receiving a call + VoiceUrl *string `json:"VoiceUrl,omitempty"` } diff --git a/twilio/rest/voice/v1/model_voice_v1_connection_policy.go b/twilio/rest/voice/v1/model_voice_v1_connection_policy.go index 1f7aa34c2..33868920b 100644 --- a/twilio/rest/voice/v1/model_voice_v1_connection_policy.go +++ b/twilio/rest/voice/v1/model_voice_v1_connection_policy.go @@ -17,11 +17,18 @@ import ( // VoiceV1ConnectionPolicy struct for VoiceV1ConnectionPolicy type VoiceV1ConnectionPolicy struct { - AccountSid *string `json:"AccountSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The RFC 2822 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The string that you assigned to describe the resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // The URLs of related resources + Links *map[string]interface{} `json:"Links,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The absolute URL of the resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/voice/v1/model_voice_v1_connection_policy_connection_policy_target.go b/twilio/rest/voice/v1/model_voice_v1_connection_policy_connection_policy_target.go index d369f8dd5..80316b507 100644 --- a/twilio/rest/voice/v1/model_voice_v1_connection_policy_connection_policy_target.go +++ b/twilio/rest/voice/v1/model_voice_v1_connection_policy_connection_policy_target.go @@ -17,15 +17,26 @@ import ( // VoiceV1ConnectionPolicyConnectionPolicyTarget struct for VoiceV1ConnectionPolicyConnectionPolicyTarget type VoiceV1ConnectionPolicyConnectionPolicyTarget struct { - AccountSid *string `json:"AccountSid,omitempty"` - ConnectionPolicySid *string `json:"ConnectionPolicySid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Enabled *bool `json:"Enabled,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Priority *int32 `json:"Priority,omitempty"` - Sid *string `json:"Sid,omitempty"` - Target *string `json:"Target,omitempty"` - Url *string `json:"Url,omitempty"` - Weight *int32 `json:"Weight,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The SID of the Connection Policy that owns the Target + ConnectionPolicySid *string `json:"ConnectionPolicySid,omitempty"` + // The RFC 2822 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT when the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // Whether the target is enabled + Enabled *bool `json:"Enabled,omitempty"` + // The string that you assigned to describe the resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // The relative importance of the target + Priority *int32 `json:"Priority,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The SIP address you want Twilio to route your calls to + Target *string `json:"Target,omitempty"` + // The absolute URL of the resource + Url *string `json:"Url,omitempty"` + // The value that determines the relative load the Target should receive compared to others with the same priority + Weight *int32 `json:"Weight,omitempty"` } diff --git a/twilio/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_country.go b/twilio/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_country.go index 71b2a2b70..972080ae6 100644 --- a/twilio/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_country.go +++ b/twilio/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_country.go @@ -13,13 +13,22 @@ package openapi // VoiceV1DialingPermissionsDialingPermissionsCountry struct for VoiceV1DialingPermissionsDialingPermissionsCountry type VoiceV1DialingPermissionsDialingPermissionsCountry struct { - Continent *string `json:"Continent,omitempty"` - CountryCodes *[]string `json:"CountryCodes,omitempty"` - HighRiskSpecialNumbersEnabled *bool `json:"HighRiskSpecialNumbersEnabled,omitempty"` - HighRiskTollfraudNumbersEnabled *bool `json:"HighRiskTollfraudNumbersEnabled,omitempty"` - IsoCode *string `json:"IsoCode,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - LowRiskNumbersEnabled *bool `json:"LowRiskNumbersEnabled,omitempty"` - Name *string `json:"Name,omitempty"` - Url *string `json:"Url,omitempty"` + // The name of the continent in which the country is located + Continent *string `json:"Continent,omitempty"` + // The E.164 assigned country codes(s) + CountryCodes *[]string `json:"CountryCodes,omitempty"` + // Whether dialing to high-risk special services numbers is enabled + HighRiskSpecialNumbersEnabled *bool `json:"HighRiskSpecialNumbersEnabled,omitempty"` + // Whether dialing to high-risk toll fraud numbers is enabled, else `false` + HighRiskTollfraudNumbersEnabled *bool `json:"HighRiskTollfraudNumbersEnabled,omitempty"` + // The ISO country code + IsoCode *string `json:"IsoCode,omitempty"` + // A list of URLs related to this resource + Links *map[string]interface{} `json:"Links,omitempty"` + // Whether dialing to low-risk numbers is enabled + LowRiskNumbersEnabled *bool `json:"LowRiskNumbersEnabled,omitempty"` + // The name of the country + Name *string `json:"Name,omitempty"` + // The absolute URL of this resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_country_bulk_update.go b/twilio/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_country_bulk_update.go index 5595d59e9..809f28ea4 100644 --- a/twilio/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_country_bulk_update.go +++ b/twilio/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_country_bulk_update.go @@ -13,6 +13,8 @@ package openapi // VoiceV1DialingPermissionsDialingPermissionsCountryBulkUpdate struct for VoiceV1DialingPermissionsDialingPermissionsCountryBulkUpdate type VoiceV1DialingPermissionsDialingPermissionsCountryBulkUpdate struct { - UpdateCount *int32 `json:"UpdateCount,omitempty"` + // The number of countries updated + UpdateCount *int32 `json:"UpdateCount,omitempty"` + // A URL encoded JSON array of update objects UpdateRequest *string `json:"UpdateRequest,omitempty"` } diff --git a/twilio/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_country_dialing_permissions_hrs_prefixes.go b/twilio/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_country_dialing_permissions_hrs_prefixes.go index 37be36f5e..b8c566076 100644 --- a/twilio/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_country_dialing_permissions_hrs_prefixes.go +++ b/twilio/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_country_dialing_permissions_hrs_prefixes.go @@ -13,5 +13,6 @@ package openapi // VoiceV1DialingPermissionsDialingPermissionsCountryDialingPermissionsHrsPrefixes struct for VoiceV1DialingPermissionsDialingPermissionsCountryDialingPermissionsHrsPrefixes type VoiceV1DialingPermissionsDialingPermissionsCountryDialingPermissionsHrsPrefixes struct { + // A prefix that includes the E.164 assigned country code Prefix *string `json:"Prefix,omitempty"` } diff --git a/twilio/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_country_instance.go b/twilio/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_country_instance.go index 487a693bf..b53aca6a6 100644 --- a/twilio/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_country_instance.go +++ b/twilio/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_country_instance.go @@ -13,13 +13,22 @@ package openapi // VoiceV1DialingPermissionsDialingPermissionsCountryInstance struct for VoiceV1DialingPermissionsDialingPermissionsCountryInstance type VoiceV1DialingPermissionsDialingPermissionsCountryInstance struct { - Continent *string `json:"Continent,omitempty"` - CountryCodes *[]string `json:"CountryCodes,omitempty"` - HighRiskSpecialNumbersEnabled *bool `json:"HighRiskSpecialNumbersEnabled,omitempty"` - HighRiskTollfraudNumbersEnabled *bool `json:"HighRiskTollfraudNumbersEnabled,omitempty"` - IsoCode *string `json:"IsoCode,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - LowRiskNumbersEnabled *bool `json:"LowRiskNumbersEnabled,omitempty"` - Name *string `json:"Name,omitempty"` - Url *string `json:"Url,omitempty"` + // The name of the continent in which the country is located + Continent *string `json:"Continent,omitempty"` + // The E.164 assigned country codes(s) + CountryCodes *[]string `json:"CountryCodes,omitempty"` + // Whether dialing to high-risk special services numbers is enabled + HighRiskSpecialNumbersEnabled *bool `json:"HighRiskSpecialNumbersEnabled,omitempty"` + // Whether dialing to high-risk toll fraud numbers is enabled, else `false` + HighRiskTollfraudNumbersEnabled *bool `json:"HighRiskTollfraudNumbersEnabled,omitempty"` + // The ISO country code + IsoCode *string `json:"IsoCode,omitempty"` + // A list of URLs related to this resource + Links *map[string]interface{} `json:"Links,omitempty"` + // Whether dialing to low-risk numbers is enabled + LowRiskNumbersEnabled *bool `json:"LowRiskNumbersEnabled,omitempty"` + // The name of the country + Name *string `json:"Name,omitempty"` + // The absolute URL of this resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_settings.go b/twilio/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_settings.go index 529f46325..0f13ad583 100644 --- a/twilio/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_settings.go +++ b/twilio/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_settings.go @@ -13,6 +13,8 @@ package openapi // VoiceV1DialingPermissionsDialingPermissionsSettings struct for VoiceV1DialingPermissionsDialingPermissionsSettings type VoiceV1DialingPermissionsDialingPermissionsSettings struct { - DialingPermissionsInheritance *bool `json:"DialingPermissionsInheritance,omitempty"` - Url *string `json:"Url,omitempty"` + // `true` if the sub-account will inherit voice dialing permissions from the Master Project; otherwise `false` + DialingPermissionsInheritance *bool `json:"DialingPermissionsInheritance,omitempty"` + // The absolute URL of this resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/voice/v1/model_voice_v1_ip_record.go b/twilio/rest/voice/v1/model_voice_v1_ip_record.go index e4ee9f570..e74167da9 100644 --- a/twilio/rest/voice/v1/model_voice_v1_ip_record.go +++ b/twilio/rest/voice/v1/model_voice_v1_ip_record.go @@ -17,12 +17,20 @@ import ( // VoiceV1IpRecord struct for VoiceV1IpRecord type VoiceV1IpRecord struct { - AccountSid *string `json:"AccountSid,omitempty"` - CidrPrefixLength *int32 `json:"CidrPrefixLength,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - IpAddress *string `json:"IpAddress,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // An integer representing the length of the [CIDR](https://tools.ietf.org/html/rfc4632) prefix to use with this IP address. By default the entire IP address is used, which for IPv4 is value 32. + CidrPrefixLength *int32 `json:"CidrPrefixLength,omitempty"` + // The RFC 2822 date and time in GMT that the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT that the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The string that you assigned to describe the resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // An IP address in dotted decimal notation, IPv4 only. + IpAddress *string `json:"IpAddress,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The absolute URL of the resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/voice/v1/model_voice_v1_source_ip_mapping.go b/twilio/rest/voice/v1/model_voice_v1_source_ip_mapping.go index ea4c5ebf3..9b9399a33 100644 --- a/twilio/rest/voice/v1/model_voice_v1_source_ip_mapping.go +++ b/twilio/rest/voice/v1/model_voice_v1_source_ip_mapping.go @@ -17,10 +17,16 @@ import ( // VoiceV1SourceIpMapping struct for VoiceV1SourceIpMapping type VoiceV1SourceIpMapping struct { - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - IpRecordSid *string `json:"IpRecordSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - SipDomainSid *string `json:"SipDomainSid,omitempty"` - Url *string `json:"Url,omitempty"` + // The RFC 2822 date and time in GMT that the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The RFC 2822 date and time in GMT that the resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The unique string that identifies an IP Record + IpRecordSid *string `json:"IpRecordSid,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The unique string that identifies a SIP Domain + SipDomainSid *string `json:"SipDomainSid,omitempty"` + // The absolute URL of the resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/wireless/v1/README.md b/twilio/rest/wireless/v1/README.md index d3343906b..18be7f704 100644 --- a/twilio/rest/wireless/v1/README.md +++ b/twilio/rest/wireless/v1/README.md @@ -51,11 +51,6 @@ Class | Method | HTTP request | Description ## Documentation For Models - - [CommandCommandMode](docs/CommandCommandMode.md) - - [CommandDirection](docs/CommandDirection.md) - - [CommandStatus](docs/CommandStatus.md) - - [CommandTransport](docs/CommandTransport.md) - - [HttpMethod](docs/HttpMethod.md) - [ListAccountUsageRecordResponse](docs/ListAccountUsageRecordResponse.md) - [ListCommandResponse](docs/ListCommandResponse.md) - [ListCommandResponseMeta](docs/ListCommandResponseMeta.md) @@ -63,8 +58,6 @@ Class | Method | HTTP request | Description - [ListRatePlanResponse](docs/ListRatePlanResponse.md) - [ListSimResponse](docs/ListSimResponse.md) - [ListUsageRecordResponse](docs/ListUsageRecordResponse.md) - - [SimResetStatus](docs/SimResetStatus.md) - - [SimStatus](docs/SimStatus.md) - [WirelessV1AccountUsageRecord](docs/WirelessV1AccountUsageRecord.md) - [WirelessV1Command](docs/WirelessV1Command.md) - [WirelessV1RatePlan](docs/WirelessV1RatePlan.md) diff --git a/twilio/rest/wireless/v1/docs/ListAccountUsageRecordResponse.md b/twilio/rest/wireless/v1/docs/ListAccountUsageRecordResponse.md index d59c0c508..892836328 100644 --- a/twilio/rest/wireless/v1/docs/ListAccountUsageRecordResponse.md +++ b/twilio/rest/wireless/v1/docs/ListAccountUsageRecordResponse.md @@ -1,10 +1,10 @@ # ListAccountUsageRecordResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListCommandResponseMeta**](ListCommandResponse_meta.md) | [optional] -**UsageRecords** | [**[]WirelessV1AccountUsageRecord**](wireless.v1.account_usage_record.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListCommandResponseMeta**](ListCommandResponse_meta.md) | |[optional] +**UsageRecords** | [**[]WirelessV1AccountUsageRecord**](wireless.v1.account_usage_record.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/wireless/v1/docs/ListCommandResponse.md b/twilio/rest/wireless/v1/docs/ListCommandResponse.md index 83b4c26a4..55d3c9e07 100644 --- a/twilio/rest/wireless/v1/docs/ListCommandResponse.md +++ b/twilio/rest/wireless/v1/docs/ListCommandResponse.md @@ -1,10 +1,10 @@ # ListCommandResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Commands** | [**[]WirelessV1Command**](wireless.v1.command.md) | [optional] -**Meta** | [**ListCommandResponseMeta**](ListCommandResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Commands** | [**[]WirelessV1Command**](wireless.v1.command.md) | |[optional] +**Meta** | [**ListCommandResponseMeta**](ListCommandResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/wireless/v1/docs/ListCommandResponseMeta.md b/twilio/rest/wireless/v1/docs/ListCommandResponseMeta.md index 4ed98de65..919cb757a 100644 --- a/twilio/rest/wireless/v1/docs/ListCommandResponseMeta.md +++ b/twilio/rest/wireless/v1/docs/ListCommandResponseMeta.md @@ -1,15 +1,15 @@ # ListCommandResponseMeta ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**FirstPageUrl** | **string** | [optional] -**Key** | **string** | [optional] -**NextPageUrl** | **string** | [optional] -**Page** | **int32** | [optional] -**PageSize** | **int32** | [optional] -**PreviousPageUrl** | **string** | [optional] -**Url** | **string** | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstPageUrl** | **string** | |[optional] +**Key** | **string** | |[optional] +**NextPageUrl** | **string** | |[optional] +**Page** | **int32** | |[optional] +**PageSize** | **int32** | |[optional] +**PreviousPageUrl** | **string** | |[optional] +**Url** | **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/twilio/rest/wireless/v1/docs/ListDataSessionResponse.md b/twilio/rest/wireless/v1/docs/ListDataSessionResponse.md index 215cae6b0..b413eff03 100644 --- a/twilio/rest/wireless/v1/docs/ListDataSessionResponse.md +++ b/twilio/rest/wireless/v1/docs/ListDataSessionResponse.md @@ -1,10 +1,10 @@ # ListDataSessionResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**DataSessions** | [**[]WirelessV1SimDataSession**](wireless.v1.sim.data_session.md) | [optional] -**Meta** | [**ListCommandResponseMeta**](ListCommandResponse_meta.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DataSessions** | [**[]WirelessV1SimDataSession**](wireless.v1.sim.data_session.md) | |[optional] +**Meta** | [**ListCommandResponseMeta**](ListCommandResponse_meta.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/wireless/v1/docs/ListRatePlanResponse.md b/twilio/rest/wireless/v1/docs/ListRatePlanResponse.md index c8bffc83a..4c2a5933f 100644 --- a/twilio/rest/wireless/v1/docs/ListRatePlanResponse.md +++ b/twilio/rest/wireless/v1/docs/ListRatePlanResponse.md @@ -1,10 +1,10 @@ # ListRatePlanResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListCommandResponseMeta**](ListCommandResponse_meta.md) | [optional] -**RatePlans** | [**[]WirelessV1RatePlan**](wireless.v1.rate_plan.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListCommandResponseMeta**](ListCommandResponse_meta.md) | |[optional] +**RatePlans** | [**[]WirelessV1RatePlan**](wireless.v1.rate_plan.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/wireless/v1/docs/ListSimResponse.md b/twilio/rest/wireless/v1/docs/ListSimResponse.md index 52220e234..6dac8c589 100644 --- a/twilio/rest/wireless/v1/docs/ListSimResponse.md +++ b/twilio/rest/wireless/v1/docs/ListSimResponse.md @@ -1,10 +1,10 @@ # ListSimResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListCommandResponseMeta**](ListCommandResponse_meta.md) | [optional] -**Sims** | [**[]WirelessV1Sim**](wireless.v1.sim.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListCommandResponseMeta**](ListCommandResponse_meta.md) | |[optional] +**Sims** | [**[]WirelessV1Sim**](wireless.v1.sim.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/wireless/v1/docs/ListUsageRecordResponse.md b/twilio/rest/wireless/v1/docs/ListUsageRecordResponse.md index a604f62d1..06133f859 100644 --- a/twilio/rest/wireless/v1/docs/ListUsageRecordResponse.md +++ b/twilio/rest/wireless/v1/docs/ListUsageRecordResponse.md @@ -1,10 +1,10 @@ # ListUsageRecordResponse ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**Meta** | [**ListCommandResponseMeta**](ListCommandResponse_meta.md) | [optional] -**UsageRecords** | [**[]WirelessV1SimUsageRecord**](wireless.v1.sim.usage_record.md) | [optional] +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListCommandResponseMeta**](ListCommandResponse_meta.md) | |[optional] +**UsageRecords** | [**[]WirelessV1SimUsageRecord**](wireless.v1.sim.usage_record.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/wireless/v1/docs/WirelessV1AccountUsageRecord.md b/twilio/rest/wireless/v1/docs/WirelessV1AccountUsageRecord.md index 201cbb852..4ed0c0bf1 100644 --- a/twilio/rest/wireless/v1/docs/WirelessV1AccountUsageRecord.md +++ b/twilio/rest/wireless/v1/docs/WirelessV1AccountUsageRecord.md @@ -1,12 +1,12 @@ # WirelessV1AccountUsageRecord ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Commands** | Pointer to **map[string]interface{}** | -**Data** | Pointer to **map[string]interface{}** | -**Period** | Pointer to **map[string]interface{}** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**Commands** | Pointer to **map[string]interface{}** | An object that describes the aggregated Commands usage for all SIMs during the specified period | +**Data** | Pointer to **map[string]interface{}** | An object that describes the aggregated Data usage for all SIMs over the period | +**Period** | Pointer to **map[string]interface{}** | The time period for which usage is reported | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/wireless/v1/docs/WirelessV1Command.md b/twilio/rest/wireless/v1/docs/WirelessV1Command.md index 979e6fb9c..d940baad2 100644 --- a/twilio/rest/wireless/v1/docs/WirelessV1Command.md +++ b/twilio/rest/wireless/v1/docs/WirelessV1Command.md @@ -1,20 +1,20 @@ # WirelessV1Command ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Command** | Pointer to **string** | -**CommandMode** | Pointer to [**CommandCommandMode**](command_command_mode.md) | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**DeliveryReceiptRequested** | Pointer to **bool** | -**Direction** | Pointer to [**CommandDirection**](command_direction.md) | -**Sid** | Pointer to **string** | -**SimSid** | Pointer to **string** | -**Status** | Pointer to [**CommandStatus**](command_status.md) | -**Transport** | Pointer to [**CommandTransport**](command_transport.md) | -**Url** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**Command** | Pointer to **string** | The message being sent to or from the SIM | +**CommandMode** | Pointer to **string** | The mode used to send the SMS message | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was last updated format | +**DeliveryReceiptRequested** | Pointer to **bool** | Whether to request a delivery receipt | +**Direction** | Pointer to **string** | The direction of the Command | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**SimSid** | Pointer to **string** | The SID of the Sim resource that the Command was sent to or from | +**Status** | Pointer to **string** | The status of the Command | +**Transport** | Pointer to **string** | The type of transport used | +**Url** | Pointer to **string** | The absolute URL of the resource | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/wireless/v1/docs/WirelessV1RatePlan.md b/twilio/rest/wireless/v1/docs/WirelessV1RatePlan.md index a96252570..f4f95a753 100644 --- a/twilio/rest/wireless/v1/docs/WirelessV1RatePlan.md +++ b/twilio/rest/wireless/v1/docs/WirelessV1RatePlan.md @@ -1,24 +1,24 @@ # WirelessV1RatePlan ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**DataEnabled** | Pointer to **bool** | -**DataLimit** | Pointer to **int32** | -**DataMetering** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**FriendlyName** | Pointer to **string** | -**InternationalRoaming** | Pointer to **[]string** | -**InternationalRoamingDataLimit** | Pointer to **int32** | -**MessagingEnabled** | Pointer to **bool** | -**NationalRoamingDataLimit** | Pointer to **int32** | -**NationalRoamingEnabled** | Pointer to **bool** | -**Sid** | Pointer to **string** | -**UniqueName** | Pointer to **string** | -**Url** | Pointer to **string** | -**VoiceEnabled** | Pointer to **bool** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**DataEnabled** | Pointer to **bool** | Whether SIMs can use GPRS/3G/4G/LTE data connectivity | +**DataLimit** | Pointer to **int32** | The total data usage in Megabytes that the Network allows during one month on the home network | +**DataMetering** | Pointer to **string** | The model used to meter data usage | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The date when the resource was created, given as GMT in ISO 8601 format | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The date when the resource was last updated, given as GMT in ISO 8601 format | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the resource | +**InternationalRoaming** | Pointer to **[]string** | The services that SIMs capable of using GPRS/3G/4G/LTE data connectivity can use outside of the United States | +**InternationalRoamingDataLimit** | Pointer to **int32** | The total data usage (download and upload combined) in Megabytes that the Network allows during one month when roaming outside the United States | +**MessagingEnabled** | Pointer to **bool** | Whether SIMs can make, send, and receive SMS using Commands | +**NationalRoamingDataLimit** | Pointer to **int32** | The total data usage in Megabytes that the Network allows during one month on non-home networks in the United States | +**NationalRoamingEnabled** | Pointer to **bool** | Whether SIMs can roam on networks other than the home network in the United States | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**UniqueName** | Pointer to **string** | An application-defined string that uniquely identifies the resource | +**Url** | Pointer to **string** | The absolute URL of the resource | +**VoiceEnabled** | Pointer to **bool** | Whether SIMs can make and receive voice calls | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/wireless/v1/docs/WirelessV1Sim.md b/twilio/rest/wireless/v1/docs/WirelessV1Sim.md index ca3b0a81d..7f9dbaa48 100644 --- a/twilio/rest/wireless/v1/docs/WirelessV1Sim.md +++ b/twilio/rest/wireless/v1/docs/WirelessV1Sim.md @@ -1,32 +1,32 @@ # WirelessV1Sim ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**CommandsCallbackMethod** | Pointer to [**HttpMethod**](http_method.md) | -**CommandsCallbackUrl** | Pointer to **string** | -**DateCreated** | Pointer to [**time.Time**](time.Time.md) | -**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | -**EId** | Pointer to **string** | -**FriendlyName** | Pointer to **string** | -**Iccid** | Pointer to **string** | -**IpAddress** | Pointer to **string** | -**Links** | Pointer to **map[string]interface{}** | -**RatePlanSid** | Pointer to **string** | -**ResetStatus** | Pointer to [**SimResetStatus**](sim_reset_status.md) | -**Sid** | Pointer to **string** | -**SmsFallbackMethod** | Pointer to [**HttpMethod**](http_method.md) | -**SmsFallbackUrl** | Pointer to **string** | -**SmsMethod** | Pointer to [**HttpMethod**](http_method.md) | -**SmsUrl** | Pointer to **string** | -**Status** | Pointer to [**SimStatus**](sim_status.md) | -**UniqueName** | Pointer to **string** | -**Url** | Pointer to **string** | -**VoiceFallbackMethod** | Pointer to [**HttpMethod**](http_method.md) | -**VoiceFallbackUrl** | Pointer to **string** | -**VoiceMethod** | Pointer to [**HttpMethod**](http_method.md) | -**VoiceUrl** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account to which the Sim resource belongs | +**CommandsCallbackMethod** | Pointer to **string** | The HTTP method we use to call commands_callback_url | +**CommandsCallbackUrl** | Pointer to **string** | The URL we call when the SIM originates a machine-to-machine Command | +**DateCreated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the resource was created | +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | The ISO 8601 date and time in GMT when the Sim resource was last updated | +**EId** | Pointer to **string** | Deprecated | +**FriendlyName** | Pointer to **string** | The string that you assigned to describe the Sim resource | +**Iccid** | Pointer to **string** | The ICCID associated with the SIM | +**IpAddress** | Pointer to **string** | Deprecated | +**Links** | Pointer to **map[string]interface{}** | The URLs of related subresources | +**RatePlanSid** | Pointer to **string** | The SID of the RatePlan resource to which the Sim resource is assigned. | +**ResetStatus** | Pointer to **string** | The connectivity reset status of the SIM | +**Sid** | Pointer to **string** | The unique string that identifies the Sim resource | +**SmsFallbackMethod** | Pointer to **string** | The HTTP method we use to call sms_fallback_url | +**SmsFallbackUrl** | Pointer to **string** | The URL we call when an error occurs while retrieving or executing the TwiML requested from the sms_url | +**SmsMethod** | Pointer to **string** | The HTTP method we use to call sms_url | +**SmsUrl** | Pointer to **string** | The URL we call when the SIM-connected device sends an SMS message that is not a Command | +**Status** | Pointer to **string** | The status of the Sim resource | +**UniqueName** | Pointer to **string** | An application-defined string that uniquely identifies the resource | +**Url** | Pointer to **string** | The absolute URL of the resource | +**VoiceFallbackMethod** | Pointer to **string** | The HTTP method we use to call voice_fallback_url | +**VoiceFallbackUrl** | Pointer to **string** | The URL we call when an error occurs while retrieving or executing the TwiML requested from voice_url | +**VoiceMethod** | Pointer to **string** | The HTTP method we use to call voice_url | +**VoiceUrl** | Pointer to **string** | The URL we call when the SIM-connected device makes a voice call | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/wireless/v1/docs/WirelessV1SimDataSession.md b/twilio/rest/wireless/v1/docs/WirelessV1SimDataSession.md index a2cdefdbc..177728ce4 100644 --- a/twilio/rest/wireless/v1/docs/WirelessV1SimDataSession.md +++ b/twilio/rest/wireless/v1/docs/WirelessV1SimDataSession.md @@ -1,24 +1,24 @@ # WirelessV1SimDataSession ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**CellId** | Pointer to **string** | -**CellLocationEstimate** | Pointer to **map[string]interface{}** | -**End** | Pointer to [**time.Time**](time.Time.md) | -**Imei** | Pointer to **string** | -**LastUpdated** | Pointer to [**time.Time**](time.Time.md) | -**OperatorCountry** | Pointer to **string** | -**OperatorMcc** | Pointer to **string** | -**OperatorMnc** | Pointer to **string** | -**OperatorName** | Pointer to **string** | -**PacketsDownloaded** | Pointer to **int32** | -**PacketsUploaded** | Pointer to **int32** | -**RadioLink** | Pointer to **string** | -**Sid** | Pointer to **string** | -**SimSid** | Pointer to **string** | -**Start** | Pointer to [**time.Time**](time.Time.md) | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**CellId** | Pointer to **string** | The unique ID of the cellular tower that the device was attached to at the moment when the Data Session was last updated | +**CellLocationEstimate** | Pointer to **map[string]interface{}** | An object with the estimated location where the device's Data Session took place | +**End** | Pointer to [**time.Time**](time.Time.md) | The date that the record ended, given as GMT in ISO 8601 format | +**Imei** | Pointer to **string** | The unique ID of the device using the SIM to connect | +**LastUpdated** | Pointer to [**time.Time**](time.Time.md) | The date that the resource was last updated, given as GMT in ISO 8601 format | +**OperatorCountry** | Pointer to **string** | The three letter country code representing where the device's Data Session took place | +**OperatorMcc** | Pointer to **string** | The 'mobile country code' is the unique ID of the home country where the Data Session took place | +**OperatorMnc** | Pointer to **string** | The 'mobile network code' is the unique ID specific to the mobile operator network where the Data Session took place | +**OperatorName** | Pointer to **string** | The friendly name of the mobile operator network that the SIM-connected device is attached to | +**PacketsDownloaded** | Pointer to **int32** | The number of packets downloaded by the device between the start time and when the Data Session was last updated | +**PacketsUploaded** | Pointer to **int32** | The number of packets uploaded by the device between the start time and when the Data Session was last updated | +**RadioLink** | Pointer to **string** | The generation of wireless technology that the device was using | +**Sid** | Pointer to **string** | The unique string that identifies the resource | +**SimSid** | Pointer to **string** | The SID of the Sim resource that the Data Session is for | +**Start** | Pointer to [**time.Time**](time.Time.md) | The date that the Data Session started, given as GMT in ISO 8601 format | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/wireless/v1/docs/WirelessV1SimUsageRecord.md b/twilio/rest/wireless/v1/docs/WirelessV1SimUsageRecord.md index 9cc6a31cf..37418a129 100644 --- a/twilio/rest/wireless/v1/docs/WirelessV1SimUsageRecord.md +++ b/twilio/rest/wireless/v1/docs/WirelessV1SimUsageRecord.md @@ -1,13 +1,13 @@ # WirelessV1SimUsageRecord ## Properties -Name | Type | Notes ------------- | ------------- | ------------- -**AccountSid** | Pointer to **string** | -**Commands** | Pointer to **map[string]interface{}** | -**Data** | Pointer to **map[string]interface{}** | -**Period** | Pointer to **map[string]interface{}** | -**SimSid** | Pointer to **string** | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | Pointer to **string** | The SID of the Account that created the resource | +**Commands** | Pointer to **map[string]interface{}** | An object that describes the SIM's usage of Commands during the specified period | +**Data** | Pointer to **map[string]interface{}** | An object that describes the SIM's data usage during the specified period | +**Period** | Pointer to **map[string]interface{}** | The time period for which the usage is reported | +**SimSid** | Pointer to **string** | The SID of the Sim resource that this Usage Record is for | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twilio/rest/wireless/v1/model_wireless_v1_account_usage_record.go b/twilio/rest/wireless/v1/model_wireless_v1_account_usage_record.go index 4bde0feed..f21cbbaba 100644 --- a/twilio/rest/wireless/v1/model_wireless_v1_account_usage_record.go +++ b/twilio/rest/wireless/v1/model_wireless_v1_account_usage_record.go @@ -13,8 +13,12 @@ package openapi // WirelessV1AccountUsageRecord struct for WirelessV1AccountUsageRecord type WirelessV1AccountUsageRecord struct { - AccountSid *string `json:"AccountSid,omitempty"` - Commands *map[string]interface{} `json:"Commands,omitempty"` - Data *map[string]interface{} `json:"Data,omitempty"` - Period *map[string]interface{} `json:"Period,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // An object that describes the aggregated Commands usage for all SIMs during the specified period + Commands *map[string]interface{} `json:"Commands,omitempty"` + // An object that describes the aggregated Data usage for all SIMs over the period + Data *map[string]interface{} `json:"Data,omitempty"` + // The time period for which usage is reported + Period *map[string]interface{} `json:"Period,omitempty"` } diff --git a/twilio/rest/wireless/v1/model_wireless_v1_command.go b/twilio/rest/wireless/v1/model_wireless_v1_command.go index 2e970e797..7099c10e9 100644 --- a/twilio/rest/wireless/v1/model_wireless_v1_command.go +++ b/twilio/rest/wireless/v1/model_wireless_v1_command.go @@ -17,16 +17,28 @@ import ( // WirelessV1Command struct for WirelessV1Command type WirelessV1Command struct { - AccountSid *string `json:"AccountSid,omitempty"` - Command *string `json:"Command,omitempty"` - CommandMode *CommandCommandMode `json:"CommandMode,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - DeliveryReceiptRequested *bool `json:"DeliveryReceiptRequested,omitempty"` - Direction *CommandDirection `json:"Direction,omitempty"` - Sid *string `json:"Sid,omitempty"` - SimSid *string `json:"SimSid,omitempty"` - Status *CommandStatus `json:"Status,omitempty"` - Transport *CommandTransport `json:"Transport,omitempty"` - Url *string `json:"Url,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The message being sent to or from the SIM + Command *string `json:"Command,omitempty"` + // The mode used to send the SMS message + CommandMode *string `json:"CommandMode,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the resource was last updated format + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // Whether to request a delivery receipt + DeliveryReceiptRequested *bool `json:"DeliveryReceiptRequested,omitempty"` + // The direction of the Command + Direction *string `json:"Direction,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The SID of the Sim resource that the Command was sent to or from + SimSid *string `json:"SimSid,omitempty"` + // The status of the Command + Status *string `json:"Status,omitempty"` + // The type of transport used + Transport *string `json:"Transport,omitempty"` + // The absolute URL of the resource + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/wireless/v1/model_wireless_v1_rate_plan.go b/twilio/rest/wireless/v1/model_wireless_v1_rate_plan.go index e46cd4a2c..c987f3933 100644 --- a/twilio/rest/wireless/v1/model_wireless_v1_rate_plan.go +++ b/twilio/rest/wireless/v1/model_wireless_v1_rate_plan.go @@ -17,20 +17,36 @@ import ( // WirelessV1RatePlan struct for WirelessV1RatePlan type WirelessV1RatePlan struct { - AccountSid *string `json:"AccountSid,omitempty"` - DataEnabled *bool `json:"DataEnabled,omitempty"` - DataLimit *int32 `json:"DataLimit,omitempty"` - DataMetering *string `json:"DataMetering,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - InternationalRoaming *[]string `json:"InternationalRoaming,omitempty"` - InternationalRoamingDataLimit *int32 `json:"InternationalRoamingDataLimit,omitempty"` - MessagingEnabled *bool `json:"MessagingEnabled,omitempty"` - NationalRoamingDataLimit *int32 `json:"NationalRoamingDataLimit,omitempty"` - NationalRoamingEnabled *bool `json:"NationalRoamingEnabled,omitempty"` - Sid *string `json:"Sid,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` - Url *string `json:"Url,omitempty"` - VoiceEnabled *bool `json:"VoiceEnabled,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // Whether SIMs can use GPRS/3G/4G/LTE data connectivity + DataEnabled *bool `json:"DataEnabled,omitempty"` + // The total data usage in Megabytes that the Network allows during one month on the home network + DataLimit *int32 `json:"DataLimit,omitempty"` + // The model used to meter data usage + DataMetering *string `json:"DataMetering,omitempty"` + // The date when the resource was created, given as GMT in ISO 8601 format + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The date when the resource was last updated, given as GMT in ISO 8601 format + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // The string that you assigned to describe the resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // The services that SIMs capable of using GPRS/3G/4G/LTE data connectivity can use outside of the United States + InternationalRoaming *[]string `json:"InternationalRoaming,omitempty"` + // The total data usage (download and upload combined) in Megabytes that the Network allows during one month when roaming outside the United States + InternationalRoamingDataLimit *int32 `json:"InternationalRoamingDataLimit,omitempty"` + // Whether SIMs can make, send, and receive SMS using Commands + MessagingEnabled *bool `json:"MessagingEnabled,omitempty"` + // The total data usage in Megabytes that the Network allows during one month on non-home networks in the United States + NationalRoamingDataLimit *int32 `json:"NationalRoamingDataLimit,omitempty"` + // Whether SIMs can roam on networks other than the home network in the United States + NationalRoamingEnabled *bool `json:"NationalRoamingEnabled,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // An application-defined string that uniquely identifies the resource + UniqueName *string `json:"UniqueName,omitempty"` + // The absolute URL of the resource + Url *string `json:"Url,omitempty"` + // Whether SIMs can make and receive voice calls + VoiceEnabled *bool `json:"VoiceEnabled,omitempty"` } diff --git a/twilio/rest/wireless/v1/model_wireless_v1_sim.go b/twilio/rest/wireless/v1/model_wireless_v1_sim.go index b6f87e413..74b8a206d 100644 --- a/twilio/rest/wireless/v1/model_wireless_v1_sim.go +++ b/twilio/rest/wireless/v1/model_wireless_v1_sim.go @@ -17,28 +17,52 @@ import ( // WirelessV1Sim struct for WirelessV1Sim type WirelessV1Sim struct { - AccountSid *string `json:"AccountSid,omitempty"` - CommandsCallbackMethod *HttpMethod `json:"CommandsCallbackMethod,omitempty"` - CommandsCallbackUrl *string `json:"CommandsCallbackUrl,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - EId *string `json:"EId,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Iccid *string `json:"Iccid,omitempty"` - IpAddress *string `json:"IpAddress,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - RatePlanSid *string `json:"RatePlanSid,omitempty"` - ResetStatus *SimResetStatus `json:"ResetStatus,omitempty"` - Sid *string `json:"Sid,omitempty"` - SmsFallbackMethod *HttpMethod `json:"SmsFallbackMethod,omitempty"` - SmsFallbackUrl *string `json:"SmsFallbackUrl,omitempty"` - SmsMethod *HttpMethod `json:"SmsMethod,omitempty"` - SmsUrl *string `json:"SmsUrl,omitempty"` - Status *SimStatus `json:"Status,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` - Url *string `json:"Url,omitempty"` - VoiceFallbackMethod *HttpMethod `json:"VoiceFallbackMethod,omitempty"` - VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` - VoiceMethod *HttpMethod `json:"VoiceMethod,omitempty"` - VoiceUrl *string `json:"VoiceUrl,omitempty"` + // The SID of the Account to which the Sim resource belongs + AccountSid *string `json:"AccountSid,omitempty"` + // The HTTP method we use to call commands_callback_url + CommandsCallbackMethod *string `json:"CommandsCallbackMethod,omitempty"` + // The URL we call when the SIM originates a machine-to-machine Command + CommandsCallbackUrl *string `json:"CommandsCallbackUrl,omitempty"` + // The ISO 8601 date and time in GMT when the resource was created + DateCreated *time.Time `json:"DateCreated,omitempty"` + // The ISO 8601 date and time in GMT when the Sim resource was last updated + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + // Deprecated + EId *string `json:"EId,omitempty"` + // The string that you assigned to describe the Sim resource + FriendlyName *string `json:"FriendlyName,omitempty"` + // The ICCID associated with the SIM + Iccid *string `json:"Iccid,omitempty"` + // Deprecated + IpAddress *string `json:"IpAddress,omitempty"` + // The URLs of related subresources + Links *map[string]interface{} `json:"Links,omitempty"` + // The SID of the RatePlan resource to which the Sim resource is assigned. + RatePlanSid *string `json:"RatePlanSid,omitempty"` + // The connectivity reset status of the SIM + ResetStatus *string `json:"ResetStatus,omitempty"` + // The unique string that identifies the Sim resource + Sid *string `json:"Sid,omitempty"` + // The HTTP method we use to call sms_fallback_url + SmsFallbackMethod *string `json:"SmsFallbackMethod,omitempty"` + // The URL we call when an error occurs while retrieving or executing the TwiML requested from the sms_url + SmsFallbackUrl *string `json:"SmsFallbackUrl,omitempty"` + // The HTTP method we use to call sms_url + SmsMethod *string `json:"SmsMethod,omitempty"` + // The URL we call when the SIM-connected device sends an SMS message that is not a Command + SmsUrl *string `json:"SmsUrl,omitempty"` + // The status of the Sim resource + Status *string `json:"Status,omitempty"` + // An application-defined string that uniquely identifies the resource + UniqueName *string `json:"UniqueName,omitempty"` + // The absolute URL of the resource + Url *string `json:"Url,omitempty"` + // The HTTP method we use to call voice_fallback_url + VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"` + // The URL we call when an error occurs while retrieving or executing the TwiML requested from voice_url + VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` + // The HTTP method we use to call voice_url + VoiceMethod *string `json:"VoiceMethod,omitempty"` + // The URL we call when the SIM-connected device makes a voice call + VoiceUrl *string `json:"VoiceUrl,omitempty"` } diff --git a/twilio/rest/wireless/v1/model_wireless_v1_sim_data_session.go b/twilio/rest/wireless/v1/model_wireless_v1_sim_data_session.go index be23dce08..40df0f18a 100644 --- a/twilio/rest/wireless/v1/model_wireless_v1_sim_data_session.go +++ b/twilio/rest/wireless/v1/model_wireless_v1_sim_data_session.go @@ -17,20 +17,36 @@ import ( // WirelessV1SimDataSession struct for WirelessV1SimDataSession type WirelessV1SimDataSession struct { - AccountSid *string `json:"AccountSid,omitempty"` - CellId *string `json:"CellId,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // The unique ID of the cellular tower that the device was attached to at the moment when the Data Session was last updated + CellId *string `json:"CellId,omitempty"` + // An object with the estimated location where the device's Data Session took place CellLocationEstimate *map[string]interface{} `json:"CellLocationEstimate,omitempty"` - End *time.Time `json:"End,omitempty"` - Imei *string `json:"Imei,omitempty"` - LastUpdated *time.Time `json:"LastUpdated,omitempty"` - OperatorCountry *string `json:"OperatorCountry,omitempty"` - OperatorMcc *string `json:"OperatorMcc,omitempty"` - OperatorMnc *string `json:"OperatorMnc,omitempty"` - OperatorName *string `json:"OperatorName,omitempty"` - PacketsDownloaded *int32 `json:"PacketsDownloaded,omitempty"` - PacketsUploaded *int32 `json:"PacketsUploaded,omitempty"` - RadioLink *string `json:"RadioLink,omitempty"` - Sid *string `json:"Sid,omitempty"` - SimSid *string `json:"SimSid,omitempty"` - Start *time.Time `json:"Start,omitempty"` + // The date that the record ended, given as GMT in ISO 8601 format + End *time.Time `json:"End,omitempty"` + // The unique ID of the device using the SIM to connect + Imei *string `json:"Imei,omitempty"` + // The date that the resource was last updated, given as GMT in ISO 8601 format + LastUpdated *time.Time `json:"LastUpdated,omitempty"` + // The three letter country code representing where the device's Data Session took place + OperatorCountry *string `json:"OperatorCountry,omitempty"` + // The 'mobile country code' is the unique ID of the home country where the Data Session took place + OperatorMcc *string `json:"OperatorMcc,omitempty"` + // The 'mobile network code' is the unique ID specific to the mobile operator network where the Data Session took place + OperatorMnc *string `json:"OperatorMnc,omitempty"` + // The friendly name of the mobile operator network that the SIM-connected device is attached to + OperatorName *string `json:"OperatorName,omitempty"` + // The number of packets downloaded by the device between the start time and when the Data Session was last updated + PacketsDownloaded *int32 `json:"PacketsDownloaded,omitempty"` + // The number of packets uploaded by the device between the start time and when the Data Session was last updated + PacketsUploaded *int32 `json:"PacketsUploaded,omitempty"` + // The generation of wireless technology that the device was using + RadioLink *string `json:"RadioLink,omitempty"` + // The unique string that identifies the resource + Sid *string `json:"Sid,omitempty"` + // The SID of the Sim resource that the Data Session is for + SimSid *string `json:"SimSid,omitempty"` + // The date that the Data Session started, given as GMT in ISO 8601 format + Start *time.Time `json:"Start,omitempty"` } diff --git a/twilio/rest/wireless/v1/model_wireless_v1_sim_usage_record.go b/twilio/rest/wireless/v1/model_wireless_v1_sim_usage_record.go index aab035d0b..35db06e8e 100644 --- a/twilio/rest/wireless/v1/model_wireless_v1_sim_usage_record.go +++ b/twilio/rest/wireless/v1/model_wireless_v1_sim_usage_record.go @@ -13,9 +13,14 @@ package openapi // WirelessV1SimUsageRecord struct for WirelessV1SimUsageRecord type WirelessV1SimUsageRecord struct { - AccountSid *string `json:"AccountSid,omitempty"` - Commands *map[string]interface{} `json:"Commands,omitempty"` - Data *map[string]interface{} `json:"Data,omitempty"` - Period *map[string]interface{} `json:"Period,omitempty"` - SimSid *string `json:"SimSid,omitempty"` + // The SID of the Account that created the resource + AccountSid *string `json:"AccountSid,omitempty"` + // An object that describes the SIM's usage of Commands during the specified period + Commands *map[string]interface{} `json:"Commands,omitempty"` + // An object that describes the SIM's data usage during the specified period + Data *map[string]interface{} `json:"Data,omitempty"` + // The time period for which the usage is reported + Period *map[string]interface{} `json:"Period,omitempty"` + // The SID of the Sim resource that this Usage Record is for + SimSid *string `json:"SimSid,omitempty"` } From c2c8470f6748cff66095cea2fae592ad6c2786c9 Mon Sep 17 00:00:00 2001 From: Jennifer Mah Date: Thu, 11 Mar 2021 17:26:49 -0700 Subject: [PATCH 2/3] regenerate with imports from oai-generator --- twilio/rest/accounts/v1/api_default.go | 466 +- .../model_accounts_v1_auth_token_promotion.go | 16 +- ...l_accounts_v1_credential_credential_aws.go | 16 +- ...nts_v1_credential_credential_public_key.go | 16 +- .../model_accounts_v1_secondary_auth_token.go | 16 +- .../v1/model_list_credential_aws_response.go | 17 +- ...model_list_credential_aws_response_meta.go | 27 +- ...del_list_credential_public_key_response.go | 17 +- twilio/rest/api/v2010/api_default.go | 11126 ++++++++-------- .../rest/api/v2010/model_api_v2010_account.go | 15 +- .../v2010/model_api_v2010_account_address.go | 15 +- ..._account_address_dependent_phone_number.go | 15 +- .../model_api_v2010_account_application.go | 15 +- ...pi_v2010_account_authorized_connect_app.go | 15 +- ..._account_available_phone_number_country.go | 15 +- ...er_country_available_phone_number_local.go | 17 +- ...ailable_phone_number_local_capabilities.go | 21 +- ...ailable_phone_number_machine_to_machine.go | 17 +- ...r_country_available_phone_number_mobile.go | 17 +- ...country_available_phone_number_national.go | 17 +- ...ntry_available_phone_number_shared_cost.go | 17 +- ...ountry_available_phone_number_toll_free.go | 17 +- ...ber_country_available_phone_number_voip.go | 17 +- .../v2010/model_api_v2010_account_balance.go | 15 +- .../api/v2010/model_api_v2010_account_call.go | 15 +- ...model_api_v2010_account_call_call_event.go | 15 +- ...el_api_v2010_account_call_call_feedback.go | 15 +- ...2010_account_call_call_feedback_summary.go | 16 +- ...count_call_call_feedback_summary_issues.go | 21 +- ...pi_v2010_account_call_call_notification.go | 15 +- ...account_call_call_notification_instance.go | 15 +- ...l_api_v2010_account_call_call_recording.go | 15 +- .../model_api_v2010_account_call_payments.go | 15 +- .../model_api_v2010_account_conference.go | 15 +- ...account_conference_conference_recording.go | 15 +- ...pi_v2010_account_conference_participant.go | 15 +- .../model_api_v2010_account_connect_app.go | 15 +- ...api_v2010_account_incoming_phone_number.go | 19 +- ...ount_incoming_phone_number_capabilities.go | 21 +- ...r_incoming_phone_number_assigned_add_on.go | 15 +- ..._phone_number_assigned_add_on_extension.go | 15 +- ...hone_number_incoming_phone_number_local.go | 19 +- ...one_number_incoming_phone_number_mobile.go | 19 +- ..._number_incoming_phone_number_toll_free.go | 19 +- .../api/v2010/model_api_v2010_account_key.go | 15 +- .../v2010/model_api_v2010_account_message.go | 15 +- .../model_api_v2010_account_message_media.go | 15 +- ..._v2010_account_message_message_feedback.go | 15 +- .../v2010/model_api_v2010_account_new_key.go | 15 +- ...model_api_v2010_account_new_signing_key.go | 15 +- .../model_api_v2010_account_notification.go | 15 +- ...api_v2010_account_notification_instance.go | 15 +- ...el_api_v2010_account_outgoing_caller_id.go | 15 +- .../v2010/model_api_v2010_account_queue.go | 15 +- .../model_api_v2010_account_queue_member.go | 15 +- .../model_api_v2010_account_recording.go | 15 +- ...count_recording_recording_add_on_result.go | 15 +- ..._result_recording_add_on_result_payload.go | 15 +- ...count_recording_recording_transcription.go | 15 +- .../model_api_v2010_account_short_code.go | 15 +- .../model_api_v2010_account_signing_key.go | 21 +- ...i_v2010_account_sip_sip_credential_list.go | 15 +- ..._sip_sip_credential_list_sip_credential.go | 15 +- .../model_api_v2010_account_sip_sip_domain.go | 15 +- ..._sip_auth_calls_credential_list_mapping.go | 15 +- ...th_calls_ip_access_control_list_mapping.go | 15 +- ...h_registrations_credential_list_mapping.go | 15 +- ..._sip_domain_sip_credential_list_mapping.go | 15 +- ...main_sip_ip_access_control_list_mapping.go | 15 +- ..._account_sip_sip_ip_access_control_list.go | 15 +- ...p_ip_access_control_list_sip_ip_address.go | 15 +- .../v2010/model_api_v2010_account_token.go | 15 +- ...del_api_v2010_account_token_ice_servers.go | 21 +- .../model_api_v2010_account_transcription.go | 15 +- ...el_api_v2010_account_usage_usage_record.go | 16 +- ...sage_usage_record_usage_record_all_time.go | 16 +- ...t_usage_usage_record_usage_record_daily.go | 16 +- ...ge_usage_record_usage_record_last_month.go | 16 +- ...usage_usage_record_usage_record_monthly.go | 16 +- ...ge_usage_record_usage_record_this_month.go | 16 +- ...t_usage_usage_record_usage_record_today.go | 16 +- ..._usage_usage_record_usage_record_yearly.go | 16 +- ...age_usage_record_usage_record_yesterday.go | 16 +- ...l_api_v2010_account_usage_usage_trigger.go | 15 +- ...el_api_v2010_account_validation_request.go | 15 +- .../api/v2010/model_list_account_response.go | 33 +- .../api/v2010/model_list_address_response.go | 33 +- .../v2010/model_list_application_response.go | 33 +- ...el_list_authorized_connect_app_response.go | 31 +- ...available_phone_number_country_response.go | 33 +- ...t_available_phone_number_local_response.go | 31 +- ...hone_number_machine_to_machine_response.go | 31 +- ..._available_phone_number_mobile_response.go | 31 +- ...vailable_phone_number_national_response.go | 31 +- ...lable_phone_number_shared_cost_response.go | 31 +- ...ailable_phone_number_toll_free_response.go | 31 +- ...st_available_phone_number_voip_response.go | 31 +- .../v2010/model_list_call_event_response.go | 33 +- .../model_list_call_notification_response.go | 33 +- .../model_list_call_recording_response.go | 33 +- .../api/v2010/model_list_call_response.go | 33 +- ...odel_list_conference_recording_response.go | 33 +- .../v2010/model_list_conference_response.go | 33 +- .../v2010/model_list_connect_app_response.go | 33 +- ...el_list_dependent_phone_number_response.go | 31 +- ...mber_assigned_add_on_extension_response.go | 33 +- ...g_phone_number_assigned_add_on_response.go | 33 +- ...st_incoming_phone_number_local_response.go | 31 +- ...t_incoming_phone_number_mobile_response.go | 31 +- ...del_list_incoming_phone_number_response.go | 31 +- ...ncoming_phone_number_toll_free_response.go | 31 +- .../rest/api/v2010/model_list_key_response.go | 33 +- .../api/v2010/model_list_media_response.go | 33 +- .../api/v2010/model_list_member_response.go | 33 +- .../api/v2010/model_list_message_response.go | 33 +- .../v2010/model_list_notification_response.go | 33 +- .../model_list_outgoing_caller_id_response.go | 31 +- .../v2010/model_list_participant_response.go | 33 +- .../api/v2010/model_list_queue_response.go | 33 +- ...ecording_add_on_result_payload_response.go | 33 +- ...l_list_recording_add_on_result_response.go | 33 +- .../v2010/model_list_recording_response.go | 33 +- ...l_list_recording_transcription_response.go | 33 +- .../v2010/model_list_short_code_response.go | 33 +- .../v2010/model_list_signing_key_response.go | 33 +- ..._calls_credential_list_mapping_response.go | 33 +- ...ip_access_control_list_mapping_response.go | 33 +- ...ations_credential_list_mapping_response.go | 33 +- ...st_sip_credential_list_mapping_response.go | 31 +- ...model_list_sip_credential_list_response.go | 31 +- .../model_list_sip_credential_response.go | 33 +- .../v2010/model_list_sip_domain_response.go | 33 +- ...ip_access_control_list_mapping_response.go | 31 +- ...ist_sip_ip_access_control_list_response.go | 31 +- .../model_list_sip_ip_address_response.go | 33 +- .../model_list_transcription_response.go | 33 +- ...del_list_usage_record_all_time_response.go | 33 +- .../model_list_usage_record_daily_response.go | 33 +- ...l_list_usage_record_last_month_response.go | 33 +- ...odel_list_usage_record_monthly_response.go | 33 +- .../v2010/model_list_usage_record_response.go | 33 +- ...l_list_usage_record_this_month_response.go | 33 +- .../model_list_usage_record_today_response.go | 33 +- ...model_list_usage_record_yearly_response.go | 33 +- ...el_list_usage_record_yesterday_response.go | 33 +- .../model_list_usage_trigger_response.go | 33 +- twilio/rest/autopilot/v1/api_default.go | 2162 +-- .../v1/model_autopilot_v1_assistant.go | 16 +- .../model_autopilot_v1_assistant_defaults.go | 15 +- .../model_autopilot_v1_assistant_dialogue.go | 15 +- ...model_autopilot_v1_assistant_field_type.go | 16 +- ...lot_v1_assistant_field_type_field_value.go | 16 +- ...odel_autopilot_v1_assistant_model_build.go | 16 +- .../v1/model_autopilot_v1_assistant_query.go | 16 +- ...odel_autopilot_v1_assistant_style_sheet.go | 15 +- .../v1/model_autopilot_v1_assistant_task.go | 16 +- ...model_autopilot_v1_assistant_task_field.go | 16 +- ...odel_autopilot_v1_assistant_task_sample.go | 16 +- ...utopilot_v1_assistant_task_task_actions.go | 15 +- ...pilot_v1_assistant_task_task_statistics.go | 15 +- .../model_autopilot_v1_assistant_webhook.go | 16 +- .../model_autopilot_v1_restore_assistant.go | 16 +- .../v1/model_list_assistant_response.go | 19 +- .../v1/model_list_assistant_response_meta.go | 27 +- .../autopilot/v1/model_list_field_response.go | 17 +- .../v1/model_list_field_type_response.go | 17 +- .../v1/model_list_field_value_response.go | 17 +- .../v1/model_list_model_build_response.go | 17 +- .../autopilot/v1/model_list_query_response.go | 17 +- .../v1/model_list_sample_response.go | 17 +- .../autopilot/v1/model_list_task_response.go | 17 +- .../v1/model_list_webhook_response.go | 17 +- twilio/rest/bulkexports/v1/api_default.go | 366 +- .../v1/model_bulkexports_v1_export.go | 15 +- ...del_bulkexports_v1_export_configuration.go | 15 +- .../v1/model_bulkexports_v1_export_day.go | 15 +- ...odel_bulkexports_v1_export_day_instance.go | 15 +- ...bulkexports_v1_export_export_custom_job.go | 15 +- .../v1/model_bulkexports_v1_export_job.go | 17 +- .../bulkexports/v1/model_list_day_response.go | 17 +- .../v1/model_list_day_response_meta.go | 27 +- .../model_list_export_custom_job_response.go | 17 +- twilio/rest/chat/v1/api_default.go | 2033 +-- .../rest/chat/v1/model_chat_v1_credential.go | 16 +- twilio/rest/chat/v1/model_chat_v1_service.go | 16 +- .../chat/v1/model_chat_v1_service_channel.go | 16 +- .../model_chat_v1_service_channel_invite.go | 16 +- .../model_chat_v1_service_channel_member.go | 16 +- .../model_chat_v1_service_channel_message.go | 16 +- .../chat/v1/model_chat_v1_service_role.go | 16 +- .../chat/v1/model_chat_v1_service_user.go | 16 +- ...model_chat_v1_service_user_user_channel.go | 15 +- .../chat/v1/model_list_channel_response.go | 19 +- .../chat/v1/model_list_credential_response.go | 19 +- .../v1/model_list_credential_response_meta.go | 27 +- .../chat/v1/model_list_invite_response.go | 17 +- .../chat/v1/model_list_member_response.go | 17 +- .../chat/v1/model_list_message_response.go | 17 +- .../rest/chat/v1/model_list_role_response.go | 19 +- .../chat/v1/model_list_service_response.go | 19 +- .../v1/model_list_user_channel_response.go | 17 +- .../rest/chat/v1/model_list_user_response.go | 19 +- twilio/rest/chat/v2/api_default.go | 2621 ++-- .../rest/chat/v2/model_chat_v2_credential.go | 16 +- twilio/rest/chat/v2/model_chat_v2_service.go | 16 +- .../chat/v2/model_chat_v2_service_binding.go | 16 +- .../chat/v2/model_chat_v2_service_channel.go | 16 +- ...chat_v2_service_channel_channel_webhook.go | 16 +- .../model_chat_v2_service_channel_invite.go | 16 +- .../model_chat_v2_service_channel_member.go | 16 +- .../model_chat_v2_service_channel_message.go | 16 +- .../chat/v2/model_chat_v2_service_role.go | 16 +- .../chat/v2/model_chat_v2_service_user.go | 16 +- ...model_chat_v2_service_user_user_binding.go | 16 +- ...model_chat_v2_service_user_user_channel.go | 15 +- .../chat/v2/model_list_binding_response.go | 19 +- .../chat/v2/model_list_channel_response.go | 19 +- .../v2/model_list_channel_webhook_response.go | 17 +- .../chat/v2/model_list_credential_response.go | 19 +- .../v2/model_list_credential_response_meta.go | 27 +- .../chat/v2/model_list_invite_response.go | 17 +- .../chat/v2/model_list_member_response.go | 17 +- .../chat/v2/model_list_message_response.go | 17 +- .../rest/chat/v2/model_list_role_response.go | 19 +- .../chat/v2/model_list_service_response.go | 19 +- .../v2/model_list_user_binding_response.go | 17 +- .../v2/model_list_user_channel_response.go | 17 +- .../rest/chat/v2/model_list_user_response.go | 19 +- twilio/rest/conversations/v1/api_default.go | 4015 +++--- .../model_conversations_v1_configuration.go | 15 +- ..._v1_configuration_configuration_webhook.go | 15 +- .../v1/model_conversations_v1_conversation.go | 16 +- ...ns_v1_conversation_conversation_message.go | 16 +- ...on_message_conversation_message_receipt.go | 16 +- ...1_conversation_conversation_participant.go | 16 +- ...onversation_conversation_scoped_webhook.go | 16 +- .../v1/model_conversations_v1_credential.go | 16 +- .../v1/model_conversations_v1_role.go | 16 +- .../v1/model_conversations_v1_service.go | 16 +- ...onversations_v1_service_service_binding.go | 16 +- ...ations_v1_service_service_configuration.go | 15 +- ...vice_configuration_service_notification.go | 15 +- ...sations_v1_service_service_conversation.go | 16 +- ...nversation_service_conversation_message.go | 16 +- ...ge_service_conversation_message_receipt.go | 16 +- ...sation_service_conversation_participant.go | 16 +- ...ion_service_conversation_scoped_webhook.go | 16 +- ...l_conversations_v1_service_service_role.go | 16 +- ...l_conversations_v1_service_service_user.go | 16 +- .../v1/model_conversations_v1_user.go | 16 +- ...t_conversation_message_receipt_response.go | 17 +- ...odel_list_conversation_message_response.go | 17 +- ..._list_conversation_participant_response.go | 17 +- .../v1/model_list_conversation_response.go | 17 +- .../model_list_conversation_response_meta.go | 27 +- ...st_conversation_scoped_webhook_response.go | 17 +- .../v1/model_list_credential_response.go | 19 +- .../v1/model_list_role_response.go | 19 +- .../v1/model_list_service_binding_response.go | 17 +- ...e_conversation_message_receipt_response.go | 17 +- ...t_service_conversation_message_response.go | 17 +- ...rvice_conversation_participant_response.go | 17 +- ...odel_list_service_conversation_response.go | 17 +- ...ce_conversation_scoped_webhook_response.go | 17 +- .../v1/model_list_service_response.go | 19 +- .../v1/model_list_service_role_response.go | 17 +- .../v1/model_list_service_user_response.go | 17 +- .../v1/model_list_user_response.go | 19 +- twilio/rest/events/v1/api_default.go | 650 +- .../events/v1/model_events_v1_event_type.go | 20 +- .../rest/events/v1/model_events_v1_schema.go | 16 +- .../v1/model_events_v1_schema_version.go | 18 +- twilio/rest/events/v1/model_events_v1_sink.go | 16 +- .../v1/model_events_v1_sink_sink_test_.go | 15 +- .../v1/model_events_v1_sink_sink_validate.go | 15 +- .../events/v1/model_events_v1_subscription.go | 16 +- ...events_v1_subscription_subscribed_event.go | 15 +- .../v1/model_list_event_type_response.go | 19 +- .../events/v1/model_list_sink_response.go | 19 +- .../model_list_subscribed_event_response.go | 17 +- .../v1/model_list_subscription_response.go | 19 +- .../events/v1/model_list_version_response.go | 17 +- .../v1/model_list_version_response_meta.go | 27 +- twilio/rest/fax/v1/api_default.go | 374 +- twilio/rest/fax/v1/model_fax_v1_fax.go | 16 +- .../rest/fax/v1/model_fax_v1_fax_fax_media.go | 16 +- .../fax/v1/model_list_fax_media_response.go | 19 +- twilio/rest/fax/v1/model_list_fax_response.go | 19 +- .../fax/v1/model_list_fax_response_meta.go | 27 +- twilio/rest/flex/v1/api_default.go | 932 +- twilio/rest/flex/v1/model_flex_v1_channel.go | 16 +- .../flex/v1/model_flex_v1_configuration.go | 16 +- .../rest/flex/v1/model_flex_v1_flex_flow.go | 16 +- .../rest/flex/v1/model_flex_v1_web_channel.go | 16 +- .../flex/v1/model_list_channel_response.go | 19 +- .../v1/model_list_channel_response_meta.go | 27 +- .../flex/v1/model_list_flex_flow_response.go | 19 +- .../v1/model_list_web_channel_response.go | 19 +- twilio/rest/insights/v1/api_default.go | 387 +- .../insights/v1/model_insights_v1_call.go | 19 +- .../v1/model_insights_v1_call_event.go | 35 +- .../v1/model_insights_v1_call_metric.go | 31 +- .../v1/model_insights_v1_call_summary.go | 58 +- .../model_insights_v1_video_room_summary.go | 68 +- ..._room_summary_video_participant_summary.go | 50 +- .../insights/v1/model_list_event_response.go | 19 +- .../insights/v1/model_list_metric_response.go | 19 +- ...list_video_participant_summary_response.go | 17 +- .../model_list_video_room_summary_response.go | 19 +- ...l_list_video_room_summary_response_meta.go | 27 +- twilio/rest/ip_messaging/v1/api_default.go | 2235 ++-- .../v1/model_ip_messaging_v1_credential.go | 32 +- .../v1/model_ip_messaging_v1_service.go | 58 +- .../model_ip_messaging_v1_service_channel.go | 44 +- ..._ip_messaging_v1_service_channel_invite.go | 32 +- ..._ip_messaging_v1_service_channel_member.go | 36 +- ...ip_messaging_v1_service_channel_message.go | 38 +- .../v1/model_ip_messaging_v1_service_role.go | 34 +- .../v1/model_ip_messaging_v1_service_user.go | 44 +- ..._messaging_v1_service_user_user_channel.go | 31 +- .../v1/model_list_channel_response.go | 17 +- .../v1/model_list_credential_response.go | 19 +- .../v1/model_list_credential_response_meta.go | 27 +- .../v1/model_list_invite_response.go | 17 +- .../v1/model_list_member_response.go | 17 +- .../v1/model_list_message_response.go | 17 +- .../v1/model_list_role_response.go | 17 +- .../v1/model_list_service_response.go | 19 +- .../v1/model_list_user_channel_response.go | 17 +- .../v1/model_list_user_response.go | 17 +- twilio/rest/ip_messaging/v2/api_default.go | 2861 ++-- .../v2/model_ip_messaging_v2_credential.go | 32 +- .../v2/model_ip_messaging_v2_service.go | 62 +- .../model_ip_messaging_v2_service_binding.go | 40 +- .../model_ip_messaging_v2_service_channel.go | 44 +- ...ging_v2_service_channel_channel_webhook.go | 32 +- ..._ip_messaging_v2_service_channel_invite.go | 32 +- ..._ip_messaging_v2_service_channel_member.go | 38 +- ...ip_messaging_v2_service_channel_message.go | 48 +- .../v2/model_ip_messaging_v2_service_role.go | 34 +- .../v2/model_ip_messaging_v2_service_user.go | 44 +- ..._messaging_v2_service_user_user_binding.go | 40 +- ..._messaging_v2_service_user_user_channel.go | 37 +- .../v2/model_list_binding_response.go | 17 +- .../v2/model_list_channel_response.go | 17 +- .../v2/model_list_channel_webhook_response.go | 17 +- .../v2/model_list_credential_response.go | 19 +- .../v2/model_list_credential_response_meta.go | 27 +- .../v2/model_list_invite_response.go | 17 +- .../v2/model_list_member_response.go | 17 +- .../v2/model_list_message_response.go | 17 +- .../v2/model_list_role_response.go | 17 +- .../v2/model_list_service_response.go | 19 +- .../v2/model_list_user_binding_response.go | 17 +- .../v2/model_list_user_channel_response.go | 17 +- .../v2/model_list_user_response.go | 17 +- twilio/rest/lookups/v1/api_default.go | 91 +- .../v1/model_lookups_v1_phone_number.go | 15 +- twilio/rest/messaging/v1/api_default.go | 926 +- .../v1/model_list_alpha_sender_response.go | 17 +- ...model_list_brand_registrations_response.go | 17 +- .../v1/model_list_phone_number_response.go | 17 +- .../v1/model_list_service_response.go | 19 +- .../v1/model_list_service_response_meta.go | 27 +- .../v1/model_list_short_code_response.go | 17 +- .../model_messaging_v1_brand_registrations.go | 16 +- .../v1/model_messaging_v1_deactivation.go | 15 +- .../v1/model_messaging_v1_service.go | 16 +- ...model_messaging_v1_service_alpha_sender.go | 16 +- ...model_messaging_v1_service_phone_number.go | 16 +- .../model_messaging_v1_service_short_code.go | 16 +- twilio/rest/monitor/v1/api_default.go | 236 +- .../monitor/v1/model_list_alert_response.go | 19 +- .../v1/model_list_alert_response_meta.go | 27 +- .../monitor/v1/model_list_event_response.go | 19 +- .../rest/monitor/v1/model_monitor_v1_alert.go | 16 +- .../v1/model_monitor_v1_alert_instance.go | 16 +- .../rest/monitor/v1/model_monitor_v1_event.go | 16 +- twilio/rest/notify/v1/api_default.go | 1083 +- .../notify/v1/model_list_binding_response.go | 19 +- .../v1/model_list_credential_response.go | 19 +- .../v1/model_list_credential_response_meta.go | 27 +- .../notify/v1/model_list_service_response.go | 19 +- .../notify/v1/model_notify_v1_credential.go | 16 +- .../rest/notify/v1/model_notify_v1_service.go | 16 +- .../v1/model_notify_v1_service_binding.go | 16 +- .../model_notify_v1_service_notification.go | 16 +- twilio/rest/numbers/v2/api_default.go | 1170 +- .../numbers/v2/model_list_bundle_response.go | 17 +- .../v2/model_list_bundle_response_meta.go | 27 +- .../v2/model_list_end_user_response.go | 17 +- .../v2/model_list_end_user_type_response.go | 17 +- .../v2/model_list_evaluation_response.go | 17 +- .../v2/model_list_item_assignment_response.go | 17 +- .../v2/model_list_regulation_response.go | 17 +- ...model_list_supporting_document_response.go | 17 +- ..._list_supporting_document_type_response.go | 17 +- ...numbers_v2_regulatory_compliance_bundle.go | 16 +- ...regulatory_compliance_bundle_evaluation.go | 20 +- ...atory_compliance_bundle_item_assignment.go | 16 +- ...mbers_v2_regulatory_compliance_end_user.go | 16 +- ..._v2_regulatory_compliance_end_user_type.go | 15 +- ...ers_v2_regulatory_compliance_regulation.go | 15 +- ...gulatory_compliance_supporting_document.go | 16 +- ...ory_compliance_supporting_document_type.go | 15 +- twilio/rest/pricing/v1/api_default.go | 260 +- .../model_list_messaging_country_response.go | 17 +- ...el_list_messaging_country_response_meta.go | 27 +- ...odel_list_phone_number_country_response.go | 17 +- .../v1/model_list_voice_country_response.go | 19 +- .../pricing/v1/model_pricing_v1_messaging.go | 19 +- ..._pricing_v1_messaging_messaging_country.go | 15 +- ...v1_messaging_messaging_country_instance.go | 15 +- ...ing_country_instance_inbound_sms_prices.go | 19 +- ...ng_country_instance_outbound_sms_prices.go | 23 +- .../v1/model_pricing_v1_phone_number.go | 19 +- ...ng_v1_phone_number_phone_number_country.go | 17 +- ...ne_number_phone_number_country_instance.go | 17 +- .../rest/pricing/v1/model_pricing_v1_voice.go | 19 +- .../model_pricing_v1_voice_voice_country.go | 15 +- ...pricing_v1_voice_voice_country_instance.go | 15 +- ...country_instance_outbound_prefix_prices.go | 23 +- .../v1/model_pricing_v1_voice_voice_number.go | 19 +- ...1_voice_voice_number_inbound_call_price.go | 19 +- ..._voice_voice_number_outbound_call_price.go | 17 +- twilio/rest/pricing/v2/api_default.go | 128 +- .../v2/model_list_voice_country_response.go | 17 +- .../model_list_voice_country_response_meta.go | 27 +- .../rest/pricing/v2/model_pricing_v2_voice.go | 15 +- .../model_pricing_v2_voice_voice_country.go | 15 +- ...pricing_v2_voice_voice_country_instance.go | 15 +- ...ce_country_instance_inbound_call_prices.go | 19 +- ...country_instance_outbound_prefix_prices.go | 21 +- .../v2/model_pricing_v2_voice_voice_number.go | 19 +- ...2_voice_voice_number_inbound_call_price.go | 19 +- ...voice_voice_number_outbound_call_prices.go | 19 +- twilio/rest/proxy/v1/api_default.go | 1252 +- .../v1/model_list_interaction_response.go | 17 +- ...model_list_message_interaction_response.go | 17 +- .../v1/model_list_participant_response.go | 17 +- .../v1/model_list_phone_number_response.go | 17 +- .../proxy/v1/model_list_service_response.go | 19 +- .../v1/model_list_service_response_meta.go | 27 +- .../proxy/v1/model_list_session_response.go | 17 +- .../v1/model_list_short_code_response.go | 17 +- .../rest/proxy/v1/model_proxy_v1_service.go | 16 +- .../v1/model_proxy_v1_service_phone_number.go | 18 +- ...xy_v1_service_phone_number_capabilities.go | 21 +- .../v1/model_proxy_v1_service_session.go | 16 +- ...el_proxy_v1_service_session_interaction.go | 16 +- ...el_proxy_v1_service_session_participant.go | 16 +- ...session_participant_message_interaction.go | 16 +- .../v1/model_proxy_v1_service_short_code.go | 18 +- ...roxy_v1_service_short_code_capabilities.go | 21 +- twilio/rest/serverless/v1/api_default.go | 1426 +- .../v1/model_list_asset_response.go | 17 +- .../v1/model_list_asset_version_response.go | 17 +- .../v1/model_list_build_response.go | 17 +- .../v1/model_list_deployment_response.go | 17 +- .../v1/model_list_environment_response.go | 17 +- .../v1/model_list_function_response.go | 17 +- .../model_list_function_version_response.go | 17 +- .../serverless/v1/model_list_log_response.go | 17 +- .../v1/model_list_service_response.go | 19 +- .../v1/model_list_service_response_meta.go | 27 +- .../v1/model_list_variable_response.go | 17 +- .../v1/model_serverless_v1_service.go | 16 +- .../v1/model_serverless_v1_service_asset.go | 16 +- ...rverless_v1_service_asset_asset_version.go | 16 +- .../v1/model_serverless_v1_service_build.go | 18 +- ...erverless_v1_service_build_build_status.go | 15 +- ...model_serverless_v1_service_environment.go | 16 +- ...rless_v1_service_environment_deployment.go | 16 +- ...l_serverless_v1_service_environment_log.go | 16 +- ...verless_v1_service_environment_variable.go | 16 +- .../model_serverless_v1_service_function.go | 16 +- ...ss_v1_service_function_function_version.go | 20 +- ...nction_version_function_version_content.go | 15 +- twilio/rest/studio/v1/api_default.go | 732 +- .../v1/model_list_engagement_response.go | 17 +- .../v1/model_list_execution_response.go | 17 +- .../v1/model_list_execution_step_response.go | 17 +- .../studio/v1/model_list_flow_response.go | 19 +- .../v1/model_list_flow_response_meta.go | 27 +- .../studio/v1/model_list_step_response.go | 17 +- twilio/rest/studio/v1/model_studio_v1_flow.go | 16 +- .../v1/model_studio_v1_flow_engagement.go | 16 +- ...o_v1_flow_engagement_engagement_context.go | 15 +- .../model_studio_v1_flow_engagement_step.go | 16 +- ...io_v1_flow_engagement_step_step_context.go | 15 +- .../v1/model_studio_v1_flow_execution.go | 16 +- ...dio_v1_flow_execution_execution_context.go | 15 +- ...studio_v1_flow_execution_execution_step.go | 16 +- ...n_execution_step_execution_step_context.go | 15 +- twilio/rest/studio/v2/api_default.go | 790 +- .../v2/model_list_execution_response.go | 17 +- .../v2/model_list_execution_step_response.go | 17 +- .../studio/v2/model_list_flow_response.go | 19 +- .../v2/model_list_flow_response_meta.go | 27 +- .../v2/model_list_flow_revision_response.go | 17 +- twilio/rest/studio/v2/model_studio_v2_flow.go | 20 +- .../v2/model_studio_v2_flow_execution.go | 16 +- ...dio_v2_flow_execution_execution_context.go | 15 +- ...studio_v2_flow_execution_execution_step.go | 16 +- ...n_execution_step_execution_step_context.go | 15 +- .../v2/model_studio_v2_flow_flow_revision.go | 16 +- .../v2/model_studio_v2_flow_test_user.go | 15 +- .../v2/model_studio_v2_flow_validate.go | 15 +- twilio/rest/supersim/v1/api_default.go | 1038 +- .../v1/model_list_command_response.go | 19 +- .../v1/model_list_command_response_meta.go | 27 +- .../supersim/v1/model_list_fleet_response.go | 19 +- ...network_access_profile_network_response.go | 17 +- ...el_list_network_access_profile_response.go | 17 +- .../v1/model_list_network_response.go | 19 +- .../supersim/v1/model_list_sim_response.go | 17 +- .../v1/model_list_usage_record_response.go | 17 +- .../supersim/v1/model_supersim_v1_command.go | 16 +- .../supersim/v1/model_supersim_v1_fleet.go | 16 +- .../supersim/v1/model_supersim_v1_network.go | 15 +- ...odel_supersim_v1_network_access_profile.go | 20 +- ..._profile_network_access_profile_network.go | 15 +- .../rest/supersim/v1/model_supersim_v1_sim.go | 16 +- .../v1/model_supersim_v1_usage_record.go | 15 +- twilio/rest/sync/v1/api_default.go | 2047 +-- ...model_list_document_permission_response.go | 17 +- .../sync/v1/model_list_document_response.go | 17 +- .../sync/v1/model_list_service_response.go | 19 +- .../v1/model_list_service_response_meta.go | 27 +- .../v1/model_list_sync_list_item_response.go | 17 +- ...odel_list_sync_list_permission_response.go | 17 +- .../sync/v1/model_list_sync_list_response.go | 17 +- .../v1/model_list_sync_map_item_response.go | 17 +- ...model_list_sync_map_permission_response.go | 17 +- .../sync/v1/model_list_sync_map_response.go | 17 +- .../v1/model_list_sync_stream_response.go | 17 +- twilio/rest/sync/v1/model_sync_v1_service.go | 16 +- .../sync/v1/model_sync_v1_service_document.go | 16 +- ...v1_service_document_document_permission.go | 15 +- .../v1/model_sync_v1_service_sync_list.go | 16 +- ...ync_v1_service_sync_list_sync_list_item.go | 16 +- ..._service_sync_list_sync_list_permission.go | 15 +- .../sync/v1/model_sync_v1_service_sync_map.go | 16 +- ..._sync_v1_service_sync_map_sync_map_item.go | 16 +- ...v1_service_sync_map_sync_map_permission.go | 15 +- .../v1/model_sync_v1_service_sync_stream.go | 16 +- ...c_v1_service_sync_stream_stream_message.go | 15 +- twilio/rest/taskrouter/v1/api_default.go | 3915 +++--- .../v1/model_list_activity_response.go | 17 +- .../v1/model_list_event_response.go | 17 +- .../v1/model_list_task_channel_response.go | 17 +- .../v1/model_list_task_queue_response.go | 17 +- ...el_list_task_queues_statistics_response.go | 17 +- .../model_list_task_reservation_response.go | 17 +- .../taskrouter/v1/model_list_task_response.go | 17 +- .../v1/model_list_worker_channel_response.go | 17 +- .../model_list_worker_reservation_response.go | 17 +- .../v1/model_list_worker_response.go | 17 +- .../v1/model_list_workflow_response.go | 17 +- .../v1/model_list_workspace_response.go | 19 +- .../v1/model_list_workspace_response_meta.go | 27 +- .../v1/model_taskrouter_v1_workspace.go | 16 +- .../model_taskrouter_v1_workspace_activity.go | 16 +- .../v1/model_taskrouter_v1_workspace_event.go | 16 +- .../v1/model_taskrouter_v1_workspace_task.go | 16 +- ...el_taskrouter_v1_workspace_task_channel.go | 16 +- ...odel_taskrouter_v1_workspace_task_queue.go | 16 +- ..._queue_task_queue_cumulative_statistics.go | 16 +- ...k_queue_task_queue_real_time_statistics.go | 15 +- ...kspace_task_queue_task_queue_statistics.go | 15 +- ...space_task_queue_task_queues_statistics.go | 15 +- ...uter_v1_workspace_task_task_reservation.go | 16 +- .../model_taskrouter_v1_workspace_worker.go | 16 +- ...uter_v1_workspace_worker_worker_channel.go | 16 +- ...space_worker_worker_instance_statistics.go | 15 +- ..._v1_workspace_worker_worker_reservation.go | 16 +- ...r_v1_workspace_worker_worker_statistics.go | 15 +- ...ce_worker_workers_cumulative_statistics.go | 16 +- ...ace_worker_workers_real_time_statistics.go | 15 +- .../model_taskrouter_v1_workspace_workflow.go | 16 +- ...workflow_workflow_cumulative_statistics.go | 16 +- ..._workflow_workflow_real_time_statistics.go | 15 +- ..._workspace_workflow_workflow_statistics.go | 15 +- ...rkspace_workspace_cumulative_statistics.go | 16 +- ...orkspace_workspace_real_time_statistics.go | 15 +- ...outer_v1_workspace_workspace_statistics.go | 15 +- twilio/rest/trunking/v1/api_default.go | 968 +- .../v1/model_list_credential_list_response.go | 17 +- ...el_list_ip_access_control_list_response.go | 17 +- .../v1/model_list_origination_url_response.go | 17 +- .../v1/model_list_phone_number_response.go | 17 +- .../trunking/v1/model_list_trunk_response.go | 19 +- .../v1/model_list_trunk_response_meta.go | 27 +- .../trunking/v1/model_trunking_v1_trunk.go | 16 +- ...model_trunking_v1_trunk_credential_list.go | 16 +- ...runking_v1_trunk_ip_access_control_list.go | 16 +- ...model_trunking_v1_trunk_origination_url.go | 16 +- .../model_trunking_v1_trunk_phone_number.go | 16 +- .../v1/model_trunking_v1_trunk_recording.go | 15 +- twilio/rest/trusthub/v1/api_default.go | 1882 +-- ...le_channel_endpoint_assignment_response.go | 17 +- ...omer_profile_entity_assignment_response.go | 17 +- ...st_customer_profile_evaluation_response.go | 17 +- .../model_list_customer_profile_response.go | 19 +- ...del_list_customer_profile_response_meta.go | 27 +- .../v1/model_list_end_user_response.go | 19 +- .../v1/model_list_end_user_type_response.go | 19 +- .../v1/model_list_policies_response.go | 19 +- ...model_list_supporting_document_response.go | 19 +- ..._list_supporting_document_type_response.go | 17 +- ...ct_channel_endpoint_assignment_response.go | 17 +- ...rust_product_entity_assignment_response.go | 17 +- ..._list_trust_product_evaluation_response.go | 17 +- .../v1/model_list_trust_product_response.go | 19 +- .../v1/model_trusthub_v1_customer_profile.go | 16 +- ...mer_profile_channel_endpoint_assignment.go | 16 +- ...file_customer_profile_entity_assignment.go | 16 +- ...mer_profile_customer_profile_evaluation.go | 22 +- .../trusthub/v1/model_trusthub_v1_end_user.go | 16 +- .../v1/model_trusthub_v1_end_user_type.go | 15 +- .../trusthub/v1/model_trusthub_v1_policies.go | 15 +- .../model_trusthub_v1_supporting_document.go | 16 +- ...el_trusthub_v1_supporting_document_type.go | 15 +- .../v1/model_trusthub_v1_trust_product.go | 16 +- ...ust_product_channel_endpoint_assignment.go | 16 +- ...product_trust_product_entity_assignment.go | 16 +- ..._trust_product_trust_product_evaluation.go | 20 +- twilio/rest/verify/v2/api_default.go | 2124 +-- .../verify/v2/model_list_bucket_response.go | 19 +- .../v2/model_list_challenge_response.go | 19 +- .../verify/v2/model_list_entity_response.go | 19 +- .../verify/v2/model_list_factor_response.go | 19 +- ...l_list_messaging_configuration_response.go | 17 +- .../v2/model_list_rate_limit_response.go | 19 +- .../verify/v2/model_list_service_response.go | 19 +- ...odel_list_verification_attempt_response.go | 19 +- ...list_verification_attempt_response_meta.go | 27 +- .../verify/v2/model_list_webhook_response.go | 19 +- twilio/rest/verify/v2/model_verify_v2_form.go | 15 +- .../rest/verify/v2/model_verify_v2_service.go | 16 +- .../model_verify_v2_service_access_token.go | 15 +- .../v2/model_verify_v2_service_entity.go | 16 +- ...odel_verify_v2_service_entity_challenge.go | 16 +- .../model_verify_v2_service_entity_factor.go | 16 +- ...rify_v2_service_messaging_configuration.go | 16 +- .../v2/model_verify_v2_service_rate_limit.go | 16 +- ...del_verify_v2_service_rate_limit_bucket.go | 16 +- .../model_verify_v2_service_verification.go | 16 +- ...el_verify_v2_service_verification_check.go | 16 +- .../v2/model_verify_v2_service_webhook.go | 16 +- .../model_verify_v2_verification_attempt.go | 18 +- twilio/rest/video/v1/api_default.go | 1751 +-- .../model_list_composition_hook_response.go | 19 +- ...del_list_composition_hook_response_meta.go | 27 +- .../v1/model_list_composition_response.go | 19 +- .../video/v1/model_list_recording_response.go | 19 +- ...om_participant_published_track_response.go | 17 +- .../model_list_room_participant_response.go | 19 +- ...m_participant_subscribed_track_response.go | 17 +- .../v1/model_list_room_recording_response.go | 19 +- .../rest/video/v1/model_list_room_response.go | 19 +- .../video/v1/model_video_v1_composition.go | 16 +- .../v1/model_video_v1_composition_hook.go | 16 +- .../v1/model_video_v1_composition_settings.go | 15 +- .../rest/video/v1/model_video_v1_recording.go | 16 +- .../v1/model_video_v1_recording_settings.go | 15 +- twilio/rest/video/v1/model_video_v1_room.go | 16 +- .../model_video_v1_room_room_participant.go | 16 +- ...cipant_room_participant_published_track.go | 16 +- ...icipant_room_participant_subscribe_rule.go | 16 +- ...ipant_room_participant_subscribed_track.go | 16 +- .../v1/model_video_v1_room_room_recording.go | 16 +- ...model_video_v1_room_room_recording_rule.go | 16 +- ...video_v1_room_room_recording_rule_rules.go | 23 +- twilio/rest/voice/v1/api_default.go | 1332 +- .../v1/model_list_byoc_trunk_response.go | 19 +- .../v1/model_list_byoc_trunk_response_meta.go | 27 +- .../model_list_connection_policy_response.go | 17 +- ..._list_connection_policy_target_response.go | 17 +- ...st_dialing_permissions_country_response.go | 17 +- ...aling_permissions_hrs_prefixes_response.go | 17 +- .../voice/v1/model_list_ip_record_response.go | 19 +- .../model_list_source_ip_mapping_response.go | 19 +- .../voice/v1/model_voice_v1_byoc_trunk.go | 16 +- .../v1/model_voice_v1_connection_policy.go | 16 +- ...nection_policy_connection_policy_target.go | 16 +- ...permissions_dialing_permissions_country.go | 15 +- ...dialing_permissions_country_bulk_update.go | 15 +- ...ountry_dialing_permissions_hrs_prefixes.go | 15 +- ...ns_dialing_permissions_country_instance.go | 15 +- ...ermissions_dialing_permissions_settings.go | 15 +- .../rest/voice/v1/model_voice_v1_ip_record.go | 16 +- .../v1/model_voice_v1_source_ip_mapping.go | 16 +- twilio/rest/wireless/v1/api_default.go | 950 +- ...odel_list_account_usage_record_response.go | 17 +- .../v1/model_list_command_response.go | 19 +- .../v1/model_list_command_response_meta.go | 27 +- .../v1/model_list_data_session_response.go | 17 +- .../v1/model_list_rate_plan_response.go | 19 +- .../wireless/v1/model_list_sim_response.go | 17 +- .../v1/model_list_usage_record_response.go | 17 +- .../model_wireless_v1_account_usage_record.go | 15 +- .../wireless/v1/model_wireless_v1_command.go | 16 +- .../v1/model_wireless_v1_rate_plan.go | 16 +- .../rest/wireless/v1/model_wireless_v1_sim.go | 16 +- .../v1/model_wireless_v1_sim_data_session.go | 16 +- .../v1/model_wireless_v1_sim_usage_record.go | 15 +- 707 files changed, 33747 insertions(+), 33757 deletions(-) diff --git a/twilio/rest/accounts/v1/api_default.go b/twilio/rest/accounts/v1/api_default.go index 11faf1289..7efbd8810 100644 --- a/twilio/rest/accounts/v1/api_default.go +++ b/twilio/rest/accounts/v1/api_default.go @@ -1,11 +1,11 @@ /* - * Twilio - Accounts - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Accounts + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,10 +14,9 @@ package openapi import ( "encoding/json" "fmt" - "net/url" - "strings" - twilio "github.com/twilio/twilio-go/client" + "net/url" + "strings" ) type DefaultApiService struct { @@ -26,16 +25,16 @@ type DefaultApiService struct { } func NewDefaultApiService(client *twilio.Client) *DefaultApiService { - return &DefaultApiService{ - client: client, + return &DefaultApiService { + client: client, baseURL: "https://accounts.twilio.com", } } // CreateCredentialAwsParams Optional parameters for the method 'CreateCredentialAws' type CreateCredentialAwsParams struct { - AccountSid *string `json:"AccountSid,omitempty"` - Credentials *string `json:"Credentials,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` + Credentials *string `json:"Credentials,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` } @@ -47,43 +46,43 @@ type CreateCredentialAwsParams struct { * @param "Credentials" (string) - A string that contains the AWS access credentials in the format `:`. For example, `AKIAIOSFODNN7EXAMPLE:wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY` * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It can be up to 64 characters long. * @return AccountsV1CredentialCredentialAws - */ +*/ func (c *DefaultApiService) CreateCredentialAws(params *CreateCredentialAwsParams) (*AccountsV1CredentialCredentialAws, error) { - path := "/v1/Credentials/AWS" + path := "/v1/Credentials/AWS" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.AccountSid != nil { - data.Set("AccountSid", *params.AccountSid) - } - if params != nil && params.Credentials != nil { - data.Set("Credentials", *params.Credentials) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } + if params != nil && params.AccountSid != nil { + data.Set("AccountSid", *params.AccountSid) +} + if params != nil && params.Credentials != nil { + data.Set("Credentials", *params.Credentials) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &AccountsV1CredentialCredentialAws{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &AccountsV1CredentialCredentialAws{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateCredentialPublicKeyParams Optional parameters for the method 'CreateCredentialPublicKey' type CreateCredentialPublicKeyParams struct { - AccountSid *string `json:"AccountSid,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` - PublicKey *string `json:"PublicKey,omitempty"` + PublicKey *string `json:"PublicKey,omitempty"` } /* @@ -94,126 +93,135 @@ type CreateCredentialPublicKeyParams struct { * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It can be up to 64 characters long. * @param "PublicKey" (string) - A URL encoded representation of the public key. For example, `-----BEGIN PUBLIC KEY-----MIIBIjANB.pa9xQIDAQAB-----END PUBLIC KEY-----` * @return AccountsV1CredentialCredentialPublicKey - */ +*/ func (c *DefaultApiService) CreateCredentialPublicKey(params *CreateCredentialPublicKeyParams) (*AccountsV1CredentialCredentialPublicKey, error) { - path := "/v1/Credentials/PublicKeys" + path := "/v1/Credentials/PublicKeys" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.AccountSid != nil { - data.Set("AccountSid", *params.AccountSid) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.PublicKey != nil { - data.Set("PublicKey", *params.PublicKey) - } + if params != nil && params.AccountSid != nil { + data.Set("AccountSid", *params.AccountSid) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.PublicKey != nil { + data.Set("PublicKey", *params.PublicKey) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &AccountsV1CredentialCredentialPublicKey{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err + ps := &AccountsV1CredentialCredentialPublicKey{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* * CreateSecondaryAuthToken Method for CreateSecondaryAuthToken * Create a new secondary Auth Token * @return AccountsV1SecondaryAuthToken - */ +*/ func (c *DefaultApiService) CreateSecondaryAuthToken() (*AccountsV1SecondaryAuthToken, error) { - path := "/v1/AuthTokens/Secondary" + path := "/v1/AuthTokens/Secondary" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &AccountsV1SecondaryAuthToken{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &AccountsV1SecondaryAuthToken{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* * DeleteCredentialAws Method for DeleteCredentialAws * Delete a Credential from your account * @param Sid The Twilio-provided string that uniquely identifies the AWS resource to delete. - */ -func (c *DefaultApiService) DeleteCredentialAws(Sid string) error { - path := "/v1/Credentials/AWS/{Sid}" +*/ +func (c *DefaultApiService) DeleteCredentialAws(Sid string, ) (error) { + path := "/v1/Credentials/AWS/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* * DeleteCredentialPublicKey Method for DeleteCredentialPublicKey * Delete a Credential from your account * @param Sid The Twilio-provided string that uniquely identifies the PublicKey resource to delete. - */ -func (c *DefaultApiService) DeleteCredentialPublicKey(Sid string) error { - path := "/v1/Credentials/PublicKeys/{Sid}" +*/ +func (c *DefaultApiService) DeleteCredentialPublicKey(Sid string, ) (error) { + path := "/v1/Credentials/PublicKeys/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* * DeleteSecondaryAuthToken Method for DeleteSecondaryAuthToken * Delete the secondary Auth Token from your account - */ -func (c *DefaultApiService) DeleteSecondaryAuthToken() error { - path := "/v1/AuthTokens/Secondary" +*/ +func (c *DefaultApiService) DeleteSecondaryAuthToken() (error) { + path := "/v1/AuthTokens/Secondary" + + data := url.Values{} + headers := 0 - data := url.Values{} - headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - return nil + defer resp.Body.Close() + + return nil } /* @@ -221,27 +229,29 @@ func (c *DefaultApiService) DeleteSecondaryAuthToken() error { * Fetch the AWS credentials specified by the provided Credential Sid * @param Sid The Twilio-provided string that uniquely identifies the AWS resource to fetch. * @return AccountsV1CredentialCredentialAws - */ -func (c *DefaultApiService) FetchCredentialAws(Sid string) (*AccountsV1CredentialCredentialAws, error) { - path := "/v1/Credentials/AWS/{Sid}" +*/ +func (c *DefaultApiService) FetchCredentialAws(Sid string, ) (*AccountsV1CredentialCredentialAws, error) { + path := "/v1/Credentials/AWS/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &AccountsV1CredentialCredentialAws{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &AccountsV1CredentialCredentialAws{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -249,29 +259,30 @@ func (c *DefaultApiService) FetchCredentialAws(Sid string) (*AccountsV1Credentia * Fetch the public key specified by the provided Credential Sid * @param Sid The Twilio-provided string that uniquely identifies the PublicKey resource to fetch. * @return AccountsV1CredentialCredentialPublicKey - */ -func (c *DefaultApiService) FetchCredentialPublicKey(Sid string) (*AccountsV1CredentialCredentialPublicKey, error) { - path := "/v1/Credentials/PublicKeys/{Sid}" +*/ +func (c *DefaultApiService) FetchCredentialPublicKey(Sid string, ) (*AccountsV1CredentialCredentialPublicKey, error) { + path := "/v1/Credentials/PublicKeys/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &AccountsV1CredentialCredentialPublicKey{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err -} + defer resp.Body.Close() + + ps := &AccountsV1CredentialCredentialPublicKey{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListCredentialAwsParams Optional parameters for the method 'ListCredentialAws' type ListCredentialAwsParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -283,32 +294,32 @@ type ListCredentialAwsParams struct { * @param optional nil or *ListCredentialAwsParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListCredentialAwsResponse - */ +*/ func (c *DefaultApiService) ListCredentialAws(params *ListCredentialAwsParams) (*ListCredentialAwsResponse, error) { - path := "/v1/Credentials/AWS" + path := "/v1/Credentials/AWS" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListCredentialAwsResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListCredentialAwsResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListCredentialPublicKeyParams Optional parameters for the method 'ListCredentialPublicKey' type ListCredentialPublicKeyParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -320,58 +331,60 @@ type ListCredentialPublicKeyParams struct { * @param optional nil or *ListCredentialPublicKeyParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListCredentialPublicKeyResponse - */ +*/ func (c *DefaultApiService) ListCredentialPublicKey(params *ListCredentialPublicKeyParams) (*ListCredentialPublicKeyResponse, error) { - path := "/v1/Credentials/PublicKeys" + path := "/v1/Credentials/PublicKeys" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListCredentialPublicKeyResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err + ps := &ListCredentialPublicKeyResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* * UpdateAuthTokenPromotion Method for UpdateAuthTokenPromotion * Promote the secondary Auth Token to primary. After promoting the new token, all requests to Twilio using your old primary Auth Token will result in an error. * @return AccountsV1AuthTokenPromotion - */ +*/ func (c *DefaultApiService) UpdateAuthTokenPromotion() (*AccountsV1AuthTokenPromotion, error) { - path := "/v1/AuthTokens/Promote" + path := "/v1/AuthTokens/Promote" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &AccountsV1AuthTokenPromotion{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err -} + defer resp.Body.Close() + + ps := &AccountsV1AuthTokenPromotion{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateCredentialAwsParams Optional parameters for the method 'UpdateCredentialAws' type UpdateCredentialAwsParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` @@ -384,33 +397,33 @@ type UpdateCredentialAwsParams struct { * @param optional nil or *UpdateCredentialAwsParams - Optional Parameters: * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It can be up to 64 characters long. * @return AccountsV1CredentialCredentialAws - */ +*/ func (c *DefaultApiService) UpdateCredentialAws(Sid string, params *UpdateCredentialAwsParams) (*AccountsV1CredentialCredentialAws, error) { - path := "/v1/Credentials/AWS/{Sid}" + path := "/v1/Credentials/AWS/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &AccountsV1CredentialCredentialAws{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &AccountsV1CredentialCredentialAws{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateCredentialPublicKeyParams Optional parameters for the method 'UpdateCredentialPublicKey' type UpdateCredentialPublicKeyParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` @@ -423,29 +436,30 @@ type UpdateCredentialPublicKeyParams struct { * @param optional nil or *UpdateCredentialPublicKeyParams - Optional Parameters: * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It can be up to 64 characters long. * @return AccountsV1CredentialCredentialPublicKey - */ +*/ func (c *DefaultApiService) UpdateCredentialPublicKey(Sid string, params *UpdateCredentialPublicKeyParams) (*AccountsV1CredentialCredentialPublicKey, error) { - path := "/v1/Credentials/PublicKeys/{Sid}" + path := "/v1/Credentials/PublicKeys/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &AccountsV1CredentialCredentialPublicKey{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() + + ps := &AccountsV1CredentialCredentialPublicKey{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } diff --git a/twilio/rest/accounts/v1/model_accounts_v1_auth_token_promotion.go b/twilio/rest/accounts/v1/model_accounts_v1_auth_token_promotion.go index d62eb9a85..00962c709 100644 --- a/twilio/rest/accounts/v1/model_accounts_v1_auth_token_promotion.go +++ b/twilio/rest/accounts/v1/model_accounts_v1_auth_token_promotion.go @@ -1,20 +1,18 @@ /* - * Twilio - Accounts - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Accounts + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // AccountsV1AuthTokenPromotion struct for AccountsV1AuthTokenPromotion type AccountsV1AuthTokenPromotion struct { // The SID of the Account that the secondary Auth Token was created for diff --git a/twilio/rest/accounts/v1/model_accounts_v1_credential_credential_aws.go b/twilio/rest/accounts/v1/model_accounts_v1_credential_credential_aws.go index f43b14e27..8a8bc6e37 100644 --- a/twilio/rest/accounts/v1/model_accounts_v1_credential_credential_aws.go +++ b/twilio/rest/accounts/v1/model_accounts_v1_credential_credential_aws.go @@ -1,20 +1,18 @@ /* - * Twilio - Accounts - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Accounts + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // AccountsV1CredentialCredentialAws struct for AccountsV1CredentialCredentialAws type AccountsV1CredentialCredentialAws struct { // The SID of the Account that created the resource diff --git a/twilio/rest/accounts/v1/model_accounts_v1_credential_credential_public_key.go b/twilio/rest/accounts/v1/model_accounts_v1_credential_credential_public_key.go index cb8fa0646..35d0e7fa4 100644 --- a/twilio/rest/accounts/v1/model_accounts_v1_credential_credential_public_key.go +++ b/twilio/rest/accounts/v1/model_accounts_v1_credential_credential_public_key.go @@ -1,20 +1,18 @@ /* - * Twilio - Accounts - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Accounts + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // AccountsV1CredentialCredentialPublicKey struct for AccountsV1CredentialCredentialPublicKey type AccountsV1CredentialCredentialPublicKey struct { // The SID of the Account that created the Credential that the PublicKey resource belongs to diff --git a/twilio/rest/accounts/v1/model_accounts_v1_secondary_auth_token.go b/twilio/rest/accounts/v1/model_accounts_v1_secondary_auth_token.go index d8aa60d6b..835845989 100644 --- a/twilio/rest/accounts/v1/model_accounts_v1_secondary_auth_token.go +++ b/twilio/rest/accounts/v1/model_accounts_v1_secondary_auth_token.go @@ -1,20 +1,18 @@ /* - * Twilio - Accounts - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Accounts + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // AccountsV1SecondaryAuthToken struct for AccountsV1SecondaryAuthToken type AccountsV1SecondaryAuthToken struct { // The SID of the Account that the secondary Auth Token was created for diff --git a/twilio/rest/accounts/v1/model_list_credential_aws_response.go b/twilio/rest/accounts/v1/model_list_credential_aws_response.go index 49a391f4e..bb5d9a21d 100644 --- a/twilio/rest/accounts/v1/model_list_credential_aws_response.go +++ b/twilio/rest/accounts/v1/model_list_credential_aws_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Accounts - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Accounts + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListCredentialAwsResponse struct for ListCredentialAwsResponse type ListCredentialAwsResponse struct { Credentials []AccountsV1CredentialCredentialAws `json:"Credentials,omitempty"` - Meta ListCredentialAwsResponseMeta `json:"Meta,omitempty"` + Meta ListCredentialAwsResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/accounts/v1/model_list_credential_aws_response_meta.go b/twilio/rest/accounts/v1/model_list_credential_aws_response_meta.go index 2708b6a4d..469a2216b 100644 --- a/twilio/rest/accounts/v1/model_list_credential_aws_response_meta.go +++ b/twilio/rest/accounts/v1/model_list_credential_aws_response_meta.go @@ -1,23 +1,22 @@ /* - * Twilio - Accounts - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Accounts + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListCredentialAwsResponseMeta struct for ListCredentialAwsResponseMeta type ListCredentialAwsResponseMeta struct { - FirstPageUrl string `json:"FirstPageUrl,omitempty"` - Key string `json:"Key,omitempty"` - NextPageUrl string `json:"NextPageUrl,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` - Url string `json:"Url,omitempty"` + Url string `json:"Url,omitempty"` } diff --git a/twilio/rest/accounts/v1/model_list_credential_public_key_response.go b/twilio/rest/accounts/v1/model_list_credential_public_key_response.go index 2eb62533e..ccefdafe8 100644 --- a/twilio/rest/accounts/v1/model_list_credential_public_key_response.go +++ b/twilio/rest/accounts/v1/model_list_credential_public_key_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Accounts - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Accounts + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListCredentialPublicKeyResponse struct for ListCredentialPublicKeyResponse type ListCredentialPublicKeyResponse struct { Credentials []AccountsV1CredentialCredentialPublicKey `json:"Credentials,omitempty"` - Meta ListCredentialAwsResponseMeta `json:"Meta,omitempty"` + Meta ListCredentialAwsResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/api/v2010/api_default.go b/twilio/rest/api/v2010/api_default.go index 0342542dd..bbd8aed64 100644 --- a/twilio/rest/api/v2010/api_default.go +++ b/twilio/rest/api/v2010/api_default.go @@ -1,11 +1,11 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,11 +14,10 @@ package openapi import ( "encoding/json" "fmt" - "net/url" - "strings" - "time" - twilio "github.com/twilio/twilio-go/client" + "net/url" + "strings" + "time" ) type DefaultApiService struct { @@ -27,8 +26,8 @@ type DefaultApiService struct { } func NewDefaultApiService(client *twilio.Client) *DefaultApiService { - return &DefaultApiService{ - client: client, + return &DefaultApiService { + client: client, baseURL: "https://api.twilio.com", } } @@ -44,43 +43,43 @@ type CreateAccountParams struct { * @param optional nil or *CreateAccountParams - Optional Parameters: * @param "FriendlyName" (string) - A human readable description of the account to create, defaults to `SubAccount Created at {YYYY-MM-DD HH:MM meridian}` * @return ApiV2010Account - */ +*/ func (c *DefaultApiService) CreateAccount(params *CreateAccountParams) (*ApiV2010Account, error) { - path := "/2010-04-01/Accounts.json" + path := "/2010-04-01/Accounts.json" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ApiV2010Account{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ApiV2010Account{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateAddressParams Optional parameters for the method 'CreateAddress' type CreateAddressParams struct { - AutoCorrectAddress *bool `json:"AutoCorrectAddress,omitempty"` - City *string `json:"City,omitempty"` - CustomerName *string `json:"CustomerName,omitempty"` - EmergencyEnabled *bool `json:"EmergencyEnabled,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - IsoCountry *string `json:"IsoCountry,omitempty"` - PostalCode *string `json:"PostalCode,omitempty"` - Region *string `json:"Region,omitempty"` - Street *string `json:"Street,omitempty"` + AutoCorrectAddress *bool `json:"AutoCorrectAddress,omitempty"` + City *string `json:"City,omitempty"` + CustomerName *string `json:"CustomerName,omitempty"` + EmergencyEnabled *bool `json:"EmergencyEnabled,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + IsoCountry *string `json:"IsoCountry,omitempty"` + PostalCode *string `json:"PostalCode,omitempty"` + Region *string `json:"Region,omitempty"` + Street *string `json:"Street,omitempty"` } /* @@ -97,74 +96,74 @@ type CreateAddressParams struct { * @param "Region" (string) - The state or region of the new address. * @param "Street" (string) - The number and street address of the new address. * @return ApiV2010AccountAddress - */ +*/ func (c *DefaultApiService) CreateAddress(AccountSid string, params *CreateAddressParams) (*ApiV2010AccountAddress, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Addresses.json" + path := "/2010-04-01/Accounts/{AccountSid}/Addresses.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.AutoCorrectAddress != nil { - data.Set("AutoCorrectAddress", fmt.Sprint(*params.AutoCorrectAddress)) - } - if params != nil && params.City != nil { - data.Set("City", *params.City) - } - if params != nil && params.CustomerName != nil { - data.Set("CustomerName", *params.CustomerName) - } - if params != nil && params.EmergencyEnabled != nil { - data.Set("EmergencyEnabled", fmt.Sprint(*params.EmergencyEnabled)) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.IsoCountry != nil { - data.Set("IsoCountry", *params.IsoCountry) - } - if params != nil && params.PostalCode != nil { - data.Set("PostalCode", *params.PostalCode) - } - if params != nil && params.Region != nil { - data.Set("Region", *params.Region) - } - if params != nil && params.Street != nil { - data.Set("Street", *params.Street) - } + if params != nil && params.AutoCorrectAddress != nil { + data.Set("AutoCorrectAddress", fmt.Sprint(*params.AutoCorrectAddress)) +} + if params != nil && params.City != nil { + data.Set("City", *params.City) +} + if params != nil && params.CustomerName != nil { + data.Set("CustomerName", *params.CustomerName) +} + if params != nil && params.EmergencyEnabled != nil { + data.Set("EmergencyEnabled", fmt.Sprint(*params.EmergencyEnabled)) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.IsoCountry != nil { + data.Set("IsoCountry", *params.IsoCountry) +} + if params != nil && params.PostalCode != nil { + data.Set("PostalCode", *params.PostalCode) +} + if params != nil && params.Region != nil { + data.Set("Region", *params.Region) +} + if params != nil && params.Street != nil { + data.Set("Street", *params.Street) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ApiV2010AccountAddress{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ApiV2010AccountAddress{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateApplicationParams Optional parameters for the method 'CreateApplication' type CreateApplicationParams struct { - ApiVersion *string `json:"ApiVersion,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` + ApiVersion *string `json:"ApiVersion,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` MessageStatusCallback *string `json:"MessageStatusCallback,omitempty"` - SmsFallbackMethod *string `json:"SmsFallbackMethod,omitempty"` - SmsFallbackUrl *string `json:"SmsFallbackUrl,omitempty"` - SmsMethod *string `json:"SmsMethod,omitempty"` - SmsStatusCallback *string `json:"SmsStatusCallback,omitempty"` - SmsUrl *string `json:"SmsUrl,omitempty"` - StatusCallback *string `json:"StatusCallback,omitempty"` - StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` - VoiceCallerIdLookup *bool `json:"VoiceCallerIdLookup,omitempty"` - VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"` - VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` - VoiceMethod *string `json:"VoiceMethod,omitempty"` - VoiceUrl *string `json:"VoiceUrl,omitempty"` + SmsFallbackMethod *string `json:"SmsFallbackMethod,omitempty"` + SmsFallbackUrl *string `json:"SmsFallbackUrl,omitempty"` + SmsMethod *string `json:"SmsMethod,omitempty"` + SmsStatusCallback *string `json:"SmsStatusCallback,omitempty"` + SmsUrl *string `json:"SmsUrl,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` + StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` + VoiceCallerIdLookup *bool `json:"VoiceCallerIdLookup,omitempty"` + VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"` + VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` + VoiceMethod *string `json:"VoiceMethod,omitempty"` + VoiceUrl *string `json:"VoiceUrl,omitempty"` } /* @@ -188,110 +187,110 @@ type CreateApplicationParams struct { * @param "VoiceMethod" (string) - The HTTP method we should use to call `voice_url`. Can be: `GET` or `POST`. * @param "VoiceUrl" (string) - The URL we should call when the phone number assigned to this application receives a call. * @return ApiV2010AccountApplication - */ +*/ func (c *DefaultApiService) CreateApplication(AccountSid string, params *CreateApplicationParams) (*ApiV2010AccountApplication, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Applications.json" + path := "/2010-04-01/Accounts/{AccountSid}/Applications.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.ApiVersion != nil { - data.Set("ApiVersion", *params.ApiVersion) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.MessageStatusCallback != nil { - data.Set("MessageStatusCallback", *params.MessageStatusCallback) - } - if params != nil && params.SmsFallbackMethod != nil { - data.Set("SmsFallbackMethod", *params.SmsFallbackMethod) - } - if params != nil && params.SmsFallbackUrl != nil { - data.Set("SmsFallbackUrl", *params.SmsFallbackUrl) - } - if params != nil && params.SmsMethod != nil { - data.Set("SmsMethod", *params.SmsMethod) - } - if params != nil && params.SmsStatusCallback != nil { - data.Set("SmsStatusCallback", *params.SmsStatusCallback) - } - if params != nil && params.SmsUrl != nil { - data.Set("SmsUrl", *params.SmsUrl) - } - if params != nil && params.StatusCallback != nil { - data.Set("StatusCallback", *params.StatusCallback) - } - if params != nil && params.StatusCallbackMethod != nil { - data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) - } - if params != nil && params.VoiceCallerIdLookup != nil { - data.Set("VoiceCallerIdLookup", fmt.Sprint(*params.VoiceCallerIdLookup)) - } - if params != nil && params.VoiceFallbackMethod != nil { - data.Set("VoiceFallbackMethod", *params.VoiceFallbackMethod) - } - if params != nil && params.VoiceFallbackUrl != nil { - data.Set("VoiceFallbackUrl", *params.VoiceFallbackUrl) - } - if params != nil && params.VoiceMethod != nil { - data.Set("VoiceMethod", *params.VoiceMethod) - } - if params != nil && params.VoiceUrl != nil { - data.Set("VoiceUrl", *params.VoiceUrl) - } + if params != nil && params.ApiVersion != nil { + data.Set("ApiVersion", *params.ApiVersion) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.MessageStatusCallback != nil { + data.Set("MessageStatusCallback", *params.MessageStatusCallback) +} + if params != nil && params.SmsFallbackMethod != nil { + data.Set("SmsFallbackMethod", *params.SmsFallbackMethod) +} + if params != nil && params.SmsFallbackUrl != nil { + data.Set("SmsFallbackUrl", *params.SmsFallbackUrl) +} + if params != nil && params.SmsMethod != nil { + data.Set("SmsMethod", *params.SmsMethod) +} + if params != nil && params.SmsStatusCallback != nil { + data.Set("SmsStatusCallback", *params.SmsStatusCallback) +} + if params != nil && params.SmsUrl != nil { + data.Set("SmsUrl", *params.SmsUrl) +} + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) +} + if params != nil && params.StatusCallbackMethod != nil { + data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) +} + if params != nil && params.VoiceCallerIdLookup != nil { + data.Set("VoiceCallerIdLookup", fmt.Sprint(*params.VoiceCallerIdLookup)) +} + if params != nil && params.VoiceFallbackMethod != nil { + data.Set("VoiceFallbackMethod", *params.VoiceFallbackMethod) +} + if params != nil && params.VoiceFallbackUrl != nil { + data.Set("VoiceFallbackUrl", *params.VoiceFallbackUrl) +} + if params != nil && params.VoiceMethod != nil { + data.Set("VoiceMethod", *params.VoiceMethod) +} + if params != nil && params.VoiceUrl != nil { + data.Set("VoiceUrl", *params.VoiceUrl) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ApiV2010AccountApplication{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ApiV2010AccountApplication{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateCallParams Optional parameters for the method 'CreateCall' type CreateCallParams struct { - ApplicationSid *string `json:"ApplicationSid,omitempty"` - AsyncAmd *string `json:"AsyncAmd,omitempty"` - AsyncAmdStatusCallback *string `json:"AsyncAmdStatusCallback,omitempty"` - AsyncAmdStatusCallbackMethod *string `json:"AsyncAmdStatusCallbackMethod,omitempty"` - Byoc *string `json:"Byoc,omitempty"` - CallReason *string `json:"CallReason,omitempty"` - CallerId *string `json:"CallerId,omitempty"` - FallbackMethod *string `json:"FallbackMethod,omitempty"` - FallbackUrl *string `json:"FallbackUrl,omitempty"` - From *string `json:"From,omitempty"` - MachineDetection *string `json:"MachineDetection,omitempty"` - MachineDetectionSilenceTimeout *int32 `json:"MachineDetectionSilenceTimeout,omitempty"` - MachineDetectionSpeechEndThreshold *int32 `json:"MachineDetectionSpeechEndThreshold,omitempty"` - MachineDetectionSpeechThreshold *int32 `json:"MachineDetectionSpeechThreshold,omitempty"` - MachineDetectionTimeout *int32 `json:"MachineDetectionTimeout,omitempty"` - Method *string `json:"Method,omitempty"` - Record *bool `json:"Record,omitempty"` - RecordingChannels *string `json:"RecordingChannels,omitempty"` - RecordingStatusCallback *string `json:"RecordingStatusCallback,omitempty"` - RecordingStatusCallbackEvent *[]string `json:"RecordingStatusCallbackEvent,omitempty"` - RecordingStatusCallbackMethod *string `json:"RecordingStatusCallbackMethod,omitempty"` - RecordingTrack *string `json:"RecordingTrack,omitempty"` - SendDigits *string `json:"SendDigits,omitempty"` - SipAuthPassword *string `json:"SipAuthPassword,omitempty"` - SipAuthUsername *string `json:"SipAuthUsername,omitempty"` - StatusCallback *string `json:"StatusCallback,omitempty"` - StatusCallbackEvent *[]string `json:"StatusCallbackEvent,omitempty"` - StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` - Timeout *int32 `json:"Timeout,omitempty"` - To *string `json:"To,omitempty"` - Trim *string `json:"Trim,omitempty"` - Twiml *string `json:"Twiml,omitempty"` - Url *string `json:"Url,omitempty"` + ApplicationSid *string `json:"ApplicationSid,omitempty"` + AsyncAmd *string `json:"AsyncAmd,omitempty"` + AsyncAmdStatusCallback *string `json:"AsyncAmdStatusCallback,omitempty"` + AsyncAmdStatusCallbackMethod *string `json:"AsyncAmdStatusCallbackMethod,omitempty"` + Byoc *string `json:"Byoc,omitempty"` + CallReason *string `json:"CallReason,omitempty"` + CallerId *string `json:"CallerId,omitempty"` + FallbackMethod *string `json:"FallbackMethod,omitempty"` + FallbackUrl *string `json:"FallbackUrl,omitempty"` + From *string `json:"From,omitempty"` + MachineDetection *string `json:"MachineDetection,omitempty"` + MachineDetectionSilenceTimeout *int32 `json:"MachineDetectionSilenceTimeout,omitempty"` + MachineDetectionSpeechEndThreshold *int32 `json:"MachineDetectionSpeechEndThreshold,omitempty"` + MachineDetectionSpeechThreshold *int32 `json:"MachineDetectionSpeechThreshold,omitempty"` + MachineDetectionTimeout *int32 `json:"MachineDetectionTimeout,omitempty"` + Method *string `json:"Method,omitempty"` + Record *bool `json:"Record,omitempty"` + RecordingChannels *string `json:"RecordingChannels,omitempty"` + RecordingStatusCallback *string `json:"RecordingStatusCallback,omitempty"` + RecordingStatusCallbackEvent *[]string `json:"RecordingStatusCallbackEvent,omitempty"` + RecordingStatusCallbackMethod *string `json:"RecordingStatusCallbackMethod,omitempty"` + RecordingTrack *string `json:"RecordingTrack,omitempty"` + SendDigits *string `json:"SendDigits,omitempty"` + SipAuthPassword *string `json:"SipAuthPassword,omitempty"` + SipAuthUsername *string `json:"SipAuthUsername,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` + StatusCallbackEvent *[]string `json:"StatusCallbackEvent,omitempty"` + StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` + Timeout *int32 `json:"Timeout,omitempty"` + To *string `json:"To,omitempty"` + Trim *string `json:"Trim,omitempty"` + Twiml *string `json:"Twiml,omitempty"` + Url *string `json:"Url,omitempty"` } /* @@ -333,136 +332,136 @@ type CreateCallParams struct { * @param "Twiml" (string) - TwiML instructions for the call Twilio will use without fetching Twiml from url parameter. If both `twiml` and `url` are provided then `twiml` parameter will be ignored. * @param "Url" (string) - The absolute URL that returns the TwiML instructions for the call. We will call this URL using the `method` when the call connects. For more information, see the [Url Parameter](https://www.twilio.com/docs/voice/make-calls#specify-a-url-parameter) section in [Making Calls](https://www.twilio.com/docs/voice/make-calls). * @return ApiV2010AccountCall - */ +*/ func (c *DefaultApiService) CreateCall(AccountSid string, params *CreateCallParams) (*ApiV2010AccountCall, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Calls.json" + path := "/2010-04-01/Accounts/{AccountSid}/Calls.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.ApplicationSid != nil { - data.Set("ApplicationSid", *params.ApplicationSid) - } - if params != nil && params.AsyncAmd != nil { - data.Set("AsyncAmd", *params.AsyncAmd) - } - if params != nil && params.AsyncAmdStatusCallback != nil { - data.Set("AsyncAmdStatusCallback", *params.AsyncAmdStatusCallback) - } - if params != nil && params.AsyncAmdStatusCallbackMethod != nil { - data.Set("AsyncAmdStatusCallbackMethod", *params.AsyncAmdStatusCallbackMethod) - } - if params != nil && params.Byoc != nil { - data.Set("Byoc", *params.Byoc) - } - if params != nil && params.CallReason != nil { - data.Set("CallReason", *params.CallReason) - } - if params != nil && params.CallerId != nil { - data.Set("CallerId", *params.CallerId) - } - if params != nil && params.FallbackMethod != nil { - data.Set("FallbackMethod", *params.FallbackMethod) - } - if params != nil && params.FallbackUrl != nil { - data.Set("FallbackUrl", *params.FallbackUrl) - } - if params != nil && params.From != nil { - data.Set("From", *params.From) - } - if params != nil && params.MachineDetection != nil { - data.Set("MachineDetection", *params.MachineDetection) - } - if params != nil && params.MachineDetectionSilenceTimeout != nil { - data.Set("MachineDetectionSilenceTimeout", fmt.Sprint(*params.MachineDetectionSilenceTimeout)) - } - if params != nil && params.MachineDetectionSpeechEndThreshold != nil { - data.Set("MachineDetectionSpeechEndThreshold", fmt.Sprint(*params.MachineDetectionSpeechEndThreshold)) - } - if params != nil && params.MachineDetectionSpeechThreshold != nil { - data.Set("MachineDetectionSpeechThreshold", fmt.Sprint(*params.MachineDetectionSpeechThreshold)) - } - if params != nil && params.MachineDetectionTimeout != nil { - data.Set("MachineDetectionTimeout", fmt.Sprint(*params.MachineDetectionTimeout)) - } - if params != nil && params.Method != nil { - data.Set("Method", *params.Method) - } - if params != nil && params.Record != nil { - data.Set("Record", fmt.Sprint(*params.Record)) - } - if params != nil && params.RecordingChannels != nil { - data.Set("RecordingChannels", *params.RecordingChannels) - } - if params != nil && params.RecordingStatusCallback != nil { - data.Set("RecordingStatusCallback", *params.RecordingStatusCallback) - } - if params != nil && params.RecordingStatusCallbackEvent != nil { - data.Set("RecordingStatusCallbackEvent", strings.Join(*params.RecordingStatusCallbackEvent, ",")) - } - if params != nil && params.RecordingStatusCallbackMethod != nil { - data.Set("RecordingStatusCallbackMethod", *params.RecordingStatusCallbackMethod) - } - if params != nil && params.RecordingTrack != nil { - data.Set("RecordingTrack", *params.RecordingTrack) - } - if params != nil && params.SendDigits != nil { - data.Set("SendDigits", *params.SendDigits) - } - if params != nil && params.SipAuthPassword != nil { - data.Set("SipAuthPassword", *params.SipAuthPassword) - } - if params != nil && params.SipAuthUsername != nil { - data.Set("SipAuthUsername", *params.SipAuthUsername) - } - if params != nil && params.StatusCallback != nil { - data.Set("StatusCallback", *params.StatusCallback) - } - if params != nil && params.StatusCallbackEvent != nil { - data.Set("StatusCallbackEvent", strings.Join(*params.StatusCallbackEvent, ",")) - } - if params != nil && params.StatusCallbackMethod != nil { - data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) - } - if params != nil && params.Timeout != nil { - data.Set("Timeout", fmt.Sprint(*params.Timeout)) - } - if params != nil && params.To != nil { - data.Set("To", *params.To) - } - if params != nil && params.Trim != nil { - data.Set("Trim", *params.Trim) - } - if params != nil && params.Twiml != nil { - data.Set("Twiml", *params.Twiml) - } - if params != nil && params.Url != nil { - data.Set("Url", *params.Url) - } + if params != nil && params.ApplicationSid != nil { + data.Set("ApplicationSid", *params.ApplicationSid) +} + if params != nil && params.AsyncAmd != nil { + data.Set("AsyncAmd", *params.AsyncAmd) +} + if params != nil && params.AsyncAmdStatusCallback != nil { + data.Set("AsyncAmdStatusCallback", *params.AsyncAmdStatusCallback) +} + if params != nil && params.AsyncAmdStatusCallbackMethod != nil { + data.Set("AsyncAmdStatusCallbackMethod", *params.AsyncAmdStatusCallbackMethod) +} + if params != nil && params.Byoc != nil { + data.Set("Byoc", *params.Byoc) +} + if params != nil && params.CallReason != nil { + data.Set("CallReason", *params.CallReason) +} + if params != nil && params.CallerId != nil { + data.Set("CallerId", *params.CallerId) +} + if params != nil && params.FallbackMethod != nil { + data.Set("FallbackMethod", *params.FallbackMethod) +} + if params != nil && params.FallbackUrl != nil { + data.Set("FallbackUrl", *params.FallbackUrl) +} + if params != nil && params.From != nil { + data.Set("From", *params.From) +} + if params != nil && params.MachineDetection != nil { + data.Set("MachineDetection", *params.MachineDetection) +} + if params != nil && params.MachineDetectionSilenceTimeout != nil { + data.Set("MachineDetectionSilenceTimeout", fmt.Sprint(*params.MachineDetectionSilenceTimeout)) +} + if params != nil && params.MachineDetectionSpeechEndThreshold != nil { + data.Set("MachineDetectionSpeechEndThreshold", fmt.Sprint(*params.MachineDetectionSpeechEndThreshold)) +} + if params != nil && params.MachineDetectionSpeechThreshold != nil { + data.Set("MachineDetectionSpeechThreshold", fmt.Sprint(*params.MachineDetectionSpeechThreshold)) +} + if params != nil && params.MachineDetectionTimeout != nil { + data.Set("MachineDetectionTimeout", fmt.Sprint(*params.MachineDetectionTimeout)) +} + if params != nil && params.Method != nil { + data.Set("Method", *params.Method) +} + if params != nil && params.Record != nil { + data.Set("Record", fmt.Sprint(*params.Record)) +} + if params != nil && params.RecordingChannels != nil { + data.Set("RecordingChannels", *params.RecordingChannels) +} + if params != nil && params.RecordingStatusCallback != nil { + data.Set("RecordingStatusCallback", *params.RecordingStatusCallback) +} + if params != nil && params.RecordingStatusCallbackEvent != nil { + data.Set("RecordingStatusCallbackEvent", strings.Join(*params.RecordingStatusCallbackEvent, ",")) +} + if params != nil && params.RecordingStatusCallbackMethod != nil { + data.Set("RecordingStatusCallbackMethod", *params.RecordingStatusCallbackMethod) +} + if params != nil && params.RecordingTrack != nil { + data.Set("RecordingTrack", *params.RecordingTrack) +} + if params != nil && params.SendDigits != nil { + data.Set("SendDigits", *params.SendDigits) +} + if params != nil && params.SipAuthPassword != nil { + data.Set("SipAuthPassword", *params.SipAuthPassword) +} + if params != nil && params.SipAuthUsername != nil { + data.Set("SipAuthUsername", *params.SipAuthUsername) +} + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) +} + if params != nil && params.StatusCallbackEvent != nil { + data.Set("StatusCallbackEvent", strings.Join(*params.StatusCallbackEvent, ",")) +} + if params != nil && params.StatusCallbackMethod != nil { + data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) +} + if params != nil && params.Timeout != nil { + data.Set("Timeout", fmt.Sprint(*params.Timeout)) +} + if params != nil && params.To != nil { + data.Set("To", *params.To) +} + if params != nil && params.Trim != nil { + data.Set("Trim", *params.Trim) +} + if params != nil && params.Twiml != nil { + data.Set("Twiml", *params.Twiml) +} + if params != nil && params.Url != nil { + data.Set("Url", *params.Url) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ApiV2010AccountCall{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ApiV2010AccountCall{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateCallFeedbackSummaryParams Optional parameters for the method 'CreateCallFeedbackSummary' type CreateCallFeedbackSummaryParams struct { - EndDate *time.Time `json:"EndDate,omitempty"` - IncludeSubaccounts *bool `json:"IncludeSubaccounts,omitempty"` - StartDate *time.Time `json:"StartDate,omitempty"` - StatusCallback *string `json:"StatusCallback,omitempty"` - StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` + EndDate *time.Time `json:"EndDate,omitempty"` + IncludeSubaccounts *bool `json:"IncludeSubaccounts,omitempty"` + StartDate *time.Time `json:"StartDate,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` + StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` } /* @@ -476,53 +475,53 @@ type CreateCallFeedbackSummaryParams struct { * @param "StatusCallback" (string) - The URL that we will request when the feedback summary is complete. * @param "StatusCallbackMethod" (string) - The HTTP method (`GET` or `POST`) we use to make the request to the `StatusCallback` URL. * @return ApiV2010AccountCallCallFeedbackSummary - */ +*/ func (c *DefaultApiService) CreateCallFeedbackSummary(AccountSid string, params *CreateCallFeedbackSummaryParams) (*ApiV2010AccountCallCallFeedbackSummary, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Calls/FeedbackSummary.json" + path := "/2010-04-01/Accounts/{AccountSid}/Calls/FeedbackSummary.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.EndDate != nil { - data.Set("EndDate", fmt.Sprint(*params.EndDate)) - } - if params != nil && params.IncludeSubaccounts != nil { - data.Set("IncludeSubaccounts", fmt.Sprint(*params.IncludeSubaccounts)) - } - if params != nil && params.StartDate != nil { - data.Set("StartDate", fmt.Sprint(*params.StartDate)) - } - if params != nil && params.StatusCallback != nil { - data.Set("StatusCallback", *params.StatusCallback) - } - if params != nil && params.StatusCallbackMethod != nil { - data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) - } + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) +} + if params != nil && params.IncludeSubaccounts != nil { + data.Set("IncludeSubaccounts", fmt.Sprint(*params.IncludeSubaccounts)) +} + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) +} + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) +} + if params != nil && params.StatusCallbackMethod != nil { + data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ApiV2010AccountCallCallFeedbackSummary{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ApiV2010AccountCallCallFeedbackSummary{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateCallRecordingParams Optional parameters for the method 'CreateCallRecording' type CreateCallRecordingParams struct { - RecordingChannels *string `json:"RecordingChannels,omitempty"` - RecordingStatusCallback *string `json:"RecordingStatusCallback,omitempty"` - RecordingStatusCallbackEvent *[]string `json:"RecordingStatusCallbackEvent,omitempty"` - RecordingStatusCallbackMethod *string `json:"RecordingStatusCallbackMethod,omitempty"` - RecordingTrack *string `json:"RecordingTrack,omitempty"` - Trim *string `json:"Trim,omitempty"` + RecordingChannels *string `json:"RecordingChannels,omitempty"` + RecordingStatusCallback *string `json:"RecordingStatusCallback,omitempty"` + RecordingStatusCallbackEvent *[]string `json:"RecordingStatusCallbackEvent,omitempty"` + RecordingStatusCallbackMethod *string `json:"RecordingStatusCallbackMethod,omitempty"` + RecordingTrack *string `json:"RecordingTrack,omitempty"` + Trim *string `json:"Trim,omitempty"` } /* @@ -538,75 +537,75 @@ type CreateCallRecordingParams struct { * @param "RecordingTrack" (string) - The audio track to record for the call. Can be: `inbound`, `outbound` or `both`. The default is `both`. `inbound` records the audio that is received by Twilio. `outbound` records the audio that is generated from Twilio. `both` records the audio that is received and generated by Twilio. * @param "Trim" (string) - Whether to trim any leading and trailing silence in the recording. Can be: `trim-silence` or `do-not-trim` and the default is `do-not-trim`. `trim-silence` trims the silence from the beginning and end of the recording and `do-not-trim` does not. * @return ApiV2010AccountCallCallRecording - */ +*/ func (c *DefaultApiService) CreateCallRecording(AccountSid string, CallSid string, params *CreateCallRecordingParams) (*ApiV2010AccountCallCallRecording, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Recordings.json" + path := "/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Recordings.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.RecordingChannels != nil { - data.Set("RecordingChannels", *params.RecordingChannels) - } - if params != nil && params.RecordingStatusCallback != nil { - data.Set("RecordingStatusCallback", *params.RecordingStatusCallback) - } - if params != nil && params.RecordingStatusCallbackEvent != nil { - data.Set("RecordingStatusCallbackEvent", strings.Join(*params.RecordingStatusCallbackEvent, ",")) - } - if params != nil && params.RecordingStatusCallbackMethod != nil { - data.Set("RecordingStatusCallbackMethod", *params.RecordingStatusCallbackMethod) - } - if params != nil && params.RecordingTrack != nil { - data.Set("RecordingTrack", *params.RecordingTrack) - } - if params != nil && params.Trim != nil { - data.Set("Trim", *params.Trim) - } + if params != nil && params.RecordingChannels != nil { + data.Set("RecordingChannels", *params.RecordingChannels) +} + if params != nil && params.RecordingStatusCallback != nil { + data.Set("RecordingStatusCallback", *params.RecordingStatusCallback) +} + if params != nil && params.RecordingStatusCallbackEvent != nil { + data.Set("RecordingStatusCallbackEvent", strings.Join(*params.RecordingStatusCallbackEvent, ",")) +} + if params != nil && params.RecordingStatusCallbackMethod != nil { + data.Set("RecordingStatusCallbackMethod", *params.RecordingStatusCallbackMethod) +} + if params != nil && params.RecordingTrack != nil { + data.Set("RecordingTrack", *params.RecordingTrack) +} + if params != nil && params.Trim != nil { + data.Set("Trim", *params.Trim) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ApiV2010AccountCallCallRecording{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ApiV2010AccountCallCallRecording{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateIncomingPhoneNumberParams Optional parameters for the method 'CreateIncomingPhoneNumber' type CreateIncomingPhoneNumberParams struct { - AddressSid *string `json:"AddressSid,omitempty"` - ApiVersion *string `json:"ApiVersion,omitempty"` - AreaCode *string `json:"AreaCode,omitempty"` - BundleSid *string `json:"BundleSid,omitempty"` - EmergencyAddressSid *string `json:"EmergencyAddressSid,omitempty"` - EmergencyStatus *string `json:"EmergencyStatus,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - IdentitySid *string `json:"IdentitySid,omitempty"` - PhoneNumber *string `json:"PhoneNumber,omitempty"` - SmsApplicationSid *string `json:"SmsApplicationSid,omitempty"` - SmsFallbackMethod *string `json:"SmsFallbackMethod,omitempty"` - SmsFallbackUrl *string `json:"SmsFallbackUrl,omitempty"` - SmsMethod *string `json:"SmsMethod,omitempty"` - SmsUrl *string `json:"SmsUrl,omitempty"` - StatusCallback *string `json:"StatusCallback,omitempty"` + AddressSid *string `json:"AddressSid,omitempty"` + ApiVersion *string `json:"ApiVersion,omitempty"` + AreaCode *string `json:"AreaCode,omitempty"` + BundleSid *string `json:"BundleSid,omitempty"` + EmergencyAddressSid *string `json:"EmergencyAddressSid,omitempty"` + EmergencyStatus *string `json:"EmergencyStatus,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + IdentitySid *string `json:"IdentitySid,omitempty"` + PhoneNumber *string `json:"PhoneNumber,omitempty"` + SmsApplicationSid *string `json:"SmsApplicationSid,omitempty"` + SmsFallbackMethod *string `json:"SmsFallbackMethod,omitempty"` + SmsFallbackUrl *string `json:"SmsFallbackUrl,omitempty"` + SmsMethod *string `json:"SmsMethod,omitempty"` + SmsUrl *string `json:"SmsUrl,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` - TrunkSid *string `json:"TrunkSid,omitempty"` - VoiceApplicationSid *string `json:"VoiceApplicationSid,omitempty"` - VoiceCallerIdLookup *bool `json:"VoiceCallerIdLookup,omitempty"` - VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"` - VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` - VoiceMethod *string `json:"VoiceMethod,omitempty"` - VoiceReceiveMode *string `json:"VoiceReceiveMode,omitempty"` - VoiceUrl *string `json:"VoiceUrl,omitempty"` + TrunkSid *string `json:"TrunkSid,omitempty"` + VoiceApplicationSid *string `json:"VoiceApplicationSid,omitempty"` + VoiceCallerIdLookup *bool `json:"VoiceCallerIdLookup,omitempty"` + VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"` + VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` + VoiceMethod *string `json:"VoiceMethod,omitempty"` + VoiceReceiveMode *string `json:"VoiceReceiveMode,omitempty"` + VoiceUrl *string `json:"VoiceUrl,omitempty"` } /* @@ -639,102 +638,102 @@ type CreateIncomingPhoneNumberParams struct { * @param "VoiceReceiveMode" (string) - The configuration parameter for the new phone number to receive incoming voice calls or faxes. Can be: `fax` or `voice` and defaults to `voice`. * @param "VoiceUrl" (string) - The URL that we should call to answer a call to the new phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set. * @return ApiV2010AccountIncomingPhoneNumber - */ +*/ func (c *DefaultApiService) CreateIncomingPhoneNumber(AccountSid string, params *CreateIncomingPhoneNumberParams) (*ApiV2010AccountIncomingPhoneNumber, error) { - path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers.json" + path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.AddressSid != nil { - data.Set("AddressSid", *params.AddressSid) - } - if params != nil && params.ApiVersion != nil { - data.Set("ApiVersion", *params.ApiVersion) - } - if params != nil && params.AreaCode != nil { - data.Set("AreaCode", *params.AreaCode) - } - if params != nil && params.BundleSid != nil { - data.Set("BundleSid", *params.BundleSid) - } - if params != nil && params.EmergencyAddressSid != nil { - data.Set("EmergencyAddressSid", *params.EmergencyAddressSid) - } - if params != nil && params.EmergencyStatus != nil { - data.Set("EmergencyStatus", *params.EmergencyStatus) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.IdentitySid != nil { - data.Set("IdentitySid", *params.IdentitySid) - } - if params != nil && params.PhoneNumber != nil { - data.Set("PhoneNumber", *params.PhoneNumber) - } - if params != nil && params.SmsApplicationSid != nil { - data.Set("SmsApplicationSid", *params.SmsApplicationSid) - } - if params != nil && params.SmsFallbackMethod != nil { - data.Set("SmsFallbackMethod", *params.SmsFallbackMethod) - } - if params != nil && params.SmsFallbackUrl != nil { - data.Set("SmsFallbackUrl", *params.SmsFallbackUrl) - } - if params != nil && params.SmsMethod != nil { - data.Set("SmsMethod", *params.SmsMethod) - } - if params != nil && params.SmsUrl != nil { - data.Set("SmsUrl", *params.SmsUrl) - } - if params != nil && params.StatusCallback != nil { - data.Set("StatusCallback", *params.StatusCallback) - } - if params != nil && params.StatusCallbackMethod != nil { - data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) - } - if params != nil && params.TrunkSid != nil { - data.Set("TrunkSid", *params.TrunkSid) - } - if params != nil && params.VoiceApplicationSid != nil { - data.Set("VoiceApplicationSid", *params.VoiceApplicationSid) - } - if params != nil && params.VoiceCallerIdLookup != nil { - data.Set("VoiceCallerIdLookup", fmt.Sprint(*params.VoiceCallerIdLookup)) - } - if params != nil && params.VoiceFallbackMethod != nil { - data.Set("VoiceFallbackMethod", *params.VoiceFallbackMethod) - } - if params != nil && params.VoiceFallbackUrl != nil { - data.Set("VoiceFallbackUrl", *params.VoiceFallbackUrl) - } - if params != nil && params.VoiceMethod != nil { - data.Set("VoiceMethod", *params.VoiceMethod) - } - if params != nil && params.VoiceReceiveMode != nil { - data.Set("VoiceReceiveMode", *params.VoiceReceiveMode) - } - if params != nil && params.VoiceUrl != nil { - data.Set("VoiceUrl", *params.VoiceUrl) - } + if params != nil && params.AddressSid != nil { + data.Set("AddressSid", *params.AddressSid) +} + if params != nil && params.ApiVersion != nil { + data.Set("ApiVersion", *params.ApiVersion) +} + if params != nil && params.AreaCode != nil { + data.Set("AreaCode", *params.AreaCode) +} + if params != nil && params.BundleSid != nil { + data.Set("BundleSid", *params.BundleSid) +} + if params != nil && params.EmergencyAddressSid != nil { + data.Set("EmergencyAddressSid", *params.EmergencyAddressSid) +} + if params != nil && params.EmergencyStatus != nil { + data.Set("EmergencyStatus", *params.EmergencyStatus) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.IdentitySid != nil { + data.Set("IdentitySid", *params.IdentitySid) +} + if params != nil && params.PhoneNumber != nil { + data.Set("PhoneNumber", *params.PhoneNumber) +} + if params != nil && params.SmsApplicationSid != nil { + data.Set("SmsApplicationSid", *params.SmsApplicationSid) +} + if params != nil && params.SmsFallbackMethod != nil { + data.Set("SmsFallbackMethod", *params.SmsFallbackMethod) +} + if params != nil && params.SmsFallbackUrl != nil { + data.Set("SmsFallbackUrl", *params.SmsFallbackUrl) +} + if params != nil && params.SmsMethod != nil { + data.Set("SmsMethod", *params.SmsMethod) +} + if params != nil && params.SmsUrl != nil { + data.Set("SmsUrl", *params.SmsUrl) +} + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) +} + if params != nil && params.StatusCallbackMethod != nil { + data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) +} + if params != nil && params.TrunkSid != nil { + data.Set("TrunkSid", *params.TrunkSid) +} + if params != nil && params.VoiceApplicationSid != nil { + data.Set("VoiceApplicationSid", *params.VoiceApplicationSid) +} + if params != nil && params.VoiceCallerIdLookup != nil { + data.Set("VoiceCallerIdLookup", fmt.Sprint(*params.VoiceCallerIdLookup)) +} + if params != nil && params.VoiceFallbackMethod != nil { + data.Set("VoiceFallbackMethod", *params.VoiceFallbackMethod) +} + if params != nil && params.VoiceFallbackUrl != nil { + data.Set("VoiceFallbackUrl", *params.VoiceFallbackUrl) +} + if params != nil && params.VoiceMethod != nil { + data.Set("VoiceMethod", *params.VoiceMethod) +} + if params != nil && params.VoiceReceiveMode != nil { + data.Set("VoiceReceiveMode", *params.VoiceReceiveMode) +} + if params != nil && params.VoiceUrl != nil { + data.Set("VoiceUrl", *params.VoiceUrl) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ApiV2010AccountIncomingPhoneNumber{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ApiV2010AccountIncomingPhoneNumber{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateIncomingPhoneNumberAssignedAddOnParams Optional parameters for the method 'CreateIncomingPhoneNumberAssignedAddOn' type CreateIncomingPhoneNumberAssignedAddOnParams struct { InstalledAddOnSid *string `json:"InstalledAddOnSid,omitempty"` @@ -748,59 +747,59 @@ type CreateIncomingPhoneNumberAssignedAddOnParams struct { * @param optional nil or *CreateIncomingPhoneNumberAssignedAddOnParams - Optional Parameters: * @param "InstalledAddOnSid" (string) - The SID that identifies the Add-on installation. * @return ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOn - */ +*/ func (c *DefaultApiService) CreateIncomingPhoneNumberAssignedAddOn(AccountSid string, ResourceSid string, params *CreateIncomingPhoneNumberAssignedAddOnParams) (*ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOn, error) { - path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{ResourceSid}/AssignedAddOns.json" + path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{ResourceSid}/AssignedAddOns.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"ResourceSid"+"}", ResourceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.InstalledAddOnSid != nil { - data.Set("InstalledAddOnSid", *params.InstalledAddOnSid) - } + if params != nil && params.InstalledAddOnSid != nil { + data.Set("InstalledAddOnSid", *params.InstalledAddOnSid) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOn{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOn{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateIncomingPhoneNumberLocalParams Optional parameters for the method 'CreateIncomingPhoneNumberLocal' type CreateIncomingPhoneNumberLocalParams struct { - AddressSid *string `json:"AddressSid,omitempty"` - ApiVersion *string `json:"ApiVersion,omitempty"` - BundleSid *string `json:"BundleSid,omitempty"` - EmergencyAddressSid *string `json:"EmergencyAddressSid,omitempty"` - EmergencyStatus *string `json:"EmergencyStatus,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - IdentitySid *string `json:"IdentitySid,omitempty"` - PhoneNumber *string `json:"PhoneNumber,omitempty"` - SmsApplicationSid *string `json:"SmsApplicationSid,omitempty"` - SmsFallbackMethod *string `json:"SmsFallbackMethod,omitempty"` - SmsFallbackUrl *string `json:"SmsFallbackUrl,omitempty"` - SmsMethod *string `json:"SmsMethod,omitempty"` - SmsUrl *string `json:"SmsUrl,omitempty"` - StatusCallback *string `json:"StatusCallback,omitempty"` + AddressSid *string `json:"AddressSid,omitempty"` + ApiVersion *string `json:"ApiVersion,omitempty"` + BundleSid *string `json:"BundleSid,omitempty"` + EmergencyAddressSid *string `json:"EmergencyAddressSid,omitempty"` + EmergencyStatus *string `json:"EmergencyStatus,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + IdentitySid *string `json:"IdentitySid,omitempty"` + PhoneNumber *string `json:"PhoneNumber,omitempty"` + SmsApplicationSid *string `json:"SmsApplicationSid,omitempty"` + SmsFallbackMethod *string `json:"SmsFallbackMethod,omitempty"` + SmsFallbackUrl *string `json:"SmsFallbackUrl,omitempty"` + SmsMethod *string `json:"SmsMethod,omitempty"` + SmsUrl *string `json:"SmsUrl,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` - TrunkSid *string `json:"TrunkSid,omitempty"` - VoiceApplicationSid *string `json:"VoiceApplicationSid,omitempty"` - VoiceCallerIdLookup *bool `json:"VoiceCallerIdLookup,omitempty"` - VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"` - VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` - VoiceMethod *string `json:"VoiceMethod,omitempty"` - VoiceReceiveMode *string `json:"VoiceReceiveMode,omitempty"` - VoiceUrl *string `json:"VoiceUrl,omitempty"` + TrunkSid *string `json:"TrunkSid,omitempty"` + VoiceApplicationSid *string `json:"VoiceApplicationSid,omitempty"` + VoiceCallerIdLookup *bool `json:"VoiceCallerIdLookup,omitempty"` + VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"` + VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` + VoiceMethod *string `json:"VoiceMethod,omitempty"` + VoiceReceiveMode *string `json:"VoiceReceiveMode,omitempty"` + VoiceUrl *string `json:"VoiceUrl,omitempty"` } /* @@ -831,124 +830,124 @@ type CreateIncomingPhoneNumberLocalParams struct { * @param "VoiceReceiveMode" (string) - The configuration parameter for the new phone number to receive incoming voice calls or faxes. Can be: `fax` or `voice` and defaults to `voice`. * @param "VoiceUrl" (string) - The URL that we should call to answer a call to the new phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set. * @return ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberLocal - */ +*/ func (c *DefaultApiService) CreateIncomingPhoneNumberLocal(AccountSid string, params *CreateIncomingPhoneNumberLocalParams) (*ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberLocal, error) { - path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/Local.json" + path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/Local.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.AddressSid != nil { - data.Set("AddressSid", *params.AddressSid) - } - if params != nil && params.ApiVersion != nil { - data.Set("ApiVersion", *params.ApiVersion) - } - if params != nil && params.BundleSid != nil { - data.Set("BundleSid", *params.BundleSid) - } - if params != nil && params.EmergencyAddressSid != nil { - data.Set("EmergencyAddressSid", *params.EmergencyAddressSid) - } - if params != nil && params.EmergencyStatus != nil { - data.Set("EmergencyStatus", *params.EmergencyStatus) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.IdentitySid != nil { - data.Set("IdentitySid", *params.IdentitySid) - } - if params != nil && params.PhoneNumber != nil { - data.Set("PhoneNumber", *params.PhoneNumber) - } - if params != nil && params.SmsApplicationSid != nil { - data.Set("SmsApplicationSid", *params.SmsApplicationSid) - } - if params != nil && params.SmsFallbackMethod != nil { - data.Set("SmsFallbackMethod", *params.SmsFallbackMethod) - } - if params != nil && params.SmsFallbackUrl != nil { - data.Set("SmsFallbackUrl", *params.SmsFallbackUrl) - } - if params != nil && params.SmsMethod != nil { - data.Set("SmsMethod", *params.SmsMethod) - } - if params != nil && params.SmsUrl != nil { - data.Set("SmsUrl", *params.SmsUrl) - } - if params != nil && params.StatusCallback != nil { - data.Set("StatusCallback", *params.StatusCallback) - } - if params != nil && params.StatusCallbackMethod != nil { - data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) - } - if params != nil && params.TrunkSid != nil { - data.Set("TrunkSid", *params.TrunkSid) - } - if params != nil && params.VoiceApplicationSid != nil { - data.Set("VoiceApplicationSid", *params.VoiceApplicationSid) - } - if params != nil && params.VoiceCallerIdLookup != nil { - data.Set("VoiceCallerIdLookup", fmt.Sprint(*params.VoiceCallerIdLookup)) - } - if params != nil && params.VoiceFallbackMethod != nil { - data.Set("VoiceFallbackMethod", *params.VoiceFallbackMethod) - } - if params != nil && params.VoiceFallbackUrl != nil { - data.Set("VoiceFallbackUrl", *params.VoiceFallbackUrl) - } - if params != nil && params.VoiceMethod != nil { - data.Set("VoiceMethod", *params.VoiceMethod) - } - if params != nil && params.VoiceReceiveMode != nil { - data.Set("VoiceReceiveMode", *params.VoiceReceiveMode) - } - if params != nil && params.VoiceUrl != nil { - data.Set("VoiceUrl", *params.VoiceUrl) - } + if params != nil && params.AddressSid != nil { + data.Set("AddressSid", *params.AddressSid) +} + if params != nil && params.ApiVersion != nil { + data.Set("ApiVersion", *params.ApiVersion) +} + if params != nil && params.BundleSid != nil { + data.Set("BundleSid", *params.BundleSid) +} + if params != nil && params.EmergencyAddressSid != nil { + data.Set("EmergencyAddressSid", *params.EmergencyAddressSid) +} + if params != nil && params.EmergencyStatus != nil { + data.Set("EmergencyStatus", *params.EmergencyStatus) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.IdentitySid != nil { + data.Set("IdentitySid", *params.IdentitySid) +} + if params != nil && params.PhoneNumber != nil { + data.Set("PhoneNumber", *params.PhoneNumber) +} + if params != nil && params.SmsApplicationSid != nil { + data.Set("SmsApplicationSid", *params.SmsApplicationSid) +} + if params != nil && params.SmsFallbackMethod != nil { + data.Set("SmsFallbackMethod", *params.SmsFallbackMethod) +} + if params != nil && params.SmsFallbackUrl != nil { + data.Set("SmsFallbackUrl", *params.SmsFallbackUrl) +} + if params != nil && params.SmsMethod != nil { + data.Set("SmsMethod", *params.SmsMethod) +} + if params != nil && params.SmsUrl != nil { + data.Set("SmsUrl", *params.SmsUrl) +} + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) +} + if params != nil && params.StatusCallbackMethod != nil { + data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) +} + if params != nil && params.TrunkSid != nil { + data.Set("TrunkSid", *params.TrunkSid) +} + if params != nil && params.VoiceApplicationSid != nil { + data.Set("VoiceApplicationSid", *params.VoiceApplicationSid) +} + if params != nil && params.VoiceCallerIdLookup != nil { + data.Set("VoiceCallerIdLookup", fmt.Sprint(*params.VoiceCallerIdLookup)) +} + if params != nil && params.VoiceFallbackMethod != nil { + data.Set("VoiceFallbackMethod", *params.VoiceFallbackMethod) +} + if params != nil && params.VoiceFallbackUrl != nil { + data.Set("VoiceFallbackUrl", *params.VoiceFallbackUrl) +} + if params != nil && params.VoiceMethod != nil { + data.Set("VoiceMethod", *params.VoiceMethod) +} + if params != nil && params.VoiceReceiveMode != nil { + data.Set("VoiceReceiveMode", *params.VoiceReceiveMode) +} + if params != nil && params.VoiceUrl != nil { + data.Set("VoiceUrl", *params.VoiceUrl) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberLocal{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberLocal{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateIncomingPhoneNumberMobileParams Optional parameters for the method 'CreateIncomingPhoneNumberMobile' type CreateIncomingPhoneNumberMobileParams struct { - AddressSid *string `json:"AddressSid,omitempty"` - ApiVersion *string `json:"ApiVersion,omitempty"` - BundleSid *string `json:"BundleSid,omitempty"` - EmergencyAddressSid *string `json:"EmergencyAddressSid,omitempty"` - EmergencyStatus *string `json:"EmergencyStatus,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - IdentitySid *string `json:"IdentitySid,omitempty"` - PhoneNumber *string `json:"PhoneNumber,omitempty"` - SmsApplicationSid *string `json:"SmsApplicationSid,omitempty"` - SmsFallbackMethod *string `json:"SmsFallbackMethod,omitempty"` - SmsFallbackUrl *string `json:"SmsFallbackUrl,omitempty"` - SmsMethod *string `json:"SmsMethod,omitempty"` - SmsUrl *string `json:"SmsUrl,omitempty"` - StatusCallback *string `json:"StatusCallback,omitempty"` + AddressSid *string `json:"AddressSid,omitempty"` + ApiVersion *string `json:"ApiVersion,omitempty"` + BundleSid *string `json:"BundleSid,omitempty"` + EmergencyAddressSid *string `json:"EmergencyAddressSid,omitempty"` + EmergencyStatus *string `json:"EmergencyStatus,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + IdentitySid *string `json:"IdentitySid,omitempty"` + PhoneNumber *string `json:"PhoneNumber,omitempty"` + SmsApplicationSid *string `json:"SmsApplicationSid,omitempty"` + SmsFallbackMethod *string `json:"SmsFallbackMethod,omitempty"` + SmsFallbackUrl *string `json:"SmsFallbackUrl,omitempty"` + SmsMethod *string `json:"SmsMethod,omitempty"` + SmsUrl *string `json:"SmsUrl,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` - TrunkSid *string `json:"TrunkSid,omitempty"` - VoiceApplicationSid *string `json:"VoiceApplicationSid,omitempty"` - VoiceCallerIdLookup *bool `json:"VoiceCallerIdLookup,omitempty"` - VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"` - VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` - VoiceMethod *string `json:"VoiceMethod,omitempty"` - VoiceReceiveMode *string `json:"VoiceReceiveMode,omitempty"` - VoiceUrl *string `json:"VoiceUrl,omitempty"` + TrunkSid *string `json:"TrunkSid,omitempty"` + VoiceApplicationSid *string `json:"VoiceApplicationSid,omitempty"` + VoiceCallerIdLookup *bool `json:"VoiceCallerIdLookup,omitempty"` + VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"` + VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` + VoiceMethod *string `json:"VoiceMethod,omitempty"` + VoiceReceiveMode *string `json:"VoiceReceiveMode,omitempty"` + VoiceUrl *string `json:"VoiceUrl,omitempty"` } /* @@ -979,124 +978,124 @@ type CreateIncomingPhoneNumberMobileParams struct { * @param "VoiceReceiveMode" (string) - The configuration parameter for the new phone number to receive incoming voice calls or faxes. Can be: `fax` or `voice` and defaults to `voice`. * @param "VoiceUrl" (string) - The URL that we should call to answer a call to the new phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set. * @return ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberMobile - */ +*/ func (c *DefaultApiService) CreateIncomingPhoneNumberMobile(AccountSid string, params *CreateIncomingPhoneNumberMobileParams) (*ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberMobile, error) { - path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/Mobile.json" + path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/Mobile.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.AddressSid != nil { - data.Set("AddressSid", *params.AddressSid) - } - if params != nil && params.ApiVersion != nil { - data.Set("ApiVersion", *params.ApiVersion) - } - if params != nil && params.BundleSid != nil { - data.Set("BundleSid", *params.BundleSid) - } - if params != nil && params.EmergencyAddressSid != nil { - data.Set("EmergencyAddressSid", *params.EmergencyAddressSid) - } - if params != nil && params.EmergencyStatus != nil { - data.Set("EmergencyStatus", *params.EmergencyStatus) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.IdentitySid != nil { - data.Set("IdentitySid", *params.IdentitySid) - } - if params != nil && params.PhoneNumber != nil { - data.Set("PhoneNumber", *params.PhoneNumber) - } - if params != nil && params.SmsApplicationSid != nil { - data.Set("SmsApplicationSid", *params.SmsApplicationSid) - } - if params != nil && params.SmsFallbackMethod != nil { - data.Set("SmsFallbackMethod", *params.SmsFallbackMethod) - } - if params != nil && params.SmsFallbackUrl != nil { - data.Set("SmsFallbackUrl", *params.SmsFallbackUrl) - } - if params != nil && params.SmsMethod != nil { - data.Set("SmsMethod", *params.SmsMethod) - } - if params != nil && params.SmsUrl != nil { - data.Set("SmsUrl", *params.SmsUrl) - } - if params != nil && params.StatusCallback != nil { - data.Set("StatusCallback", *params.StatusCallback) - } - if params != nil && params.StatusCallbackMethod != nil { - data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) - } - if params != nil && params.TrunkSid != nil { - data.Set("TrunkSid", *params.TrunkSid) - } - if params != nil && params.VoiceApplicationSid != nil { - data.Set("VoiceApplicationSid", *params.VoiceApplicationSid) - } - if params != nil && params.VoiceCallerIdLookup != nil { - data.Set("VoiceCallerIdLookup", fmt.Sprint(*params.VoiceCallerIdLookup)) - } - if params != nil && params.VoiceFallbackMethod != nil { - data.Set("VoiceFallbackMethod", *params.VoiceFallbackMethod) - } - if params != nil && params.VoiceFallbackUrl != nil { - data.Set("VoiceFallbackUrl", *params.VoiceFallbackUrl) - } - if params != nil && params.VoiceMethod != nil { - data.Set("VoiceMethod", *params.VoiceMethod) - } - if params != nil && params.VoiceReceiveMode != nil { - data.Set("VoiceReceiveMode", *params.VoiceReceiveMode) - } - if params != nil && params.VoiceUrl != nil { - data.Set("VoiceUrl", *params.VoiceUrl) - } + if params != nil && params.AddressSid != nil { + data.Set("AddressSid", *params.AddressSid) +} + if params != nil && params.ApiVersion != nil { + data.Set("ApiVersion", *params.ApiVersion) +} + if params != nil && params.BundleSid != nil { + data.Set("BundleSid", *params.BundleSid) +} + if params != nil && params.EmergencyAddressSid != nil { + data.Set("EmergencyAddressSid", *params.EmergencyAddressSid) +} + if params != nil && params.EmergencyStatus != nil { + data.Set("EmergencyStatus", *params.EmergencyStatus) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.IdentitySid != nil { + data.Set("IdentitySid", *params.IdentitySid) +} + if params != nil && params.PhoneNumber != nil { + data.Set("PhoneNumber", *params.PhoneNumber) +} + if params != nil && params.SmsApplicationSid != nil { + data.Set("SmsApplicationSid", *params.SmsApplicationSid) +} + if params != nil && params.SmsFallbackMethod != nil { + data.Set("SmsFallbackMethod", *params.SmsFallbackMethod) +} + if params != nil && params.SmsFallbackUrl != nil { + data.Set("SmsFallbackUrl", *params.SmsFallbackUrl) +} + if params != nil && params.SmsMethod != nil { + data.Set("SmsMethod", *params.SmsMethod) +} + if params != nil && params.SmsUrl != nil { + data.Set("SmsUrl", *params.SmsUrl) +} + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) +} + if params != nil && params.StatusCallbackMethod != nil { + data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) +} + if params != nil && params.TrunkSid != nil { + data.Set("TrunkSid", *params.TrunkSid) +} + if params != nil && params.VoiceApplicationSid != nil { + data.Set("VoiceApplicationSid", *params.VoiceApplicationSid) +} + if params != nil && params.VoiceCallerIdLookup != nil { + data.Set("VoiceCallerIdLookup", fmt.Sprint(*params.VoiceCallerIdLookup)) +} + if params != nil && params.VoiceFallbackMethod != nil { + data.Set("VoiceFallbackMethod", *params.VoiceFallbackMethod) +} + if params != nil && params.VoiceFallbackUrl != nil { + data.Set("VoiceFallbackUrl", *params.VoiceFallbackUrl) +} + if params != nil && params.VoiceMethod != nil { + data.Set("VoiceMethod", *params.VoiceMethod) +} + if params != nil && params.VoiceReceiveMode != nil { + data.Set("VoiceReceiveMode", *params.VoiceReceiveMode) +} + if params != nil && params.VoiceUrl != nil { + data.Set("VoiceUrl", *params.VoiceUrl) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberMobile{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberMobile{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateIncomingPhoneNumberTollFreeParams Optional parameters for the method 'CreateIncomingPhoneNumberTollFree' type CreateIncomingPhoneNumberTollFreeParams struct { - AddressSid *string `json:"AddressSid,omitempty"` - ApiVersion *string `json:"ApiVersion,omitempty"` - BundleSid *string `json:"BundleSid,omitempty"` - EmergencyAddressSid *string `json:"EmergencyAddressSid,omitempty"` - EmergencyStatus *string `json:"EmergencyStatus,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - IdentitySid *string `json:"IdentitySid,omitempty"` - PhoneNumber *string `json:"PhoneNumber,omitempty"` - SmsApplicationSid *string `json:"SmsApplicationSid,omitempty"` - SmsFallbackMethod *string `json:"SmsFallbackMethod,omitempty"` - SmsFallbackUrl *string `json:"SmsFallbackUrl,omitempty"` - SmsMethod *string `json:"SmsMethod,omitempty"` - SmsUrl *string `json:"SmsUrl,omitempty"` - StatusCallback *string `json:"StatusCallback,omitempty"` + AddressSid *string `json:"AddressSid,omitempty"` + ApiVersion *string `json:"ApiVersion,omitempty"` + BundleSid *string `json:"BundleSid,omitempty"` + EmergencyAddressSid *string `json:"EmergencyAddressSid,omitempty"` + EmergencyStatus *string `json:"EmergencyStatus,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + IdentitySid *string `json:"IdentitySid,omitempty"` + PhoneNumber *string `json:"PhoneNumber,omitempty"` + SmsApplicationSid *string `json:"SmsApplicationSid,omitempty"` + SmsFallbackMethod *string `json:"SmsFallbackMethod,omitempty"` + SmsFallbackUrl *string `json:"SmsFallbackUrl,omitempty"` + SmsMethod *string `json:"SmsMethod,omitempty"` + SmsUrl *string `json:"SmsUrl,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` - TrunkSid *string `json:"TrunkSid,omitempty"` - VoiceApplicationSid *string `json:"VoiceApplicationSid,omitempty"` - VoiceCallerIdLookup *bool `json:"VoiceCallerIdLookup,omitempty"` - VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"` - VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` - VoiceMethod *string `json:"VoiceMethod,omitempty"` - VoiceReceiveMode *string `json:"VoiceReceiveMode,omitempty"` - VoiceUrl *string `json:"VoiceUrl,omitempty"` + TrunkSid *string `json:"TrunkSid,omitempty"` + VoiceApplicationSid *string `json:"VoiceApplicationSid,omitempty"` + VoiceCallerIdLookup *bool `json:"VoiceCallerIdLookup,omitempty"` + VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"` + VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` + VoiceMethod *string `json:"VoiceMethod,omitempty"` + VoiceReceiveMode *string `json:"VoiceReceiveMode,omitempty"` + VoiceUrl *string `json:"VoiceUrl,omitempty"` } /* @@ -1127,117 +1126,117 @@ type CreateIncomingPhoneNumberTollFreeParams struct { * @param "VoiceReceiveMode" (string) - The configuration parameter for the new phone number to receive incoming voice calls or faxes. Can be: `fax` or `voice` and defaults to `voice`. * @param "VoiceUrl" (string) - The URL that we should call to answer a call to the new phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set. * @return ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberTollFree - */ +*/ func (c *DefaultApiService) CreateIncomingPhoneNumberTollFree(AccountSid string, params *CreateIncomingPhoneNumberTollFreeParams) (*ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberTollFree, error) { - path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/TollFree.json" + path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/TollFree.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.AddressSid != nil { - data.Set("AddressSid", *params.AddressSid) - } - if params != nil && params.ApiVersion != nil { - data.Set("ApiVersion", *params.ApiVersion) - } - if params != nil && params.BundleSid != nil { - data.Set("BundleSid", *params.BundleSid) - } - if params != nil && params.EmergencyAddressSid != nil { - data.Set("EmergencyAddressSid", *params.EmergencyAddressSid) - } - if params != nil && params.EmergencyStatus != nil { - data.Set("EmergencyStatus", *params.EmergencyStatus) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.IdentitySid != nil { - data.Set("IdentitySid", *params.IdentitySid) - } - if params != nil && params.PhoneNumber != nil { - data.Set("PhoneNumber", *params.PhoneNumber) - } - if params != nil && params.SmsApplicationSid != nil { - data.Set("SmsApplicationSid", *params.SmsApplicationSid) - } - if params != nil && params.SmsFallbackMethod != nil { - data.Set("SmsFallbackMethod", *params.SmsFallbackMethod) - } - if params != nil && params.SmsFallbackUrl != nil { - data.Set("SmsFallbackUrl", *params.SmsFallbackUrl) - } - if params != nil && params.SmsMethod != nil { - data.Set("SmsMethod", *params.SmsMethod) - } - if params != nil && params.SmsUrl != nil { - data.Set("SmsUrl", *params.SmsUrl) - } - if params != nil && params.StatusCallback != nil { - data.Set("StatusCallback", *params.StatusCallback) - } - if params != nil && params.StatusCallbackMethod != nil { - data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) - } - if params != nil && params.TrunkSid != nil { - data.Set("TrunkSid", *params.TrunkSid) - } - if params != nil && params.VoiceApplicationSid != nil { - data.Set("VoiceApplicationSid", *params.VoiceApplicationSid) - } - if params != nil && params.VoiceCallerIdLookup != nil { - data.Set("VoiceCallerIdLookup", fmt.Sprint(*params.VoiceCallerIdLookup)) - } - if params != nil && params.VoiceFallbackMethod != nil { - data.Set("VoiceFallbackMethod", *params.VoiceFallbackMethod) - } - if params != nil && params.VoiceFallbackUrl != nil { - data.Set("VoiceFallbackUrl", *params.VoiceFallbackUrl) - } - if params != nil && params.VoiceMethod != nil { - data.Set("VoiceMethod", *params.VoiceMethod) - } - if params != nil && params.VoiceReceiveMode != nil { - data.Set("VoiceReceiveMode", *params.VoiceReceiveMode) - } - if params != nil && params.VoiceUrl != nil { - data.Set("VoiceUrl", *params.VoiceUrl) - } + if params != nil && params.AddressSid != nil { + data.Set("AddressSid", *params.AddressSid) +} + if params != nil && params.ApiVersion != nil { + data.Set("ApiVersion", *params.ApiVersion) +} + if params != nil && params.BundleSid != nil { + data.Set("BundleSid", *params.BundleSid) +} + if params != nil && params.EmergencyAddressSid != nil { + data.Set("EmergencyAddressSid", *params.EmergencyAddressSid) +} + if params != nil && params.EmergencyStatus != nil { + data.Set("EmergencyStatus", *params.EmergencyStatus) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.IdentitySid != nil { + data.Set("IdentitySid", *params.IdentitySid) +} + if params != nil && params.PhoneNumber != nil { + data.Set("PhoneNumber", *params.PhoneNumber) +} + if params != nil && params.SmsApplicationSid != nil { + data.Set("SmsApplicationSid", *params.SmsApplicationSid) +} + if params != nil && params.SmsFallbackMethod != nil { + data.Set("SmsFallbackMethod", *params.SmsFallbackMethod) +} + if params != nil && params.SmsFallbackUrl != nil { + data.Set("SmsFallbackUrl", *params.SmsFallbackUrl) +} + if params != nil && params.SmsMethod != nil { + data.Set("SmsMethod", *params.SmsMethod) +} + if params != nil && params.SmsUrl != nil { + data.Set("SmsUrl", *params.SmsUrl) +} + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) +} + if params != nil && params.StatusCallbackMethod != nil { + data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) +} + if params != nil && params.TrunkSid != nil { + data.Set("TrunkSid", *params.TrunkSid) +} + if params != nil && params.VoiceApplicationSid != nil { + data.Set("VoiceApplicationSid", *params.VoiceApplicationSid) +} + if params != nil && params.VoiceCallerIdLookup != nil { + data.Set("VoiceCallerIdLookup", fmt.Sprint(*params.VoiceCallerIdLookup)) +} + if params != nil && params.VoiceFallbackMethod != nil { + data.Set("VoiceFallbackMethod", *params.VoiceFallbackMethod) +} + if params != nil && params.VoiceFallbackUrl != nil { + data.Set("VoiceFallbackUrl", *params.VoiceFallbackUrl) +} + if params != nil && params.VoiceMethod != nil { + data.Set("VoiceMethod", *params.VoiceMethod) +} + if params != nil && params.VoiceReceiveMode != nil { + data.Set("VoiceReceiveMode", *params.VoiceReceiveMode) +} + if params != nil && params.VoiceUrl != nil { + data.Set("VoiceUrl", *params.VoiceUrl) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberTollFree{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberTollFree{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateMessageParams Optional parameters for the method 'CreateMessage' type CreateMessageParams struct { - AddressRetention *string `json:"AddressRetention,omitempty"` - ApplicationSid *string `json:"ApplicationSid,omitempty"` - Attempt *int32 `json:"Attempt,omitempty"` - Body *string `json:"Body,omitempty"` - ContentRetention *string `json:"ContentRetention,omitempty"` - ForceDelivery *bool `json:"ForceDelivery,omitempty"` - From *string `json:"From,omitempty"` - MaxPrice *float32 `json:"MaxPrice,omitempty"` - MediaUrl *[]string `json:"MediaUrl,omitempty"` - MessagingServiceSid *string `json:"MessagingServiceSid,omitempty"` - PersistentAction *[]string `json:"PersistentAction,omitempty"` - ProvideFeedback *bool `json:"ProvideFeedback,omitempty"` - SmartEncoded *bool `json:"SmartEncoded,omitempty"` - StatusCallback *string `json:"StatusCallback,omitempty"` - To *string `json:"To,omitempty"` - ValidityPeriod *int32 `json:"ValidityPeriod,omitempty"` + AddressRetention *string `json:"AddressRetention,omitempty"` + ApplicationSid *string `json:"ApplicationSid,omitempty"` + Attempt *int32 `json:"Attempt,omitempty"` + Body *string `json:"Body,omitempty"` + ContentRetention *string `json:"ContentRetention,omitempty"` + ForceDelivery *bool `json:"ForceDelivery,omitempty"` + From *string `json:"From,omitempty"` + MaxPrice *float32 `json:"MaxPrice,omitempty"` + MediaUrl *[]string `json:"MediaUrl,omitempty"` + MessagingServiceSid *string `json:"MessagingServiceSid,omitempty"` + PersistentAction *[]string `json:"PersistentAction,omitempty"` + ProvideFeedback *bool `json:"ProvideFeedback,omitempty"` + SmartEncoded *bool `json:"SmartEncoded,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` + To *string `json:"To,omitempty"` + ValidityPeriod *int32 `json:"ValidityPeriod,omitempty"` } /* @@ -1262,78 +1261,78 @@ type CreateMessageParams struct { * @param "To" (string) - The destination phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format for SMS/MMS or [Channel user address](https://www.twilio.com/docs/sms/channels#channel-addresses) for other 3rd-party channels. * @param "ValidityPeriod" (int32) - How long in seconds the message can remain in our outgoing message queue. After this period elapses, the message fails and we call your status callback. Can be between 1 and the default value of 14,400 seconds. After a message has been accepted by a carrier, however, we cannot guarantee that the message will not be queued after this period. We recommend that this value be at least 5 seconds. * @return ApiV2010AccountMessage - */ +*/ func (c *DefaultApiService) CreateMessage(AccountSid string, params *CreateMessageParams) (*ApiV2010AccountMessage, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Messages.json" + path := "/2010-04-01/Accounts/{AccountSid}/Messages.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.AddressRetention != nil { - data.Set("AddressRetention", *params.AddressRetention) - } - if params != nil && params.ApplicationSid != nil { - data.Set("ApplicationSid", *params.ApplicationSid) - } - if params != nil && params.Attempt != nil { - data.Set("Attempt", fmt.Sprint(*params.Attempt)) - } - if params != nil && params.Body != nil { - data.Set("Body", *params.Body) - } - if params != nil && params.ContentRetention != nil { - data.Set("ContentRetention", *params.ContentRetention) - } - if params != nil && params.ForceDelivery != nil { - data.Set("ForceDelivery", fmt.Sprint(*params.ForceDelivery)) - } - if params != nil && params.From != nil { - data.Set("From", *params.From) - } - if params != nil && params.MaxPrice != nil { - data.Set("MaxPrice", fmt.Sprint(*params.MaxPrice)) - } - if params != nil && params.MediaUrl != nil { - data.Set("MediaUrl", strings.Join(*params.MediaUrl, ",")) - } - if params != nil && params.MessagingServiceSid != nil { - data.Set("MessagingServiceSid", *params.MessagingServiceSid) - } - if params != nil && params.PersistentAction != nil { - data.Set("PersistentAction", strings.Join(*params.PersistentAction, ",")) - } - if params != nil && params.ProvideFeedback != nil { - data.Set("ProvideFeedback", fmt.Sprint(*params.ProvideFeedback)) - } - if params != nil && params.SmartEncoded != nil { - data.Set("SmartEncoded", fmt.Sprint(*params.SmartEncoded)) - } - if params != nil && params.StatusCallback != nil { - data.Set("StatusCallback", *params.StatusCallback) - } - if params != nil && params.To != nil { - data.Set("To", *params.To) - } - if params != nil && params.ValidityPeriod != nil { - data.Set("ValidityPeriod", fmt.Sprint(*params.ValidityPeriod)) - } + if params != nil && params.AddressRetention != nil { + data.Set("AddressRetention", *params.AddressRetention) +} + if params != nil && params.ApplicationSid != nil { + data.Set("ApplicationSid", *params.ApplicationSid) +} + if params != nil && params.Attempt != nil { + data.Set("Attempt", fmt.Sprint(*params.Attempt)) +} + if params != nil && params.Body != nil { + data.Set("Body", *params.Body) +} + if params != nil && params.ContentRetention != nil { + data.Set("ContentRetention", *params.ContentRetention) +} + if params != nil && params.ForceDelivery != nil { + data.Set("ForceDelivery", fmt.Sprint(*params.ForceDelivery)) +} + if params != nil && params.From != nil { + data.Set("From", *params.From) +} + if params != nil && params.MaxPrice != nil { + data.Set("MaxPrice", fmt.Sprint(*params.MaxPrice)) +} + if params != nil && params.MediaUrl != nil { + data.Set("MediaUrl", strings.Join(*params.MediaUrl, ",")) +} + if params != nil && params.MessagingServiceSid != nil { + data.Set("MessagingServiceSid", *params.MessagingServiceSid) +} + if params != nil && params.PersistentAction != nil { + data.Set("PersistentAction", strings.Join(*params.PersistentAction, ",")) +} + if params != nil && params.ProvideFeedback != nil { + data.Set("ProvideFeedback", fmt.Sprint(*params.ProvideFeedback)) +} + if params != nil && params.SmartEncoded != nil { + data.Set("SmartEncoded", fmt.Sprint(*params.SmartEncoded)) +} + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) +} + if params != nil && params.To != nil { + data.Set("To", *params.To) +} + if params != nil && params.ValidityPeriod != nil { + data.Set("ValidityPeriod", fmt.Sprint(*params.ValidityPeriod)) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ApiV2010AccountMessage{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ApiV2010AccountMessage{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateMessageFeedbackParams Optional parameters for the method 'CreateMessageFeedback' type CreateMessageFeedbackParams struct { Outcome *string `json:"Outcome,omitempty"` @@ -1346,34 +1345,34 @@ type CreateMessageFeedbackParams struct { * @param optional nil or *CreateMessageFeedbackParams - Optional Parameters: * @param "Outcome" (string) - Whether the feedback has arrived. Can be: `unconfirmed` or `confirmed`. If `provide_feedback`=`true` in [the initial HTTP POST](https://www.twilio.com/docs/sms/api/message-resource#create-a-message-resource), the initial value of this property is `unconfirmed`. After the message arrives, update the value to `confirmed`. * @return ApiV2010AccountMessageMessageFeedback - */ +*/ func (c *DefaultApiService) CreateMessageFeedback(AccountSid string, MessageSid string, params *CreateMessageFeedbackParams) (*ApiV2010AccountMessageMessageFeedback, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Messages/{MessageSid}/Feedback.json" + path := "/2010-04-01/Accounts/{AccountSid}/Messages/{MessageSid}/Feedback.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"MessageSid"+"}", MessageSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Outcome != nil { - data.Set("Outcome", *params.Outcome) - } + if params != nil && params.Outcome != nil { + data.Set("Outcome", *params.Outcome) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ApiV2010AccountMessageMessageFeedback{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ApiV2010AccountMessageMessageFeedback{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateNewKeyParams Optional parameters for the method 'CreateNewKey' type CreateNewKeyParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` @@ -1385,33 +1384,33 @@ type CreateNewKeyParams struct { * @param optional nil or *CreateNewKeyParams - Optional Parameters: * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It can be up to 64 characters long. * @return ApiV2010AccountNewKey - */ +*/ func (c *DefaultApiService) CreateNewKey(AccountSid string, params *CreateNewKeyParams) (*ApiV2010AccountNewKey, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Keys.json" + path := "/2010-04-01/Accounts/{AccountSid}/Keys.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ApiV2010AccountNewKey{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ApiV2010AccountNewKey{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateNewSigningKeyParams Optional parameters for the method 'CreateNewSigningKey' type CreateNewSigningKeyParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` @@ -1424,73 +1423,73 @@ type CreateNewSigningKeyParams struct { * @param optional nil or *CreateNewSigningKeyParams - Optional Parameters: * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It can be up to 64 characters long. * @return ApiV2010AccountNewSigningKey - */ +*/ func (c *DefaultApiService) CreateNewSigningKey(AccountSid string, params *CreateNewSigningKeyParams) (*ApiV2010AccountNewSigningKey, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SigningKeys.json" + path := "/2010-04-01/Accounts/{AccountSid}/SigningKeys.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ApiV2010AccountNewSigningKey{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ApiV2010AccountNewSigningKey{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateParticipantParams Optional parameters for the method 'CreateParticipant' type CreateParticipantParams struct { - Beep *string `json:"Beep,omitempty"` - Byoc *string `json:"Byoc,omitempty"` - CallReason *string `json:"CallReason,omitempty"` - CallSidToCoach *string `json:"CallSidToCoach,omitempty"` - CallerId *string `json:"CallerId,omitempty"` - Coaching *bool `json:"Coaching,omitempty"` - ConferenceRecord *string `json:"ConferenceRecord,omitempty"` - ConferenceRecordingStatusCallback *string `json:"ConferenceRecordingStatusCallback,omitempty"` - ConferenceRecordingStatusCallbackEvent *[]string `json:"ConferenceRecordingStatusCallbackEvent,omitempty"` - ConferenceRecordingStatusCallbackMethod *string `json:"ConferenceRecordingStatusCallbackMethod,omitempty"` - ConferenceStatusCallback *string `json:"ConferenceStatusCallback,omitempty"` - ConferenceStatusCallbackEvent *[]string `json:"ConferenceStatusCallbackEvent,omitempty"` - ConferenceStatusCallbackMethod *string `json:"ConferenceStatusCallbackMethod,omitempty"` - ConferenceTrim *string `json:"ConferenceTrim,omitempty"` - EarlyMedia *bool `json:"EarlyMedia,omitempty"` - EndConferenceOnExit *bool `json:"EndConferenceOnExit,omitempty"` - From *string `json:"From,omitempty"` - JitterBufferSize *string `json:"JitterBufferSize,omitempty"` - Label *string `json:"Label,omitempty"` - MaxParticipants *int32 `json:"MaxParticipants,omitempty"` - Muted *bool `json:"Muted,omitempty"` - Record *bool `json:"Record,omitempty"` - RecordingChannels *string `json:"RecordingChannels,omitempty"` - RecordingStatusCallback *string `json:"RecordingStatusCallback,omitempty"` - RecordingStatusCallbackEvent *[]string `json:"RecordingStatusCallbackEvent,omitempty"` - RecordingStatusCallbackMethod *string `json:"RecordingStatusCallbackMethod,omitempty"` - RecordingTrack *string `json:"RecordingTrack,omitempty"` - Region *string `json:"Region,omitempty"` - SipAuthPassword *string `json:"SipAuthPassword,omitempty"` - SipAuthUsername *string `json:"SipAuthUsername,omitempty"` - StartConferenceOnEnter *bool `json:"StartConferenceOnEnter,omitempty"` - StatusCallback *string `json:"StatusCallback,omitempty"` - StatusCallbackEvent *[]string `json:"StatusCallbackEvent,omitempty"` - StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` - Timeout *int32 `json:"Timeout,omitempty"` - To *string `json:"To,omitempty"` - WaitMethod *string `json:"WaitMethod,omitempty"` - WaitUrl *string `json:"WaitUrl,omitempty"` + Beep *string `json:"Beep,omitempty"` + Byoc *string `json:"Byoc,omitempty"` + CallReason *string `json:"CallReason,omitempty"` + CallSidToCoach *string `json:"CallSidToCoach,omitempty"` + CallerId *string `json:"CallerId,omitempty"` + Coaching *bool `json:"Coaching,omitempty"` + ConferenceRecord *string `json:"ConferenceRecord,omitempty"` + ConferenceRecordingStatusCallback *string `json:"ConferenceRecordingStatusCallback,omitempty"` + ConferenceRecordingStatusCallbackEvent *[]string `json:"ConferenceRecordingStatusCallbackEvent,omitempty"` + ConferenceRecordingStatusCallbackMethod *string `json:"ConferenceRecordingStatusCallbackMethod,omitempty"` + ConferenceStatusCallback *string `json:"ConferenceStatusCallback,omitempty"` + ConferenceStatusCallbackEvent *[]string `json:"ConferenceStatusCallbackEvent,omitempty"` + ConferenceStatusCallbackMethod *string `json:"ConferenceStatusCallbackMethod,omitempty"` + ConferenceTrim *string `json:"ConferenceTrim,omitempty"` + EarlyMedia *bool `json:"EarlyMedia,omitempty"` + EndConferenceOnExit *bool `json:"EndConferenceOnExit,omitempty"` + From *string `json:"From,omitempty"` + JitterBufferSize *string `json:"JitterBufferSize,omitempty"` + Label *string `json:"Label,omitempty"` + MaxParticipants *int32 `json:"MaxParticipants,omitempty"` + Muted *bool `json:"Muted,omitempty"` + Record *bool `json:"Record,omitempty"` + RecordingChannels *string `json:"RecordingChannels,omitempty"` + RecordingStatusCallback *string `json:"RecordingStatusCallback,omitempty"` + RecordingStatusCallbackEvent *[]string `json:"RecordingStatusCallbackEvent,omitempty"` + RecordingStatusCallbackMethod *string `json:"RecordingStatusCallbackMethod,omitempty"` + RecordingTrack *string `json:"RecordingTrack,omitempty"` + Region *string `json:"Region,omitempty"` + SipAuthPassword *string `json:"SipAuthPassword,omitempty"` + SipAuthUsername *string `json:"SipAuthUsername,omitempty"` + StartConferenceOnEnter *bool `json:"StartConferenceOnEnter,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` + StatusCallbackEvent *[]string `json:"StatusCallbackEvent,omitempty"` + StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` + Timeout *int32 `json:"Timeout,omitempty"` + To *string `json:"To,omitempty"` + WaitMethod *string `json:"WaitMethod,omitempty"` + WaitUrl *string `json:"WaitUrl,omitempty"` } /* @@ -1537,163 +1536,163 @@ type CreateParticipantParams struct { * @param "WaitMethod" (string) - The HTTP method we should use to call `wait_url`. Can be `GET` or `POST` and the default is `POST`. When using a static audio file, this should be `GET` so that we can cache the file. * @param "WaitUrl" (string) - The URL we should call using the `wait_method` for the music to play while participants are waiting for the conference to start. The default value is the URL of our standard hold music. [Learn more about hold music](https://www.twilio.com/labs/twimlets/holdmusic). * @return ApiV2010AccountConferenceParticipant - */ +*/ func (c *DefaultApiService) CreateParticipant(AccountSid string, ConferenceSid string, params *CreateParticipantParams) (*ApiV2010AccountConferenceParticipant, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Participants.json" + path := "/2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Participants.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"ConferenceSid"+"}", ConferenceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Beep != nil { - data.Set("Beep", *params.Beep) - } - if params != nil && params.Byoc != nil { - data.Set("Byoc", *params.Byoc) - } - if params != nil && params.CallReason != nil { - data.Set("CallReason", *params.CallReason) - } - if params != nil && params.CallSidToCoach != nil { - data.Set("CallSidToCoach", *params.CallSidToCoach) - } - if params != nil && params.CallerId != nil { - data.Set("CallerId", *params.CallerId) - } - if params != nil && params.Coaching != nil { - data.Set("Coaching", fmt.Sprint(*params.Coaching)) - } - if params != nil && params.ConferenceRecord != nil { - data.Set("ConferenceRecord", *params.ConferenceRecord) - } - if params != nil && params.ConferenceRecordingStatusCallback != nil { - data.Set("ConferenceRecordingStatusCallback", *params.ConferenceRecordingStatusCallback) - } - if params != nil && params.ConferenceRecordingStatusCallbackEvent != nil { - data.Set("ConferenceRecordingStatusCallbackEvent", strings.Join(*params.ConferenceRecordingStatusCallbackEvent, ",")) - } - if params != nil && params.ConferenceRecordingStatusCallbackMethod != nil { - data.Set("ConferenceRecordingStatusCallbackMethod", *params.ConferenceRecordingStatusCallbackMethod) - } - if params != nil && params.ConferenceStatusCallback != nil { - data.Set("ConferenceStatusCallback", *params.ConferenceStatusCallback) - } - if params != nil && params.ConferenceStatusCallbackEvent != nil { - data.Set("ConferenceStatusCallbackEvent", strings.Join(*params.ConferenceStatusCallbackEvent, ",")) - } - if params != nil && params.ConferenceStatusCallbackMethod != nil { - data.Set("ConferenceStatusCallbackMethod", *params.ConferenceStatusCallbackMethod) - } - if params != nil && params.ConferenceTrim != nil { - data.Set("ConferenceTrim", *params.ConferenceTrim) - } - if params != nil && params.EarlyMedia != nil { - data.Set("EarlyMedia", fmt.Sprint(*params.EarlyMedia)) - } - if params != nil && params.EndConferenceOnExit != nil { - data.Set("EndConferenceOnExit", fmt.Sprint(*params.EndConferenceOnExit)) - } - if params != nil && params.From != nil { - data.Set("From", *params.From) - } - if params != nil && params.JitterBufferSize != nil { - data.Set("JitterBufferSize", *params.JitterBufferSize) - } - if params != nil && params.Label != nil { - data.Set("Label", *params.Label) - } - if params != nil && params.MaxParticipants != nil { - data.Set("MaxParticipants", fmt.Sprint(*params.MaxParticipants)) - } - if params != nil && params.Muted != nil { - data.Set("Muted", fmt.Sprint(*params.Muted)) - } - if params != nil && params.Record != nil { - data.Set("Record", fmt.Sprint(*params.Record)) - } - if params != nil && params.RecordingChannels != nil { - data.Set("RecordingChannels", *params.RecordingChannels) - } - if params != nil && params.RecordingStatusCallback != nil { - data.Set("RecordingStatusCallback", *params.RecordingStatusCallback) - } - if params != nil && params.RecordingStatusCallbackEvent != nil { - data.Set("RecordingStatusCallbackEvent", strings.Join(*params.RecordingStatusCallbackEvent, ",")) - } - if params != nil && params.RecordingStatusCallbackMethod != nil { - data.Set("RecordingStatusCallbackMethod", *params.RecordingStatusCallbackMethod) - } - if params != nil && params.RecordingTrack != nil { - data.Set("RecordingTrack", *params.RecordingTrack) - } - if params != nil && params.Region != nil { - data.Set("Region", *params.Region) - } - if params != nil && params.SipAuthPassword != nil { - data.Set("SipAuthPassword", *params.SipAuthPassword) - } - if params != nil && params.SipAuthUsername != nil { - data.Set("SipAuthUsername", *params.SipAuthUsername) - } - if params != nil && params.StartConferenceOnEnter != nil { - data.Set("StartConferenceOnEnter", fmt.Sprint(*params.StartConferenceOnEnter)) - } - if params != nil && params.StatusCallback != nil { - data.Set("StatusCallback", *params.StatusCallback) - } - if params != nil && params.StatusCallbackEvent != nil { - data.Set("StatusCallbackEvent", strings.Join(*params.StatusCallbackEvent, ",")) - } - if params != nil && params.StatusCallbackMethod != nil { - data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) - } - if params != nil && params.Timeout != nil { - data.Set("Timeout", fmt.Sprint(*params.Timeout)) - } - if params != nil && params.To != nil { - data.Set("To", *params.To) - } - if params != nil && params.WaitMethod != nil { - data.Set("WaitMethod", *params.WaitMethod) - } - if params != nil && params.WaitUrl != nil { - data.Set("WaitUrl", *params.WaitUrl) - } - - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + data := url.Values{} + headers := 0 - ps := &ApiV2010AccountConferenceParticipant{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err + if params != nil && params.Beep != nil { + data.Set("Beep", *params.Beep) +} + if params != nil && params.Byoc != nil { + data.Set("Byoc", *params.Byoc) +} + if params != nil && params.CallReason != nil { + data.Set("CallReason", *params.CallReason) +} + if params != nil && params.CallSidToCoach != nil { + data.Set("CallSidToCoach", *params.CallSidToCoach) +} + if params != nil && params.CallerId != nil { + data.Set("CallerId", *params.CallerId) +} + if params != nil && params.Coaching != nil { + data.Set("Coaching", fmt.Sprint(*params.Coaching)) +} + if params != nil && params.ConferenceRecord != nil { + data.Set("ConferenceRecord", *params.ConferenceRecord) +} + if params != nil && params.ConferenceRecordingStatusCallback != nil { + data.Set("ConferenceRecordingStatusCallback", *params.ConferenceRecordingStatusCallback) +} + if params != nil && params.ConferenceRecordingStatusCallbackEvent != nil { + data.Set("ConferenceRecordingStatusCallbackEvent", strings.Join(*params.ConferenceRecordingStatusCallbackEvent, ",")) +} + if params != nil && params.ConferenceRecordingStatusCallbackMethod != nil { + data.Set("ConferenceRecordingStatusCallbackMethod", *params.ConferenceRecordingStatusCallbackMethod) +} + if params != nil && params.ConferenceStatusCallback != nil { + data.Set("ConferenceStatusCallback", *params.ConferenceStatusCallback) +} + if params != nil && params.ConferenceStatusCallbackEvent != nil { + data.Set("ConferenceStatusCallbackEvent", strings.Join(*params.ConferenceStatusCallbackEvent, ",")) +} + if params != nil && params.ConferenceStatusCallbackMethod != nil { + data.Set("ConferenceStatusCallbackMethod", *params.ConferenceStatusCallbackMethod) +} + if params != nil && params.ConferenceTrim != nil { + data.Set("ConferenceTrim", *params.ConferenceTrim) +} + if params != nil && params.EarlyMedia != nil { + data.Set("EarlyMedia", fmt.Sprint(*params.EarlyMedia)) +} + if params != nil && params.EndConferenceOnExit != nil { + data.Set("EndConferenceOnExit", fmt.Sprint(*params.EndConferenceOnExit)) +} + if params != nil && params.From != nil { + data.Set("From", *params.From) +} + if params != nil && params.JitterBufferSize != nil { + data.Set("JitterBufferSize", *params.JitterBufferSize) +} + if params != nil && params.Label != nil { + data.Set("Label", *params.Label) +} + if params != nil && params.MaxParticipants != nil { + data.Set("MaxParticipants", fmt.Sprint(*params.MaxParticipants)) +} + if params != nil && params.Muted != nil { + data.Set("Muted", fmt.Sprint(*params.Muted)) +} + if params != nil && params.Record != nil { + data.Set("Record", fmt.Sprint(*params.Record)) +} + if params != nil && params.RecordingChannels != nil { + data.Set("RecordingChannels", *params.RecordingChannels) +} + if params != nil && params.RecordingStatusCallback != nil { + data.Set("RecordingStatusCallback", *params.RecordingStatusCallback) +} + if params != nil && params.RecordingStatusCallbackEvent != nil { + data.Set("RecordingStatusCallbackEvent", strings.Join(*params.RecordingStatusCallbackEvent, ",")) +} + if params != nil && params.RecordingStatusCallbackMethod != nil { + data.Set("RecordingStatusCallbackMethod", *params.RecordingStatusCallbackMethod) +} + if params != nil && params.RecordingTrack != nil { + data.Set("RecordingTrack", *params.RecordingTrack) +} + if params != nil && params.Region != nil { + data.Set("Region", *params.Region) +} + if params != nil && params.SipAuthPassword != nil { + data.Set("SipAuthPassword", *params.SipAuthPassword) +} + if params != nil && params.SipAuthUsername != nil { + data.Set("SipAuthUsername", *params.SipAuthUsername) +} + if params != nil && params.StartConferenceOnEnter != nil { + data.Set("StartConferenceOnEnter", fmt.Sprint(*params.StartConferenceOnEnter)) } + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) +} + if params != nil && params.StatusCallbackEvent != nil { + data.Set("StatusCallbackEvent", strings.Join(*params.StatusCallbackEvent, ",")) +} + if params != nil && params.StatusCallbackMethod != nil { + data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) +} + if params != nil && params.Timeout != nil { + data.Set("Timeout", fmt.Sprint(*params.Timeout)) +} + if params != nil && params.To != nil { + data.Set("To", *params.To) +} + if params != nil && params.WaitMethod != nil { + data.Set("WaitMethod", *params.WaitMethod) +} + if params != nil && params.WaitUrl != nil { + data.Set("WaitUrl", *params.WaitUrl) +} + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountConferenceParticipant{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} // CreatePaymentsParams Optional parameters for the method 'CreatePayments' type CreatePaymentsParams struct { - BankAccountType *string `json:"BankAccountType,omitempty"` - ChargeAmount *float32 `json:"ChargeAmount,omitempty"` - Currency *string `json:"Currency,omitempty"` - Description *string `json:"Description,omitempty"` - IdempotencyKey *string `json:"IdempotencyKey,omitempty"` - Input *string `json:"Input,omitempty"` - MinPostalCodeLength *int32 `json:"MinPostalCodeLength,omitempty"` - Parameter *map[string]interface{} `json:"Parameter,omitempty"` - PaymentConnector *string `json:"PaymentConnector,omitempty"` - PaymentMethod *string `json:"PaymentMethod,omitempty"` - PostalCode *bool `json:"PostalCode,omitempty"` - SecurityCode *bool `json:"SecurityCode,omitempty"` - StatusCallback *string `json:"StatusCallback,omitempty"` - Timeout *int32 `json:"Timeout,omitempty"` - TokenType *string `json:"TokenType,omitempty"` - ValidCardTypes *string `json:"ValidCardTypes,omitempty"` + BankAccountType *string `json:"BankAccountType,omitempty"` + ChargeAmount *float32 `json:"ChargeAmount,omitempty"` + Currency *string `json:"Currency,omitempty"` + Description *string `json:"Description,omitempty"` + IdempotencyKey *string `json:"IdempotencyKey,omitempty"` + Input *string `json:"Input,omitempty"` + MinPostalCodeLength *int32 `json:"MinPostalCodeLength,omitempty"` + Parameter *map[string]interface{} `json:"Parameter,omitempty"` + PaymentConnector *string `json:"PaymentConnector,omitempty"` + PaymentMethod *string `json:"PaymentMethod,omitempty"` + PostalCode *bool `json:"PostalCode,omitempty"` + SecurityCode *bool `json:"SecurityCode,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` + Timeout *int32 `json:"Timeout,omitempty"` + TokenType *string `json:"TokenType,omitempty"` + ValidCardTypes *string `json:"ValidCardTypes,omitempty"` } /* @@ -1719,89 +1718,89 @@ type CreatePaymentsParams struct { * @param "TokenType" (string) - Indicates whether the payment method should be tokenized as a `one-time` or `reusable` token. The default value is `reusable`. Do not enter a charge amount when tokenizing. If a charge amount is entered, the payment method will be charged and not tokenized. * @param "ValidCardTypes" (string) - Credit card types separated by space that Pay should accept. The default value is `visa mastercard amex` * @return ApiV2010AccountCallPayments - */ +*/ func (c *DefaultApiService) CreatePayments(AccountSid string, CallSid string, params *CreatePaymentsParams) (*ApiV2010AccountCallPayments, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Payments.json" + path := "/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Payments.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.BankAccountType != nil { - data.Set("BankAccountType", *params.BankAccountType) - } - if params != nil && params.ChargeAmount != nil { - data.Set("ChargeAmount", fmt.Sprint(*params.ChargeAmount)) - } - if params != nil && params.Currency != nil { - data.Set("Currency", *params.Currency) - } - if params != nil && params.Description != nil { - data.Set("Description", *params.Description) - } - if params != nil && params.IdempotencyKey != nil { - data.Set("IdempotencyKey", *params.IdempotencyKey) - } - if params != nil && params.Input != nil { - data.Set("Input", *params.Input) - } - if params != nil && params.MinPostalCodeLength != nil { - data.Set("MinPostalCodeLength", fmt.Sprint(*params.MinPostalCodeLength)) + if params != nil && params.BankAccountType != nil { + data.Set("BankAccountType", *params.BankAccountType) +} + if params != nil && params.ChargeAmount != nil { + data.Set("ChargeAmount", fmt.Sprint(*params.ChargeAmount)) +} + if params != nil && params.Currency != nil { + data.Set("Currency", *params.Currency) +} + if params != nil && params.Description != nil { + data.Set("Description", *params.Description) +} + if params != nil && params.IdempotencyKey != nil { + data.Set("IdempotencyKey", *params.IdempotencyKey) +} + if params != nil && params.Input != nil { + data.Set("Input", *params.Input) +} + if params != nil && params.MinPostalCodeLength != nil { + data.Set("MinPostalCodeLength", fmt.Sprint(*params.MinPostalCodeLength)) +} + if params != nil && params.Parameter != nil { + v, err := json.Marshal(params.Parameter) + + if err != nil { + return nil, err } - if params != nil && params.Parameter != nil { - v, err := json.Marshal(params.Parameter) - if err != nil { - return nil, err - } + data.Set("Parameter", fmt.Sprint(v)) +} + if params != nil && params.PaymentConnector != nil { + data.Set("PaymentConnector", *params.PaymentConnector) +} + if params != nil && params.PaymentMethod != nil { + data.Set("PaymentMethod", *params.PaymentMethod) +} + if params != nil && params.PostalCode != nil { + data.Set("PostalCode", fmt.Sprint(*params.PostalCode)) +} + if params != nil && params.SecurityCode != nil { + data.Set("SecurityCode", fmt.Sprint(*params.SecurityCode)) +} + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) +} + if params != nil && params.Timeout != nil { + data.Set("Timeout", fmt.Sprint(*params.Timeout)) +} + if params != nil && params.TokenType != nil { + data.Set("TokenType", *params.TokenType) +} + if params != nil && params.ValidCardTypes != nil { + data.Set("ValidCardTypes", *params.ValidCardTypes) +} - data.Set("Parameter", fmt.Sprint(v)) - } - if params != nil && params.PaymentConnector != nil { - data.Set("PaymentConnector", *params.PaymentConnector) - } - if params != nil && params.PaymentMethod != nil { - data.Set("PaymentMethod", *params.PaymentMethod) - } - if params != nil && params.PostalCode != nil { - data.Set("PostalCode", fmt.Sprint(*params.PostalCode)) - } - if params != nil && params.SecurityCode != nil { - data.Set("SecurityCode", fmt.Sprint(*params.SecurityCode)) - } - if params != nil && params.StatusCallback != nil { - data.Set("StatusCallback", *params.StatusCallback) - } - if params != nil && params.Timeout != nil { - data.Set("Timeout", fmt.Sprint(*params.Timeout)) - } - if params != nil && params.TokenType != nil { - data.Set("TokenType", *params.TokenType) - } - if params != nil && params.ValidCardTypes != nil { - data.Set("ValidCardTypes", *params.ValidCardTypes) - } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountCallPayments{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountCallPayments{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } - // CreateQueueParams Optional parameters for the method 'CreateQueue' type CreateQueueParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` - MaxSize *int32 `json:"MaxSize,omitempty"` + MaxSize *int32 `json:"MaxSize,omitempty"` } /* @@ -1812,36 +1811,36 @@ type CreateQueueParams struct { * @param "FriendlyName" (string) - A descriptive string that you created to describe this resource. It can be up to 64 characters long. * @param "MaxSize" (int32) - The maximum number of calls allowed to be in the queue. The default is 100. The maximum is 5000. * @return ApiV2010AccountQueue - */ +*/ func (c *DefaultApiService) CreateQueue(AccountSid string, params *CreateQueueParams) (*ApiV2010AccountQueue, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Queues.json" + path := "/2010-04-01/Accounts/{AccountSid}/Queues.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.MaxSize != nil { - data.Set("MaxSize", fmt.Sprint(*params.MaxSize)) - } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.MaxSize != nil { + data.Set("MaxSize", fmt.Sprint(*params.MaxSize)) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ApiV2010AccountQueue{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ApiV2010AccountQueue{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateSipAuthCallsCredentialListMappingParams Optional parameters for the method 'CreateSipAuthCallsCredentialListMapping' type CreateSipAuthCallsCredentialListMappingParams struct { CredentialListSid *string `json:"CredentialListSid,omitempty"` @@ -1855,34 +1854,34 @@ type CreateSipAuthCallsCredentialListMappingParams struct { * @param optional nil or *CreateSipAuthCallsCredentialListMappingParams - Optional Parameters: * @param "CredentialListSid" (string) - The SID of the CredentialList resource to map to the SIP domain. * @return ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsCredentialListMapping - */ +*/ func (c *DefaultApiService) CreateSipAuthCallsCredentialListMapping(AccountSid string, DomainSid string, params *CreateSipAuthCallsCredentialListMappingParams) (*ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsCredentialListMapping, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls/CredentialListMappings.json" + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls/CredentialListMappings.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.CredentialListSid != nil { - data.Set("CredentialListSid", *params.CredentialListSid) - } + if params != nil && params.CredentialListSid != nil { + data.Set("CredentialListSid", *params.CredentialListSid) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsCredentialListMapping{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsCredentialListMapping{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateSipAuthCallsIpAccessControlListMappingParams Optional parameters for the method 'CreateSipAuthCallsIpAccessControlListMapping' type CreateSipAuthCallsIpAccessControlListMappingParams struct { IpAccessControlListSid *string `json:"IpAccessControlListSid,omitempty"` @@ -1896,34 +1895,34 @@ type CreateSipAuthCallsIpAccessControlListMappingParams struct { * @param optional nil or *CreateSipAuthCallsIpAccessControlListMappingParams - Optional Parameters: * @param "IpAccessControlListSid" (string) - The SID of the IpAccessControlList resource to map to the SIP domain. * @return ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsIpAccessControlListMapping - */ +*/ func (c *DefaultApiService) CreateSipAuthCallsIpAccessControlListMapping(AccountSid string, DomainSid string, params *CreateSipAuthCallsIpAccessControlListMappingParams) (*ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsIpAccessControlListMapping, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls/IpAccessControlListMappings.json" + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls/IpAccessControlListMappings.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.IpAccessControlListSid != nil { - data.Set("IpAccessControlListSid", *params.IpAccessControlListSid) - } + if params != nil && params.IpAccessControlListSid != nil { + data.Set("IpAccessControlListSid", *params.IpAccessControlListSid) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsIpAccessControlListMapping{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsIpAccessControlListMapping{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateSipAuthRegistrationsCredentialListMappingParams Optional parameters for the method 'CreateSipAuthRegistrationsCredentialListMapping' type CreateSipAuthRegistrationsCredentialListMappingParams struct { CredentialListSid *string `json:"CredentialListSid,omitempty"` @@ -1937,34 +1936,34 @@ type CreateSipAuthRegistrationsCredentialListMappingParams struct { * @param optional nil or *CreateSipAuthRegistrationsCredentialListMappingParams - Optional Parameters: * @param "CredentialListSid" (string) - The SID of the CredentialList resource to map to the SIP domain. * @return ApiV2010AccountSipSipDomainSipAuthSipAuthRegistrationsSipAuthRegistrationsCredentialListMapping - */ +*/ func (c *DefaultApiService) CreateSipAuthRegistrationsCredentialListMapping(AccountSid string, DomainSid string, params *CreateSipAuthRegistrationsCredentialListMappingParams) (*ApiV2010AccountSipSipDomainSipAuthSipAuthRegistrationsSipAuthRegistrationsCredentialListMapping, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Registrations/CredentialListMappings.json" + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Registrations/CredentialListMappings.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.CredentialListSid != nil { - data.Set("CredentialListSid", *params.CredentialListSid) - } + if params != nil && params.CredentialListSid != nil { + data.Set("CredentialListSid", *params.CredentialListSid) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ApiV2010AccountSipSipDomainSipAuthSipAuthRegistrationsSipAuthRegistrationsCredentialListMapping{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ApiV2010AccountSipSipDomainSipAuthSipAuthRegistrationsSipAuthRegistrationsCredentialListMapping{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateSipCredentialParams Optional parameters for the method 'CreateSipCredential' type CreateSipCredentialParams struct { Password *string `json:"Password,omitempty"` @@ -1980,37 +1979,37 @@ type CreateSipCredentialParams struct { * @param "Password" (string) - The password that the username will use when authenticating SIP requests. The password must be a minimum of 12 characters, contain at least 1 digit, and have mixed case. (eg `IWasAtSignal2018`) * @param "Username" (string) - The username that will be passed when authenticating SIP requests. The username should be sent in response to Twilio's challenge of the initial INVITE. It can be up to 32 characters long. * @return ApiV2010AccountSipSipCredentialListSipCredential - */ +*/ func (c *DefaultApiService) CreateSipCredential(AccountSid string, CredentialListSid string, params *CreateSipCredentialParams) (*ApiV2010AccountSipSipCredentialListSipCredential, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{CredentialListSid}/Credentials.json" + path := "/2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{CredentialListSid}/Credentials.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"CredentialListSid"+"}", CredentialListSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Password != nil { - data.Set("Password", *params.Password) - } - if params != nil && params.Username != nil { - data.Set("Username", *params.Username) - } + if params != nil && params.Password != nil { + data.Set("Password", *params.Password) +} + if params != nil && params.Username != nil { + data.Set("Username", *params.Username) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ApiV2010AccountSipSipCredentialListSipCredential{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ApiV2010AccountSipSipCredentialListSipCredential{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateSipCredentialListParams Optional parameters for the method 'CreateSipCredentialList' type CreateSipCredentialListParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` @@ -2023,33 +2022,33 @@ type CreateSipCredentialListParams struct { * @param optional nil or *CreateSipCredentialListParams - Optional Parameters: * @param "FriendlyName" (string) - A human readable descriptive text that describes the CredentialList, up to 64 characters long. * @return ApiV2010AccountSipSipCredentialList - */ +*/ func (c *DefaultApiService) CreateSipCredentialList(AccountSid string, params *CreateSipCredentialListParams) (*ApiV2010AccountSipSipCredentialList, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists.json" + path := "/2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ApiV2010AccountSipSipCredentialList{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ApiV2010AccountSipSipCredentialList{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateSipCredentialListMappingParams Optional parameters for the method 'CreateSipCredentialListMapping' type CreateSipCredentialListMappingParams struct { CredentialListSid *string `json:"CredentialListSid,omitempty"` @@ -2063,49 +2062,49 @@ type CreateSipCredentialListMappingParams struct { * @param optional nil or *CreateSipCredentialListMappingParams - Optional Parameters: * @param "CredentialListSid" (string) - A 34 character string that uniquely identifies the CredentialList resource to map to the SIP domain. * @return ApiV2010AccountSipSipDomainSipCredentialListMapping - */ +*/ func (c *DefaultApiService) CreateSipCredentialListMapping(AccountSid string, DomainSid string, params *CreateSipCredentialListMappingParams) (*ApiV2010AccountSipSipDomainSipCredentialListMapping, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/CredentialListMappings.json" + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/CredentialListMappings.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.CredentialListSid != nil { - data.Set("CredentialListSid", *params.CredentialListSid) - } + if params != nil && params.CredentialListSid != nil { + data.Set("CredentialListSid", *params.CredentialListSid) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ApiV2010AccountSipSipDomainSipCredentialListMapping{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ApiV2010AccountSipSipDomainSipCredentialListMapping{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateSipDomainParams Optional parameters for the method 'CreateSipDomain' type CreateSipDomainParams struct { - ByocTrunkSid *string `json:"ByocTrunkSid,omitempty"` - DomainName *string `json:"DomainName,omitempty"` - EmergencyCallerSid *string `json:"EmergencyCallerSid,omitempty"` - EmergencyCallingEnabled *bool `json:"EmergencyCallingEnabled,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Secure *bool `json:"Secure,omitempty"` - SipRegistration *bool `json:"SipRegistration,omitempty"` - VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"` - VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` - VoiceMethod *string `json:"VoiceMethod,omitempty"` + ByocTrunkSid *string `json:"ByocTrunkSid,omitempty"` + DomainName *string `json:"DomainName,omitempty"` + EmergencyCallerSid *string `json:"EmergencyCallerSid,omitempty"` + EmergencyCallingEnabled *bool `json:"EmergencyCallingEnabled,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Secure *bool `json:"Secure,omitempty"` + SipRegistration *bool `json:"SipRegistration,omitempty"` + VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"` + VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` + VoiceMethod *string `json:"VoiceMethod,omitempty"` VoiceStatusCallbackMethod *string `json:"VoiceStatusCallbackMethod,omitempty"` - VoiceStatusCallbackUrl *string `json:"VoiceStatusCallbackUrl,omitempty"` - VoiceUrl *string `json:"VoiceUrl,omitempty"` + VoiceStatusCallbackUrl *string `json:"VoiceStatusCallbackUrl,omitempty"` + VoiceUrl *string `json:"VoiceUrl,omitempty"` } /* @@ -2127,69 +2126,69 @@ type CreateSipDomainParams struct { * @param "VoiceStatusCallbackUrl" (string) - The URL that we should call to pass status parameters (such as call ended) to your application. * @param "VoiceUrl" (string) - The URL we should when the domain receives a call. * @return ApiV2010AccountSipSipDomain - */ +*/ func (c *DefaultApiService) CreateSipDomain(AccountSid string, params *CreateSipDomainParams) (*ApiV2010AccountSipSipDomain, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains.json" + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.ByocTrunkSid != nil { - data.Set("ByocTrunkSid", *params.ByocTrunkSid) - } - if params != nil && params.DomainName != nil { - data.Set("DomainName", *params.DomainName) - } - if params != nil && params.EmergencyCallerSid != nil { - data.Set("EmergencyCallerSid", *params.EmergencyCallerSid) - } - if params != nil && params.EmergencyCallingEnabled != nil { - data.Set("EmergencyCallingEnabled", fmt.Sprint(*params.EmergencyCallingEnabled)) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.Secure != nil { - data.Set("Secure", fmt.Sprint(*params.Secure)) - } - if params != nil && params.SipRegistration != nil { - data.Set("SipRegistration", fmt.Sprint(*params.SipRegistration)) - } - if params != nil && params.VoiceFallbackMethod != nil { - data.Set("VoiceFallbackMethod", *params.VoiceFallbackMethod) - } - if params != nil && params.VoiceFallbackUrl != nil { - data.Set("VoiceFallbackUrl", *params.VoiceFallbackUrl) - } - if params != nil && params.VoiceMethod != nil { - data.Set("VoiceMethod", *params.VoiceMethod) - } - if params != nil && params.VoiceStatusCallbackMethod != nil { - data.Set("VoiceStatusCallbackMethod", *params.VoiceStatusCallbackMethod) - } - if params != nil && params.VoiceStatusCallbackUrl != nil { - data.Set("VoiceStatusCallbackUrl", *params.VoiceStatusCallbackUrl) - } - if params != nil && params.VoiceUrl != nil { - data.Set("VoiceUrl", *params.VoiceUrl) - } + if params != nil && params.ByocTrunkSid != nil { + data.Set("ByocTrunkSid", *params.ByocTrunkSid) +} + if params != nil && params.DomainName != nil { + data.Set("DomainName", *params.DomainName) +} + if params != nil && params.EmergencyCallerSid != nil { + data.Set("EmergencyCallerSid", *params.EmergencyCallerSid) +} + if params != nil && params.EmergencyCallingEnabled != nil { + data.Set("EmergencyCallingEnabled", fmt.Sprint(*params.EmergencyCallingEnabled)) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.Secure != nil { + data.Set("Secure", fmt.Sprint(*params.Secure)) +} + if params != nil && params.SipRegistration != nil { + data.Set("SipRegistration", fmt.Sprint(*params.SipRegistration)) +} + if params != nil && params.VoiceFallbackMethod != nil { + data.Set("VoiceFallbackMethod", *params.VoiceFallbackMethod) +} + if params != nil && params.VoiceFallbackUrl != nil { + data.Set("VoiceFallbackUrl", *params.VoiceFallbackUrl) +} + if params != nil && params.VoiceMethod != nil { + data.Set("VoiceMethod", *params.VoiceMethod) +} + if params != nil && params.VoiceStatusCallbackMethod != nil { + data.Set("VoiceStatusCallbackMethod", *params.VoiceStatusCallbackMethod) +} + if params != nil && params.VoiceStatusCallbackUrl != nil { + data.Set("VoiceStatusCallbackUrl", *params.VoiceStatusCallbackUrl) +} + if params != nil && params.VoiceUrl != nil { + data.Set("VoiceUrl", *params.VoiceUrl) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ApiV2010AccountSipSipDomain{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ApiV2010AccountSipSipDomain{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateSipIpAccessControlListParams Optional parameters for the method 'CreateSipIpAccessControlList' type CreateSipIpAccessControlListParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` @@ -2202,33 +2201,33 @@ type CreateSipIpAccessControlListParams struct { * @param optional nil or *CreateSipIpAccessControlListParams - Optional Parameters: * @param "FriendlyName" (string) - A human readable descriptive text that describes the IpAccessControlList, up to 64 characters long. * @return ApiV2010AccountSipSipIpAccessControlList - */ +*/ func (c *DefaultApiService) CreateSipIpAccessControlList(AccountSid string, params *CreateSipIpAccessControlListParams) (*ApiV2010AccountSipSipIpAccessControlList, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists.json" + path := "/2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ApiV2010AccountSipSipIpAccessControlList{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ApiV2010AccountSipSipIpAccessControlList{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateSipIpAccessControlListMappingParams Optional parameters for the method 'CreateSipIpAccessControlListMapping' type CreateSipIpAccessControlListMappingParams struct { IpAccessControlListSid *string `json:"IpAccessControlListSid,omitempty"` @@ -2242,39 +2241,39 @@ type CreateSipIpAccessControlListMappingParams struct { * @param optional nil or *CreateSipIpAccessControlListMappingParams - Optional Parameters: * @param "IpAccessControlListSid" (string) - The unique id of the IP access control list to map to the SIP domain. * @return ApiV2010AccountSipSipDomainSipIpAccessControlListMapping - */ +*/ func (c *DefaultApiService) CreateSipIpAccessControlListMapping(AccountSid string, DomainSid string, params *CreateSipIpAccessControlListMappingParams) (*ApiV2010AccountSipSipDomainSipIpAccessControlListMapping, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/IpAccessControlListMappings.json" + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/IpAccessControlListMappings.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.IpAccessControlListSid != nil { - data.Set("IpAccessControlListSid", *params.IpAccessControlListSid) - } + if params != nil && params.IpAccessControlListSid != nil { + data.Set("IpAccessControlListSid", *params.IpAccessControlListSid) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ApiV2010AccountSipSipDomainSipIpAccessControlListMapping{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ApiV2010AccountSipSipDomainSipIpAccessControlListMapping{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateSipIpAddressParams Optional parameters for the method 'CreateSipIpAddress' type CreateSipIpAddressParams struct { - CidrPrefixLength *int32 `json:"CidrPrefixLength,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - IpAddress *string `json:"IpAddress,omitempty"` + CidrPrefixLength *int32 `json:"CidrPrefixLength,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + IpAddress *string `json:"IpAddress,omitempty"` } /* @@ -2287,40 +2286,40 @@ type CreateSipIpAddressParams struct { * @param "FriendlyName" (string) - A human readable descriptive text for this resource, up to 64 characters long. * @param "IpAddress" (string) - An IP address in dotted decimal notation from which you want to accept traffic. Any SIP requests from this IP address will be allowed by Twilio. IPv4 only supported today. * @return ApiV2010AccountSipSipIpAccessControlListSipIpAddress - */ +*/ func (c *DefaultApiService) CreateSipIpAddress(AccountSid string, IpAccessControlListSid string, params *CreateSipIpAddressParams) (*ApiV2010AccountSipSipIpAccessControlListSipIpAddress, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists/{IpAccessControlListSid}/IpAddresses.json" + path := "/2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists/{IpAccessControlListSid}/IpAddresses.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"IpAccessControlListSid"+"}", IpAccessControlListSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.CidrPrefixLength != nil { - data.Set("CidrPrefixLength", fmt.Sprint(*params.CidrPrefixLength)) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.IpAddress != nil { - data.Set("IpAddress", *params.IpAddress) - } + if params != nil && params.CidrPrefixLength != nil { + data.Set("CidrPrefixLength", fmt.Sprint(*params.CidrPrefixLength)) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.IpAddress != nil { + data.Set("IpAddress", *params.IpAddress) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ApiV2010AccountSipSipIpAccessControlListSipIpAddress{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ApiV2010AccountSipSipIpAccessControlListSipIpAddress{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateTokenParams Optional parameters for the method 'CreateToken' type CreateTokenParams struct { Ttl *int32 `json:"Ttl,omitempty"` @@ -2333,42 +2332,42 @@ type CreateTokenParams struct { * @param optional nil or *CreateTokenParams - Optional Parameters: * @param "Ttl" (int32) - The duration in seconds for which the generated credentials are valid. The default value is 86400 (24 hours). * @return ApiV2010AccountToken - */ +*/ func (c *DefaultApiService) CreateToken(AccountSid string, params *CreateTokenParams) (*ApiV2010AccountToken, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Tokens.json" + path := "/2010-04-01/Accounts/{AccountSid}/Tokens.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Ttl != nil { - data.Set("Ttl", fmt.Sprint(*params.Ttl)) - } + if params != nil && params.Ttl != nil { + data.Set("Ttl", fmt.Sprint(*params.Ttl)) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ApiV2010AccountToken{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ApiV2010AccountToken{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateUsageTriggerParams Optional parameters for the method 'CreateUsageTrigger' type CreateUsageTriggerParams struct { CallbackMethod *string `json:"CallbackMethod,omitempty"` - CallbackUrl *string `json:"CallbackUrl,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Recurring *string `json:"Recurring,omitempty"` - TriggerBy *string `json:"TriggerBy,omitempty"` - TriggerValue *string `json:"TriggerValue,omitempty"` - UsageCategory *string `json:"UsageCategory,omitempty"` + CallbackUrl *string `json:"CallbackUrl,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Recurring *string `json:"Recurring,omitempty"` + TriggerBy *string `json:"TriggerBy,omitempty"` + TriggerValue *string `json:"TriggerValue,omitempty"` + UsageCategory *string `json:"UsageCategory,omitempty"` } /* @@ -2384,58 +2383,58 @@ type CreateUsageTriggerParams struct { * @param "TriggerValue" (string) - The usage value at which the trigger should fire. For convenience, you can use an offset value such as `+30` to specify a trigger_value that is 30 units more than the current usage value. Be sure to urlencode a `+` as `%2B`. * @param "UsageCategory" (string) - The usage category that the trigger should watch. Use one of the supported [usage categories](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) for this value. * @return ApiV2010AccountUsageUsageTrigger - */ +*/ func (c *DefaultApiService) CreateUsageTrigger(AccountSid string, params *CreateUsageTriggerParams) (*ApiV2010AccountUsageUsageTrigger, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Usage/Triggers.json" + path := "/2010-04-01/Accounts/{AccountSid}/Usage/Triggers.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.CallbackMethod != nil { - data.Set("CallbackMethod", *params.CallbackMethod) - } - if params != nil && params.CallbackUrl != nil { - data.Set("CallbackUrl", *params.CallbackUrl) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.Recurring != nil { - data.Set("Recurring", *params.Recurring) - } - if params != nil && params.TriggerBy != nil { - data.Set("TriggerBy", *params.TriggerBy) - } - if params != nil && params.TriggerValue != nil { - data.Set("TriggerValue", *params.TriggerValue) - } - if params != nil && params.UsageCategory != nil { - data.Set("UsageCategory", *params.UsageCategory) - } + if params != nil && params.CallbackMethod != nil { + data.Set("CallbackMethod", *params.CallbackMethod) +} + if params != nil && params.CallbackUrl != nil { + data.Set("CallbackUrl", *params.CallbackUrl) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.Recurring != nil { + data.Set("Recurring", *params.Recurring) +} + if params != nil && params.TriggerBy != nil { + data.Set("TriggerBy", *params.TriggerBy) +} + if params != nil && params.TriggerValue != nil { + data.Set("TriggerValue", *params.TriggerValue) +} + if params != nil && params.UsageCategory != nil { + data.Set("UsageCategory", *params.UsageCategory) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ApiV2010AccountUsageUsageTrigger{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ApiV2010AccountUsageUsageTrigger{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateValidationRequestParams Optional parameters for the method 'CreateValidationRequest' type CreateValidationRequestParams struct { - CallDelay *int32 `json:"CallDelay,omitempty"` - Extension *string `json:"Extension,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - PhoneNumber *string `json:"PhoneNumber,omitempty"` - StatusCallback *string `json:"StatusCallback,omitempty"` + CallDelay *int32 `json:"CallDelay,omitempty"` + Extension *string `json:"Extension,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + PhoneNumber *string `json:"PhoneNumber,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` } @@ -2450,69 +2449,72 @@ type CreateValidationRequestParams struct { * @param "StatusCallback" (string) - The URL we should call using the `status_callback_method` to send status information about the verification process to your application. * @param "StatusCallbackMethod" (string) - The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST`, and the default is `POST`. * @return ApiV2010AccountValidationRequest - */ +*/ func (c *DefaultApiService) CreateValidationRequest(AccountSid string, params *CreateValidationRequestParams) (*ApiV2010AccountValidationRequest, error) { - path := "/2010-04-01/Accounts/{AccountSid}/OutgoingCallerIds.json" + path := "/2010-04-01/Accounts/{AccountSid}/OutgoingCallerIds.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.CallDelay != nil { - data.Set("CallDelay", fmt.Sprint(*params.CallDelay)) - } - if params != nil && params.Extension != nil { - data.Set("Extension", *params.Extension) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.PhoneNumber != nil { - data.Set("PhoneNumber", *params.PhoneNumber) - } - if params != nil && params.StatusCallback != nil { - data.Set("StatusCallback", *params.StatusCallback) - } - if params != nil && params.StatusCallbackMethod != nil { - data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) - } + if params != nil && params.CallDelay != nil { + data.Set("CallDelay", fmt.Sprint(*params.CallDelay)) +} + if params != nil && params.Extension != nil { + data.Set("Extension", *params.Extension) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.PhoneNumber != nil { + data.Set("PhoneNumber", *params.PhoneNumber) +} + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) +} + if params != nil && params.StatusCallbackMethod != nil { + data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ApiV2010AccountValidationRequest{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() + + ps := &ApiV2010AccountValidationRequest{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * DeleteAddress Method for DeleteAddress * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that is responsible for the Address resource to delete. * @param Sid The Twilio-provided string that uniquely identifies the Address resource to delete. - */ -func (c *DefaultApiService) DeleteAddress(AccountSid string, Sid string) error { - path := "/2010-04-01/Accounts/{AccountSid}/Addresses/{Sid}.json" +*/ +func (c *DefaultApiService) DeleteAddress(AccountSid string, Sid string, ) (error) { + path := "/2010-04-01/Accounts/{AccountSid}/Addresses/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* @@ -2520,23 +2522,25 @@ func (c *DefaultApiService) DeleteAddress(AccountSid string, Sid string) error { * Delete the application by the specified application sid * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Application resources to delete. * @param Sid The Twilio-provided string that uniquely identifies the Application resource to delete. - */ -func (c *DefaultApiService) DeleteApplication(AccountSid string, Sid string) error { - path := "/2010-04-01/Accounts/{AccountSid}/Applications/{Sid}.json" +*/ +func (c *DefaultApiService) DeleteApplication(AccountSid string, Sid string, ) (error) { + path := "/2010-04-01/Accounts/{AccountSid}/Applications/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* @@ -2544,23 +2548,25 @@ func (c *DefaultApiService) DeleteApplication(AccountSid string, Sid string) err * Delete a Call record from your account. Once the record is deleted, it will no longer appear in the API and Account Portal logs. * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Call resource(s) to delete. * @param Sid The Twilio-provided Call SID that uniquely identifies the Call resource to delete - */ -func (c *DefaultApiService) DeleteCall(AccountSid string, Sid string) error { - path := "/2010-04-01/Accounts/{AccountSid}/Calls/{Sid}.json" +*/ +func (c *DefaultApiService) DeleteCall(AccountSid string, Sid string, ) (error) { + path := "/2010-04-01/Accounts/{AccountSid}/Calls/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* @@ -2568,23 +2574,25 @@ func (c *DefaultApiService) DeleteCall(AccountSid string, Sid string) error { * Delete a FeedbackSummary resource from a call * @param AccountSid The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. * @param Sid A 34 character string that uniquely identifies this resource. - */ -func (c *DefaultApiService) DeleteCallFeedbackSummary(AccountSid string, Sid string) error { - path := "/2010-04-01/Accounts/{AccountSid}/Calls/FeedbackSummary/{Sid}.json" +*/ +func (c *DefaultApiService) DeleteCallFeedbackSummary(AccountSid string, Sid string, ) (error) { + path := "/2010-04-01/Accounts/{AccountSid}/Calls/FeedbackSummary/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* @@ -2593,24 +2601,26 @@ func (c *DefaultApiService) DeleteCallFeedbackSummary(AccountSid string, Sid str * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording resources to delete. * @param CallSid The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID of the resources to delete. * @param Sid The Twilio-provided string that uniquely identifies the Recording resource to delete. - */ -func (c *DefaultApiService) DeleteCallRecording(AccountSid string, CallSid string, Sid string) error { - path := "/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Recordings/{Sid}.json" +*/ +func (c *DefaultApiService) DeleteCallRecording(AccountSid string, CallSid string, Sid string, ) (error) { + path := "/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Recordings/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* @@ -2619,24 +2629,26 @@ func (c *DefaultApiService) DeleteCallRecording(AccountSid string, CallSid strin * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Conference Recording resources to delete. * @param ConferenceSid The Conference SID that identifies the conference associated with the recording to delete. * @param Sid The Twilio-provided string that uniquely identifies the Conference Recording resource to delete. - */ -func (c *DefaultApiService) DeleteConferenceRecording(AccountSid string, ConferenceSid string, Sid string) error { - path := "/2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Recordings/{Sid}.json" +*/ +func (c *DefaultApiService) DeleteConferenceRecording(AccountSid string, ConferenceSid string, Sid string, ) (error) { + path := "/2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Recordings/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"ConferenceSid"+"}", ConferenceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* @@ -2644,23 +2656,25 @@ func (c *DefaultApiService) DeleteConferenceRecording(AccountSid string, Confere * Delete an instance of a connect-app * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the ConnectApp resource to fetch. * @param Sid The Twilio-provided string that uniquely identifies the ConnectApp resource to fetch. - */ -func (c *DefaultApiService) DeleteConnectApp(AccountSid string, Sid string) error { - path := "/2010-04-01/Accounts/{AccountSid}/ConnectApps/{Sid}.json" +*/ +func (c *DefaultApiService) DeleteConnectApp(AccountSid string, Sid string, ) (error) { + path := "/2010-04-01/Accounts/{AccountSid}/ConnectApps/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* @@ -2668,23 +2682,25 @@ func (c *DefaultApiService) DeleteConnectApp(AccountSid string, Sid string) erro * Delete a phone-numbers belonging to the account used to make the request. * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the IncomingPhoneNumber resources to delete. * @param Sid The Twilio-provided string that uniquely identifies the IncomingPhoneNumber resource to delete. - */ -func (c *DefaultApiService) DeleteIncomingPhoneNumber(AccountSid string, Sid string) error { - path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{Sid}.json" +*/ +func (c *DefaultApiService) DeleteIncomingPhoneNumber(AccountSid string, Sid string, ) (error) { + path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* @@ -2693,47 +2709,51 @@ func (c *DefaultApiService) DeleteIncomingPhoneNumber(AccountSid string, Sid str * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the resources to delete. * @param ResourceSid The SID of the Phone Number to which the Add-on is assigned. * @param Sid The Twilio-provided string that uniquely identifies the resource to delete. - */ -func (c *DefaultApiService) DeleteIncomingPhoneNumberAssignedAddOn(AccountSid string, ResourceSid string, Sid string) error { - path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{ResourceSid}/AssignedAddOns/{Sid}.json" +*/ +func (c *DefaultApiService) DeleteIncomingPhoneNumberAssignedAddOn(AccountSid string, ResourceSid string, Sid string, ) (error) { + path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{ResourceSid}/AssignedAddOns/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"ResourceSid"+"}", ResourceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* * DeleteKey Method for DeleteKey * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Key resources to delete. * @param Sid The Twilio-provided string that uniquely identifies the Key resource to delete. - */ -func (c *DefaultApiService) DeleteKey(AccountSid string, Sid string) error { - path := "/2010-04-01/Accounts/{AccountSid}/Keys/{Sid}.json" +*/ +func (c *DefaultApiService) DeleteKey(AccountSid string, Sid string, ) (error) { + path := "/2010-04-01/Accounts/{AccountSid}/Keys/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* @@ -2742,24 +2762,26 @@ func (c *DefaultApiService) DeleteKey(AccountSid string, Sid string) error { * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Media resource(s) to delete. * @param MessageSid The SID of the Message resource that this Media resource belongs to. * @param Sid The Twilio-provided string that uniquely identifies the Media resource to delete - */ -func (c *DefaultApiService) DeleteMedia(AccountSid string, MessageSid string, Sid string) error { - path := "/2010-04-01/Accounts/{AccountSid}/Messages/{MessageSid}/Media/{Sid}.json" +*/ +func (c *DefaultApiService) DeleteMedia(AccountSid string, MessageSid string, Sid string, ) (error) { + path := "/2010-04-01/Accounts/{AccountSid}/Messages/{MessageSid}/Media/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"MessageSid"+"}", MessageSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* @@ -2767,23 +2789,25 @@ func (c *DefaultApiService) DeleteMedia(AccountSid string, MessageSid string, Si * Deletes a message record from your account * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Message resources to delete. * @param Sid The Twilio-provided string that uniquely identifies the Message resource to delete. - */ -func (c *DefaultApiService) DeleteMessage(AccountSid string, Sid string) error { - path := "/2010-04-01/Accounts/{AccountSid}/Messages/{Sid}.json" +*/ +func (c *DefaultApiService) DeleteMessage(AccountSid string, Sid string, ) (error) { + path := "/2010-04-01/Accounts/{AccountSid}/Messages/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* @@ -2791,23 +2815,25 @@ func (c *DefaultApiService) DeleteMessage(AccountSid string, Sid string) error { * Delete the caller-id specified from the account * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the OutgoingCallerId resources to delete. * @param Sid The Twilio-provided string that uniquely identifies the OutgoingCallerId resource to delete. - */ -func (c *DefaultApiService) DeleteOutgoingCallerId(AccountSid string, Sid string) error { - path := "/2010-04-01/Accounts/{AccountSid}/OutgoingCallerIds/{Sid}.json" +*/ +func (c *DefaultApiService) DeleteOutgoingCallerId(AccountSid string, Sid string, ) (error) { + path := "/2010-04-01/Accounts/{AccountSid}/OutgoingCallerIds/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* @@ -2816,24 +2842,26 @@ func (c *DefaultApiService) DeleteOutgoingCallerId(AccountSid string, Sid string * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Participant resources to delete. * @param ConferenceSid The SID of the conference with the participants to delete. * @param CallSid The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID or label of the participant to delete. Non URL safe characters in a label must be percent encoded, for example, a space character is represented as %20. - */ -func (c *DefaultApiService) DeleteParticipant(AccountSid string, ConferenceSid string, CallSid string) error { - path := "/2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Participants/{CallSid}.json" +*/ +func (c *DefaultApiService) DeleteParticipant(AccountSid string, ConferenceSid string, CallSid string, ) (error) { + path := "/2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Participants/{CallSid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"ConferenceSid"+"}", ConferenceSid, -1) path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* @@ -2841,23 +2869,25 @@ func (c *DefaultApiService) DeleteParticipant(AccountSid string, ConferenceSid s * Remove an empty queue * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Queue resource to delete. * @param Sid The Twilio-provided string that uniquely identifies the Queue resource to delete - */ -func (c *DefaultApiService) DeleteQueue(AccountSid string, Sid string) error { - path := "/2010-04-01/Accounts/{AccountSid}/Queues/{Sid}.json" +*/ +func (c *DefaultApiService) DeleteQueue(AccountSid string, Sid string, ) (error) { + path := "/2010-04-01/Accounts/{AccountSid}/Queues/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* @@ -2865,23 +2895,25 @@ func (c *DefaultApiService) DeleteQueue(AccountSid string, Sid string) error { * Delete a recording from your account * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording resources to delete. * @param Sid The Twilio-provided string that uniquely identifies the Recording resource to delete. - */ -func (c *DefaultApiService) DeleteRecording(AccountSid string, Sid string) error { - path := "/2010-04-01/Accounts/{AccountSid}/Recordings/{Sid}.json" +*/ +func (c *DefaultApiService) DeleteRecording(AccountSid string, Sid string, ) (error) { + path := "/2010-04-01/Accounts/{AccountSid}/Recordings/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* @@ -2890,24 +2922,26 @@ func (c *DefaultApiService) DeleteRecording(AccountSid string, Sid string) error * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording AddOnResult resources to delete. * @param ReferenceSid The SID of the recording to which the result to delete belongs. * @param Sid The Twilio-provided string that uniquely identifies the Recording AddOnResult resource to delete. - */ -func (c *DefaultApiService) DeleteRecordingAddOnResult(AccountSid string, ReferenceSid string, Sid string) error { - path := "/2010-04-01/Accounts/{AccountSid}/Recordings/{ReferenceSid}/AddOnResults/{Sid}.json" +*/ +func (c *DefaultApiService) DeleteRecordingAddOnResult(AccountSid string, ReferenceSid string, Sid string, ) (error) { + path := "/2010-04-01/Accounts/{AccountSid}/Recordings/{ReferenceSid}/AddOnResults/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"ReferenceSid"+"}", ReferenceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* @@ -2917,25 +2951,27 @@ func (c *DefaultApiService) DeleteRecordingAddOnResult(AccountSid string, Refere * @param ReferenceSid The SID of the recording to which the AddOnResult resource that contains the payloads to delete belongs. * @param AddOnResultSid The SID of the AddOnResult to which the payloads to delete belongs. * @param Sid The Twilio-provided string that uniquely identifies the Recording AddOnResult Payload resource to delete. - */ -func (c *DefaultApiService) DeleteRecordingAddOnResultPayload(AccountSid string, ReferenceSid string, AddOnResultSid string, Sid string) error { - path := "/2010-04-01/Accounts/{AccountSid}/Recordings/{ReferenceSid}/AddOnResults/{AddOnResultSid}/Payloads/{Sid}.json" +*/ +func (c *DefaultApiService) DeleteRecordingAddOnResultPayload(AccountSid string, ReferenceSid string, AddOnResultSid string, Sid string, ) (error) { + path := "/2010-04-01/Accounts/{AccountSid}/Recordings/{ReferenceSid}/AddOnResults/{AddOnResultSid}/Payloads/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"ReferenceSid"+"}", ReferenceSid, -1) path = strings.Replace(path, "{"+"AddOnResultSid"+"}", AddOnResultSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* @@ -2943,47 +2979,51 @@ func (c *DefaultApiService) DeleteRecordingAddOnResultPayload(AccountSid string, * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Transcription resources to delete. * @param RecordingSid The SID of the [Recording](https://www.twilio.com/docs/voice/api/recording) that created the transcription to delete. * @param Sid The Twilio-provided string that uniquely identifies the Transcription resource to delete. - */ -func (c *DefaultApiService) DeleteRecordingTranscription(AccountSid string, RecordingSid string, Sid string) error { - path := "/2010-04-01/Accounts/{AccountSid}/Recordings/{RecordingSid}/Transcriptions/{Sid}.json" +*/ +func (c *DefaultApiService) DeleteRecordingTranscription(AccountSid string, RecordingSid string, Sid string, ) (error) { + path := "/2010-04-01/Accounts/{AccountSid}/Recordings/{RecordingSid}/Transcriptions/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"RecordingSid"+"}", RecordingSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* * DeleteSigningKey Method for DeleteSigningKey * @param AccountSid * @param Sid - */ -func (c *DefaultApiService) DeleteSigningKey(AccountSid string, Sid string) error { - path := "/2010-04-01/Accounts/{AccountSid}/SigningKeys/{Sid}.json" +*/ +func (c *DefaultApiService) DeleteSigningKey(AccountSid string, Sid string, ) (error) { + path := "/2010-04-01/Accounts/{AccountSid}/SigningKeys/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* @@ -2992,24 +3032,26 @@ func (c *DefaultApiService) DeleteSigningKey(AccountSid string, Sid string) erro * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the CredentialListMapping resources to delete. * @param DomainSid The SID of the SIP domain that contains the resource to delete. * @param Sid The Twilio-provided string that uniquely identifies the CredentialListMapping resource to delete. - */ -func (c *DefaultApiService) DeleteSipAuthCallsCredentialListMapping(AccountSid string, DomainSid string, Sid string) error { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls/CredentialListMappings/{Sid}.json" +*/ +func (c *DefaultApiService) DeleteSipAuthCallsCredentialListMapping(AccountSid string, DomainSid string, Sid string, ) (error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls/CredentialListMappings/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* @@ -3018,24 +3060,26 @@ func (c *DefaultApiService) DeleteSipAuthCallsCredentialListMapping(AccountSid s * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the IpAccessControlListMapping resources to delete. * @param DomainSid The SID of the SIP domain that contains the resources to delete. * @param Sid The Twilio-provided string that uniquely identifies the IpAccessControlListMapping resource to delete. - */ -func (c *DefaultApiService) DeleteSipAuthCallsIpAccessControlListMapping(AccountSid string, DomainSid string, Sid string) error { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls/IpAccessControlListMappings/{Sid}.json" +*/ +func (c *DefaultApiService) DeleteSipAuthCallsIpAccessControlListMapping(AccountSid string, DomainSid string, Sid string, ) (error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls/IpAccessControlListMappings/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* @@ -3044,24 +3088,26 @@ func (c *DefaultApiService) DeleteSipAuthCallsIpAccessControlListMapping(Account * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the CredentialListMapping resources to delete. * @param DomainSid The SID of the SIP domain that contains the resources to delete. * @param Sid The Twilio-provided string that uniquely identifies the CredentialListMapping resource to delete. - */ -func (c *DefaultApiService) DeleteSipAuthRegistrationsCredentialListMapping(AccountSid string, DomainSid string, Sid string) error { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Registrations/CredentialListMappings/{Sid}.json" +*/ +func (c *DefaultApiService) DeleteSipAuthRegistrationsCredentialListMapping(AccountSid string, DomainSid string, Sid string, ) (error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Registrations/CredentialListMappings/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* @@ -3070,24 +3116,26 @@ func (c *DefaultApiService) DeleteSipAuthRegistrationsCredentialListMapping(Acco * @param AccountSid The unique id of the Account that is responsible for this resource. * @param CredentialListSid The unique id that identifies the credential list that contains the desired credentials. * @param Sid The unique id that identifies the resource to delete. - */ -func (c *DefaultApiService) DeleteSipCredential(AccountSid string, CredentialListSid string, Sid string) error { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{CredentialListSid}/Credentials/{Sid}.json" +*/ +func (c *DefaultApiService) DeleteSipCredential(AccountSid string, CredentialListSid string, Sid string, ) (error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{CredentialListSid}/Credentials/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"CredentialListSid"+"}", CredentialListSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* @@ -3095,23 +3143,25 @@ func (c *DefaultApiService) DeleteSipCredential(AccountSid string, CredentialLis * Delete a Credential List * @param AccountSid The unique id of the Account that is responsible for this resource. * @param Sid The credential list Sid that uniquely identifies this resource - */ -func (c *DefaultApiService) DeleteSipCredentialList(AccountSid string, Sid string) error { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{Sid}.json" +*/ +func (c *DefaultApiService) DeleteSipCredentialList(AccountSid string, Sid string, ) (error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* @@ -3120,24 +3170,26 @@ func (c *DefaultApiService) DeleteSipCredentialList(AccountSid string, Sid strin * @param AccountSid The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. * @param DomainSid A 34 character string that uniquely identifies the SIP Domain that includes the resource to delete. * @param Sid A 34 character string that uniquely identifies the resource to delete. - */ -func (c *DefaultApiService) DeleteSipCredentialListMapping(AccountSid string, DomainSid string, Sid string) error { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/CredentialListMappings/{Sid}.json" +*/ +func (c *DefaultApiService) DeleteSipCredentialListMapping(AccountSid string, DomainSid string, Sid string, ) (error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/CredentialListMappings/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* @@ -3145,23 +3197,25 @@ func (c *DefaultApiService) DeleteSipCredentialListMapping(AccountSid string, Do * Delete an instance of a Domain * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the SipDomain resources to delete. * @param Sid The Twilio-provided string that uniquely identifies the SipDomain resource to delete. - */ -func (c *DefaultApiService) DeleteSipDomain(AccountSid string, Sid string) error { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{Sid}.json" +*/ +func (c *DefaultApiService) DeleteSipDomain(AccountSid string, Sid string, ) (error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* @@ -3169,23 +3223,25 @@ func (c *DefaultApiService) DeleteSipDomain(AccountSid string, Sid string) error * Delete an IpAccessControlList from the requested account * @param AccountSid The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. * @param Sid A 34 character string that uniquely identifies the resource to delete. - */ -func (c *DefaultApiService) DeleteSipIpAccessControlList(AccountSid string, Sid string) error { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists/{Sid}.json" +*/ +func (c *DefaultApiService) DeleteSipIpAccessControlList(AccountSid string, Sid string, ) (error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* @@ -3194,24 +3250,26 @@ func (c *DefaultApiService) DeleteSipIpAccessControlList(AccountSid string, Sid * @param AccountSid The unique id of the Account that is responsible for this resource. * @param DomainSid A 34 character string that uniquely identifies the SIP domain. * @param Sid A 34 character string that uniquely identifies the resource to delete. - */ -func (c *DefaultApiService) DeleteSipIpAccessControlListMapping(AccountSid string, DomainSid string, Sid string) error { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/IpAccessControlListMappings/{Sid}.json" +*/ +func (c *DefaultApiService) DeleteSipIpAccessControlListMapping(AccountSid string, DomainSid string, Sid string, ) (error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/IpAccessControlListMappings/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* @@ -3220,24 +3278,26 @@ func (c *DefaultApiService) DeleteSipIpAccessControlListMapping(AccountSid strin * @param AccountSid The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. * @param IpAccessControlListSid The IpAccessControlList Sid that identifies the IpAddress resources to delete. * @param Sid A 34 character string that uniquely identifies the resource to delete. - */ -func (c *DefaultApiService) DeleteSipIpAddress(AccountSid string, IpAccessControlListSid string, Sid string) error { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists/{IpAccessControlListSid}/IpAddresses/{Sid}.json" +*/ +func (c *DefaultApiService) DeleteSipIpAddress(AccountSid string, IpAccessControlListSid string, Sid string, ) (error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists/{IpAccessControlListSid}/IpAddresses/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"IpAccessControlListSid"+"}", IpAccessControlListSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* @@ -3245,46 +3305,50 @@ func (c *DefaultApiService) DeleteSipIpAddress(AccountSid string, IpAccessContro * Delete a transcription from the account used to make the request * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Transcription resources to delete. * @param Sid The Twilio-provided string that uniquely identifies the Transcription resource to delete. - */ -func (c *DefaultApiService) DeleteTranscription(AccountSid string, Sid string) error { - path := "/2010-04-01/Accounts/{AccountSid}/Transcriptions/{Sid}.json" +*/ +func (c *DefaultApiService) DeleteTranscription(AccountSid string, Sid string, ) (error) { + path := "/2010-04-01/Accounts/{AccountSid}/Transcriptions/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* * DeleteUsageTrigger Method for DeleteUsageTrigger * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageTrigger resources to delete. * @param Sid The Twilio-provided string that uniquely identifies the UsageTrigger resource to delete. - */ -func (c *DefaultApiService) DeleteUsageTrigger(AccountSid string, Sid string) error { - path := "/2010-04-01/Accounts/{AccountSid}/Usage/Triggers/{Sid}.json" +*/ +func (c *DefaultApiService) DeleteUsageTrigger(AccountSid string, Sid string, ) (error) { + path := "/2010-04-01/Accounts/{AccountSid}/Usage/Triggers/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* @@ -3292,27 +3356,29 @@ func (c *DefaultApiService) DeleteUsageTrigger(AccountSid string, Sid string) er * Fetch the account specified by the provided Account Sid * @param Sid The Account Sid that uniquely identifies the account to fetch * @return ApiV2010Account - */ -func (c *DefaultApiService) FetchAccount(Sid string) (*ApiV2010Account, error) { - path := "/2010-04-01/Accounts/{Sid}.json" +*/ +func (c *DefaultApiService) FetchAccount(Sid string, ) (*ApiV2010Account, error) { + path := "/2010-04-01/Accounts/{Sid}.json" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ApiV2010Account{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &ApiV2010Account{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -3320,28 +3386,30 @@ func (c *DefaultApiService) FetchAccount(Sid string) (*ApiV2010Account, error) { * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that is responsible for the Address resource to fetch. * @param Sid The Twilio-provided string that uniquely identifies the Address resource to fetch. * @return ApiV2010AccountAddress - */ -func (c *DefaultApiService) FetchAddress(AccountSid string, Sid string) (*ApiV2010AccountAddress, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Addresses/{Sid}.json" +*/ +func (c *DefaultApiService) FetchAddress(AccountSid string, Sid string, ) (*ApiV2010AccountAddress, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Addresses/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ApiV2010AccountAddress{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err + defer resp.Body.Close() + + ps := &ApiV2010AccountAddress{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -3350,28 +3418,30 @@ func (c *DefaultApiService) FetchAddress(AccountSid string, Sid string) (*ApiV20 * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Application resource to fetch. * @param Sid The Twilio-provided string that uniquely identifies the Application resource to fetch. * @return ApiV2010AccountApplication - */ -func (c *DefaultApiService) FetchApplication(AccountSid string, Sid string) (*ApiV2010AccountApplication, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Applications/{Sid}.json" +*/ +func (c *DefaultApiService) FetchApplication(AccountSid string, Sid string, ) (*ApiV2010AccountApplication, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Applications/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ApiV2010AccountApplication{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &ApiV2010AccountApplication{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -3380,28 +3450,30 @@ func (c *DefaultApiService) FetchApplication(AccountSid string, Sid string) (*Ap * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the AuthorizedConnectApp resource to fetch. * @param ConnectAppSid The SID of the Connect App to fetch. * @return ApiV2010AccountAuthorizedConnectApp - */ -func (c *DefaultApiService) FetchAuthorizedConnectApp(AccountSid string, ConnectAppSid string) (*ApiV2010AccountAuthorizedConnectApp, error) { - path := "/2010-04-01/Accounts/{AccountSid}/AuthorizedConnectApps/{ConnectAppSid}.json" +*/ +func (c *DefaultApiService) FetchAuthorizedConnectApp(AccountSid string, ConnectAppSid string, ) (*ApiV2010AccountAuthorizedConnectApp, error) { + path := "/2010-04-01/Accounts/{AccountSid}/AuthorizedConnectApps/{ConnectAppSid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"ConnectAppSid"+"}", ConnectAppSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ApiV2010AccountAuthorizedConnectApp{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountAuthorizedConnectApp{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -3409,28 +3481,30 @@ func (c *DefaultApiService) FetchAuthorizedConnectApp(AccountSid string, Connect * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) requesting the available phone number Country resource. * @param CountryCode The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country to fetch available phone number information about. * @return ApiV2010AccountAvailablePhoneNumberCountry - */ -func (c *DefaultApiService) FetchAvailablePhoneNumberCountry(AccountSid string, CountryCode string) (*ApiV2010AccountAvailablePhoneNumberCountry, error) { - path := "/2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}.json" +*/ +func (c *DefaultApiService) FetchAvailablePhoneNumberCountry(AccountSid string, CountryCode string, ) (*ApiV2010AccountAvailablePhoneNumberCountry, error) { + path := "/2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"CountryCode"+"}", CountryCode, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ApiV2010AccountAvailablePhoneNumberCountry{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &ApiV2010AccountAvailablePhoneNumberCountry{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -3438,27 +3512,29 @@ func (c *DefaultApiService) FetchAvailablePhoneNumberCountry(AccountSid string, * Fetch the balance for an Account based on Account Sid. Balance changes may not be reflected immediately. Child accounts do not contain balance information * @param AccountSid The unique SID identifier of the Account. * @return ApiV2010AccountBalance - */ -func (c *DefaultApiService) FetchBalance(AccountSid string) (*ApiV2010AccountBalance, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Balance.json" +*/ +func (c *DefaultApiService) FetchBalance(AccountSid string, ) (*ApiV2010AccountBalance, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Balance.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ApiV2010AccountBalance{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err + defer resp.Body.Close() + + ps := &ApiV2010AccountBalance{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -3467,28 +3543,30 @@ func (c *DefaultApiService) FetchBalance(AccountSid string) (*ApiV2010AccountBal * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Call resource(s) to fetch. * @param Sid The SID of the Call resource to fetch. * @return ApiV2010AccountCall - */ -func (c *DefaultApiService) FetchCall(AccountSid string, Sid string) (*ApiV2010AccountCall, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Calls/{Sid}.json" +*/ +func (c *DefaultApiService) FetchCall(AccountSid string, Sid string, ) (*ApiV2010AccountCall, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Calls/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ApiV2010AccountCall{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &ApiV2010AccountCall{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -3497,28 +3575,30 @@ func (c *DefaultApiService) FetchCall(AccountSid string, Sid string) (*ApiV2010A * @param AccountSid The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. * @param CallSid The call sid that uniquely identifies the call * @return ApiV2010AccountCallCallFeedback - */ -func (c *DefaultApiService) FetchCallFeedback(AccountSid string, CallSid string) (*ApiV2010AccountCallCallFeedback, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Feedback.json" +*/ +func (c *DefaultApiService) FetchCallFeedback(AccountSid string, CallSid string, ) (*ApiV2010AccountCallCallFeedback, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Feedback.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ApiV2010AccountCallCallFeedback{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountCallCallFeedback{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -3527,28 +3607,30 @@ func (c *DefaultApiService) FetchCallFeedback(AccountSid string, CallSid string) * @param AccountSid The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. * @param Sid A 34 character string that uniquely identifies this resource. * @return ApiV2010AccountCallCallFeedbackSummary - */ -func (c *DefaultApiService) FetchCallFeedbackSummary(AccountSid string, Sid string) (*ApiV2010AccountCallCallFeedbackSummary, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Calls/FeedbackSummary/{Sid}.json" +*/ +func (c *DefaultApiService) FetchCallFeedbackSummary(AccountSid string, Sid string, ) (*ApiV2010AccountCallCallFeedbackSummary, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Calls/FeedbackSummary/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ApiV2010AccountCallCallFeedbackSummary{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &ApiV2010AccountCallCallFeedbackSummary{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -3557,29 +3639,31 @@ func (c *DefaultApiService) FetchCallFeedbackSummary(AccountSid string, Sid stri * @param CallSid The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID of the Call Notification resource to fetch. * @param Sid The Twilio-provided string that uniquely identifies the Call Notification resource to fetch. * @return ApiV2010AccountCallCallNotificationInstance - */ -func (c *DefaultApiService) FetchCallNotification(AccountSid string, CallSid string, Sid string) (*ApiV2010AccountCallCallNotificationInstance, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Notifications/{Sid}.json" +*/ +func (c *DefaultApiService) FetchCallNotification(AccountSid string, CallSid string, Sid string, ) (*ApiV2010AccountCallCallNotificationInstance, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Notifications/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ApiV2010AccountCallCallNotificationInstance{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err + defer resp.Body.Close() + + ps := &ApiV2010AccountCallCallNotificationInstance{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -3589,29 +3673,31 @@ func (c *DefaultApiService) FetchCallNotification(AccountSid string, CallSid str * @param CallSid The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID of the resource to fetch. * @param Sid The Twilio-provided string that uniquely identifies the Recording resource to fetch. * @return ApiV2010AccountCallCallRecording - */ -func (c *DefaultApiService) FetchCallRecording(AccountSid string, CallSid string, Sid string) (*ApiV2010AccountCallCallRecording, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Recordings/{Sid}.json" +*/ +func (c *DefaultApiService) FetchCallRecording(AccountSid string, CallSid string, Sid string, ) (*ApiV2010AccountCallCallRecording, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Recordings/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ApiV2010AccountCallCallRecording{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &ApiV2010AccountCallCallRecording{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -3620,28 +3706,30 @@ func (c *DefaultApiService) FetchCallRecording(AccountSid string, CallSid string * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Conference resource(s) to fetch. * @param Sid The Twilio-provided string that uniquely identifies the Conference resource to fetch * @return ApiV2010AccountConference - */ -func (c *DefaultApiService) FetchConference(AccountSid string, Sid string) (*ApiV2010AccountConference, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Conferences/{Sid}.json" +*/ +func (c *DefaultApiService) FetchConference(AccountSid string, Sid string, ) (*ApiV2010AccountConference, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Conferences/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ApiV2010AccountConference{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountConference{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -3651,29 +3739,31 @@ func (c *DefaultApiService) FetchConference(AccountSid string, Sid string) (*Api * @param ConferenceSid The Conference SID that identifies the conference associated with the recording to fetch. * @param Sid The Twilio-provided string that uniquely identifies the Conference Recording resource to fetch. * @return ApiV2010AccountConferenceConferenceRecording - */ -func (c *DefaultApiService) FetchConferenceRecording(AccountSid string, ConferenceSid string, Sid string) (*ApiV2010AccountConferenceConferenceRecording, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Recordings/{Sid}.json" +*/ +func (c *DefaultApiService) FetchConferenceRecording(AccountSid string, ConferenceSid string, Sid string, ) (*ApiV2010AccountConferenceConferenceRecording, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Recordings/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"ConferenceSid"+"}", ConferenceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ApiV2010AccountConferenceConferenceRecording{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &ApiV2010AccountConferenceConferenceRecording{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -3682,28 +3772,30 @@ func (c *DefaultApiService) FetchConferenceRecording(AccountSid string, Conferen * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the ConnectApp resource to fetch. * @param Sid The Twilio-provided string that uniquely identifies the ConnectApp resource to fetch. * @return ApiV2010AccountConnectApp - */ -func (c *DefaultApiService) FetchConnectApp(AccountSid string, Sid string) (*ApiV2010AccountConnectApp, error) { - path := "/2010-04-01/Accounts/{AccountSid}/ConnectApps/{Sid}.json" +*/ +func (c *DefaultApiService) FetchConnectApp(AccountSid string, Sid string, ) (*ApiV2010AccountConnectApp, error) { + path := "/2010-04-01/Accounts/{AccountSid}/ConnectApps/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ApiV2010AccountConnectApp{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err + defer resp.Body.Close() + + ps := &ApiV2010AccountConnectApp{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -3712,28 +3804,30 @@ func (c *DefaultApiService) FetchConnectApp(AccountSid string, Sid string) (*Api * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the IncomingPhoneNumber resource to fetch. * @param Sid The Twilio-provided string that uniquely identifies the IncomingPhoneNumber resource to fetch. * @return ApiV2010AccountIncomingPhoneNumber - */ -func (c *DefaultApiService) FetchIncomingPhoneNumber(AccountSid string, Sid string) (*ApiV2010AccountIncomingPhoneNumber, error) { - path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{Sid}.json" +*/ +func (c *DefaultApiService) FetchIncomingPhoneNumber(AccountSid string, Sid string, ) (*ApiV2010AccountIncomingPhoneNumber, error) { + path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ApiV2010AccountIncomingPhoneNumber{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &ApiV2010AccountIncomingPhoneNumber{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -3743,29 +3837,31 @@ func (c *DefaultApiService) FetchIncomingPhoneNumber(AccountSid string, Sid stri * @param ResourceSid The SID of the Phone Number to which the Add-on is assigned. * @param Sid The Twilio-provided string that uniquely identifies the resource to fetch. * @return ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOn - */ -func (c *DefaultApiService) FetchIncomingPhoneNumberAssignedAddOn(AccountSid string, ResourceSid string, Sid string) (*ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOn, error) { - path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{ResourceSid}/AssignedAddOns/{Sid}.json" +*/ +func (c *DefaultApiService) FetchIncomingPhoneNumberAssignedAddOn(AccountSid string, ResourceSid string, Sid string, ) (*ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOn, error) { + path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{ResourceSid}/AssignedAddOns/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"ResourceSid"+"}", ResourceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOn{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOn{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -3776,30 +3872,32 @@ func (c *DefaultApiService) FetchIncomingPhoneNumberAssignedAddOn(AccountSid str * @param AssignedAddOnSid The SID that uniquely identifies the assigned Add-on installation. * @param Sid The Twilio-provided string that uniquely identifies the resource to fetch. * @return ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOnIncomingPhoneNumberAssignedAddOnExtension - */ -func (c *DefaultApiService) FetchIncomingPhoneNumberAssignedAddOnExtension(AccountSid string, ResourceSid string, AssignedAddOnSid string, Sid string) (*ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOnIncomingPhoneNumberAssignedAddOnExtension, error) { - path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{ResourceSid}/AssignedAddOns/{AssignedAddOnSid}/Extensions/{Sid}.json" +*/ +func (c *DefaultApiService) FetchIncomingPhoneNumberAssignedAddOnExtension(AccountSid string, ResourceSid string, AssignedAddOnSid string, Sid string, ) (*ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOnIncomingPhoneNumberAssignedAddOnExtension, error) { + path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{ResourceSid}/AssignedAddOns/{AssignedAddOnSid}/Extensions/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"ResourceSid"+"}", ResourceSid, -1) path = strings.Replace(path, "{"+"AssignedAddOnSid"+"}", AssignedAddOnSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOnIncomingPhoneNumberAssignedAddOnExtension{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOnIncomingPhoneNumberAssignedAddOnExtension{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -3807,28 +3905,30 @@ func (c *DefaultApiService) FetchIncomingPhoneNumberAssignedAddOnExtension(Accou * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Key resource to fetch. * @param Sid The Twilio-provided string that uniquely identifies the Key resource to fetch. * @return ApiV2010AccountKey - */ -func (c *DefaultApiService) FetchKey(AccountSid string, Sid string) (*ApiV2010AccountKey, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Keys/{Sid}.json" +*/ +func (c *DefaultApiService) FetchKey(AccountSid string, Sid string, ) (*ApiV2010AccountKey, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Keys/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ApiV2010AccountKey{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err + defer resp.Body.Close() + + ps := &ApiV2010AccountKey{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -3838,29 +3938,31 @@ func (c *DefaultApiService) FetchKey(AccountSid string, Sid string) (*ApiV2010Ac * @param MessageSid The SID of the Message resource that this Media resource belongs to. * @param Sid The Twilio-provided string that uniquely identifies the Media resource to fetch * @return ApiV2010AccountMessageMedia - */ -func (c *DefaultApiService) FetchMedia(AccountSid string, MessageSid string, Sid string) (*ApiV2010AccountMessageMedia, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Messages/{MessageSid}/Media/{Sid}.json" +*/ +func (c *DefaultApiService) FetchMedia(AccountSid string, MessageSid string, Sid string, ) (*ApiV2010AccountMessageMedia, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Messages/{MessageSid}/Media/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"MessageSid"+"}", MessageSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ApiV2010AccountMessageMedia{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &ApiV2010AccountMessageMedia{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -3870,29 +3972,31 @@ func (c *DefaultApiService) FetchMedia(AccountSid string, MessageSid string, Sid * @param QueueSid The SID of the Queue in which to find the members to fetch. * @param CallSid The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID of the resource(s) to fetch. * @return ApiV2010AccountQueueMember - */ -func (c *DefaultApiService) FetchMember(AccountSid string, QueueSid string, CallSid string) (*ApiV2010AccountQueueMember, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Queues/{QueueSid}/Members/{CallSid}.json" +*/ +func (c *DefaultApiService) FetchMember(AccountSid string, QueueSid string, CallSid string, ) (*ApiV2010AccountQueueMember, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Queues/{QueueSid}/Members/{CallSid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"QueueSid"+"}", QueueSid, -1) path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ApiV2010AccountQueueMember{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountQueueMember{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -3901,28 +4005,30 @@ func (c *DefaultApiService) FetchMember(AccountSid string, QueueSid string, Call * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Message resource to fetch. * @param Sid The Twilio-provided string that uniquely identifies the Message resource to fetch. * @return ApiV2010AccountMessage - */ -func (c *DefaultApiService) FetchMessage(AccountSid string, Sid string) (*ApiV2010AccountMessage, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Messages/{Sid}.json" +*/ +func (c *DefaultApiService) FetchMessage(AccountSid string, Sid string, ) (*ApiV2010AccountMessage, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Messages/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ApiV2010AccountMessage{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &ApiV2010AccountMessage{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -3931,28 +4037,30 @@ func (c *DefaultApiService) FetchMessage(AccountSid string, Sid string) (*ApiV20 * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Notification resource to fetch. * @param Sid The Twilio-provided string that uniquely identifies the Notification resource to fetch. * @return ApiV2010AccountNotificationInstance - */ -func (c *DefaultApiService) FetchNotification(AccountSid string, Sid string) (*ApiV2010AccountNotificationInstance, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Notifications/{Sid}.json" +*/ +func (c *DefaultApiService) FetchNotification(AccountSid string, Sid string, ) (*ApiV2010AccountNotificationInstance, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Notifications/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ApiV2010AccountNotificationInstance{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err + defer resp.Body.Close() + + ps := &ApiV2010AccountNotificationInstance{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -3961,28 +4069,30 @@ func (c *DefaultApiService) FetchNotification(AccountSid string, Sid string) (*A * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the OutgoingCallerId resource to fetch. * @param Sid The Twilio-provided string that uniquely identifies the OutgoingCallerId resource to fetch. * @return ApiV2010AccountOutgoingCallerId - */ -func (c *DefaultApiService) FetchOutgoingCallerId(AccountSid string, Sid string) (*ApiV2010AccountOutgoingCallerId, error) { - path := "/2010-04-01/Accounts/{AccountSid}/OutgoingCallerIds/{Sid}.json" +*/ +func (c *DefaultApiService) FetchOutgoingCallerId(AccountSid string, Sid string, ) (*ApiV2010AccountOutgoingCallerId, error) { + path := "/2010-04-01/Accounts/{AccountSid}/OutgoingCallerIds/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ApiV2010AccountOutgoingCallerId{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &ApiV2010AccountOutgoingCallerId{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -3992,29 +4102,31 @@ func (c *DefaultApiService) FetchOutgoingCallerId(AccountSid string, Sid string) * @param ConferenceSid The SID of the conference with the participant to fetch. * @param CallSid The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID or label of the participant to fetch. Non URL safe characters in a label must be percent encoded, for example, a space character is represented as %20. * @return ApiV2010AccountConferenceParticipant - */ -func (c *DefaultApiService) FetchParticipant(AccountSid string, ConferenceSid string, CallSid string) (*ApiV2010AccountConferenceParticipant, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Participants/{CallSid}.json" +*/ +func (c *DefaultApiService) FetchParticipant(AccountSid string, ConferenceSid string, CallSid string, ) (*ApiV2010AccountConferenceParticipant, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Participants/{CallSid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"ConferenceSid"+"}", ConferenceSid, -1) path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ApiV2010AccountConferenceParticipant{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountConferenceParticipant{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -4023,28 +4135,30 @@ func (c *DefaultApiService) FetchParticipant(AccountSid string, ConferenceSid st * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Queue resource to fetch. * @param Sid The Twilio-provided string that uniquely identifies the Queue resource to fetch * @return ApiV2010AccountQueue - */ -func (c *DefaultApiService) FetchQueue(AccountSid string, Sid string) (*ApiV2010AccountQueue, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Queues/{Sid}.json" +*/ +func (c *DefaultApiService) FetchQueue(AccountSid string, Sid string, ) (*ApiV2010AccountQueue, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Queues/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ApiV2010AccountQueue{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &ApiV2010AccountQueue{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -4053,28 +4167,30 @@ func (c *DefaultApiService) FetchQueue(AccountSid string, Sid string) (*ApiV2010 * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording resource to fetch. * @param Sid The Twilio-provided string that uniquely identifies the Recording resource to fetch. * @return ApiV2010AccountRecording - */ -func (c *DefaultApiService) FetchRecording(AccountSid string, Sid string) (*ApiV2010AccountRecording, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Recordings/{Sid}.json" +*/ +func (c *DefaultApiService) FetchRecording(AccountSid string, Sid string, ) (*ApiV2010AccountRecording, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Recordings/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ApiV2010AccountRecording{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err + defer resp.Body.Close() + + ps := &ApiV2010AccountRecording{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -4084,29 +4200,31 @@ func (c *DefaultApiService) FetchRecording(AccountSid string, Sid string) (*ApiV * @param ReferenceSid The SID of the recording to which the result to fetch belongs. * @param Sid The Twilio-provided string that uniquely identifies the Recording AddOnResult resource to fetch. * @return ApiV2010AccountRecordingRecordingAddOnResult - */ -func (c *DefaultApiService) FetchRecordingAddOnResult(AccountSid string, ReferenceSid string, Sid string) (*ApiV2010AccountRecordingRecordingAddOnResult, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Recordings/{ReferenceSid}/AddOnResults/{Sid}.json" +*/ +func (c *DefaultApiService) FetchRecordingAddOnResult(AccountSid string, ReferenceSid string, Sid string, ) (*ApiV2010AccountRecordingRecordingAddOnResult, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Recordings/{ReferenceSid}/AddOnResults/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"ReferenceSid"+"}", ReferenceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ApiV2010AccountRecordingRecordingAddOnResult{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &ApiV2010AccountRecordingRecordingAddOnResult{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -4117,30 +4235,32 @@ func (c *DefaultApiService) FetchRecordingAddOnResult(AccountSid string, Referen * @param AddOnResultSid The SID of the AddOnResult to which the payload to fetch belongs. * @param Sid The Twilio-provided string that uniquely identifies the Recording AddOnResult Payload resource to fetch. * @return ApiV2010AccountRecordingRecordingAddOnResultRecordingAddOnResultPayload - */ -func (c *DefaultApiService) FetchRecordingAddOnResultPayload(AccountSid string, ReferenceSid string, AddOnResultSid string, Sid string) (*ApiV2010AccountRecordingRecordingAddOnResultRecordingAddOnResultPayload, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Recordings/{ReferenceSid}/AddOnResults/{AddOnResultSid}/Payloads/{Sid}.json" +*/ +func (c *DefaultApiService) FetchRecordingAddOnResultPayload(AccountSid string, ReferenceSid string, AddOnResultSid string, Sid string, ) (*ApiV2010AccountRecordingRecordingAddOnResultRecordingAddOnResultPayload, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Recordings/{ReferenceSid}/AddOnResults/{AddOnResultSid}/Payloads/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"ReferenceSid"+"}", ReferenceSid, -1) path = strings.Replace(path, "{"+"AddOnResultSid"+"}", AddOnResultSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ApiV2010AccountRecordingRecordingAddOnResultRecordingAddOnResultPayload{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountRecordingRecordingAddOnResultRecordingAddOnResultPayload{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -4149,30 +4269,32 @@ func (c *DefaultApiService) FetchRecordingAddOnResultPayload(AccountSid string, * @param RecordingSid The SID of the [Recording](https://www.twilio.com/docs/voice/api/recording) that created the transcription to fetch. * @param Sid The Twilio-provided string that uniquely identifies the Transcription resource to fetch. * @return ApiV2010AccountRecordingRecordingTranscription - */ -func (c *DefaultApiService) FetchRecordingTranscription(AccountSid string, RecordingSid string, Sid string) (*ApiV2010AccountRecordingRecordingTranscription, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Recordings/{RecordingSid}/Transcriptions/{Sid}.json" +*/ +func (c *DefaultApiService) FetchRecordingTranscription(AccountSid string, RecordingSid string, Sid string, ) (*ApiV2010AccountRecordingRecordingTranscription, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Recordings/{RecordingSid}/Transcriptions/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"RecordingSid"+"}", RecordingSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ApiV2010AccountRecordingRecordingTranscription{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err -} + defer resp.Body.Close() + + ps := &ApiV2010AccountRecordingRecordingTranscription{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} /* * FetchShortCode Method for FetchShortCode @@ -4180,28 +4302,30 @@ func (c *DefaultApiService) FetchRecordingTranscription(AccountSid string, Recor * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the ShortCode resource(s) to fetch. * @param Sid The Twilio-provided string that uniquely identifies the ShortCode resource to fetch * @return ApiV2010AccountShortCode - */ -func (c *DefaultApiService) FetchShortCode(AccountSid string, Sid string) (*ApiV2010AccountShortCode, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SMS/ShortCodes/{Sid}.json" +*/ +func (c *DefaultApiService) FetchShortCode(AccountSid string, Sid string, ) (*ApiV2010AccountShortCode, error) { + path := "/2010-04-01/Accounts/{AccountSid}/SMS/ShortCodes/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ApiV2010AccountShortCode{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err + defer resp.Body.Close() + + ps := &ApiV2010AccountShortCode{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -4209,28 +4333,30 @@ func (c *DefaultApiService) FetchShortCode(AccountSid string, Sid string) (*ApiV * @param AccountSid * @param Sid * @return ApiV2010AccountSigningKey - */ -func (c *DefaultApiService) FetchSigningKey(AccountSid string, Sid string) (*ApiV2010AccountSigningKey, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SigningKeys/{Sid}.json" +*/ +func (c *DefaultApiService) FetchSigningKey(AccountSid string, Sid string, ) (*ApiV2010AccountSigningKey, error) { + path := "/2010-04-01/Accounts/{AccountSid}/SigningKeys/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ApiV2010AccountSigningKey{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &ApiV2010AccountSigningKey{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -4240,29 +4366,31 @@ func (c *DefaultApiService) FetchSigningKey(AccountSid string, Sid string) (*Api * @param DomainSid The SID of the SIP domain that contains the resource to fetch. * @param Sid The Twilio-provided string that uniquely identifies the CredentialListMapping resource to fetch. * @return ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsCredentialListMapping - */ -func (c *DefaultApiService) FetchSipAuthCallsCredentialListMapping(AccountSid string, DomainSid string, Sid string) (*ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsCredentialListMapping, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls/CredentialListMappings/{Sid}.json" +*/ +func (c *DefaultApiService) FetchSipAuthCallsCredentialListMapping(AccountSid string, DomainSid string, Sid string, ) (*ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsCredentialListMapping, error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls/CredentialListMappings/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsCredentialListMapping{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsCredentialListMapping{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -4272,29 +4400,31 @@ func (c *DefaultApiService) FetchSipAuthCallsCredentialListMapping(AccountSid st * @param DomainSid The SID of the SIP domain that contains the resource to fetch. * @param Sid The Twilio-provided string that uniquely identifies the IpAccessControlListMapping resource to fetch. * @return ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsIpAccessControlListMapping - */ -func (c *DefaultApiService) FetchSipAuthCallsIpAccessControlListMapping(AccountSid string, DomainSid string, Sid string) (*ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsIpAccessControlListMapping, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls/IpAccessControlListMappings/{Sid}.json" +*/ +func (c *DefaultApiService) FetchSipAuthCallsIpAccessControlListMapping(AccountSid string, DomainSid string, Sid string, ) (*ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsIpAccessControlListMapping, error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls/IpAccessControlListMappings/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsIpAccessControlListMapping{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err + defer resp.Body.Close() + + ps := &ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsIpAccessControlListMapping{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -4304,29 +4434,31 @@ func (c *DefaultApiService) FetchSipAuthCallsIpAccessControlListMapping(AccountS * @param DomainSid The SID of the SIP domain that contains the resource to fetch. * @param Sid The Twilio-provided string that uniquely identifies the CredentialListMapping resource to fetch. * @return ApiV2010AccountSipSipDomainSipAuthSipAuthRegistrationsSipAuthRegistrationsCredentialListMapping - */ -func (c *DefaultApiService) FetchSipAuthRegistrationsCredentialListMapping(AccountSid string, DomainSid string, Sid string) (*ApiV2010AccountSipSipDomainSipAuthSipAuthRegistrationsSipAuthRegistrationsCredentialListMapping, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Registrations/CredentialListMappings/{Sid}.json" +*/ +func (c *DefaultApiService) FetchSipAuthRegistrationsCredentialListMapping(AccountSid string, DomainSid string, Sid string, ) (*ApiV2010AccountSipSipDomainSipAuthSipAuthRegistrationsSipAuthRegistrationsCredentialListMapping, error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Registrations/CredentialListMappings/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ApiV2010AccountSipSipDomainSipAuthSipAuthRegistrationsSipAuthRegistrationsCredentialListMapping{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &ApiV2010AccountSipSipDomainSipAuthSipAuthRegistrationsSipAuthRegistrationsCredentialListMapping{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -4336,29 +4468,31 @@ func (c *DefaultApiService) FetchSipAuthRegistrationsCredentialListMapping(Accou * @param CredentialListSid The unique id that identifies the credential list that contains the desired credential. * @param Sid The unique id that identifies the resource to fetch. * @return ApiV2010AccountSipSipCredentialListSipCredential - */ -func (c *DefaultApiService) FetchSipCredential(AccountSid string, CredentialListSid string, Sid string) (*ApiV2010AccountSipSipCredentialListSipCredential, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{CredentialListSid}/Credentials/{Sid}.json" +*/ +func (c *DefaultApiService) FetchSipCredential(AccountSid string, CredentialListSid string, Sid string, ) (*ApiV2010AccountSipSipCredentialListSipCredential, error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{CredentialListSid}/Credentials/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"CredentialListSid"+"}", CredentialListSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ApiV2010AccountSipSipCredentialListSipCredential{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountSipSipCredentialListSipCredential{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -4367,28 +4501,30 @@ func (c *DefaultApiService) FetchSipCredential(AccountSid string, CredentialList * @param AccountSid The unique id of the Account that is responsible for this resource. * @param Sid The credential list Sid that uniquely identifies this resource * @return ApiV2010AccountSipSipCredentialList - */ -func (c *DefaultApiService) FetchSipCredentialList(AccountSid string, Sid string) (*ApiV2010AccountSipSipCredentialList, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{Sid}.json" +*/ +func (c *DefaultApiService) FetchSipCredentialList(AccountSid string, Sid string, ) (*ApiV2010AccountSipSipCredentialList, error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ApiV2010AccountSipSipCredentialList{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err + defer resp.Body.Close() + + ps := &ApiV2010AccountSipSipCredentialList{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -4398,29 +4534,31 @@ func (c *DefaultApiService) FetchSipCredentialList(AccountSid string, Sid string * @param DomainSid A 34 character string that uniquely identifies the SIP Domain that includes the resource to fetch. * @param Sid A 34 character string that uniquely identifies the resource to fetch. * @return ApiV2010AccountSipSipDomainSipCredentialListMapping - */ -func (c *DefaultApiService) FetchSipCredentialListMapping(AccountSid string, DomainSid string, Sid string) (*ApiV2010AccountSipSipDomainSipCredentialListMapping, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/CredentialListMappings/{Sid}.json" +*/ +func (c *DefaultApiService) FetchSipCredentialListMapping(AccountSid string, DomainSid string, Sid string, ) (*ApiV2010AccountSipSipDomainSipCredentialListMapping, error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/CredentialListMappings/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ApiV2010AccountSipSipDomainSipCredentialListMapping{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &ApiV2010AccountSipSipDomainSipCredentialListMapping{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -4429,28 +4567,30 @@ func (c *DefaultApiService) FetchSipCredentialListMapping(AccountSid string, Dom * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the SipDomain resource to fetch. * @param Sid The Twilio-provided string that uniquely identifies the SipDomain resource to fetch. * @return ApiV2010AccountSipSipDomain - */ -func (c *DefaultApiService) FetchSipDomain(AccountSid string, Sid string) (*ApiV2010AccountSipSipDomain, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{Sid}.json" +*/ +func (c *DefaultApiService) FetchSipDomain(AccountSid string, Sid string, ) (*ApiV2010AccountSipSipDomain, error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ApiV2010AccountSipSipDomain{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountSipSipDomain{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -4459,28 +4599,30 @@ func (c *DefaultApiService) FetchSipDomain(AccountSid string, Sid string) (*ApiV * @param AccountSid The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. * @param Sid A 34 character string that uniquely identifies the resource to fetch. * @return ApiV2010AccountSipSipIpAccessControlList - */ -func (c *DefaultApiService) FetchSipIpAccessControlList(AccountSid string, Sid string) (*ApiV2010AccountSipSipIpAccessControlList, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists/{Sid}.json" +*/ +func (c *DefaultApiService) FetchSipIpAccessControlList(AccountSid string, Sid string, ) (*ApiV2010AccountSipSipIpAccessControlList, error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ApiV2010AccountSipSipIpAccessControlList{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err + defer resp.Body.Close() + + ps := &ApiV2010AccountSipSipIpAccessControlList{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -4490,29 +4632,31 @@ func (c *DefaultApiService) FetchSipIpAccessControlList(AccountSid string, Sid s * @param DomainSid A 34 character string that uniquely identifies the SIP domain. * @param Sid A 34 character string that uniquely identifies the resource to fetch. * @return ApiV2010AccountSipSipDomainSipIpAccessControlListMapping - */ -func (c *DefaultApiService) FetchSipIpAccessControlListMapping(AccountSid string, DomainSid string, Sid string) (*ApiV2010AccountSipSipDomainSipIpAccessControlListMapping, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/IpAccessControlListMappings/{Sid}.json" +*/ +func (c *DefaultApiService) FetchSipIpAccessControlListMapping(AccountSid string, DomainSid string, Sid string, ) (*ApiV2010AccountSipSipDomainSipIpAccessControlListMapping, error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/IpAccessControlListMappings/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ApiV2010AccountSipSipDomainSipIpAccessControlListMapping{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &ApiV2010AccountSipSipDomainSipIpAccessControlListMapping{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -4522,29 +4666,31 @@ func (c *DefaultApiService) FetchSipIpAccessControlListMapping(AccountSid string * @param IpAccessControlListSid The IpAccessControlList Sid that identifies the IpAddress resources to fetch. * @param Sid A 34 character string that uniquely identifies the IpAddress resource to fetch. * @return ApiV2010AccountSipSipIpAccessControlListSipIpAddress - */ -func (c *DefaultApiService) FetchSipIpAddress(AccountSid string, IpAccessControlListSid string, Sid string) (*ApiV2010AccountSipSipIpAccessControlListSipIpAddress, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists/{IpAccessControlListSid}/IpAddresses/{Sid}.json" +*/ +func (c *DefaultApiService) FetchSipIpAddress(AccountSid string, IpAccessControlListSid string, Sid string, ) (*ApiV2010AccountSipSipIpAccessControlListSipIpAddress, error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists/{IpAccessControlListSid}/IpAddresses/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"IpAccessControlListSid"+"}", IpAccessControlListSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ApiV2010AccountSipSipIpAccessControlListSipIpAddress{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountSipSipIpAccessControlListSipIpAddress{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -4553,28 +4699,30 @@ func (c *DefaultApiService) FetchSipIpAddress(AccountSid string, IpAccessControl * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Transcription resource to fetch. * @param Sid The Twilio-provided string that uniquely identifies the Transcription resource to fetch. * @return ApiV2010AccountTranscription - */ -func (c *DefaultApiService) FetchTranscription(AccountSid string, Sid string) (*ApiV2010AccountTranscription, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Transcriptions/{Sid}.json" +*/ +func (c *DefaultApiService) FetchTranscription(AccountSid string, Sid string, ) (*ApiV2010AccountTranscription, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Transcriptions/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ApiV2010AccountTranscription{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err + defer resp.Body.Close() + + ps := &ApiV2010AccountTranscription{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -4583,35 +4731,36 @@ func (c *DefaultApiService) FetchTranscription(AccountSid string, Sid string) (* * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageTrigger resource to fetch. * @param Sid The Twilio-provided string that uniquely identifies the UsageTrigger resource to fetch. * @return ApiV2010AccountUsageUsageTrigger - */ -func (c *DefaultApiService) FetchUsageTrigger(AccountSid string, Sid string) (*ApiV2010AccountUsageUsageTrigger, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Usage/Triggers/{Sid}.json" +*/ +func (c *DefaultApiService) FetchUsageTrigger(AccountSid string, Sid string, ) (*ApiV2010AccountUsageUsageTrigger, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Usage/Triggers/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ApiV2010AccountUsageUsageTrigger{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err -} + defer resp.Body.Close() + ps := &ApiV2010AccountUsageUsageTrigger{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} // ListAccountParams Optional parameters for the method 'ListAccount' type ListAccountParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` - Status *string `json:"Status,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + Status *string `json:"Status,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -4622,44 +4771,44 @@ type ListAccountParams struct { * @param "Status" (string) - Only return Account resources with the given status. Can be `closed`, `suspended` or `active`. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListAccountResponse - */ +*/ func (c *DefaultApiService) ListAccount(params *ListAccountParams) (*ListAccountResponse, error) { - path := "/2010-04-01/Accounts.json" + path := "/2010-04-01/Accounts.json" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListAccountResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListAccountResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListAddressParams Optional parameters for the method 'ListAddress' type ListAddressParams struct { CustomerName *string `json:"CustomerName,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` - IsoCountry *string `json:"IsoCountry,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + IsoCountry *string `json:"IsoCountry,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -4671,46 +4820,46 @@ type ListAddressParams struct { * @param "IsoCountry" (string) - The ISO country code of the Address resources to read. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListAddressResponse - */ +*/ func (c *DefaultApiService) ListAddress(AccountSid string, params *ListAddressParams) (*ListAddressResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Addresses.json" + path := "/2010-04-01/Accounts/{AccountSid}/Addresses.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.CustomerName != nil { - data.Set("CustomerName", *params.CustomerName) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.IsoCountry != nil { - data.Set("IsoCountry", *params.IsoCountry) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.CustomerName != nil { + data.Set("CustomerName", *params.CustomerName) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.IsoCountry != nil { + data.Set("IsoCountry", *params.IsoCountry) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListAddressResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListAddressResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListApplicationParams Optional parameters for the method 'ListApplication' type ListApplicationParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -4721,36 +4870,36 @@ type ListApplicationParams struct { * @param "FriendlyName" (string) - The string that identifies the Application resources to read. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListApplicationResponse - */ +*/ func (c *DefaultApiService) ListApplication(AccountSid string, params *ListApplicationParams) (*ListApplicationResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Applications.json" + path := "/2010-04-01/Accounts/{AccountSid}/Applications.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListApplicationResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListApplicationResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListAuthorizedConnectAppParams Optional parameters for the method 'ListAuthorizedConnectApp' type ListAuthorizedConnectAppParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -4763,33 +4912,33 @@ type ListAuthorizedConnectAppParams struct { * @param optional nil or *ListAuthorizedConnectAppParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListAuthorizedConnectAppResponse - */ +*/ func (c *DefaultApiService) ListAuthorizedConnectApp(AccountSid string, params *ListAuthorizedConnectAppParams) (*ListAuthorizedConnectAppResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/AuthorizedConnectApps.json" + path := "/2010-04-01/Accounts/{AccountSid}/AuthorizedConnectApps.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListAuthorizedConnectAppResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListAuthorizedConnectAppResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListAvailablePhoneNumberCountryParams Optional parameters for the method 'ListAvailablePhoneNumberCountry' type ListAvailablePhoneNumberCountryParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -4801,54 +4950,54 @@ type ListAvailablePhoneNumberCountryParams struct { * @param optional nil or *ListAvailablePhoneNumberCountryParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListAvailablePhoneNumberCountryResponse - */ +*/ func (c *DefaultApiService) ListAvailablePhoneNumberCountry(AccountSid string, params *ListAvailablePhoneNumberCountryParams) (*ListAvailablePhoneNumberCountryResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers.json" + path := "/2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListAvailablePhoneNumberCountryResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListAvailablePhoneNumberCountryResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListAvailablePhoneNumberLocalParams Optional parameters for the method 'ListAvailablePhoneNumberLocal' type ListAvailablePhoneNumberLocalParams struct { - AreaCode *int32 `json:"AreaCode,omitempty"` - Contains *string `json:"Contains,omitempty"` - SmsEnabled *bool `json:"SmsEnabled,omitempty"` - MmsEnabled *bool `json:"MmsEnabled,omitempty"` - VoiceEnabled *bool `json:"VoiceEnabled,omitempty"` - ExcludeAllAddressRequired *bool `json:"ExcludeAllAddressRequired,omitempty"` - ExcludeLocalAddressRequired *bool `json:"ExcludeLocalAddressRequired,omitempty"` - ExcludeForeignAddressRequired *bool `json:"ExcludeForeignAddressRequired,omitempty"` - Beta *bool `json:"Beta,omitempty"` - NearNumber *string `json:"NearNumber,omitempty"` - NearLatLong *string `json:"NearLatLong,omitempty"` - Distance *int32 `json:"Distance,omitempty"` - InPostalCode *string `json:"InPostalCode,omitempty"` - InRegion *string `json:"InRegion,omitempty"` - InRateCenter *string `json:"InRateCenter,omitempty"` - InLata *string `json:"InLata,omitempty"` - InLocality *string `json:"InLocality,omitempty"` - FaxEnabled *bool `json:"FaxEnabled,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + AreaCode *int32 `json:"AreaCode,omitempty"` + Contains *string `json:"Contains,omitempty"` + SmsEnabled *bool `json:"SmsEnabled,omitempty"` + MmsEnabled *bool `json:"MmsEnabled,omitempty"` + VoiceEnabled *bool `json:"VoiceEnabled,omitempty"` + ExcludeAllAddressRequired *bool `json:"ExcludeAllAddressRequired,omitempty"` + ExcludeLocalAddressRequired *bool `json:"ExcludeLocalAddressRequired,omitempty"` + ExcludeForeignAddressRequired *bool `json:"ExcludeForeignAddressRequired,omitempty"` + Beta *bool `json:"Beta,omitempty"` + NearNumber *string `json:"NearNumber,omitempty"` + NearLatLong *string `json:"NearLatLong,omitempty"` + Distance *int32 `json:"Distance,omitempty"` + InPostalCode *string `json:"InPostalCode,omitempty"` + InRegion *string `json:"InRegion,omitempty"` + InRateCenter *string `json:"InRateCenter,omitempty"` + InLata *string `json:"InLata,omitempty"` + InLocality *string `json:"InLocality,omitempty"` + FaxEnabled *bool `json:"FaxEnabled,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -4876,109 +5025,109 @@ type ListAvailablePhoneNumberLocalParams struct { * @param "FaxEnabled" (bool) - Whether the phone numbers can receive faxes. Can be: `true` or `false`. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListAvailablePhoneNumberLocalResponse - */ +*/ func (c *DefaultApiService) ListAvailablePhoneNumberLocal(AccountSid string, CountryCode string, params *ListAvailablePhoneNumberLocalParams) (*ListAvailablePhoneNumberLocalResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}/Local.json" + path := "/2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}/Local.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"CountryCode"+"}", CountryCode, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.AreaCode != nil { - data.Set("AreaCode", fmt.Sprint(*params.AreaCode)) - } - if params != nil && params.Contains != nil { - data.Set("Contains", *params.Contains) - } - if params != nil && params.SmsEnabled != nil { - data.Set("SmsEnabled", fmt.Sprint(*params.SmsEnabled)) - } - if params != nil && params.MmsEnabled != nil { - data.Set("MmsEnabled", fmt.Sprint(*params.MmsEnabled)) - } - if params != nil && params.VoiceEnabled != nil { - data.Set("VoiceEnabled", fmt.Sprint(*params.VoiceEnabled)) - } - if params != nil && params.ExcludeAllAddressRequired != nil { - data.Set("ExcludeAllAddressRequired", fmt.Sprint(*params.ExcludeAllAddressRequired)) - } - if params != nil && params.ExcludeLocalAddressRequired != nil { - data.Set("ExcludeLocalAddressRequired", fmt.Sprint(*params.ExcludeLocalAddressRequired)) - } - if params != nil && params.ExcludeForeignAddressRequired != nil { - data.Set("ExcludeForeignAddressRequired", fmt.Sprint(*params.ExcludeForeignAddressRequired)) - } - if params != nil && params.Beta != nil { - data.Set("Beta", fmt.Sprint(*params.Beta)) - } - if params != nil && params.NearNumber != nil { - data.Set("NearNumber", *params.NearNumber) - } - if params != nil && params.NearLatLong != nil { - data.Set("NearLatLong", *params.NearLatLong) - } - if params != nil && params.Distance != nil { - data.Set("Distance", fmt.Sprint(*params.Distance)) - } - if params != nil && params.InPostalCode != nil { - data.Set("InPostalCode", *params.InPostalCode) - } - if params != nil && params.InRegion != nil { - data.Set("InRegion", *params.InRegion) - } - if params != nil && params.InRateCenter != nil { - data.Set("InRateCenter", *params.InRateCenter) - } - if params != nil && params.InLata != nil { - data.Set("InLata", *params.InLata) - } - if params != nil && params.InLocality != nil { - data.Set("InLocality", *params.InLocality) - } - if params != nil && params.FaxEnabled != nil { - data.Set("FaxEnabled", fmt.Sprint(*params.FaxEnabled)) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.AreaCode != nil { + data.Set("AreaCode", fmt.Sprint(*params.AreaCode)) +} + if params != nil && params.Contains != nil { + data.Set("Contains", *params.Contains) +} + if params != nil && params.SmsEnabled != nil { + data.Set("SmsEnabled", fmt.Sprint(*params.SmsEnabled)) +} + if params != nil && params.MmsEnabled != nil { + data.Set("MmsEnabled", fmt.Sprint(*params.MmsEnabled)) +} + if params != nil && params.VoiceEnabled != nil { + data.Set("VoiceEnabled", fmt.Sprint(*params.VoiceEnabled)) +} + if params != nil && params.ExcludeAllAddressRequired != nil { + data.Set("ExcludeAllAddressRequired", fmt.Sprint(*params.ExcludeAllAddressRequired)) +} + if params != nil && params.ExcludeLocalAddressRequired != nil { + data.Set("ExcludeLocalAddressRequired", fmt.Sprint(*params.ExcludeLocalAddressRequired)) +} + if params != nil && params.ExcludeForeignAddressRequired != nil { + data.Set("ExcludeForeignAddressRequired", fmt.Sprint(*params.ExcludeForeignAddressRequired)) +} + if params != nil && params.Beta != nil { + data.Set("Beta", fmt.Sprint(*params.Beta)) +} + if params != nil && params.NearNumber != nil { + data.Set("NearNumber", *params.NearNumber) +} + if params != nil && params.NearLatLong != nil { + data.Set("NearLatLong", *params.NearLatLong) +} + if params != nil && params.Distance != nil { + data.Set("Distance", fmt.Sprint(*params.Distance)) +} + if params != nil && params.InPostalCode != nil { + data.Set("InPostalCode", *params.InPostalCode) +} + if params != nil && params.InRegion != nil { + data.Set("InRegion", *params.InRegion) +} + if params != nil && params.InRateCenter != nil { + data.Set("InRateCenter", *params.InRateCenter) +} + if params != nil && params.InLata != nil { + data.Set("InLata", *params.InLata) +} + if params != nil && params.InLocality != nil { + data.Set("InLocality", *params.InLocality) +} + if params != nil && params.FaxEnabled != nil { + data.Set("FaxEnabled", fmt.Sprint(*params.FaxEnabled)) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListAvailablePhoneNumberLocalResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListAvailablePhoneNumberLocalResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListAvailablePhoneNumberMachineToMachineParams Optional parameters for the method 'ListAvailablePhoneNumberMachineToMachine' type ListAvailablePhoneNumberMachineToMachineParams struct { - AreaCode *int32 `json:"AreaCode,omitempty"` - Contains *string `json:"Contains,omitempty"` - SmsEnabled *bool `json:"SmsEnabled,omitempty"` - MmsEnabled *bool `json:"MmsEnabled,omitempty"` - VoiceEnabled *bool `json:"VoiceEnabled,omitempty"` - ExcludeAllAddressRequired *bool `json:"ExcludeAllAddressRequired,omitempty"` - ExcludeLocalAddressRequired *bool `json:"ExcludeLocalAddressRequired,omitempty"` - ExcludeForeignAddressRequired *bool `json:"ExcludeForeignAddressRequired,omitempty"` - Beta *bool `json:"Beta,omitempty"` - NearNumber *string `json:"NearNumber,omitempty"` - NearLatLong *string `json:"NearLatLong,omitempty"` - Distance *int32 `json:"Distance,omitempty"` - InPostalCode *string `json:"InPostalCode,omitempty"` - InRegion *string `json:"InRegion,omitempty"` - InRateCenter *string `json:"InRateCenter,omitempty"` - InLata *string `json:"InLata,omitempty"` - InLocality *string `json:"InLocality,omitempty"` - FaxEnabled *bool `json:"FaxEnabled,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + AreaCode *int32 `json:"AreaCode,omitempty"` + Contains *string `json:"Contains,omitempty"` + SmsEnabled *bool `json:"SmsEnabled,omitempty"` + MmsEnabled *bool `json:"MmsEnabled,omitempty"` + VoiceEnabled *bool `json:"VoiceEnabled,omitempty"` + ExcludeAllAddressRequired *bool `json:"ExcludeAllAddressRequired,omitempty"` + ExcludeLocalAddressRequired *bool `json:"ExcludeLocalAddressRequired,omitempty"` + ExcludeForeignAddressRequired *bool `json:"ExcludeForeignAddressRequired,omitempty"` + Beta *bool `json:"Beta,omitempty"` + NearNumber *string `json:"NearNumber,omitempty"` + NearLatLong *string `json:"NearLatLong,omitempty"` + Distance *int32 `json:"Distance,omitempty"` + InPostalCode *string `json:"InPostalCode,omitempty"` + InRegion *string `json:"InRegion,omitempty"` + InRateCenter *string `json:"InRateCenter,omitempty"` + InLata *string `json:"InLata,omitempty"` + InLocality *string `json:"InLocality,omitempty"` + FaxEnabled *bool `json:"FaxEnabled,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -5006,109 +5155,109 @@ type ListAvailablePhoneNumberMachineToMachineParams struct { * @param "FaxEnabled" (bool) - Whether the phone numbers can receive faxes. Can be: `true` or `false`. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListAvailablePhoneNumberMachineToMachineResponse - */ +*/ func (c *DefaultApiService) ListAvailablePhoneNumberMachineToMachine(AccountSid string, CountryCode string, params *ListAvailablePhoneNumberMachineToMachineParams) (*ListAvailablePhoneNumberMachineToMachineResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}/MachineToMachine.json" + path := "/2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}/MachineToMachine.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"CountryCode"+"}", CountryCode, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.AreaCode != nil { - data.Set("AreaCode", fmt.Sprint(*params.AreaCode)) - } - if params != nil && params.Contains != nil { - data.Set("Contains", *params.Contains) - } - if params != nil && params.SmsEnabled != nil { - data.Set("SmsEnabled", fmt.Sprint(*params.SmsEnabled)) - } - if params != nil && params.MmsEnabled != nil { - data.Set("MmsEnabled", fmt.Sprint(*params.MmsEnabled)) - } - if params != nil && params.VoiceEnabled != nil { - data.Set("VoiceEnabled", fmt.Sprint(*params.VoiceEnabled)) - } - if params != nil && params.ExcludeAllAddressRequired != nil { - data.Set("ExcludeAllAddressRequired", fmt.Sprint(*params.ExcludeAllAddressRequired)) - } - if params != nil && params.ExcludeLocalAddressRequired != nil { - data.Set("ExcludeLocalAddressRequired", fmt.Sprint(*params.ExcludeLocalAddressRequired)) - } - if params != nil && params.ExcludeForeignAddressRequired != nil { - data.Set("ExcludeForeignAddressRequired", fmt.Sprint(*params.ExcludeForeignAddressRequired)) - } - if params != nil && params.Beta != nil { - data.Set("Beta", fmt.Sprint(*params.Beta)) - } - if params != nil && params.NearNumber != nil { - data.Set("NearNumber", *params.NearNumber) - } - if params != nil && params.NearLatLong != nil { - data.Set("NearLatLong", *params.NearLatLong) - } - if params != nil && params.Distance != nil { - data.Set("Distance", fmt.Sprint(*params.Distance)) - } - if params != nil && params.InPostalCode != nil { - data.Set("InPostalCode", *params.InPostalCode) - } - if params != nil && params.InRegion != nil { - data.Set("InRegion", *params.InRegion) - } - if params != nil && params.InRateCenter != nil { - data.Set("InRateCenter", *params.InRateCenter) - } - if params != nil && params.InLata != nil { - data.Set("InLata", *params.InLata) - } - if params != nil && params.InLocality != nil { - data.Set("InLocality", *params.InLocality) - } - if params != nil && params.FaxEnabled != nil { - data.Set("FaxEnabled", fmt.Sprint(*params.FaxEnabled)) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.AreaCode != nil { + data.Set("AreaCode", fmt.Sprint(*params.AreaCode)) +} + if params != nil && params.Contains != nil { + data.Set("Contains", *params.Contains) +} + if params != nil && params.SmsEnabled != nil { + data.Set("SmsEnabled", fmt.Sprint(*params.SmsEnabled)) +} + if params != nil && params.MmsEnabled != nil { + data.Set("MmsEnabled", fmt.Sprint(*params.MmsEnabled)) +} + if params != nil && params.VoiceEnabled != nil { + data.Set("VoiceEnabled", fmt.Sprint(*params.VoiceEnabled)) +} + if params != nil && params.ExcludeAllAddressRequired != nil { + data.Set("ExcludeAllAddressRequired", fmt.Sprint(*params.ExcludeAllAddressRequired)) +} + if params != nil && params.ExcludeLocalAddressRequired != nil { + data.Set("ExcludeLocalAddressRequired", fmt.Sprint(*params.ExcludeLocalAddressRequired)) +} + if params != nil && params.ExcludeForeignAddressRequired != nil { + data.Set("ExcludeForeignAddressRequired", fmt.Sprint(*params.ExcludeForeignAddressRequired)) +} + if params != nil && params.Beta != nil { + data.Set("Beta", fmt.Sprint(*params.Beta)) +} + if params != nil && params.NearNumber != nil { + data.Set("NearNumber", *params.NearNumber) +} + if params != nil && params.NearLatLong != nil { + data.Set("NearLatLong", *params.NearLatLong) +} + if params != nil && params.Distance != nil { + data.Set("Distance", fmt.Sprint(*params.Distance)) +} + if params != nil && params.InPostalCode != nil { + data.Set("InPostalCode", *params.InPostalCode) +} + if params != nil && params.InRegion != nil { + data.Set("InRegion", *params.InRegion) +} + if params != nil && params.InRateCenter != nil { + data.Set("InRateCenter", *params.InRateCenter) +} + if params != nil && params.InLata != nil { + data.Set("InLata", *params.InLata) +} + if params != nil && params.InLocality != nil { + data.Set("InLocality", *params.InLocality) +} + if params != nil && params.FaxEnabled != nil { + data.Set("FaxEnabled", fmt.Sprint(*params.FaxEnabled)) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListAvailablePhoneNumberMachineToMachineResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListAvailablePhoneNumberMachineToMachineResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListAvailablePhoneNumberMobileParams Optional parameters for the method 'ListAvailablePhoneNumberMobile' type ListAvailablePhoneNumberMobileParams struct { - AreaCode *int32 `json:"AreaCode,omitempty"` - Contains *string `json:"Contains,omitempty"` - SmsEnabled *bool `json:"SmsEnabled,omitempty"` - MmsEnabled *bool `json:"MmsEnabled,omitempty"` - VoiceEnabled *bool `json:"VoiceEnabled,omitempty"` - ExcludeAllAddressRequired *bool `json:"ExcludeAllAddressRequired,omitempty"` - ExcludeLocalAddressRequired *bool `json:"ExcludeLocalAddressRequired,omitempty"` - ExcludeForeignAddressRequired *bool `json:"ExcludeForeignAddressRequired,omitempty"` - Beta *bool `json:"Beta,omitempty"` - NearNumber *string `json:"NearNumber,omitempty"` - NearLatLong *string `json:"NearLatLong,omitempty"` - Distance *int32 `json:"Distance,omitempty"` - InPostalCode *string `json:"InPostalCode,omitempty"` - InRegion *string `json:"InRegion,omitempty"` - InRateCenter *string `json:"InRateCenter,omitempty"` - InLata *string `json:"InLata,omitempty"` - InLocality *string `json:"InLocality,omitempty"` - FaxEnabled *bool `json:"FaxEnabled,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + AreaCode *int32 `json:"AreaCode,omitempty"` + Contains *string `json:"Contains,omitempty"` + SmsEnabled *bool `json:"SmsEnabled,omitempty"` + MmsEnabled *bool `json:"MmsEnabled,omitempty"` + VoiceEnabled *bool `json:"VoiceEnabled,omitempty"` + ExcludeAllAddressRequired *bool `json:"ExcludeAllAddressRequired,omitempty"` + ExcludeLocalAddressRequired *bool `json:"ExcludeLocalAddressRequired,omitempty"` + ExcludeForeignAddressRequired *bool `json:"ExcludeForeignAddressRequired,omitempty"` + Beta *bool `json:"Beta,omitempty"` + NearNumber *string `json:"NearNumber,omitempty"` + NearLatLong *string `json:"NearLatLong,omitempty"` + Distance *int32 `json:"Distance,omitempty"` + InPostalCode *string `json:"InPostalCode,omitempty"` + InRegion *string `json:"InRegion,omitempty"` + InRateCenter *string `json:"InRateCenter,omitempty"` + InLata *string `json:"InLata,omitempty"` + InLocality *string `json:"InLocality,omitempty"` + FaxEnabled *bool `json:"FaxEnabled,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -5136,109 +5285,109 @@ type ListAvailablePhoneNumberMobileParams struct { * @param "FaxEnabled" (bool) - Whether the phone numbers can receive faxes. Can be: `true` or `false`. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListAvailablePhoneNumberMobileResponse - */ +*/ func (c *DefaultApiService) ListAvailablePhoneNumberMobile(AccountSid string, CountryCode string, params *ListAvailablePhoneNumberMobileParams) (*ListAvailablePhoneNumberMobileResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}/Mobile.json" + path := "/2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}/Mobile.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"CountryCode"+"}", CountryCode, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.AreaCode != nil { - data.Set("AreaCode", fmt.Sprint(*params.AreaCode)) - } - if params != nil && params.Contains != nil { - data.Set("Contains", *params.Contains) - } - if params != nil && params.SmsEnabled != nil { - data.Set("SmsEnabled", fmt.Sprint(*params.SmsEnabled)) - } - if params != nil && params.MmsEnabled != nil { - data.Set("MmsEnabled", fmt.Sprint(*params.MmsEnabled)) - } - if params != nil && params.VoiceEnabled != nil { - data.Set("VoiceEnabled", fmt.Sprint(*params.VoiceEnabled)) - } - if params != nil && params.ExcludeAllAddressRequired != nil { - data.Set("ExcludeAllAddressRequired", fmt.Sprint(*params.ExcludeAllAddressRequired)) - } - if params != nil && params.ExcludeLocalAddressRequired != nil { - data.Set("ExcludeLocalAddressRequired", fmt.Sprint(*params.ExcludeLocalAddressRequired)) - } - if params != nil && params.ExcludeForeignAddressRequired != nil { - data.Set("ExcludeForeignAddressRequired", fmt.Sprint(*params.ExcludeForeignAddressRequired)) - } - if params != nil && params.Beta != nil { - data.Set("Beta", fmt.Sprint(*params.Beta)) - } - if params != nil && params.NearNumber != nil { - data.Set("NearNumber", *params.NearNumber) - } - if params != nil && params.NearLatLong != nil { - data.Set("NearLatLong", *params.NearLatLong) - } - if params != nil && params.Distance != nil { - data.Set("Distance", fmt.Sprint(*params.Distance)) - } - if params != nil && params.InPostalCode != nil { - data.Set("InPostalCode", *params.InPostalCode) - } - if params != nil && params.InRegion != nil { - data.Set("InRegion", *params.InRegion) - } - if params != nil && params.InRateCenter != nil { - data.Set("InRateCenter", *params.InRateCenter) - } - if params != nil && params.InLata != nil { - data.Set("InLata", *params.InLata) - } - if params != nil && params.InLocality != nil { - data.Set("InLocality", *params.InLocality) - } - if params != nil && params.FaxEnabled != nil { - data.Set("FaxEnabled", fmt.Sprint(*params.FaxEnabled)) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.AreaCode != nil { + data.Set("AreaCode", fmt.Sprint(*params.AreaCode)) +} + if params != nil && params.Contains != nil { + data.Set("Contains", *params.Contains) +} + if params != nil && params.SmsEnabled != nil { + data.Set("SmsEnabled", fmt.Sprint(*params.SmsEnabled)) +} + if params != nil && params.MmsEnabled != nil { + data.Set("MmsEnabled", fmt.Sprint(*params.MmsEnabled)) +} + if params != nil && params.VoiceEnabled != nil { + data.Set("VoiceEnabled", fmt.Sprint(*params.VoiceEnabled)) +} + if params != nil && params.ExcludeAllAddressRequired != nil { + data.Set("ExcludeAllAddressRequired", fmt.Sprint(*params.ExcludeAllAddressRequired)) +} + if params != nil && params.ExcludeLocalAddressRequired != nil { + data.Set("ExcludeLocalAddressRequired", fmt.Sprint(*params.ExcludeLocalAddressRequired)) +} + if params != nil && params.ExcludeForeignAddressRequired != nil { + data.Set("ExcludeForeignAddressRequired", fmt.Sprint(*params.ExcludeForeignAddressRequired)) +} + if params != nil && params.Beta != nil { + data.Set("Beta", fmt.Sprint(*params.Beta)) +} + if params != nil && params.NearNumber != nil { + data.Set("NearNumber", *params.NearNumber) +} + if params != nil && params.NearLatLong != nil { + data.Set("NearLatLong", *params.NearLatLong) +} + if params != nil && params.Distance != nil { + data.Set("Distance", fmt.Sprint(*params.Distance)) +} + if params != nil && params.InPostalCode != nil { + data.Set("InPostalCode", *params.InPostalCode) +} + if params != nil && params.InRegion != nil { + data.Set("InRegion", *params.InRegion) +} + if params != nil && params.InRateCenter != nil { + data.Set("InRateCenter", *params.InRateCenter) +} + if params != nil && params.InLata != nil { + data.Set("InLata", *params.InLata) +} + if params != nil && params.InLocality != nil { + data.Set("InLocality", *params.InLocality) +} + if params != nil && params.FaxEnabled != nil { + data.Set("FaxEnabled", fmt.Sprint(*params.FaxEnabled)) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListAvailablePhoneNumberMobileResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListAvailablePhoneNumberMobileResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListAvailablePhoneNumberNationalParams Optional parameters for the method 'ListAvailablePhoneNumberNational' type ListAvailablePhoneNumberNationalParams struct { - AreaCode *int32 `json:"AreaCode,omitempty"` - Contains *string `json:"Contains,omitempty"` - SmsEnabled *bool `json:"SmsEnabled,omitempty"` - MmsEnabled *bool `json:"MmsEnabled,omitempty"` - VoiceEnabled *bool `json:"VoiceEnabled,omitempty"` - ExcludeAllAddressRequired *bool `json:"ExcludeAllAddressRequired,omitempty"` - ExcludeLocalAddressRequired *bool `json:"ExcludeLocalAddressRequired,omitempty"` - ExcludeForeignAddressRequired *bool `json:"ExcludeForeignAddressRequired,omitempty"` - Beta *bool `json:"Beta,omitempty"` - NearNumber *string `json:"NearNumber,omitempty"` - NearLatLong *string `json:"NearLatLong,omitempty"` - Distance *int32 `json:"Distance,omitempty"` - InPostalCode *string `json:"InPostalCode,omitempty"` - InRegion *string `json:"InRegion,omitempty"` - InRateCenter *string `json:"InRateCenter,omitempty"` - InLata *string `json:"InLata,omitempty"` - InLocality *string `json:"InLocality,omitempty"` - FaxEnabled *bool `json:"FaxEnabled,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + AreaCode *int32 `json:"AreaCode,omitempty"` + Contains *string `json:"Contains,omitempty"` + SmsEnabled *bool `json:"SmsEnabled,omitempty"` + MmsEnabled *bool `json:"MmsEnabled,omitempty"` + VoiceEnabled *bool `json:"VoiceEnabled,omitempty"` + ExcludeAllAddressRequired *bool `json:"ExcludeAllAddressRequired,omitempty"` + ExcludeLocalAddressRequired *bool `json:"ExcludeLocalAddressRequired,omitempty"` + ExcludeForeignAddressRequired *bool `json:"ExcludeForeignAddressRequired,omitempty"` + Beta *bool `json:"Beta,omitempty"` + NearNumber *string `json:"NearNumber,omitempty"` + NearLatLong *string `json:"NearLatLong,omitempty"` + Distance *int32 `json:"Distance,omitempty"` + InPostalCode *string `json:"InPostalCode,omitempty"` + InRegion *string `json:"InRegion,omitempty"` + InRateCenter *string `json:"InRateCenter,omitempty"` + InLata *string `json:"InLata,omitempty"` + InLocality *string `json:"InLocality,omitempty"` + FaxEnabled *bool `json:"FaxEnabled,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -5266,109 +5415,109 @@ type ListAvailablePhoneNumberNationalParams struct { * @param "FaxEnabled" (bool) - Whether the phone numbers can receive faxes. Can be: `true` or `false`. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListAvailablePhoneNumberNationalResponse - */ +*/ func (c *DefaultApiService) ListAvailablePhoneNumberNational(AccountSid string, CountryCode string, params *ListAvailablePhoneNumberNationalParams) (*ListAvailablePhoneNumberNationalResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}/National.json" + path := "/2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}/National.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"CountryCode"+"}", CountryCode, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.AreaCode != nil { - data.Set("AreaCode", fmt.Sprint(*params.AreaCode)) - } - if params != nil && params.Contains != nil { - data.Set("Contains", *params.Contains) - } - if params != nil && params.SmsEnabled != nil { - data.Set("SmsEnabled", fmt.Sprint(*params.SmsEnabled)) - } - if params != nil && params.MmsEnabled != nil { - data.Set("MmsEnabled", fmt.Sprint(*params.MmsEnabled)) - } - if params != nil && params.VoiceEnabled != nil { - data.Set("VoiceEnabled", fmt.Sprint(*params.VoiceEnabled)) - } - if params != nil && params.ExcludeAllAddressRequired != nil { - data.Set("ExcludeAllAddressRequired", fmt.Sprint(*params.ExcludeAllAddressRequired)) - } - if params != nil && params.ExcludeLocalAddressRequired != nil { - data.Set("ExcludeLocalAddressRequired", fmt.Sprint(*params.ExcludeLocalAddressRequired)) - } - if params != nil && params.ExcludeForeignAddressRequired != nil { - data.Set("ExcludeForeignAddressRequired", fmt.Sprint(*params.ExcludeForeignAddressRequired)) - } - if params != nil && params.Beta != nil { - data.Set("Beta", fmt.Sprint(*params.Beta)) - } - if params != nil && params.NearNumber != nil { - data.Set("NearNumber", *params.NearNumber) - } - if params != nil && params.NearLatLong != nil { - data.Set("NearLatLong", *params.NearLatLong) - } - if params != nil && params.Distance != nil { - data.Set("Distance", fmt.Sprint(*params.Distance)) - } - if params != nil && params.InPostalCode != nil { - data.Set("InPostalCode", *params.InPostalCode) - } - if params != nil && params.InRegion != nil { - data.Set("InRegion", *params.InRegion) - } - if params != nil && params.InRateCenter != nil { - data.Set("InRateCenter", *params.InRateCenter) - } - if params != nil && params.InLata != nil { - data.Set("InLata", *params.InLata) - } - if params != nil && params.InLocality != nil { - data.Set("InLocality", *params.InLocality) - } - if params != nil && params.FaxEnabled != nil { - data.Set("FaxEnabled", fmt.Sprint(*params.FaxEnabled)) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.AreaCode != nil { + data.Set("AreaCode", fmt.Sprint(*params.AreaCode)) +} + if params != nil && params.Contains != nil { + data.Set("Contains", *params.Contains) +} + if params != nil && params.SmsEnabled != nil { + data.Set("SmsEnabled", fmt.Sprint(*params.SmsEnabled)) +} + if params != nil && params.MmsEnabled != nil { + data.Set("MmsEnabled", fmt.Sprint(*params.MmsEnabled)) +} + if params != nil && params.VoiceEnabled != nil { + data.Set("VoiceEnabled", fmt.Sprint(*params.VoiceEnabled)) +} + if params != nil && params.ExcludeAllAddressRequired != nil { + data.Set("ExcludeAllAddressRequired", fmt.Sprint(*params.ExcludeAllAddressRequired)) +} + if params != nil && params.ExcludeLocalAddressRequired != nil { + data.Set("ExcludeLocalAddressRequired", fmt.Sprint(*params.ExcludeLocalAddressRequired)) +} + if params != nil && params.ExcludeForeignAddressRequired != nil { + data.Set("ExcludeForeignAddressRequired", fmt.Sprint(*params.ExcludeForeignAddressRequired)) +} + if params != nil && params.Beta != nil { + data.Set("Beta", fmt.Sprint(*params.Beta)) +} + if params != nil && params.NearNumber != nil { + data.Set("NearNumber", *params.NearNumber) +} + if params != nil && params.NearLatLong != nil { + data.Set("NearLatLong", *params.NearLatLong) +} + if params != nil && params.Distance != nil { + data.Set("Distance", fmt.Sprint(*params.Distance)) +} + if params != nil && params.InPostalCode != nil { + data.Set("InPostalCode", *params.InPostalCode) +} + if params != nil && params.InRegion != nil { + data.Set("InRegion", *params.InRegion) +} + if params != nil && params.InRateCenter != nil { + data.Set("InRateCenter", *params.InRateCenter) +} + if params != nil && params.InLata != nil { + data.Set("InLata", *params.InLata) +} + if params != nil && params.InLocality != nil { + data.Set("InLocality", *params.InLocality) +} + if params != nil && params.FaxEnabled != nil { + data.Set("FaxEnabled", fmt.Sprint(*params.FaxEnabled)) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListAvailablePhoneNumberNationalResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListAvailablePhoneNumberNationalResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListAvailablePhoneNumberSharedCostParams Optional parameters for the method 'ListAvailablePhoneNumberSharedCost' type ListAvailablePhoneNumberSharedCostParams struct { - AreaCode *int32 `json:"AreaCode,omitempty"` - Contains *string `json:"Contains,omitempty"` - SmsEnabled *bool `json:"SmsEnabled,omitempty"` - MmsEnabled *bool `json:"MmsEnabled,omitempty"` - VoiceEnabled *bool `json:"VoiceEnabled,omitempty"` - ExcludeAllAddressRequired *bool `json:"ExcludeAllAddressRequired,omitempty"` - ExcludeLocalAddressRequired *bool `json:"ExcludeLocalAddressRequired,omitempty"` - ExcludeForeignAddressRequired *bool `json:"ExcludeForeignAddressRequired,omitempty"` - Beta *bool `json:"Beta,omitempty"` - NearNumber *string `json:"NearNumber,omitempty"` - NearLatLong *string `json:"NearLatLong,omitempty"` - Distance *int32 `json:"Distance,omitempty"` - InPostalCode *string `json:"InPostalCode,omitempty"` - InRegion *string `json:"InRegion,omitempty"` - InRateCenter *string `json:"InRateCenter,omitempty"` - InLata *string `json:"InLata,omitempty"` - InLocality *string `json:"InLocality,omitempty"` - FaxEnabled *bool `json:"FaxEnabled,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + AreaCode *int32 `json:"AreaCode,omitempty"` + Contains *string `json:"Contains,omitempty"` + SmsEnabled *bool `json:"SmsEnabled,omitempty"` + MmsEnabled *bool `json:"MmsEnabled,omitempty"` + VoiceEnabled *bool `json:"VoiceEnabled,omitempty"` + ExcludeAllAddressRequired *bool `json:"ExcludeAllAddressRequired,omitempty"` + ExcludeLocalAddressRequired *bool `json:"ExcludeLocalAddressRequired,omitempty"` + ExcludeForeignAddressRequired *bool `json:"ExcludeForeignAddressRequired,omitempty"` + Beta *bool `json:"Beta,omitempty"` + NearNumber *string `json:"NearNumber,omitempty"` + NearLatLong *string `json:"NearLatLong,omitempty"` + Distance *int32 `json:"Distance,omitempty"` + InPostalCode *string `json:"InPostalCode,omitempty"` + InRegion *string `json:"InRegion,omitempty"` + InRateCenter *string `json:"InRateCenter,omitempty"` + InLata *string `json:"InLata,omitempty"` + InLocality *string `json:"InLocality,omitempty"` + FaxEnabled *bool `json:"FaxEnabled,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -5396,109 +5545,109 @@ type ListAvailablePhoneNumberSharedCostParams struct { * @param "FaxEnabled" (bool) - Whether the phone numbers can receive faxes. Can be: `true` or `false`. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListAvailablePhoneNumberSharedCostResponse - */ +*/ func (c *DefaultApiService) ListAvailablePhoneNumberSharedCost(AccountSid string, CountryCode string, params *ListAvailablePhoneNumberSharedCostParams) (*ListAvailablePhoneNumberSharedCostResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}/SharedCost.json" + path := "/2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}/SharedCost.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"CountryCode"+"}", CountryCode, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.AreaCode != nil { - data.Set("AreaCode", fmt.Sprint(*params.AreaCode)) - } - if params != nil && params.Contains != nil { - data.Set("Contains", *params.Contains) - } - if params != nil && params.SmsEnabled != nil { - data.Set("SmsEnabled", fmt.Sprint(*params.SmsEnabled)) - } - if params != nil && params.MmsEnabled != nil { - data.Set("MmsEnabled", fmt.Sprint(*params.MmsEnabled)) - } - if params != nil && params.VoiceEnabled != nil { - data.Set("VoiceEnabled", fmt.Sprint(*params.VoiceEnabled)) - } - if params != nil && params.ExcludeAllAddressRequired != nil { - data.Set("ExcludeAllAddressRequired", fmt.Sprint(*params.ExcludeAllAddressRequired)) - } - if params != nil && params.ExcludeLocalAddressRequired != nil { - data.Set("ExcludeLocalAddressRequired", fmt.Sprint(*params.ExcludeLocalAddressRequired)) - } - if params != nil && params.ExcludeForeignAddressRequired != nil { - data.Set("ExcludeForeignAddressRequired", fmt.Sprint(*params.ExcludeForeignAddressRequired)) - } - if params != nil && params.Beta != nil { - data.Set("Beta", fmt.Sprint(*params.Beta)) - } - if params != nil && params.NearNumber != nil { - data.Set("NearNumber", *params.NearNumber) - } - if params != nil && params.NearLatLong != nil { - data.Set("NearLatLong", *params.NearLatLong) - } - if params != nil && params.Distance != nil { - data.Set("Distance", fmt.Sprint(*params.Distance)) - } - if params != nil && params.InPostalCode != nil { - data.Set("InPostalCode", *params.InPostalCode) - } - if params != nil && params.InRegion != nil { - data.Set("InRegion", *params.InRegion) - } - if params != nil && params.InRateCenter != nil { - data.Set("InRateCenter", *params.InRateCenter) - } - if params != nil && params.InLata != nil { - data.Set("InLata", *params.InLata) - } - if params != nil && params.InLocality != nil { - data.Set("InLocality", *params.InLocality) - } - if params != nil && params.FaxEnabled != nil { - data.Set("FaxEnabled", fmt.Sprint(*params.FaxEnabled)) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.AreaCode != nil { + data.Set("AreaCode", fmt.Sprint(*params.AreaCode)) +} + if params != nil && params.Contains != nil { + data.Set("Contains", *params.Contains) +} + if params != nil && params.SmsEnabled != nil { + data.Set("SmsEnabled", fmt.Sprint(*params.SmsEnabled)) +} + if params != nil && params.MmsEnabled != nil { + data.Set("MmsEnabled", fmt.Sprint(*params.MmsEnabled)) +} + if params != nil && params.VoiceEnabled != nil { + data.Set("VoiceEnabled", fmt.Sprint(*params.VoiceEnabled)) +} + if params != nil && params.ExcludeAllAddressRequired != nil { + data.Set("ExcludeAllAddressRequired", fmt.Sprint(*params.ExcludeAllAddressRequired)) +} + if params != nil && params.ExcludeLocalAddressRequired != nil { + data.Set("ExcludeLocalAddressRequired", fmt.Sprint(*params.ExcludeLocalAddressRequired)) +} + if params != nil && params.ExcludeForeignAddressRequired != nil { + data.Set("ExcludeForeignAddressRequired", fmt.Sprint(*params.ExcludeForeignAddressRequired)) +} + if params != nil && params.Beta != nil { + data.Set("Beta", fmt.Sprint(*params.Beta)) +} + if params != nil && params.NearNumber != nil { + data.Set("NearNumber", *params.NearNumber) +} + if params != nil && params.NearLatLong != nil { + data.Set("NearLatLong", *params.NearLatLong) +} + if params != nil && params.Distance != nil { + data.Set("Distance", fmt.Sprint(*params.Distance)) +} + if params != nil && params.InPostalCode != nil { + data.Set("InPostalCode", *params.InPostalCode) +} + if params != nil && params.InRegion != nil { + data.Set("InRegion", *params.InRegion) +} + if params != nil && params.InRateCenter != nil { + data.Set("InRateCenter", *params.InRateCenter) +} + if params != nil && params.InLata != nil { + data.Set("InLata", *params.InLata) +} + if params != nil && params.InLocality != nil { + data.Set("InLocality", *params.InLocality) +} + if params != nil && params.FaxEnabled != nil { + data.Set("FaxEnabled", fmt.Sprint(*params.FaxEnabled)) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListAvailablePhoneNumberSharedCostResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListAvailablePhoneNumberSharedCostResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListAvailablePhoneNumberTollFreeParams Optional parameters for the method 'ListAvailablePhoneNumberTollFree' type ListAvailablePhoneNumberTollFreeParams struct { - AreaCode *int32 `json:"AreaCode,omitempty"` - Contains *string `json:"Contains,omitempty"` - SmsEnabled *bool `json:"SmsEnabled,omitempty"` - MmsEnabled *bool `json:"MmsEnabled,omitempty"` - VoiceEnabled *bool `json:"VoiceEnabled,omitempty"` - ExcludeAllAddressRequired *bool `json:"ExcludeAllAddressRequired,omitempty"` - ExcludeLocalAddressRequired *bool `json:"ExcludeLocalAddressRequired,omitempty"` - ExcludeForeignAddressRequired *bool `json:"ExcludeForeignAddressRequired,omitempty"` - Beta *bool `json:"Beta,omitempty"` - NearNumber *string `json:"NearNumber,omitempty"` - NearLatLong *string `json:"NearLatLong,omitempty"` - Distance *int32 `json:"Distance,omitempty"` - InPostalCode *string `json:"InPostalCode,omitempty"` - InRegion *string `json:"InRegion,omitempty"` - InRateCenter *string `json:"InRateCenter,omitempty"` - InLata *string `json:"InLata,omitempty"` - InLocality *string `json:"InLocality,omitempty"` - FaxEnabled *bool `json:"FaxEnabled,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + AreaCode *int32 `json:"AreaCode,omitempty"` + Contains *string `json:"Contains,omitempty"` + SmsEnabled *bool `json:"SmsEnabled,omitempty"` + MmsEnabled *bool `json:"MmsEnabled,omitempty"` + VoiceEnabled *bool `json:"VoiceEnabled,omitempty"` + ExcludeAllAddressRequired *bool `json:"ExcludeAllAddressRequired,omitempty"` + ExcludeLocalAddressRequired *bool `json:"ExcludeLocalAddressRequired,omitempty"` + ExcludeForeignAddressRequired *bool `json:"ExcludeForeignAddressRequired,omitempty"` + Beta *bool `json:"Beta,omitempty"` + NearNumber *string `json:"NearNumber,omitempty"` + NearLatLong *string `json:"NearLatLong,omitempty"` + Distance *int32 `json:"Distance,omitempty"` + InPostalCode *string `json:"InPostalCode,omitempty"` + InRegion *string `json:"InRegion,omitempty"` + InRateCenter *string `json:"InRateCenter,omitempty"` + InLata *string `json:"InLata,omitempty"` + InLocality *string `json:"InLocality,omitempty"` + FaxEnabled *bool `json:"FaxEnabled,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -5526,109 +5675,109 @@ type ListAvailablePhoneNumberTollFreeParams struct { * @param "FaxEnabled" (bool) - Whether the phone numbers can receive faxes. Can be: `true` or `false`. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListAvailablePhoneNumberTollFreeResponse - */ +*/ func (c *DefaultApiService) ListAvailablePhoneNumberTollFree(AccountSid string, CountryCode string, params *ListAvailablePhoneNumberTollFreeParams) (*ListAvailablePhoneNumberTollFreeResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}/TollFree.json" + path := "/2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}/TollFree.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"CountryCode"+"}", CountryCode, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.AreaCode != nil { - data.Set("AreaCode", fmt.Sprint(*params.AreaCode)) - } - if params != nil && params.Contains != nil { - data.Set("Contains", *params.Contains) - } - if params != nil && params.SmsEnabled != nil { - data.Set("SmsEnabled", fmt.Sprint(*params.SmsEnabled)) - } - if params != nil && params.MmsEnabled != nil { - data.Set("MmsEnabled", fmt.Sprint(*params.MmsEnabled)) - } - if params != nil && params.VoiceEnabled != nil { - data.Set("VoiceEnabled", fmt.Sprint(*params.VoiceEnabled)) - } - if params != nil && params.ExcludeAllAddressRequired != nil { - data.Set("ExcludeAllAddressRequired", fmt.Sprint(*params.ExcludeAllAddressRequired)) - } - if params != nil && params.ExcludeLocalAddressRequired != nil { - data.Set("ExcludeLocalAddressRequired", fmt.Sprint(*params.ExcludeLocalAddressRequired)) - } - if params != nil && params.ExcludeForeignAddressRequired != nil { - data.Set("ExcludeForeignAddressRequired", fmt.Sprint(*params.ExcludeForeignAddressRequired)) - } - if params != nil && params.Beta != nil { - data.Set("Beta", fmt.Sprint(*params.Beta)) - } - if params != nil && params.NearNumber != nil { - data.Set("NearNumber", *params.NearNumber) - } - if params != nil && params.NearLatLong != nil { - data.Set("NearLatLong", *params.NearLatLong) - } - if params != nil && params.Distance != nil { - data.Set("Distance", fmt.Sprint(*params.Distance)) - } - if params != nil && params.InPostalCode != nil { - data.Set("InPostalCode", *params.InPostalCode) - } - if params != nil && params.InRegion != nil { - data.Set("InRegion", *params.InRegion) - } - if params != nil && params.InRateCenter != nil { - data.Set("InRateCenter", *params.InRateCenter) - } - if params != nil && params.InLata != nil { - data.Set("InLata", *params.InLata) - } - if params != nil && params.InLocality != nil { - data.Set("InLocality", *params.InLocality) - } - if params != nil && params.FaxEnabled != nil { - data.Set("FaxEnabled", fmt.Sprint(*params.FaxEnabled)) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.AreaCode != nil { + data.Set("AreaCode", fmt.Sprint(*params.AreaCode)) +} + if params != nil && params.Contains != nil { + data.Set("Contains", *params.Contains) +} + if params != nil && params.SmsEnabled != nil { + data.Set("SmsEnabled", fmt.Sprint(*params.SmsEnabled)) +} + if params != nil && params.MmsEnabled != nil { + data.Set("MmsEnabled", fmt.Sprint(*params.MmsEnabled)) +} + if params != nil && params.VoiceEnabled != nil { + data.Set("VoiceEnabled", fmt.Sprint(*params.VoiceEnabled)) +} + if params != nil && params.ExcludeAllAddressRequired != nil { + data.Set("ExcludeAllAddressRequired", fmt.Sprint(*params.ExcludeAllAddressRequired)) +} + if params != nil && params.ExcludeLocalAddressRequired != nil { + data.Set("ExcludeLocalAddressRequired", fmt.Sprint(*params.ExcludeLocalAddressRequired)) +} + if params != nil && params.ExcludeForeignAddressRequired != nil { + data.Set("ExcludeForeignAddressRequired", fmt.Sprint(*params.ExcludeForeignAddressRequired)) +} + if params != nil && params.Beta != nil { + data.Set("Beta", fmt.Sprint(*params.Beta)) +} + if params != nil && params.NearNumber != nil { + data.Set("NearNumber", *params.NearNumber) +} + if params != nil && params.NearLatLong != nil { + data.Set("NearLatLong", *params.NearLatLong) +} + if params != nil && params.Distance != nil { + data.Set("Distance", fmt.Sprint(*params.Distance)) +} + if params != nil && params.InPostalCode != nil { + data.Set("InPostalCode", *params.InPostalCode) +} + if params != nil && params.InRegion != nil { + data.Set("InRegion", *params.InRegion) +} + if params != nil && params.InRateCenter != nil { + data.Set("InRateCenter", *params.InRateCenter) +} + if params != nil && params.InLata != nil { + data.Set("InLata", *params.InLata) +} + if params != nil && params.InLocality != nil { + data.Set("InLocality", *params.InLocality) +} + if params != nil && params.FaxEnabled != nil { + data.Set("FaxEnabled", fmt.Sprint(*params.FaxEnabled)) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListAvailablePhoneNumberTollFreeResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListAvailablePhoneNumberTollFreeResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListAvailablePhoneNumberVoipParams Optional parameters for the method 'ListAvailablePhoneNumberVoip' type ListAvailablePhoneNumberVoipParams struct { - AreaCode *int32 `json:"AreaCode,omitempty"` - Contains *string `json:"Contains,omitempty"` - SmsEnabled *bool `json:"SmsEnabled,omitempty"` - MmsEnabled *bool `json:"MmsEnabled,omitempty"` - VoiceEnabled *bool `json:"VoiceEnabled,omitempty"` - ExcludeAllAddressRequired *bool `json:"ExcludeAllAddressRequired,omitempty"` - ExcludeLocalAddressRequired *bool `json:"ExcludeLocalAddressRequired,omitempty"` - ExcludeForeignAddressRequired *bool `json:"ExcludeForeignAddressRequired,omitempty"` - Beta *bool `json:"Beta,omitempty"` - NearNumber *string `json:"NearNumber,omitempty"` - NearLatLong *string `json:"NearLatLong,omitempty"` - Distance *int32 `json:"Distance,omitempty"` - InPostalCode *string `json:"InPostalCode,omitempty"` - InRegion *string `json:"InRegion,omitempty"` - InRateCenter *string `json:"InRateCenter,omitempty"` - InLata *string `json:"InLata,omitempty"` - InLocality *string `json:"InLocality,omitempty"` - FaxEnabled *bool `json:"FaxEnabled,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + AreaCode *int32 `json:"AreaCode,omitempty"` + Contains *string `json:"Contains,omitempty"` + SmsEnabled *bool `json:"SmsEnabled,omitempty"` + MmsEnabled *bool `json:"MmsEnabled,omitempty"` + VoiceEnabled *bool `json:"VoiceEnabled,omitempty"` + ExcludeAllAddressRequired *bool `json:"ExcludeAllAddressRequired,omitempty"` + ExcludeLocalAddressRequired *bool `json:"ExcludeLocalAddressRequired,omitempty"` + ExcludeForeignAddressRequired *bool `json:"ExcludeForeignAddressRequired,omitempty"` + Beta *bool `json:"Beta,omitempty"` + NearNumber *string `json:"NearNumber,omitempty"` + NearLatLong *string `json:"NearLatLong,omitempty"` + Distance *int32 `json:"Distance,omitempty"` + InPostalCode *string `json:"InPostalCode,omitempty"` + InRegion *string `json:"InRegion,omitempty"` + InRateCenter *string `json:"InRateCenter,omitempty"` + InLata *string `json:"InLata,omitempty"` + InLocality *string `json:"InLocality,omitempty"` + FaxEnabled *bool `json:"FaxEnabled,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -5656,101 +5805,101 @@ type ListAvailablePhoneNumberVoipParams struct { * @param "FaxEnabled" (bool) - Whether the phone numbers can receive faxes. Can be: `true` or `false`. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListAvailablePhoneNumberVoipResponse - */ +*/ func (c *DefaultApiService) ListAvailablePhoneNumberVoip(AccountSid string, CountryCode string, params *ListAvailablePhoneNumberVoipParams) (*ListAvailablePhoneNumberVoipResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}/Voip.json" + path := "/2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}/Voip.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"CountryCode"+"}", CountryCode, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.AreaCode != nil { - data.Set("AreaCode", fmt.Sprint(*params.AreaCode)) - } - if params != nil && params.Contains != nil { - data.Set("Contains", *params.Contains) - } - if params != nil && params.SmsEnabled != nil { - data.Set("SmsEnabled", fmt.Sprint(*params.SmsEnabled)) - } - if params != nil && params.MmsEnabled != nil { - data.Set("MmsEnabled", fmt.Sprint(*params.MmsEnabled)) - } - if params != nil && params.VoiceEnabled != nil { - data.Set("VoiceEnabled", fmt.Sprint(*params.VoiceEnabled)) - } - if params != nil && params.ExcludeAllAddressRequired != nil { - data.Set("ExcludeAllAddressRequired", fmt.Sprint(*params.ExcludeAllAddressRequired)) - } - if params != nil && params.ExcludeLocalAddressRequired != nil { - data.Set("ExcludeLocalAddressRequired", fmt.Sprint(*params.ExcludeLocalAddressRequired)) - } - if params != nil && params.ExcludeForeignAddressRequired != nil { - data.Set("ExcludeForeignAddressRequired", fmt.Sprint(*params.ExcludeForeignAddressRequired)) - } - if params != nil && params.Beta != nil { - data.Set("Beta", fmt.Sprint(*params.Beta)) - } - if params != nil && params.NearNumber != nil { - data.Set("NearNumber", *params.NearNumber) - } - if params != nil && params.NearLatLong != nil { - data.Set("NearLatLong", *params.NearLatLong) - } - if params != nil && params.Distance != nil { - data.Set("Distance", fmt.Sprint(*params.Distance)) - } - if params != nil && params.InPostalCode != nil { - data.Set("InPostalCode", *params.InPostalCode) - } - if params != nil && params.InRegion != nil { - data.Set("InRegion", *params.InRegion) - } - if params != nil && params.InRateCenter != nil { - data.Set("InRateCenter", *params.InRateCenter) - } - if params != nil && params.InLata != nil { - data.Set("InLata", *params.InLata) - } - if params != nil && params.InLocality != nil { - data.Set("InLocality", *params.InLocality) - } - if params != nil && params.FaxEnabled != nil { - data.Set("FaxEnabled", fmt.Sprint(*params.FaxEnabled)) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.AreaCode != nil { + data.Set("AreaCode", fmt.Sprint(*params.AreaCode)) +} + if params != nil && params.Contains != nil { + data.Set("Contains", *params.Contains) +} + if params != nil && params.SmsEnabled != nil { + data.Set("SmsEnabled", fmt.Sprint(*params.SmsEnabled)) +} + if params != nil && params.MmsEnabled != nil { + data.Set("MmsEnabled", fmt.Sprint(*params.MmsEnabled)) +} + if params != nil && params.VoiceEnabled != nil { + data.Set("VoiceEnabled", fmt.Sprint(*params.VoiceEnabled)) +} + if params != nil && params.ExcludeAllAddressRequired != nil { + data.Set("ExcludeAllAddressRequired", fmt.Sprint(*params.ExcludeAllAddressRequired)) +} + if params != nil && params.ExcludeLocalAddressRequired != nil { + data.Set("ExcludeLocalAddressRequired", fmt.Sprint(*params.ExcludeLocalAddressRequired)) +} + if params != nil && params.ExcludeForeignAddressRequired != nil { + data.Set("ExcludeForeignAddressRequired", fmt.Sprint(*params.ExcludeForeignAddressRequired)) +} + if params != nil && params.Beta != nil { + data.Set("Beta", fmt.Sprint(*params.Beta)) +} + if params != nil && params.NearNumber != nil { + data.Set("NearNumber", *params.NearNumber) +} + if params != nil && params.NearLatLong != nil { + data.Set("NearLatLong", *params.NearLatLong) +} + if params != nil && params.Distance != nil { + data.Set("Distance", fmt.Sprint(*params.Distance)) +} + if params != nil && params.InPostalCode != nil { + data.Set("InPostalCode", *params.InPostalCode) +} + if params != nil && params.InRegion != nil { + data.Set("InRegion", *params.InRegion) +} + if params != nil && params.InRateCenter != nil { + data.Set("InRateCenter", *params.InRateCenter) +} + if params != nil && params.InLata != nil { + data.Set("InLata", *params.InLata) +} + if params != nil && params.InLocality != nil { + data.Set("InLocality", *params.InLocality) +} + if params != nil && params.FaxEnabled != nil { + data.Set("FaxEnabled", fmt.Sprint(*params.FaxEnabled)) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListAvailablePhoneNumberVoipResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListAvailablePhoneNumberVoipResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListCallParams Optional parameters for the method 'ListCall' type ListCallParams struct { - To *string `json:"To,omitempty"` - From *string `json:"From,omitempty"` - ParentCallSid *string `json:"ParentCallSid,omitempty"` - Status *string `json:"Status,omitempty"` - StartTime *time.Time `json:"StartTime,omitempty"` + To *string `json:"To,omitempty"` + From *string `json:"From,omitempty"` + ParentCallSid *string `json:"ParentCallSid,omitempty"` + Status *string `json:"Status,omitempty"` + StartTime *time.Time `json:"StartTime,omitempty"` StartTimeBefore *time.Time `json:"StartTime<,omitempty"` - StartTimeAfter *time.Time `json:"StartTime>,omitempty"` - EndTime *time.Time `json:"EndTime,omitempty"` - EndTimeBefore *time.Time `json:"EndTime<,omitempty"` - EndTimeAfter *time.Time `json:"EndTime>,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + StartTimeAfter *time.Time `json:"StartTime>,omitempty"` + EndTime *time.Time `json:"EndTime,omitempty"` + EndTimeBefore *time.Time `json:"EndTime<,omitempty"` + EndTimeAfter *time.Time `json:"EndTime>,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -5770,63 +5919,63 @@ type ListCallParams struct { * @param "EndTimeAfter" (time.Time) - Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListCallResponse - */ +*/ func (c *DefaultApiService) ListCall(AccountSid string, params *ListCallParams) (*ListCallResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Calls.json" + path := "/2010-04-01/Accounts/{AccountSid}/Calls.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.To != nil { - data.Set("To", *params.To) - } - if params != nil && params.From != nil { - data.Set("From", *params.From) - } - if params != nil && params.ParentCallSid != nil { - data.Set("ParentCallSid", *params.ParentCallSid) - } - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) - } - if params != nil && params.StartTime != nil { - data.Set("StartTime", fmt.Sprint(*params.StartTime)) - } - if params != nil && params.StartTimeBefore != nil { - data.Set("StartTimeBefore", fmt.Sprint(*params.StartTimeBefore)) - } - if params != nil && params.StartTimeAfter != nil { - data.Set("StartTimeAfter", fmt.Sprint(*params.StartTimeAfter)) - } - if params != nil && params.EndTime != nil { - data.Set("EndTime", fmt.Sprint(*params.EndTime)) - } - if params != nil && params.EndTimeBefore != nil { - data.Set("EndTimeBefore", fmt.Sprint(*params.EndTimeBefore)) - } - if params != nil && params.EndTimeAfter != nil { - data.Set("EndTimeAfter", fmt.Sprint(*params.EndTimeAfter)) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.To != nil { + data.Set("To", *params.To) +} + if params != nil && params.From != nil { + data.Set("From", *params.From) +} + if params != nil && params.ParentCallSid != nil { + data.Set("ParentCallSid", *params.ParentCallSid) +} + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) +} + if params != nil && params.StartTime != nil { + data.Set("StartTime", fmt.Sprint(*params.StartTime)) +} + if params != nil && params.StartTimeBefore != nil { + data.Set("StartTimeBefore", fmt.Sprint(*params.StartTimeBefore)) +} + if params != nil && params.StartTimeAfter != nil { + data.Set("StartTimeAfter", fmt.Sprint(*params.StartTimeAfter)) +} + if params != nil && params.EndTime != nil { + data.Set("EndTime", fmt.Sprint(*params.EndTime)) +} + if params != nil && params.EndTimeBefore != nil { + data.Set("EndTimeBefore", fmt.Sprint(*params.EndTimeBefore)) +} + if params != nil && params.EndTimeAfter != nil { + data.Set("EndTimeAfter", fmt.Sprint(*params.EndTimeAfter)) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListCallResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListCallResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListCallEventParams Optional parameters for the method 'ListCallEvent' type ListCallEventParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -5840,41 +5989,41 @@ type ListCallEventParams struct { * @param optional nil or *ListCallEventParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListCallEventResponse - */ +*/ func (c *DefaultApiService) ListCallEvent(AccountSid string, CallSid string, params *ListCallEventParams) (*ListCallEventResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Events.json" + path := "/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Events.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListCallEventResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListCallEventResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListCallNotificationParams Optional parameters for the method 'ListCallNotification' type ListCallNotificationParams struct { - Log *int32 `json:"Log,omitempty"` - MessageDate *time.Time `json:"MessageDate,omitempty"` + Log *int32 `json:"Log,omitempty"` + MessageDate *time.Time `json:"MessageDate,omitempty"` MessageDateBefore *time.Time `json:"MessageDate<,omitempty"` - MessageDateAfter *time.Time `json:"MessageDate>,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + MessageDateAfter *time.Time `json:"MessageDate>,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -5888,52 +6037,52 @@ type ListCallNotificationParams struct { * @param "MessageDateAfter" (time.Time) - Only show notifications for the specified date, formatted as `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for messages logged at or after midnight on a date. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListCallNotificationResponse - */ +*/ func (c *DefaultApiService) ListCallNotification(AccountSid string, CallSid string, params *ListCallNotificationParams) (*ListCallNotificationResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Notifications.json" + path := "/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Notifications.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Log != nil { - data.Set("Log", fmt.Sprint(*params.Log)) - } - if params != nil && params.MessageDate != nil { - data.Set("MessageDate", fmt.Sprint(*params.MessageDate)) - } - if params != nil && params.MessageDateBefore != nil { - data.Set("MessageDateBefore", fmt.Sprint(*params.MessageDateBefore)) - } - if params != nil && params.MessageDateAfter != nil { - data.Set("MessageDateAfter", fmt.Sprint(*params.MessageDateAfter)) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.Log != nil { + data.Set("Log", fmt.Sprint(*params.Log)) +} + if params != nil && params.MessageDate != nil { + data.Set("MessageDate", fmt.Sprint(*params.MessageDate)) +} + if params != nil && params.MessageDateBefore != nil { + data.Set("MessageDateBefore", fmt.Sprint(*params.MessageDateBefore)) +} + if params != nil && params.MessageDateAfter != nil { + data.Set("MessageDateAfter", fmt.Sprint(*params.MessageDateAfter)) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListCallNotificationResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListCallNotificationResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListCallRecordingParams Optional parameters for the method 'ListCallRecording' type ListCallRecordingParams struct { - DateCreated *time.Time `json:"DateCreated,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` DateCreatedBefore *time.Time `json:"DateCreated<,omitempty"` - DateCreatedAfter *time.Time `json:"DateCreated>,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + DateCreatedAfter *time.Time `json:"DateCreated>,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -5947,54 +6096,54 @@ type ListCallRecordingParams struct { * @param "DateCreatedAfter" (time.Time) - The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` will return recordings generated at or before midnight on a given date, and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight on a date. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListCallRecordingResponse - */ +*/ func (c *DefaultApiService) ListCallRecording(AccountSid string, CallSid string, params *ListCallRecordingParams) (*ListCallRecordingResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Recordings.json" + path := "/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Recordings.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.DateCreated != nil { - data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) - } - if params != nil && params.DateCreatedBefore != nil { - data.Set("DateCreatedBefore", fmt.Sprint(*params.DateCreatedBefore)) - } - if params != nil && params.DateCreatedAfter != nil { - data.Set("DateCreatedAfter", fmt.Sprint(*params.DateCreatedAfter)) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) +} + if params != nil && params.DateCreatedBefore != nil { + data.Set("DateCreatedBefore", fmt.Sprint(*params.DateCreatedBefore)) +} + if params != nil && params.DateCreatedAfter != nil { + data.Set("DateCreatedAfter", fmt.Sprint(*params.DateCreatedAfter)) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListCallRecordingResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListCallRecordingResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListConferenceParams Optional parameters for the method 'ListConference' type ListConferenceParams struct { - DateCreated *time.Time `json:"DateCreated,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` DateCreatedBefore *time.Time `json:"DateCreated<,omitempty"` - DateCreatedAfter *time.Time `json:"DateCreated>,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` + DateCreatedAfter *time.Time `json:"DateCreated>,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` DateUpdatedBefore *time.Time `json:"DateUpdated<,omitempty"` - DateUpdatedAfter *time.Time `json:"DateUpdated>,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Status *string `json:"Status,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + DateUpdatedAfter *time.Time `json:"DateUpdated>,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Status *string `json:"Status,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -6012,63 +6161,63 @@ type ListConferenceParams struct { * @param "Status" (string) - The status of the resources to read. Can be: `init`, `in-progress`, or `completed`. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListConferenceResponse - */ +*/ func (c *DefaultApiService) ListConference(AccountSid string, params *ListConferenceParams) (*ListConferenceResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Conferences.json" + path := "/2010-04-01/Accounts/{AccountSid}/Conferences.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.DateCreated != nil { - data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) - } - if params != nil && params.DateCreatedBefore != nil { - data.Set("DateCreatedBefore", fmt.Sprint(*params.DateCreatedBefore)) - } - if params != nil && params.DateCreatedAfter != nil { - data.Set("DateCreatedAfter", fmt.Sprint(*params.DateCreatedAfter)) - } - if params != nil && params.DateUpdated != nil { - data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) - } - if params != nil && params.DateUpdatedBefore != nil { - data.Set("DateUpdatedBefore", fmt.Sprint(*params.DateUpdatedBefore)) - } - if params != nil && params.DateUpdatedAfter != nil { - data.Set("DateUpdatedAfter", fmt.Sprint(*params.DateUpdatedAfter)) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) +} + if params != nil && params.DateCreatedBefore != nil { + data.Set("DateCreatedBefore", fmt.Sprint(*params.DateCreatedBefore)) +} + if params != nil && params.DateCreatedAfter != nil { + data.Set("DateCreatedAfter", fmt.Sprint(*params.DateCreatedAfter)) +} + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) +} + if params != nil && params.DateUpdatedBefore != nil { + data.Set("DateUpdatedBefore", fmt.Sprint(*params.DateUpdatedBefore)) +} + if params != nil && params.DateUpdatedAfter != nil { + data.Set("DateUpdatedAfter", fmt.Sprint(*params.DateUpdatedAfter)) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListConferenceResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListConferenceResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListConferenceRecordingParams Optional parameters for the method 'ListConferenceRecording' type ListConferenceRecordingParams struct { - DateCreated *time.Time `json:"DateCreated,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` DateCreatedBefore *time.Time `json:"DateCreated<,omitempty"` - DateCreatedAfter *time.Time `json:"DateCreated>,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + DateCreatedAfter *time.Time `json:"DateCreated>,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -6082,43 +6231,43 @@ type ListConferenceRecordingParams struct { * @param "DateCreatedAfter" (time.Time) - The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` will return recordings generated at or before midnight on a given date, and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight on a date. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListConferenceRecordingResponse - */ +*/ func (c *DefaultApiService) ListConferenceRecording(AccountSid string, ConferenceSid string, params *ListConferenceRecordingParams) (*ListConferenceRecordingResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Recordings.json" + path := "/2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Recordings.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"ConferenceSid"+"}", ConferenceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.DateCreated != nil { - data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) - } - if params != nil && params.DateCreatedBefore != nil { - data.Set("DateCreatedBefore", fmt.Sprint(*params.DateCreatedBefore)) - } - if params != nil && params.DateCreatedAfter != nil { - data.Set("DateCreatedAfter", fmt.Sprint(*params.DateCreatedAfter)) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) +} + if params != nil && params.DateCreatedBefore != nil { + data.Set("DateCreatedBefore", fmt.Sprint(*params.DateCreatedBefore)) +} + if params != nil && params.DateCreatedAfter != nil { + data.Set("DateCreatedAfter", fmt.Sprint(*params.DateCreatedAfter)) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListConferenceRecordingResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListConferenceRecordingResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListConnectAppParams Optional parameters for the method 'ListConnectApp' type ListConnectAppParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -6131,33 +6280,33 @@ type ListConnectAppParams struct { * @param optional nil or *ListConnectAppParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListConnectAppResponse - */ +*/ func (c *DefaultApiService) ListConnectApp(AccountSid string, params *ListConnectAppParams) (*ListConnectAppResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/ConnectApps.json" + path := "/2010-04-01/Accounts/{AccountSid}/ConnectApps.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListConnectAppResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListConnectAppResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListDependentPhoneNumberParams Optional parameters for the method 'ListDependentPhoneNumber' type ListDependentPhoneNumberParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -6170,41 +6319,41 @@ type ListDependentPhoneNumberParams struct { * @param optional nil or *ListDependentPhoneNumberParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListDependentPhoneNumberResponse - */ +*/ func (c *DefaultApiService) ListDependentPhoneNumber(AccountSid string, AddressSid string, params *ListDependentPhoneNumberParams) (*ListDependentPhoneNumberResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Addresses/{AddressSid}/DependentPhoneNumbers.json" + path := "/2010-04-01/Accounts/{AccountSid}/Addresses/{AddressSid}/DependentPhoneNumbers.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"AddressSid"+"}", AddressSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListDependentPhoneNumberResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListDependentPhoneNumberResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListIncomingPhoneNumberParams Optional parameters for the method 'ListIncomingPhoneNumber' type ListIncomingPhoneNumberParams struct { - Beta *bool `json:"Beta,omitempty"` + Beta *bool `json:"Beta,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` - PhoneNumber *string `json:"PhoneNumber,omitempty"` - Origin *string `json:"Origin,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PhoneNumber *string `json:"PhoneNumber,omitempty"` + Origin *string `json:"Origin,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -6218,45 +6367,45 @@ type ListIncomingPhoneNumberParams struct { * @param "Origin" (string) - Whether to include phone numbers based on their origin. Can be: `twilio` or `hosted`. By default, phone numbers of all origin are included. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListIncomingPhoneNumberResponse - */ +*/ func (c *DefaultApiService) ListIncomingPhoneNumber(AccountSid string, params *ListIncomingPhoneNumberParams) (*ListIncomingPhoneNumberResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers.json" + path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Beta != nil { - data.Set("Beta", fmt.Sprint(*params.Beta)) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.PhoneNumber != nil { - data.Set("PhoneNumber", *params.PhoneNumber) - } - if params != nil && params.Origin != nil { - data.Set("Origin", *params.Origin) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.Beta != nil { + data.Set("Beta", fmt.Sprint(*params.Beta)) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.PhoneNumber != nil { + data.Set("PhoneNumber", *params.PhoneNumber) +} + if params != nil && params.Origin != nil { + data.Set("Origin", *params.Origin) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListIncomingPhoneNumberResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListIncomingPhoneNumberResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListIncomingPhoneNumberAssignedAddOnParams Optional parameters for the method 'ListIncomingPhoneNumberAssignedAddOn' type ListIncomingPhoneNumberAssignedAddOnParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -6270,34 +6419,34 @@ type ListIncomingPhoneNumberAssignedAddOnParams struct { * @param optional nil or *ListIncomingPhoneNumberAssignedAddOnParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListIncomingPhoneNumberAssignedAddOnResponse - */ +*/ func (c *DefaultApiService) ListIncomingPhoneNumberAssignedAddOn(AccountSid string, ResourceSid string, params *ListIncomingPhoneNumberAssignedAddOnParams) (*ListIncomingPhoneNumberAssignedAddOnResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{ResourceSid}/AssignedAddOns.json" + path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{ResourceSid}/AssignedAddOns.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"ResourceSid"+"}", ResourceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListIncomingPhoneNumberAssignedAddOnResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListIncomingPhoneNumberAssignedAddOnResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListIncomingPhoneNumberAssignedAddOnExtensionParams Optional parameters for the method 'ListIncomingPhoneNumberAssignedAddOnExtension' type ListIncomingPhoneNumberAssignedAddOnExtensionParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -6312,42 +6461,42 @@ type ListIncomingPhoneNumberAssignedAddOnExtensionParams struct { * @param optional nil or *ListIncomingPhoneNumberAssignedAddOnExtensionParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListIncomingPhoneNumberAssignedAddOnExtensionResponse - */ +*/ func (c *DefaultApiService) ListIncomingPhoneNumberAssignedAddOnExtension(AccountSid string, ResourceSid string, AssignedAddOnSid string, params *ListIncomingPhoneNumberAssignedAddOnExtensionParams) (*ListIncomingPhoneNumberAssignedAddOnExtensionResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{ResourceSid}/AssignedAddOns/{AssignedAddOnSid}/Extensions.json" + path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{ResourceSid}/AssignedAddOns/{AssignedAddOnSid}/Extensions.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"ResourceSid"+"}", ResourceSid, -1) path = strings.Replace(path, "{"+"AssignedAddOnSid"+"}", AssignedAddOnSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListIncomingPhoneNumberAssignedAddOnExtensionResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListIncomingPhoneNumberAssignedAddOnExtensionResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListIncomingPhoneNumberLocalParams Optional parameters for the method 'ListIncomingPhoneNumberLocal' type ListIncomingPhoneNumberLocalParams struct { - Beta *bool `json:"Beta,omitempty"` + Beta *bool `json:"Beta,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` - PhoneNumber *string `json:"PhoneNumber,omitempty"` - Origin *string `json:"Origin,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PhoneNumber *string `json:"PhoneNumber,omitempty"` + Origin *string `json:"Origin,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -6360,52 +6509,52 @@ type ListIncomingPhoneNumberLocalParams struct { * @param "Origin" (string) - Whether to include phone numbers based on their origin. Can be: `twilio` or `hosted`. By default, phone numbers of all origin are included. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListIncomingPhoneNumberLocalResponse - */ +*/ func (c *DefaultApiService) ListIncomingPhoneNumberLocal(AccountSid string, params *ListIncomingPhoneNumberLocalParams) (*ListIncomingPhoneNumberLocalResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/Local.json" + path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/Local.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Beta != nil { - data.Set("Beta", fmt.Sprint(*params.Beta)) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.PhoneNumber != nil { - data.Set("PhoneNumber", *params.PhoneNumber) - } - if params != nil && params.Origin != nil { - data.Set("Origin", *params.Origin) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.Beta != nil { + data.Set("Beta", fmt.Sprint(*params.Beta)) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.PhoneNumber != nil { + data.Set("PhoneNumber", *params.PhoneNumber) +} + if params != nil && params.Origin != nil { + data.Set("Origin", *params.Origin) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListIncomingPhoneNumberLocalResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListIncomingPhoneNumberLocalResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListIncomingPhoneNumberMobileParams Optional parameters for the method 'ListIncomingPhoneNumberMobile' type ListIncomingPhoneNumberMobileParams struct { - Beta *bool `json:"Beta,omitempty"` + Beta *bool `json:"Beta,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` - PhoneNumber *string `json:"PhoneNumber,omitempty"` - Origin *string `json:"Origin,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PhoneNumber *string `json:"PhoneNumber,omitempty"` + Origin *string `json:"Origin,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -6418,52 +6567,52 @@ type ListIncomingPhoneNumberMobileParams struct { * @param "Origin" (string) - Whether to include phone numbers based on their origin. Can be: `twilio` or `hosted`. By default, phone numbers of all origin are included. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListIncomingPhoneNumberMobileResponse - */ +*/ func (c *DefaultApiService) ListIncomingPhoneNumberMobile(AccountSid string, params *ListIncomingPhoneNumberMobileParams) (*ListIncomingPhoneNumberMobileResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/Mobile.json" + path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/Mobile.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Beta != nil { - data.Set("Beta", fmt.Sprint(*params.Beta)) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.PhoneNumber != nil { - data.Set("PhoneNumber", *params.PhoneNumber) - } - if params != nil && params.Origin != nil { - data.Set("Origin", *params.Origin) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.Beta != nil { + data.Set("Beta", fmt.Sprint(*params.Beta)) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.PhoneNumber != nil { + data.Set("PhoneNumber", *params.PhoneNumber) +} + if params != nil && params.Origin != nil { + data.Set("Origin", *params.Origin) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListIncomingPhoneNumberMobileResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListIncomingPhoneNumberMobileResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListIncomingPhoneNumberTollFreeParams Optional parameters for the method 'ListIncomingPhoneNumberTollFree' type ListIncomingPhoneNumberTollFreeParams struct { - Beta *bool `json:"Beta,omitempty"` + Beta *bool `json:"Beta,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` - PhoneNumber *string `json:"PhoneNumber,omitempty"` - Origin *string `json:"Origin,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PhoneNumber *string `json:"PhoneNumber,omitempty"` + Origin *string `json:"Origin,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -6476,45 +6625,45 @@ type ListIncomingPhoneNumberTollFreeParams struct { * @param "Origin" (string) - Whether to include phone numbers based on their origin. Can be: `twilio` or `hosted`. By default, phone numbers of all origin are included. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListIncomingPhoneNumberTollFreeResponse - */ +*/ func (c *DefaultApiService) ListIncomingPhoneNumberTollFree(AccountSid string, params *ListIncomingPhoneNumberTollFreeParams) (*ListIncomingPhoneNumberTollFreeResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/TollFree.json" + path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/TollFree.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Beta != nil { - data.Set("Beta", fmt.Sprint(*params.Beta)) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.PhoneNumber != nil { - data.Set("PhoneNumber", *params.PhoneNumber) - } - if params != nil && params.Origin != nil { - data.Set("Origin", *params.Origin) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.Beta != nil { + data.Set("Beta", fmt.Sprint(*params.Beta)) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.PhoneNumber != nil { + data.Set("PhoneNumber", *params.PhoneNumber) +} + if params != nil && params.Origin != nil { + data.Set("Origin", *params.Origin) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListIncomingPhoneNumberTollFreeResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListIncomingPhoneNumberTollFreeResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListKeyParams Optional parameters for the method 'ListKey' type ListKeyParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -6526,39 +6675,39 @@ type ListKeyParams struct { * @param optional nil or *ListKeyParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListKeyResponse - */ +*/ func (c *DefaultApiService) ListKey(AccountSid string, params *ListKeyParams) (*ListKeyResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Keys.json" + path := "/2010-04-01/Accounts/{AccountSid}/Keys.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListKeyResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListKeyResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListMediaParams Optional parameters for the method 'ListMedia' type ListMediaParams struct { - DateCreated *time.Time `json:"DateCreated,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` DateCreatedBefore *time.Time `json:"DateCreated<,omitempty"` - DateCreatedAfter *time.Time `json:"DateCreated>,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + DateCreatedAfter *time.Time `json:"DateCreated>,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -6572,43 +6721,43 @@ type ListMediaParams struct { * @param "DateCreatedAfter" (time.Time) - Only include media that was created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read media that was created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read media that was created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read media that was created on or after midnight of this date. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListMediaResponse - */ +*/ func (c *DefaultApiService) ListMedia(AccountSid string, MessageSid string, params *ListMediaParams) (*ListMediaResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Messages/{MessageSid}/Media.json" + path := "/2010-04-01/Accounts/{AccountSid}/Messages/{MessageSid}/Media.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"MessageSid"+"}", MessageSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) +} + if params != nil && params.DateCreatedBefore != nil { + data.Set("DateCreatedBefore", fmt.Sprint(*params.DateCreatedBefore)) +} + if params != nil && params.DateCreatedAfter != nil { + data.Set("DateCreatedAfter", fmt.Sprint(*params.DateCreatedAfter)) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - if params != nil && params.DateCreated != nil { - data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) - } - if params != nil && params.DateCreatedBefore != nil { - data.Set("DateCreatedBefore", fmt.Sprint(*params.DateCreatedBefore)) - } - if params != nil && params.DateCreatedAfter != nil { - data.Set("DateCreatedAfter", fmt.Sprint(*params.DateCreatedAfter)) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListMediaResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListMediaResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } - // ListMemberParams Optional parameters for the method 'ListMember' type ListMemberParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -6622,42 +6771,42 @@ type ListMemberParams struct { * @param optional nil or *ListMemberParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListMemberResponse - */ +*/ func (c *DefaultApiService) ListMember(AccountSid string, QueueSid string, params *ListMemberParams) (*ListMemberResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Queues/{QueueSid}/Members.json" + path := "/2010-04-01/Accounts/{AccountSid}/Queues/{QueueSid}/Members.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"QueueSid"+"}", QueueSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListMemberResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListMemberResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListMessageParams Optional parameters for the method 'ListMessage' type ListMessageParams struct { - To *string `json:"To,omitempty"` - From *string `json:"From,omitempty"` - DateSent *time.Time `json:"DateSent,omitempty"` + To *string `json:"To,omitempty"` + From *string `json:"From,omitempty"` + DateSent *time.Time `json:"DateSent,omitempty"` DateSentBefore *time.Time `json:"DateSent<,omitempty"` - DateSentAfter *time.Time `json:"DateSent>,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + DateSentAfter *time.Time `json:"DateSent>,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -6672,55 +6821,55 @@ type ListMessageParams struct { * @param "DateSentAfter" (time.Time) - The date of the messages to show. Specify a date as `YYYY-MM-DD` in GMT to read only messages sent on this date. For example: `2009-07-06`. You can also specify an inequality, such as `DateSent<=YYYY-MM-DD`, to read messages sent on or before midnight on a date, and `DateSent>=YYYY-MM-DD` to read messages sent on or after midnight on a date. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListMessageResponse - */ +*/ func (c *DefaultApiService) ListMessage(AccountSid string, params *ListMessageParams) (*ListMessageResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Messages.json" + path := "/2010-04-01/Accounts/{AccountSid}/Messages.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.To != nil { - data.Set("To", *params.To) - } - if params != nil && params.From != nil { - data.Set("From", *params.From) - } - if params != nil && params.DateSent != nil { - data.Set("DateSent", fmt.Sprint(*params.DateSent)) - } - if params != nil && params.DateSentBefore != nil { - data.Set("DateSentBefore", fmt.Sprint(*params.DateSentBefore)) - } - if params != nil && params.DateSentAfter != nil { - data.Set("DateSentAfter", fmt.Sprint(*params.DateSentAfter)) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.To != nil { + data.Set("To", *params.To) +} + if params != nil && params.From != nil { + data.Set("From", *params.From) +} + if params != nil && params.DateSent != nil { + data.Set("DateSent", fmt.Sprint(*params.DateSent)) +} + if params != nil && params.DateSentBefore != nil { + data.Set("DateSentBefore", fmt.Sprint(*params.DateSentBefore)) +} + if params != nil && params.DateSentAfter != nil { + data.Set("DateSentAfter", fmt.Sprint(*params.DateSentAfter)) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListMessageResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListMessageResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListNotificationParams Optional parameters for the method 'ListNotification' type ListNotificationParams struct { - Log *int32 `json:"Log,omitempty"` - MessageDate *time.Time `json:"MessageDate,omitempty"` + Log *int32 `json:"Log,omitempty"` + MessageDate *time.Time `json:"MessageDate,omitempty"` MessageDateBefore *time.Time `json:"MessageDate<,omitempty"` - MessageDateAfter *time.Time `json:"MessageDate>,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + MessageDateAfter *time.Time `json:"MessageDate>,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -6734,50 +6883,50 @@ type ListNotificationParams struct { * @param "MessageDateAfter" (time.Time) - Only show notifications for the specified date, formatted as `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for messages logged at or after midnight on a date. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListNotificationResponse - */ +*/ func (c *DefaultApiService) ListNotification(AccountSid string, params *ListNotificationParams) (*ListNotificationResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Notifications.json" + path := "/2010-04-01/Accounts/{AccountSid}/Notifications.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Log != nil { - data.Set("Log", fmt.Sprint(*params.Log)) - } - if params != nil && params.MessageDate != nil { - data.Set("MessageDate", fmt.Sprint(*params.MessageDate)) - } - if params != nil && params.MessageDateBefore != nil { - data.Set("MessageDateBefore", fmt.Sprint(*params.MessageDateBefore)) - } - if params != nil && params.MessageDateAfter != nil { - data.Set("MessageDateAfter", fmt.Sprint(*params.MessageDateAfter)) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.Log != nil { + data.Set("Log", fmt.Sprint(*params.Log)) +} + if params != nil && params.MessageDate != nil { + data.Set("MessageDate", fmt.Sprint(*params.MessageDate)) +} + if params != nil && params.MessageDateBefore != nil { + data.Set("MessageDateBefore", fmt.Sprint(*params.MessageDateBefore)) +} + if params != nil && params.MessageDateAfter != nil { + data.Set("MessageDateAfter", fmt.Sprint(*params.MessageDateAfter)) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListNotificationResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListNotificationResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListOutgoingCallerIdParams Optional parameters for the method 'ListOutgoingCallerId' type ListOutgoingCallerIdParams struct { - PhoneNumber *string `json:"PhoneNumber,omitempty"` + PhoneNumber *string `json:"PhoneNumber,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -6789,44 +6938,44 @@ type ListOutgoingCallerIdParams struct { * @param "FriendlyName" (string) - The string that identifies the OutgoingCallerId resources to read. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListOutgoingCallerIdResponse - */ +*/ func (c *DefaultApiService) ListOutgoingCallerId(AccountSid string, params *ListOutgoingCallerIdParams) (*ListOutgoingCallerIdResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/OutgoingCallerIds.json" + path := "/2010-04-01/Accounts/{AccountSid}/OutgoingCallerIds.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PhoneNumber != nil { - data.Set("PhoneNumber", *params.PhoneNumber) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PhoneNumber != nil { + data.Set("PhoneNumber", *params.PhoneNumber) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListOutgoingCallerIdResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListOutgoingCallerIdResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListParticipantParams Optional parameters for the method 'ListParticipant' type ListParticipantParams struct { - Muted *bool `json:"Muted,omitempty"` - Hold *bool `json:"Hold,omitempty"` - Coaching *bool `json:"Coaching,omitempty"` + Muted *bool `json:"Muted,omitempty"` + Hold *bool `json:"Hold,omitempty"` + Coaching *bool `json:"Coaching,omitempty"` PageSize *int32 `json:"PageSize,omitempty"` } @@ -6841,43 +6990,43 @@ type ListParticipantParams struct { * @param "Coaching" (bool) - Whether to return only participants who are coaching another call. Can be: `true` or `false`. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListParticipantResponse - */ +*/ func (c *DefaultApiService) ListParticipant(AccountSid string, ConferenceSid string, params *ListParticipantParams) (*ListParticipantResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Participants.json" + path := "/2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Participants.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"ConferenceSid"+"}", ConferenceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Muted != nil { - data.Set("Muted", fmt.Sprint(*params.Muted)) - } - if params != nil && params.Hold != nil { - data.Set("Hold", fmt.Sprint(*params.Hold)) - } - if params != nil && params.Coaching != nil { - data.Set("Coaching", fmt.Sprint(*params.Coaching)) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.Muted != nil { + data.Set("Muted", fmt.Sprint(*params.Muted)) +} + if params != nil && params.Hold != nil { + data.Set("Hold", fmt.Sprint(*params.Hold)) +} + if params != nil && params.Coaching != nil { + data.Set("Coaching", fmt.Sprint(*params.Coaching)) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListParticipantResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListParticipantResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListQueueParams Optional parameters for the method 'ListQueue' type ListQueueParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -6890,41 +7039,41 @@ type ListQueueParams struct { * @param optional nil or *ListQueueParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListQueueResponse - */ +*/ func (c *DefaultApiService) ListQueue(AccountSid string, params *ListQueueParams) (*ListQueueResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Queues.json" + path := "/2010-04-01/Accounts/{AccountSid}/Queues.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListQueueResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListQueueResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListRecordingParams Optional parameters for the method 'ListRecording' type ListRecordingParams struct { - DateCreated *time.Time `json:"DateCreated,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` DateCreatedBefore *time.Time `json:"DateCreated<,omitempty"` - DateCreatedAfter *time.Time `json:"DateCreated>,omitempty"` - CallSid *string `json:"CallSid,omitempty"` - ConferenceSid *string `json:"ConferenceSid,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + DateCreatedAfter *time.Time `json:"DateCreated>,omitempty"` + CallSid *string `json:"CallSid,omitempty"` + ConferenceSid *string `json:"ConferenceSid,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -6939,48 +7088,48 @@ type ListRecordingParams struct { * @param "ConferenceSid" (string) - The Conference SID that identifies the conference associated with the recording to read. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListRecordingResponse - */ +*/ func (c *DefaultApiService) ListRecording(AccountSid string, params *ListRecordingParams) (*ListRecordingResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Recordings.json" + path := "/2010-04-01/Accounts/{AccountSid}/Recordings.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.DateCreated != nil { - data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) - } - if params != nil && params.DateCreatedBefore != nil { - data.Set("DateCreatedBefore", fmt.Sprint(*params.DateCreatedBefore)) - } - if params != nil && params.DateCreatedAfter != nil { - data.Set("DateCreatedAfter", fmt.Sprint(*params.DateCreatedAfter)) - } - if params != nil && params.CallSid != nil { - data.Set("CallSid", *params.CallSid) - } - if params != nil && params.ConferenceSid != nil { - data.Set("ConferenceSid", *params.ConferenceSid) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) +} + if params != nil && params.DateCreatedBefore != nil { + data.Set("DateCreatedBefore", fmt.Sprint(*params.DateCreatedBefore)) +} + if params != nil && params.DateCreatedAfter != nil { + data.Set("DateCreatedAfter", fmt.Sprint(*params.DateCreatedAfter)) +} + if params != nil && params.CallSid != nil { + data.Set("CallSid", *params.CallSid) +} + if params != nil && params.ConferenceSid != nil { + data.Set("ConferenceSid", *params.ConferenceSid) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListRecordingResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListRecordingResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListRecordingAddOnResultParams Optional parameters for the method 'ListRecordingAddOnResult' type ListRecordingAddOnResultParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -6994,34 +7143,34 @@ type ListRecordingAddOnResultParams struct { * @param optional nil or *ListRecordingAddOnResultParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListRecordingAddOnResultResponse - */ +*/ func (c *DefaultApiService) ListRecordingAddOnResult(AccountSid string, ReferenceSid string, params *ListRecordingAddOnResultParams) (*ListRecordingAddOnResultResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Recordings/{ReferenceSid}/AddOnResults.json" + path := "/2010-04-01/Accounts/{AccountSid}/Recordings/{ReferenceSid}/AddOnResults.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"ReferenceSid"+"}", ReferenceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListRecordingAddOnResultResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListRecordingAddOnResultResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListRecordingAddOnResultPayloadParams Optional parameters for the method 'ListRecordingAddOnResultPayload' type ListRecordingAddOnResultPayloadParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -7036,35 +7185,35 @@ type ListRecordingAddOnResultPayloadParams struct { * @param optional nil or *ListRecordingAddOnResultPayloadParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListRecordingAddOnResultPayloadResponse - */ +*/ func (c *DefaultApiService) ListRecordingAddOnResultPayload(AccountSid string, ReferenceSid string, AddOnResultSid string, params *ListRecordingAddOnResultPayloadParams) (*ListRecordingAddOnResultPayloadResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Recordings/{ReferenceSid}/AddOnResults/{AddOnResultSid}/Payloads.json" + path := "/2010-04-01/Accounts/{AccountSid}/Recordings/{ReferenceSid}/AddOnResults/{AddOnResultSid}/Payloads.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"ReferenceSid"+"}", ReferenceSid, -1) path = strings.Replace(path, "{"+"AddOnResultSid"+"}", AddOnResultSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListRecordingAddOnResultPayloadResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListRecordingAddOnResultPayloadResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListRecordingTranscriptionParams Optional parameters for the method 'ListRecordingTranscription' type ListRecordingTranscriptionParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -7077,39 +7226,39 @@ type ListRecordingTranscriptionParams struct { * @param optional nil or *ListRecordingTranscriptionParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListRecordingTranscriptionResponse - */ +*/ func (c *DefaultApiService) ListRecordingTranscription(AccountSid string, RecordingSid string, params *ListRecordingTranscriptionParams) (*ListRecordingTranscriptionResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Recordings/{RecordingSid}/Transcriptions.json" + path := "/2010-04-01/Accounts/{AccountSid}/Recordings/{RecordingSid}/Transcriptions.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"RecordingSid"+"}", RecordingSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListRecordingTranscriptionResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListRecordingTranscriptionResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListShortCodeParams Optional parameters for the method 'ListShortCode' type ListShortCodeParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` - ShortCode *string `json:"ShortCode,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + ShortCode *string `json:"ShortCode,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -7121,39 +7270,39 @@ type ListShortCodeParams struct { * @param "ShortCode" (string) - Only show the ShortCode resources that match this pattern. You can specify partial numbers and use '*' as a wildcard for any digit. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListShortCodeResponse - */ +*/ func (c *DefaultApiService) ListShortCode(AccountSid string, params *ListShortCodeParams) (*ListShortCodeResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SMS/ShortCodes.json" + path := "/2010-04-01/Accounts/{AccountSid}/SMS/ShortCodes.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.ShortCode != nil { - data.Set("ShortCode", *params.ShortCode) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.ShortCode != nil { + data.Set("ShortCode", *params.ShortCode) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListShortCodeResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListShortCodeResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListSigningKeyParams Optional parameters for the method 'ListSigningKey' type ListSigningKeyParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -7165,33 +7314,33 @@ type ListSigningKeyParams struct { * @param optional nil or *ListSigningKeyParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListSigningKeyResponse - */ +*/ func (c *DefaultApiService) ListSigningKey(AccountSid string, params *ListSigningKeyParams) (*ListSigningKeyResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SigningKeys.json" + path := "/2010-04-01/Accounts/{AccountSid}/SigningKeys.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListSigningKeyResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListSigningKeyResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListSipAuthCallsCredentialListMappingParams Optional parameters for the method 'ListSipAuthCallsCredentialListMapping' type ListSipAuthCallsCredentialListMappingParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -7205,34 +7354,34 @@ type ListSipAuthCallsCredentialListMappingParams struct { * @param optional nil or *ListSipAuthCallsCredentialListMappingParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListSipAuthCallsCredentialListMappingResponse - */ +*/ func (c *DefaultApiService) ListSipAuthCallsCredentialListMapping(AccountSid string, DomainSid string, params *ListSipAuthCallsCredentialListMappingParams) (*ListSipAuthCallsCredentialListMappingResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls/CredentialListMappings.json" + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls/CredentialListMappings.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListSipAuthCallsCredentialListMappingResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListSipAuthCallsCredentialListMappingResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListSipAuthCallsIpAccessControlListMappingParams Optional parameters for the method 'ListSipAuthCallsIpAccessControlListMapping' type ListSipAuthCallsIpAccessControlListMappingParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -7246,34 +7395,34 @@ type ListSipAuthCallsIpAccessControlListMappingParams struct { * @param optional nil or *ListSipAuthCallsIpAccessControlListMappingParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListSipAuthCallsIpAccessControlListMappingResponse - */ +*/ func (c *DefaultApiService) ListSipAuthCallsIpAccessControlListMapping(AccountSid string, DomainSid string, params *ListSipAuthCallsIpAccessControlListMappingParams) (*ListSipAuthCallsIpAccessControlListMappingResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls/IpAccessControlListMappings.json" + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls/IpAccessControlListMappings.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListSipAuthCallsIpAccessControlListMappingResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListSipAuthCallsIpAccessControlListMappingResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListSipAuthRegistrationsCredentialListMappingParams Optional parameters for the method 'ListSipAuthRegistrationsCredentialListMapping' type ListSipAuthRegistrationsCredentialListMappingParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -7287,34 +7436,34 @@ type ListSipAuthRegistrationsCredentialListMappingParams struct { * @param optional nil or *ListSipAuthRegistrationsCredentialListMappingParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListSipAuthRegistrationsCredentialListMappingResponse - */ +*/ func (c *DefaultApiService) ListSipAuthRegistrationsCredentialListMapping(AccountSid string, DomainSid string, params *ListSipAuthRegistrationsCredentialListMappingParams) (*ListSipAuthRegistrationsCredentialListMappingResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Registrations/CredentialListMappings.json" + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Registrations/CredentialListMappings.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListSipAuthRegistrationsCredentialListMappingResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListSipAuthRegistrationsCredentialListMappingResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListSipCredentialParams Optional parameters for the method 'ListSipCredential' type ListSipCredentialParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -7328,34 +7477,34 @@ type ListSipCredentialParams struct { * @param optional nil or *ListSipCredentialParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListSipCredentialResponse - */ +*/ func (c *DefaultApiService) ListSipCredential(AccountSid string, CredentialListSid string, params *ListSipCredentialParams) (*ListSipCredentialResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{CredentialListSid}/Credentials.json" + path := "/2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{CredentialListSid}/Credentials.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"CredentialListSid"+"}", CredentialListSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListSipCredentialResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListSipCredentialResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListSipCredentialListParams Optional parameters for the method 'ListSipCredentialList' type ListSipCredentialListParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -7368,33 +7517,33 @@ type ListSipCredentialListParams struct { * @param optional nil or *ListSipCredentialListParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListSipCredentialListResponse - */ +*/ func (c *DefaultApiService) ListSipCredentialList(AccountSid string, params *ListSipCredentialListParams) (*ListSipCredentialListResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists.json" + path := "/2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListSipCredentialListResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListSipCredentialListResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListSipCredentialListMappingParams Optional parameters for the method 'ListSipCredentialListMapping' type ListSipCredentialListMappingParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -7408,34 +7557,34 @@ type ListSipCredentialListMappingParams struct { * @param optional nil or *ListSipCredentialListMappingParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListSipCredentialListMappingResponse - */ +*/ func (c *DefaultApiService) ListSipCredentialListMapping(AccountSid string, DomainSid string, params *ListSipCredentialListMappingParams) (*ListSipCredentialListMappingResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/CredentialListMappings.json" + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/CredentialListMappings.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListSipCredentialListMappingResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListSipCredentialListMappingResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListSipDomainParams Optional parameters for the method 'ListSipDomain' type ListSipDomainParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -7448,33 +7597,33 @@ type ListSipDomainParams struct { * @param optional nil or *ListSipDomainParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListSipDomainResponse - */ +*/ func (c *DefaultApiService) ListSipDomain(AccountSid string, params *ListSipDomainParams) (*ListSipDomainResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains.json" + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListSipDomainResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListSipDomainResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListSipIpAccessControlListParams Optional parameters for the method 'ListSipIpAccessControlList' type ListSipIpAccessControlListParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -7487,33 +7636,33 @@ type ListSipIpAccessControlListParams struct { * @param optional nil or *ListSipIpAccessControlListParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListSipIpAccessControlListResponse - */ +*/ func (c *DefaultApiService) ListSipIpAccessControlList(AccountSid string, params *ListSipIpAccessControlListParams) (*ListSipIpAccessControlListResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists.json" + path := "/2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListSipIpAccessControlListResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListSipIpAccessControlListResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListSipIpAccessControlListMappingParams Optional parameters for the method 'ListSipIpAccessControlListMapping' type ListSipIpAccessControlListMappingParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -7527,34 +7676,34 @@ type ListSipIpAccessControlListMappingParams struct { * @param optional nil or *ListSipIpAccessControlListMappingParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListSipIpAccessControlListMappingResponse - */ +*/ func (c *DefaultApiService) ListSipIpAccessControlListMapping(AccountSid string, DomainSid string, params *ListSipIpAccessControlListMappingParams) (*ListSipIpAccessControlListMappingResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/IpAccessControlListMappings.json" + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/IpAccessControlListMappings.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListSipIpAccessControlListMappingResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListSipIpAccessControlListMappingResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListSipIpAddressParams Optional parameters for the method 'ListSipIpAddress' type ListSipIpAddressParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -7568,34 +7717,34 @@ type ListSipIpAddressParams struct { * @param optional nil or *ListSipIpAddressParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListSipIpAddressResponse - */ +*/ func (c *DefaultApiService) ListSipIpAddress(AccountSid string, IpAccessControlListSid string, params *ListSipIpAddressParams) (*ListSipIpAddressResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists/{IpAccessControlListSid}/IpAddresses.json" + path := "/2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists/{IpAccessControlListSid}/IpAddresses.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"IpAccessControlListSid"+"}", IpAccessControlListSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListSipIpAddressResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListSipIpAddressResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListTranscriptionParams Optional parameters for the method 'ListTranscription' type ListTranscriptionParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -7608,40 +7757,40 @@ type ListTranscriptionParams struct { * @param optional nil or *ListTranscriptionParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListTranscriptionResponse - */ +*/ func (c *DefaultApiService) ListTranscription(AccountSid string, params *ListTranscriptionParams) (*ListTranscriptionResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Transcriptions.json" + path := "/2010-04-01/Accounts/{AccountSid}/Transcriptions.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListTranscriptionResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListTranscriptionResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListUsageRecordParams Optional parameters for the method 'ListUsageRecord' type ListUsageRecordParams struct { - Category *string `json:"Category,omitempty"` - StartDate *time.Time `json:"StartDate,omitempty"` - EndDate *time.Time `json:"EndDate,omitempty"` - IncludeSubaccounts *bool `json:"IncludeSubaccounts,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + Category *string `json:"Category,omitempty"` + StartDate *time.Time `json:"StartDate,omitempty"` + EndDate *time.Time `json:"EndDate,omitempty"` + IncludeSubaccounts *bool `json:"IncludeSubaccounts,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -7655,52 +7804,52 @@ type ListUsageRecordParams struct { * @param "IncludeSubaccounts" (bool) - Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListUsageRecordResponse - */ +*/ func (c *DefaultApiService) ListUsageRecord(AccountSid string, params *ListUsageRecordParams) (*ListUsageRecordResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Usage/Records.json" + path := "/2010-04-01/Accounts/{AccountSid}/Usage/Records.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Category != nil { - data.Set("Category", *params.Category) - } - if params != nil && params.StartDate != nil { - data.Set("StartDate", fmt.Sprint(*params.StartDate)) - } - if params != nil && params.EndDate != nil { - data.Set("EndDate", fmt.Sprint(*params.EndDate)) - } - if params != nil && params.IncludeSubaccounts != nil { - data.Set("IncludeSubaccounts", fmt.Sprint(*params.IncludeSubaccounts)) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.Category != nil { + data.Set("Category", *params.Category) +} + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) +} + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) +} + if params != nil && params.IncludeSubaccounts != nil { + data.Set("IncludeSubaccounts", fmt.Sprint(*params.IncludeSubaccounts)) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListUsageRecordResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListUsageRecordResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListUsageRecordAllTimeParams Optional parameters for the method 'ListUsageRecordAllTime' type ListUsageRecordAllTimeParams struct { - Category *string `json:"Category,omitempty"` - StartDate *time.Time `json:"StartDate,omitempty"` - EndDate *time.Time `json:"EndDate,omitempty"` - IncludeSubaccounts *bool `json:"IncludeSubaccounts,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + Category *string `json:"Category,omitempty"` + StartDate *time.Time `json:"StartDate,omitempty"` + EndDate *time.Time `json:"EndDate,omitempty"` + IncludeSubaccounts *bool `json:"IncludeSubaccounts,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -7713,52 +7862,52 @@ type ListUsageRecordAllTimeParams struct { * @param "IncludeSubaccounts" (bool) - Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListUsageRecordAllTimeResponse - */ +*/ func (c *DefaultApiService) ListUsageRecordAllTime(AccountSid string, params *ListUsageRecordAllTimeParams) (*ListUsageRecordAllTimeResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Usage/Records/AllTime.json" + path := "/2010-04-01/Accounts/{AccountSid}/Usage/Records/AllTime.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Category != nil { - data.Set("Category", *params.Category) - } - if params != nil && params.StartDate != nil { - data.Set("StartDate", fmt.Sprint(*params.StartDate)) - } - if params != nil && params.EndDate != nil { - data.Set("EndDate", fmt.Sprint(*params.EndDate)) - } - if params != nil && params.IncludeSubaccounts != nil { - data.Set("IncludeSubaccounts", fmt.Sprint(*params.IncludeSubaccounts)) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.Category != nil { + data.Set("Category", *params.Category) +} + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) +} + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) +} + if params != nil && params.IncludeSubaccounts != nil { + data.Set("IncludeSubaccounts", fmt.Sprint(*params.IncludeSubaccounts)) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListUsageRecordAllTimeResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListUsageRecordAllTimeResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListUsageRecordDailyParams Optional parameters for the method 'ListUsageRecordDaily' type ListUsageRecordDailyParams struct { - Category *string `json:"Category,omitempty"` - StartDate *time.Time `json:"StartDate,omitempty"` - EndDate *time.Time `json:"EndDate,omitempty"` - IncludeSubaccounts *bool `json:"IncludeSubaccounts,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + Category *string `json:"Category,omitempty"` + StartDate *time.Time `json:"StartDate,omitempty"` + EndDate *time.Time `json:"EndDate,omitempty"` + IncludeSubaccounts *bool `json:"IncludeSubaccounts,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -7771,52 +7920,52 @@ type ListUsageRecordDailyParams struct { * @param "IncludeSubaccounts" (bool) - Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListUsageRecordDailyResponse - */ +*/ func (c *DefaultApiService) ListUsageRecordDaily(AccountSid string, params *ListUsageRecordDailyParams) (*ListUsageRecordDailyResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Usage/Records/Daily.json" + path := "/2010-04-01/Accounts/{AccountSid}/Usage/Records/Daily.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + + if params != nil && params.Category != nil { + data.Set("Category", *params.Category) +} + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) +} + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) +} + if params != nil && params.IncludeSubaccounts != nil { + data.Set("IncludeSubaccounts", fmt.Sprint(*params.IncludeSubaccounts)) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - if params != nil && params.Category != nil { - data.Set("Category", *params.Category) - } - if params != nil && params.StartDate != nil { - data.Set("StartDate", fmt.Sprint(*params.StartDate)) - } - if params != nil && params.EndDate != nil { - data.Set("EndDate", fmt.Sprint(*params.EndDate)) - } - if params != nil && params.IncludeSubaccounts != nil { - data.Set("IncludeSubaccounts", fmt.Sprint(*params.IncludeSubaccounts)) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListUsageRecordDailyResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListUsageRecordDailyResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } - // ListUsageRecordLastMonthParams Optional parameters for the method 'ListUsageRecordLastMonth' type ListUsageRecordLastMonthParams struct { - Category *string `json:"Category,omitempty"` - StartDate *time.Time `json:"StartDate,omitempty"` - EndDate *time.Time `json:"EndDate,omitempty"` - IncludeSubaccounts *bool `json:"IncludeSubaccounts,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + Category *string `json:"Category,omitempty"` + StartDate *time.Time `json:"StartDate,omitempty"` + EndDate *time.Time `json:"EndDate,omitempty"` + IncludeSubaccounts *bool `json:"IncludeSubaccounts,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -7829,52 +7978,52 @@ type ListUsageRecordLastMonthParams struct { * @param "IncludeSubaccounts" (bool) - Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListUsageRecordLastMonthResponse - */ +*/ func (c *DefaultApiService) ListUsageRecordLastMonth(AccountSid string, params *ListUsageRecordLastMonthParams) (*ListUsageRecordLastMonthResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Usage/Records/LastMonth.json" + path := "/2010-04-01/Accounts/{AccountSid}/Usage/Records/LastMonth.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Category != nil { - data.Set("Category", *params.Category) - } - if params != nil && params.StartDate != nil { - data.Set("StartDate", fmt.Sprint(*params.StartDate)) - } - if params != nil && params.EndDate != nil { - data.Set("EndDate", fmt.Sprint(*params.EndDate)) - } - if params != nil && params.IncludeSubaccounts != nil { - data.Set("IncludeSubaccounts", fmt.Sprint(*params.IncludeSubaccounts)) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.Category != nil { + data.Set("Category", *params.Category) +} + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) +} + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) +} + if params != nil && params.IncludeSubaccounts != nil { + data.Set("IncludeSubaccounts", fmt.Sprint(*params.IncludeSubaccounts)) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListUsageRecordLastMonthResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListUsageRecordLastMonthResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListUsageRecordMonthlyParams Optional parameters for the method 'ListUsageRecordMonthly' type ListUsageRecordMonthlyParams struct { - Category *string `json:"Category,omitempty"` - StartDate *time.Time `json:"StartDate,omitempty"` - EndDate *time.Time `json:"EndDate,omitempty"` - IncludeSubaccounts *bool `json:"IncludeSubaccounts,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + Category *string `json:"Category,omitempty"` + StartDate *time.Time `json:"StartDate,omitempty"` + EndDate *time.Time `json:"EndDate,omitempty"` + IncludeSubaccounts *bool `json:"IncludeSubaccounts,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -7887,52 +8036,52 @@ type ListUsageRecordMonthlyParams struct { * @param "IncludeSubaccounts" (bool) - Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListUsageRecordMonthlyResponse - */ +*/ func (c *DefaultApiService) ListUsageRecordMonthly(AccountSid string, params *ListUsageRecordMonthlyParams) (*ListUsageRecordMonthlyResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Usage/Records/Monthly.json" + path := "/2010-04-01/Accounts/{AccountSid}/Usage/Records/Monthly.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Category != nil { - data.Set("Category", *params.Category) - } - if params != nil && params.StartDate != nil { - data.Set("StartDate", fmt.Sprint(*params.StartDate)) - } - if params != nil && params.EndDate != nil { - data.Set("EndDate", fmt.Sprint(*params.EndDate)) - } - if params != nil && params.IncludeSubaccounts != nil { - data.Set("IncludeSubaccounts", fmt.Sprint(*params.IncludeSubaccounts)) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.Category != nil { + data.Set("Category", *params.Category) +} + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) +} + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) +} + if params != nil && params.IncludeSubaccounts != nil { + data.Set("IncludeSubaccounts", fmt.Sprint(*params.IncludeSubaccounts)) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListUsageRecordMonthlyResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListUsageRecordMonthlyResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListUsageRecordThisMonthParams Optional parameters for the method 'ListUsageRecordThisMonth' type ListUsageRecordThisMonthParams struct { - Category *string `json:"Category,omitempty"` - StartDate *time.Time `json:"StartDate,omitempty"` - EndDate *time.Time `json:"EndDate,omitempty"` - IncludeSubaccounts *bool `json:"IncludeSubaccounts,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + Category *string `json:"Category,omitempty"` + StartDate *time.Time `json:"StartDate,omitempty"` + EndDate *time.Time `json:"EndDate,omitempty"` + IncludeSubaccounts *bool `json:"IncludeSubaccounts,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -7945,52 +8094,52 @@ type ListUsageRecordThisMonthParams struct { * @param "IncludeSubaccounts" (bool) - Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListUsageRecordThisMonthResponse - */ +*/ func (c *DefaultApiService) ListUsageRecordThisMonth(AccountSid string, params *ListUsageRecordThisMonthParams) (*ListUsageRecordThisMonthResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Usage/Records/ThisMonth.json" + path := "/2010-04-01/Accounts/{AccountSid}/Usage/Records/ThisMonth.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Category != nil { - data.Set("Category", *params.Category) - } - if params != nil && params.StartDate != nil { - data.Set("StartDate", fmt.Sprint(*params.StartDate)) - } - if params != nil && params.EndDate != nil { - data.Set("EndDate", fmt.Sprint(*params.EndDate)) - } - if params != nil && params.IncludeSubaccounts != nil { - data.Set("IncludeSubaccounts", fmt.Sprint(*params.IncludeSubaccounts)) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.Category != nil { + data.Set("Category", *params.Category) +} + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) +} + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) +} + if params != nil && params.IncludeSubaccounts != nil { + data.Set("IncludeSubaccounts", fmt.Sprint(*params.IncludeSubaccounts)) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListUsageRecordThisMonthResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListUsageRecordThisMonthResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListUsageRecordTodayParams Optional parameters for the method 'ListUsageRecordToday' type ListUsageRecordTodayParams struct { - Category *string `json:"Category,omitempty"` - StartDate *time.Time `json:"StartDate,omitempty"` - EndDate *time.Time `json:"EndDate,omitempty"` - IncludeSubaccounts *bool `json:"IncludeSubaccounts,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + Category *string `json:"Category,omitempty"` + StartDate *time.Time `json:"StartDate,omitempty"` + EndDate *time.Time `json:"EndDate,omitempty"` + IncludeSubaccounts *bool `json:"IncludeSubaccounts,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -8003,52 +8152,52 @@ type ListUsageRecordTodayParams struct { * @param "IncludeSubaccounts" (bool) - Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListUsageRecordTodayResponse - */ +*/ func (c *DefaultApiService) ListUsageRecordToday(AccountSid string, params *ListUsageRecordTodayParams) (*ListUsageRecordTodayResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Usage/Records/Today.json" + path := "/2010-04-01/Accounts/{AccountSid}/Usage/Records/Today.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Category != nil { - data.Set("Category", *params.Category) - } - if params != nil && params.StartDate != nil { - data.Set("StartDate", fmt.Sprint(*params.StartDate)) - } - if params != nil && params.EndDate != nil { - data.Set("EndDate", fmt.Sprint(*params.EndDate)) - } - if params != nil && params.IncludeSubaccounts != nil { - data.Set("IncludeSubaccounts", fmt.Sprint(*params.IncludeSubaccounts)) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.Category != nil { + data.Set("Category", *params.Category) +} + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) +} + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) +} + if params != nil && params.IncludeSubaccounts != nil { + data.Set("IncludeSubaccounts", fmt.Sprint(*params.IncludeSubaccounts)) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListUsageRecordTodayResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListUsageRecordTodayResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListUsageRecordYearlyParams Optional parameters for the method 'ListUsageRecordYearly' type ListUsageRecordYearlyParams struct { - Category *string `json:"Category,omitempty"` - StartDate *time.Time `json:"StartDate,omitempty"` - EndDate *time.Time `json:"EndDate,omitempty"` - IncludeSubaccounts *bool `json:"IncludeSubaccounts,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + Category *string `json:"Category,omitempty"` + StartDate *time.Time `json:"StartDate,omitempty"` + EndDate *time.Time `json:"EndDate,omitempty"` + IncludeSubaccounts *bool `json:"IncludeSubaccounts,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -8061,52 +8210,52 @@ type ListUsageRecordYearlyParams struct { * @param "IncludeSubaccounts" (bool) - Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListUsageRecordYearlyResponse - */ +*/ func (c *DefaultApiService) ListUsageRecordYearly(AccountSid string, params *ListUsageRecordYearlyParams) (*ListUsageRecordYearlyResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Usage/Records/Yearly.json" + path := "/2010-04-01/Accounts/{AccountSid}/Usage/Records/Yearly.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Category != nil { - data.Set("Category", *params.Category) - } - if params != nil && params.StartDate != nil { - data.Set("StartDate", fmt.Sprint(*params.StartDate)) - } - if params != nil && params.EndDate != nil { - data.Set("EndDate", fmt.Sprint(*params.EndDate)) - } - if params != nil && params.IncludeSubaccounts != nil { - data.Set("IncludeSubaccounts", fmt.Sprint(*params.IncludeSubaccounts)) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.Category != nil { + data.Set("Category", *params.Category) +} + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) +} + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) +} + if params != nil && params.IncludeSubaccounts != nil { + data.Set("IncludeSubaccounts", fmt.Sprint(*params.IncludeSubaccounts)) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListUsageRecordYearlyResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListUsageRecordYearlyResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListUsageRecordYesterdayParams Optional parameters for the method 'ListUsageRecordYesterday' type ListUsageRecordYesterdayParams struct { - Category *string `json:"Category,omitempty"` - StartDate *time.Time `json:"StartDate,omitempty"` - EndDate *time.Time `json:"EndDate,omitempty"` - IncludeSubaccounts *bool `json:"IncludeSubaccounts,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + Category *string `json:"Category,omitempty"` + StartDate *time.Time `json:"StartDate,omitempty"` + EndDate *time.Time `json:"EndDate,omitempty"` + IncludeSubaccounts *bool `json:"IncludeSubaccounts,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -8119,51 +8268,51 @@ type ListUsageRecordYesterdayParams struct { * @param "IncludeSubaccounts" (bool) - Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListUsageRecordYesterdayResponse - */ +*/ func (c *DefaultApiService) ListUsageRecordYesterday(AccountSid string, params *ListUsageRecordYesterdayParams) (*ListUsageRecordYesterdayResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Usage/Records/Yesterday.json" + path := "/2010-04-01/Accounts/{AccountSid}/Usage/Records/Yesterday.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Category != nil { - data.Set("Category", *params.Category) - } - if params != nil && params.StartDate != nil { - data.Set("StartDate", fmt.Sprint(*params.StartDate)) - } - if params != nil && params.EndDate != nil { - data.Set("EndDate", fmt.Sprint(*params.EndDate)) - } - if params != nil && params.IncludeSubaccounts != nil { - data.Set("IncludeSubaccounts", fmt.Sprint(*params.IncludeSubaccounts)) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.Category != nil { + data.Set("Category", *params.Category) +} + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) +} + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) +} + if params != nil && params.IncludeSubaccounts != nil { + data.Set("IncludeSubaccounts", fmt.Sprint(*params.IncludeSubaccounts)) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListUsageRecordYesterdayResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListUsageRecordYesterdayResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListUsageTriggerParams Optional parameters for the method 'ListUsageTrigger' type ListUsageTriggerParams struct { - Recurring *string `json:"Recurring,omitempty"` - TriggerBy *string `json:"TriggerBy,omitempty"` + Recurring *string `json:"Recurring,omitempty"` + TriggerBy *string `json:"TriggerBy,omitempty"` UsageCategory *string `json:"UsageCategory,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -8176,46 +8325,46 @@ type ListUsageTriggerParams struct { * @param "UsageCategory" (string) - The usage category of the UsageTriggers to read. Must be a supported [usage categories](https://www.twilio.com/docs/usage/api/usage-record#usage-categories). * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListUsageTriggerResponse - */ +*/ func (c *DefaultApiService) ListUsageTrigger(AccountSid string, params *ListUsageTriggerParams) (*ListUsageTriggerResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Usage/Triggers.json" + path := "/2010-04-01/Accounts/{AccountSid}/Usage/Triggers.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Recurring != nil { - data.Set("Recurring", *params.Recurring) - } - if params != nil && params.TriggerBy != nil { - data.Set("TriggerBy", *params.TriggerBy) - } - if params != nil && params.UsageCategory != nil { - data.Set("UsageCategory", *params.UsageCategory) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.Recurring != nil { + data.Set("Recurring", *params.Recurring) +} + if params != nil && params.TriggerBy != nil { + data.Set("TriggerBy", *params.TriggerBy) +} + if params != nil && params.UsageCategory != nil { + data.Set("UsageCategory", *params.UsageCategory) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListUsageTriggerResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListUsageTriggerResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateAccountParams Optional parameters for the method 'UpdateAccount' type UpdateAccountParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` - Status *string `json:"Status,omitempty"` + Status *string `json:"Status,omitempty"` } /* @@ -8226,46 +8375,46 @@ type UpdateAccountParams struct { * @param "FriendlyName" (string) - Update the human-readable description of this Account * @param "Status" (string) - Alter the status of this account: use `closed` to irreversibly close this account, `suspended` to temporarily suspend it, or `active` to reactivate it. * @return ApiV2010Account - */ +*/ func (c *DefaultApiService) UpdateAccount(Sid string, params *UpdateAccountParams) (*ApiV2010Account, error) { - path := "/2010-04-01/Accounts/{Sid}.json" + path := "/2010-04-01/Accounts/{Sid}.json" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) - } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ApiV2010Account{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ApiV2010Account{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateAddressParams Optional parameters for the method 'UpdateAddress' type UpdateAddressParams struct { - AutoCorrectAddress *bool `json:"AutoCorrectAddress,omitempty"` - City *string `json:"City,omitempty"` - CustomerName *string `json:"CustomerName,omitempty"` - EmergencyEnabled *bool `json:"EmergencyEnabled,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - PostalCode *string `json:"PostalCode,omitempty"` - Region *string `json:"Region,omitempty"` - Street *string `json:"Street,omitempty"` + AutoCorrectAddress *bool `json:"AutoCorrectAddress,omitempty"` + City *string `json:"City,omitempty"` + CustomerName *string `json:"CustomerName,omitempty"` + EmergencyEnabled *bool `json:"EmergencyEnabled,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + PostalCode *string `json:"PostalCode,omitempty"` + Region *string `json:"Region,omitempty"` + Street *string `json:"Street,omitempty"` } /* @@ -8282,72 +8431,72 @@ type UpdateAddressParams struct { * @param "Region" (string) - The state or region of the address. * @param "Street" (string) - The number and street address of the address. * @return ApiV2010AccountAddress - */ +*/ func (c *DefaultApiService) UpdateAddress(AccountSid string, Sid string, params *UpdateAddressParams) (*ApiV2010AccountAddress, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Addresses/{Sid}.json" + path := "/2010-04-01/Accounts/{AccountSid}/Addresses/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.AutoCorrectAddress != nil { - data.Set("AutoCorrectAddress", fmt.Sprint(*params.AutoCorrectAddress)) - } - if params != nil && params.City != nil { - data.Set("City", *params.City) - } - if params != nil && params.CustomerName != nil { - data.Set("CustomerName", *params.CustomerName) - } - if params != nil && params.EmergencyEnabled != nil { - data.Set("EmergencyEnabled", fmt.Sprint(*params.EmergencyEnabled)) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.PostalCode != nil { - data.Set("PostalCode", *params.PostalCode) - } - if params != nil && params.Region != nil { - data.Set("Region", *params.Region) - } - if params != nil && params.Street != nil { - data.Set("Street", *params.Street) - } + if params != nil && params.AutoCorrectAddress != nil { + data.Set("AutoCorrectAddress", fmt.Sprint(*params.AutoCorrectAddress)) +} + if params != nil && params.City != nil { + data.Set("City", *params.City) +} + if params != nil && params.CustomerName != nil { + data.Set("CustomerName", *params.CustomerName) +} + if params != nil && params.EmergencyEnabled != nil { + data.Set("EmergencyEnabled", fmt.Sprint(*params.EmergencyEnabled)) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.PostalCode != nil { + data.Set("PostalCode", *params.PostalCode) +} + if params != nil && params.Region != nil { + data.Set("Region", *params.Region) +} + if params != nil && params.Street != nil { + data.Set("Street", *params.Street) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ApiV2010AccountAddress{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ApiV2010AccountAddress{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateApplicationParams Optional parameters for the method 'UpdateApplication' type UpdateApplicationParams struct { - ApiVersion *string `json:"ApiVersion,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` + ApiVersion *string `json:"ApiVersion,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` MessageStatusCallback *string `json:"MessageStatusCallback,omitempty"` - SmsFallbackMethod *string `json:"SmsFallbackMethod,omitempty"` - SmsFallbackUrl *string `json:"SmsFallbackUrl,omitempty"` - SmsMethod *string `json:"SmsMethod,omitempty"` - SmsStatusCallback *string `json:"SmsStatusCallback,omitempty"` - SmsUrl *string `json:"SmsUrl,omitempty"` - StatusCallback *string `json:"StatusCallback,omitempty"` - StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` - VoiceCallerIdLookup *bool `json:"VoiceCallerIdLookup,omitempty"` - VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"` - VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` - VoiceMethod *string `json:"VoiceMethod,omitempty"` - VoiceUrl *string `json:"VoiceUrl,omitempty"` + SmsFallbackMethod *string `json:"SmsFallbackMethod,omitempty"` + SmsFallbackUrl *string `json:"SmsFallbackUrl,omitempty"` + SmsMethod *string `json:"SmsMethod,omitempty"` + SmsStatusCallback *string `json:"SmsStatusCallback,omitempty"` + SmsUrl *string `json:"SmsUrl,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` + StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` + VoiceCallerIdLookup *bool `json:"VoiceCallerIdLookup,omitempty"` + VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"` + VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` + VoiceMethod *string `json:"VoiceMethod,omitempty"` + VoiceUrl *string `json:"VoiceUrl,omitempty"` } /* @@ -8372,86 +8521,86 @@ type UpdateApplicationParams struct { * @param "VoiceMethod" (string) - The HTTP method we should use to call `voice_url`. Can be: `GET` or `POST`. * @param "VoiceUrl" (string) - The URL we should call when the phone number assigned to this application receives a call. * @return ApiV2010AccountApplication - */ +*/ func (c *DefaultApiService) UpdateApplication(AccountSid string, Sid string, params *UpdateApplicationParams) (*ApiV2010AccountApplication, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Applications/{Sid}.json" + path := "/2010-04-01/Accounts/{AccountSid}/Applications/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.ApiVersion != nil { - data.Set("ApiVersion", *params.ApiVersion) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.MessageStatusCallback != nil { - data.Set("MessageStatusCallback", *params.MessageStatusCallback) - } - if params != nil && params.SmsFallbackMethod != nil { - data.Set("SmsFallbackMethod", *params.SmsFallbackMethod) - } - if params != nil && params.SmsFallbackUrl != nil { - data.Set("SmsFallbackUrl", *params.SmsFallbackUrl) - } - if params != nil && params.SmsMethod != nil { - data.Set("SmsMethod", *params.SmsMethod) - } - if params != nil && params.SmsStatusCallback != nil { - data.Set("SmsStatusCallback", *params.SmsStatusCallback) - } - if params != nil && params.SmsUrl != nil { - data.Set("SmsUrl", *params.SmsUrl) - } - if params != nil && params.StatusCallback != nil { - data.Set("StatusCallback", *params.StatusCallback) - } - if params != nil && params.StatusCallbackMethod != nil { - data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) - } - if params != nil && params.VoiceCallerIdLookup != nil { - data.Set("VoiceCallerIdLookup", fmt.Sprint(*params.VoiceCallerIdLookup)) - } - if params != nil && params.VoiceFallbackMethod != nil { - data.Set("VoiceFallbackMethod", *params.VoiceFallbackMethod) - } - if params != nil && params.VoiceFallbackUrl != nil { - data.Set("VoiceFallbackUrl", *params.VoiceFallbackUrl) - } - if params != nil && params.VoiceMethod != nil { - data.Set("VoiceMethod", *params.VoiceMethod) - } - if params != nil && params.VoiceUrl != nil { - data.Set("VoiceUrl", *params.VoiceUrl) - } + if params != nil && params.ApiVersion != nil { + data.Set("ApiVersion", *params.ApiVersion) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.MessageStatusCallback != nil { + data.Set("MessageStatusCallback", *params.MessageStatusCallback) +} + if params != nil && params.SmsFallbackMethod != nil { + data.Set("SmsFallbackMethod", *params.SmsFallbackMethod) +} + if params != nil && params.SmsFallbackUrl != nil { + data.Set("SmsFallbackUrl", *params.SmsFallbackUrl) +} + if params != nil && params.SmsMethod != nil { + data.Set("SmsMethod", *params.SmsMethod) +} + if params != nil && params.SmsStatusCallback != nil { + data.Set("SmsStatusCallback", *params.SmsStatusCallback) +} + if params != nil && params.SmsUrl != nil { + data.Set("SmsUrl", *params.SmsUrl) +} + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) +} + if params != nil && params.StatusCallbackMethod != nil { + data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) +} + if params != nil && params.VoiceCallerIdLookup != nil { + data.Set("VoiceCallerIdLookup", fmt.Sprint(*params.VoiceCallerIdLookup)) +} + if params != nil && params.VoiceFallbackMethod != nil { + data.Set("VoiceFallbackMethod", *params.VoiceFallbackMethod) +} + if params != nil && params.VoiceFallbackUrl != nil { + data.Set("VoiceFallbackUrl", *params.VoiceFallbackUrl) +} + if params != nil && params.VoiceMethod != nil { + data.Set("VoiceMethod", *params.VoiceMethod) +} + if params != nil && params.VoiceUrl != nil { + data.Set("VoiceUrl", *params.VoiceUrl) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ApiV2010AccountApplication{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ApiV2010AccountApplication{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateCallParams Optional parameters for the method 'UpdateCall' type UpdateCallParams struct { - FallbackMethod *string `json:"FallbackMethod,omitempty"` - FallbackUrl *string `json:"FallbackUrl,omitempty"` - Method *string `json:"Method,omitempty"` - Status *string `json:"Status,omitempty"` - StatusCallback *string `json:"StatusCallback,omitempty"` + FallbackMethod *string `json:"FallbackMethod,omitempty"` + FallbackUrl *string `json:"FallbackUrl,omitempty"` + Method *string `json:"Method,omitempty"` + Status *string `json:"Status,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` - Twiml *string `json:"Twiml,omitempty"` - Url *string `json:"Url,omitempty"` + Twiml *string `json:"Twiml,omitempty"` + Url *string `json:"Url,omitempty"` } /* @@ -8469,59 +8618,59 @@ type UpdateCallParams struct { * @param "Twiml" (string) - TwiML instructions for the call Twilio will use without fetching Twiml from url. Twiml and url parameters are mutually exclusive * @param "Url" (string) - The absolute URL that returns the TwiML instructions for the call. We will call this URL using the `method` when the call connects. For more information, see the [Url Parameter](https://www.twilio.com/docs/voice/make-calls#specify-a-url-parameter) section in [Making Calls](https://www.twilio.com/docs/voice/make-calls). * @return ApiV2010AccountCall - */ +*/ func (c *DefaultApiService) UpdateCall(AccountSid string, Sid string, params *UpdateCallParams) (*ApiV2010AccountCall, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Calls/{Sid}.json" + path := "/2010-04-01/Accounts/{AccountSid}/Calls/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.FallbackMethod != nil { - data.Set("FallbackMethod", *params.FallbackMethod) - } - if params != nil && params.FallbackUrl != nil { - data.Set("FallbackUrl", *params.FallbackUrl) - } - if params != nil && params.Method != nil { - data.Set("Method", *params.Method) - } - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) - } - if params != nil && params.StatusCallback != nil { - data.Set("StatusCallback", *params.StatusCallback) - } - if params != nil && params.StatusCallbackMethod != nil { - data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) - } - if params != nil && params.Twiml != nil { - data.Set("Twiml", *params.Twiml) - } - if params != nil && params.Url != nil { - data.Set("Url", *params.Url) - } + if params != nil && params.FallbackMethod != nil { + data.Set("FallbackMethod", *params.FallbackMethod) +} + if params != nil && params.FallbackUrl != nil { + data.Set("FallbackUrl", *params.FallbackUrl) +} + if params != nil && params.Method != nil { + data.Set("Method", *params.Method) +} + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) +} + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) +} + if params != nil && params.StatusCallbackMethod != nil { + data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) +} + if params != nil && params.Twiml != nil { + data.Set("Twiml", *params.Twiml) +} + if params != nil && params.Url != nil { + data.Set("Url", *params.Url) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ApiV2010AccountCall{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ApiV2010AccountCall{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateCallFeedbackParams Optional parameters for the method 'UpdateCallFeedback' type UpdateCallFeedbackParams struct { - Issue *[]string `json:"Issue,omitempty"` - QualityScore *int32 `json:"QualityScore,omitempty"` + Issue *[]string `json:"Issue,omitempty"` + QualityScore *int32 `json:"QualityScore,omitempty"` } /* @@ -8533,41 +8682,41 @@ type UpdateCallFeedbackParams struct { * @param "Issue" ([]string) - One or more issues experienced during the call. The issues can be: `imperfect-audio`, `dropped-call`, `incorrect-caller-id`, `post-dial-delay`, `digits-not-captured`, `audio-latency`, `unsolicited-call`, or `one-way-audio`. * @param "QualityScore" (int32) - The call quality expressed as an integer from `1` to `5` where `1` represents very poor call quality and `5` represents a perfect call. * @return ApiV2010AccountCallCallFeedback - */ +*/ func (c *DefaultApiService) UpdateCallFeedback(AccountSid string, CallSid string, params *UpdateCallFeedbackParams) (*ApiV2010AccountCallCallFeedback, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Feedback.json" + path := "/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Feedback.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Issue != nil { - data.Set("Issue", strings.Join(*params.Issue, ",")) - } - if params != nil && params.QualityScore != nil { - data.Set("QualityScore", fmt.Sprint(*params.QualityScore)) - } + if params != nil && params.Issue != nil { + data.Set("Issue", strings.Join(*params.Issue, ",")) +} + if params != nil && params.QualityScore != nil { + data.Set("QualityScore", fmt.Sprint(*params.QualityScore)) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ApiV2010AccountCallCallFeedback{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ApiV2010AccountCallCallFeedback{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateCallRecordingParams Optional parameters for the method 'UpdateCallRecording' type UpdateCallRecordingParams struct { PauseBehavior *string `json:"PauseBehavior,omitempty"` - Status *string `json:"Status,omitempty"` + Status *string `json:"Status,omitempty"` } /* @@ -8580,43 +8729,43 @@ type UpdateCallRecordingParams struct { * @param "PauseBehavior" (string) - Whether to record during a pause. Can be: `skip` or `silence` and the default is `silence`. `skip` does not record during the pause period, while `silence` will replace the actual audio of the call with silence during the pause period. This parameter only applies when setting `status` is set to `paused`. * @param "Status" (string) - The new status of the recording. Can be: `stopped`, `paused`, `in-progress`. * @return ApiV2010AccountCallCallRecording - */ +*/ func (c *DefaultApiService) UpdateCallRecording(AccountSid string, CallSid string, Sid string, params *UpdateCallRecordingParams) (*ApiV2010AccountCallCallRecording, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Recordings/{Sid}.json" + path := "/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Recordings/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PauseBehavior != nil { - data.Set("PauseBehavior", *params.PauseBehavior) - } - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) - } + if params != nil && params.PauseBehavior != nil { + data.Set("PauseBehavior", *params.PauseBehavior) +} + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ApiV2010AccountCallCallRecording{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ApiV2010AccountCallCallRecording{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateConferenceParams Optional parameters for the method 'UpdateConference' type UpdateConferenceParams struct { AnnounceMethod *string `json:"AnnounceMethod,omitempty"` - AnnounceUrl *string `json:"AnnounceUrl,omitempty"` - Status *string `json:"Status,omitempty"` + AnnounceUrl *string `json:"AnnounceUrl,omitempty"` + Status *string `json:"Status,omitempty"` } /* @@ -8628,44 +8777,44 @@ type UpdateConferenceParams struct { * @param "AnnounceUrl" (string) - The URL we should call to announce something into the conference. The URL can return an MP3, a WAV, or a TwiML document with `` or ``. * @param "Status" (string) - The new status of the resource. Can be: Can be: `init`, `in-progress`, or `completed`. Specifying `completed` will end the conference and hang up all participants * @return ApiV2010AccountConference - */ +*/ func (c *DefaultApiService) UpdateConference(AccountSid string, Sid string, params *UpdateConferenceParams) (*ApiV2010AccountConference, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Conferences/{Sid}.json" + path := "/2010-04-01/Accounts/{AccountSid}/Conferences/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.AnnounceMethod != nil { - data.Set("AnnounceMethod", *params.AnnounceMethod) - } - if params != nil && params.AnnounceUrl != nil { - data.Set("AnnounceUrl", *params.AnnounceUrl) - } - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) - } + if params != nil && params.AnnounceMethod != nil { + data.Set("AnnounceMethod", *params.AnnounceMethod) +} + if params != nil && params.AnnounceUrl != nil { + data.Set("AnnounceUrl", *params.AnnounceUrl) +} + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ApiV2010AccountConference{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ApiV2010AccountConference{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateConferenceRecordingParams Optional parameters for the method 'UpdateConferenceRecording' type UpdateConferenceRecordingParams struct { PauseBehavior *string `json:"PauseBehavior,omitempty"` - Status *string `json:"Status,omitempty"` + Status *string `json:"Status,omitempty"` } /* @@ -8678,48 +8827,48 @@ type UpdateConferenceRecordingParams struct { * @param "PauseBehavior" (string) - Whether to record during a pause. Can be: `skip` or `silence` and the default is `silence`. `skip` does not record during the pause period, while `silence` will replace the actual audio of the call with silence during the pause period. This parameter only applies when setting `status` is set to `paused`. * @param "Status" (string) - The new status of the recording. Can be: `stopped`, `paused`, `in-progress`. * @return ApiV2010AccountConferenceConferenceRecording - */ +*/ func (c *DefaultApiService) UpdateConferenceRecording(AccountSid string, ConferenceSid string, Sid string, params *UpdateConferenceRecordingParams) (*ApiV2010AccountConferenceConferenceRecording, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Recordings/{Sid}.json" + path := "/2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Recordings/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"ConferenceSid"+"}", ConferenceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PauseBehavior != nil { - data.Set("PauseBehavior", *params.PauseBehavior) - } - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) - } + if params != nil && params.PauseBehavior != nil { + data.Set("PauseBehavior", *params.PauseBehavior) +} + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ApiV2010AccountConferenceConferenceRecording{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ApiV2010AccountConferenceConferenceRecording{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateConnectAppParams Optional parameters for the method 'UpdateConnectApp' type UpdateConnectAppParams struct { - AuthorizeRedirectUrl *string `json:"AuthorizeRedirectUrl,omitempty"` - CompanyName *string `json:"CompanyName,omitempty"` - DeauthorizeCallbackMethod *string `json:"DeauthorizeCallbackMethod,omitempty"` - DeauthorizeCallbackUrl *string `json:"DeauthorizeCallbackUrl,omitempty"` - Description *string `json:"Description,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - HomepageUrl *string `json:"HomepageUrl,omitempty"` - Permissions *[]string `json:"Permissions,omitempty"` + AuthorizeRedirectUrl *string `json:"AuthorizeRedirectUrl,omitempty"` + CompanyName *string `json:"CompanyName,omitempty"` + DeauthorizeCallbackMethod *string `json:"DeauthorizeCallbackMethod,omitempty"` + DeauthorizeCallbackUrl *string `json:"DeauthorizeCallbackUrl,omitempty"` + Description *string `json:"Description,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + HomepageUrl *string `json:"HomepageUrl,omitempty"` + Permissions *[]string `json:"Permissions,omitempty"` } /* @@ -8737,80 +8886,80 @@ type UpdateConnectAppParams struct { * @param "HomepageUrl" (string) - A public URL where users can obtain more information about this Connect App. * @param "Permissions" ([]string) - A comma-separated list of the permissions you will request from the users of this ConnectApp. Can include: `get-all` and `post-all`. * @return ApiV2010AccountConnectApp - */ +*/ func (c *DefaultApiService) UpdateConnectApp(AccountSid string, Sid string, params *UpdateConnectAppParams) (*ApiV2010AccountConnectApp, error) { - path := "/2010-04-01/Accounts/{AccountSid}/ConnectApps/{Sid}.json" + path := "/2010-04-01/Accounts/{AccountSid}/ConnectApps/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + + if params != nil && params.AuthorizeRedirectUrl != nil { + data.Set("AuthorizeRedirectUrl", *params.AuthorizeRedirectUrl) +} + if params != nil && params.CompanyName != nil { + data.Set("CompanyName", *params.CompanyName) +} + if params != nil && params.DeauthorizeCallbackMethod != nil { + data.Set("DeauthorizeCallbackMethod", *params.DeauthorizeCallbackMethod) +} + if params != nil && params.DeauthorizeCallbackUrl != nil { + data.Set("DeauthorizeCallbackUrl", *params.DeauthorizeCallbackUrl) +} + if params != nil && params.Description != nil { + data.Set("Description", *params.Description) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.HomepageUrl != nil { + data.Set("HomepageUrl", *params.HomepageUrl) +} + if params != nil && params.Permissions != nil { + data.Set("Permissions", strings.Join(*params.Permissions, ",")) +} - if params != nil && params.AuthorizeRedirectUrl != nil { - data.Set("AuthorizeRedirectUrl", *params.AuthorizeRedirectUrl) - } - if params != nil && params.CompanyName != nil { - data.Set("CompanyName", *params.CompanyName) - } - if params != nil && params.DeauthorizeCallbackMethod != nil { - data.Set("DeauthorizeCallbackMethod", *params.DeauthorizeCallbackMethod) - } - if params != nil && params.DeauthorizeCallbackUrl != nil { - data.Set("DeauthorizeCallbackUrl", *params.DeauthorizeCallbackUrl) - } - if params != nil && params.Description != nil { - data.Set("Description", *params.Description) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.HomepageUrl != nil { - data.Set("HomepageUrl", *params.HomepageUrl) - } - if params != nil && params.Permissions != nil { - data.Set("Permissions", strings.Join(*params.Permissions, ",")) - } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountConnectApp{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountConnectApp{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } - // UpdateIncomingPhoneNumberParams Optional parameters for the method 'UpdateIncomingPhoneNumber' type UpdateIncomingPhoneNumberParams struct { - AccountSid2 *string `json:"AccountSid,omitempty"` - AddressSid *string `json:"AddressSid,omitempty"` - ApiVersion *string `json:"ApiVersion,omitempty"` - BundleSid *string `json:"BundleSid,omitempty"` - EmergencyAddressSid *string `json:"EmergencyAddressSid,omitempty"` - EmergencyStatus *string `json:"EmergencyStatus,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - IdentitySid *string `json:"IdentitySid,omitempty"` - SmsApplicationSid *string `json:"SmsApplicationSid,omitempty"` - SmsFallbackMethod *string `json:"SmsFallbackMethod,omitempty"` - SmsFallbackUrl *string `json:"SmsFallbackUrl,omitempty"` - SmsMethod *string `json:"SmsMethod,omitempty"` - SmsUrl *string `json:"SmsUrl,omitempty"` - StatusCallback *string `json:"StatusCallback,omitempty"` + AccountSid2 *string `json:"AccountSid,omitempty"` + AddressSid *string `json:"AddressSid,omitempty"` + ApiVersion *string `json:"ApiVersion,omitempty"` + BundleSid *string `json:"BundleSid,omitempty"` + EmergencyAddressSid *string `json:"EmergencyAddressSid,omitempty"` + EmergencyStatus *string `json:"EmergencyStatus,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + IdentitySid *string `json:"IdentitySid,omitempty"` + SmsApplicationSid *string `json:"SmsApplicationSid,omitempty"` + SmsFallbackMethod *string `json:"SmsFallbackMethod,omitempty"` + SmsFallbackUrl *string `json:"SmsFallbackUrl,omitempty"` + SmsMethod *string `json:"SmsMethod,omitempty"` + SmsUrl *string `json:"SmsUrl,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` - TrunkSid *string `json:"TrunkSid,omitempty"` - VoiceApplicationSid *string `json:"VoiceApplicationSid,omitempty"` - VoiceCallerIdLookup *bool `json:"VoiceCallerIdLookup,omitempty"` - VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"` - VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` - VoiceMethod *string `json:"VoiceMethod,omitempty"` - VoiceReceiveMode *string `json:"VoiceReceiveMode,omitempty"` - VoiceUrl *string `json:"VoiceUrl,omitempty"` + TrunkSid *string `json:"TrunkSid,omitempty"` + VoiceApplicationSid *string `json:"VoiceApplicationSid,omitempty"` + VoiceCallerIdLookup *bool `json:"VoiceCallerIdLookup,omitempty"` + VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"` + VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` + VoiceMethod *string `json:"VoiceMethod,omitempty"` + VoiceReceiveMode *string `json:"VoiceReceiveMode,omitempty"` + VoiceUrl *string `json:"VoiceUrl,omitempty"` } /* @@ -8843,100 +8992,100 @@ type UpdateIncomingPhoneNumberParams struct { * @param "VoiceReceiveMode" (string) - The configuration parameter for the phone number to receive incoming voice calls or faxes. Can be: `fax` or `voice` and defaults to `voice`. * @param "VoiceUrl" (string) - The URL that we should call to answer a call to the phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set. * @return ApiV2010AccountIncomingPhoneNumber - */ +*/ func (c *DefaultApiService) UpdateIncomingPhoneNumber(AccountSid string, Sid string, params *UpdateIncomingPhoneNumberParams) (*ApiV2010AccountIncomingPhoneNumber, error) { - path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{Sid}.json" + path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.AccountSid2 != nil { - data.Set("AccountSid2", *params.AccountSid2) - } - if params != nil && params.AddressSid != nil { - data.Set("AddressSid", *params.AddressSid) - } - if params != nil && params.ApiVersion != nil { - data.Set("ApiVersion", *params.ApiVersion) - } - if params != nil && params.BundleSid != nil { - data.Set("BundleSid", *params.BundleSid) - } - if params != nil && params.EmergencyAddressSid != nil { - data.Set("EmergencyAddressSid", *params.EmergencyAddressSid) - } - if params != nil && params.EmergencyStatus != nil { - data.Set("EmergencyStatus", *params.EmergencyStatus) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.IdentitySid != nil { - data.Set("IdentitySid", *params.IdentitySid) - } - if params != nil && params.SmsApplicationSid != nil { - data.Set("SmsApplicationSid", *params.SmsApplicationSid) - } - if params != nil && params.SmsFallbackMethod != nil { - data.Set("SmsFallbackMethod", *params.SmsFallbackMethod) - } - if params != nil && params.SmsFallbackUrl != nil { - data.Set("SmsFallbackUrl", *params.SmsFallbackUrl) - } - if params != nil && params.SmsMethod != nil { - data.Set("SmsMethod", *params.SmsMethod) - } - if params != nil && params.SmsUrl != nil { - data.Set("SmsUrl", *params.SmsUrl) - } - if params != nil && params.StatusCallback != nil { - data.Set("StatusCallback", *params.StatusCallback) - } - if params != nil && params.StatusCallbackMethod != nil { - data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) - } - if params != nil && params.TrunkSid != nil { - data.Set("TrunkSid", *params.TrunkSid) - } - if params != nil && params.VoiceApplicationSid != nil { - data.Set("VoiceApplicationSid", *params.VoiceApplicationSid) - } - if params != nil && params.VoiceCallerIdLookup != nil { - data.Set("VoiceCallerIdLookup", fmt.Sprint(*params.VoiceCallerIdLookup)) - } - if params != nil && params.VoiceFallbackMethod != nil { - data.Set("VoiceFallbackMethod", *params.VoiceFallbackMethod) - } - if params != nil && params.VoiceFallbackUrl != nil { - data.Set("VoiceFallbackUrl", *params.VoiceFallbackUrl) - } - if params != nil && params.VoiceMethod != nil { - data.Set("VoiceMethod", *params.VoiceMethod) - } - if params != nil && params.VoiceReceiveMode != nil { - data.Set("VoiceReceiveMode", *params.VoiceReceiveMode) - } - if params != nil && params.VoiceUrl != nil { - data.Set("VoiceUrl", *params.VoiceUrl) - } + if params != nil && params.AccountSid2 != nil { + data.Set("AccountSid2", *params.AccountSid2) +} + if params != nil && params.AddressSid != nil { + data.Set("AddressSid", *params.AddressSid) +} + if params != nil && params.ApiVersion != nil { + data.Set("ApiVersion", *params.ApiVersion) +} + if params != nil && params.BundleSid != nil { + data.Set("BundleSid", *params.BundleSid) +} + if params != nil && params.EmergencyAddressSid != nil { + data.Set("EmergencyAddressSid", *params.EmergencyAddressSid) +} + if params != nil && params.EmergencyStatus != nil { + data.Set("EmergencyStatus", *params.EmergencyStatus) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.IdentitySid != nil { + data.Set("IdentitySid", *params.IdentitySid) +} + if params != nil && params.SmsApplicationSid != nil { + data.Set("SmsApplicationSid", *params.SmsApplicationSid) +} + if params != nil && params.SmsFallbackMethod != nil { + data.Set("SmsFallbackMethod", *params.SmsFallbackMethod) +} + if params != nil && params.SmsFallbackUrl != nil { + data.Set("SmsFallbackUrl", *params.SmsFallbackUrl) +} + if params != nil && params.SmsMethod != nil { + data.Set("SmsMethod", *params.SmsMethod) +} + if params != nil && params.SmsUrl != nil { + data.Set("SmsUrl", *params.SmsUrl) +} + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) +} + if params != nil && params.StatusCallbackMethod != nil { + data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) +} + if params != nil && params.TrunkSid != nil { + data.Set("TrunkSid", *params.TrunkSid) +} + if params != nil && params.VoiceApplicationSid != nil { + data.Set("VoiceApplicationSid", *params.VoiceApplicationSid) +} + if params != nil && params.VoiceCallerIdLookup != nil { + data.Set("VoiceCallerIdLookup", fmt.Sprint(*params.VoiceCallerIdLookup)) +} + if params != nil && params.VoiceFallbackMethod != nil { + data.Set("VoiceFallbackMethod", *params.VoiceFallbackMethod) +} + if params != nil && params.VoiceFallbackUrl != nil { + data.Set("VoiceFallbackUrl", *params.VoiceFallbackUrl) +} + if params != nil && params.VoiceMethod != nil { + data.Set("VoiceMethod", *params.VoiceMethod) +} + if params != nil && params.VoiceReceiveMode != nil { + data.Set("VoiceReceiveMode", *params.VoiceReceiveMode) +} + if params != nil && params.VoiceUrl != nil { + data.Set("VoiceUrl", *params.VoiceUrl) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ApiV2010AccountIncomingPhoneNumber{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ApiV2010AccountIncomingPhoneNumber{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateKeyParams Optional parameters for the method 'UpdateKey' type UpdateKeyParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` @@ -8949,38 +9098,38 @@ type UpdateKeyParams struct { * @param optional nil or *UpdateKeyParams - Optional Parameters: * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It can be up to 64 characters long. * @return ApiV2010AccountKey - */ +*/ func (c *DefaultApiService) UpdateKey(AccountSid string, Sid string, params *UpdateKeyParams) (*ApiV2010AccountKey, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Keys/{Sid}.json" + path := "/2010-04-01/Accounts/{AccountSid}/Keys/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ApiV2010AccountKey{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ApiV2010AccountKey{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateMemberParams Optional parameters for the method 'UpdateMember' type UpdateMemberParams struct { Method *string `json:"Method,omitempty"` - Url *string `json:"Url,omitempty"` + Url *string `json:"Url,omitempty"` } /* @@ -8993,38 +9142,38 @@ type UpdateMemberParams struct { * @param "Method" (string) - How to pass the update request data. Can be `GET` or `POST` and the default is `POST`. `POST` sends the data as encoded form data and `GET` sends the data as query parameters. * @param "Url" (string) - The absolute URL of the Queue resource. * @return ApiV2010AccountQueueMember - */ +*/ func (c *DefaultApiService) UpdateMember(AccountSid string, QueueSid string, CallSid string, params *UpdateMemberParams) (*ApiV2010AccountQueueMember, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Queues/{QueueSid}/Members/{CallSid}.json" + path := "/2010-04-01/Accounts/{AccountSid}/Queues/{QueueSid}/Members/{CallSid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"QueueSid"+"}", QueueSid, -1) path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Method != nil { - data.Set("Method", *params.Method) - } - if params != nil && params.Url != nil { - data.Set("Url", *params.Url) - } + if params != nil && params.Method != nil { + data.Set("Method", *params.Method) +} + if params != nil && params.Url != nil { + data.Set("Url", *params.Url) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ApiV2010AccountQueueMember{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ApiV2010AccountQueueMember{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateMessageParams Optional parameters for the method 'UpdateMessage' type UpdateMessageParams struct { Body *string `json:"Body,omitempty"` @@ -9038,34 +9187,34 @@ type UpdateMessageParams struct { * @param optional nil or *UpdateMessageParams - Optional Parameters: * @param "Body" (string) - The text of the message you want to send. Can be up to 1,600 characters long. * @return ApiV2010AccountMessage - */ +*/ func (c *DefaultApiService) UpdateMessage(AccountSid string, Sid string, params *UpdateMessageParams) (*ApiV2010AccountMessage, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Messages/{Sid}.json" + path := "/2010-04-01/Accounts/{AccountSid}/Messages/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Body != nil { - data.Set("Body", *params.Body) - } + if params != nil && params.Body != nil { + data.Set("Body", *params.Body) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ApiV2010AccountMessage{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ApiV2010AccountMessage{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateOutgoingCallerIdParams Optional parameters for the method 'UpdateOutgoingCallerId' type UpdateOutgoingCallerIdParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` @@ -9079,48 +9228,48 @@ type UpdateOutgoingCallerIdParams struct { * @param optional nil or *UpdateOutgoingCallerIdParams - Optional Parameters: * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It can be up to 64 characters long. * @return ApiV2010AccountOutgoingCallerId - */ +*/ func (c *DefaultApiService) UpdateOutgoingCallerId(AccountSid string, Sid string, params *UpdateOutgoingCallerIdParams) (*ApiV2010AccountOutgoingCallerId, error) { - path := "/2010-04-01/Accounts/{AccountSid}/OutgoingCallerIds/{Sid}.json" + path := "/2010-04-01/Accounts/{AccountSid}/OutgoingCallerIds/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ApiV2010AccountOutgoingCallerId{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ApiV2010AccountOutgoingCallerId{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateParticipantParams Optional parameters for the method 'UpdateParticipant' type UpdateParticipantParams struct { - AnnounceMethod *string `json:"AnnounceMethod,omitempty"` - AnnounceUrl *string `json:"AnnounceUrl,omitempty"` - BeepOnExit *bool `json:"BeepOnExit,omitempty"` - CallSidToCoach *string `json:"CallSidToCoach,omitempty"` - Coaching *bool `json:"Coaching,omitempty"` - EndConferenceOnExit *bool `json:"EndConferenceOnExit,omitempty"` - Hold *bool `json:"Hold,omitempty"` - HoldMethod *string `json:"HoldMethod,omitempty"` - HoldUrl *string `json:"HoldUrl,omitempty"` - Muted *bool `json:"Muted,omitempty"` - WaitMethod *string `json:"WaitMethod,omitempty"` - WaitUrl *string `json:"WaitUrl,omitempty"` + AnnounceMethod *string `json:"AnnounceMethod,omitempty"` + AnnounceUrl *string `json:"AnnounceUrl,omitempty"` + BeepOnExit *bool `json:"BeepOnExit,omitempty"` + CallSidToCoach *string `json:"CallSidToCoach,omitempty"` + Coaching *bool `json:"Coaching,omitempty"` + EndConferenceOnExit *bool `json:"EndConferenceOnExit,omitempty"` + Hold *bool `json:"Hold,omitempty"` + HoldMethod *string `json:"HoldMethod,omitempty"` + HoldUrl *string `json:"HoldUrl,omitempty"` + Muted *bool `json:"Muted,omitempty"` + WaitMethod *string `json:"WaitMethod,omitempty"` + WaitUrl *string `json:"WaitUrl,omitempty"` } /* @@ -9143,73 +9292,73 @@ type UpdateParticipantParams struct { * @param "WaitMethod" (string) - The HTTP method we should use to call `wait_url`. Can be `GET` or `POST` and the default is `POST`. When using a static audio file, this should be `GET` so that we can cache the file. * @param "WaitUrl" (string) - The URL we should call using the `wait_method` for the music to play while participants are waiting for the conference to start. The default value is the URL of our standard hold music. [Learn more about hold music](https://www.twilio.com/labs/twimlets/holdmusic). * @return ApiV2010AccountConferenceParticipant - */ +*/ func (c *DefaultApiService) UpdateParticipant(AccountSid string, ConferenceSid string, CallSid string, params *UpdateParticipantParams) (*ApiV2010AccountConferenceParticipant, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Participants/{CallSid}.json" + path := "/2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Participants/{CallSid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"ConferenceSid"+"}", ConferenceSid, -1) path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.AnnounceMethod != nil { - data.Set("AnnounceMethod", *params.AnnounceMethod) - } - if params != nil && params.AnnounceUrl != nil { - data.Set("AnnounceUrl", *params.AnnounceUrl) - } - if params != nil && params.BeepOnExit != nil { - data.Set("BeepOnExit", fmt.Sprint(*params.BeepOnExit)) - } - if params != nil && params.CallSidToCoach != nil { - data.Set("CallSidToCoach", *params.CallSidToCoach) - } - if params != nil && params.Coaching != nil { - data.Set("Coaching", fmt.Sprint(*params.Coaching)) - } - if params != nil && params.EndConferenceOnExit != nil { - data.Set("EndConferenceOnExit", fmt.Sprint(*params.EndConferenceOnExit)) - } - if params != nil && params.Hold != nil { - data.Set("Hold", fmt.Sprint(*params.Hold)) - } - if params != nil && params.HoldMethod != nil { - data.Set("HoldMethod", *params.HoldMethod) - } - if params != nil && params.HoldUrl != nil { - data.Set("HoldUrl", *params.HoldUrl) - } - if params != nil && params.Muted != nil { - data.Set("Muted", fmt.Sprint(*params.Muted)) - } - if params != nil && params.WaitMethod != nil { - data.Set("WaitMethod", *params.WaitMethod) - } - if params != nil && params.WaitUrl != nil { - data.Set("WaitUrl", *params.WaitUrl) - } + if params != nil && params.AnnounceMethod != nil { + data.Set("AnnounceMethod", *params.AnnounceMethod) +} + if params != nil && params.AnnounceUrl != nil { + data.Set("AnnounceUrl", *params.AnnounceUrl) +} + if params != nil && params.BeepOnExit != nil { + data.Set("BeepOnExit", fmt.Sprint(*params.BeepOnExit)) +} + if params != nil && params.CallSidToCoach != nil { + data.Set("CallSidToCoach", *params.CallSidToCoach) +} + if params != nil && params.Coaching != nil { + data.Set("Coaching", fmt.Sprint(*params.Coaching)) +} + if params != nil && params.EndConferenceOnExit != nil { + data.Set("EndConferenceOnExit", fmt.Sprint(*params.EndConferenceOnExit)) +} + if params != nil && params.Hold != nil { + data.Set("Hold", fmt.Sprint(*params.Hold)) +} + if params != nil && params.HoldMethod != nil { + data.Set("HoldMethod", *params.HoldMethod) +} + if params != nil && params.HoldUrl != nil { + data.Set("HoldUrl", *params.HoldUrl) +} + if params != nil && params.Muted != nil { + data.Set("Muted", fmt.Sprint(*params.Muted)) +} + if params != nil && params.WaitMethod != nil { + data.Set("WaitMethod", *params.WaitMethod) +} + if params != nil && params.WaitUrl != nil { + data.Set("WaitUrl", *params.WaitUrl) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ApiV2010AccountConferenceParticipant{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ApiV2010AccountConferenceParticipant{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdatePaymentsParams Optional parameters for the method 'UpdatePayments' type UpdatePaymentsParams struct { - Capture *string `json:"Capture,omitempty"` + Capture *string `json:"Capture,omitempty"` IdempotencyKey *string `json:"IdempotencyKey,omitempty"` - Status *string `json:"Status,omitempty"` + Status *string `json:"Status,omitempty"` StatusCallback *string `json:"StatusCallback,omitempty"` } @@ -9225,48 +9374,48 @@ type UpdatePaymentsParams struct { * @param "Status" (string) - Indicates whether the current payment session should be cancelled or completed. When `cancel` the payment session is cancelled. When `complete`, Twilio sends the payment information to the selected connector for processing. * @param "StatusCallback" (string) - Provide an absolute or relative URL to receive status updates regarding your Pay session. Read more about the [Update](https://www.twilio.com/docs/voice/api/payment-resource#statuscallback-update) and [Complete/Cancel](https://www.twilio.com/docs/voice/api/payment-resource#statuscallback-cancelcomplete) POST requests. * @return ApiV2010AccountCallPayments - */ +*/ func (c *DefaultApiService) UpdatePayments(AccountSid string, CallSid string, Sid string, params *UpdatePaymentsParams) (*ApiV2010AccountCallPayments, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Payments/{Sid}.json" + path := "/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Payments/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Capture != nil { - data.Set("Capture", *params.Capture) - } - if params != nil && params.IdempotencyKey != nil { - data.Set("IdempotencyKey", *params.IdempotencyKey) - } - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) - } - if params != nil && params.StatusCallback != nil { - data.Set("StatusCallback", *params.StatusCallback) - } + if params != nil && params.Capture != nil { + data.Set("Capture", *params.Capture) +} + if params != nil && params.IdempotencyKey != nil { + data.Set("IdempotencyKey", *params.IdempotencyKey) +} + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) +} + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ApiV2010AccountCallPayments{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ApiV2010AccountCallPayments{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateQueueParams Optional parameters for the method 'UpdateQueue' type UpdateQueueParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` - MaxSize *int32 `json:"MaxSize,omitempty"` + MaxSize *int32 `json:"MaxSize,omitempty"` } /* @@ -9278,45 +9427,45 @@ type UpdateQueueParams struct { * @param "FriendlyName" (string) - A descriptive string that you created to describe this resource. It can be up to 64 characters long. * @param "MaxSize" (int32) - The maximum number of calls allowed to be in the queue. The default is 100. The maximum is 5000. * @return ApiV2010AccountQueue - */ +*/ func (c *DefaultApiService) UpdateQueue(AccountSid string, Sid string, params *UpdateQueueParams) (*ApiV2010AccountQueue, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Queues/{Sid}.json" + path := "/2010-04-01/Accounts/{AccountSid}/Queues/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.MaxSize != nil { - data.Set("MaxSize", fmt.Sprint(*params.MaxSize)) - } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.MaxSize != nil { + data.Set("MaxSize", fmt.Sprint(*params.MaxSize)) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ApiV2010AccountQueue{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ApiV2010AccountQueue{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateShortCodeParams Optional parameters for the method 'UpdateShortCode' type UpdateShortCodeParams struct { - ApiVersion *string `json:"ApiVersion,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` + ApiVersion *string `json:"ApiVersion,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` SmsFallbackMethod *string `json:"SmsFallbackMethod,omitempty"` - SmsFallbackUrl *string `json:"SmsFallbackUrl,omitempty"` - SmsMethod *string `json:"SmsMethod,omitempty"` - SmsUrl *string `json:"SmsUrl,omitempty"` + SmsFallbackUrl *string `json:"SmsFallbackUrl,omitempty"` + SmsMethod *string `json:"SmsMethod,omitempty"` + SmsUrl *string `json:"SmsUrl,omitempty"` } /* @@ -9332,49 +9481,49 @@ type UpdateShortCodeParams struct { * @param "SmsMethod" (string) - The HTTP method we should use when calling the `sms_url`. Can be: `GET` or `POST`. * @param "SmsUrl" (string) - The URL we should call when receiving an incoming SMS message to this short code. * @return ApiV2010AccountShortCode - */ +*/ func (c *DefaultApiService) UpdateShortCode(AccountSid string, Sid string, params *UpdateShortCodeParams) (*ApiV2010AccountShortCode, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SMS/ShortCodes/{Sid}.json" + path := "/2010-04-01/Accounts/{AccountSid}/SMS/ShortCodes/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.ApiVersion != nil { - data.Set("ApiVersion", *params.ApiVersion) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.SmsFallbackMethod != nil { - data.Set("SmsFallbackMethod", *params.SmsFallbackMethod) - } - if params != nil && params.SmsFallbackUrl != nil { - data.Set("SmsFallbackUrl", *params.SmsFallbackUrl) - } - if params != nil && params.SmsMethod != nil { - data.Set("SmsMethod", *params.SmsMethod) - } - if params != nil && params.SmsUrl != nil { - data.Set("SmsUrl", *params.SmsUrl) - } + if params != nil && params.ApiVersion != nil { + data.Set("ApiVersion", *params.ApiVersion) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.SmsFallbackMethod != nil { + data.Set("SmsFallbackMethod", *params.SmsFallbackMethod) +} + if params != nil && params.SmsFallbackUrl != nil { + data.Set("SmsFallbackUrl", *params.SmsFallbackUrl) +} + if params != nil && params.SmsMethod != nil { + data.Set("SmsMethod", *params.SmsMethod) +} + if params != nil && params.SmsUrl != nil { + data.Set("SmsUrl", *params.SmsUrl) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ApiV2010AccountShortCode{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ApiV2010AccountShortCode{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateSigningKeyParams Optional parameters for the method 'UpdateSigningKey' type UpdateSigningKeyParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` @@ -9385,36 +9534,36 @@ type UpdateSigningKeyParams struct { * @param AccountSid * @param Sid * @param optional nil or *UpdateSigningKeyParams - Optional Parameters: -* @param "FriendlyName" (string) - +* @param "FriendlyName" (string) - * @return ApiV2010AccountSigningKey - */ +*/ func (c *DefaultApiService) UpdateSigningKey(AccountSid string, Sid string, params *UpdateSigningKeyParams) (*ApiV2010AccountSigningKey, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SigningKeys/{Sid}.json" + path := "/2010-04-01/Accounts/{AccountSid}/SigningKeys/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ApiV2010AccountSigningKey{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ApiV2010AccountSigningKey{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateSipCredentialParams Optional parameters for the method 'UpdateSipCredential' type UpdateSipCredentialParams struct { Password *string `json:"Password,omitempty"` @@ -9429,35 +9578,35 @@ type UpdateSipCredentialParams struct { * @param optional nil or *UpdateSipCredentialParams - Optional Parameters: * @param "Password" (string) - The password that the username will use when authenticating SIP requests. The password must be a minimum of 12 characters, contain at least 1 digit, and have mixed case. (eg `IWasAtSignal2018`) * @return ApiV2010AccountSipSipCredentialListSipCredential - */ +*/ func (c *DefaultApiService) UpdateSipCredential(AccountSid string, CredentialListSid string, Sid string, params *UpdateSipCredentialParams) (*ApiV2010AccountSipSipCredentialListSipCredential, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{CredentialListSid}/Credentials/{Sid}.json" + path := "/2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{CredentialListSid}/Credentials/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"CredentialListSid"+"}", CredentialListSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Password != nil { - data.Set("Password", *params.Password) - } + if params != nil && params.Password != nil { + data.Set("Password", *params.Password) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ApiV2010AccountSipSipCredentialListSipCredential{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ApiV2010AccountSipSipCredentialListSipCredential{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateSipCredentialListParams Optional parameters for the method 'UpdateSipCredentialList' type UpdateSipCredentialListParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` @@ -9471,49 +9620,49 @@ type UpdateSipCredentialListParams struct { * @param optional nil or *UpdateSipCredentialListParams - Optional Parameters: * @param "FriendlyName" (string) - A human readable descriptive text for a CredentialList, up to 64 characters long. * @return ApiV2010AccountSipSipCredentialList - */ +*/ func (c *DefaultApiService) UpdateSipCredentialList(AccountSid string, Sid string, params *UpdateSipCredentialListParams) (*ApiV2010AccountSipSipCredentialList, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{Sid}.json" + path := "/2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ApiV2010AccountSipSipCredentialList{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ApiV2010AccountSipSipCredentialList{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateSipDomainParams Optional parameters for the method 'UpdateSipDomain' type UpdateSipDomainParams struct { - ByocTrunkSid *string `json:"ByocTrunkSid,omitempty"` - DomainName *string `json:"DomainName,omitempty"` - EmergencyCallerSid *string `json:"EmergencyCallerSid,omitempty"` - EmergencyCallingEnabled *bool `json:"EmergencyCallingEnabled,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Secure *bool `json:"Secure,omitempty"` - SipRegistration *bool `json:"SipRegistration,omitempty"` - VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"` - VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` - VoiceMethod *string `json:"VoiceMethod,omitempty"` + ByocTrunkSid *string `json:"ByocTrunkSid,omitempty"` + DomainName *string `json:"DomainName,omitempty"` + EmergencyCallerSid *string `json:"EmergencyCallerSid,omitempty"` + EmergencyCallingEnabled *bool `json:"EmergencyCallingEnabled,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Secure *bool `json:"Secure,omitempty"` + SipRegistration *bool `json:"SipRegistration,omitempty"` + VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"` + VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` + VoiceMethod *string `json:"VoiceMethod,omitempty"` VoiceStatusCallbackMethod *string `json:"VoiceStatusCallbackMethod,omitempty"` - VoiceStatusCallbackUrl *string `json:"VoiceStatusCallbackUrl,omitempty"` - VoiceUrl *string `json:"VoiceUrl,omitempty"` + VoiceStatusCallbackUrl *string `json:"VoiceStatusCallbackUrl,omitempty"` + VoiceUrl *string `json:"VoiceUrl,omitempty"` } /* @@ -9536,70 +9685,70 @@ type UpdateSipDomainParams struct { * @param "VoiceStatusCallbackUrl" (string) - The URL that we should call to pass status parameters (such as call ended) to your application. * @param "VoiceUrl" (string) - The URL we should call when the domain receives a call. * @return ApiV2010AccountSipSipDomain - */ +*/ func (c *DefaultApiService) UpdateSipDomain(AccountSid string, Sid string, params *UpdateSipDomainParams) (*ApiV2010AccountSipSipDomain, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{Sid}.json" + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.ByocTrunkSid != nil { - data.Set("ByocTrunkSid", *params.ByocTrunkSid) - } - if params != nil && params.DomainName != nil { - data.Set("DomainName", *params.DomainName) - } - if params != nil && params.EmergencyCallerSid != nil { - data.Set("EmergencyCallerSid", *params.EmergencyCallerSid) - } - if params != nil && params.EmergencyCallingEnabled != nil { - data.Set("EmergencyCallingEnabled", fmt.Sprint(*params.EmergencyCallingEnabled)) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.Secure != nil { - data.Set("Secure", fmt.Sprint(*params.Secure)) - } - if params != nil && params.SipRegistration != nil { - data.Set("SipRegistration", fmt.Sprint(*params.SipRegistration)) - } - if params != nil && params.VoiceFallbackMethod != nil { - data.Set("VoiceFallbackMethod", *params.VoiceFallbackMethod) - } - if params != nil && params.VoiceFallbackUrl != nil { - data.Set("VoiceFallbackUrl", *params.VoiceFallbackUrl) - } - if params != nil && params.VoiceMethod != nil { - data.Set("VoiceMethod", *params.VoiceMethod) - } - if params != nil && params.VoiceStatusCallbackMethod != nil { - data.Set("VoiceStatusCallbackMethod", *params.VoiceStatusCallbackMethod) - } - if params != nil && params.VoiceStatusCallbackUrl != nil { - data.Set("VoiceStatusCallbackUrl", *params.VoiceStatusCallbackUrl) - } - if params != nil && params.VoiceUrl != nil { - data.Set("VoiceUrl", *params.VoiceUrl) - } + if params != nil && params.ByocTrunkSid != nil { + data.Set("ByocTrunkSid", *params.ByocTrunkSid) +} + if params != nil && params.DomainName != nil { + data.Set("DomainName", *params.DomainName) +} + if params != nil && params.EmergencyCallerSid != nil { + data.Set("EmergencyCallerSid", *params.EmergencyCallerSid) +} + if params != nil && params.EmergencyCallingEnabled != nil { + data.Set("EmergencyCallingEnabled", fmt.Sprint(*params.EmergencyCallingEnabled)) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.Secure != nil { + data.Set("Secure", fmt.Sprint(*params.Secure)) +} + if params != nil && params.SipRegistration != nil { + data.Set("SipRegistration", fmt.Sprint(*params.SipRegistration)) +} + if params != nil && params.VoiceFallbackMethod != nil { + data.Set("VoiceFallbackMethod", *params.VoiceFallbackMethod) +} + if params != nil && params.VoiceFallbackUrl != nil { + data.Set("VoiceFallbackUrl", *params.VoiceFallbackUrl) +} + if params != nil && params.VoiceMethod != nil { + data.Set("VoiceMethod", *params.VoiceMethod) +} + if params != nil && params.VoiceStatusCallbackMethod != nil { + data.Set("VoiceStatusCallbackMethod", *params.VoiceStatusCallbackMethod) +} + if params != nil && params.VoiceStatusCallbackUrl != nil { + data.Set("VoiceStatusCallbackUrl", *params.VoiceStatusCallbackUrl) +} + if params != nil && params.VoiceUrl != nil { + data.Set("VoiceUrl", *params.VoiceUrl) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ApiV2010AccountSipSipDomain{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ApiV2010AccountSipSipDomain{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateSipIpAccessControlListParams Optional parameters for the method 'UpdateSipIpAccessControlList' type UpdateSipIpAccessControlListParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` @@ -9613,39 +9762,39 @@ type UpdateSipIpAccessControlListParams struct { * @param optional nil or *UpdateSipIpAccessControlListParams - Optional Parameters: * @param "FriendlyName" (string) - A human readable descriptive text, up to 64 characters long. * @return ApiV2010AccountSipSipIpAccessControlList - */ +*/ func (c *DefaultApiService) UpdateSipIpAccessControlList(AccountSid string, Sid string, params *UpdateSipIpAccessControlListParams) (*ApiV2010AccountSipSipIpAccessControlList, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists/{Sid}.json" + path := "/2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ApiV2010AccountSipSipIpAccessControlList{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ApiV2010AccountSipSipIpAccessControlList{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateSipIpAddressParams Optional parameters for the method 'UpdateSipIpAddress' type UpdateSipIpAddressParams struct { - CidrPrefixLength *int32 `json:"CidrPrefixLength,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - IpAddress *string `json:"IpAddress,omitempty"` + CidrPrefixLength *int32 `json:"CidrPrefixLength,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + IpAddress *string `json:"IpAddress,omitempty"` } /* @@ -9659,46 +9808,46 @@ type UpdateSipIpAddressParams struct { * @param "FriendlyName" (string) - A human readable descriptive text for this resource, up to 64 characters long. * @param "IpAddress" (string) - An IP address in dotted decimal notation from which you want to accept traffic. Any SIP requests from this IP address will be allowed by Twilio. IPv4 only supported today. * @return ApiV2010AccountSipSipIpAccessControlListSipIpAddress - */ +*/ func (c *DefaultApiService) UpdateSipIpAddress(AccountSid string, IpAccessControlListSid string, Sid string, params *UpdateSipIpAddressParams) (*ApiV2010AccountSipSipIpAccessControlListSipIpAddress, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists/{IpAccessControlListSid}/IpAddresses/{Sid}.json" + path := "/2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists/{IpAccessControlListSid}/IpAddresses/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"IpAccessControlListSid"+"}", IpAccessControlListSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.CidrPrefixLength != nil { - data.Set("CidrPrefixLength", fmt.Sprint(*params.CidrPrefixLength)) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.IpAddress != nil { - data.Set("IpAddress", *params.IpAddress) - } + if params != nil && params.CidrPrefixLength != nil { + data.Set("CidrPrefixLength", fmt.Sprint(*params.CidrPrefixLength)) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.IpAddress != nil { + data.Set("IpAddress", *params.IpAddress) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ApiV2010AccountSipSipIpAccessControlListSipIpAddress{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ApiV2010AccountSipSipIpAccessControlListSipIpAddress{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateUsageTriggerParams Optional parameters for the method 'UpdateUsageTrigger' type UpdateUsageTriggerParams struct { CallbackMethod *string `json:"CallbackMethod,omitempty"` - CallbackUrl *string `json:"CallbackUrl,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` + CallbackUrl *string `json:"CallbackUrl,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` } /* @@ -9711,36 +9860,37 @@ type UpdateUsageTriggerParams struct { * @param "CallbackUrl" (string) - The URL we should call using `callback_method` when the trigger fires. * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It can be up to 64 characters long. * @return ApiV2010AccountUsageUsageTrigger - */ +*/ func (c *DefaultApiService) UpdateUsageTrigger(AccountSid string, Sid string, params *UpdateUsageTriggerParams) (*ApiV2010AccountUsageUsageTrigger, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Usage/Triggers/{Sid}.json" + path := "/2010-04-01/Accounts/{AccountSid}/Usage/Triggers/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.CallbackMethod != nil { - data.Set("CallbackMethod", *params.CallbackMethod) - } - if params != nil && params.CallbackUrl != nil { - data.Set("CallbackUrl", *params.CallbackUrl) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } + if params != nil && params.CallbackMethod != nil { + data.Set("CallbackMethod", *params.CallbackMethod) +} + if params != nil && params.CallbackUrl != nil { + data.Set("CallbackUrl", *params.CallbackUrl) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ApiV2010AccountUsageUsageTrigger{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() + + ps := &ApiV2010AccountUsageUsageTrigger{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } diff --git a/twilio/rest/api/v2010/model_api_v2010_account.go b/twilio/rest/api/v2010/model_api_v2010_account.go index 16fa4e3bd..37bc727fc 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account.go +++ b/twilio/rest/api/v2010/model_api_v2010_account.go @@ -1,16 +1,15 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ApiV2010Account struct for ApiV2010Account type ApiV2010Account struct { // The authorization token for this account diff --git a/twilio/rest/api/v2010/model_api_v2010_account_address.go b/twilio/rest/api/v2010/model_api_v2010_account_address.go index 64f55887a..5d452451c 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_address.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_address.go @@ -1,16 +1,15 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ApiV2010AccountAddress struct for ApiV2010AccountAddress type ApiV2010AccountAddress struct { // The SID of the Account that is responsible for the resource diff --git a/twilio/rest/api/v2010/model_api_v2010_account_address_dependent_phone_number.go b/twilio/rest/api/v2010/model_api_v2010_account_address_dependent_phone_number.go index a87291f87..cd1e86000 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_address_dependent_phone_number.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_address_dependent_phone_number.go @@ -1,16 +1,15 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ApiV2010AccountAddressDependentPhoneNumber struct for ApiV2010AccountAddressDependentPhoneNumber type ApiV2010AccountAddressDependentPhoneNumber struct { // The SID of the Account that created the resource diff --git a/twilio/rest/api/v2010/model_api_v2010_account_application.go b/twilio/rest/api/v2010/model_api_v2010_account_application.go index b9d5d709a..3943f92fd 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_application.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_application.go @@ -1,16 +1,15 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ApiV2010AccountApplication struct for ApiV2010AccountApplication type ApiV2010AccountApplication struct { // The SID of the Account that created the resource diff --git a/twilio/rest/api/v2010/model_api_v2010_account_authorized_connect_app.go b/twilio/rest/api/v2010/model_api_v2010_account_authorized_connect_app.go index 65a096253..eb7e4be91 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_authorized_connect_app.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_authorized_connect_app.go @@ -1,16 +1,15 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ApiV2010AccountAuthorizedConnectApp struct for ApiV2010AccountAuthorizedConnectApp type ApiV2010AccountAuthorizedConnectApp struct { // The SID of the Account that created the resource diff --git a/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country.go b/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country.go index f22c0d71c..04dc8cf3e 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country.go @@ -1,16 +1,15 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ApiV2010AccountAvailablePhoneNumberCountry struct for ApiV2010AccountAvailablePhoneNumberCountry type ApiV2010AccountAvailablePhoneNumberCountry struct { // Whether all phone numbers available in the country are new to the Twilio platform. diff --git a/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_local.go b/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_local.go index 2a53f8999..8d8d9b5ca 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_local.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_local.go @@ -1,22 +1,21 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocal struct for ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocal type ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocal struct { // The type of Address resource the phone number requires AddressRequirements *string `json:"AddressRequirements,omitempty"` // Whether the phone number is new to the Twilio platform - Beta *bool `json:"Beta,omitempty"` + Beta *bool `json:"Beta,omitempty"` Capabilities *ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocalCapabilities `json:"Capabilities,omitempty"` // A formatted version of the phone number FriendlyName *string `json:"FriendlyName,omitempty"` diff --git a/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_local_capabilities.go b/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_local_capabilities.go index bcf296000..3decb1dfd 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_local_capabilities.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_local_capabilities.go @@ -1,20 +1,19 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocalCapabilities Whether a phone number can receive calls or messages type ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocalCapabilities struct { - Fax bool `json:"Fax,omitempty"` - Mms bool `json:"Mms,omitempty"` - Sms bool `json:"Sms,omitempty"` + Fax bool `json:"Fax,omitempty"` + Mms bool `json:"Mms,omitempty"` + Sms bool `json:"Sms,omitempty"` Voice bool `json:"Voice,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_machine_to_machine.go b/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_machine_to_machine.go index d471ee908..4af6334cb 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_machine_to_machine.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_machine_to_machine.go @@ -1,22 +1,21 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberMachineToMachine struct for ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberMachineToMachine type ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberMachineToMachine struct { // The type of Address resource the phone number requires AddressRequirements *string `json:"AddressRequirements,omitempty"` // Whether the phone number is new to the Twilio platform - Beta *bool `json:"Beta,omitempty"` + Beta *bool `json:"Beta,omitempty"` Capabilities *ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocalCapabilities `json:"Capabilities,omitempty"` // A formatted version of the phone number FriendlyName *string `json:"FriendlyName,omitempty"` diff --git a/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_mobile.go b/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_mobile.go index e37afedff..7f58d9767 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_mobile.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_mobile.go @@ -1,22 +1,21 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberMobile struct for ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberMobile type ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberMobile struct { // The type of Address resource the phone number requires AddressRequirements *string `json:"AddressRequirements,omitempty"` // Whether the phone number is new to the Twilio platform - Beta *bool `json:"Beta,omitempty"` + Beta *bool `json:"Beta,omitempty"` Capabilities *ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocalCapabilities `json:"Capabilities,omitempty"` // A formatted version of the phone number FriendlyName *string `json:"FriendlyName,omitempty"` diff --git a/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_national.go b/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_national.go index 06ba69450..56c81a8f3 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_national.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_national.go @@ -1,22 +1,21 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberNational struct for ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberNational type ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberNational struct { // The type of Address resource the phone number requires AddressRequirements *string `json:"AddressRequirements,omitempty"` // Whether the phone number is new to the Twilio platform - Beta *bool `json:"Beta,omitempty"` + Beta *bool `json:"Beta,omitempty"` Capabilities *ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocalCapabilities `json:"Capabilities,omitempty"` // A formatted version of the phone number FriendlyName *string `json:"FriendlyName,omitempty"` diff --git a/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_shared_cost.go b/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_shared_cost.go index 0431bee31..afcd663eb 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_shared_cost.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_shared_cost.go @@ -1,22 +1,21 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberSharedCost struct for ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberSharedCost type ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberSharedCost struct { // The type of Address resource the phone number requires AddressRequirements *string `json:"AddressRequirements,omitempty"` // Whether the phone number is new to the Twilio platform - Beta *bool `json:"Beta,omitempty"` + Beta *bool `json:"Beta,omitempty"` Capabilities *ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocalCapabilities `json:"Capabilities,omitempty"` // A formatted version of the phone number FriendlyName *string `json:"FriendlyName,omitempty"` diff --git a/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_toll_free.go b/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_toll_free.go index 023c62eb7..8ac62bba0 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_toll_free.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_toll_free.go @@ -1,22 +1,21 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberTollFree struct for ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberTollFree type ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberTollFree struct { // The type of Address resource the phone number requires AddressRequirements *string `json:"AddressRequirements,omitempty"` // Whether the phone number is new to the Twilio platform - Beta *bool `json:"Beta,omitempty"` + Beta *bool `json:"Beta,omitempty"` Capabilities *ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocalCapabilities `json:"Capabilities,omitempty"` // A formatted version of the phone number FriendlyName *string `json:"FriendlyName,omitempty"` diff --git a/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_voip.go b/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_voip.go index c13b98a85..e484b73cb 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_voip.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_voip.go @@ -1,22 +1,21 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberVoip struct for ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberVoip type ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberVoip struct { // The type of Address resource the phone number requires AddressRequirements *string `json:"AddressRequirements,omitempty"` // Whether the phone number is new to the Twilio platform - Beta *bool `json:"Beta,omitempty"` + Beta *bool `json:"Beta,omitempty"` Capabilities *ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocalCapabilities `json:"Capabilities,omitempty"` // A formatted version of the phone number FriendlyName *string `json:"FriendlyName,omitempty"` diff --git a/twilio/rest/api/v2010/model_api_v2010_account_balance.go b/twilio/rest/api/v2010/model_api_v2010_account_balance.go index 3f9c1fa2e..c208f5fa8 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_balance.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_balance.go @@ -1,16 +1,15 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ApiV2010AccountBalance struct for ApiV2010AccountBalance type ApiV2010AccountBalance struct { // Account Sid. diff --git a/twilio/rest/api/v2010/model_api_v2010_account_call.go b/twilio/rest/api/v2010/model_api_v2010_account_call.go index 50e8f3254..028303556 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_call.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_call.go @@ -1,16 +1,15 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ApiV2010AccountCall struct for ApiV2010AccountCall type ApiV2010AccountCall struct { // The SID of the Account that created this resource diff --git a/twilio/rest/api/v2010/model_api_v2010_account_call_call_event.go b/twilio/rest/api/v2010/model_api_v2010_account_call_call_event.go index 64af39eba..acf9aaa1c 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_call_call_event.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_call_call_event.go @@ -1,16 +1,15 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ApiV2010AccountCallCallEvent struct for ApiV2010AccountCallCallEvent type ApiV2010AccountCallCallEvent struct { // Call Request. diff --git a/twilio/rest/api/v2010/model_api_v2010_account_call_call_feedback.go b/twilio/rest/api/v2010/model_api_v2010_account_call_call_feedback.go index cd304b270..7d220fe93 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_call_call_feedback.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_call_call_feedback.go @@ -1,16 +1,15 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ApiV2010AccountCallCallFeedback struct for ApiV2010AccountCallCallFeedback type ApiV2010AccountCallCallFeedback struct { // The unique sid that identifies this account diff --git a/twilio/rest/api/v2010/model_api_v2010_account_call_call_feedback_summary.go b/twilio/rest/api/v2010/model_api_v2010_account_call_call_feedback_summary.go index 17dc6e8dd..38513c4db 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_call_call_feedback_summary.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_call_call_feedback_summary.go @@ -1,20 +1,18 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // ApiV2010AccountCallCallFeedbackSummary struct for ApiV2010AccountCallCallFeedbackSummary type ApiV2010AccountCallCallFeedbackSummary struct { // The unique sid that identifies this account diff --git a/twilio/rest/api/v2010/model_api_v2010_account_call_call_feedback_summary_issues.go b/twilio/rest/api/v2010/model_api_v2010_account_call_call_feedback_summary_issues.go index 7ee0bb2ae..88770a810 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_call_call_feedback_summary_issues.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_call_call_feedback_summary_issues.go @@ -1,19 +1,18 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ApiV2010AccountCallCallFeedbackSummaryIssues struct for ApiV2010AccountCallCallFeedbackSummaryIssues type ApiV2010AccountCallCallFeedbackSummaryIssues struct { - Count float32 `json:"Count,omitempty"` - Description string `json:"Description,omitempty"` - PercentageOfTotalCalls string `json:"PercentageOfTotalCalls,omitempty"` + Count float32 `json:"Count,omitempty"` + Description string `json:"Description,omitempty"` + PercentageOfTotalCalls string `json:"PercentageOfTotalCalls,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_call_call_notification.go b/twilio/rest/api/v2010/model_api_v2010_account_call_call_notification.go index 6b3606473..d2b9113fe 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_call_call_notification.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_call_call_notification.go @@ -1,16 +1,15 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ApiV2010AccountCallCallNotification struct for ApiV2010AccountCallCallNotification type ApiV2010AccountCallCallNotification struct { // The SID of the Account that created the resource diff --git a/twilio/rest/api/v2010/model_api_v2010_account_call_call_notification_instance.go b/twilio/rest/api/v2010/model_api_v2010_account_call_call_notification_instance.go index 5db6b2c21..6537012a7 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_call_call_notification_instance.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_call_call_notification_instance.go @@ -1,16 +1,15 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ApiV2010AccountCallCallNotificationInstance struct for ApiV2010AccountCallCallNotificationInstance type ApiV2010AccountCallCallNotificationInstance struct { // The SID of the Account that created the resource diff --git a/twilio/rest/api/v2010/model_api_v2010_account_call_call_recording.go b/twilio/rest/api/v2010/model_api_v2010_account_call_call_recording.go index 7af72eb0f..093c56d19 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_call_call_recording.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_call_call_recording.go @@ -1,16 +1,15 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ApiV2010AccountCallCallRecording struct for ApiV2010AccountCallCallRecording type ApiV2010AccountCallCallRecording struct { // The SID of the Account that created the resource diff --git a/twilio/rest/api/v2010/model_api_v2010_account_call_payments.go b/twilio/rest/api/v2010/model_api_v2010_account_call_payments.go index e99c27c17..05470949d 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_call_payments.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_call_payments.go @@ -1,16 +1,15 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ApiV2010AccountCallPayments struct for ApiV2010AccountCallPayments type ApiV2010AccountCallPayments struct { // The SID of the Account that created the Payments resource. diff --git a/twilio/rest/api/v2010/model_api_v2010_account_conference.go b/twilio/rest/api/v2010/model_api_v2010_account_conference.go index f12162a6a..e6ae75b93 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_conference.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_conference.go @@ -1,16 +1,15 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ApiV2010AccountConference struct for ApiV2010AccountConference type ApiV2010AccountConference struct { // The SID of the Account that created this resource diff --git a/twilio/rest/api/v2010/model_api_v2010_account_conference_conference_recording.go b/twilio/rest/api/v2010/model_api_v2010_account_conference_conference_recording.go index 6ad28afb3..e63ec6149 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_conference_conference_recording.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_conference_conference_recording.go @@ -1,16 +1,15 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ApiV2010AccountConferenceConferenceRecording struct for ApiV2010AccountConferenceConferenceRecording type ApiV2010AccountConferenceConferenceRecording struct { // The SID of the Account that created the resource diff --git a/twilio/rest/api/v2010/model_api_v2010_account_conference_participant.go b/twilio/rest/api/v2010/model_api_v2010_account_conference_participant.go index a0ea48551..f550e8fbc 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_conference_participant.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_conference_participant.go @@ -1,16 +1,15 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ApiV2010AccountConferenceParticipant struct for ApiV2010AccountConferenceParticipant type ApiV2010AccountConferenceParticipant struct { // The SID of the Account that created the resource diff --git a/twilio/rest/api/v2010/model_api_v2010_account_connect_app.go b/twilio/rest/api/v2010/model_api_v2010_account_connect_app.go index 8a72c0cea..5f0dd4069 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_connect_app.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_connect_app.go @@ -1,16 +1,15 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ApiV2010AccountConnectApp struct for ApiV2010AccountConnectApp type ApiV2010AccountConnectApp struct { // The SID of the Account that created the resource diff --git a/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number.go b/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number.go index b2daf7b37..2bd192d4d 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number.go @@ -1,16 +1,15 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ApiV2010AccountIncomingPhoneNumber struct for ApiV2010AccountIncomingPhoneNumber type ApiV2010AccountIncomingPhoneNumber struct { // The SID of the Account that created the resource @@ -24,7 +23,7 @@ type ApiV2010AccountIncomingPhoneNumber struct { // Whether the phone number is new to the Twilio platform Beta *bool `json:"Beta,omitempty"` // The SID of the Bundle resource associated with number - BundleSid *string `json:"BundleSid,omitempty"` + BundleSid *string `json:"BundleSid,omitempty"` Capabilities *ApiV2010AccountIncomingPhoneNumberCapabilities `json:"Capabilities,omitempty"` // The RFC 2822 date and time in GMT that the resource was created DateCreated *string `json:"DateCreated,omitempty"` @@ -72,7 +71,7 @@ type ApiV2010AccountIncomingPhoneNumber struct { // The URL we call when an error occurs in TwiML VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` // The HTTP method used with the voice_url - VoiceMethod *string `json:"VoiceMethod,omitempty"` + VoiceMethod *string `json:"VoiceMethod,omitempty"` VoiceReceiveMode *string `json:"VoiceReceiveMode,omitempty"` // The URL we call when the phone number receives a call VoiceUrl *string `json:"VoiceUrl,omitempty"` diff --git a/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number_capabilities.go b/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number_capabilities.go index e5ba30993..4b94c5b4d 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number_capabilities.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number_capabilities.go @@ -1,20 +1,19 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ApiV2010AccountIncomingPhoneNumberCapabilities Indicate if a phone can receive calls or messages type ApiV2010AccountIncomingPhoneNumberCapabilities struct { - Fax bool `json:"Fax,omitempty"` - Mms bool `json:"Mms,omitempty"` - Sms bool `json:"Sms,omitempty"` + Fax bool `json:"Fax,omitempty"` + Mms bool `json:"Mms,omitempty"` + Sms bool `json:"Sms,omitempty"` Voice bool `json:"Voice,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_assigned_add_on.go b/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_assigned_add_on.go index 50aed05e6..ef4568f01 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_assigned_add_on.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_assigned_add_on.go @@ -1,16 +1,15 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOn struct for ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOn type ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOn struct { // The SID of the Account that created the resource diff --git a/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_assigned_add_on_incoming_phone_number_assigned_add_on_extension.go b/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_assigned_add_on_incoming_phone_number_assigned_add_on_extension.go index dfa70b00a..d7f7e64f6 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_assigned_add_on_incoming_phone_number_assigned_add_on_extension.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_assigned_add_on_incoming_phone_number_assigned_add_on_extension.go @@ -1,16 +1,15 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOnIncomingPhoneNumberAssignedAddOnExtension struct for ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOnIncomingPhoneNumberAssignedAddOnExtension type ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOnIncomingPhoneNumberAssignedAddOnExtension struct { // The SID of the Account that created the resource diff --git a/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_local.go b/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_local.go index b81fe6970..07476bc9d 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_local.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_local.go @@ -1,16 +1,15 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberLocal struct for ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberLocal type ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberLocal struct { // The SID of the Account that created the resource @@ -24,7 +23,7 @@ type ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberLocal struct { // Whether the phone number is new to the Twilio platform Beta *bool `json:"Beta,omitempty"` // The SID of the Bundle resource associated with number - BundleSid *string `json:"BundleSid,omitempty"` + BundleSid *string `json:"BundleSid,omitempty"` Capabilities *ApiV2010AccountIncomingPhoneNumberCapabilities `json:"Capabilities,omitempty"` // The RFC 2822 date and time in GMT that the resource was created DateCreated *string `json:"DateCreated,omitempty"` @@ -72,7 +71,7 @@ type ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberLocal struct { // The URL we call when an error occurs in TwiML VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` // The HTTP method used with the voice_url - VoiceMethod *string `json:"VoiceMethod,omitempty"` + VoiceMethod *string `json:"VoiceMethod,omitempty"` VoiceReceiveMode *string `json:"VoiceReceiveMode,omitempty"` // The URL we call when this phone number receives a call VoiceUrl *string `json:"VoiceUrl,omitempty"` diff --git a/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_mobile.go b/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_mobile.go index 867633ed7..ccb285c21 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_mobile.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_mobile.go @@ -1,16 +1,15 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberMobile struct for ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberMobile type ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberMobile struct { // The SID of the Account that created the resource @@ -24,7 +23,7 @@ type ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberMobile struct { // Whether the phone number is new to the Twilio platform Beta *bool `json:"Beta,omitempty"` // The SID of the Bundle resource associated with number - BundleSid *string `json:"BundleSid,omitempty"` + BundleSid *string `json:"BundleSid,omitempty"` Capabilities *ApiV2010AccountIncomingPhoneNumberCapabilities `json:"Capabilities,omitempty"` // The RFC 2822 date and time in GMT that the resource was created DateCreated *string `json:"DateCreated,omitempty"` @@ -72,7 +71,7 @@ type ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberMobile struct { // The URL we call when an error occurs in TwiML VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` // The HTTP method used with the voice_url - VoiceMethod *string `json:"VoiceMethod,omitempty"` + VoiceMethod *string `json:"VoiceMethod,omitempty"` VoiceReceiveMode *string `json:"VoiceReceiveMode,omitempty"` // The URL we call when the phone number receives a call VoiceUrl *string `json:"VoiceUrl,omitempty"` diff --git a/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_toll_free.go b/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_toll_free.go index bf37d9695..51d2636d9 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_toll_free.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_toll_free.go @@ -1,16 +1,15 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberTollFree struct for ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberTollFree type ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberTollFree struct { // The SID of the Account that created the resource @@ -24,7 +23,7 @@ type ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberTollFree struct { // Whether the phone number is new to the Twilio platform Beta *bool `json:"Beta,omitempty"` // The SID of the Bundle resource associated with number - BundleSid *string `json:"BundleSid,omitempty"` + BundleSid *string `json:"BundleSid,omitempty"` Capabilities *ApiV2010AccountIncomingPhoneNumberCapabilities `json:"Capabilities,omitempty"` // The RFC 2822 date and time in GMT that the resource was created DateCreated *string `json:"DateCreated,omitempty"` @@ -72,7 +71,7 @@ type ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberTollFree struct { // The URL we call when an error occurs in TwiML VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` // The HTTP method used with the voice_url - VoiceMethod *string `json:"VoiceMethod,omitempty"` + VoiceMethod *string `json:"VoiceMethod,omitempty"` VoiceReceiveMode *string `json:"VoiceReceiveMode,omitempty"` // The URL we call when the phone number receives a call VoiceUrl *string `json:"VoiceUrl,omitempty"` diff --git a/twilio/rest/api/v2010/model_api_v2010_account_key.go b/twilio/rest/api/v2010/model_api_v2010_account_key.go index fc061f0a0..a21ab08ee 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_key.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_key.go @@ -1,16 +1,15 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ApiV2010AccountKey struct for ApiV2010AccountKey type ApiV2010AccountKey struct { // The RFC 2822 date and time in GMT that the resource was created diff --git a/twilio/rest/api/v2010/model_api_v2010_account_message.go b/twilio/rest/api/v2010/model_api_v2010_account_message.go index 56035a891..b42c358b4 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_message.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_message.go @@ -1,16 +1,15 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ApiV2010AccountMessage struct for ApiV2010AccountMessage type ApiV2010AccountMessage struct { // The SID of the Account that created the resource diff --git a/twilio/rest/api/v2010/model_api_v2010_account_message_media.go b/twilio/rest/api/v2010/model_api_v2010_account_message_media.go index 74d292def..7b113a0f0 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_message_media.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_message_media.go @@ -1,16 +1,15 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ApiV2010AccountMessageMedia struct for ApiV2010AccountMessageMedia type ApiV2010AccountMessageMedia struct { // The SID of the Account that created this resource diff --git a/twilio/rest/api/v2010/model_api_v2010_account_message_message_feedback.go b/twilio/rest/api/v2010/model_api_v2010_account_message_message_feedback.go index 109a3f97d..da9937af7 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_message_message_feedback.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_message_message_feedback.go @@ -1,16 +1,15 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ApiV2010AccountMessageMessageFeedback struct for ApiV2010AccountMessageMessageFeedback type ApiV2010AccountMessageMessageFeedback struct { // The SID of the Account that created the resource diff --git a/twilio/rest/api/v2010/model_api_v2010_account_new_key.go b/twilio/rest/api/v2010/model_api_v2010_account_new_key.go index d92641b58..f08c6b789 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_new_key.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_new_key.go @@ -1,16 +1,15 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ApiV2010AccountNewKey struct for ApiV2010AccountNewKey type ApiV2010AccountNewKey struct { // The RFC 2822 date and time in GMT that the resource was created diff --git a/twilio/rest/api/v2010/model_api_v2010_account_new_signing_key.go b/twilio/rest/api/v2010/model_api_v2010_account_new_signing_key.go index b17812e25..8d7f8b828 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_new_signing_key.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_new_signing_key.go @@ -1,16 +1,15 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ApiV2010AccountNewSigningKey struct for ApiV2010AccountNewSigningKey type ApiV2010AccountNewSigningKey struct { // The RFC 2822 date and time in GMT that the resource was created diff --git a/twilio/rest/api/v2010/model_api_v2010_account_notification.go b/twilio/rest/api/v2010/model_api_v2010_account_notification.go index 93e1e1c1c..9e0dda244 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_notification.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_notification.go @@ -1,16 +1,15 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ApiV2010AccountNotification struct for ApiV2010AccountNotification type ApiV2010AccountNotification struct { // The SID of the Account that created the resource diff --git a/twilio/rest/api/v2010/model_api_v2010_account_notification_instance.go b/twilio/rest/api/v2010/model_api_v2010_account_notification_instance.go index 4364a1774..4e9d7073a 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_notification_instance.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_notification_instance.go @@ -1,16 +1,15 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ApiV2010AccountNotificationInstance struct for ApiV2010AccountNotificationInstance type ApiV2010AccountNotificationInstance struct { // The SID of the Account that created the resource diff --git a/twilio/rest/api/v2010/model_api_v2010_account_outgoing_caller_id.go b/twilio/rest/api/v2010/model_api_v2010_account_outgoing_caller_id.go index 997772792..736aeac5d 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_outgoing_caller_id.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_outgoing_caller_id.go @@ -1,16 +1,15 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ApiV2010AccountOutgoingCallerId struct for ApiV2010AccountOutgoingCallerId type ApiV2010AccountOutgoingCallerId struct { // The SID of the Account that created the resource diff --git a/twilio/rest/api/v2010/model_api_v2010_account_queue.go b/twilio/rest/api/v2010/model_api_v2010_account_queue.go index 44b011469..f54be21dc 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_queue.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_queue.go @@ -1,16 +1,15 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ApiV2010AccountQueue struct for ApiV2010AccountQueue type ApiV2010AccountQueue struct { // The SID of the Account that created this resource diff --git a/twilio/rest/api/v2010/model_api_v2010_account_queue_member.go b/twilio/rest/api/v2010/model_api_v2010_account_queue_member.go index bff575ce9..08f25f606 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_queue_member.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_queue_member.go @@ -1,16 +1,15 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ApiV2010AccountQueueMember struct for ApiV2010AccountQueueMember type ApiV2010AccountQueueMember struct { // The SID of the Call the resource is associated with diff --git a/twilio/rest/api/v2010/model_api_v2010_account_recording.go b/twilio/rest/api/v2010/model_api_v2010_account_recording.go index f35fff909..975479f8e 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_recording.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_recording.go @@ -1,16 +1,15 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ApiV2010AccountRecording struct for ApiV2010AccountRecording type ApiV2010AccountRecording struct { // The SID of the Account that created the resource diff --git a/twilio/rest/api/v2010/model_api_v2010_account_recording_recording_add_on_result.go b/twilio/rest/api/v2010/model_api_v2010_account_recording_recording_add_on_result.go index 10097b7ab..ae7e80f19 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_recording_recording_add_on_result.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_recording_recording_add_on_result.go @@ -1,16 +1,15 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ApiV2010AccountRecordingRecordingAddOnResult struct for ApiV2010AccountRecordingRecordingAddOnResult type ApiV2010AccountRecordingRecordingAddOnResult struct { // The SID of the Account that created the resource diff --git a/twilio/rest/api/v2010/model_api_v2010_account_recording_recording_add_on_result_recording_add_on_result_payload.go b/twilio/rest/api/v2010/model_api_v2010_account_recording_recording_add_on_result_recording_add_on_result_payload.go index 51fd023cf..c923204f7 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_recording_recording_add_on_result_recording_add_on_result_payload.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_recording_recording_add_on_result_recording_add_on_result_payload.go @@ -1,16 +1,15 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ApiV2010AccountRecordingRecordingAddOnResultRecordingAddOnResultPayload struct for ApiV2010AccountRecordingRecordingAddOnResultRecordingAddOnResultPayload type ApiV2010AccountRecordingRecordingAddOnResultRecordingAddOnResultPayload struct { // The SID of the Account that created the resource diff --git a/twilio/rest/api/v2010/model_api_v2010_account_recording_recording_transcription.go b/twilio/rest/api/v2010/model_api_v2010_account_recording_recording_transcription.go index f895d2f41..11e63df36 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_recording_recording_transcription.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_recording_recording_transcription.go @@ -1,16 +1,15 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ApiV2010AccountRecordingRecordingTranscription struct for ApiV2010AccountRecordingRecordingTranscription type ApiV2010AccountRecordingRecordingTranscription struct { // The SID of the Account that created the resource diff --git a/twilio/rest/api/v2010/model_api_v2010_account_short_code.go b/twilio/rest/api/v2010/model_api_v2010_account_short_code.go index d0517f2cc..59dc53998 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_short_code.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_short_code.go @@ -1,16 +1,15 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ApiV2010AccountShortCode struct for ApiV2010AccountShortCode type ApiV2010AccountShortCode struct { // The SID of the Account that created this resource diff --git a/twilio/rest/api/v2010/model_api_v2010_account_signing_key.go b/twilio/rest/api/v2010/model_api_v2010_account_signing_key.go index 2be6b4558..bec715bf6 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_signing_key.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_signing_key.go @@ -1,20 +1,19 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ApiV2010AccountSigningKey struct for ApiV2010AccountSigningKey type ApiV2010AccountSigningKey struct { - DateCreated *string `json:"DateCreated,omitempty"` - DateUpdated *string `json:"DateUpdated,omitempty"` + DateCreated *string `json:"DateCreated,omitempty"` + DateUpdated *string `json:"DateUpdated,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` - Sid *string `json:"Sid,omitempty"` + Sid *string `json:"Sid,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_credential_list.go b/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_credential_list.go index 2c95c8767..da338baf4 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_credential_list.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_credential_list.go @@ -1,16 +1,15 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ApiV2010AccountSipSipCredentialList struct for ApiV2010AccountSipSipCredentialList type ApiV2010AccountSipSipCredentialList struct { // The unique sid that identifies this account diff --git a/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_credential_list_sip_credential.go b/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_credential_list_sip_credential.go index 785693328..afa36efaa 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_credential_list_sip_credential.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_credential_list_sip_credential.go @@ -1,16 +1,15 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ApiV2010AccountSipSipCredentialListSipCredential struct for ApiV2010AccountSipSipCredentialListSipCredential type ApiV2010AccountSipSipCredentialListSipCredential struct { // The unique id of the Account that is responsible for this resource. diff --git a/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_domain.go b/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_domain.go index fc83afa52..f945084f0 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_domain.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_domain.go @@ -1,16 +1,15 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ApiV2010AccountSipSipDomain struct for ApiV2010AccountSipSipDomain type ApiV2010AccountSipSipDomain struct { // The SID of the Account that created the resource diff --git a/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_auth_sip_auth_calls_sip_auth_calls_credential_list_mapping.go b/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_auth_sip_auth_calls_sip_auth_calls_credential_list_mapping.go index 57dc44e9d..1bccf819d 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_auth_sip_auth_calls_sip_auth_calls_credential_list_mapping.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_auth_sip_auth_calls_sip_auth_calls_credential_list_mapping.go @@ -1,16 +1,15 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsCredentialListMapping struct for ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsCredentialListMapping type ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsCredentialListMapping struct { // The SID of the Account that created the resource diff --git a/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_auth_sip_auth_calls_sip_auth_calls_ip_access_control_list_mapping.go b/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_auth_sip_auth_calls_sip_auth_calls_ip_access_control_list_mapping.go index 629dcf9e6..398620aed 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_auth_sip_auth_calls_sip_auth_calls_ip_access_control_list_mapping.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_auth_sip_auth_calls_sip_auth_calls_ip_access_control_list_mapping.go @@ -1,16 +1,15 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsIpAccessControlListMapping struct for ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsIpAccessControlListMapping type ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsIpAccessControlListMapping struct { // The SID of the Account that created the resource diff --git a/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_auth_sip_auth_registrations_sip_auth_registrations_credential_list_mapping.go b/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_auth_sip_auth_registrations_sip_auth_registrations_credential_list_mapping.go index 61804a522..2e66cf327 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_auth_sip_auth_registrations_sip_auth_registrations_credential_list_mapping.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_auth_sip_auth_registrations_sip_auth_registrations_credential_list_mapping.go @@ -1,16 +1,15 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ApiV2010AccountSipSipDomainSipAuthSipAuthRegistrationsSipAuthRegistrationsCredentialListMapping struct for ApiV2010AccountSipSipDomainSipAuthSipAuthRegistrationsSipAuthRegistrationsCredentialListMapping type ApiV2010AccountSipSipDomainSipAuthSipAuthRegistrationsSipAuthRegistrationsCredentialListMapping struct { // The SID of the Account that created the resource diff --git a/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_credential_list_mapping.go b/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_credential_list_mapping.go index 336f58ee7..c8e5ab269 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_credential_list_mapping.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_credential_list_mapping.go @@ -1,16 +1,15 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ApiV2010AccountSipSipDomainSipCredentialListMapping struct for ApiV2010AccountSipSipDomainSipCredentialListMapping type ApiV2010AccountSipSipDomainSipCredentialListMapping struct { // The unique id of the Account that is responsible for this resource. diff --git a/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_ip_access_control_list_mapping.go b/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_ip_access_control_list_mapping.go index 8f4612414..ab0e02a44 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_ip_access_control_list_mapping.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_ip_access_control_list_mapping.go @@ -1,16 +1,15 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ApiV2010AccountSipSipDomainSipIpAccessControlListMapping struct for ApiV2010AccountSipSipDomainSipIpAccessControlListMapping type ApiV2010AccountSipSipDomainSipIpAccessControlListMapping struct { // The unique id of the Account that is responsible for this resource. diff --git a/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_ip_access_control_list.go b/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_ip_access_control_list.go index 6a19cbd50..2d15e8847 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_ip_access_control_list.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_ip_access_control_list.go @@ -1,16 +1,15 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ApiV2010AccountSipSipIpAccessControlList struct for ApiV2010AccountSipSipIpAccessControlList type ApiV2010AccountSipSipIpAccessControlList struct { // The unique sid that identifies this account diff --git a/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_ip_access_control_list_sip_ip_address.go b/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_ip_access_control_list_sip_ip_address.go index 63b02de70..bc5714e0d 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_ip_access_control_list_sip_ip_address.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_ip_access_control_list_sip_ip_address.go @@ -1,16 +1,15 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ApiV2010AccountSipSipIpAccessControlListSipIpAddress struct for ApiV2010AccountSipSipIpAccessControlListSipIpAddress type ApiV2010AccountSipSipIpAccessControlListSipIpAddress struct { // The unique id of the Account that is responsible for this resource. diff --git a/twilio/rest/api/v2010/model_api_v2010_account_token.go b/twilio/rest/api/v2010/model_api_v2010_account_token.go index b327f4ee3..91c37be67 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_token.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_token.go @@ -1,16 +1,15 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ApiV2010AccountToken struct for ApiV2010AccountToken type ApiV2010AccountToken struct { // The SID of the Account that created the resource diff --git a/twilio/rest/api/v2010/model_api_v2010_account_token_ice_servers.go b/twilio/rest/api/v2010/model_api_v2010_account_token_ice_servers.go index 08a9a8f14..611de15de 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_token_ice_servers.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_token_ice_servers.go @@ -1,20 +1,19 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ApiV2010AccountTokenIceServers struct for ApiV2010AccountTokenIceServers type ApiV2010AccountTokenIceServers struct { Credential string `json:"Credential,omitempty"` - Url string `json:"Url,omitempty"` - Urls string `json:"Urls,omitempty"` - Username string `json:"Username,omitempty"` + Url string `json:"Url,omitempty"` + Urls string `json:"Urls,omitempty"` + Username string `json:"Username,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_transcription.go b/twilio/rest/api/v2010/model_api_v2010_account_transcription.go index eeeeabeda..df98aec85 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_transcription.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_transcription.go @@ -1,16 +1,15 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ApiV2010AccountTranscription struct for ApiV2010AccountTranscription type ApiV2010AccountTranscription struct { // The SID of the Account that created the resource diff --git a/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record.go b/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record.go index 8215068cc..1228b17e6 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record.go @@ -1,20 +1,18 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // ApiV2010AccountUsageUsageRecord struct for ApiV2010AccountUsageUsageRecord type ApiV2010AccountUsageUsageRecord struct { // The SID of the Account accrued the usage diff --git a/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_all_time.go b/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_all_time.go index 98dddc6d8..21fa3984a 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_all_time.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_all_time.go @@ -1,20 +1,18 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // ApiV2010AccountUsageUsageRecordUsageRecordAllTime struct for ApiV2010AccountUsageUsageRecordUsageRecordAllTime type ApiV2010AccountUsageUsageRecordUsageRecordAllTime struct { // The SID of the Account accrued the usage diff --git a/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_daily.go b/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_daily.go index bc617d0dd..ba2d2cf4c 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_daily.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_daily.go @@ -1,20 +1,18 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // ApiV2010AccountUsageUsageRecordUsageRecordDaily struct for ApiV2010AccountUsageUsageRecordUsageRecordDaily type ApiV2010AccountUsageUsageRecordUsageRecordDaily struct { // The SID of the Account accrued the usage diff --git a/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_last_month.go b/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_last_month.go index 4cbbae56e..a9a0b2230 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_last_month.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_last_month.go @@ -1,20 +1,18 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // ApiV2010AccountUsageUsageRecordUsageRecordLastMonth struct for ApiV2010AccountUsageUsageRecordUsageRecordLastMonth type ApiV2010AccountUsageUsageRecordUsageRecordLastMonth struct { // The SID of the Account accrued the usage diff --git a/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_monthly.go b/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_monthly.go index e06835754..96bacdb7f 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_monthly.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_monthly.go @@ -1,20 +1,18 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // ApiV2010AccountUsageUsageRecordUsageRecordMonthly struct for ApiV2010AccountUsageUsageRecordUsageRecordMonthly type ApiV2010AccountUsageUsageRecordUsageRecordMonthly struct { // The SID of the Account accrued the usage diff --git a/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_this_month.go b/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_this_month.go index 4202daa20..d0127878b 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_this_month.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_this_month.go @@ -1,20 +1,18 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // ApiV2010AccountUsageUsageRecordUsageRecordThisMonth struct for ApiV2010AccountUsageUsageRecordUsageRecordThisMonth type ApiV2010AccountUsageUsageRecordUsageRecordThisMonth struct { // The SID of the Account accrued the usage diff --git a/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_today.go b/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_today.go index 6d74bf501..67d80a60e 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_today.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_today.go @@ -1,20 +1,18 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // ApiV2010AccountUsageUsageRecordUsageRecordToday struct for ApiV2010AccountUsageUsageRecordUsageRecordToday type ApiV2010AccountUsageUsageRecordUsageRecordToday struct { // The SID of the Account accrued the usage diff --git a/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_yearly.go b/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_yearly.go index 03ffc6709..ed3ac932a 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_yearly.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_yearly.go @@ -1,20 +1,18 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // ApiV2010AccountUsageUsageRecordUsageRecordYearly struct for ApiV2010AccountUsageUsageRecordUsageRecordYearly type ApiV2010AccountUsageUsageRecordUsageRecordYearly struct { // The SID of the Account accrued the usage diff --git a/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_yesterday.go b/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_yesterday.go index fb97886e1..d4383e59e 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_yesterday.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_yesterday.go @@ -1,20 +1,18 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // ApiV2010AccountUsageUsageRecordUsageRecordYesterday struct for ApiV2010AccountUsageUsageRecordUsageRecordYesterday type ApiV2010AccountUsageUsageRecordUsageRecordYesterday struct { // The SID of the Account accrued the usage diff --git a/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_trigger.go b/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_trigger.go index 5fc245a9f..e9dc20f22 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_trigger.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_trigger.go @@ -1,16 +1,15 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ApiV2010AccountUsageUsageTrigger struct for ApiV2010AccountUsageUsageTrigger type ApiV2010AccountUsageUsageTrigger struct { // The SID of the Account that this trigger monitors diff --git a/twilio/rest/api/v2010/model_api_v2010_account_validation_request.go b/twilio/rest/api/v2010/model_api_v2010_account_validation_request.go index 342b8e833..20c326ff1 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_validation_request.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_validation_request.go @@ -1,16 +1,15 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ApiV2010AccountValidationRequest struct for ApiV2010AccountValidationRequest type ApiV2010AccountValidationRequest struct { // The SID of the Account that created the resource diff --git a/twilio/rest/api/v2010/model_list_account_response.go b/twilio/rest/api/v2010/model_list_account_response.go index 9db498fe7..31b0a8f2f 100644 --- a/twilio/rest/api/v2010/model_list_account_response.go +++ b/twilio/rest/api/v2010/model_list_account_response.go @@ -1,25 +1,24 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListAccountResponse struct for ListAccountResponse type ListAccountResponse struct { - Accounts []ApiV2010Account `json:"Accounts,omitempty"` - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + Accounts []ApiV2010Account `json:"Accounts,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_address_response.go b/twilio/rest/api/v2010/model_list_address_response.go index cbc7d7077..34d44e87b 100644 --- a/twilio/rest/api/v2010/model_list_address_response.go +++ b/twilio/rest/api/v2010/model_list_address_response.go @@ -1,25 +1,24 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListAddressResponse struct for ListAddressResponse type ListAddressResponse struct { - Addresses []ApiV2010AccountAddress `json:"Addresses,omitempty"` - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + Addresses []ApiV2010AccountAddress `json:"Addresses,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_application_response.go b/twilio/rest/api/v2010/model_list_application_response.go index a6b902d69..db8b526d6 100644 --- a/twilio/rest/api/v2010/model_list_application_response.go +++ b/twilio/rest/api/v2010/model_list_application_response.go @@ -1,25 +1,24 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListApplicationResponse struct for ListApplicationResponse type ListApplicationResponse struct { - Applications []ApiV2010AccountApplication `json:"Applications,omitempty"` - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + Applications []ApiV2010AccountApplication `json:"Applications,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_authorized_connect_app_response.go b/twilio/rest/api/v2010/model_list_authorized_connect_app_response.go index b64f6155e..571f1315f 100644 --- a/twilio/rest/api/v2010/model_list_authorized_connect_app_response.go +++ b/twilio/rest/api/v2010/model_list_authorized_connect_app_response.go @@ -1,25 +1,24 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListAuthorizedConnectAppResponse struct for ListAuthorizedConnectAppResponse type ListAuthorizedConnectAppResponse struct { AuthorizedConnectApps []ApiV2010AccountAuthorizedConnectApp `json:"AuthorizedConnectApps,omitempty"` - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_available_phone_number_country_response.go b/twilio/rest/api/v2010/model_list_available_phone_number_country_response.go index 86cb7b720..14b0c3e55 100644 --- a/twilio/rest/api/v2010/model_list_available_phone_number_country_response.go +++ b/twilio/rest/api/v2010/model_list_available_phone_number_country_response.go @@ -1,25 +1,24 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListAvailablePhoneNumberCountryResponse struct for ListAvailablePhoneNumberCountryResponse type ListAvailablePhoneNumberCountryResponse struct { - Countries []ApiV2010AccountAvailablePhoneNumberCountry `json:"Countries,omitempty"` - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + Countries []ApiV2010AccountAvailablePhoneNumberCountry `json:"Countries,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_available_phone_number_local_response.go b/twilio/rest/api/v2010/model_list_available_phone_number_local_response.go index d144f61d0..328af6d97 100644 --- a/twilio/rest/api/v2010/model_list_available_phone_number_local_response.go +++ b/twilio/rest/api/v2010/model_list_available_phone_number_local_response.go @@ -1,25 +1,24 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListAvailablePhoneNumberLocalResponse struct for ListAvailablePhoneNumberLocalResponse type ListAvailablePhoneNumberLocalResponse struct { AvailablePhoneNumbers []ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocal `json:"AvailablePhoneNumbers,omitempty"` - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_available_phone_number_machine_to_machine_response.go b/twilio/rest/api/v2010/model_list_available_phone_number_machine_to_machine_response.go index d5875ef3a..cd5fa934a 100644 --- a/twilio/rest/api/v2010/model_list_available_phone_number_machine_to_machine_response.go +++ b/twilio/rest/api/v2010/model_list_available_phone_number_machine_to_machine_response.go @@ -1,25 +1,24 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListAvailablePhoneNumberMachineToMachineResponse struct for ListAvailablePhoneNumberMachineToMachineResponse type ListAvailablePhoneNumberMachineToMachineResponse struct { AvailablePhoneNumbers []ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberMachineToMachine `json:"AvailablePhoneNumbers,omitempty"` - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_available_phone_number_mobile_response.go b/twilio/rest/api/v2010/model_list_available_phone_number_mobile_response.go index 8ad5ef955..62015ef6f 100644 --- a/twilio/rest/api/v2010/model_list_available_phone_number_mobile_response.go +++ b/twilio/rest/api/v2010/model_list_available_phone_number_mobile_response.go @@ -1,25 +1,24 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListAvailablePhoneNumberMobileResponse struct for ListAvailablePhoneNumberMobileResponse type ListAvailablePhoneNumberMobileResponse struct { AvailablePhoneNumbers []ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberMobile `json:"AvailablePhoneNumbers,omitempty"` - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_available_phone_number_national_response.go b/twilio/rest/api/v2010/model_list_available_phone_number_national_response.go index 0ad6658d7..2df960ada 100644 --- a/twilio/rest/api/v2010/model_list_available_phone_number_national_response.go +++ b/twilio/rest/api/v2010/model_list_available_phone_number_national_response.go @@ -1,25 +1,24 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListAvailablePhoneNumberNationalResponse struct for ListAvailablePhoneNumberNationalResponse type ListAvailablePhoneNumberNationalResponse struct { AvailablePhoneNumbers []ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberNational `json:"AvailablePhoneNumbers,omitempty"` - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_available_phone_number_shared_cost_response.go b/twilio/rest/api/v2010/model_list_available_phone_number_shared_cost_response.go index b28df322c..a54f42d4e 100644 --- a/twilio/rest/api/v2010/model_list_available_phone_number_shared_cost_response.go +++ b/twilio/rest/api/v2010/model_list_available_phone_number_shared_cost_response.go @@ -1,25 +1,24 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListAvailablePhoneNumberSharedCostResponse struct for ListAvailablePhoneNumberSharedCostResponse type ListAvailablePhoneNumberSharedCostResponse struct { AvailablePhoneNumbers []ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberSharedCost `json:"AvailablePhoneNumbers,omitempty"` - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_available_phone_number_toll_free_response.go b/twilio/rest/api/v2010/model_list_available_phone_number_toll_free_response.go index 3f4da4b8c..fb0f66fec 100644 --- a/twilio/rest/api/v2010/model_list_available_phone_number_toll_free_response.go +++ b/twilio/rest/api/v2010/model_list_available_phone_number_toll_free_response.go @@ -1,25 +1,24 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListAvailablePhoneNumberTollFreeResponse struct for ListAvailablePhoneNumberTollFreeResponse type ListAvailablePhoneNumberTollFreeResponse struct { AvailablePhoneNumbers []ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberTollFree `json:"AvailablePhoneNumbers,omitempty"` - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_available_phone_number_voip_response.go b/twilio/rest/api/v2010/model_list_available_phone_number_voip_response.go index 3c7ce3040..3c0391d2a 100644 --- a/twilio/rest/api/v2010/model_list_available_phone_number_voip_response.go +++ b/twilio/rest/api/v2010/model_list_available_phone_number_voip_response.go @@ -1,25 +1,24 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListAvailablePhoneNumberVoipResponse struct for ListAvailablePhoneNumberVoipResponse type ListAvailablePhoneNumberVoipResponse struct { AvailablePhoneNumbers []ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberVoip `json:"AvailablePhoneNumbers,omitempty"` - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_call_event_response.go b/twilio/rest/api/v2010/model_list_call_event_response.go index 9dccfbd7c..f02d57cbd 100644 --- a/twilio/rest/api/v2010/model_list_call_event_response.go +++ b/twilio/rest/api/v2010/model_list_call_event_response.go @@ -1,25 +1,24 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListCallEventResponse struct for ListCallEventResponse type ListCallEventResponse struct { - End int32 `json:"End,omitempty"` - Events []ApiV2010AccountCallCallEvent `json:"Events,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + End int32 `json:"End,omitempty"` + Events []ApiV2010AccountCallCallEvent `json:"Events,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_call_notification_response.go b/twilio/rest/api/v2010/model_list_call_notification_response.go index aa7cc52fb..656c4b5fd 100644 --- a/twilio/rest/api/v2010/model_list_call_notification_response.go +++ b/twilio/rest/api/v2010/model_list_call_notification_response.go @@ -1,25 +1,24 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListCallNotificationResponse struct for ListCallNotificationResponse type ListCallNotificationResponse struct { - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Notifications []ApiV2010AccountCallCallNotification `json:"Notifications,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Notifications []ApiV2010AccountCallCallNotification `json:"Notifications,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_call_recording_response.go b/twilio/rest/api/v2010/model_list_call_recording_response.go index 646e113c8..89a25f99b 100644 --- a/twilio/rest/api/v2010/model_list_call_recording_response.go +++ b/twilio/rest/api/v2010/model_list_call_recording_response.go @@ -1,25 +1,24 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListCallRecordingResponse struct for ListCallRecordingResponse type ListCallRecordingResponse struct { - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Recordings []ApiV2010AccountCallCallRecording `json:"Recordings,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Recordings []ApiV2010AccountCallCallRecording `json:"Recordings,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_call_response.go b/twilio/rest/api/v2010/model_list_call_response.go index 5d32a19d4..9fa3f9184 100644 --- a/twilio/rest/api/v2010/model_list_call_response.go +++ b/twilio/rest/api/v2010/model_list_call_response.go @@ -1,25 +1,24 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListCallResponse struct for ListCallResponse type ListCallResponse struct { - Calls []ApiV2010AccountCall `json:"Calls,omitempty"` - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + Calls []ApiV2010AccountCall `json:"Calls,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_conference_recording_response.go b/twilio/rest/api/v2010/model_list_conference_recording_response.go index 40e58c6ec..865e2af98 100644 --- a/twilio/rest/api/v2010/model_list_conference_recording_response.go +++ b/twilio/rest/api/v2010/model_list_conference_recording_response.go @@ -1,25 +1,24 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListConferenceRecordingResponse struct for ListConferenceRecordingResponse type ListConferenceRecordingResponse struct { - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Recordings []ApiV2010AccountConferenceConferenceRecording `json:"Recordings,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Recordings []ApiV2010AccountConferenceConferenceRecording `json:"Recordings,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_conference_response.go b/twilio/rest/api/v2010/model_list_conference_response.go index a8c1efe8b..3184e1d10 100644 --- a/twilio/rest/api/v2010/model_list_conference_response.go +++ b/twilio/rest/api/v2010/model_list_conference_response.go @@ -1,25 +1,24 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListConferenceResponse struct for ListConferenceResponse type ListConferenceResponse struct { - Conferences []ApiV2010AccountConference `json:"Conferences,omitempty"` - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + Conferences []ApiV2010AccountConference `json:"Conferences,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_connect_app_response.go b/twilio/rest/api/v2010/model_list_connect_app_response.go index 428c4d7b1..4b000db69 100644 --- a/twilio/rest/api/v2010/model_list_connect_app_response.go +++ b/twilio/rest/api/v2010/model_list_connect_app_response.go @@ -1,25 +1,24 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListConnectAppResponse struct for ListConnectAppResponse type ListConnectAppResponse struct { - ConnectApps []ApiV2010AccountConnectApp `json:"ConnectApps,omitempty"` - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + ConnectApps []ApiV2010AccountConnectApp `json:"ConnectApps,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_dependent_phone_number_response.go b/twilio/rest/api/v2010/model_list_dependent_phone_number_response.go index 2314746a0..a292d70cd 100644 --- a/twilio/rest/api/v2010/model_list_dependent_phone_number_response.go +++ b/twilio/rest/api/v2010/model_list_dependent_phone_number_response.go @@ -1,25 +1,24 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListDependentPhoneNumberResponse struct for ListDependentPhoneNumberResponse type ListDependentPhoneNumberResponse struct { DependentPhoneNumbers []ApiV2010AccountAddressDependentPhoneNumber `json:"DependentPhoneNumbers,omitempty"` - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_incoming_phone_number_assigned_add_on_extension_response.go b/twilio/rest/api/v2010/model_list_incoming_phone_number_assigned_add_on_extension_response.go index ab1ff4969..632c68bc7 100644 --- a/twilio/rest/api/v2010/model_list_incoming_phone_number_assigned_add_on_extension_response.go +++ b/twilio/rest/api/v2010/model_list_incoming_phone_number_assigned_add_on_extension_response.go @@ -1,25 +1,24 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListIncomingPhoneNumberAssignedAddOnExtensionResponse struct for ListIncomingPhoneNumberAssignedAddOnExtensionResponse type ListIncomingPhoneNumberAssignedAddOnExtensionResponse struct { - End int32 `json:"End,omitempty"` - Extensions []ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOnIncomingPhoneNumberAssignedAddOnExtension `json:"Extensions,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + End int32 `json:"End,omitempty"` + Extensions []ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOnIncomingPhoneNumberAssignedAddOnExtension `json:"Extensions,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_incoming_phone_number_assigned_add_on_response.go b/twilio/rest/api/v2010/model_list_incoming_phone_number_assigned_add_on_response.go index 13ea30775..a4d55e5de 100644 --- a/twilio/rest/api/v2010/model_list_incoming_phone_number_assigned_add_on_response.go +++ b/twilio/rest/api/v2010/model_list_incoming_phone_number_assigned_add_on_response.go @@ -1,25 +1,24 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListIncomingPhoneNumberAssignedAddOnResponse struct for ListIncomingPhoneNumberAssignedAddOnResponse type ListIncomingPhoneNumberAssignedAddOnResponse struct { - AssignedAddOns []ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOn `json:"AssignedAddOns,omitempty"` - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + AssignedAddOns []ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOn `json:"AssignedAddOns,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_incoming_phone_number_local_response.go b/twilio/rest/api/v2010/model_list_incoming_phone_number_local_response.go index c779e1d44..7e5e13466 100644 --- a/twilio/rest/api/v2010/model_list_incoming_phone_number_local_response.go +++ b/twilio/rest/api/v2010/model_list_incoming_phone_number_local_response.go @@ -1,25 +1,24 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListIncomingPhoneNumberLocalResponse struct for ListIncomingPhoneNumberLocalResponse type ListIncomingPhoneNumberLocalResponse struct { - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` IncomingPhoneNumbers []ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberLocal `json:"IncomingPhoneNumbers,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_incoming_phone_number_mobile_response.go b/twilio/rest/api/v2010/model_list_incoming_phone_number_mobile_response.go index 58df811b5..9db8fccc7 100644 --- a/twilio/rest/api/v2010/model_list_incoming_phone_number_mobile_response.go +++ b/twilio/rest/api/v2010/model_list_incoming_phone_number_mobile_response.go @@ -1,25 +1,24 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListIncomingPhoneNumberMobileResponse struct for ListIncomingPhoneNumberMobileResponse type ListIncomingPhoneNumberMobileResponse struct { - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` IncomingPhoneNumbers []ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberMobile `json:"IncomingPhoneNumbers,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_incoming_phone_number_response.go b/twilio/rest/api/v2010/model_list_incoming_phone_number_response.go index c575ad4ac..0a6ab1571 100644 --- a/twilio/rest/api/v2010/model_list_incoming_phone_number_response.go +++ b/twilio/rest/api/v2010/model_list_incoming_phone_number_response.go @@ -1,25 +1,24 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListIncomingPhoneNumberResponse struct for ListIncomingPhoneNumberResponse type ListIncomingPhoneNumberResponse struct { - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` IncomingPhoneNumbers []ApiV2010AccountIncomingPhoneNumber `json:"IncomingPhoneNumbers,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_incoming_phone_number_toll_free_response.go b/twilio/rest/api/v2010/model_list_incoming_phone_number_toll_free_response.go index f5f3a7213..d15cb9723 100644 --- a/twilio/rest/api/v2010/model_list_incoming_phone_number_toll_free_response.go +++ b/twilio/rest/api/v2010/model_list_incoming_phone_number_toll_free_response.go @@ -1,25 +1,24 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListIncomingPhoneNumberTollFreeResponse struct for ListIncomingPhoneNumberTollFreeResponse type ListIncomingPhoneNumberTollFreeResponse struct { - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` IncomingPhoneNumbers []ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberTollFree `json:"IncomingPhoneNumbers,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_key_response.go b/twilio/rest/api/v2010/model_list_key_response.go index 587467c99..aea1fa7b3 100644 --- a/twilio/rest/api/v2010/model_list_key_response.go +++ b/twilio/rest/api/v2010/model_list_key_response.go @@ -1,25 +1,24 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListKeyResponse struct for ListKeyResponse type ListKeyResponse struct { - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - Keys []ApiV2010AccountKey `json:"Keys,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + Keys []ApiV2010AccountKey `json:"Keys,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_media_response.go b/twilio/rest/api/v2010/model_list_media_response.go index 2b2b513b6..059f7cf85 100644 --- a/twilio/rest/api/v2010/model_list_media_response.go +++ b/twilio/rest/api/v2010/model_list_media_response.go @@ -1,25 +1,24 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListMediaResponse struct for ListMediaResponse type ListMediaResponse struct { - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - MediaList []ApiV2010AccountMessageMedia `json:"MediaList,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + MediaList []ApiV2010AccountMessageMedia `json:"MediaList,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_member_response.go b/twilio/rest/api/v2010/model_list_member_response.go index a16daee88..5b7db04e5 100644 --- a/twilio/rest/api/v2010/model_list_member_response.go +++ b/twilio/rest/api/v2010/model_list_member_response.go @@ -1,25 +1,24 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListMemberResponse struct for ListMemberResponse type ListMemberResponse struct { - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - QueueMembers []ApiV2010AccountQueueMember `json:"QueueMembers,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + QueueMembers []ApiV2010AccountQueueMember `json:"QueueMembers,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_message_response.go b/twilio/rest/api/v2010/model_list_message_response.go index 3ebb29322..f9bba4dd7 100644 --- a/twilio/rest/api/v2010/model_list_message_response.go +++ b/twilio/rest/api/v2010/model_list_message_response.go @@ -1,25 +1,24 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListMessageResponse struct for ListMessageResponse type ListMessageResponse struct { - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - Messages []ApiV2010AccountMessage `json:"Messages,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + Messages []ApiV2010AccountMessage `json:"Messages,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_notification_response.go b/twilio/rest/api/v2010/model_list_notification_response.go index e8d3bf4c6..d095e7a2a 100644 --- a/twilio/rest/api/v2010/model_list_notification_response.go +++ b/twilio/rest/api/v2010/model_list_notification_response.go @@ -1,25 +1,24 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListNotificationResponse struct for ListNotificationResponse type ListNotificationResponse struct { - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Notifications []ApiV2010AccountNotification `json:"Notifications,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Notifications []ApiV2010AccountNotification `json:"Notifications,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_outgoing_caller_id_response.go b/twilio/rest/api/v2010/model_list_outgoing_caller_id_response.go index 1b1293f08..3c26e8f9b 100644 --- a/twilio/rest/api/v2010/model_list_outgoing_caller_id_response.go +++ b/twilio/rest/api/v2010/model_list_outgoing_caller_id_response.go @@ -1,25 +1,24 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListOutgoingCallerIdResponse struct for ListOutgoingCallerIdResponse type ListOutgoingCallerIdResponse struct { - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` OutgoingCallerIds []ApiV2010AccountOutgoingCallerId `json:"OutgoingCallerIds,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_participant_response.go b/twilio/rest/api/v2010/model_list_participant_response.go index da3e9e502..2b938a801 100644 --- a/twilio/rest/api/v2010/model_list_participant_response.go +++ b/twilio/rest/api/v2010/model_list_participant_response.go @@ -1,25 +1,24 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListParticipantResponse struct for ListParticipantResponse type ListParticipantResponse struct { - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - Participants []ApiV2010AccountConferenceParticipant `json:"Participants,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + Participants []ApiV2010AccountConferenceParticipant `json:"Participants,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_queue_response.go b/twilio/rest/api/v2010/model_list_queue_response.go index b692f1a29..e0d8010bd 100644 --- a/twilio/rest/api/v2010/model_list_queue_response.go +++ b/twilio/rest/api/v2010/model_list_queue_response.go @@ -1,25 +1,24 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListQueueResponse struct for ListQueueResponse type ListQueueResponse struct { - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Queues []ApiV2010AccountQueue `json:"Queues,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Queues []ApiV2010AccountQueue `json:"Queues,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_recording_add_on_result_payload_response.go b/twilio/rest/api/v2010/model_list_recording_add_on_result_payload_response.go index 3710be520..e4e5bb180 100644 --- a/twilio/rest/api/v2010/model_list_recording_add_on_result_payload_response.go +++ b/twilio/rest/api/v2010/model_list_recording_add_on_result_payload_response.go @@ -1,25 +1,24 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListRecordingAddOnResultPayloadResponse struct for ListRecordingAddOnResultPayloadResponse type ListRecordingAddOnResultPayloadResponse struct { - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - Payloads []ApiV2010AccountRecordingRecordingAddOnResultRecordingAddOnResultPayload `json:"Payloads,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + Payloads []ApiV2010AccountRecordingRecordingAddOnResultRecordingAddOnResultPayload `json:"Payloads,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_recording_add_on_result_response.go b/twilio/rest/api/v2010/model_list_recording_add_on_result_response.go index ce2383128..2fa689f26 100644 --- a/twilio/rest/api/v2010/model_list_recording_add_on_result_response.go +++ b/twilio/rest/api/v2010/model_list_recording_add_on_result_response.go @@ -1,25 +1,24 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListRecordingAddOnResultResponse struct for ListRecordingAddOnResultResponse type ListRecordingAddOnResultResponse struct { - AddOnResults []ApiV2010AccountRecordingRecordingAddOnResult `json:"AddOnResults,omitempty"` - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + AddOnResults []ApiV2010AccountRecordingRecordingAddOnResult `json:"AddOnResults,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_recording_response.go b/twilio/rest/api/v2010/model_list_recording_response.go index 920a67a92..43706810f 100644 --- a/twilio/rest/api/v2010/model_list_recording_response.go +++ b/twilio/rest/api/v2010/model_list_recording_response.go @@ -1,25 +1,24 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListRecordingResponse struct for ListRecordingResponse type ListRecordingResponse struct { - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Recordings []ApiV2010AccountRecording `json:"Recordings,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Recordings []ApiV2010AccountRecording `json:"Recordings,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_recording_transcription_response.go b/twilio/rest/api/v2010/model_list_recording_transcription_response.go index 691337135..69c0ca55d 100644 --- a/twilio/rest/api/v2010/model_list_recording_transcription_response.go +++ b/twilio/rest/api/v2010/model_list_recording_transcription_response.go @@ -1,25 +1,24 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListRecordingTranscriptionResponse struct for ListRecordingTranscriptionResponse type ListRecordingTranscriptionResponse struct { - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Transcriptions []ApiV2010AccountRecordingRecordingTranscription `json:"Transcriptions,omitempty"` - Uri string `json:"Uri,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Transcriptions []ApiV2010AccountRecordingRecordingTranscription `json:"Transcriptions,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_short_code_response.go b/twilio/rest/api/v2010/model_list_short_code_response.go index 2dd564601..f2edfad3e 100644 --- a/twilio/rest/api/v2010/model_list_short_code_response.go +++ b/twilio/rest/api/v2010/model_list_short_code_response.go @@ -1,25 +1,24 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListShortCodeResponse struct for ListShortCodeResponse type ListShortCodeResponse struct { - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - ShortCodes []ApiV2010AccountShortCode `json:"ShortCodes,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + ShortCodes []ApiV2010AccountShortCode `json:"ShortCodes,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_signing_key_response.go b/twilio/rest/api/v2010/model_list_signing_key_response.go index 5ce22f54c..57ff48600 100644 --- a/twilio/rest/api/v2010/model_list_signing_key_response.go +++ b/twilio/rest/api/v2010/model_list_signing_key_response.go @@ -1,25 +1,24 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListSigningKeyResponse struct for ListSigningKeyResponse type ListSigningKeyResponse struct { - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - SigningKeys []ApiV2010AccountSigningKey `json:"SigningKeys,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + SigningKeys []ApiV2010AccountSigningKey `json:"SigningKeys,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_sip_auth_calls_credential_list_mapping_response.go b/twilio/rest/api/v2010/model_list_sip_auth_calls_credential_list_mapping_response.go index 338f57fcc..234362751 100644 --- a/twilio/rest/api/v2010/model_list_sip_auth_calls_credential_list_mapping_response.go +++ b/twilio/rest/api/v2010/model_list_sip_auth_calls_credential_list_mapping_response.go @@ -1,25 +1,24 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListSipAuthCallsCredentialListMappingResponse struct for ListSipAuthCallsCredentialListMappingResponse type ListSipAuthCallsCredentialListMappingResponse struct { - Contents []ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsCredentialListMapping `json:"Contents,omitempty"` - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + Contents []ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsCredentialListMapping `json:"Contents,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_sip_auth_calls_ip_access_control_list_mapping_response.go b/twilio/rest/api/v2010/model_list_sip_auth_calls_ip_access_control_list_mapping_response.go index e5926f517..a57d65090 100644 --- a/twilio/rest/api/v2010/model_list_sip_auth_calls_ip_access_control_list_mapping_response.go +++ b/twilio/rest/api/v2010/model_list_sip_auth_calls_ip_access_control_list_mapping_response.go @@ -1,25 +1,24 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListSipAuthCallsIpAccessControlListMappingResponse struct for ListSipAuthCallsIpAccessControlListMappingResponse type ListSipAuthCallsIpAccessControlListMappingResponse struct { - Contents []ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsIpAccessControlListMapping `json:"Contents,omitempty"` - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + Contents []ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsIpAccessControlListMapping `json:"Contents,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_sip_auth_registrations_credential_list_mapping_response.go b/twilio/rest/api/v2010/model_list_sip_auth_registrations_credential_list_mapping_response.go index c5ecf9c5a..9ec9ce316 100644 --- a/twilio/rest/api/v2010/model_list_sip_auth_registrations_credential_list_mapping_response.go +++ b/twilio/rest/api/v2010/model_list_sip_auth_registrations_credential_list_mapping_response.go @@ -1,25 +1,24 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListSipAuthRegistrationsCredentialListMappingResponse struct for ListSipAuthRegistrationsCredentialListMappingResponse type ListSipAuthRegistrationsCredentialListMappingResponse struct { - Contents []ApiV2010AccountSipSipDomainSipAuthSipAuthRegistrationsSipAuthRegistrationsCredentialListMapping `json:"Contents,omitempty"` - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + Contents []ApiV2010AccountSipSipDomainSipAuthSipAuthRegistrationsSipAuthRegistrationsCredentialListMapping `json:"Contents,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_sip_credential_list_mapping_response.go b/twilio/rest/api/v2010/model_list_sip_credential_list_mapping_response.go index 8c4e11753..b490e5657 100644 --- a/twilio/rest/api/v2010/model_list_sip_credential_list_mapping_response.go +++ b/twilio/rest/api/v2010/model_list_sip_credential_list_mapping_response.go @@ -1,25 +1,24 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListSipCredentialListMappingResponse struct for ListSipCredentialListMappingResponse type ListSipCredentialListMappingResponse struct { CredentialListMappings []ApiV2010AccountSipSipDomainSipCredentialListMapping `json:"CredentialListMappings,omitempty"` - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_sip_credential_list_response.go b/twilio/rest/api/v2010/model_list_sip_credential_list_response.go index b002ff9a5..689e857e5 100644 --- a/twilio/rest/api/v2010/model_list_sip_credential_list_response.go +++ b/twilio/rest/api/v2010/model_list_sip_credential_list_response.go @@ -1,25 +1,24 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListSipCredentialListResponse struct for ListSipCredentialListResponse type ListSipCredentialListResponse struct { CredentialLists []ApiV2010AccountSipSipCredentialList `json:"CredentialLists,omitempty"` - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_sip_credential_response.go b/twilio/rest/api/v2010/model_list_sip_credential_response.go index a18b79902..61d2495cb 100644 --- a/twilio/rest/api/v2010/model_list_sip_credential_response.go +++ b/twilio/rest/api/v2010/model_list_sip_credential_response.go @@ -1,25 +1,24 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListSipCredentialResponse struct for ListSipCredentialResponse type ListSipCredentialResponse struct { - Credentials []ApiV2010AccountSipSipCredentialListSipCredential `json:"Credentials,omitempty"` - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + Credentials []ApiV2010AccountSipSipCredentialListSipCredential `json:"Credentials,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_sip_domain_response.go b/twilio/rest/api/v2010/model_list_sip_domain_response.go index 4b4008e17..ce524fafa 100644 --- a/twilio/rest/api/v2010/model_list_sip_domain_response.go +++ b/twilio/rest/api/v2010/model_list_sip_domain_response.go @@ -1,25 +1,24 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListSipDomainResponse struct for ListSipDomainResponse type ListSipDomainResponse struct { - Domains []ApiV2010AccountSipSipDomain `json:"Domains,omitempty"` - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + Domains []ApiV2010AccountSipSipDomain `json:"Domains,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_sip_ip_access_control_list_mapping_response.go b/twilio/rest/api/v2010/model_list_sip_ip_access_control_list_mapping_response.go index a4018bfa5..b788754f2 100644 --- a/twilio/rest/api/v2010/model_list_sip_ip_access_control_list_mapping_response.go +++ b/twilio/rest/api/v2010/model_list_sip_ip_access_control_list_mapping_response.go @@ -1,25 +1,24 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListSipIpAccessControlListMappingResponse struct for ListSipIpAccessControlListMappingResponse type ListSipIpAccessControlListMappingResponse struct { - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` IpAccessControlListMappings []ApiV2010AccountSipSipDomainSipIpAccessControlListMapping `json:"IpAccessControlListMappings,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_sip_ip_access_control_list_response.go b/twilio/rest/api/v2010/model_list_sip_ip_access_control_list_response.go index d03a21329..fed49e4ec 100644 --- a/twilio/rest/api/v2010/model_list_sip_ip_access_control_list_response.go +++ b/twilio/rest/api/v2010/model_list_sip_ip_access_control_list_response.go @@ -1,25 +1,24 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListSipIpAccessControlListResponse struct for ListSipIpAccessControlListResponse type ListSipIpAccessControlListResponse struct { - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` IpAccessControlLists []ApiV2010AccountSipSipIpAccessControlList `json:"IpAccessControlLists,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_sip_ip_address_response.go b/twilio/rest/api/v2010/model_list_sip_ip_address_response.go index 2d4769fb5..5eef6eac8 100644 --- a/twilio/rest/api/v2010/model_list_sip_ip_address_response.go +++ b/twilio/rest/api/v2010/model_list_sip_ip_address_response.go @@ -1,25 +1,24 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListSipIpAddressResponse struct for ListSipIpAddressResponse type ListSipIpAddressResponse struct { - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - IpAddresses []ApiV2010AccountSipSipIpAccessControlListSipIpAddress `json:"IpAddresses,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + IpAddresses []ApiV2010AccountSipSipIpAccessControlListSipIpAddress `json:"IpAddresses,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_transcription_response.go b/twilio/rest/api/v2010/model_list_transcription_response.go index 8b1915e1b..863905937 100644 --- a/twilio/rest/api/v2010/model_list_transcription_response.go +++ b/twilio/rest/api/v2010/model_list_transcription_response.go @@ -1,25 +1,24 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListTranscriptionResponse struct for ListTranscriptionResponse type ListTranscriptionResponse struct { - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Transcriptions []ApiV2010AccountTranscription `json:"Transcriptions,omitempty"` - Uri string `json:"Uri,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Transcriptions []ApiV2010AccountTranscription `json:"Transcriptions,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_usage_record_all_time_response.go b/twilio/rest/api/v2010/model_list_usage_record_all_time_response.go index 7aad690c4..5e9735324 100644 --- a/twilio/rest/api/v2010/model_list_usage_record_all_time_response.go +++ b/twilio/rest/api/v2010/model_list_usage_record_all_time_response.go @@ -1,25 +1,24 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListUsageRecordAllTimeResponse struct for ListUsageRecordAllTimeResponse type ListUsageRecordAllTimeResponse struct { - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` - UsageRecords []ApiV2010AccountUsageUsageRecordUsageRecordAllTime `json:"UsageRecords,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` + UsageRecords []ApiV2010AccountUsageUsageRecordUsageRecordAllTime `json:"UsageRecords,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_usage_record_daily_response.go b/twilio/rest/api/v2010/model_list_usage_record_daily_response.go index 23792ce02..e6f41d713 100644 --- a/twilio/rest/api/v2010/model_list_usage_record_daily_response.go +++ b/twilio/rest/api/v2010/model_list_usage_record_daily_response.go @@ -1,25 +1,24 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListUsageRecordDailyResponse struct for ListUsageRecordDailyResponse type ListUsageRecordDailyResponse struct { - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` - UsageRecords []ApiV2010AccountUsageUsageRecordUsageRecordDaily `json:"UsageRecords,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` + UsageRecords []ApiV2010AccountUsageUsageRecordUsageRecordDaily `json:"UsageRecords,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_usage_record_last_month_response.go b/twilio/rest/api/v2010/model_list_usage_record_last_month_response.go index cfbe5bf75..d1f16e02b 100644 --- a/twilio/rest/api/v2010/model_list_usage_record_last_month_response.go +++ b/twilio/rest/api/v2010/model_list_usage_record_last_month_response.go @@ -1,25 +1,24 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListUsageRecordLastMonthResponse struct for ListUsageRecordLastMonthResponse type ListUsageRecordLastMonthResponse struct { - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` - UsageRecords []ApiV2010AccountUsageUsageRecordUsageRecordLastMonth `json:"UsageRecords,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` + UsageRecords []ApiV2010AccountUsageUsageRecordUsageRecordLastMonth `json:"UsageRecords,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_usage_record_monthly_response.go b/twilio/rest/api/v2010/model_list_usage_record_monthly_response.go index 1ae63cfe5..c910fd098 100644 --- a/twilio/rest/api/v2010/model_list_usage_record_monthly_response.go +++ b/twilio/rest/api/v2010/model_list_usage_record_monthly_response.go @@ -1,25 +1,24 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListUsageRecordMonthlyResponse struct for ListUsageRecordMonthlyResponse type ListUsageRecordMonthlyResponse struct { - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` - UsageRecords []ApiV2010AccountUsageUsageRecordUsageRecordMonthly `json:"UsageRecords,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` + UsageRecords []ApiV2010AccountUsageUsageRecordUsageRecordMonthly `json:"UsageRecords,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_usage_record_response.go b/twilio/rest/api/v2010/model_list_usage_record_response.go index eaea62e3c..dcefedd40 100644 --- a/twilio/rest/api/v2010/model_list_usage_record_response.go +++ b/twilio/rest/api/v2010/model_list_usage_record_response.go @@ -1,25 +1,24 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListUsageRecordResponse struct for ListUsageRecordResponse type ListUsageRecordResponse struct { - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` - UsageRecords []ApiV2010AccountUsageUsageRecord `json:"UsageRecords,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` + UsageRecords []ApiV2010AccountUsageUsageRecord `json:"UsageRecords,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_usage_record_this_month_response.go b/twilio/rest/api/v2010/model_list_usage_record_this_month_response.go index 839266650..437f03eaa 100644 --- a/twilio/rest/api/v2010/model_list_usage_record_this_month_response.go +++ b/twilio/rest/api/v2010/model_list_usage_record_this_month_response.go @@ -1,25 +1,24 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListUsageRecordThisMonthResponse struct for ListUsageRecordThisMonthResponse type ListUsageRecordThisMonthResponse struct { - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` - UsageRecords []ApiV2010AccountUsageUsageRecordUsageRecordThisMonth `json:"UsageRecords,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` + UsageRecords []ApiV2010AccountUsageUsageRecordUsageRecordThisMonth `json:"UsageRecords,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_usage_record_today_response.go b/twilio/rest/api/v2010/model_list_usage_record_today_response.go index a3e7889f3..1b6925651 100644 --- a/twilio/rest/api/v2010/model_list_usage_record_today_response.go +++ b/twilio/rest/api/v2010/model_list_usage_record_today_response.go @@ -1,25 +1,24 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListUsageRecordTodayResponse struct for ListUsageRecordTodayResponse type ListUsageRecordTodayResponse struct { - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` - UsageRecords []ApiV2010AccountUsageUsageRecordUsageRecordToday `json:"UsageRecords,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` + UsageRecords []ApiV2010AccountUsageUsageRecordUsageRecordToday `json:"UsageRecords,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_usage_record_yearly_response.go b/twilio/rest/api/v2010/model_list_usage_record_yearly_response.go index bd1fdb9ac..73277cea7 100644 --- a/twilio/rest/api/v2010/model_list_usage_record_yearly_response.go +++ b/twilio/rest/api/v2010/model_list_usage_record_yearly_response.go @@ -1,25 +1,24 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListUsageRecordYearlyResponse struct for ListUsageRecordYearlyResponse type ListUsageRecordYearlyResponse struct { - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` - UsageRecords []ApiV2010AccountUsageUsageRecordUsageRecordYearly `json:"UsageRecords,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` + UsageRecords []ApiV2010AccountUsageUsageRecordUsageRecordYearly `json:"UsageRecords,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_usage_record_yesterday_response.go b/twilio/rest/api/v2010/model_list_usage_record_yesterday_response.go index 25fc7c32b..416690ceb 100644 --- a/twilio/rest/api/v2010/model_list_usage_record_yesterday_response.go +++ b/twilio/rest/api/v2010/model_list_usage_record_yesterday_response.go @@ -1,25 +1,24 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListUsageRecordYesterdayResponse struct for ListUsageRecordYesterdayResponse type ListUsageRecordYesterdayResponse struct { - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` - UsageRecords []ApiV2010AccountUsageUsageRecordUsageRecordYesterday `json:"UsageRecords,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` + UsageRecords []ApiV2010AccountUsageUsageRecordUsageRecordYesterday `json:"UsageRecords,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_usage_trigger_response.go b/twilio/rest/api/v2010/model_list_usage_trigger_response.go index 6addb6df4..4dc0dd163 100644 --- a/twilio/rest/api/v2010/model_list_usage_trigger_response.go +++ b/twilio/rest/api/v2010/model_list_usage_trigger_response.go @@ -1,25 +1,24 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListUsageTriggerResponse struct for ListUsageTriggerResponse type ListUsageTriggerResponse struct { - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` - UsageTriggers []ApiV2010AccountUsageUsageTrigger `json:"UsageTriggers,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` + UsageTriggers []ApiV2010AccountUsageUsageTrigger `json:"UsageTriggers,omitempty"` } diff --git a/twilio/rest/autopilot/v1/api_default.go b/twilio/rest/autopilot/v1/api_default.go index 23c0e97f4..73e0f6341 100644 --- a/twilio/rest/autopilot/v1/api_default.go +++ b/twilio/rest/autopilot/v1/api_default.go @@ -1,11 +1,11 @@ /* - * Twilio - Autopilot - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,10 +14,9 @@ package openapi import ( "encoding/json" "fmt" - "net/url" - "strings" - twilio "github.com/twilio/twilio-go/client" + "net/url" + "strings" ) type DefaultApiService struct { @@ -26,21 +25,21 @@ type DefaultApiService struct { } func NewDefaultApiService(client *twilio.Client) *DefaultApiService { - return &DefaultApiService{ - client: client, + return &DefaultApiService { + client: client, baseURL: "https://autopilot.twilio.com", } } // CreateAssistantParams Optional parameters for the method 'CreateAssistant' type CreateAssistantParams struct { - CallbackEvents *string `json:"CallbackEvents,omitempty"` - CallbackUrl *string `json:"CallbackUrl,omitempty"` - Defaults *map[string]interface{} `json:"Defaults,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - LogQueries *bool `json:"LogQueries,omitempty"` - StyleSheet *map[string]interface{} `json:"StyleSheet,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + CallbackEvents *string `json:"CallbackEvents,omitempty"` + CallbackUrl *string `json:"CallbackUrl,omitempty"` + Defaults *map[string]interface{} `json:"Defaults,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + LogQueries *bool `json:"LogQueries,omitempty"` + StyleSheet *map[string]interface{} `json:"StyleSheet,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` } /* @@ -54,65 +53,65 @@ type CreateAssistantParams struct { * @param "StyleSheet" (map[string]interface{}) - The JSON string that defines the Assistant's [style sheet](https://www.twilio.com/docs/autopilot/api/assistant/stylesheet) * @param "UniqueName" (string) - An application-defined string that uniquely identifies the new resource. It can be used as an alternative to the `sid` in the URL path to address the resource. The first 64 characters must be unique. * @return AutopilotV1Assistant - */ +*/ func (c *DefaultApiService) CreateAssistant(params *CreateAssistantParams) (*AutopilotV1Assistant, error) { - path := "/v1/Assistants" + path := "/v1/Assistants" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.CallbackEvents != nil { - data.Set("CallbackEvents", *params.CallbackEvents) - } - if params != nil && params.CallbackUrl != nil { - data.Set("CallbackUrl", *params.CallbackUrl) + if params != nil && params.CallbackEvents != nil { + data.Set("CallbackEvents", *params.CallbackEvents) +} + if params != nil && params.CallbackUrl != nil { + data.Set("CallbackUrl", *params.CallbackUrl) +} + if params != nil && params.Defaults != nil { + v, err := json.Marshal(params.Defaults) + + if err != nil { + return nil, err } - if params != nil && params.Defaults != nil { - v, err := json.Marshal(params.Defaults) - if err != nil { - return nil, err - } + data.Set("Defaults", fmt.Sprint(v)) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.LogQueries != nil { + data.Set("LogQueries", fmt.Sprint(*params.LogQueries)) +} + if params != nil && params.StyleSheet != nil { + v, err := json.Marshal(params.StyleSheet) - data.Set("Defaults", fmt.Sprint(v)) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.LogQueries != nil { - data.Set("LogQueries", fmt.Sprint(*params.LogQueries)) + if err != nil { + return nil, err } - if params != nil && params.StyleSheet != nil { - v, err := json.Marshal(params.StyleSheet) - if err != nil { - return nil, err - } + data.Set("StyleSheet", fmt.Sprint(v)) +} + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) +} - data.Set("StyleSheet", fmt.Sprint(v)) - } - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) - } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &AutopilotV1Assistant{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &AutopilotV1Assistant{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } - // CreateFieldParams Optional parameters for the method 'CreateField' type CreateFieldParams struct { - FieldType *string `json:"FieldType,omitempty"` + FieldType *string `json:"FieldType,omitempty"` UniqueName *string `json:"UniqueName,omitempty"` } @@ -124,41 +123,41 @@ type CreateFieldParams struct { * @param "FieldType" (string) - The Field Type of the new field. Can be: a [Built-in Field Type](https://www.twilio.com/docs/autopilot/built-in-field-types), the `unique_name`, or the `sid` of a custom Field Type. * @param "UniqueName" (string) - An application-defined string that uniquely identifies the new resource. This value must be a unique string of no more than 64 characters. It can be used as an alternative to the `sid` in the URL path to address the resource. * @return AutopilotV1AssistantTaskField - */ +*/ func (c *DefaultApiService) CreateField(AssistantSid string, TaskSid string, params *CreateFieldParams) (*AutopilotV1AssistantTaskField, error) { - path := "/v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Fields" + path := "/v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Fields" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) path = strings.Replace(path, "{"+"TaskSid"+"}", TaskSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.FieldType != nil { - data.Set("FieldType", *params.FieldType) - } - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) - } + if params != nil && params.FieldType != nil { + data.Set("FieldType", *params.FieldType) +} + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &AutopilotV1AssistantTaskField{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &AutopilotV1AssistantTaskField{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateFieldTypeParams Optional parameters for the method 'CreateFieldType' type CreateFieldTypeParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` } /* @@ -168,41 +167,41 @@ type CreateFieldTypeParams struct { * @param "FriendlyName" (string) - A descriptive string that you create to describe the new resource. It is not unique and can be up to 255 characters long. * @param "UniqueName" (string) - An application-defined string that uniquely identifies the new resource. It can be used as an alternative to the `sid` in the URL path to address the resource. The first 64 characters must be unique. * @return AutopilotV1AssistantFieldType - */ +*/ func (c *DefaultApiService) CreateFieldType(AssistantSid string, params *CreateFieldTypeParams) (*AutopilotV1AssistantFieldType, error) { - path := "/v1/Assistants/{AssistantSid}/FieldTypes" + path := "/v1/Assistants/{AssistantSid}/FieldTypes" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) - } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &AutopilotV1AssistantFieldType{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &AutopilotV1AssistantFieldType{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateFieldValueParams Optional parameters for the method 'CreateFieldValue' type CreateFieldValueParams struct { - Language *string `json:"Language,omitempty"` + Language *string `json:"Language,omitempty"` SynonymOf *string `json:"SynonymOf,omitempty"` - Value *string `json:"Value,omitempty"` + Value *string `json:"Value,omitempty"` } /* @@ -214,44 +213,44 @@ type CreateFieldValueParams struct { * @param "SynonymOf" (string) - The string value that indicates which word the field value is a synonym of. * @param "Value" (string) - The Field Value data. * @return AutopilotV1AssistantFieldTypeFieldValue - */ +*/ func (c *DefaultApiService) CreateFieldValue(AssistantSid string, FieldTypeSid string, params *CreateFieldValueParams) (*AutopilotV1AssistantFieldTypeFieldValue, error) { - path := "/v1/Assistants/{AssistantSid}/FieldTypes/{FieldTypeSid}/FieldValues" + path := "/v1/Assistants/{AssistantSid}/FieldTypes/{FieldTypeSid}/FieldValues" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) path = strings.Replace(path, "{"+"FieldTypeSid"+"}", FieldTypeSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Language != nil { - data.Set("Language", *params.Language) - } - if params != nil && params.SynonymOf != nil { - data.Set("SynonymOf", *params.SynonymOf) - } - if params != nil && params.Value != nil { - data.Set("Value", *params.Value) - } + if params != nil && params.Language != nil { + data.Set("Language", *params.Language) +} + if params != nil && params.SynonymOf != nil { + data.Set("SynonymOf", *params.SynonymOf) +} + if params != nil && params.Value != nil { + data.Set("Value", *params.Value) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &AutopilotV1AssistantFieldTypeFieldValue{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &AutopilotV1AssistantFieldTypeFieldValue{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateModelBuildParams Optional parameters for the method 'CreateModelBuild' type CreateModelBuildParams struct { StatusCallback *string `json:"StatusCallback,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` } /* @@ -261,42 +260,42 @@ type CreateModelBuildParams struct { * @param "StatusCallback" (string) - The URL we should call using a POST method to send status information to your application. * @param "UniqueName" (string) - An application-defined string that uniquely identifies the new resource. This value must be a unique string of no more than 64 characters. It can be used as an alternative to the `sid` in the URL path to address the resource. * @return AutopilotV1AssistantModelBuild - */ +*/ func (c *DefaultApiService) CreateModelBuild(AssistantSid string, params *CreateModelBuildParams) (*AutopilotV1AssistantModelBuild, error) { - path := "/v1/Assistants/{AssistantSid}/ModelBuilds" + path := "/v1/Assistants/{AssistantSid}/ModelBuilds" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.StatusCallback != nil { - data.Set("StatusCallback", *params.StatusCallback) - } - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) - } + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) +} + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &AutopilotV1AssistantModelBuild{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &AutopilotV1AssistantModelBuild{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateQueryParams Optional parameters for the method 'CreateQuery' type CreateQueryParams struct { - Language *string `json:"Language,omitempty"` + Language *string `json:"Language,omitempty"` ModelBuild *string `json:"ModelBuild,omitempty"` - Query *string `json:"Query,omitempty"` - Tasks *string `json:"Tasks,omitempty"` + Query *string `json:"Query,omitempty"` + Tasks *string `json:"Tasks,omitempty"` } /* @@ -308,47 +307,47 @@ type CreateQueryParams struct { * @param "Query" (string) - The end-user's natural language input. It can be up to 2048 characters long. * @param "Tasks" (string) - The list of tasks to limit the new query to. Tasks are expressed as a comma-separated list of task `unique_name` values. For example, `task-unique_name-1, task-unique_name-2`. Listing specific tasks is useful to constrain the paths that a user can take. * @return AutopilotV1AssistantQuery - */ +*/ func (c *DefaultApiService) CreateQuery(AssistantSid string, params *CreateQueryParams) (*AutopilotV1AssistantQuery, error) { - path := "/v1/Assistants/{AssistantSid}/Queries" + path := "/v1/Assistants/{AssistantSid}/Queries" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Language != nil { - data.Set("Language", *params.Language) - } - if params != nil && params.ModelBuild != nil { - data.Set("ModelBuild", *params.ModelBuild) - } - if params != nil && params.Query != nil { - data.Set("Query", *params.Query) - } - if params != nil && params.Tasks != nil { - data.Set("Tasks", *params.Tasks) - } + if params != nil && params.Language != nil { + data.Set("Language", *params.Language) +} + if params != nil && params.ModelBuild != nil { + data.Set("ModelBuild", *params.ModelBuild) +} + if params != nil && params.Query != nil { + data.Set("Query", *params.Query) +} + if params != nil && params.Tasks != nil { + data.Set("Tasks", *params.Tasks) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &AutopilotV1AssistantQuery{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &AutopilotV1AssistantQuery{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateSampleParams Optional parameters for the method 'CreateSample' type CreateSampleParams struct { - Language *string `json:"Language,omitempty"` + Language *string `json:"Language,omitempty"` SourceChannel *string `json:"SourceChannel,omitempty"` - TaggedText *string `json:"TaggedText,omitempty"` + TaggedText *string `json:"TaggedText,omitempty"` } /* @@ -360,46 +359,46 @@ type CreateSampleParams struct { * @param "SourceChannel" (string) - The communication channel from which the new sample was captured. Can be: `voice`, `sms`, `chat`, `alexa`, `google-assistant`, `slack`, or null if not included. * @param "TaggedText" (string) - The text example of how end users might express the task. The sample can contain [Field tag blocks](https://www.twilio.com/docs/autopilot/api/task-sample#field-tagging). * @return AutopilotV1AssistantTaskSample - */ +*/ func (c *DefaultApiService) CreateSample(AssistantSid string, TaskSid string, params *CreateSampleParams) (*AutopilotV1AssistantTaskSample, error) { - path := "/v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Samples" + path := "/v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Samples" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) path = strings.Replace(path, "{"+"TaskSid"+"}", TaskSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Language != nil { - data.Set("Language", *params.Language) - } - if params != nil && params.SourceChannel != nil { - data.Set("SourceChannel", *params.SourceChannel) - } - if params != nil && params.TaggedText != nil { - data.Set("TaggedText", *params.TaggedText) - } + if params != nil && params.Language != nil { + data.Set("Language", *params.Language) +} + if params != nil && params.SourceChannel != nil { + data.Set("SourceChannel", *params.SourceChannel) +} + if params != nil && params.TaggedText != nil { + data.Set("TaggedText", *params.TaggedText) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &AutopilotV1AssistantTaskSample{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &AutopilotV1AssistantTaskSample{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateTaskParams Optional parameters for the method 'CreateTask' type CreateTaskParams struct { - Actions *map[string]interface{} `json:"Actions,omitempty"` - ActionsUrl *string `json:"ActionsUrl,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + Actions *map[string]interface{} `json:"Actions,omitempty"` + ActionsUrl *string `json:"ActionsUrl,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` } /* @@ -411,54 +410,54 @@ type CreateTaskParams struct { * @param "FriendlyName" (string) - A descriptive string that you create to describe the new resource. It is not unique and can be up to 255 characters long. * @param "UniqueName" (string) - An application-defined string that uniquely identifies the new resource. It can be used as an alternative to the `sid` in the URL path to address the resource. This value must be unique and 64 characters or less in length. * @return AutopilotV1AssistantTask - */ +*/ func (c *DefaultApiService) CreateTask(AssistantSid string, params *CreateTaskParams) (*AutopilotV1AssistantTask, error) { - path := "/v1/Assistants/{AssistantSid}/Tasks" + path := "/v1/Assistants/{AssistantSid}/Tasks" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Actions != nil { - v, err := json.Marshal(params.Actions) + data := url.Values{} + headers := 0 - if err != nil { - return nil, err - } + if params != nil && params.Actions != nil { + v, err := json.Marshal(params.Actions) - data.Set("Actions", fmt.Sprint(v)) - } - if params != nil && params.ActionsUrl != nil { - data.Set("ActionsUrl", *params.ActionsUrl) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) - } - - resp, err := c.client.Post(c.baseURL+path, data, headers) if err != nil { - return nil, err + return nil, err } - defer resp.Body.Close() + data.Set("Actions", fmt.Sprint(v)) +} + if params != nil && params.ActionsUrl != nil { + data.Set("ActionsUrl", *params.ActionsUrl) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) +} - ps := &AutopilotV1AssistantTask{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - return ps, err -} + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &AutopilotV1AssistantTask{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateWebhookParams Optional parameters for the method 'CreateWebhook' type CreateWebhookParams struct { - Events *string `json:"Events,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + Events *string `json:"Events,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` WebhookMethod *string `json:"WebhookMethod,omitempty"` - WebhookUrl *string `json:"WebhookUrl,omitempty"` + WebhookUrl *string `json:"WebhookUrl,omitempty"` } /* @@ -470,61 +469,64 @@ type CreateWebhookParams struct { * @param "WebhookMethod" (string) - The method to be used when calling the webhook's URL. * @param "WebhookUrl" (string) - The URL associated with this Webhook. * @return AutopilotV1AssistantWebhook - */ +*/ func (c *DefaultApiService) CreateWebhook(AssistantSid string, params *CreateWebhookParams) (*AutopilotV1AssistantWebhook, error) { - path := "/v1/Assistants/{AssistantSid}/Webhooks" + path := "/v1/Assistants/{AssistantSid}/Webhooks" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Events != nil { - data.Set("Events", *params.Events) - } - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) - } - if params != nil && params.WebhookMethod != nil { - data.Set("WebhookMethod", *params.WebhookMethod) - } - if params != nil && params.WebhookUrl != nil { - data.Set("WebhookUrl", *params.WebhookUrl) - } + if params != nil && params.Events != nil { + data.Set("Events", *params.Events) +} + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) +} + if params != nil && params.WebhookMethod != nil { + data.Set("WebhookMethod", *params.WebhookMethod) +} + if params != nil && params.WebhookUrl != nil { + data.Set("WebhookUrl", *params.WebhookUrl) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &AutopilotV1AssistantWebhook{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() + + ps := &AutopilotV1AssistantWebhook{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * DeleteAssistant Method for DeleteAssistant * @param Sid The Twilio-provided string that uniquely identifies the Assistant resource to delete. - */ -func (c *DefaultApiService) DeleteAssistant(Sid string) error { - path := "/v1/Assistants/{Sid}" +*/ +func (c *DefaultApiService) DeleteAssistant(Sid string, ) (error) { + path := "/v1/Assistants/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* @@ -532,47 +534,51 @@ func (c *DefaultApiService) DeleteAssistant(Sid string) error { * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the Task associated with the resources to delete. * @param TaskSid The SID of the [Task](https://www.twilio.com/docs/autopilot/api/task) resource associated with the Field resource to delete. * @param Sid The Twilio-provided string that uniquely identifies the Field resource to delete. - */ -func (c *DefaultApiService) DeleteField(AssistantSid string, TaskSid string, Sid string) error { - path := "/v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Fields/{Sid}" +*/ +func (c *DefaultApiService) DeleteField(AssistantSid string, TaskSid string, Sid string, ) (error) { + path := "/v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Fields/{Sid}" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) path = strings.Replace(path, "{"+"TaskSid"+"}", TaskSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - return nil + defer resp.Body.Close() + + return nil } /* * DeleteFieldType Method for DeleteFieldType * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resources to delete. * @param Sid The Twilio-provided string that uniquely identifies the FieldType resource to delete. - */ -func (c *DefaultApiService) DeleteFieldType(AssistantSid string, Sid string) error { - path := "/v1/Assistants/{AssistantSid}/FieldTypes/{Sid}" +*/ +func (c *DefaultApiService) DeleteFieldType(AssistantSid string, Sid string, ) (error) { + path := "/v1/Assistants/{AssistantSid}/FieldTypes/{Sid}" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - return nil + defer resp.Body.Close() + + return nil } /* @@ -580,70 +586,76 @@ func (c *DefaultApiService) DeleteFieldType(AssistantSid string, Sid string) err * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the FieldType associated with the resources to delete. * @param FieldTypeSid The SID of the Field Type associated with the Field Value to delete. * @param Sid The Twilio-provided string that uniquely identifies the FieldValue resource to delete. - */ -func (c *DefaultApiService) DeleteFieldValue(AssistantSid string, FieldTypeSid string, Sid string) error { - path := "/v1/Assistants/{AssistantSid}/FieldTypes/{FieldTypeSid}/FieldValues/{Sid}" +*/ +func (c *DefaultApiService) DeleteFieldValue(AssistantSid string, FieldTypeSid string, Sid string, ) (error) { + path := "/v1/Assistants/{AssistantSid}/FieldTypes/{FieldTypeSid}/FieldValues/{Sid}" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) path = strings.Replace(path, "{"+"FieldTypeSid"+"}", FieldTypeSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* * DeleteModelBuild Method for DeleteModelBuild * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resources to delete. * @param Sid The Twilio-provided string that uniquely identifies the ModelBuild resource to delete. - */ -func (c *DefaultApiService) DeleteModelBuild(AssistantSid string, Sid string) error { - path := "/v1/Assistants/{AssistantSid}/ModelBuilds/{Sid}" +*/ +func (c *DefaultApiService) DeleteModelBuild(AssistantSid string, Sid string, ) (error) { + path := "/v1/Assistants/{AssistantSid}/ModelBuilds/{Sid}" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* * DeleteQuery Method for DeleteQuery * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resources to delete. * @param Sid The Twilio-provided string that uniquely identifies the Query resource to delete. - */ -func (c *DefaultApiService) DeleteQuery(AssistantSid string, Sid string) error { - path := "/v1/Assistants/{AssistantSid}/Queries/{Sid}" +*/ +func (c *DefaultApiService) DeleteQuery(AssistantSid string, Sid string, ) (error) { + path := "/v1/Assistants/{AssistantSid}/Queries/{Sid}" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - return nil + defer resp.Body.Close() + + return nil } /* @@ -651,124 +663,134 @@ func (c *DefaultApiService) DeleteQuery(AssistantSid string, Sid string) error { * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the Task associated with the resources to delete. * @param TaskSid The SID of the [Task](https://www.twilio.com/docs/autopilot/api/task) associated with the Sample resource to delete. * @param Sid The Twilio-provided string that uniquely identifies the Sample resource to delete. - */ -func (c *DefaultApiService) DeleteSample(AssistantSid string, TaskSid string, Sid string) error { - path := "/v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Samples/{Sid}" +*/ +func (c *DefaultApiService) DeleteSample(AssistantSid string, TaskSid string, Sid string, ) (error) { + path := "/v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Samples/{Sid}" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) path = strings.Replace(path, "{"+"TaskSid"+"}", TaskSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* * DeleteTask Method for DeleteTask * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resources to delete. * @param Sid The Twilio-provided string that uniquely identifies the Task resource to delete. - */ -func (c *DefaultApiService) DeleteTask(AssistantSid string, Sid string) error { - path := "/v1/Assistants/{AssistantSid}/Tasks/{Sid}" +*/ +func (c *DefaultApiService) DeleteTask(AssistantSid string, Sid string, ) (error) { + path := "/v1/Assistants/{AssistantSid}/Tasks/{Sid}" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* * DeleteWebhook Method for DeleteWebhook * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resources to delete. * @param Sid The Twilio-provided string that uniquely identifies the Webhook resource to delete. - */ -func (c *DefaultApiService) DeleteWebhook(AssistantSid string, Sid string) error { - path := "/v1/Assistants/{AssistantSid}/Webhooks/{Sid}" +*/ +func (c *DefaultApiService) DeleteWebhook(AssistantSid string, Sid string, ) (error) { + path := "/v1/Assistants/{AssistantSid}/Webhooks/{Sid}" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - return nil + defer resp.Body.Close() + + return nil } /* * FetchAssistant Method for FetchAssistant * @param Sid The Twilio-provided string that uniquely identifies the Assistant resource to fetch. * @return AutopilotV1Assistant - */ -func (c *DefaultApiService) FetchAssistant(Sid string) (*AutopilotV1Assistant, error) { - path := "/v1/Assistants/{Sid}" +*/ +func (c *DefaultApiService) FetchAssistant(Sid string, ) (*AutopilotV1Assistant, error) { + path := "/v1/Assistants/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &AutopilotV1Assistant{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &AutopilotV1Assistant{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * FetchDefaults Method for FetchDefaults * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to fetch. * @return AutopilotV1AssistantDefaults - */ -func (c *DefaultApiService) FetchDefaults(AssistantSid string) (*AutopilotV1AssistantDefaults, error) { - path := "/v1/Assistants/{AssistantSid}/Defaults" +*/ +func (c *DefaultApiService) FetchDefaults(AssistantSid string, ) (*AutopilotV1AssistantDefaults, error) { + path := "/v1/Assistants/{AssistantSid}/Defaults" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &AutopilotV1AssistantDefaults{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &AutopilotV1AssistantDefaults{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -776,28 +798,30 @@ func (c *DefaultApiService) FetchDefaults(AssistantSid string) (*AutopilotV1Assi * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to fetch. * @param Sid The Twilio-provided string that uniquely identifies the Dialogue resource to fetch. * @return AutopilotV1AssistantDialogue - */ -func (c *DefaultApiService) FetchDialogue(AssistantSid string, Sid string) (*AutopilotV1AssistantDialogue, error) { - path := "/v1/Assistants/{AssistantSid}/Dialogues/{Sid}" +*/ +func (c *DefaultApiService) FetchDialogue(AssistantSid string, Sid string, ) (*AutopilotV1AssistantDialogue, error) { + path := "/v1/Assistants/{AssistantSid}/Dialogues/{Sid}" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &AutopilotV1AssistantDialogue{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &AutopilotV1AssistantDialogue{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -806,29 +830,31 @@ func (c *DefaultApiService) FetchDialogue(AssistantSid string, Sid string) (*Aut * @param TaskSid The SID of the [Task](https://www.twilio.com/docs/autopilot/api/task) resource associated with the Field resource to fetch. * @param Sid The Twilio-provided string that uniquely identifies the Field resource to fetch. * @return AutopilotV1AssistantTaskField - */ -func (c *DefaultApiService) FetchField(AssistantSid string, TaskSid string, Sid string) (*AutopilotV1AssistantTaskField, error) { - path := "/v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Fields/{Sid}" +*/ +func (c *DefaultApiService) FetchField(AssistantSid string, TaskSid string, Sid string, ) (*AutopilotV1AssistantTaskField, error) { + path := "/v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Fields/{Sid}" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) path = strings.Replace(path, "{"+"TaskSid"+"}", TaskSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &AutopilotV1AssistantTaskField{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &AutopilotV1AssistantTaskField{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -836,28 +862,30 @@ func (c *DefaultApiService) FetchField(AssistantSid string, TaskSid string, Sid * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to fetch. * @param Sid The Twilio-provided string that uniquely identifies the FieldType resource to fetch. * @return AutopilotV1AssistantFieldType - */ -func (c *DefaultApiService) FetchFieldType(AssistantSid string, Sid string) (*AutopilotV1AssistantFieldType, error) { - path := "/v1/Assistants/{AssistantSid}/FieldTypes/{Sid}" +*/ +func (c *DefaultApiService) FetchFieldType(AssistantSid string, Sid string, ) (*AutopilotV1AssistantFieldType, error) { + path := "/v1/Assistants/{AssistantSid}/FieldTypes/{Sid}" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &AutopilotV1AssistantFieldType{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err + defer resp.Body.Close() + + ps := &AutopilotV1AssistantFieldType{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -866,29 +894,31 @@ func (c *DefaultApiService) FetchFieldType(AssistantSid string, Sid string) (*Au * @param FieldTypeSid The SID of the Field Type associated with the Field Value to fetch. * @param Sid The Twilio-provided string that uniquely identifies the FieldValue resource to fetch. * @return AutopilotV1AssistantFieldTypeFieldValue - */ -func (c *DefaultApiService) FetchFieldValue(AssistantSid string, FieldTypeSid string, Sid string) (*AutopilotV1AssistantFieldTypeFieldValue, error) { - path := "/v1/Assistants/{AssistantSid}/FieldTypes/{FieldTypeSid}/FieldValues/{Sid}" +*/ +func (c *DefaultApiService) FetchFieldValue(AssistantSid string, FieldTypeSid string, Sid string, ) (*AutopilotV1AssistantFieldTypeFieldValue, error) { + path := "/v1/Assistants/{AssistantSid}/FieldTypes/{FieldTypeSid}/FieldValues/{Sid}" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) path = strings.Replace(path, "{"+"FieldTypeSid"+"}", FieldTypeSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &AutopilotV1AssistantFieldTypeFieldValue{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &AutopilotV1AssistantFieldTypeFieldValue{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -896,28 +926,30 @@ func (c *DefaultApiService) FetchFieldValue(AssistantSid string, FieldTypeSid st * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to fetch. * @param Sid The Twilio-provided string that uniquely identifies the ModelBuild resource to fetch. * @return AutopilotV1AssistantModelBuild - */ -func (c *DefaultApiService) FetchModelBuild(AssistantSid string, Sid string) (*AutopilotV1AssistantModelBuild, error) { - path := "/v1/Assistants/{AssistantSid}/ModelBuilds/{Sid}" +*/ +func (c *DefaultApiService) FetchModelBuild(AssistantSid string, Sid string, ) (*AutopilotV1AssistantModelBuild, error) { + path := "/v1/Assistants/{AssistantSid}/ModelBuilds/{Sid}" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &AutopilotV1AssistantModelBuild{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err + defer resp.Body.Close() + + ps := &AutopilotV1AssistantModelBuild{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -925,28 +957,30 @@ func (c *DefaultApiService) FetchModelBuild(AssistantSid string, Sid string) (*A * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to fetch. * @param Sid The Twilio-provided string that uniquely identifies the Query resource to fetch. * @return AutopilotV1AssistantQuery - */ -func (c *DefaultApiService) FetchQuery(AssistantSid string, Sid string) (*AutopilotV1AssistantQuery, error) { - path := "/v1/Assistants/{AssistantSid}/Queries/{Sid}" +*/ +func (c *DefaultApiService) FetchQuery(AssistantSid string, Sid string, ) (*AutopilotV1AssistantQuery, error) { + path := "/v1/Assistants/{AssistantSid}/Queries/{Sid}" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &AutopilotV1AssistantQuery{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &AutopilotV1AssistantQuery{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -955,29 +989,31 @@ func (c *DefaultApiService) FetchQuery(AssistantSid string, Sid string) (*Autopi * @param TaskSid The SID of the [Task](https://www.twilio.com/docs/autopilot/api/task) associated with the Sample resource to create. * @param Sid The Twilio-provided string that uniquely identifies the Sample resource to fetch. * @return AutopilotV1AssistantTaskSample - */ -func (c *DefaultApiService) FetchSample(AssistantSid string, TaskSid string, Sid string) (*AutopilotV1AssistantTaskSample, error) { - path := "/v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Samples/{Sid}" +*/ +func (c *DefaultApiService) FetchSample(AssistantSid string, TaskSid string, Sid string, ) (*AutopilotV1AssistantTaskSample, error) { + path := "/v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Samples/{Sid}" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) path = strings.Replace(path, "{"+"TaskSid"+"}", TaskSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &AutopilotV1AssistantTaskSample{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &AutopilotV1AssistantTaskSample{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -985,27 +1021,29 @@ func (c *DefaultApiService) FetchSample(AssistantSid string, TaskSid string, Sid * Returns Style sheet JSON object for the Assistant * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to fetch. * @return AutopilotV1AssistantStyleSheet - */ -func (c *DefaultApiService) FetchStyleSheet(AssistantSid string) (*AutopilotV1AssistantStyleSheet, error) { - path := "/v1/Assistants/{AssistantSid}/StyleSheet" +*/ +func (c *DefaultApiService) FetchStyleSheet(AssistantSid string, ) (*AutopilotV1AssistantStyleSheet, error) { + path := "/v1/Assistants/{AssistantSid}/StyleSheet" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &AutopilotV1AssistantStyleSheet{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &AutopilotV1AssistantStyleSheet{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -1013,28 +1051,30 @@ func (c *DefaultApiService) FetchStyleSheet(AssistantSid string) (*AutopilotV1As * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to fetch. * @param Sid The Twilio-provided string that uniquely identifies the Task resource to fetch. * @return AutopilotV1AssistantTask - */ -func (c *DefaultApiService) FetchTask(AssistantSid string, Sid string) (*AutopilotV1AssistantTask, error) { - path := "/v1/Assistants/{AssistantSid}/Tasks/{Sid}" +*/ +func (c *DefaultApiService) FetchTask(AssistantSid string, Sid string, ) (*AutopilotV1AssistantTask, error) { + path := "/v1/Assistants/{AssistantSid}/Tasks/{Sid}" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &AutopilotV1AssistantTask{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &AutopilotV1AssistantTask{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -1043,28 +1083,30 @@ func (c *DefaultApiService) FetchTask(AssistantSid string, Sid string) (*Autopil * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the Task for which the task actions to fetch were defined. * @param TaskSid The SID of the [Task](https://www.twilio.com/docs/autopilot/api/task) for which the task actions to fetch were defined. * @return AutopilotV1AssistantTaskTaskActions - */ -func (c *DefaultApiService) FetchTaskActions(AssistantSid string, TaskSid string) (*AutopilotV1AssistantTaskTaskActions, error) { - path := "/v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Actions" +*/ +func (c *DefaultApiService) FetchTaskActions(AssistantSid string, TaskSid string, ) (*AutopilotV1AssistantTaskTaskActions, error) { + path := "/v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Actions" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) path = strings.Replace(path, "{"+"TaskSid"+"}", TaskSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &AutopilotV1AssistantTaskTaskActions{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &AutopilotV1AssistantTaskTaskActions{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -1072,28 +1114,30 @@ func (c *DefaultApiService) FetchTaskActions(AssistantSid string, TaskSid string * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to fetch. * @param TaskSid The SID of the [Task](https://www.twilio.com/docs/autopilot/api/task) that is associated with the resource to fetch. * @return AutopilotV1AssistantTaskTaskStatistics - */ -func (c *DefaultApiService) FetchTaskStatistics(AssistantSid string, TaskSid string) (*AutopilotV1AssistantTaskTaskStatistics, error) { - path := "/v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Statistics" +*/ +func (c *DefaultApiService) FetchTaskStatistics(AssistantSid string, TaskSid string, ) (*AutopilotV1AssistantTaskTaskStatistics, error) { + path := "/v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Statistics" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) path = strings.Replace(path, "{"+"TaskSid"+"}", TaskSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &AutopilotV1AssistantTaskTaskStatistics{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &AutopilotV1AssistantTaskTaskStatistics{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -1101,30 +1145,31 @@ func (c *DefaultApiService) FetchTaskStatistics(AssistantSid string, TaskSid str * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to fetch. * @param Sid The Twilio-provided string that uniquely identifies the Webhook resource to fetch. * @return AutopilotV1AssistantWebhook - */ -func (c *DefaultApiService) FetchWebhook(AssistantSid string, Sid string) (*AutopilotV1AssistantWebhook, error) { - path := "/v1/Assistants/{AssistantSid}/Webhooks/{Sid}" +*/ +func (c *DefaultApiService) FetchWebhook(AssistantSid string, Sid string, ) (*AutopilotV1AssistantWebhook, error) { + path := "/v1/Assistants/{AssistantSid}/Webhooks/{Sid}" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &AutopilotV1AssistantWebhook{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err -} + defer resp.Body.Close() + ps := &AutopilotV1AssistantWebhook{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} // ListAssistantParams Optional parameters for the method 'ListAssistant' type ListAssistantParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1135,32 +1180,32 @@ type ListAssistantParams struct { * @param optional nil or *ListAssistantParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListAssistantResponse - */ +*/ func (c *DefaultApiService) ListAssistant(params *ListAssistantParams) (*ListAssistantResponse, error) { - path := "/v1/Assistants" + path := "/v1/Assistants" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListAssistantResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListAssistantResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListFieldParams Optional parameters for the method 'ListField' type ListFieldParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1173,34 +1218,34 @@ type ListFieldParams struct { * @param optional nil or *ListFieldParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListFieldResponse - */ +*/ func (c *DefaultApiService) ListField(AssistantSid string, TaskSid string, params *ListFieldParams) (*ListFieldResponse, error) { - path := "/v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Fields" + path := "/v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Fields" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) path = strings.Replace(path, "{"+"TaskSid"+"}", TaskSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListFieldResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListFieldResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListFieldTypeParams Optional parameters for the method 'ListFieldType' type ListFieldTypeParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1212,37 +1257,37 @@ type ListFieldTypeParams struct { * @param optional nil or *ListFieldTypeParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListFieldTypeResponse - */ +*/ func (c *DefaultApiService) ListFieldType(AssistantSid string, params *ListFieldTypeParams) (*ListFieldTypeResponse, error) { - path := "/v1/Assistants/{AssistantSid}/FieldTypes" + path := "/v1/Assistants/{AssistantSid}/FieldTypes" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListFieldTypeResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListFieldTypeResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListFieldValueParams Optional parameters for the method 'ListFieldValue' type ListFieldValueParams struct { Language *string `json:"Language,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -1253,37 +1298,37 @@ type ListFieldValueParams struct { * @param "Language" (string) - The [ISO language-country](https://docs.oracle.com/cd/E13214_01/wli/docs92/xref/xqisocodes.html) tag that specifies the language of the value. Currently supported tags: `en-US` * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListFieldValueResponse - */ +*/ func (c *DefaultApiService) ListFieldValue(AssistantSid string, FieldTypeSid string, params *ListFieldValueParams) (*ListFieldValueResponse, error) { - path := "/v1/Assistants/{AssistantSid}/FieldTypes/{FieldTypeSid}/FieldValues" + path := "/v1/Assistants/{AssistantSid}/FieldTypes/{FieldTypeSid}/FieldValues" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) path = strings.Replace(path, "{"+"FieldTypeSid"+"}", FieldTypeSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Language != nil { - data.Set("Language", *params.Language) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.Language != nil { + data.Set("Language", *params.Language) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListFieldValueResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListFieldValueResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListModelBuildParams Optional parameters for the method 'ListModelBuild' type ListModelBuildParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1295,40 +1340,40 @@ type ListModelBuildParams struct { * @param optional nil or *ListModelBuildParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListModelBuildResponse - */ +*/ func (c *DefaultApiService) ListModelBuild(AssistantSid string, params *ListModelBuildParams) (*ListModelBuildResponse, error) { - path := "/v1/Assistants/{AssistantSid}/ModelBuilds" + path := "/v1/Assistants/{AssistantSid}/ModelBuilds" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListModelBuildResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListModelBuildResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListQueryParams Optional parameters for the method 'ListQuery' type ListQueryParams struct { - Language *string `json:"Language,omitempty"` - ModelBuild *string `json:"ModelBuild,omitempty"` - Status *string `json:"Status,omitempty"` + Language *string `json:"Language,omitempty"` + ModelBuild *string `json:"ModelBuild,omitempty"` + Status *string `json:"Status,omitempty"` DialogueSid *string `json:"DialogueSid,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -1341,49 +1386,49 @@ type ListQueryParams struct { * @param "DialogueSid" (string) - The SID of the [Dialogue](https://www.twilio.com/docs/autopilot/api/dialogue). * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListQueryResponse - */ +*/ func (c *DefaultApiService) ListQuery(AssistantSid string, params *ListQueryParams) (*ListQueryResponse, error) { - path := "/v1/Assistants/{AssistantSid}/Queries" + path := "/v1/Assistants/{AssistantSid}/Queries" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Language != nil { - data.Set("Language", *params.Language) - } - if params != nil && params.ModelBuild != nil { - data.Set("ModelBuild", *params.ModelBuild) - } - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) - } - if params != nil && params.DialogueSid != nil { - data.Set("DialogueSid", *params.DialogueSid) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.Language != nil { + data.Set("Language", *params.Language) +} + if params != nil && params.ModelBuild != nil { + data.Set("ModelBuild", *params.ModelBuild) +} + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) +} + if params != nil && params.DialogueSid != nil { + data.Set("DialogueSid", *params.DialogueSid) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListQueryResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListQueryResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListSampleParams Optional parameters for the method 'ListSample' type ListSampleParams struct { Language *string `json:"Language,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -1394,37 +1439,37 @@ type ListSampleParams struct { * @param "Language" (string) - The [ISO language-country](https://docs.oracle.com/cd/E13214_01/wli/docs92/xref/xqisocodes.html) string that specifies the language used for the sample. For example: `en-US`. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListSampleResponse - */ +*/ func (c *DefaultApiService) ListSample(AssistantSid string, TaskSid string, params *ListSampleParams) (*ListSampleResponse, error) { - path := "/v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Samples" + path := "/v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Samples" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) path = strings.Replace(path, "{"+"TaskSid"+"}", TaskSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Language != nil { - data.Set("Language", *params.Language) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.Language != nil { + data.Set("Language", *params.Language) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListSampleResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListSampleResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListTaskParams Optional parameters for the method 'ListTask' type ListTaskParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1436,33 +1481,33 @@ type ListTaskParams struct { * @param optional nil or *ListTaskParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListTaskResponse - */ +*/ func (c *DefaultApiService) ListTask(AssistantSid string, params *ListTaskParams) (*ListTaskResponse, error) { - path := "/v1/Assistants/{AssistantSid}/Tasks" + path := "/v1/Assistants/{AssistantSid}/Tasks" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListTaskResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListTaskResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListWebhookParams Optional parameters for the method 'ListWebhook' type ListWebhookParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1474,43 +1519,43 @@ type ListWebhookParams struct { * @param optional nil or *ListWebhookParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListWebhookResponse - */ +*/ func (c *DefaultApiService) ListWebhook(AssistantSid string, params *ListWebhookParams) (*ListWebhookResponse, error) { - path := "/v1/Assistants/{AssistantSid}/Webhooks" + path := "/v1/Assistants/{AssistantSid}/Webhooks" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListWebhookResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListWebhookResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateAssistantParams Optional parameters for the method 'UpdateAssistant' type UpdateAssistantParams struct { - CallbackEvents *string `json:"CallbackEvents,omitempty"` - CallbackUrl *string `json:"CallbackUrl,omitempty"` - Defaults *map[string]interface{} `json:"Defaults,omitempty"` - DevelopmentStage *string `json:"DevelopmentStage,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - LogQueries *bool `json:"LogQueries,omitempty"` - StyleSheet *map[string]interface{} `json:"StyleSheet,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + CallbackEvents *string `json:"CallbackEvents,omitempty"` + CallbackUrl *string `json:"CallbackUrl,omitempty"` + Defaults *map[string]interface{} `json:"Defaults,omitempty"` + DevelopmentStage *string `json:"DevelopmentStage,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + LogQueries *bool `json:"LogQueries,omitempty"` + StyleSheet *map[string]interface{} `json:"StyleSheet,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` } /* @@ -1526,66 +1571,66 @@ type UpdateAssistantParams struct { * @param "StyleSheet" (map[string]interface{}) - The JSON string that defines the Assistant's [style sheet](https://www.twilio.com/docs/autopilot/api/assistant/stylesheet) * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. It can be used as an alternative to the `sid` in the URL path to address the resource. The first 64 characters must be unique. * @return AutopilotV1Assistant - */ +*/ func (c *DefaultApiService) UpdateAssistant(Sid string, params *UpdateAssistantParams) (*AutopilotV1Assistant, error) { - path := "/v1/Assistants/{Sid}" + path := "/v1/Assistants/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.CallbackEvents != nil { - data.Set("CallbackEvents", *params.CallbackEvents) - } - if params != nil && params.CallbackUrl != nil { - data.Set("CallbackUrl", *params.CallbackUrl) + if params != nil && params.CallbackEvents != nil { + data.Set("CallbackEvents", *params.CallbackEvents) +} + if params != nil && params.CallbackUrl != nil { + data.Set("CallbackUrl", *params.CallbackUrl) +} + if params != nil && params.Defaults != nil { + v, err := json.Marshal(params.Defaults) + + if err != nil { + return nil, err } - if params != nil && params.Defaults != nil { - v, err := json.Marshal(params.Defaults) - if err != nil { - return nil, err - } + data.Set("Defaults", fmt.Sprint(v)) +} + if params != nil && params.DevelopmentStage != nil { + data.Set("DevelopmentStage", *params.DevelopmentStage) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.LogQueries != nil { + data.Set("LogQueries", fmt.Sprint(*params.LogQueries)) +} + if params != nil && params.StyleSheet != nil { + v, err := json.Marshal(params.StyleSheet) - data.Set("Defaults", fmt.Sprint(v)) - } - if params != nil && params.DevelopmentStage != nil { - data.Set("DevelopmentStage", *params.DevelopmentStage) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.LogQueries != nil { - data.Set("LogQueries", fmt.Sprint(*params.LogQueries)) + if err != nil { + return nil, err } - if params != nil && params.StyleSheet != nil { - v, err := json.Marshal(params.StyleSheet) - if err != nil { - return nil, err - } + data.Set("StyleSheet", fmt.Sprint(v)) +} + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) +} - data.Set("StyleSheet", fmt.Sprint(v)) - } - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) - } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &AutopilotV1Assistant{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &AutopilotV1Assistant{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } - // UpdateDefaultsParams Optional parameters for the method 'UpdateDefaults' type UpdateDefaultsParams struct { Defaults *map[string]interface{} `json:"Defaults,omitempty"` @@ -1597,43 +1642,43 @@ type UpdateDefaultsParams struct { * @param optional nil or *UpdateDefaultsParams - Optional Parameters: * @param "Defaults" (map[string]interface{}) - A JSON string that describes the default task links for the `assistant_initiation`, `collect`, and `fallback` situations. * @return AutopilotV1AssistantDefaults - */ +*/ func (c *DefaultApiService) UpdateDefaults(AssistantSid string, params *UpdateDefaultsParams) (*AutopilotV1AssistantDefaults, error) { - path := "/v1/Assistants/{AssistantSid}/Defaults" + path := "/v1/Assistants/{AssistantSid}/Defaults" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Defaults != nil { - v, err := json.Marshal(params.Defaults) + data := url.Values{} + headers := 0 - if err != nil { - return nil, err - } + if params != nil && params.Defaults != nil { + v, err := json.Marshal(params.Defaults) - data.Set("Defaults", fmt.Sprint(v)) - } - - resp, err := c.client.Post(c.baseURL+path, data, headers) if err != nil { - return nil, err + return nil, err } - defer resp.Body.Close() + data.Set("Defaults", fmt.Sprint(v)) +} - ps := &AutopilotV1AssistantDefaults{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - return ps, err -} + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &AutopilotV1AssistantDefaults{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateFieldTypeParams Optional parameters for the method 'UpdateFieldType' type UpdateFieldTypeParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` } /* @@ -1644,37 +1689,37 @@ type UpdateFieldTypeParams struct { * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. It can be used as an alternative to the `sid` in the URL path to address the resource. The first 64 characters must be unique. * @return AutopilotV1AssistantFieldType - */ +*/ func (c *DefaultApiService) UpdateFieldType(AssistantSid string, Sid string, params *UpdateFieldTypeParams) (*AutopilotV1AssistantFieldType, error) { - path := "/v1/Assistants/{AssistantSid}/FieldTypes/{Sid}" + path := "/v1/Assistants/{AssistantSid}/FieldTypes/{Sid}" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) - } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &AutopilotV1AssistantFieldType{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &AutopilotV1AssistantFieldType{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateModelBuildParams Optional parameters for the method 'UpdateModelBuild' type UpdateModelBuildParams struct { UniqueName *string `json:"UniqueName,omitempty"` @@ -1687,38 +1732,38 @@ type UpdateModelBuildParams struct { * @param optional nil or *UpdateModelBuildParams - Optional Parameters: * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. This value must be a unique string of no more than 64 characters. It can be used as an alternative to the `sid` in the URL path to address the resource. * @return AutopilotV1AssistantModelBuild - */ +*/ func (c *DefaultApiService) UpdateModelBuild(AssistantSid string, Sid string, params *UpdateModelBuildParams) (*AutopilotV1AssistantModelBuild, error) { - path := "/v1/Assistants/{AssistantSid}/ModelBuilds/{Sid}" + path := "/v1/Assistants/{AssistantSid}/ModelBuilds/{Sid}" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) - } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &AutopilotV1AssistantModelBuild{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &AutopilotV1AssistantModelBuild{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateQueryParams Optional parameters for the method 'UpdateQuery' type UpdateQueryParams struct { SampleSid *string `json:"SampleSid,omitempty"` - Status *string `json:"Status,omitempty"` + Status *string `json:"Status,omitempty"` } /* @@ -1729,37 +1774,37 @@ type UpdateQueryParams struct { * @param "SampleSid" (string) - The SID of an optional reference to the [Sample](https://www.twilio.com/docs/autopilot/api/task-sample) created from the query. * @param "Status" (string) - The new status of the resource. Can be: `pending-review`, `reviewed`, or `discarded` * @return AutopilotV1AssistantQuery - */ +*/ func (c *DefaultApiService) UpdateQuery(AssistantSid string, Sid string, params *UpdateQueryParams) (*AutopilotV1AssistantQuery, error) { - path := "/v1/Assistants/{AssistantSid}/Queries/{Sid}" + path := "/v1/Assistants/{AssistantSid}/Queries/{Sid}" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.SampleSid != nil { - data.Set("SampleSid", *params.SampleSid) - } - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) - } + if params != nil && params.SampleSid != nil { + data.Set("SampleSid", *params.SampleSid) +} + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &AutopilotV1AssistantQuery{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &AutopilotV1AssistantQuery{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateRestoreAssistantParams Optional parameters for the method 'UpdateRestoreAssistant' type UpdateRestoreAssistantParams struct { Assistant *string `json:"Assistant,omitempty"` @@ -1770,37 +1815,37 @@ type UpdateRestoreAssistantParams struct { * @param optional nil or *UpdateRestoreAssistantParams - Optional Parameters: * @param "Assistant" (string) - The Twilio-provided string that uniquely identifies the Assistant resource to restore. * @return AutopilotV1RestoreAssistant - */ +*/ func (c *DefaultApiService) UpdateRestoreAssistant(params *UpdateRestoreAssistantParams) (*AutopilotV1RestoreAssistant, error) { - path := "/v1/Assistants/Restore" + path := "/v1/Assistants/Restore" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Assistant != nil { - data.Set("Assistant", *params.Assistant) - } + if params != nil && params.Assistant != nil { + data.Set("Assistant", *params.Assistant) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &AutopilotV1RestoreAssistant{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &AutopilotV1RestoreAssistant{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateSampleParams Optional parameters for the method 'UpdateSample' type UpdateSampleParams struct { - Language *string `json:"Language,omitempty"` + Language *string `json:"Language,omitempty"` SourceChannel *string `json:"SourceChannel,omitempty"` - TaggedText *string `json:"TaggedText,omitempty"` + TaggedText *string `json:"TaggedText,omitempty"` } /* @@ -1813,41 +1858,41 @@ type UpdateSampleParams struct { * @param "SourceChannel" (string) - The communication channel from which the sample was captured. Can be: `voice`, `sms`, `chat`, `alexa`, `google-assistant`, `slack`, or null if not included. * @param "TaggedText" (string) - The text example of how end users might express the task. The sample can contain [Field tag blocks](https://www.twilio.com/docs/autopilot/api/task-sample#field-tagging). * @return AutopilotV1AssistantTaskSample - */ +*/ func (c *DefaultApiService) UpdateSample(AssistantSid string, TaskSid string, Sid string, params *UpdateSampleParams) (*AutopilotV1AssistantTaskSample, error) { - path := "/v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Samples/{Sid}" + path := "/v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Samples/{Sid}" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) path = strings.Replace(path, "{"+"TaskSid"+"}", TaskSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Language != nil { - data.Set("Language", *params.Language) - } - if params != nil && params.SourceChannel != nil { - data.Set("SourceChannel", *params.SourceChannel) - } - if params != nil && params.TaggedText != nil { - data.Set("TaggedText", *params.TaggedText) - } + if params != nil && params.Language != nil { + data.Set("Language", *params.Language) +} + if params != nil && params.SourceChannel != nil { + data.Set("SourceChannel", *params.SourceChannel) +} + if params != nil && params.TaggedText != nil { + data.Set("TaggedText", *params.TaggedText) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &AutopilotV1AssistantTaskSample{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &AutopilotV1AssistantTaskSample{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateStyleSheetParams Optional parameters for the method 'UpdateStyleSheet' type UpdateStyleSheetParams struct { StyleSheet *map[string]interface{} `json:"StyleSheet,omitempty"` @@ -1860,45 +1905,45 @@ type UpdateStyleSheetParams struct { * @param optional nil or *UpdateStyleSheetParams - Optional Parameters: * @param "StyleSheet" (map[string]interface{}) - The JSON string that describes the style sheet object. * @return AutopilotV1AssistantStyleSheet - */ +*/ func (c *DefaultApiService) UpdateStyleSheet(AssistantSid string, params *UpdateStyleSheetParams) (*AutopilotV1AssistantStyleSheet, error) { - path := "/v1/Assistants/{AssistantSid}/StyleSheet" + path := "/v1/Assistants/{AssistantSid}/StyleSheet" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.StyleSheet != nil { - v, err := json.Marshal(params.StyleSheet) - - if err != nil { - return nil, err - } + data := url.Values{} + headers := 0 - data.Set("StyleSheet", fmt.Sprint(v)) - } + if params != nil && params.StyleSheet != nil { + v, err := json.Marshal(params.StyleSheet) - resp, err := c.client.Post(c.baseURL+path, data, headers) if err != nil { - return nil, err + return nil, err } - defer resp.Body.Close() + data.Set("StyleSheet", fmt.Sprint(v)) +} - ps := &AutopilotV1AssistantStyleSheet{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - return ps, err -} + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() + + ps := &AutopilotV1AssistantStyleSheet{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} // UpdateTaskParams Optional parameters for the method 'UpdateTask' type UpdateTaskParams struct { - Actions *map[string]interface{} `json:"Actions,omitempty"` - ActionsUrl *string `json:"ActionsUrl,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + Actions *map[string]interface{} `json:"Actions,omitempty"` + ActionsUrl *string `json:"ActionsUrl,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` } /* @@ -1911,49 +1956,49 @@ type UpdateTaskParams struct { * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. This value must be 64 characters or less in length and be unique. It can be used as an alternative to the `sid` in the URL path to address the resource. * @return AutopilotV1AssistantTask - */ +*/ func (c *DefaultApiService) UpdateTask(AssistantSid string, Sid string, params *UpdateTaskParams) (*AutopilotV1AssistantTask, error) { - path := "/v1/Assistants/{AssistantSid}/Tasks/{Sid}" + path := "/v1/Assistants/{AssistantSid}/Tasks/{Sid}" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Actions != nil { - v, err := json.Marshal(params.Actions) + data := url.Values{} + headers := 0 - if err != nil { - return nil, err - } + if params != nil && params.Actions != nil { + v, err := json.Marshal(params.Actions) - data.Set("Actions", fmt.Sprint(v)) - } - if params != nil && params.ActionsUrl != nil { - data.Set("ActionsUrl", *params.ActionsUrl) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) - } - - resp, err := c.client.Post(c.baseURL+path, data, headers) if err != nil { - return nil, err + return nil, err } - defer resp.Body.Close() + data.Set("Actions", fmt.Sprint(v)) +} + if params != nil && params.ActionsUrl != nil { + data.Set("ActionsUrl", *params.ActionsUrl) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) +} + - ps := &AutopilotV1AssistantTask{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err -} + defer resp.Body.Close() + + ps := &AutopilotV1AssistantTask{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateTaskActionsParams Optional parameters for the method 'UpdateTaskActions' type UpdateTaskActionsParams struct { Actions *map[string]interface{} `json:"Actions,omitempty"` @@ -1967,46 +2012,46 @@ type UpdateTaskActionsParams struct { * @param optional nil or *UpdateTaskActionsParams - Optional Parameters: * @param "Actions" (map[string]interface{}) - The JSON string that specifies the [actions](https://www.twilio.com/docs/autopilot/actions) that instruct the Assistant on how to perform the task. * @return AutopilotV1AssistantTaskTaskActions - */ +*/ func (c *DefaultApiService) UpdateTaskActions(AssistantSid string, TaskSid string, params *UpdateTaskActionsParams) (*AutopilotV1AssistantTaskTaskActions, error) { - path := "/v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Actions" + path := "/v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Actions" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) path = strings.Replace(path, "{"+"TaskSid"+"}", TaskSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Actions != nil { - v, err := json.Marshal(params.Actions) - - if err != nil { - return nil, err - } + data := url.Values{} + headers := 0 - data.Set("Actions", fmt.Sprint(v)) - } + if params != nil && params.Actions != nil { + v, err := json.Marshal(params.Actions) - resp, err := c.client.Post(c.baseURL+path, data, headers) if err != nil { - return nil, err + return nil, err } - defer resp.Body.Close() + data.Set("Actions", fmt.Sprint(v)) +} - ps := &AutopilotV1AssistantTaskTaskActions{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - return ps, err -} + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() + + ps := &AutopilotV1AssistantTaskTaskActions{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} // UpdateWebhookParams Optional parameters for the method 'UpdateWebhook' type UpdateWebhookParams struct { - Events *string `json:"Events,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + Events *string `json:"Events,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` WebhookMethod *string `json:"WebhookMethod,omitempty"` - WebhookUrl *string `json:"WebhookUrl,omitempty"` + WebhookUrl *string `json:"WebhookUrl,omitempty"` } /* @@ -2019,39 +2064,40 @@ type UpdateWebhookParams struct { * @param "WebhookMethod" (string) - The method to be used when calling the webhook's URL. * @param "WebhookUrl" (string) - The URL associated with this Webhook. * @return AutopilotV1AssistantWebhook - */ +*/ func (c *DefaultApiService) UpdateWebhook(AssistantSid string, Sid string, params *UpdateWebhookParams) (*AutopilotV1AssistantWebhook, error) { - path := "/v1/Assistants/{AssistantSid}/Webhooks/{Sid}" + path := "/v1/Assistants/{AssistantSid}/Webhooks/{Sid}" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Events != nil { - data.Set("Events", *params.Events) - } - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) - } - if params != nil && params.WebhookMethod != nil { - data.Set("WebhookMethod", *params.WebhookMethod) - } - if params != nil && params.WebhookUrl != nil { - data.Set("WebhookUrl", *params.WebhookUrl) - } + if params != nil && params.Events != nil { + data.Set("Events", *params.Events) +} + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) +} + if params != nil && params.WebhookMethod != nil { + data.Set("WebhookMethod", *params.WebhookMethod) +} + if params != nil && params.WebhookUrl != nil { + data.Set("WebhookUrl", *params.WebhookUrl) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &AutopilotV1AssistantWebhook{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() + + ps := &AutopilotV1AssistantWebhook{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } diff --git a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant.go b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant.go index bd1991c60..e6d7b5641 100644 --- a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant.go +++ b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant.go @@ -1,20 +1,18 @@ /* - * Twilio - Autopilot - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // AutopilotV1Assistant struct for AutopilotV1Assistant type AutopilotV1Assistant struct { // The SID of the Account that created the resource diff --git a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_defaults.go b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_defaults.go index 2bed3d78e..91f52173f 100644 --- a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_defaults.go +++ b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_defaults.go @@ -1,16 +1,15 @@ /* - * Twilio - Autopilot - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // AutopilotV1AssistantDefaults struct for AutopilotV1AssistantDefaults type AutopilotV1AssistantDefaults struct { // The SID of the Account that created the resource diff --git a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_dialogue.go b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_dialogue.go index 66326d80c..3c20b98ec 100644 --- a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_dialogue.go +++ b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_dialogue.go @@ -1,16 +1,15 @@ /* - * Twilio - Autopilot - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // AutopilotV1AssistantDialogue struct for AutopilotV1AssistantDialogue type AutopilotV1AssistantDialogue struct { // The SID of the Account that created the resource diff --git a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_field_type.go b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_field_type.go index 9b266c7ad..bdefe1377 100644 --- a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_field_type.go +++ b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_field_type.go @@ -1,20 +1,18 @@ /* - * Twilio - Autopilot - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // AutopilotV1AssistantFieldType struct for AutopilotV1AssistantFieldType type AutopilotV1AssistantFieldType struct { // The SID of the Account that created the resource diff --git a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_field_type_field_value.go b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_field_type_field_value.go index d15c4aac4..0dc700d4f 100644 --- a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_field_type_field_value.go +++ b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_field_type_field_value.go @@ -1,20 +1,18 @@ /* - * Twilio - Autopilot - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // AutopilotV1AssistantFieldTypeFieldValue struct for AutopilotV1AssistantFieldTypeFieldValue type AutopilotV1AssistantFieldTypeFieldValue struct { // The SID of the Account that created the resource diff --git a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_model_build.go b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_model_build.go index d8b9deb62..e48f73df0 100644 --- a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_model_build.go +++ b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_model_build.go @@ -1,20 +1,18 @@ /* - * Twilio - Autopilot - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // AutopilotV1AssistantModelBuild struct for AutopilotV1AssistantModelBuild type AutopilotV1AssistantModelBuild struct { // The SID of the Account that created the resource diff --git a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_query.go b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_query.go index 762bc6c3b..01e78c3d7 100644 --- a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_query.go +++ b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_query.go @@ -1,20 +1,18 @@ /* - * Twilio - Autopilot - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // AutopilotV1AssistantQuery struct for AutopilotV1AssistantQuery type AutopilotV1AssistantQuery struct { // The SID of the Account that created the resource diff --git a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_style_sheet.go b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_style_sheet.go index dde6186c5..e5f6da6c0 100644 --- a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_style_sheet.go +++ b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_style_sheet.go @@ -1,16 +1,15 @@ /* - * Twilio - Autopilot - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // AutopilotV1AssistantStyleSheet struct for AutopilotV1AssistantStyleSheet type AutopilotV1AssistantStyleSheet struct { // The SID of the Account that created the resource diff --git a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_task.go b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_task.go index 5678aa6c8..325606d28 100644 --- a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_task.go +++ b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_task.go @@ -1,20 +1,18 @@ /* - * Twilio - Autopilot - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // AutopilotV1AssistantTask struct for AutopilotV1AssistantTask type AutopilotV1AssistantTask struct { // The SID of the Account that created the resource diff --git a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_task_field.go b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_task_field.go index 98283431a..577130101 100644 --- a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_task_field.go +++ b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_task_field.go @@ -1,20 +1,18 @@ /* - * Twilio - Autopilot - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // AutopilotV1AssistantTaskField struct for AutopilotV1AssistantTaskField type AutopilotV1AssistantTaskField struct { // The SID of the Account that created the resource diff --git a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_task_sample.go b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_task_sample.go index 2a4270efd..de1bb4b65 100644 --- a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_task_sample.go +++ b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_task_sample.go @@ -1,20 +1,18 @@ /* - * Twilio - Autopilot - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // AutopilotV1AssistantTaskSample struct for AutopilotV1AssistantTaskSample type AutopilotV1AssistantTaskSample struct { // The SID of the Account that created the resource diff --git a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_task_task_actions.go b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_task_task_actions.go index 974dfae00..a564f14f8 100644 --- a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_task_task_actions.go +++ b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_task_task_actions.go @@ -1,16 +1,15 @@ /* - * Twilio - Autopilot - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // AutopilotV1AssistantTaskTaskActions struct for AutopilotV1AssistantTaskTaskActions type AutopilotV1AssistantTaskTaskActions struct { // The SID of the Account that created the resource diff --git a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_task_task_statistics.go b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_task_task_statistics.go index 2ff031051..cba75bccc 100644 --- a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_task_task_statistics.go +++ b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_task_task_statistics.go @@ -1,16 +1,15 @@ /* - * Twilio - Autopilot - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // AutopilotV1AssistantTaskTaskStatistics struct for AutopilotV1AssistantTaskTaskStatistics type AutopilotV1AssistantTaskTaskStatistics struct { // The SID of the Account that created the resource diff --git a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_webhook.go b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_webhook.go index d0ba020da..56a59dc72 100644 --- a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_webhook.go +++ b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_webhook.go @@ -1,20 +1,18 @@ /* - * Twilio - Autopilot - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // AutopilotV1AssistantWebhook struct for AutopilotV1AssistantWebhook type AutopilotV1AssistantWebhook struct { // The SID of the Account that created the resource diff --git a/twilio/rest/autopilot/v1/model_autopilot_v1_restore_assistant.go b/twilio/rest/autopilot/v1/model_autopilot_v1_restore_assistant.go index 4e78d760d..a687d4099 100644 --- a/twilio/rest/autopilot/v1/model_autopilot_v1_restore_assistant.go +++ b/twilio/rest/autopilot/v1/model_autopilot_v1_restore_assistant.go @@ -1,20 +1,18 @@ /* - * Twilio - Autopilot - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // AutopilotV1RestoreAssistant struct for AutopilotV1RestoreAssistant type AutopilotV1RestoreAssistant struct { // The SID of the Account that created the resource diff --git a/twilio/rest/autopilot/v1/model_list_assistant_response.go b/twilio/rest/autopilot/v1/model_list_assistant_response.go index 2000c16d3..567002f0b 100644 --- a/twilio/rest/autopilot/v1/model_list_assistant_response.go +++ b/twilio/rest/autopilot/v1/model_list_assistant_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Autopilot - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListAssistantResponse struct for ListAssistantResponse type ListAssistantResponse struct { - Assistants []AutopilotV1Assistant `json:"Assistants,omitempty"` - Meta ListAssistantResponseMeta `json:"Meta,omitempty"` + Assistants []AutopilotV1Assistant `json:"Assistants,omitempty"` + Meta ListAssistantResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/autopilot/v1/model_list_assistant_response_meta.go b/twilio/rest/autopilot/v1/model_list_assistant_response_meta.go index 2f08c5aa0..5d1f9f373 100644 --- a/twilio/rest/autopilot/v1/model_list_assistant_response_meta.go +++ b/twilio/rest/autopilot/v1/model_list_assistant_response_meta.go @@ -1,23 +1,22 @@ /* - * Twilio - Autopilot - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListAssistantResponseMeta struct for ListAssistantResponseMeta type ListAssistantResponseMeta struct { - FirstPageUrl string `json:"FirstPageUrl,omitempty"` - Key string `json:"Key,omitempty"` - NextPageUrl string `json:"NextPageUrl,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` - Url string `json:"Url,omitempty"` + Url string `json:"Url,omitempty"` } diff --git a/twilio/rest/autopilot/v1/model_list_field_response.go b/twilio/rest/autopilot/v1/model_list_field_response.go index ac78b5cdc..ae489455e 100644 --- a/twilio/rest/autopilot/v1/model_list_field_response.go +++ b/twilio/rest/autopilot/v1/model_list_field_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Autopilot - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListFieldResponse struct for ListFieldResponse type ListFieldResponse struct { Fields []AutopilotV1AssistantTaskField `json:"Fields,omitempty"` - Meta ListAssistantResponseMeta `json:"Meta,omitempty"` + Meta ListAssistantResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/autopilot/v1/model_list_field_type_response.go b/twilio/rest/autopilot/v1/model_list_field_type_response.go index 5ab58e521..488d50edc 100644 --- a/twilio/rest/autopilot/v1/model_list_field_type_response.go +++ b/twilio/rest/autopilot/v1/model_list_field_type_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Autopilot - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListFieldTypeResponse struct for ListFieldTypeResponse type ListFieldTypeResponse struct { FieldTypes []AutopilotV1AssistantFieldType `json:"FieldTypes,omitempty"` - Meta ListAssistantResponseMeta `json:"Meta,omitempty"` + Meta ListAssistantResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/autopilot/v1/model_list_field_value_response.go b/twilio/rest/autopilot/v1/model_list_field_value_response.go index 7d3f49b15..9a84c4a0f 100644 --- a/twilio/rest/autopilot/v1/model_list_field_value_response.go +++ b/twilio/rest/autopilot/v1/model_list_field_value_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Autopilot - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListFieldValueResponse struct for ListFieldValueResponse type ListFieldValueResponse struct { FieldValues []AutopilotV1AssistantFieldTypeFieldValue `json:"FieldValues,omitempty"` - Meta ListAssistantResponseMeta `json:"Meta,omitempty"` + Meta ListAssistantResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/autopilot/v1/model_list_model_build_response.go b/twilio/rest/autopilot/v1/model_list_model_build_response.go index db27cbf2e..61188528a 100644 --- a/twilio/rest/autopilot/v1/model_list_model_build_response.go +++ b/twilio/rest/autopilot/v1/model_list_model_build_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Autopilot - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListModelBuildResponse struct for ListModelBuildResponse type ListModelBuildResponse struct { - Meta ListAssistantResponseMeta `json:"Meta,omitempty"` + Meta ListAssistantResponseMeta `json:"Meta,omitempty"` ModelBuilds []AutopilotV1AssistantModelBuild `json:"ModelBuilds,omitempty"` } diff --git a/twilio/rest/autopilot/v1/model_list_query_response.go b/twilio/rest/autopilot/v1/model_list_query_response.go index e65f649a8..c49bc2a57 100644 --- a/twilio/rest/autopilot/v1/model_list_query_response.go +++ b/twilio/rest/autopilot/v1/model_list_query_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Autopilot - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListQueryResponse struct for ListQueryResponse type ListQueryResponse struct { - Meta ListAssistantResponseMeta `json:"Meta,omitempty"` + Meta ListAssistantResponseMeta `json:"Meta,omitempty"` Queries []AutopilotV1AssistantQuery `json:"Queries,omitempty"` } diff --git a/twilio/rest/autopilot/v1/model_list_sample_response.go b/twilio/rest/autopilot/v1/model_list_sample_response.go index 44a6e4d63..eb08be880 100644 --- a/twilio/rest/autopilot/v1/model_list_sample_response.go +++ b/twilio/rest/autopilot/v1/model_list_sample_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Autopilot - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListSampleResponse struct for ListSampleResponse type ListSampleResponse struct { - Meta ListAssistantResponseMeta `json:"Meta,omitempty"` + Meta ListAssistantResponseMeta `json:"Meta,omitempty"` Samples []AutopilotV1AssistantTaskSample `json:"Samples,omitempty"` } diff --git a/twilio/rest/autopilot/v1/model_list_task_response.go b/twilio/rest/autopilot/v1/model_list_task_response.go index 5f2bd1f7e..d7b1a717a 100644 --- a/twilio/rest/autopilot/v1/model_list_task_response.go +++ b/twilio/rest/autopilot/v1/model_list_task_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Autopilot - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListTaskResponse struct for ListTaskResponse type ListTaskResponse struct { - Meta ListAssistantResponseMeta `json:"Meta,omitempty"` + Meta ListAssistantResponseMeta `json:"Meta,omitempty"` Tasks []AutopilotV1AssistantTask `json:"Tasks,omitempty"` } diff --git a/twilio/rest/autopilot/v1/model_list_webhook_response.go b/twilio/rest/autopilot/v1/model_list_webhook_response.go index 25a2e4ed2..e21a4279d 100644 --- a/twilio/rest/autopilot/v1/model_list_webhook_response.go +++ b/twilio/rest/autopilot/v1/model_list_webhook_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Autopilot - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListWebhookResponse struct for ListWebhookResponse type ListWebhookResponse struct { - Meta ListAssistantResponseMeta `json:"Meta,omitempty"` + Meta ListAssistantResponseMeta `json:"Meta,omitempty"` Webhooks []AutopilotV1AssistantWebhook `json:"Webhooks,omitempty"` } diff --git a/twilio/rest/bulkexports/v1/api_default.go b/twilio/rest/bulkexports/v1/api_default.go index fef7989da..7be17261c 100644 --- a/twilio/rest/bulkexports/v1/api_default.go +++ b/twilio/rest/bulkexports/v1/api_default.go @@ -1,11 +1,11 @@ /* - * Twilio - Bulkexports - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Bulkexports + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,10 +14,9 @@ package openapi import ( "encoding/json" "fmt" - "net/url" - "strings" - twilio "github.com/twilio/twilio-go/client" + "net/url" + "strings" ) type DefaultApiService struct { @@ -26,20 +25,20 @@ type DefaultApiService struct { } func NewDefaultApiService(client *twilio.Client) *DefaultApiService { - return &DefaultApiService{ - client: client, + return &DefaultApiService { + client: client, baseURL: "https://bulkexports.twilio.com", } } // CreateExportCustomJobParams Optional parameters for the method 'CreateExportCustomJob' type CreateExportCustomJobParams struct { - Email *string `json:"Email,omitempty"` - EndDay *string `json:"EndDay,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - StartDay *string `json:"StartDay,omitempty"` + Email *string `json:"Email,omitempty"` + EndDay *string `json:"EndDay,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + StartDay *string `json:"StartDay,omitempty"` WebhookMethod *string `json:"WebhookMethod,omitempty"` - WebhookUrl *string `json:"WebhookUrl,omitempty"` + WebhookUrl *string `json:"WebhookUrl,omitempty"` } /* @@ -53,67 +52,70 @@ type CreateExportCustomJobParams struct { * @param "WebhookMethod" (string) - This is the method used to call the webhook on completion of the job. If this is supplied, `WebhookUrl` must also be supplied. * @param "WebhookUrl" (string) - The optional webhook url called on completion of the job. If this is supplied, `WebhookMethod` must also be supplied. If you set neither webhook nor email, you will have to check your job's status manually. * @return BulkexportsV1ExportExportCustomJob - */ +*/ func (c *DefaultApiService) CreateExportCustomJob(ResourceType string, params *CreateExportCustomJobParams) (*BulkexportsV1ExportExportCustomJob, error) { - path := "/v1/Exports/{ResourceType}/Jobs" + path := "/v1/Exports/{ResourceType}/Jobs" path = strings.Replace(path, "{"+"ResourceType"+"}", ResourceType, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Email != nil { - data.Set("Email", *params.Email) - } - if params != nil && params.EndDay != nil { - data.Set("EndDay", *params.EndDay) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.StartDay != nil { - data.Set("StartDay", *params.StartDay) - } - if params != nil && params.WebhookMethod != nil { - data.Set("WebhookMethod", *params.WebhookMethod) - } - if params != nil && params.WebhookUrl != nil { - data.Set("WebhookUrl", *params.WebhookUrl) - } + if params != nil && params.Email != nil { + data.Set("Email", *params.Email) +} + if params != nil && params.EndDay != nil { + data.Set("EndDay", *params.EndDay) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.StartDay != nil { + data.Set("StartDay", *params.StartDay) +} + if params != nil && params.WebhookMethod != nil { + data.Set("WebhookMethod", *params.WebhookMethod) +} + if params != nil && params.WebhookUrl != nil { + data.Set("WebhookUrl", *params.WebhookUrl) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &BulkexportsV1ExportExportCustomJob{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err + ps := &BulkexportsV1ExportExportCustomJob{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* * DeleteJob Method for DeleteJob * @param JobSid The unique string that that we created to identify the Bulk Export job - */ -func (c *DefaultApiService) DeleteJob(JobSid string) error { - path := "/v1/Exports/Jobs/{JobSid}" +*/ +func (c *DefaultApiService) DeleteJob(JobSid string, ) (error) { + path := "/v1/Exports/Jobs/{JobSid}" path = strings.Replace(path, "{"+"JobSid"+"}", JobSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* @@ -121,23 +123,25 @@ func (c *DefaultApiService) DeleteJob(JobSid string) error { * Fetch a specific Day. * @param ResourceType The type of communication – Messages, Calls, Conferences, and Participants * @param Day The ISO 8601 format date of the resources in the file, for a UTC day - */ -func (c *DefaultApiService) FetchDay(ResourceType string, Day string) error { - path := "/v1/Exports/{ResourceType}/Days/{Day}" +*/ +func (c *DefaultApiService) FetchDay(ResourceType string, Day string, ) (error) { + path := "/v1/Exports/{ResourceType}/Days/{Day}" path = strings.Replace(path, "{"+"ResourceType"+"}", ResourceType, -1) path = strings.Replace(path, "{"+"Day"+"}", Day, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* @@ -145,27 +149,29 @@ func (c *DefaultApiService) FetchDay(ResourceType string, Day string) error { * Fetch a specific Export. * @param ResourceType The type of communication – Messages, Calls, Conferences, and Participants * @return BulkexportsV1Export - */ -func (c *DefaultApiService) FetchExport(ResourceType string) (*BulkexportsV1Export, error) { - path := "/v1/Exports/{ResourceType}" +*/ +func (c *DefaultApiService) FetchExport(ResourceType string, ) (*BulkexportsV1Export, error) { + path := "/v1/Exports/{ResourceType}" path = strings.Replace(path, "{"+"ResourceType"+"}", ResourceType, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &BulkexportsV1Export{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err + defer resp.Body.Close() + + ps := &BulkexportsV1Export{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -173,56 +179,59 @@ func (c *DefaultApiService) FetchExport(ResourceType string) (*BulkexportsV1Expo * Fetch a specific Export Configuration. * @param ResourceType The type of communication – Messages, Calls, Conferences, and Participants * @return BulkexportsV1ExportConfiguration - */ -func (c *DefaultApiService) FetchExportConfiguration(ResourceType string) (*BulkexportsV1ExportConfiguration, error) { - path := "/v1/Exports/{ResourceType}/Configuration" +*/ +func (c *DefaultApiService) FetchExportConfiguration(ResourceType string, ) (*BulkexportsV1ExportConfiguration, error) { + path := "/v1/Exports/{ResourceType}/Configuration" path = strings.Replace(path, "{"+"ResourceType"+"}", ResourceType, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &BulkexportsV1ExportConfiguration{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &BulkexportsV1ExportConfiguration{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* * FetchJob Method for FetchJob * @param JobSid The unique string that that we created to identify the Bulk Export job * @return BulkexportsV1ExportJob - */ -func (c *DefaultApiService) FetchJob(JobSid string) (*BulkexportsV1ExportJob, error) { - path := "/v1/Exports/Jobs/{JobSid}" +*/ +func (c *DefaultApiService) FetchJob(JobSid string, ) (*BulkexportsV1ExportJob, error) { + path := "/v1/Exports/Jobs/{JobSid}" path = strings.Replace(path, "{"+"JobSid"+"}", JobSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &BulkexportsV1ExportJob{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err -} + defer resp.Body.Close() + ps := &BulkexportsV1ExportJob{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} // ListDayParams Optional parameters for the method 'ListDay' type ListDayParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -235,33 +244,33 @@ type ListDayParams struct { * @param optional nil or *ListDayParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListDayResponse - */ +*/ func (c *DefaultApiService) ListDay(ResourceType string, params *ListDayParams) (*ListDayResponse, error) { - path := "/v1/Exports/{ResourceType}/Days" + path := "/v1/Exports/{ResourceType}/Days" path = strings.Replace(path, "{"+"ResourceType"+"}", ResourceType, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListDayResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListDayResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListExportCustomJobParams Optional parameters for the method 'ListExportCustomJob' type ListExportCustomJobParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -273,38 +282,38 @@ type ListExportCustomJobParams struct { * @param optional nil or *ListExportCustomJobParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListExportCustomJobResponse - */ +*/ func (c *DefaultApiService) ListExportCustomJob(ResourceType string, params *ListExportCustomJobParams) (*ListExportCustomJobResponse, error) { - path := "/v1/Exports/{ResourceType}/Jobs" + path := "/v1/Exports/{ResourceType}/Jobs" path = strings.Replace(path, "{"+"ResourceType"+"}", ResourceType, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListExportCustomJobResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListExportCustomJobResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateExportConfigurationParams Optional parameters for the method 'UpdateExportConfiguration' type UpdateExportConfigurationParams struct { - Enabled *bool `json:"Enabled,omitempty"` + Enabled *bool `json:"Enabled,omitempty"` WebhookMethod *string `json:"WebhookMethod,omitempty"` - WebhookUrl *string `json:"WebhookUrl,omitempty"` + WebhookUrl *string `json:"WebhookUrl,omitempty"` } /* @@ -316,35 +325,36 @@ type UpdateExportConfigurationParams struct { * @param "WebhookMethod" (string) - Sets whether Twilio should call a webhook URL when the automatic generation is complete, using GET or POST. The actual destination is set in the webhook_url * @param "WebhookUrl" (string) - Stores the URL destination for the method specified in webhook_method. * @return BulkexportsV1ExportConfiguration - */ +*/ func (c *DefaultApiService) UpdateExportConfiguration(ResourceType string, params *UpdateExportConfigurationParams) (*BulkexportsV1ExportConfiguration, error) { - path := "/v1/Exports/{ResourceType}/Configuration" + path := "/v1/Exports/{ResourceType}/Configuration" path = strings.Replace(path, "{"+"ResourceType"+"}", ResourceType, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Enabled != nil { - data.Set("Enabled", fmt.Sprint(*params.Enabled)) - } - if params != nil && params.WebhookMethod != nil { - data.Set("WebhookMethod", *params.WebhookMethod) - } - if params != nil && params.WebhookUrl != nil { - data.Set("WebhookUrl", *params.WebhookUrl) - } + if params != nil && params.Enabled != nil { + data.Set("Enabled", fmt.Sprint(*params.Enabled)) +} + if params != nil && params.WebhookMethod != nil { + data.Set("WebhookMethod", *params.WebhookMethod) +} + if params != nil && params.WebhookUrl != nil { + data.Set("WebhookUrl", *params.WebhookUrl) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &BulkexportsV1ExportConfiguration{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() + + ps := &BulkexportsV1ExportConfiguration{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } diff --git a/twilio/rest/bulkexports/v1/model_bulkexports_v1_export.go b/twilio/rest/bulkexports/v1/model_bulkexports_v1_export.go index daf2f7bd3..88e352f11 100644 --- a/twilio/rest/bulkexports/v1/model_bulkexports_v1_export.go +++ b/twilio/rest/bulkexports/v1/model_bulkexports_v1_export.go @@ -1,16 +1,15 @@ /* - * Twilio - Bulkexports - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Bulkexports + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // BulkexportsV1Export struct for BulkexportsV1Export type BulkexportsV1Export struct { // Nested resource URLs. diff --git a/twilio/rest/bulkexports/v1/model_bulkexports_v1_export_configuration.go b/twilio/rest/bulkexports/v1/model_bulkexports_v1_export_configuration.go index 7999347d4..d1fd0b7a9 100644 --- a/twilio/rest/bulkexports/v1/model_bulkexports_v1_export_configuration.go +++ b/twilio/rest/bulkexports/v1/model_bulkexports_v1_export_configuration.go @@ -1,16 +1,15 @@ /* - * Twilio - Bulkexports - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Bulkexports + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // BulkexportsV1ExportConfiguration struct for BulkexportsV1ExportConfiguration type BulkexportsV1ExportConfiguration struct { // Whether files are automatically generated diff --git a/twilio/rest/bulkexports/v1/model_bulkexports_v1_export_day.go b/twilio/rest/bulkexports/v1/model_bulkexports_v1_export_day.go index 4af7ad177..36967cdc4 100644 --- a/twilio/rest/bulkexports/v1/model_bulkexports_v1_export_day.go +++ b/twilio/rest/bulkexports/v1/model_bulkexports_v1_export_day.go @@ -1,16 +1,15 @@ /* - * Twilio - Bulkexports - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Bulkexports + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // BulkexportsV1ExportDay struct for BulkexportsV1ExportDay type BulkexportsV1ExportDay struct { // The date when resource is created diff --git a/twilio/rest/bulkexports/v1/model_bulkexports_v1_export_day_instance.go b/twilio/rest/bulkexports/v1/model_bulkexports_v1_export_day_instance.go index 76e60eac3..f285303ee 100644 --- a/twilio/rest/bulkexports/v1/model_bulkexports_v1_export_day_instance.go +++ b/twilio/rest/bulkexports/v1/model_bulkexports_v1_export_day_instance.go @@ -1,16 +1,15 @@ /* - * Twilio - Bulkexports - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Bulkexports + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // BulkexportsV1ExportDayInstance struct for BulkexportsV1ExportDayInstance type BulkexportsV1ExportDayInstance struct { RedirectTo *string `json:"RedirectTo,omitempty"` diff --git a/twilio/rest/bulkexports/v1/model_bulkexports_v1_export_export_custom_job.go b/twilio/rest/bulkexports/v1/model_bulkexports_v1_export_export_custom_job.go index 9ab4f36d0..cc6ffc656 100644 --- a/twilio/rest/bulkexports/v1/model_bulkexports_v1_export_export_custom_job.go +++ b/twilio/rest/bulkexports/v1/model_bulkexports_v1_export_export_custom_job.go @@ -1,16 +1,15 @@ /* - * Twilio - Bulkexports - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Bulkexports + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // BulkexportsV1ExportExportCustomJob struct for BulkexportsV1ExportExportCustomJob type BulkexportsV1ExportExportCustomJob struct { // The details of a job state which is an object that contains a status string, a day count integer, and list of days in the job diff --git a/twilio/rest/bulkexports/v1/model_bulkexports_v1_export_job.go b/twilio/rest/bulkexports/v1/model_bulkexports_v1_export_job.go index e4d30be37..cdd3671a3 100644 --- a/twilio/rest/bulkexports/v1/model_bulkexports_v1_export_job.go +++ b/twilio/rest/bulkexports/v1/model_bulkexports_v1_export_job.go @@ -1,16 +1,15 @@ /* - * Twilio - Bulkexports - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Bulkexports + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // BulkexportsV1ExportJob struct for BulkexportsV1ExportJob type BulkexportsV1ExportJob struct { // This is a list of the completed, pending, or errored dates within the export time range, with one entry for each status with more than one day in that status @@ -27,7 +26,7 @@ type BulkexportsV1ExportJob struct { ResourceType *string `json:"ResourceType,omitempty"` // The start time for the export specified when creating the job StartDay *string `json:"StartDay,omitempty"` - Url *string `json:"Url,omitempty"` + Url *string `json:"Url,omitempty"` // This is the method used to call the webhook WebhookMethod *string `json:"WebhookMethod,omitempty"` // The optional webhook url called on completion diff --git a/twilio/rest/bulkexports/v1/model_list_day_response.go b/twilio/rest/bulkexports/v1/model_list_day_response.go index a65a19bf8..ac3f99578 100644 --- a/twilio/rest/bulkexports/v1/model_list_day_response.go +++ b/twilio/rest/bulkexports/v1/model_list_day_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Bulkexports - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Bulkexports + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListDayResponse struct for ListDayResponse type ListDayResponse struct { Days []BulkexportsV1ExportDay `json:"Days,omitempty"` - Meta ListDayResponseMeta `json:"Meta,omitempty"` + Meta ListDayResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/bulkexports/v1/model_list_day_response_meta.go b/twilio/rest/bulkexports/v1/model_list_day_response_meta.go index 3db2f5bb4..78c2e28ec 100644 --- a/twilio/rest/bulkexports/v1/model_list_day_response_meta.go +++ b/twilio/rest/bulkexports/v1/model_list_day_response_meta.go @@ -1,23 +1,22 @@ /* - * Twilio - Bulkexports - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Bulkexports + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListDayResponseMeta struct for ListDayResponseMeta type ListDayResponseMeta struct { - FirstPageUrl string `json:"FirstPageUrl,omitempty"` - Key string `json:"Key,omitempty"` - NextPageUrl string `json:"NextPageUrl,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` - Url string `json:"Url,omitempty"` + Url string `json:"Url,omitempty"` } diff --git a/twilio/rest/bulkexports/v1/model_list_export_custom_job_response.go b/twilio/rest/bulkexports/v1/model_list_export_custom_job_response.go index bd04f4f7f..86c2ede78 100644 --- a/twilio/rest/bulkexports/v1/model_list_export_custom_job_response.go +++ b/twilio/rest/bulkexports/v1/model_list_export_custom_job_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Bulkexports - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Bulkexports + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListExportCustomJobResponse struct for ListExportCustomJobResponse type ListExportCustomJobResponse struct { Jobs []BulkexportsV1ExportExportCustomJob `json:"Jobs,omitempty"` - Meta ListDayResponseMeta `json:"Meta,omitempty"` + Meta ListDayResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/chat/v1/api_default.go b/twilio/rest/chat/v1/api_default.go index c90789bc8..ec1cee4e5 100644 --- a/twilio/rest/chat/v1/api_default.go +++ b/twilio/rest/chat/v1/api_default.go @@ -1,11 +1,11 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,10 +14,10 @@ package openapi import ( "encoding/json" "fmt" - "net/url" - "strings" - twilio "github.com/twilio/twilio-go/client" + "net/url" + "strings" + "reflect" ) type DefaultApiService struct { @@ -26,18 +26,18 @@ type DefaultApiService struct { } func NewDefaultApiService(client *twilio.Client) *DefaultApiService { - return &DefaultApiService{ - client: client, + return &DefaultApiService { + client: client, baseURL: "https://chat.twilio.com", } } // CreateChannelParams Optional parameters for the method 'CreateChannel' type CreateChannelParams struct { - Attributes *string `json:"Attributes,omitempty"` + Attributes *string `json:"Attributes,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` - Type *string `json:"Type,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + Type *string `json:"Type,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` } /* @@ -49,51 +49,51 @@ type CreateChannelParams struct { * @param "Type" (string) - The visibility of the channel. Can be: `public` or `private` and defaults to `public`. * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. This value must be 64 characters or less in length and be unique within the Service. * @return ChatV1ServiceChannel - */ +*/ func (c *DefaultApiService) CreateChannel(ServiceSid string, params *CreateChannelParams) (*ChatV1ServiceChannel, error) { - path := "/v1/Services/{ServiceSid}/Channels" + path := "/v1/Services/{ServiceSid}/Channels" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.Type != nil { - data.Set("Type", *params.Type) - } - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) - } + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.Type != nil { + data.Set("Type", *params.Type) +} + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ChatV1ServiceChannel{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ChatV1ServiceChannel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateCredentialParams Optional parameters for the method 'CreateCredential' type CreateCredentialParams struct { - ApiKey *string `json:"ApiKey,omitempty"` - Certificate *string `json:"Certificate,omitempty"` + ApiKey *string `json:"ApiKey,omitempty"` + Certificate *string `json:"Certificate,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` - PrivateKey *string `json:"PrivateKey,omitempty"` - Sandbox *bool `json:"Sandbox,omitempty"` - Secret *string `json:"Secret,omitempty"` - Type *string `json:"Type,omitempty"` + PrivateKey *string `json:"PrivateKey,omitempty"` + Sandbox *bool `json:"Sandbox,omitempty"` + Secret *string `json:"Secret,omitempty"` + Type *string `json:"Type,omitempty"` } /* @@ -107,54 +107,54 @@ type CreateCredentialParams struct { * @param "Secret" (string) - [FCM only] The **Server key** of your project from the Firebase console, found under Settings / Cloud messaging. * @param "Type" (string) - The type of push-notification service the credential is for. Can be: `gcm`, `fcm`, or `apn`. * @return ChatV1Credential - */ +*/ func (c *DefaultApiService) CreateCredential(params *CreateCredentialParams) (*ChatV1Credential, error) { - path := "/v1/Credentials" + path := "/v1/Credentials" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.ApiKey != nil { - data.Set("ApiKey", *params.ApiKey) - } - if params != nil && params.Certificate != nil { - data.Set("Certificate", *params.Certificate) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.PrivateKey != nil { - data.Set("PrivateKey", *params.PrivateKey) - } - if params != nil && params.Sandbox != nil { - data.Set("Sandbox", fmt.Sprint(*params.Sandbox)) - } - if params != nil && params.Secret != nil { - data.Set("Secret", *params.Secret) - } - if params != nil && params.Type != nil { - data.Set("Type", *params.Type) - } + if params != nil && params.ApiKey != nil { + data.Set("ApiKey", *params.ApiKey) +} + if params != nil && params.Certificate != nil { + data.Set("Certificate", *params.Certificate) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.PrivateKey != nil { + data.Set("PrivateKey", *params.PrivateKey) +} + if params != nil && params.Sandbox != nil { + data.Set("Sandbox", fmt.Sprint(*params.Sandbox)) +} + if params != nil && params.Secret != nil { + data.Set("Secret", *params.Secret) +} + if params != nil && params.Type != nil { + data.Set("Type", *params.Type) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ChatV1Credential{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ChatV1Credential{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateInviteParams Optional parameters for the method 'CreateInvite' type CreateInviteParams struct { Identity *string `json:"Identity,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` } /* @@ -165,41 +165,41 @@ type CreateInviteParams struct { * @param "Identity" (string) - The `identity` value that uniquely identifies the new resource's [User](https://www.twilio.com/docs/api/chat/rest/v1/user) within the [Service](https://www.twilio.com/docs/api/chat/rest/v1/service). See [access tokens](https://www.twilio.com/docs/api/chat/guides/create-tokens) for more info. * @param "RoleSid" (string) - The SID of the [Role](https://www.twilio.com/docs/api/chat/rest/roles) assigned to the new member. * @return ChatV1ServiceChannelInvite - */ +*/ func (c *DefaultApiService) CreateInvite(ServiceSid string, ChannelSid string, params *CreateInviteParams) (*ChatV1ServiceChannelInvite, error) { - path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Invites" + path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Invites" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Identity != nil { - data.Set("Identity", *params.Identity) - } - if params != nil && params.RoleSid != nil { - data.Set("RoleSid", *params.RoleSid) - } + if params != nil && params.Identity != nil { + data.Set("Identity", *params.Identity) +} + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ChatV1ServiceChannelInvite{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ChatV1ServiceChannelInvite{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateMemberParams Optional parameters for the method 'CreateMember' type CreateMemberParams struct { Identity *string `json:"Identity,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` } /* @@ -210,42 +210,42 @@ type CreateMemberParams struct { * @param "Identity" (string) - The `identity` value that uniquely identifies the new resource's [User](https://www.twilio.com/docs/api/chat/rest/v1/user) within the [Service](https://www.twilio.com/docs/api/chat/rest/services). See [access tokens](https://www.twilio.com/docs/api/chat/guides/create-tokens) for more details. * @param "RoleSid" (string) - The SID of the [Role](https://www.twilio.com/docs/api/chat/rest/roles) to assign to the member. The default roles are those specified on the [Service](https://www.twilio.com/docs/chat/api/services). * @return ChatV1ServiceChannelMember - */ +*/ func (c *DefaultApiService) CreateMember(ServiceSid string, ChannelSid string, params *CreateMemberParams) (*ChatV1ServiceChannelMember, error) { - path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members" + path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Identity != nil { - data.Set("Identity", *params.Identity) - } - if params != nil && params.RoleSid != nil { - data.Set("RoleSid", *params.RoleSid) - } + if params != nil && params.Identity != nil { + data.Set("Identity", *params.Identity) +} + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ChatV1ServiceChannelMember{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ChatV1ServiceChannelMember{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateMessageParams Optional parameters for the method 'CreateMessage' type CreateMessageParams struct { Attributes *string `json:"Attributes,omitempty"` - Body *string `json:"Body,omitempty"` - From *string `json:"From,omitempty"` + Body *string `json:"Body,omitempty"` + From *string `json:"From,omitempty"` } /* @@ -257,45 +257,45 @@ type CreateMessageParams struct { * @param "Body" (string) - The message to send to the channel. Can also be an empty string or `null`, which sets the value as an empty string. You can send structured data in the body by serializing it as a string. * @param "From" (string) - The [identity](https://www.twilio.com/docs/api/chat/guides/identity) of the new message's author. The default value is `system`. * @return ChatV1ServiceChannelMessage - */ +*/ func (c *DefaultApiService) CreateMessage(ServiceSid string, ChannelSid string, params *CreateMessageParams) (*ChatV1ServiceChannelMessage, error) { - path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages" + path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) - } - if params != nil && params.Body != nil { - data.Set("Body", *params.Body) - } - if params != nil && params.From != nil { - data.Set("From", *params.From) - } + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) +} + if params != nil && params.Body != nil { + data.Set("Body", *params.Body) +} + if params != nil && params.From != nil { + data.Set("From", *params.From) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ChatV1ServiceChannelMessage{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ChatV1ServiceChannelMessage{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateRoleParams Optional parameters for the method 'CreateRole' type CreateRoleParams struct { - FriendlyName *string `json:"FriendlyName,omitempty"` - Permission *[]string `json:"Permission,omitempty"` - Type *string `json:"Type,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Permission *[]string `json:"Permission,omitempty"` + Type *string `json:"Type,omitempty"` } /* @@ -306,39 +306,39 @@ type CreateRoleParams struct { * @param "Permission" ([]string) - A permission that you grant to the new role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. The values for this parameter depend on the role's `type` and are described in the documentation. * @param "Type" (string) - The type of role. Can be: `channel` for [Channel](https://www.twilio.com/docs/chat/api/channels) roles or `deployment` for [Service](https://www.twilio.com/docs/chat/api/services) roles. * @return ChatV1ServiceRole - */ +*/ func (c *DefaultApiService) CreateRole(ServiceSid string, params *CreateRoleParams) (*ChatV1ServiceRole, error) { - path := "/v1/Services/{ServiceSid}/Roles" + path := "/v1/Services/{ServiceSid}/Roles" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.Permission != nil { - data.Set("Permission", strings.Join(*params.Permission, ",")) - } - if params != nil && params.Type != nil { - data.Set("Type", *params.Type) - } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.Permission != nil { + data.Set("Permission", strings.Join(*params.Permission, ",")) +} + if params != nil && params.Type != nil { + data.Set("Type", *params.Type) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ChatV1ServiceRole{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ChatV1ServiceRole{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateServiceParams Optional parameters for the method 'CreateService' type CreateServiceParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` @@ -349,38 +349,38 @@ type CreateServiceParams struct { * @param optional nil or *CreateServiceParams - Optional Parameters: * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It can be up to 64 characters long. * @return ChatV1Service - */ +*/ func (c *DefaultApiService) CreateService(params *CreateServiceParams) (*ChatV1Service, error) { - path := "/v1/Services" + path := "/v1/Services" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ChatV1Service{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ChatV1Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateUserParams Optional parameters for the method 'CreateUser' type CreateUserParams struct { - Attributes *string `json:"Attributes,omitempty"` + Attributes *string `json:"Attributes,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` - Identity *string `json:"Identity,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` + Identity *string `json:"Identity,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` } /* @@ -392,84 +392,89 @@ type CreateUserParams struct { * @param "Identity" (string) - The `identity` value that uniquely identifies the new resource's [User](https://www.twilio.com/docs/api/chat/rest/v1/user) within the [Service](https://www.twilio.com/docs/api/chat/rest/v1/service). This value is often a username or email address. See the Identity documentation for more details. * @param "RoleSid" (string) - The SID of the [Role](https://www.twilio.com/docs/api/chat/rest/roles) assigned to the new User. * @return ChatV1ServiceUser - */ +*/ func (c *DefaultApiService) CreateUser(ServiceSid string, params *CreateUserParams) (*ChatV1ServiceUser, error) { - path := "/v1/Services/{ServiceSid}/Users" + path := "/v1/Services/{ServiceSid}/Users" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.Identity != nil { - data.Set("Identity", *params.Identity) - } - if params != nil && params.RoleSid != nil { - data.Set("RoleSid", *params.RoleSid) - } + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.Identity != nil { + data.Set("Identity", *params.Identity) +} + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ChatV1ServiceUser{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() + + ps := &ChatV1ServiceUser{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * DeleteChannel Method for DeleteChannel * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to delete the resource from. * @param Sid The Twilio-provided string that uniquely identifies the Channel resource to delete. - */ -func (c *DefaultApiService) DeleteChannel(ServiceSid string, Sid string) error { - path := "/v1/Services/{ServiceSid}/Channels/{Sid}" +*/ +func (c *DefaultApiService) DeleteChannel(ServiceSid string, Sid string, ) (error) { + path := "/v1/Services/{ServiceSid}/Channels/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* * DeleteCredential Method for DeleteCredential * @param Sid The Twilio-provided string that uniquely identifies the Credential resource to delete. - */ -func (c *DefaultApiService) DeleteCredential(Sid string) error { - path := "/v1/Credentials/{Sid}" +*/ +func (c *DefaultApiService) DeleteCredential(Sid string, ) (error) { + path := "/v1/Credentials/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* @@ -477,24 +482,26 @@ func (c *DefaultApiService) DeleteCredential(Sid string) error { * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to delete the resource from. * @param ChannelSid The SID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the resource to delete belongs to. * @param Sid The Twilio-provided string that uniquely identifies the Invite resource to delete. - */ -func (c *DefaultApiService) DeleteInvite(ServiceSid string, ChannelSid string, Sid string) error { - path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Invites/{Sid}" +*/ +func (c *DefaultApiService) DeleteInvite(ServiceSid string, ChannelSid string, Sid string, ) (error) { + path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Invites/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* @@ -502,24 +509,26 @@ func (c *DefaultApiService) DeleteInvite(ServiceSid string, ChannelSid string, S * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to delete the resource from. * @param ChannelSid The unique ID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the message belongs to. Can be the Channel's `sid` or `unique_name`. * @param Sid The Twilio-provided string that uniquely identifies the Member resource to delete. - */ -func (c *DefaultApiService) DeleteMember(ServiceSid string, ChannelSid string, Sid string) error { - path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}" +*/ +func (c *DefaultApiService) DeleteMember(ServiceSid string, ChannelSid string, Sid string, ) (error) { + path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* @@ -527,91 +536,99 @@ func (c *DefaultApiService) DeleteMember(ServiceSid string, ChannelSid string, S * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to delete the resource from. * @param ChannelSid The unique ID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the message to delete belongs to. Can be the Channel resource's `sid` or `unique_name`. * @param Sid The Twilio-provided string that uniquely identifies the Message resource to delete. - */ -func (c *DefaultApiService) DeleteMessage(ServiceSid string, ChannelSid string, Sid string) error { - path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}" +*/ +func (c *DefaultApiService) DeleteMessage(ServiceSid string, ChannelSid string, Sid string, ) (error) { + path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* * DeleteRole Method for DeleteRole * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to delete the resource from. * @param Sid The Twilio-provided string that uniquely identifies the Role resource to delete. - */ -func (c *DefaultApiService) DeleteRole(ServiceSid string, Sid string) error { - path := "/v1/Services/{ServiceSid}/Roles/{Sid}" +*/ +func (c *DefaultApiService) DeleteRole(ServiceSid string, Sid string, ) (error) { + path := "/v1/Services/{ServiceSid}/Roles/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* * DeleteService Method for DeleteService * @param Sid The Twilio-provided string that uniquely identifies the Service resource to delete. - */ -func (c *DefaultApiService) DeleteService(Sid string) error { - path := "/v1/Services/{Sid}" +*/ +func (c *DefaultApiService) DeleteService(Sid string, ) (error) { + path := "/v1/Services/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* * DeleteUser Method for DeleteUser * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to delete the resource from. * @param Sid The Twilio-provided string that uniquely identifies the User resource to delete. - */ -func (c *DefaultApiService) DeleteUser(ServiceSid string, Sid string) error { - path := "/v1/Services/{ServiceSid}/Users/{Sid}" +*/ +func (c *DefaultApiService) DeleteUser(ServiceSid string, Sid string, ) (error) { + path := "/v1/Services/{ServiceSid}/Users/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* @@ -619,55 +636,59 @@ func (c *DefaultApiService) DeleteUser(ServiceSid string, Sid string) error { * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to fetch the resource from. * @param Sid The Twilio-provided string that uniquely identifies the Channel resource to fetch. * @return ChatV1ServiceChannel - */ -func (c *DefaultApiService) FetchChannel(ServiceSid string, Sid string) (*ChatV1ServiceChannel, error) { - path := "/v1/Services/{ServiceSid}/Channels/{Sid}" +*/ +func (c *DefaultApiService) FetchChannel(ServiceSid string, Sid string, ) (*ChatV1ServiceChannel, error) { + path := "/v1/Services/{ServiceSid}/Channels/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ChatV1ServiceChannel{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &ChatV1ServiceChannel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* * FetchCredential Method for FetchCredential * @param Sid The Twilio-provided string that uniquely identifies the Credential resource to fetch. * @return ChatV1Credential - */ -func (c *DefaultApiService) FetchCredential(Sid string) (*ChatV1Credential, error) { - path := "/v1/Credentials/{Sid}" +*/ +func (c *DefaultApiService) FetchCredential(Sid string, ) (*ChatV1Credential, error) { + path := "/v1/Credentials/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ChatV1Credential{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err + defer resp.Body.Close() + + ps := &ChatV1Credential{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -676,29 +697,31 @@ func (c *DefaultApiService) FetchCredential(Sid string) (*ChatV1Credential, erro * @param ChannelSid The SID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the resource to fetch belongs to. * @param Sid The Twilio-provided string that uniquely identifies the Invite resource to fetch. * @return ChatV1ServiceChannelInvite - */ -func (c *DefaultApiService) FetchInvite(ServiceSid string, ChannelSid string, Sid string) (*ChatV1ServiceChannelInvite, error) { - path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Invites/{Sid}" +*/ +func (c *DefaultApiService) FetchInvite(ServiceSid string, ChannelSid string, Sid string, ) (*ChatV1ServiceChannelInvite, error) { + path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Invites/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ChatV1ServiceChannelInvite{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ChatV1ServiceChannelInvite{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -707,29 +730,31 @@ func (c *DefaultApiService) FetchInvite(ServiceSid string, ChannelSid string, Si * @param ChannelSid The unique ID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the member to fetch belongs to. Can be the Channel resource's `sid` or `unique_name` value. * @param Sid The Twilio-provided string that uniquely identifies the Member resource to fetch. * @return ChatV1ServiceChannelMember - */ -func (c *DefaultApiService) FetchMember(ServiceSid string, ChannelSid string, Sid string) (*ChatV1ServiceChannelMember, error) { - path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}" +*/ +func (c *DefaultApiService) FetchMember(ServiceSid string, ChannelSid string, Sid string, ) (*ChatV1ServiceChannelMember, error) { + path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ChatV1ServiceChannelMember{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &ChatV1ServiceChannelMember{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -738,29 +763,31 @@ func (c *DefaultApiService) FetchMember(ServiceSid string, ChannelSid string, Si * @param ChannelSid The unique ID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the message to fetch belongs to. Can be the Channel's `sid` or `unique_name`. * @param Sid The Twilio-provided string that uniquely identifies the Message resource to fetch. * @return ChatV1ServiceChannelMessage - */ -func (c *DefaultApiService) FetchMessage(ServiceSid string, ChannelSid string, Sid string) (*ChatV1ServiceChannelMessage, error) { - path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}" +*/ +func (c *DefaultApiService) FetchMessage(ServiceSid string, ChannelSid string, Sid string, ) (*ChatV1ServiceChannelMessage, error) { + path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ChatV1ServiceChannelMessage{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err + defer resp.Body.Close() + + ps := &ChatV1ServiceChannelMessage{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -768,55 +795,59 @@ func (c *DefaultApiService) FetchMessage(ServiceSid string, ChannelSid string, S * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to fetch the resource from. * @param Sid The Twilio-provided string that uniquely identifies the Role resource to fetch. * @return ChatV1ServiceRole - */ -func (c *DefaultApiService) FetchRole(ServiceSid string, Sid string) (*ChatV1ServiceRole, error) { - path := "/v1/Services/{ServiceSid}/Roles/{Sid}" +*/ +func (c *DefaultApiService) FetchRole(ServiceSid string, Sid string, ) (*ChatV1ServiceRole, error) { + path := "/v1/Services/{ServiceSid}/Roles/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ChatV1ServiceRole{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ChatV1ServiceRole{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * FetchService Method for FetchService * @param Sid The Twilio-provided string that uniquely identifies the Service resource to fetch. * @return ChatV1Service - */ -func (c *DefaultApiService) FetchService(Sid string) (*ChatV1Service, error) { - path := "/v1/Services/{Sid}" +*/ +func (c *DefaultApiService) FetchService(Sid string, ) (*ChatV1Service, error) { + path := "/v1/Services/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ChatV1Service{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &ChatV1Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -824,34 +855,35 @@ func (c *DefaultApiService) FetchService(Sid string) (*ChatV1Service, error) { * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to fetch the resource from. * @param Sid The Twilio-provided string that uniquely identifies the User resource to fetch. * @return ChatV1ServiceUser - */ -func (c *DefaultApiService) FetchUser(ServiceSid string, Sid string) (*ChatV1ServiceUser, error) { - path := "/v1/Services/{ServiceSid}/Users/{Sid}" +*/ +func (c *DefaultApiService) FetchUser(ServiceSid string, Sid string, ) (*ChatV1ServiceUser, error) { + path := "/v1/Services/{ServiceSid}/Users/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ChatV1ServiceUser{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err -} + defer resp.Body.Close() + + ps := &ChatV1ServiceUser{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListChannelParams Optional parameters for the method 'ListChannel' type ListChannelParams struct { - Type *[]string `json:"Type,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + Type *[]string `json:"Type,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -861,36 +893,36 @@ type ListChannelParams struct { * @param "Type" ([]string) - The visibility of the Channels to read. Can be: `public` or `private` and defaults to `public`. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListChannelResponse - */ +*/ func (c *DefaultApiService) ListChannel(ServiceSid string, params *ListChannelParams) (*ListChannelResponse, error) { - path := "/v1/Services/{ServiceSid}/Channels" + path := "/v1/Services/{ServiceSid}/Channels" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Type != nil { - data.Set("Type", strings.Join(*params.Type, ",")) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.Type != nil { + data.Set("Type", strings.Join(*params.Type, ",")) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListChannelResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListChannelResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListCredentialParams Optional parameters for the method 'ListCredential' type ListCredentialParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -901,36 +933,36 @@ type ListCredentialParams struct { * @param optional nil or *ListCredentialParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListCredentialResponse - */ +*/ func (c *DefaultApiService) ListCredential(params *ListCredentialParams) (*ListCredentialResponse, error) { - path := "/v1/Credentials" + path := "/v1/Credentials" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListCredentialResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListCredentialResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListInviteParams Optional parameters for the method 'ListInvite' type ListInviteParams struct { Identity *[]string `json:"Identity,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -941,41 +973,41 @@ type ListInviteParams struct { * @param "Identity" ([]string) - The [User](https://www.twilio.com/docs/api/chat/rest/v1/user)'s `identity` value of the resources to read. See [access tokens](https://www.twilio.com/docs/api/chat/guides/create-tokens) for more details. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListInviteResponse - */ +*/ func (c *DefaultApiService) ListInvite(ServiceSid string, ChannelSid string, params *ListInviteParams) (*ListInviteResponse, error) { - path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Invites" + path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Invites" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Identity != nil { - data.Set("Identity", strings.Join(*params.Identity, ",")) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.Identity != nil { + data.Set("Identity", strings.Join(*params.Identity, ",")) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListInviteResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListInviteResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListMemberParams Optional parameters for the method 'ListMember' type ListMemberParams struct { Identity *[]string `json:"Identity,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -986,41 +1018,41 @@ type ListMemberParams struct { * @param "Identity" ([]string) - The [User](https://www.twilio.com/docs/api/chat/rest/v1/user)'s `identity` value of the resources to read. See [access tokens](https://www.twilio.com/docs/api/chat/guides/create-tokens) for more details. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListMemberResponse - */ +*/ func (c *DefaultApiService) ListMember(ServiceSid string, ChannelSid string, params *ListMemberParams) (*ListMemberResponse, error) { - path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members" + path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Identity != nil { - data.Set("Identity", strings.Join(*params.Identity, ",")) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.Identity != nil { + data.Set("Identity", strings.Join(*params.Identity, ",")) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListMemberResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListMemberResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListMessageParams Optional parameters for the method 'ListMessage' type ListMessageParams struct { - Order *string `json:"Order,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + Order *string `json:"Order,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -1031,37 +1063,37 @@ type ListMessageParams struct { * @param "Order" (string) - The sort order of the returned messages. Can be: `asc` (ascending) or `desc` (descending) with `asc` as the default. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListMessageResponse - */ +*/ func (c *DefaultApiService) ListMessage(ServiceSid string, ChannelSid string, params *ListMessageParams) (*ListMessageResponse, error) { - path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages" + path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Order != nil { - data.Set("Order", *params.Order) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.Order != nil { + data.Set("Order", *params.Order) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListMessageResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListMessageResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListRoleParams Optional parameters for the method 'ListRole' type ListRoleParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1073,33 +1105,33 @@ type ListRoleParams struct { * @param optional nil or *ListRoleParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListRoleResponse - */ +*/ func (c *DefaultApiService) ListRole(ServiceSid string, params *ListRoleParams) (*ListRoleResponse, error) { - path := "/v1/Services/{ServiceSid}/Roles" + path := "/v1/Services/{ServiceSid}/Roles" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListRoleResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListRoleResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListServiceParams Optional parameters for the method 'ListService' type ListServiceParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1110,32 +1142,32 @@ type ListServiceParams struct { * @param optional nil or *ListServiceParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListServiceResponse - */ +*/ func (c *DefaultApiService) ListService(params *ListServiceParams) (*ListServiceResponse, error) { - path := "/v1/Services" + path := "/v1/Services" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListServiceResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListServiceResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListUserParams Optional parameters for the method 'ListUser' type ListUserParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1147,33 +1179,33 @@ type ListUserParams struct { * @param optional nil or *ListUserParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListUserResponse - */ +*/ func (c *DefaultApiService) ListUser(ServiceSid string, params *ListUserParams) (*ListUserResponse, error) { - path := "/v1/Services/{ServiceSid}/Users" + path := "/v1/Services/{ServiceSid}/Users" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListUserResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListUserResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListUserChannelParams Optional parameters for the method 'ListUserChannel' type ListUserChannelParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1187,39 +1219,39 @@ type ListUserChannelParams struct { * @param optional nil or *ListUserChannelParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListUserChannelResponse - */ +*/ func (c *DefaultApiService) ListUserChannel(ServiceSid string, UserSid string, params *ListUserChannelParams) (*ListUserChannelResponse, error) { - path := "/v1/Services/{ServiceSid}/Users/{UserSid}/Channels" + path := "/v1/Services/{ServiceSid}/Users/{UserSid}/Channels" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"UserSid"+"}", UserSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListUserChannelResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListUserChannelResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateChannelParams Optional parameters for the method 'UpdateChannel' type UpdateChannelParams struct { - Attributes *string `json:"Attributes,omitempty"` + Attributes *string `json:"Attributes,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` } /* @@ -1231,48 +1263,48 @@ type UpdateChannelParams struct { * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It can be up to 64 characters long. * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. This value must be 64 characters or less in length and be unique within the Service. * @return ChatV1ServiceChannel - */ +*/ func (c *DefaultApiService) UpdateChannel(ServiceSid string, Sid string, params *UpdateChannelParams) (*ChatV1ServiceChannel, error) { - path := "/v1/Services/{ServiceSid}/Channels/{Sid}" + path := "/v1/Services/{ServiceSid}/Channels/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) - } + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ChatV1ServiceChannel{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ChatV1ServiceChannel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateCredentialParams Optional parameters for the method 'UpdateCredential' type UpdateCredentialParams struct { - ApiKey *string `json:"ApiKey,omitempty"` - Certificate *string `json:"Certificate,omitempty"` + ApiKey *string `json:"ApiKey,omitempty"` + Certificate *string `json:"Certificate,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` - PrivateKey *string `json:"PrivateKey,omitempty"` - Sandbox *bool `json:"Sandbox,omitempty"` - Secret *string `json:"Secret,omitempty"` + PrivateKey *string `json:"PrivateKey,omitempty"` + Sandbox *bool `json:"Sandbox,omitempty"` + Secret *string `json:"Secret,omitempty"` } /* @@ -1286,52 +1318,52 @@ type UpdateCredentialParams struct { * @param "Sandbox" (bool) - [APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production. * @param "Secret" (string) - [FCM only] The **Server key** of your project from the Firebase console, found under Settings / Cloud messaging. * @return ChatV1Credential - */ +*/ func (c *DefaultApiService) UpdateCredential(Sid string, params *UpdateCredentialParams) (*ChatV1Credential, error) { - path := "/v1/Credentials/{Sid}" + path := "/v1/Credentials/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.ApiKey != nil { - data.Set("ApiKey", *params.ApiKey) - } - if params != nil && params.Certificate != nil { - data.Set("Certificate", *params.Certificate) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.PrivateKey != nil { - data.Set("PrivateKey", *params.PrivateKey) - } - if params != nil && params.Sandbox != nil { - data.Set("Sandbox", fmt.Sprint(*params.Sandbox)) - } - if params != nil && params.Secret != nil { - data.Set("Secret", *params.Secret) - } + if params != nil && params.ApiKey != nil { + data.Set("ApiKey", *params.ApiKey) +} + if params != nil && params.Certificate != nil { + data.Set("Certificate", *params.Certificate) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.PrivateKey != nil { + data.Set("PrivateKey", *params.PrivateKey) +} + if params != nil && params.Sandbox != nil { + data.Set("Sandbox", fmt.Sprint(*params.Sandbox)) +} + if params != nil && params.Secret != nil { + data.Set("Secret", *params.Secret) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ChatV1Credential{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ChatV1Credential{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateMemberParams Optional parameters for the method 'UpdateMember' type UpdateMemberParams struct { - LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` + LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` } /* @@ -1343,42 +1375,42 @@ type UpdateMemberParams struct { * @param "LastConsumedMessageIndex" (*int32) - The index of the last [Message](https://www.twilio.com/docs/api/chat/rest/messages) that the Member has read within the [Channel](https://www.twilio.com/docs/api/chat/rest/channels). * @param "RoleSid" (string) - The SID of the [Role](https://www.twilio.com/docs/api/chat/rest/roles) to assign to the member. The default roles are those specified on the [Service](https://www.twilio.com/docs/chat/api/services). * @return ChatV1ServiceChannelMember - */ +*/ func (c *DefaultApiService) UpdateMember(ServiceSid string, ChannelSid string, Sid string, params *UpdateMemberParams) (*ChatV1ServiceChannelMember, error) { - path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}" + path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.LastConsumedMessageIndex != nil { - data.Set("LastConsumedMessageIndex", fmt.Sprint(*params.LastConsumedMessageIndex)) - } - if params != nil && params.RoleSid != nil { - data.Set("RoleSid", *params.RoleSid) - } + if params != nil && params.LastConsumedMessageIndex != nil { + data.Set("LastConsumedMessageIndex", fmt.Sprint(*params.LastConsumedMessageIndex)) +} + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ChatV1ServiceChannelMember{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ChatV1ServiceChannelMember{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateMessageParams Optional parameters for the method 'UpdateMessage' type UpdateMessageParams struct { Attributes *string `json:"Attributes,omitempty"` - Body *string `json:"Body,omitempty"` + Body *string `json:"Body,omitempty"` } /* @@ -1390,38 +1422,38 @@ type UpdateMessageParams struct { * @param "Attributes" (string) - A valid JSON string that contains application-specific data. * @param "Body" (string) - The message to send to the channel. Can also be an empty string or `null`, which sets the value as an empty string. You can send structured data in the body by serializing it as a string. * @return ChatV1ServiceChannelMessage - */ +*/ func (c *DefaultApiService) UpdateMessage(ServiceSid string, ChannelSid string, Sid string, params *UpdateMessageParams) (*ChatV1ServiceChannelMessage, error) { - path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}" + path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) - } - if params != nil && params.Body != nil { - data.Set("Body", *params.Body) - } + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) +} + if params != nil && params.Body != nil { + data.Set("Body", *params.Body) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ChatV1ServiceChannelMessage{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ChatV1ServiceChannelMessage{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateRoleParams Optional parameters for the method 'UpdateRole' type UpdateRoleParams struct { Permission *[]string `json:"Permission,omitempty"` @@ -1434,90 +1466,90 @@ type UpdateRoleParams struct { * @param optional nil or *UpdateRoleParams - Optional Parameters: * @param "Permission" ([]string) - A permission that you grant to the role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. The values for this parameter depend on the role's `type` and are described in the documentation. * @return ChatV1ServiceRole - */ +*/ func (c *DefaultApiService) UpdateRole(ServiceSid string, Sid string, params *UpdateRoleParams) (*ChatV1ServiceRole, error) { - path := "/v1/Services/{ServiceSid}/Roles/{Sid}" + path := "/v1/Services/{ServiceSid}/Roles/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Permission != nil { - data.Set("Permission", strings.Join(*params.Permission, ",")) - } + if params != nil && params.Permission != nil { + data.Set("Permission", strings.Join(*params.Permission, ",")) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ChatV1ServiceRole{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ChatV1ServiceRole{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateServiceParams Optional parameters for the method 'UpdateService' type UpdateServiceParams struct { - ConsumptionReportInterval *int32 `json:"ConsumptionReportInterval,omitempty"` - DefaultChannelCreatorRoleSid *string `json:"DefaultChannelCreatorRoleSid,omitempty"` - DefaultChannelRoleSid *string `json:"DefaultChannelRoleSid,omitempty"` - DefaultServiceRoleSid *string `json:"DefaultServiceRoleSid,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - LimitsChannelMembers *int32 `json:"Limits.ChannelMembers,omitempty"` - LimitsUserChannels *int32 `json:"Limits.UserChannels,omitempty"` - NotificationsAddedToChannelEnabled *bool `json:"Notifications.AddedToChannel.Enabled,omitempty"` - NotificationsAddedToChannelTemplate *string `json:"Notifications.AddedToChannel.Template,omitempty"` - NotificationsInvitedToChannelEnabled *bool `json:"Notifications.InvitedToChannel.Enabled,omitempty"` - NotificationsInvitedToChannelTemplate *string `json:"Notifications.InvitedToChannel.Template,omitempty"` - NotificationsNewMessageEnabled *bool `json:"Notifications.NewMessage.Enabled,omitempty"` - NotificationsNewMessageTemplate *string `json:"Notifications.NewMessage.Template,omitempty"` - NotificationsRemovedFromChannelEnabled *bool `json:"Notifications.RemovedFromChannel.Enabled,omitempty"` - NotificationsRemovedFromChannelTemplate *string `json:"Notifications.RemovedFromChannel.Template,omitempty"` - PostWebhookUrl *string `json:"PostWebhookUrl,omitempty"` - PreWebhookUrl *string `json:"PreWebhookUrl,omitempty"` - ReachabilityEnabled *bool `json:"ReachabilityEnabled,omitempty"` - ReadStatusEnabled *bool `json:"ReadStatusEnabled,omitempty"` - TypingIndicatorTimeout *int32 `json:"TypingIndicatorTimeout,omitempty"` - WebhookFilters *[]string `json:"WebhookFilters,omitempty"` - WebhookMethod *string `json:"WebhookMethod,omitempty"` - WebhooksOnChannelAddMethod *string `json:"Webhooks.OnChannelAdd.Method,omitempty"` - WebhooksOnChannelAddUrl *string `json:"Webhooks.OnChannelAdd.Url,omitempty"` - WebhooksOnChannelAddedMethod *string `json:"Webhooks.OnChannelAdded.Method,omitempty"` - WebhooksOnChannelAddedUrl *string `json:"Webhooks.OnChannelAdded.Url,omitempty"` - WebhooksOnChannelDestroyMethod *string `json:"Webhooks.OnChannelDestroy.Method,omitempty"` - WebhooksOnChannelDestroyUrl *string `json:"Webhooks.OnChannelDestroy.Url,omitempty"` - WebhooksOnChannelDestroyedMethod *string `json:"Webhooks.OnChannelDestroyed.Method,omitempty"` - WebhooksOnChannelDestroyedUrl *string `json:"Webhooks.OnChannelDestroyed.Url,omitempty"` - WebhooksOnChannelUpdateMethod *string `json:"Webhooks.OnChannelUpdate.Method,omitempty"` - WebhooksOnChannelUpdateUrl *string `json:"Webhooks.OnChannelUpdate.Url,omitempty"` - WebhooksOnChannelUpdatedMethod *string `json:"Webhooks.OnChannelUpdated.Method,omitempty"` - WebhooksOnChannelUpdatedUrl *string `json:"Webhooks.OnChannelUpdated.Url,omitempty"` - WebhooksOnMemberAddMethod *string `json:"Webhooks.OnMemberAdd.Method,omitempty"` - WebhooksOnMemberAddUrl *string `json:"Webhooks.OnMemberAdd.Url,omitempty"` - WebhooksOnMemberAddedMethod *string `json:"Webhooks.OnMemberAdded.Method,omitempty"` - WebhooksOnMemberAddedUrl *string `json:"Webhooks.OnMemberAdded.Url,omitempty"` - WebhooksOnMemberRemoveMethod *string `json:"Webhooks.OnMemberRemove.Method,omitempty"` - WebhooksOnMemberRemoveUrl *string `json:"Webhooks.OnMemberRemove.Url,omitempty"` - WebhooksOnMemberRemovedMethod *string `json:"Webhooks.OnMemberRemoved.Method,omitempty"` - WebhooksOnMemberRemovedUrl *string `json:"Webhooks.OnMemberRemoved.Url,omitempty"` - WebhooksOnMessageRemoveMethod *string `json:"Webhooks.OnMessageRemove.Method,omitempty"` - WebhooksOnMessageRemoveUrl *string `json:"Webhooks.OnMessageRemove.Url,omitempty"` - WebhooksOnMessageRemovedMethod *string `json:"Webhooks.OnMessageRemoved.Method,omitempty"` - WebhooksOnMessageRemovedUrl *string `json:"Webhooks.OnMessageRemoved.Url,omitempty"` - WebhooksOnMessageSendMethod *string `json:"Webhooks.OnMessageSend.Method,omitempty"` - WebhooksOnMessageSendUrl *string `json:"Webhooks.OnMessageSend.Url,omitempty"` - WebhooksOnMessageSentMethod *string `json:"Webhooks.OnMessageSent.Method,omitempty"` - WebhooksOnMessageSentUrl *string `json:"Webhooks.OnMessageSent.Url,omitempty"` - WebhooksOnMessageUpdateMethod *string `json:"Webhooks.OnMessageUpdate.Method,omitempty"` - WebhooksOnMessageUpdateUrl *string `json:"Webhooks.OnMessageUpdate.Url,omitempty"` - WebhooksOnMessageUpdatedMethod *string `json:"Webhooks.OnMessageUpdated.Method,omitempty"` - WebhooksOnMessageUpdatedUrl *string `json:"Webhooks.OnMessageUpdated.Url,omitempty"` + ConsumptionReportInterval *int32 `json:"ConsumptionReportInterval,omitempty"` + DefaultChannelCreatorRoleSid *string `json:"DefaultChannelCreatorRoleSid,omitempty"` + DefaultChannelRoleSid *string `json:"DefaultChannelRoleSid,omitempty"` + DefaultServiceRoleSid *string `json:"DefaultServiceRoleSid,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + LimitsChannelMembers *int32 `json:"Limits.ChannelMembers,omitempty"` + LimitsUserChannels *int32 `json:"Limits.UserChannels,omitempty"` + NotificationsAddedToChannelEnabled *bool `json:"Notifications.AddedToChannel.Enabled,omitempty"` + NotificationsAddedToChannelTemplate *string `json:"Notifications.AddedToChannel.Template,omitempty"` + NotificationsInvitedToChannelEnabled *bool `json:"Notifications.InvitedToChannel.Enabled,omitempty"` + NotificationsInvitedToChannelTemplate *string `json:"Notifications.InvitedToChannel.Template,omitempty"` + NotificationsNewMessageEnabled *bool `json:"Notifications.NewMessage.Enabled,omitempty"` + NotificationsNewMessageTemplate *string `json:"Notifications.NewMessage.Template,omitempty"` + NotificationsRemovedFromChannelEnabled *bool `json:"Notifications.RemovedFromChannel.Enabled,omitempty"` + NotificationsRemovedFromChannelTemplate *string `json:"Notifications.RemovedFromChannel.Template,omitempty"` + PostWebhookUrl *string `json:"PostWebhookUrl,omitempty"` + PreWebhookUrl *string `json:"PreWebhookUrl,omitempty"` + ReachabilityEnabled *bool `json:"ReachabilityEnabled,omitempty"` + ReadStatusEnabled *bool `json:"ReadStatusEnabled,omitempty"` + TypingIndicatorTimeout *int32 `json:"TypingIndicatorTimeout,omitempty"` + WebhookFilters *[]string `json:"WebhookFilters,omitempty"` + WebhookMethod *string `json:"WebhookMethod,omitempty"` + WebhooksOnChannelAddMethod *string `json:"Webhooks.OnChannelAdd.Method,omitempty"` + WebhooksOnChannelAddUrl *string `json:"Webhooks.OnChannelAdd.Url,omitempty"` + WebhooksOnChannelAddedMethod *string `json:"Webhooks.OnChannelAdded.Method,omitempty"` + WebhooksOnChannelAddedUrl *string `json:"Webhooks.OnChannelAdded.Url,omitempty"` + WebhooksOnChannelDestroyMethod *string `json:"Webhooks.OnChannelDestroy.Method,omitempty"` + WebhooksOnChannelDestroyUrl *string `json:"Webhooks.OnChannelDestroy.Url,omitempty"` + WebhooksOnChannelDestroyedMethod *string `json:"Webhooks.OnChannelDestroyed.Method,omitempty"` + WebhooksOnChannelDestroyedUrl *string `json:"Webhooks.OnChannelDestroyed.Url,omitempty"` + WebhooksOnChannelUpdateMethod *string `json:"Webhooks.OnChannelUpdate.Method,omitempty"` + WebhooksOnChannelUpdateUrl *string `json:"Webhooks.OnChannelUpdate.Url,omitempty"` + WebhooksOnChannelUpdatedMethod *string `json:"Webhooks.OnChannelUpdated.Method,omitempty"` + WebhooksOnChannelUpdatedUrl *string `json:"Webhooks.OnChannelUpdated.Url,omitempty"` + WebhooksOnMemberAddMethod *string `json:"Webhooks.OnMemberAdd.Method,omitempty"` + WebhooksOnMemberAddUrl *string `json:"Webhooks.OnMemberAdd.Url,omitempty"` + WebhooksOnMemberAddedMethod *string `json:"Webhooks.OnMemberAdded.Method,omitempty"` + WebhooksOnMemberAddedUrl *string `json:"Webhooks.OnMemberAdded.Url,omitempty"` + WebhooksOnMemberRemoveMethod *string `json:"Webhooks.OnMemberRemove.Method,omitempty"` + WebhooksOnMemberRemoveUrl *string `json:"Webhooks.OnMemberRemove.Url,omitempty"` + WebhooksOnMemberRemovedMethod *string `json:"Webhooks.OnMemberRemoved.Method,omitempty"` + WebhooksOnMemberRemovedUrl *string `json:"Webhooks.OnMemberRemoved.Url,omitempty"` + WebhooksOnMessageRemoveMethod *string `json:"Webhooks.OnMessageRemove.Method,omitempty"` + WebhooksOnMessageRemoveUrl *string `json:"Webhooks.OnMessageRemove.Url,omitempty"` + WebhooksOnMessageRemovedMethod *string `json:"Webhooks.OnMessageRemoved.Method,omitempty"` + WebhooksOnMessageRemovedUrl *string `json:"Webhooks.OnMessageRemoved.Url,omitempty"` + WebhooksOnMessageSendMethod *string `json:"Webhooks.OnMessageSend.Method,omitempty"` + WebhooksOnMessageSendUrl *string `json:"Webhooks.OnMessageSend.Url,omitempty"` + WebhooksOnMessageSentMethod *string `json:"Webhooks.OnMessageSent.Method,omitempty"` + WebhooksOnMessageSentUrl *string `json:"Webhooks.OnMessageSent.Url,omitempty"` + WebhooksOnMessageUpdateMethod *string `json:"Webhooks.OnMessageUpdate.Method,omitempty"` + WebhooksOnMessageUpdateUrl *string `json:"Webhooks.OnMessageUpdate.Url,omitempty"` + WebhooksOnMessageUpdatedMethod *string `json:"Webhooks.OnMessageUpdated.Method,omitempty"` + WebhooksOnMessageUpdatedUrl *string `json:"Webhooks.OnMessageUpdated.Url,omitempty"` } /* @@ -1579,197 +1611,197 @@ type UpdateServiceParams struct { * @param "WebhooksOnMessageUpdatedMethod" (string) - The HTTP method to use when calling the `webhooks.on_message_updated.url`. * @param "WebhooksOnMessageUpdatedUrl" (string) - The URL of the webhook to call in response to the `on_message_updated` event using the `webhooks.on_message_updated.method` HTTP method. * @return ChatV1Service - */ +*/ func (c *DefaultApiService) UpdateService(Sid string, params *UpdateServiceParams) (*ChatV1Service, error) { - path := "/v1/Services/{Sid}" + path := "/v1/Services/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.ConsumptionReportInterval != nil { - data.Set("ConsumptionReportInterval", fmt.Sprint(*params.ConsumptionReportInterval)) - } - if params != nil && params.DefaultChannelCreatorRoleSid != nil { - data.Set("DefaultChannelCreatorRoleSid", *params.DefaultChannelCreatorRoleSid) - } - if params != nil && params.DefaultChannelRoleSid != nil { - data.Set("DefaultChannelRoleSid", *params.DefaultChannelRoleSid) - } - if params != nil && params.DefaultServiceRoleSid != nil { - data.Set("DefaultServiceRoleSid", *params.DefaultServiceRoleSid) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.LimitsChannelMembers != nil { - data.Set("LimitsChannelMembers", fmt.Sprint(*params.LimitsChannelMembers)) - } - if params != nil && params.LimitsUserChannels != nil { - data.Set("LimitsUserChannels", fmt.Sprint(*params.LimitsUserChannels)) - } - if params != nil && params.NotificationsAddedToChannelEnabled != nil { - data.Set("NotificationsAddedToChannelEnabled", fmt.Sprint(*params.NotificationsAddedToChannelEnabled)) - } - if params != nil && params.NotificationsAddedToChannelTemplate != nil { - data.Set("NotificationsAddedToChannelTemplate", *params.NotificationsAddedToChannelTemplate) - } - if params != nil && params.NotificationsInvitedToChannelEnabled != nil { - data.Set("NotificationsInvitedToChannelEnabled", fmt.Sprint(*params.NotificationsInvitedToChannelEnabled)) - } - if params != nil && params.NotificationsInvitedToChannelTemplate != nil { - data.Set("NotificationsInvitedToChannelTemplate", *params.NotificationsInvitedToChannelTemplate) - } - if params != nil && params.NotificationsNewMessageEnabled != nil { - data.Set("NotificationsNewMessageEnabled", fmt.Sprint(*params.NotificationsNewMessageEnabled)) - } - if params != nil && params.NotificationsNewMessageTemplate != nil { - data.Set("NotificationsNewMessageTemplate", *params.NotificationsNewMessageTemplate) - } - if params != nil && params.NotificationsRemovedFromChannelEnabled != nil { - data.Set("NotificationsRemovedFromChannelEnabled", fmt.Sprint(*params.NotificationsRemovedFromChannelEnabled)) - } - if params != nil && params.NotificationsRemovedFromChannelTemplate != nil { - data.Set("NotificationsRemovedFromChannelTemplate", *params.NotificationsRemovedFromChannelTemplate) - } - if params != nil && params.PostWebhookUrl != nil { - data.Set("PostWebhookUrl", *params.PostWebhookUrl) - } - if params != nil && params.PreWebhookUrl != nil { - data.Set("PreWebhookUrl", *params.PreWebhookUrl) - } - if params != nil && params.ReachabilityEnabled != nil { - data.Set("ReachabilityEnabled", fmt.Sprint(*params.ReachabilityEnabled)) - } - if params != nil && params.ReadStatusEnabled != nil { - data.Set("ReadStatusEnabled", fmt.Sprint(*params.ReadStatusEnabled)) - } - if params != nil && params.TypingIndicatorTimeout != nil { - data.Set("TypingIndicatorTimeout", fmt.Sprint(*params.TypingIndicatorTimeout)) - } - if params != nil && params.WebhookFilters != nil { - data.Set("WebhookFilters", strings.Join(*params.WebhookFilters, ",")) - } - if params != nil && params.WebhookMethod != nil { - data.Set("WebhookMethod", *params.WebhookMethod) - } - if params != nil && params.WebhooksOnChannelAddMethod != nil { - data.Set("WebhooksOnChannelAddMethod", *params.WebhooksOnChannelAddMethod) - } - if params != nil && params.WebhooksOnChannelAddUrl != nil { - data.Set("WebhooksOnChannelAddUrl", *params.WebhooksOnChannelAddUrl) - } - if params != nil && params.WebhooksOnChannelAddedMethod != nil { - data.Set("WebhooksOnChannelAddedMethod", *params.WebhooksOnChannelAddedMethod) - } - if params != nil && params.WebhooksOnChannelAddedUrl != nil { - data.Set("WebhooksOnChannelAddedUrl", *params.WebhooksOnChannelAddedUrl) - } - if params != nil && params.WebhooksOnChannelDestroyMethod != nil { - data.Set("WebhooksOnChannelDestroyMethod", *params.WebhooksOnChannelDestroyMethod) - } - if params != nil && params.WebhooksOnChannelDestroyUrl != nil { - data.Set("WebhooksOnChannelDestroyUrl", *params.WebhooksOnChannelDestroyUrl) - } - if params != nil && params.WebhooksOnChannelDestroyedMethod != nil { - data.Set("WebhooksOnChannelDestroyedMethod", *params.WebhooksOnChannelDestroyedMethod) - } - if params != nil && params.WebhooksOnChannelDestroyedUrl != nil { - data.Set("WebhooksOnChannelDestroyedUrl", *params.WebhooksOnChannelDestroyedUrl) - } - if params != nil && params.WebhooksOnChannelUpdateMethod != nil { - data.Set("WebhooksOnChannelUpdateMethod", *params.WebhooksOnChannelUpdateMethod) - } - if params != nil && params.WebhooksOnChannelUpdateUrl != nil { - data.Set("WebhooksOnChannelUpdateUrl", *params.WebhooksOnChannelUpdateUrl) - } - if params != nil && params.WebhooksOnChannelUpdatedMethod != nil { - data.Set("WebhooksOnChannelUpdatedMethod", *params.WebhooksOnChannelUpdatedMethod) - } - if params != nil && params.WebhooksOnChannelUpdatedUrl != nil { - data.Set("WebhooksOnChannelUpdatedUrl", *params.WebhooksOnChannelUpdatedUrl) - } - if params != nil && params.WebhooksOnMemberAddMethod != nil { - data.Set("WebhooksOnMemberAddMethod", *params.WebhooksOnMemberAddMethod) - } - if params != nil && params.WebhooksOnMemberAddUrl != nil { - data.Set("WebhooksOnMemberAddUrl", *params.WebhooksOnMemberAddUrl) - } - if params != nil && params.WebhooksOnMemberAddedMethod != nil { - data.Set("WebhooksOnMemberAddedMethod", *params.WebhooksOnMemberAddedMethod) - } - if params != nil && params.WebhooksOnMemberAddedUrl != nil { - data.Set("WebhooksOnMemberAddedUrl", *params.WebhooksOnMemberAddedUrl) - } - if params != nil && params.WebhooksOnMemberRemoveMethod != nil { - data.Set("WebhooksOnMemberRemoveMethod", *params.WebhooksOnMemberRemoveMethod) - } - if params != nil && params.WebhooksOnMemberRemoveUrl != nil { - data.Set("WebhooksOnMemberRemoveUrl", *params.WebhooksOnMemberRemoveUrl) - } - if params != nil && params.WebhooksOnMemberRemovedMethod != nil { - data.Set("WebhooksOnMemberRemovedMethod", *params.WebhooksOnMemberRemovedMethod) - } - if params != nil && params.WebhooksOnMemberRemovedUrl != nil { - data.Set("WebhooksOnMemberRemovedUrl", *params.WebhooksOnMemberRemovedUrl) - } - if params != nil && params.WebhooksOnMessageRemoveMethod != nil { - data.Set("WebhooksOnMessageRemoveMethod", *params.WebhooksOnMessageRemoveMethod) - } - if params != nil && params.WebhooksOnMessageRemoveUrl != nil { - data.Set("WebhooksOnMessageRemoveUrl", *params.WebhooksOnMessageRemoveUrl) - } - if params != nil && params.WebhooksOnMessageRemovedMethod != nil { - data.Set("WebhooksOnMessageRemovedMethod", *params.WebhooksOnMessageRemovedMethod) - } - if params != nil && params.WebhooksOnMessageRemovedUrl != nil { - data.Set("WebhooksOnMessageRemovedUrl", *params.WebhooksOnMessageRemovedUrl) - } - if params != nil && params.WebhooksOnMessageSendMethod != nil { - data.Set("WebhooksOnMessageSendMethod", *params.WebhooksOnMessageSendMethod) - } - if params != nil && params.WebhooksOnMessageSendUrl != nil { - data.Set("WebhooksOnMessageSendUrl", *params.WebhooksOnMessageSendUrl) - } - if params != nil && params.WebhooksOnMessageSentMethod != nil { - data.Set("WebhooksOnMessageSentMethod", *params.WebhooksOnMessageSentMethod) - } - if params != nil && params.WebhooksOnMessageSentUrl != nil { - data.Set("WebhooksOnMessageSentUrl", *params.WebhooksOnMessageSentUrl) - } - if params != nil && params.WebhooksOnMessageUpdateMethod != nil { - data.Set("WebhooksOnMessageUpdateMethod", *params.WebhooksOnMessageUpdateMethod) - } - if params != nil && params.WebhooksOnMessageUpdateUrl != nil { - data.Set("WebhooksOnMessageUpdateUrl", *params.WebhooksOnMessageUpdateUrl) - } - if params != nil && params.WebhooksOnMessageUpdatedMethod != nil { - data.Set("WebhooksOnMessageUpdatedMethod", *params.WebhooksOnMessageUpdatedMethod) - } - if params != nil && params.WebhooksOnMessageUpdatedUrl != nil { - data.Set("WebhooksOnMessageUpdatedUrl", *params.WebhooksOnMessageUpdatedUrl) - } + if params != nil && params.ConsumptionReportInterval != nil { + data.Set("ConsumptionReportInterval", fmt.Sprint(*params.ConsumptionReportInterval)) +} + if params != nil && params.DefaultChannelCreatorRoleSid != nil { + data.Set("DefaultChannelCreatorRoleSid", *params.DefaultChannelCreatorRoleSid) +} + if params != nil && params.DefaultChannelRoleSid != nil { + data.Set("DefaultChannelRoleSid", *params.DefaultChannelRoleSid) +} + if params != nil && params.DefaultServiceRoleSid != nil { + data.Set("DefaultServiceRoleSid", *params.DefaultServiceRoleSid) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.LimitsChannelMembers != nil { + data.Set("LimitsChannelMembers", fmt.Sprint(*params.LimitsChannelMembers)) +} + if params != nil && params.LimitsUserChannels != nil { + data.Set("LimitsUserChannels", fmt.Sprint(*params.LimitsUserChannels)) +} + if params != nil && params.NotificationsAddedToChannelEnabled != nil { + data.Set("NotificationsAddedToChannelEnabled", fmt.Sprint(*params.NotificationsAddedToChannelEnabled)) +} + if params != nil && params.NotificationsAddedToChannelTemplate != nil { + data.Set("NotificationsAddedToChannelTemplate", *params.NotificationsAddedToChannelTemplate) +} + if params != nil && params.NotificationsInvitedToChannelEnabled != nil { + data.Set("NotificationsInvitedToChannelEnabled", fmt.Sprint(*params.NotificationsInvitedToChannelEnabled)) +} + if params != nil && params.NotificationsInvitedToChannelTemplate != nil { + data.Set("NotificationsInvitedToChannelTemplate", *params.NotificationsInvitedToChannelTemplate) +} + if params != nil && params.NotificationsNewMessageEnabled != nil { + data.Set("NotificationsNewMessageEnabled", fmt.Sprint(*params.NotificationsNewMessageEnabled)) +} + if params != nil && params.NotificationsNewMessageTemplate != nil { + data.Set("NotificationsNewMessageTemplate", *params.NotificationsNewMessageTemplate) +} + if params != nil && params.NotificationsRemovedFromChannelEnabled != nil { + data.Set("NotificationsRemovedFromChannelEnabled", fmt.Sprint(*params.NotificationsRemovedFromChannelEnabled)) +} + if params != nil && params.NotificationsRemovedFromChannelTemplate != nil { + data.Set("NotificationsRemovedFromChannelTemplate", *params.NotificationsRemovedFromChannelTemplate) +} + if params != nil && params.PostWebhookUrl != nil { + data.Set("PostWebhookUrl", *params.PostWebhookUrl) +} + if params != nil && params.PreWebhookUrl != nil { + data.Set("PreWebhookUrl", *params.PreWebhookUrl) +} + if params != nil && params.ReachabilityEnabled != nil { + data.Set("ReachabilityEnabled", fmt.Sprint(*params.ReachabilityEnabled)) +} + if params != nil && params.ReadStatusEnabled != nil { + data.Set("ReadStatusEnabled", fmt.Sprint(*params.ReadStatusEnabled)) +} + if params != nil && params.TypingIndicatorTimeout != nil { + data.Set("TypingIndicatorTimeout", fmt.Sprint(*params.TypingIndicatorTimeout)) +} + if params != nil && params.WebhookFilters != nil { + data.Set("WebhookFilters", strings.Join(*params.WebhookFilters, ",")) +} + if params != nil && params.WebhookMethod != nil { + data.Set("WebhookMethod", *params.WebhookMethod) +} + if params != nil && params.WebhooksOnChannelAddMethod != nil { + data.Set("WebhooksOnChannelAddMethod", *params.WebhooksOnChannelAddMethod) +} + if params != nil && params.WebhooksOnChannelAddUrl != nil { + data.Set("WebhooksOnChannelAddUrl", *params.WebhooksOnChannelAddUrl) +} + if params != nil && params.WebhooksOnChannelAddedMethod != nil { + data.Set("WebhooksOnChannelAddedMethod", *params.WebhooksOnChannelAddedMethod) +} + if params != nil && params.WebhooksOnChannelAddedUrl != nil { + data.Set("WebhooksOnChannelAddedUrl", *params.WebhooksOnChannelAddedUrl) +} + if params != nil && params.WebhooksOnChannelDestroyMethod != nil { + data.Set("WebhooksOnChannelDestroyMethod", *params.WebhooksOnChannelDestroyMethod) +} + if params != nil && params.WebhooksOnChannelDestroyUrl != nil { + data.Set("WebhooksOnChannelDestroyUrl", *params.WebhooksOnChannelDestroyUrl) +} + if params != nil && params.WebhooksOnChannelDestroyedMethod != nil { + data.Set("WebhooksOnChannelDestroyedMethod", *params.WebhooksOnChannelDestroyedMethod) +} + if params != nil && params.WebhooksOnChannelDestroyedUrl != nil { + data.Set("WebhooksOnChannelDestroyedUrl", *params.WebhooksOnChannelDestroyedUrl) +} + if params != nil && params.WebhooksOnChannelUpdateMethod != nil { + data.Set("WebhooksOnChannelUpdateMethod", *params.WebhooksOnChannelUpdateMethod) +} + if params != nil && params.WebhooksOnChannelUpdateUrl != nil { + data.Set("WebhooksOnChannelUpdateUrl", *params.WebhooksOnChannelUpdateUrl) +} + if params != nil && params.WebhooksOnChannelUpdatedMethod != nil { + data.Set("WebhooksOnChannelUpdatedMethod", *params.WebhooksOnChannelUpdatedMethod) +} + if params != nil && params.WebhooksOnChannelUpdatedUrl != nil { + data.Set("WebhooksOnChannelUpdatedUrl", *params.WebhooksOnChannelUpdatedUrl) +} + if params != nil && params.WebhooksOnMemberAddMethod != nil { + data.Set("WebhooksOnMemberAddMethod", *params.WebhooksOnMemberAddMethod) +} + if params != nil && params.WebhooksOnMemberAddUrl != nil { + data.Set("WebhooksOnMemberAddUrl", *params.WebhooksOnMemberAddUrl) +} + if params != nil && params.WebhooksOnMemberAddedMethod != nil { + data.Set("WebhooksOnMemberAddedMethod", *params.WebhooksOnMemberAddedMethod) +} + if params != nil && params.WebhooksOnMemberAddedUrl != nil { + data.Set("WebhooksOnMemberAddedUrl", *params.WebhooksOnMemberAddedUrl) +} + if params != nil && params.WebhooksOnMemberRemoveMethod != nil { + data.Set("WebhooksOnMemberRemoveMethod", *params.WebhooksOnMemberRemoveMethod) +} + if params != nil && params.WebhooksOnMemberRemoveUrl != nil { + data.Set("WebhooksOnMemberRemoveUrl", *params.WebhooksOnMemberRemoveUrl) +} + if params != nil && params.WebhooksOnMemberRemovedMethod != nil { + data.Set("WebhooksOnMemberRemovedMethod", *params.WebhooksOnMemberRemovedMethod) +} + if params != nil && params.WebhooksOnMemberRemovedUrl != nil { + data.Set("WebhooksOnMemberRemovedUrl", *params.WebhooksOnMemberRemovedUrl) +} + if params != nil && params.WebhooksOnMessageRemoveMethod != nil { + data.Set("WebhooksOnMessageRemoveMethod", *params.WebhooksOnMessageRemoveMethod) +} + if params != nil && params.WebhooksOnMessageRemoveUrl != nil { + data.Set("WebhooksOnMessageRemoveUrl", *params.WebhooksOnMessageRemoveUrl) +} + if params != nil && params.WebhooksOnMessageRemovedMethod != nil { + data.Set("WebhooksOnMessageRemovedMethod", *params.WebhooksOnMessageRemovedMethod) +} + if params != nil && params.WebhooksOnMessageRemovedUrl != nil { + data.Set("WebhooksOnMessageRemovedUrl", *params.WebhooksOnMessageRemovedUrl) +} + if params != nil && params.WebhooksOnMessageSendMethod != nil { + data.Set("WebhooksOnMessageSendMethod", *params.WebhooksOnMessageSendMethod) +} + if params != nil && params.WebhooksOnMessageSendUrl != nil { + data.Set("WebhooksOnMessageSendUrl", *params.WebhooksOnMessageSendUrl) +} + if params != nil && params.WebhooksOnMessageSentMethod != nil { + data.Set("WebhooksOnMessageSentMethod", *params.WebhooksOnMessageSentMethod) +} + if params != nil && params.WebhooksOnMessageSentUrl != nil { + data.Set("WebhooksOnMessageSentUrl", *params.WebhooksOnMessageSentUrl) +} + if params != nil && params.WebhooksOnMessageUpdateMethod != nil { + data.Set("WebhooksOnMessageUpdateMethod", *params.WebhooksOnMessageUpdateMethod) +} + if params != nil && params.WebhooksOnMessageUpdateUrl != nil { + data.Set("WebhooksOnMessageUpdateUrl", *params.WebhooksOnMessageUpdateUrl) +} + if params != nil && params.WebhooksOnMessageUpdatedMethod != nil { + data.Set("WebhooksOnMessageUpdatedMethod", *params.WebhooksOnMessageUpdatedMethod) +} + if params != nil && params.WebhooksOnMessageUpdatedUrl != nil { + data.Set("WebhooksOnMessageUpdatedUrl", *params.WebhooksOnMessageUpdatedUrl) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ChatV1Service{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ChatV1Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateUserParams Optional parameters for the method 'UpdateUser' type UpdateUserParams struct { - Attributes *string `json:"Attributes,omitempty"` + Attributes *string `json:"Attributes,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` } /* @@ -1781,36 +1813,37 @@ type UpdateUserParams struct { * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It is often used for display purposes. * @param "RoleSid" (string) - The SID of the [Role](https://www.twilio.com/docs/api/chat/rest/roles) assigned to this user. * @return ChatV1ServiceUser - */ +*/ func (c *DefaultApiService) UpdateUser(ServiceSid string, Sid string, params *UpdateUserParams) (*ChatV1ServiceUser, error) { - path := "/v1/Services/{ServiceSid}/Users/{Sid}" + path := "/v1/Services/{ServiceSid}/Users/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.RoleSid != nil { - data.Set("RoleSid", *params.RoleSid) - } + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ChatV1ServiceUser{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() + + ps := &ChatV1ServiceUser{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } diff --git a/twilio/rest/chat/v1/model_chat_v1_credential.go b/twilio/rest/chat/v1/model_chat_v1_credential.go index d2eef1cb7..67ddfb71b 100644 --- a/twilio/rest/chat/v1/model_chat_v1_credential.go +++ b/twilio/rest/chat/v1/model_chat_v1_credential.go @@ -1,20 +1,18 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // ChatV1Credential struct for ChatV1Credential type ChatV1Credential struct { // The SID of the Account that created the resource diff --git a/twilio/rest/chat/v1/model_chat_v1_service.go b/twilio/rest/chat/v1/model_chat_v1_service.go index 2bbab2418..842496757 100644 --- a/twilio/rest/chat/v1/model_chat_v1_service.go +++ b/twilio/rest/chat/v1/model_chat_v1_service.go @@ -1,20 +1,18 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // ChatV1Service struct for ChatV1Service type ChatV1Service struct { // The SID of the Account that created the resource diff --git a/twilio/rest/chat/v1/model_chat_v1_service_channel.go b/twilio/rest/chat/v1/model_chat_v1_service_channel.go index a0fb9a88e..91c12714f 100644 --- a/twilio/rest/chat/v1/model_chat_v1_service_channel.go +++ b/twilio/rest/chat/v1/model_chat_v1_service_channel.go @@ -1,20 +1,18 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // ChatV1ServiceChannel struct for ChatV1ServiceChannel type ChatV1ServiceChannel struct { // The SID of the Account that created the resource diff --git a/twilio/rest/chat/v1/model_chat_v1_service_channel_invite.go b/twilio/rest/chat/v1/model_chat_v1_service_channel_invite.go index 5bd0f3566..ccc19b712 100644 --- a/twilio/rest/chat/v1/model_chat_v1_service_channel_invite.go +++ b/twilio/rest/chat/v1/model_chat_v1_service_channel_invite.go @@ -1,20 +1,18 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // ChatV1ServiceChannelInvite struct for ChatV1ServiceChannelInvite type ChatV1ServiceChannelInvite struct { // The SID of the Account that created the resource diff --git a/twilio/rest/chat/v1/model_chat_v1_service_channel_member.go b/twilio/rest/chat/v1/model_chat_v1_service_channel_member.go index 0d0b52df4..fef81475b 100644 --- a/twilio/rest/chat/v1/model_chat_v1_service_channel_member.go +++ b/twilio/rest/chat/v1/model_chat_v1_service_channel_member.go @@ -1,20 +1,18 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // ChatV1ServiceChannelMember struct for ChatV1ServiceChannelMember type ChatV1ServiceChannelMember struct { // The SID of the Account that created the resource diff --git a/twilio/rest/chat/v1/model_chat_v1_service_channel_message.go b/twilio/rest/chat/v1/model_chat_v1_service_channel_message.go index 9a5a7ea4e..2849136bd 100644 --- a/twilio/rest/chat/v1/model_chat_v1_service_channel_message.go +++ b/twilio/rest/chat/v1/model_chat_v1_service_channel_message.go @@ -1,20 +1,18 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // ChatV1ServiceChannelMessage struct for ChatV1ServiceChannelMessage type ChatV1ServiceChannelMessage struct { // The SID of the Account that created the resource diff --git a/twilio/rest/chat/v1/model_chat_v1_service_role.go b/twilio/rest/chat/v1/model_chat_v1_service_role.go index 4a97996c9..e7fce11c7 100644 --- a/twilio/rest/chat/v1/model_chat_v1_service_role.go +++ b/twilio/rest/chat/v1/model_chat_v1_service_role.go @@ -1,20 +1,18 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // ChatV1ServiceRole struct for ChatV1ServiceRole type ChatV1ServiceRole struct { // The SID of the Account that created the resource diff --git a/twilio/rest/chat/v1/model_chat_v1_service_user.go b/twilio/rest/chat/v1/model_chat_v1_service_user.go index ff6906c19..0112dc6f2 100644 --- a/twilio/rest/chat/v1/model_chat_v1_service_user.go +++ b/twilio/rest/chat/v1/model_chat_v1_service_user.go @@ -1,20 +1,18 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // ChatV1ServiceUser struct for ChatV1ServiceUser type ChatV1ServiceUser struct { // The SID of the Account that created the resource diff --git a/twilio/rest/chat/v1/model_chat_v1_service_user_user_channel.go b/twilio/rest/chat/v1/model_chat_v1_service_user_user_channel.go index 3a9904cfe..fbf8babf3 100644 --- a/twilio/rest/chat/v1/model_chat_v1_service_user_user_channel.go +++ b/twilio/rest/chat/v1/model_chat_v1_service_user_user_channel.go @@ -1,16 +1,15 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ChatV1ServiceUserUserChannel struct for ChatV1ServiceUserUserChannel type ChatV1ServiceUserUserChannel struct { // The SID of the Account that created the resource diff --git a/twilio/rest/chat/v1/model_list_channel_response.go b/twilio/rest/chat/v1/model_list_channel_response.go index 6141f0f64..6f1fda941 100644 --- a/twilio/rest/chat/v1/model_list_channel_response.go +++ b/twilio/rest/chat/v1/model_list_channel_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListChannelResponse struct for ListChannelResponse type ListChannelResponse struct { - Channels []ChatV1ServiceChannel `json:"Channels,omitempty"` - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Channels []ChatV1ServiceChannel `json:"Channels,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/chat/v1/model_list_credential_response.go b/twilio/rest/chat/v1/model_list_credential_response.go index 1ac6c7b68..736720c94 100644 --- a/twilio/rest/chat/v1/model_list_credential_response.go +++ b/twilio/rest/chat/v1/model_list_credential_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListCredentialResponse struct for ListCredentialResponse type ListCredentialResponse struct { - Credentials []ChatV1Credential `json:"Credentials,omitempty"` - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Credentials []ChatV1Credential `json:"Credentials,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/chat/v1/model_list_credential_response_meta.go b/twilio/rest/chat/v1/model_list_credential_response_meta.go index 76cc60bd1..3396dd7da 100644 --- a/twilio/rest/chat/v1/model_list_credential_response_meta.go +++ b/twilio/rest/chat/v1/model_list_credential_response_meta.go @@ -1,23 +1,22 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListCredentialResponseMeta struct for ListCredentialResponseMeta type ListCredentialResponseMeta struct { - FirstPageUrl string `json:"FirstPageUrl,omitempty"` - Key string `json:"Key,omitempty"` - NextPageUrl string `json:"NextPageUrl,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` - Url string `json:"Url,omitempty"` + Url string `json:"Url,omitempty"` } diff --git a/twilio/rest/chat/v1/model_list_invite_response.go b/twilio/rest/chat/v1/model_list_invite_response.go index 88110c028..0be7c6192 100644 --- a/twilio/rest/chat/v1/model_list_invite_response.go +++ b/twilio/rest/chat/v1/model_list_invite_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListInviteResponse struct for ListInviteResponse type ListInviteResponse struct { Invites []ChatV1ServiceChannelInvite `json:"Invites,omitempty"` - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/chat/v1/model_list_member_response.go b/twilio/rest/chat/v1/model_list_member_response.go index f1650c354..4d1ca03d2 100644 --- a/twilio/rest/chat/v1/model_list_member_response.go +++ b/twilio/rest/chat/v1/model_list_member_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListMemberResponse struct for ListMemberResponse type ListMemberResponse struct { Members []ChatV1ServiceChannelMember `json:"Members,omitempty"` - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/chat/v1/model_list_message_response.go b/twilio/rest/chat/v1/model_list_message_response.go index 11cc9c150..9b94039ac 100644 --- a/twilio/rest/chat/v1/model_list_message_response.go +++ b/twilio/rest/chat/v1/model_list_message_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListMessageResponse struct for ListMessageResponse type ListMessageResponse struct { Messages []ChatV1ServiceChannelMessage `json:"Messages,omitempty"` - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/chat/v1/model_list_role_response.go b/twilio/rest/chat/v1/model_list_role_response.go index ba3891756..78dd0b96a 100644 --- a/twilio/rest/chat/v1/model_list_role_response.go +++ b/twilio/rest/chat/v1/model_list_role_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListRoleResponse struct for ListRoleResponse type ListRoleResponse struct { - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` - Roles []ChatV1ServiceRole `json:"Roles,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Roles []ChatV1ServiceRole `json:"Roles,omitempty"` } diff --git a/twilio/rest/chat/v1/model_list_service_response.go b/twilio/rest/chat/v1/model_list_service_response.go index 72ac3f50f..f97dd040f 100644 --- a/twilio/rest/chat/v1/model_list_service_response.go +++ b/twilio/rest/chat/v1/model_list_service_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListServiceResponse struct for ListServiceResponse type ListServiceResponse struct { - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` - Services []ChatV1Service `json:"Services,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Services []ChatV1Service `json:"Services,omitempty"` } diff --git a/twilio/rest/chat/v1/model_list_user_channel_response.go b/twilio/rest/chat/v1/model_list_user_channel_response.go index c0543f724..c3acff953 100644 --- a/twilio/rest/chat/v1/model_list_user_channel_response.go +++ b/twilio/rest/chat/v1/model_list_user_channel_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListUserChannelResponse struct for ListUserChannelResponse type ListUserChannelResponse struct { Channels []ChatV1ServiceUserUserChannel `json:"Channels,omitempty"` - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/chat/v1/model_list_user_response.go b/twilio/rest/chat/v1/model_list_user_response.go index d47e7cc71..1663fb3b2 100644 --- a/twilio/rest/chat/v1/model_list_user_response.go +++ b/twilio/rest/chat/v1/model_list_user_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListUserResponse struct for ListUserResponse type ListUserResponse struct { - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` - Users []ChatV1ServiceUser `json:"Users,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Users []ChatV1ServiceUser `json:"Users,omitempty"` } diff --git a/twilio/rest/chat/v2/api_default.go b/twilio/rest/chat/v2/api_default.go index 35eeea0dc..2f6264eb7 100644 --- a/twilio/rest/chat/v2/api_default.go +++ b/twilio/rest/chat/v2/api_default.go @@ -1,11 +1,11 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,11 +14,11 @@ package openapi import ( "encoding/json" "fmt" - "net/url" - "strings" - "time" - twilio "github.com/twilio/twilio-go/client" + "net/url" + "strings" + "time" + "reflect" ) type DefaultApiService struct { @@ -27,22 +27,22 @@ type DefaultApiService struct { } func NewDefaultApiService(client *twilio.Client) *DefaultApiService { - return &DefaultApiService{ - client: client, + return &DefaultApiService { + client: client, baseURL: "https://chat.twilio.com", } } // CreateChannelParams Optional parameters for the method 'CreateChannel' type CreateChannelParams struct { - XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - CreatedBy *string `json:"CreatedBy,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Type *string `json:"Type,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + CreatedBy *string `json:"CreatedBy,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Type *string `json:"Type,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` } /* @@ -58,64 +58,63 @@ type CreateChannelParams struct { * @param "Type" (string) - The visibility of the channel. Can be: `public` or `private` and defaults to `public`. * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the Channel resource's `sid` in the URL. This value must be 64 characters or less in length and be unique within the Service. * @return ChatV2ServiceChannel - */ +*/ func (c *DefaultApiService) CreateChannel(ServiceSid string, params *CreateChannelParams) (*ChatV2ServiceChannel, error) { - path := "/v2/Services/{ServiceSid}/Channels" + path := "/v2/Services/{ServiceSid}/Channels" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) - } - if params != nil && params.CreatedBy != nil { - data.Set("CreatedBy", *params.CreatedBy) - } - if params != nil && params.DateCreated != nil { - data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) - } - if params != nil && params.DateUpdated != nil { - data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.Type != nil { - data.Set("Type", *params.Type) - } - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) - } + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) +} + if params != nil && params.CreatedBy != nil { + data.Set("CreatedBy", *params.CreatedBy) +} + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) +} + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.Type != nil { + data.Set("Type", *params.Type) +} + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) +} if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ChatV2ServiceChannel{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ChatV2ServiceChannel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } - // CreateChannelWebhookParams Optional parameters for the method 'CreateChannelWebhook' type CreateChannelWebhookParams struct { - ConfigurationFilters *[]string `json:"Configuration.Filters,omitempty"` - ConfigurationFlowSid *string `json:"Configuration.FlowSid,omitempty"` - ConfigurationMethod *string `json:"Configuration.Method,omitempty"` - ConfigurationRetryCount *int32 `json:"Configuration.RetryCount,omitempty"` - ConfigurationTriggers *[]string `json:"Configuration.Triggers,omitempty"` - ConfigurationUrl *string `json:"Configuration.Url,omitempty"` - Type *string `json:"Type,omitempty"` + ConfigurationFilters *[]string `json:"Configuration.Filters,omitempty"` + ConfigurationFlowSid *string `json:"Configuration.FlowSid,omitempty"` + ConfigurationMethod *string `json:"Configuration.Method,omitempty"` + ConfigurationRetryCount *int32 `json:"Configuration.RetryCount,omitempty"` + ConfigurationTriggers *[]string `json:"Configuration.Triggers,omitempty"` + ConfigurationUrl *string `json:"Configuration.Url,omitempty"` + Type *string `json:"Type,omitempty"` } /* @@ -131,61 +130,61 @@ type CreateChannelWebhookParams struct { * @param "ConfigurationUrl" (string) - The URL of the webhook to call using the `configuration.method`. * @param "Type" (string) - The type of webhook. Can be: `webhook`, `studio`, or `trigger`. * @return ChatV2ServiceChannelChannelWebhook - */ +*/ func (c *DefaultApiService) CreateChannelWebhook(ServiceSid string, ChannelSid string, params *CreateChannelWebhookParams) (*ChatV2ServiceChannelChannelWebhook, error) { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks" + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.ConfigurationFilters != nil { - data.Set("ConfigurationFilters", strings.Join(*params.ConfigurationFilters, ",")) - } - if params != nil && params.ConfigurationFlowSid != nil { - data.Set("ConfigurationFlowSid", *params.ConfigurationFlowSid) - } - if params != nil && params.ConfigurationMethod != nil { - data.Set("ConfigurationMethod", *params.ConfigurationMethod) - } - if params != nil && params.ConfigurationRetryCount != nil { - data.Set("ConfigurationRetryCount", fmt.Sprint(*params.ConfigurationRetryCount)) - } - if params != nil && params.ConfigurationTriggers != nil { - data.Set("ConfigurationTriggers", strings.Join(*params.ConfigurationTriggers, ",")) - } - if params != nil && params.ConfigurationUrl != nil { - data.Set("ConfigurationUrl", *params.ConfigurationUrl) - } - if params != nil && params.Type != nil { - data.Set("Type", *params.Type) - } + if params != nil && params.ConfigurationFilters != nil { + data.Set("ConfigurationFilters", strings.Join(*params.ConfigurationFilters, ",")) +} + if params != nil && params.ConfigurationFlowSid != nil { + data.Set("ConfigurationFlowSid", *params.ConfigurationFlowSid) +} + if params != nil && params.ConfigurationMethod != nil { + data.Set("ConfigurationMethod", *params.ConfigurationMethod) +} + if params != nil && params.ConfigurationRetryCount != nil { + data.Set("ConfigurationRetryCount", fmt.Sprint(*params.ConfigurationRetryCount)) +} + if params != nil && params.ConfigurationTriggers != nil { + data.Set("ConfigurationTriggers", strings.Join(*params.ConfigurationTriggers, ",")) +} + if params != nil && params.ConfigurationUrl != nil { + data.Set("ConfigurationUrl", *params.ConfigurationUrl) +} + if params != nil && params.Type != nil { + data.Set("Type", *params.Type) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ChatV2ServiceChannelChannelWebhook{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ChatV2ServiceChannelChannelWebhook{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateCredentialParams Optional parameters for the method 'CreateCredential' type CreateCredentialParams struct { - ApiKey *string `json:"ApiKey,omitempty"` - Certificate *string `json:"Certificate,omitempty"` + ApiKey *string `json:"ApiKey,omitempty"` + Certificate *string `json:"Certificate,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` - PrivateKey *string `json:"PrivateKey,omitempty"` - Sandbox *bool `json:"Sandbox,omitempty"` - Secret *string `json:"Secret,omitempty"` - Type *string `json:"Type,omitempty"` + PrivateKey *string `json:"PrivateKey,omitempty"` + Sandbox *bool `json:"Sandbox,omitempty"` + Secret *string `json:"Secret,omitempty"` + Type *string `json:"Type,omitempty"` } /* @@ -199,54 +198,54 @@ type CreateCredentialParams struct { * @param "Secret" (string) - [FCM only] The **Server key** of your project from the Firebase console, found under Settings / Cloud messaging. * @param "Type" (string) - The type of push-notification service the credential is for. Can be: `gcm`, `fcm`, or `apn`. * @return ChatV2Credential - */ +*/ func (c *DefaultApiService) CreateCredential(params *CreateCredentialParams) (*ChatV2Credential, error) { - path := "/v2/Credentials" + path := "/v2/Credentials" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.ApiKey != nil { - data.Set("ApiKey", *params.ApiKey) - } - if params != nil && params.Certificate != nil { - data.Set("Certificate", *params.Certificate) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.PrivateKey != nil { - data.Set("PrivateKey", *params.PrivateKey) - } - if params != nil && params.Sandbox != nil { - data.Set("Sandbox", fmt.Sprint(*params.Sandbox)) - } - if params != nil && params.Secret != nil { - data.Set("Secret", *params.Secret) - } - if params != nil && params.Type != nil { - data.Set("Type", *params.Type) - } + if params != nil && params.ApiKey != nil { + data.Set("ApiKey", *params.ApiKey) +} + if params != nil && params.Certificate != nil { + data.Set("Certificate", *params.Certificate) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.PrivateKey != nil { + data.Set("PrivateKey", *params.PrivateKey) +} + if params != nil && params.Sandbox != nil { + data.Set("Sandbox", fmt.Sprint(*params.Sandbox)) +} + if params != nil && params.Secret != nil { + data.Set("Secret", *params.Secret) +} + if params != nil && params.Type != nil { + data.Set("Type", *params.Type) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ChatV2Credential{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ChatV2Credential{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateInviteParams Optional parameters for the method 'CreateInvite' type CreateInviteParams struct { Identity *string `json:"Identity,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` } /* @@ -257,47 +256,47 @@ type CreateInviteParams struct { * @param "Identity" (string) - The `identity` value that uniquely identifies the new resource's [User](https://www.twilio.com/docs/chat/rest/user-resource) within the [Service](https://www.twilio.com/docs/chat/rest/service-resource). See [access tokens](https://www.twilio.com/docs/chat/create-tokens) for more info. * @param "RoleSid" (string) - The SID of the [Role](https://www.twilio.com/docs/chat/rest/role-resource) assigned to the new member. * @return ChatV2ServiceChannelInvite - */ +*/ func (c *DefaultApiService) CreateInvite(ServiceSid string, ChannelSid string, params *CreateInviteParams) (*ChatV2ServiceChannelInvite, error) { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Invites" + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Invites" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Identity != nil { - data.Set("Identity", *params.Identity) - } - if params != nil && params.RoleSid != nil { - data.Set("RoleSid", *params.RoleSid) - } + if params != nil && params.Identity != nil { + data.Set("Identity", *params.Identity) +} + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ChatV2ServiceChannelInvite{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ChatV2ServiceChannelInvite{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateMemberParams Optional parameters for the method 'CreateMember' type CreateMemberParams struct { - XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Identity *string `json:"Identity,omitempty"` - LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + Identity *string `json:"Identity,omitempty"` + LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` LastConsumptionTimestamp *time.Time `json:"LastConsumptionTimestamp,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` } /* @@ -314,66 +313,65 @@ type CreateMemberParams struct { * @param "LastConsumptionTimestamp" (time.Time) - The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) read event for the Member within the [Channel](https://www.twilio.com/docs/chat/channels). * @param "RoleSid" (string) - The SID of the [Role](https://www.twilio.com/docs/chat/rest/role-resource) to assign to the member. The default roles are those specified on the [Service](https://www.twilio.com/docs/chat/rest/service-resource). * @return ChatV2ServiceChannelMember - */ +*/ func (c *DefaultApiService) CreateMember(ServiceSid string, ChannelSid string, params *CreateMemberParams) (*ChatV2ServiceChannelMember, error) { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members" + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) - } - if params != nil && params.DateCreated != nil { - data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) - } - if params != nil && params.DateUpdated != nil { - data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) - } - if params != nil && params.Identity != nil { - data.Set("Identity", *params.Identity) - } - if params != nil && params.LastConsumedMessageIndex != nil { - data.Set("LastConsumedMessageIndex", fmt.Sprint(*params.LastConsumedMessageIndex)) - } - if params != nil && params.LastConsumptionTimestamp != nil { - data.Set("LastConsumptionTimestamp", fmt.Sprint(*params.LastConsumptionTimestamp)) - } - if params != nil && params.RoleSid != nil { - data.Set("RoleSid", *params.RoleSid) - } + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) +} + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) +} + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) +} + if params != nil && params.Identity != nil { + data.Set("Identity", *params.Identity) +} + if params != nil && params.LastConsumedMessageIndex != nil { + data.Set("LastConsumedMessageIndex", fmt.Sprint(*params.LastConsumedMessageIndex)) +} + if params != nil && params.LastConsumptionTimestamp != nil { + data.Set("LastConsumptionTimestamp", fmt.Sprint(*params.LastConsumptionTimestamp)) +} + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) +} if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ChatV2ServiceChannelMember{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ChatV2ServiceChannelMember{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } - // CreateMessageParams Optional parameters for the method 'CreateMessage' type CreateMessageParams struct { - XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - Body *string `json:"Body,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - From *string `json:"From,omitempty"` - LastUpdatedBy *string `json:"LastUpdatedBy,omitempty"` - MediaSid *string `json:"MediaSid,omitempty"` + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + Body *string `json:"Body,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + From *string `json:"From,omitempty"` + LastUpdatedBy *string `json:"LastUpdatedBy,omitempty"` + MediaSid *string `json:"MediaSid,omitempty"` } /* @@ -390,61 +388,60 @@ type CreateMessageParams struct { * @param "LastUpdatedBy" (string) - The [Identity](https://www.twilio.com/docs/chat/identity) of the User who last updated the Message, if applicable. * @param "MediaSid" (string) - The SID of the [Media](https://www.twilio.com/docs/chat/rest/media) to attach to the new Message. * @return ChatV2ServiceChannelMessage - */ +*/ func (c *DefaultApiService) CreateMessage(ServiceSid string, ChannelSid string, params *CreateMessageParams) (*ChatV2ServiceChannelMessage, error) { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages" + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) - } - if params != nil && params.Body != nil { - data.Set("Body", *params.Body) - } - if params != nil && params.DateCreated != nil { - data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) - } - if params != nil && params.DateUpdated != nil { - data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) - } - if params != nil && params.From != nil { - data.Set("From", *params.From) - } - if params != nil && params.LastUpdatedBy != nil { - data.Set("LastUpdatedBy", *params.LastUpdatedBy) - } - if params != nil && params.MediaSid != nil { - data.Set("MediaSid", *params.MediaSid) - } + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) +} + if params != nil && params.Body != nil { + data.Set("Body", *params.Body) +} + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) +} + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) +} + if params != nil && params.From != nil { + data.Set("From", *params.From) +} + if params != nil && params.LastUpdatedBy != nil { + data.Set("LastUpdatedBy", *params.LastUpdatedBy) +} + if params != nil && params.MediaSid != nil { + data.Set("MediaSid", *params.MediaSid) +} if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ChatV2ServiceChannelMessage{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ChatV2ServiceChannelMessage{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } - // CreateRoleParams Optional parameters for the method 'CreateRole' type CreateRoleParams struct { - FriendlyName *string `json:"FriendlyName,omitempty"` - Permission *[]string `json:"Permission,omitempty"` - Type *string `json:"Type,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Permission *[]string `json:"Permission,omitempty"` + Type *string `json:"Type,omitempty"` } /* @@ -455,39 +452,39 @@ type CreateRoleParams struct { * @param "Permission" ([]string) - A permission that you grant to the new role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. The values for this parameter depend on the role's `type`. * @param "Type" (string) - The type of role. Can be: `channel` for [Channel](https://www.twilio.com/docs/chat/channels) roles or `deployment` for [Service](https://www.twilio.com/docs/chat/rest/service-resource) roles. * @return ChatV2ServiceRole - */ +*/ func (c *DefaultApiService) CreateRole(ServiceSid string, params *CreateRoleParams) (*ChatV2ServiceRole, error) { - path := "/v2/Services/{ServiceSid}/Roles" + path := "/v2/Services/{ServiceSid}/Roles" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.Permission != nil { - data.Set("Permission", strings.Join(*params.Permission, ",")) - } - if params != nil && params.Type != nil { - data.Set("Type", *params.Type) - } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.Permission != nil { + data.Set("Permission", strings.Join(*params.Permission, ",")) +} + if params != nil && params.Type != nil { + data.Set("Type", *params.Type) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ChatV2ServiceRole{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ChatV2ServiceRole{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateServiceParams Optional parameters for the method 'CreateService' type CreateServiceParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` @@ -498,39 +495,39 @@ type CreateServiceParams struct { * @param optional nil or *CreateServiceParams - Optional Parameters: * @param "FriendlyName" (string) - A descriptive string that you create to describe the new resource. * @return ChatV2Service - */ +*/ func (c *DefaultApiService) CreateService(params *CreateServiceParams) (*ChatV2Service, error) { - path := "/v2/Services" + path := "/v2/Services" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ChatV2Service{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ChatV2Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateUserParams Optional parameters for the method 'CreateUser' type CreateUserParams struct { XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Identity *string `json:"Identity,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Identity *string `json:"Identity,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` } /* @@ -543,69 +540,70 @@ type CreateUserParams struct { * @param "Identity" (string) - The `identity` value that uniquely identifies the new resource's [User](https://www.twilio.com/docs/chat/rest/user-resource) within the [Service](https://www.twilio.com/docs/chat/rest/service-resource). This value is often a username or email address. See the Identity documentation for more info. * @param "RoleSid" (string) - The SID of the [Role](https://www.twilio.com/docs/chat/rest/role-resource) to assign to the new User. * @return ChatV2ServiceUser - */ +*/ func (c *DefaultApiService) CreateUser(ServiceSid string, params *CreateUserParams) (*ChatV2ServiceUser, error) { - path := "/v2/Services/{ServiceSid}/Users" + path := "/v2/Services/{ServiceSid}/Users" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.Identity != nil { - data.Set("Identity", *params.Identity) - } - if params != nil && params.RoleSid != nil { - data.Set("RoleSid", *params.RoleSid) - } + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.Identity != nil { + data.Set("Identity", *params.Identity) +} + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) +} if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ChatV2ServiceUser{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ChatV2ServiceUser{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * DeleteBinding Method for DeleteBinding * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to delete the Binding resource from. * @param Sid The SID of the Binding resource to delete. - */ -func (c *DefaultApiService) DeleteBinding(ServiceSid string, Sid string) error { - path := "/v2/Services/{ServiceSid}/Bindings/{Sid}" +*/ +func (c *DefaultApiService) DeleteBinding(ServiceSid string, Sid string, ) (error) { + path := "/v2/Services/{ServiceSid}/Bindings/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil -} + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + defer resp.Body.Close() + + return nil +} // DeleteChannelParams Optional parameters for the method 'DeleteChannel' type DeleteChannelParams struct { XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` @@ -617,27 +615,28 @@ type DeleteChannelParams struct { * @param Sid The SID of the Channel resource to delete. This value can be either the `sid` or the `unique_name` of the Channel resource to delete. * @param optional nil or *DeleteChannelParams - Optional Parameters: * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header - */ -func (c *DefaultApiService) DeleteChannel(ServiceSid string, Sid string, params *DeleteChannelParams) error { - path := "/v2/Services/{ServiceSid}/Channels/{Sid}" +*/ +func (c *DefaultApiService) DeleteChannel(ServiceSid string, Sid string, params *DeleteChannelParams) (error) { + path := "/v2/Services/{ServiceSid}/Channels/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) + if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -645,45 +644,49 @@ func (c *DefaultApiService) DeleteChannel(ServiceSid string, Sid string, params * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) with the Channel to delete the Webhook resource from. * @param ChannelSid The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Channel Webhook resource to delete belongs to. This value can be the Channel resource's `sid` or `unique_name`. * @param Sid The SID of the Channel Webhook resource to delete. - */ -func (c *DefaultApiService) DeleteChannelWebhook(ServiceSid string, ChannelSid string, Sid string) error { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks/{Sid}" +*/ +func (c *DefaultApiService) DeleteChannelWebhook(ServiceSid string, ChannelSid string, Sid string, ) (error) { + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - return nil + defer resp.Body.Close() + + return nil } /* * DeleteCredential Method for DeleteCredential * @param Sid The SID of the Credential resource to delete. - */ -func (c *DefaultApiService) DeleteCredential(Sid string) error { - path := "/v2/Credentials/{Sid}" +*/ +func (c *DefaultApiService) DeleteCredential(Sid string, ) (error) { + path := "/v2/Credentials/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* @@ -691,26 +694,27 @@ func (c *DefaultApiService) DeleteCredential(Sid string) error { * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to delete the Invite resource from. * @param ChannelSid The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Invite resource to delete belongs to. This value can be the Channel resource's `sid` or `unique_name`. * @param Sid The SID of the Invite resource to delete. - */ -func (c *DefaultApiService) DeleteInvite(ServiceSid string, ChannelSid string, Sid string) error { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Invites/{Sid}" +*/ +func (c *DefaultApiService) DeleteInvite(ServiceSid string, ChannelSid string, Sid string, ) (error) { + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Invites/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil -} + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + defer resp.Body.Close() + + return nil +} // DeleteMemberParams Optional parameters for the method 'DeleteMember' type DeleteMemberParams struct { XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` @@ -723,30 +727,30 @@ type DeleteMemberParams struct { * @param Sid The SID of the Member resource to delete. This value can be either the Member's `sid` or its `identity` value. * @param optional nil or *DeleteMemberParams - Optional Parameters: * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header - */ -func (c *DefaultApiService) DeleteMember(ServiceSid string, ChannelSid string, Sid string, params *DeleteMemberParams) error { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}" +*/ +func (c *DefaultApiService) DeleteMember(ServiceSid string, ChannelSid string, Sid string, params *DeleteMemberParams) (error) { + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) + if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } - // DeleteMessageParams Optional parameters for the method 'DeleteMessage' type DeleteMessageParams struct { XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` @@ -759,95 +763,102 @@ type DeleteMessageParams struct { * @param Sid The SID of the Message resource to delete. * @param optional nil or *DeleteMessageParams - Optional Parameters: * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header - */ -func (c *DefaultApiService) DeleteMessage(ServiceSid string, ChannelSid string, Sid string, params *DeleteMessageParams) error { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}" +*/ +func (c *DefaultApiService) DeleteMessage(ServiceSid string, ChannelSid string, Sid string, params *DeleteMessageParams) (error) { + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) + if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* * DeleteRole Method for DeleteRole * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to delete the Role resource from. * @param Sid The SID of the Role resource to delete. - */ -func (c *DefaultApiService) DeleteRole(ServiceSid string, Sid string) error { - path := "/v2/Services/{ServiceSid}/Roles/{Sid}" +*/ +func (c *DefaultApiService) DeleteRole(ServiceSid string, Sid string, ) (error) { + path := "/v2/Services/{ServiceSid}/Roles/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - return nil + defer resp.Body.Close() + + return nil } /* * DeleteService Method for DeleteService * @param Sid The SID of the Service resource to delete. - */ -func (c *DefaultApiService) DeleteService(Sid string) error { - path := "/v2/Services/{Sid}" +*/ +func (c *DefaultApiService) DeleteService(Sid string, ) (error) { + path := "/v2/Services/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* * DeleteUser Method for DeleteUser * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to delete the User resource from. * @param Sid The SID of the User resource to delete. This value can be either the `sid` or the `identity` of the User resource to delete. - */ -func (c *DefaultApiService) DeleteUser(ServiceSid string, Sid string) error { - path := "/v2/Services/{ServiceSid}/Users/{Sid}" +*/ +func (c *DefaultApiService) DeleteUser(ServiceSid string, Sid string, ) (error) { + path := "/v2/Services/{ServiceSid}/Users/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - return nil + defer resp.Body.Close() + + return nil } /* @@ -855,24 +866,26 @@ func (c *DefaultApiService) DeleteUser(ServiceSid string, Sid string) error { * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to delete the User Binding resource from. * @param UserSid The SID of the [User](https://www.twilio.com/docs/chat/rest/user-resource) with the User Binding resources to delete. See [push notification configuration](https://www.twilio.com/docs/chat/push-notification-configuration) for more info. * @param Sid The SID of the User Binding resource to delete. - */ -func (c *DefaultApiService) DeleteUserBinding(ServiceSid string, UserSid string, Sid string) error { - path := "/v2/Services/{ServiceSid}/Users/{UserSid}/Bindings/{Sid}" +*/ +func (c *DefaultApiService) DeleteUserBinding(ServiceSid string, UserSid string, Sid string, ) (error) { + path := "/v2/Services/{ServiceSid}/Users/{UserSid}/Bindings/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"UserSid"+"}", UserSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* @@ -881,24 +894,26 @@ func (c *DefaultApiService) DeleteUserBinding(ServiceSid string, UserSid string, * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to read the resources from. * @param UserSid The SID of the [User](https://www.twilio.com/docs/api/chat/rest/users) to read the User Channel resources from. * @param ChannelSid The SID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the resource belongs to. - */ -func (c *DefaultApiService) DeleteUserChannel(ServiceSid string, UserSid string, ChannelSid string) error { - path := "/v2/Services/{ServiceSid}/Users/{UserSid}/Channels/{ChannelSid}" +*/ +func (c *DefaultApiService) DeleteUserChannel(ServiceSid string, UserSid string, ChannelSid string, ) (error) { + path := "/v2/Services/{ServiceSid}/Users/{UserSid}/Channels/{ChannelSid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"UserSid"+"}", UserSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* @@ -906,28 +921,30 @@ func (c *DefaultApiService) DeleteUserChannel(ServiceSid string, UserSid string, * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to fetch the Binding resource from. * @param Sid The SID of the Binding resource to fetch. * @return ChatV2ServiceBinding - */ -func (c *DefaultApiService) FetchBinding(ServiceSid string, Sid string) (*ChatV2ServiceBinding, error) { - path := "/v2/Services/{ServiceSid}/Bindings/{Sid}" +*/ +func (c *DefaultApiService) FetchBinding(ServiceSid string, Sid string, ) (*ChatV2ServiceBinding, error) { + path := "/v2/Services/{ServiceSid}/Bindings/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ChatV2ServiceBinding{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err + defer resp.Body.Close() + + ps := &ChatV2ServiceBinding{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -935,28 +952,30 @@ func (c *DefaultApiService) FetchBinding(ServiceSid string, Sid string) (*ChatV2 * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to fetch the Channel resource from. * @param Sid The SID of the Channel resource to fetch. This value can be either the `sid` or the `unique_name` of the Channel resource to fetch. * @return ChatV2ServiceChannel - */ -func (c *DefaultApiService) FetchChannel(ServiceSid string, Sid string) (*ChatV2ServiceChannel, error) { - path := "/v2/Services/{ServiceSid}/Channels/{Sid}" +*/ +func (c *DefaultApiService) FetchChannel(ServiceSid string, Sid string, ) (*ChatV2ServiceChannel, error) { + path := "/v2/Services/{ServiceSid}/Channels/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ChatV2ServiceChannel{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err + defer resp.Body.Close() + + ps := &ChatV2ServiceChannel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -965,56 +984,60 @@ func (c *DefaultApiService) FetchChannel(ServiceSid string, Sid string) (*ChatV2 * @param ChannelSid The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Channel Webhook resource to fetch belongs to. This value can be the Channel resource's `sid` or `unique_name`. * @param Sid The SID of the Channel Webhook resource to fetch. * @return ChatV2ServiceChannelChannelWebhook - */ -func (c *DefaultApiService) FetchChannelWebhook(ServiceSid string, ChannelSid string, Sid string) (*ChatV2ServiceChannelChannelWebhook, error) { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks/{Sid}" +*/ +func (c *DefaultApiService) FetchChannelWebhook(ServiceSid string, ChannelSid string, Sid string, ) (*ChatV2ServiceChannelChannelWebhook, error) { + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ChatV2ServiceChannelChannelWebhook{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err + defer resp.Body.Close() + + ps := &ChatV2ServiceChannelChannelWebhook{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* * FetchCredential Method for FetchCredential * @param Sid The SID of the Credential resource to fetch. * @return ChatV2Credential - */ -func (c *DefaultApiService) FetchCredential(Sid string) (*ChatV2Credential, error) { - path := "/v2/Credentials/{Sid}" +*/ +func (c *DefaultApiService) FetchCredential(Sid string, ) (*ChatV2Credential, error) { + path := "/v2/Credentials/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ChatV2Credential{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &ChatV2Credential{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -1023,29 +1046,31 @@ func (c *DefaultApiService) FetchCredential(Sid string) (*ChatV2Credential, erro * @param ChannelSid The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Invite resource to fetch belongs to. This value can be the Channel resource's `sid` or `unique_name`. * @param Sid The SID of the Invite resource to fetch. * @return ChatV2ServiceChannelInvite - */ -func (c *DefaultApiService) FetchInvite(ServiceSid string, ChannelSid string, Sid string) (*ChatV2ServiceChannelInvite, error) { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Invites/{Sid}" +*/ +func (c *DefaultApiService) FetchInvite(ServiceSid string, ChannelSid string, Sid string, ) (*ChatV2ServiceChannelInvite, error) { + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Invites/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ChatV2ServiceChannelInvite{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &ChatV2ServiceChannelInvite{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -1054,29 +1079,31 @@ func (c *DefaultApiService) FetchInvite(ServiceSid string, ChannelSid string, Si * @param ChannelSid The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Member resource to fetch belongs to. This value can be the Channel resource's `sid` or `unique_name`. * @param Sid The SID of the Member resource to fetch. This value can be either the Member's `sid` or its `identity` value. * @return ChatV2ServiceChannelMember - */ -func (c *DefaultApiService) FetchMember(ServiceSid string, ChannelSid string, Sid string) (*ChatV2ServiceChannelMember, error) { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}" +*/ +func (c *DefaultApiService) FetchMember(ServiceSid string, ChannelSid string, Sid string, ) (*ChatV2ServiceChannelMember, error) { + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ChatV2ServiceChannelMember{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &ChatV2ServiceChannelMember{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -1085,29 +1112,31 @@ func (c *DefaultApiService) FetchMember(ServiceSid string, ChannelSid string, Si * @param ChannelSid The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Message resource to fetch belongs to. This value can be the Channel resource's `sid` or `unique_name`. * @param Sid The SID of the Message resource to fetch. * @return ChatV2ServiceChannelMessage - */ -func (c *DefaultApiService) FetchMessage(ServiceSid string, ChannelSid string, Sid string) (*ChatV2ServiceChannelMessage, error) { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}" +*/ +func (c *DefaultApiService) FetchMessage(ServiceSid string, ChannelSid string, Sid string, ) (*ChatV2ServiceChannelMessage, error) { + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ChatV2ServiceChannelMessage{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ChatV2ServiceChannelMessage{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -1115,55 +1144,59 @@ func (c *DefaultApiService) FetchMessage(ServiceSid string, ChannelSid string, S * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to fetch the Role resource from. * @param Sid The SID of the Role resource to fetch. * @return ChatV2ServiceRole - */ -func (c *DefaultApiService) FetchRole(ServiceSid string, Sid string) (*ChatV2ServiceRole, error) { - path := "/v2/Services/{ServiceSid}/Roles/{Sid}" +*/ +func (c *DefaultApiService) FetchRole(ServiceSid string, Sid string, ) (*ChatV2ServiceRole, error) { + path := "/v2/Services/{ServiceSid}/Roles/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ChatV2ServiceRole{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ChatV2ServiceRole{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * FetchService Method for FetchService * @param Sid The SID of the Service resource to fetch. * @return ChatV2Service - */ -func (c *DefaultApiService) FetchService(Sid string) (*ChatV2Service, error) { - path := "/v2/Services/{Sid}" +*/ +func (c *DefaultApiService) FetchService(Sid string, ) (*ChatV2Service, error) { + path := "/v2/Services/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ChatV2Service{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ChatV2Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -1171,28 +1204,30 @@ func (c *DefaultApiService) FetchService(Sid string) (*ChatV2Service, error) { * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to fetch the User resource from. * @param Sid The SID of the User resource to fetch. This value can be either the `sid` or the `identity` of the User resource to fetch. * @return ChatV2ServiceUser - */ -func (c *DefaultApiService) FetchUser(ServiceSid string, Sid string) (*ChatV2ServiceUser, error) { - path := "/v2/Services/{ServiceSid}/Users/{Sid}" +*/ +func (c *DefaultApiService) FetchUser(ServiceSid string, Sid string, ) (*ChatV2ServiceUser, error) { + path := "/v2/Services/{ServiceSid}/Users/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ChatV2ServiceUser{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ChatV2ServiceUser{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -1201,29 +1236,31 @@ func (c *DefaultApiService) FetchUser(ServiceSid string, Sid string) (*ChatV2Ser * @param UserSid The SID of the [User](https://www.twilio.com/docs/chat/rest/user-resource) with the User Binding resource to fetch. See [push notification configuration](https://www.twilio.com/docs/chat/push-notification-configuration) for more info. * @param Sid The SID of the User Binding resource to fetch. * @return ChatV2ServiceUserUserBinding - */ -func (c *DefaultApiService) FetchUserBinding(ServiceSid string, UserSid string, Sid string) (*ChatV2ServiceUserUserBinding, error) { - path := "/v2/Services/{ServiceSid}/Users/{UserSid}/Bindings/{Sid}" +*/ +func (c *DefaultApiService) FetchUserBinding(ServiceSid string, UserSid string, Sid string, ) (*ChatV2ServiceUserUserBinding, error) { + path := "/v2/Services/{ServiceSid}/Users/{UserSid}/Bindings/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"UserSid"+"}", UserSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ChatV2ServiceUserUserBinding{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &ChatV2ServiceUserUserBinding{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -1232,36 +1269,37 @@ func (c *DefaultApiService) FetchUserBinding(ServiceSid string, UserSid string, * @param UserSid The SID of the [User](https://www.twilio.com/docs/chat/rest/user-resource) to fetch the User Channel resource from. This value can be either the `sid` or the `identity` of the User resource. * @param ChannelSid The SID of the [Channel](https://www.twilio.com/docs/chat/channels) that has the User Channel to fetch. This value can be either the `sid` or the `unique_name` of the Channel to fetch. * @return ChatV2ServiceUserUserChannel - */ -func (c *DefaultApiService) FetchUserChannel(ServiceSid string, UserSid string, ChannelSid string) (*ChatV2ServiceUserUserChannel, error) { - path := "/v2/Services/{ServiceSid}/Users/{UserSid}/Channels/{ChannelSid}" +*/ +func (c *DefaultApiService) FetchUserChannel(ServiceSid string, UserSid string, ChannelSid string, ) (*ChatV2ServiceUserUserChannel, error) { + path := "/v2/Services/{ServiceSid}/Users/{UserSid}/Channels/{ChannelSid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"UserSid"+"}", UserSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ChatV2ServiceUserUserChannel{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err -} + defer resp.Body.Close() + ps := &ChatV2ServiceUserUserChannel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} // ListBindingParams Optional parameters for the method 'ListBinding' type ListBindingParams struct { BindingType *[]string `json:"BindingType,omitempty"` - Identity *[]string `json:"Identity,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + Identity *[]string `json:"Identity,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -1272,43 +1310,43 @@ type ListBindingParams struct { * @param "Identity" ([]string) - The [User](https://www.twilio.com/docs/chat/rest/user-resource)'s `identity` value of the resources to read. See [access tokens](https://www.twilio.com/docs/chat/create-tokens) for more details. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListBindingResponse - */ +*/ func (c *DefaultApiService) ListBinding(ServiceSid string, params *ListBindingParams) (*ListBindingResponse, error) { - path := "/v2/Services/{ServiceSid}/Bindings" + path := "/v2/Services/{ServiceSid}/Bindings" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.BindingType != nil { - data.Set("BindingType", strings.Join(*params.BindingType, ",")) - } - if params != nil && params.Identity != nil { - data.Set("Identity", strings.Join(*params.Identity, ",")) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.BindingType != nil { + data.Set("BindingType", strings.Join(*params.BindingType, ",")) +} + if params != nil && params.Identity != nil { + data.Set("Identity", strings.Join(*params.Identity, ",")) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListBindingResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListBindingResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListChannelParams Optional parameters for the method 'ListChannel' type ListChannelParams struct { - Type *[]string `json:"Type,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + Type *[]string `json:"Type,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -1318,36 +1356,36 @@ type ListChannelParams struct { * @param "Type" ([]string) - The visibility of the Channels to read. Can be: `public` or `private` and defaults to `public`. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListChannelResponse - */ +*/ func (c *DefaultApiService) ListChannel(ServiceSid string, params *ListChannelParams) (*ListChannelResponse, error) { - path := "/v2/Services/{ServiceSid}/Channels" + path := "/v2/Services/{ServiceSid}/Channels" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Type != nil { - data.Set("Type", strings.Join(*params.Type, ",")) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.Type != nil { + data.Set("Type", strings.Join(*params.Type, ",")) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListChannelResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListChannelResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListChannelWebhookParams Optional parameters for the method 'ListChannelWebhook' type ListChannelWebhookParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1360,34 +1398,34 @@ type ListChannelWebhookParams struct { * @param optional nil or *ListChannelWebhookParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListChannelWebhookResponse - */ +*/ func (c *DefaultApiService) ListChannelWebhook(ServiceSid string, ChannelSid string, params *ListChannelWebhookParams) (*ListChannelWebhookResponse, error) { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks" + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListChannelWebhookResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListChannelWebhookResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListCredentialParams Optional parameters for the method 'ListCredential' type ListCredentialParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1398,36 +1436,36 @@ type ListCredentialParams struct { * @param optional nil or *ListCredentialParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListCredentialResponse - */ +*/ func (c *DefaultApiService) ListCredential(params *ListCredentialParams) (*ListCredentialResponse, error) { - path := "/v2/Credentials" + path := "/v2/Credentials" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListCredentialResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListCredentialResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListInviteParams Optional parameters for the method 'ListInvite' type ListInviteParams struct { Identity *[]string `json:"Identity,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -1438,41 +1476,41 @@ type ListInviteParams struct { * @param "Identity" ([]string) - The [User](https://www.twilio.com/docs/chat/rest/user-resource)'s `identity` value of the resources to read. See [access tokens](https://www.twilio.com/docs/chat/create-tokens) for more details. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListInviteResponse - */ +*/ func (c *DefaultApiService) ListInvite(ServiceSid string, ChannelSid string, params *ListInviteParams) (*ListInviteResponse, error) { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Invites" + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Invites" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Identity != nil { - data.Set("Identity", strings.Join(*params.Identity, ",")) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.Identity != nil { + data.Set("Identity", strings.Join(*params.Identity, ",")) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListInviteResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListInviteResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListMemberParams Optional parameters for the method 'ListMember' type ListMemberParams struct { Identity *[]string `json:"Identity,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -1483,41 +1521,41 @@ type ListMemberParams struct { * @param "Identity" ([]string) - The [User](https://www.twilio.com/docs/chat/rest/user-resource)'s `identity` value of the Member resources to read. See [access tokens](https://www.twilio.com/docs/chat/create-tokens) for more details. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListMemberResponse - */ +*/ func (c *DefaultApiService) ListMember(ServiceSid string, ChannelSid string, params *ListMemberParams) (*ListMemberResponse, error) { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members" + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Identity != nil { - data.Set("Identity", strings.Join(*params.Identity, ",")) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.Identity != nil { + data.Set("Identity", strings.Join(*params.Identity, ",")) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListMemberResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListMemberResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListMessageParams Optional parameters for the method 'ListMessage' type ListMessageParams struct { - Order *string `json:"Order,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + Order *string `json:"Order,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -1528,37 +1566,37 @@ type ListMessageParams struct { * @param "Order" (string) - The sort order of the returned messages. Can be: `asc` (ascending) or `desc` (descending) with `asc` as the default. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListMessageResponse - */ +*/ func (c *DefaultApiService) ListMessage(ServiceSid string, ChannelSid string, params *ListMessageParams) (*ListMessageResponse, error) { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages" + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Order != nil { - data.Set("Order", *params.Order) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.Order != nil { + data.Set("Order", *params.Order) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListMessageResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListMessageResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListRoleParams Optional parameters for the method 'ListRole' type ListRoleParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1570,33 +1608,33 @@ type ListRoleParams struct { * @param optional nil or *ListRoleParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListRoleResponse - */ +*/ func (c *DefaultApiService) ListRole(ServiceSid string, params *ListRoleParams) (*ListRoleResponse, error) { - path := "/v2/Services/{ServiceSid}/Roles" + path := "/v2/Services/{ServiceSid}/Roles" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListRoleResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListRoleResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListServiceParams Optional parameters for the method 'ListService' type ListServiceParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1607,32 +1645,32 @@ type ListServiceParams struct { * @param optional nil or *ListServiceParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListServiceResponse - */ +*/ func (c *DefaultApiService) ListService(params *ListServiceParams) (*ListServiceResponse, error) { - path := "/v2/Services" + path := "/v2/Services" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListServiceResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListServiceResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListUserParams Optional parameters for the method 'ListUser' type ListUserParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1644,37 +1682,37 @@ type ListUserParams struct { * @param optional nil or *ListUserParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListUserResponse - */ +*/ func (c *DefaultApiService) ListUser(ServiceSid string, params *ListUserParams) (*ListUserResponse, error) { - path := "/v2/Services/{ServiceSid}/Users" + path := "/v2/Services/{ServiceSid}/Users" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListUserResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListUserResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListUserBindingParams Optional parameters for the method 'ListUserBinding' type ListUserBindingParams struct { BindingType *[]string `json:"BindingType,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -1685,37 +1723,37 @@ type ListUserBindingParams struct { * @param "BindingType" ([]string) - The push technology used by the User Binding resources to read. Can be: `apn`, `gcm`, or `fcm`. See [push notification configuration](https://www.twilio.com/docs/chat/push-notification-configuration) for more info. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListUserBindingResponse - */ +*/ func (c *DefaultApiService) ListUserBinding(ServiceSid string, UserSid string, params *ListUserBindingParams) (*ListUserBindingResponse, error) { - path := "/v2/Services/{ServiceSid}/Users/{UserSid}/Bindings" + path := "/v2/Services/{ServiceSid}/Users/{UserSid}/Bindings" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"UserSid"+"}", UserSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.BindingType != nil { - data.Set("BindingType", strings.Join(*params.BindingType, ",")) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.BindingType != nil { + data.Set("BindingType", strings.Join(*params.BindingType, ",")) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListUserBindingResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListUserBindingResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListUserChannelParams Optional parameters for the method 'ListUserChannel' type ListUserChannelParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1729,43 +1767,43 @@ type ListUserChannelParams struct { * @param optional nil or *ListUserChannelParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListUserChannelResponse - */ +*/ func (c *DefaultApiService) ListUserChannel(ServiceSid string, UserSid string, params *ListUserChannelParams) (*ListUserChannelResponse, error) { - path := "/v2/Services/{ServiceSid}/Users/{UserSid}/Channels" + path := "/v2/Services/{ServiceSid}/Users/{UserSid}/Channels" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"UserSid"+"}", UserSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListUserChannelResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListUserChannelResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateChannelParams Optional parameters for the method 'UpdateChannel' type UpdateChannelParams struct { - XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - CreatedBy *string `json:"CreatedBy,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + CreatedBy *string `json:"CreatedBy,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` } /* @@ -1781,61 +1819,60 @@ type UpdateChannelParams struct { * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It can be up to 256 characters long. * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. This value must be 256 characters or less in length and unique within the Service. * @return ChatV2ServiceChannel - */ +*/ func (c *DefaultApiService) UpdateChannel(ServiceSid string, Sid string, params *UpdateChannelParams) (*ChatV2ServiceChannel, error) { - path := "/v2/Services/{ServiceSid}/Channels/{Sid}" + path := "/v2/Services/{ServiceSid}/Channels/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) - } - if params != nil && params.CreatedBy != nil { - data.Set("CreatedBy", *params.CreatedBy) - } - if params != nil && params.DateCreated != nil { - data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) - } - if params != nil && params.DateUpdated != nil { - data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) - } + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) +} + if params != nil && params.CreatedBy != nil { + data.Set("CreatedBy", *params.CreatedBy) +} + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) +} + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) +} if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ChatV2ServiceChannel{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ChatV2ServiceChannel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } - // UpdateChannelWebhookParams Optional parameters for the method 'UpdateChannelWebhook' type UpdateChannelWebhookParams struct { - ConfigurationFilters *[]string `json:"Configuration.Filters,omitempty"` - ConfigurationFlowSid *string `json:"Configuration.FlowSid,omitempty"` - ConfigurationMethod *string `json:"Configuration.Method,omitempty"` - ConfigurationRetryCount *int32 `json:"Configuration.RetryCount,omitempty"` - ConfigurationTriggers *[]string `json:"Configuration.Triggers,omitempty"` - ConfigurationUrl *string `json:"Configuration.Url,omitempty"` + ConfigurationFilters *[]string `json:"Configuration.Filters,omitempty"` + ConfigurationFlowSid *string `json:"Configuration.FlowSid,omitempty"` + ConfigurationMethod *string `json:"Configuration.Method,omitempty"` + ConfigurationRetryCount *int32 `json:"Configuration.RetryCount,omitempty"` + ConfigurationTriggers *[]string `json:"Configuration.Triggers,omitempty"` + ConfigurationUrl *string `json:"Configuration.Url,omitempty"` } /* @@ -1851,58 +1888,58 @@ type UpdateChannelWebhookParams struct { * @param "ConfigurationTriggers" ([]string) - A string that will cause us to call the webhook when it is present in a message body. This parameter takes only one trigger string. To specify more than one, repeat this parameter for each trigger string up to a total of 5 trigger strings. Used only when `type` = `trigger`. * @param "ConfigurationUrl" (string) - The URL of the webhook to call using the `configuration.method`. * @return ChatV2ServiceChannelChannelWebhook - */ +*/ func (c *DefaultApiService) UpdateChannelWebhook(ServiceSid string, ChannelSid string, Sid string, params *UpdateChannelWebhookParams) (*ChatV2ServiceChannelChannelWebhook, error) { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks/{Sid}" + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.ConfigurationFilters != nil { - data.Set("ConfigurationFilters", strings.Join(*params.ConfigurationFilters, ",")) - } - if params != nil && params.ConfigurationFlowSid != nil { - data.Set("ConfigurationFlowSid", *params.ConfigurationFlowSid) - } - if params != nil && params.ConfigurationMethod != nil { - data.Set("ConfigurationMethod", *params.ConfigurationMethod) - } - if params != nil && params.ConfigurationRetryCount != nil { - data.Set("ConfigurationRetryCount", fmt.Sprint(*params.ConfigurationRetryCount)) - } - if params != nil && params.ConfigurationTriggers != nil { - data.Set("ConfigurationTriggers", strings.Join(*params.ConfigurationTriggers, ",")) - } - if params != nil && params.ConfigurationUrl != nil { - data.Set("ConfigurationUrl", *params.ConfigurationUrl) - } + if params != nil && params.ConfigurationFilters != nil { + data.Set("ConfigurationFilters", strings.Join(*params.ConfigurationFilters, ",")) +} + if params != nil && params.ConfigurationFlowSid != nil { + data.Set("ConfigurationFlowSid", *params.ConfigurationFlowSid) +} + if params != nil && params.ConfigurationMethod != nil { + data.Set("ConfigurationMethod", *params.ConfigurationMethod) +} + if params != nil && params.ConfigurationRetryCount != nil { + data.Set("ConfigurationRetryCount", fmt.Sprint(*params.ConfigurationRetryCount)) +} + if params != nil && params.ConfigurationTriggers != nil { + data.Set("ConfigurationTriggers", strings.Join(*params.ConfigurationTriggers, ",")) +} + if params != nil && params.ConfigurationUrl != nil { + data.Set("ConfigurationUrl", *params.ConfigurationUrl) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ChatV2ServiceChannelChannelWebhook{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ChatV2ServiceChannelChannelWebhook{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateCredentialParams Optional parameters for the method 'UpdateCredential' type UpdateCredentialParams struct { - ApiKey *string `json:"ApiKey,omitempty"` - Certificate *string `json:"Certificate,omitempty"` + ApiKey *string `json:"ApiKey,omitempty"` + Certificate *string `json:"Certificate,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` - PrivateKey *string `json:"PrivateKey,omitempty"` - Sandbox *bool `json:"Sandbox,omitempty"` - Secret *string `json:"Secret,omitempty"` + PrivateKey *string `json:"PrivateKey,omitempty"` + Sandbox *bool `json:"Sandbox,omitempty"` + Secret *string `json:"Secret,omitempty"` } /* @@ -1916,57 +1953,57 @@ type UpdateCredentialParams struct { * @param "Sandbox" (bool) - [APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production. * @param "Secret" (string) - [FCM only] The **Server key** of your project from the Firebase console, found under Settings / Cloud messaging. * @return ChatV2Credential - */ +*/ func (c *DefaultApiService) UpdateCredential(Sid string, params *UpdateCredentialParams) (*ChatV2Credential, error) { - path := "/v2/Credentials/{Sid}" + path := "/v2/Credentials/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.ApiKey != nil { - data.Set("ApiKey", *params.ApiKey) - } - if params != nil && params.Certificate != nil { - data.Set("Certificate", *params.Certificate) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.PrivateKey != nil { - data.Set("PrivateKey", *params.PrivateKey) - } - if params != nil && params.Sandbox != nil { - data.Set("Sandbox", fmt.Sprint(*params.Sandbox)) - } - if params != nil && params.Secret != nil { - data.Set("Secret", *params.Secret) - } + if params != nil && params.ApiKey != nil { + data.Set("ApiKey", *params.ApiKey) +} + if params != nil && params.Certificate != nil { + data.Set("Certificate", *params.Certificate) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.PrivateKey != nil { + data.Set("PrivateKey", *params.PrivateKey) +} + if params != nil && params.Sandbox != nil { + data.Set("Sandbox", fmt.Sprint(*params.Sandbox)) +} + if params != nil && params.Secret != nil { + data.Set("Secret", *params.Secret) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ChatV2Credential{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ChatV2Credential{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateMemberParams Optional parameters for the method 'UpdateMember' type UpdateMemberParams struct { - XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` LastConsumptionTimestamp *time.Time `json:"LastConsumptionTimestamp,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` } /* @@ -1983,63 +2020,62 @@ type UpdateMemberParams struct { * @param "LastConsumptionTimestamp" (time.Time) - The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) read event for the Member within the [Channel](https://www.twilio.com/docs/chat/channels). * @param "RoleSid" (string) - The SID of the [Role](https://www.twilio.com/docs/chat/rest/role-resource) to assign to the member. The default roles are those specified on the [Service](https://www.twilio.com/docs/chat/rest/service-resource). * @return ChatV2ServiceChannelMember - */ +*/ func (c *DefaultApiService) UpdateMember(ServiceSid string, ChannelSid string, Sid string, params *UpdateMemberParams) (*ChatV2ServiceChannelMember, error) { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}" + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) - } - if params != nil && params.DateCreated != nil { - data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) - } - if params != nil && params.DateUpdated != nil { - data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) - } - if params != nil && params.LastConsumedMessageIndex != nil { - data.Set("LastConsumedMessageIndex", fmt.Sprint(*params.LastConsumedMessageIndex)) - } - if params != nil && params.LastConsumptionTimestamp != nil { - data.Set("LastConsumptionTimestamp", fmt.Sprint(*params.LastConsumptionTimestamp)) - } - if params != nil && params.RoleSid != nil { - data.Set("RoleSid", *params.RoleSid) - } + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) +} + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) +} + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) +} + if params != nil && params.LastConsumedMessageIndex != nil { + data.Set("LastConsumedMessageIndex", fmt.Sprint(*params.LastConsumedMessageIndex)) +} + if params != nil && params.LastConsumptionTimestamp != nil { + data.Set("LastConsumptionTimestamp", fmt.Sprint(*params.LastConsumptionTimestamp)) +} + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) +} if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ChatV2ServiceChannelMember{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ChatV2ServiceChannelMember{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } - // UpdateMessageParams Optional parameters for the method 'UpdateMessage' type UpdateMessageParams struct { - XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - Body *string `json:"Body,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - From *string `json:"From,omitempty"` - LastUpdatedBy *string `json:"LastUpdatedBy,omitempty"` + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + Body *string `json:"Body,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + From *string `json:"From,omitempty"` + LastUpdatedBy *string `json:"LastUpdatedBy,omitempty"` } /* @@ -2056,54 +2092,53 @@ type UpdateMessageParams struct { * @param "From" (string) - The [Identity](https://www.twilio.com/docs/chat/identity) of the message's author. * @param "LastUpdatedBy" (string) - The [Identity](https://www.twilio.com/docs/chat/identity) of the User who last updated the Message, if applicable. * @return ChatV2ServiceChannelMessage - */ +*/ func (c *DefaultApiService) UpdateMessage(ServiceSid string, ChannelSid string, Sid string, params *UpdateMessageParams) (*ChatV2ServiceChannelMessage, error) { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}" + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) - } - if params != nil && params.Body != nil { - data.Set("Body", *params.Body) - } - if params != nil && params.DateCreated != nil { - data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) - } - if params != nil && params.DateUpdated != nil { - data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) - } - if params != nil && params.From != nil { - data.Set("From", *params.From) - } - if params != nil && params.LastUpdatedBy != nil { - data.Set("LastUpdatedBy", *params.LastUpdatedBy) - } + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) +} + if params != nil && params.Body != nil { + data.Set("Body", *params.Body) +} + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) +} + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) +} + if params != nil && params.From != nil { + data.Set("From", *params.From) +} + if params != nil && params.LastUpdatedBy != nil { + data.Set("LastUpdatedBy", *params.LastUpdatedBy) +} if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ChatV2ServiceChannelMessage{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ChatV2ServiceChannelMessage{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } - // UpdateRoleParams Optional parameters for the method 'UpdateRole' type UpdateRoleParams struct { Permission *[]string `json:"Permission,omitempty"` @@ -2116,67 +2151,67 @@ type UpdateRoleParams struct { * @param optional nil or *UpdateRoleParams - Optional Parameters: * @param "Permission" ([]string) - A permission that you grant to the role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. Note that the update action replaces all previously assigned permissions with those defined in the update action. To remove a permission, do not include it in the subsequent update action. The values for this parameter depend on the role's `type`. * @return ChatV2ServiceRole - */ +*/ func (c *DefaultApiService) UpdateRole(ServiceSid string, Sid string, params *UpdateRoleParams) (*ChatV2ServiceRole, error) { - path := "/v2/Services/{ServiceSid}/Roles/{Sid}" + path := "/v2/Services/{ServiceSid}/Roles/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Permission != nil { - data.Set("Permission", strings.Join(*params.Permission, ",")) - } + if params != nil && params.Permission != nil { + data.Set("Permission", strings.Join(*params.Permission, ",")) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ChatV2ServiceRole{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ChatV2ServiceRole{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateServiceParams Optional parameters for the method 'UpdateService' type UpdateServiceParams struct { - ConsumptionReportInterval *int32 `json:"ConsumptionReportInterval,omitempty"` - DefaultChannelCreatorRoleSid *string `json:"DefaultChannelCreatorRoleSid,omitempty"` - DefaultChannelRoleSid *string `json:"DefaultChannelRoleSid,omitempty"` - DefaultServiceRoleSid *string `json:"DefaultServiceRoleSid,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - LimitsChannelMembers *int32 `json:"Limits.ChannelMembers,omitempty"` - LimitsUserChannels *int32 `json:"Limits.UserChannels,omitempty"` - MediaCompatibilityMessage *string `json:"Media.CompatibilityMessage,omitempty"` - NotificationsAddedToChannelEnabled *bool `json:"Notifications.AddedToChannel.Enabled,omitempty"` - NotificationsAddedToChannelSound *string `json:"Notifications.AddedToChannel.Sound,omitempty"` - NotificationsAddedToChannelTemplate *string `json:"Notifications.AddedToChannel.Template,omitempty"` - NotificationsInvitedToChannelEnabled *bool `json:"Notifications.InvitedToChannel.Enabled,omitempty"` - NotificationsInvitedToChannelSound *string `json:"Notifications.InvitedToChannel.Sound,omitempty"` - NotificationsInvitedToChannelTemplate *string `json:"Notifications.InvitedToChannel.Template,omitempty"` - NotificationsLogEnabled *bool `json:"Notifications.LogEnabled,omitempty"` - NotificationsNewMessageBadgeCountEnabled *bool `json:"Notifications.NewMessage.BadgeCountEnabled,omitempty"` - NotificationsNewMessageEnabled *bool `json:"Notifications.NewMessage.Enabled,omitempty"` - NotificationsNewMessageSound *string `json:"Notifications.NewMessage.Sound,omitempty"` - NotificationsNewMessageTemplate *string `json:"Notifications.NewMessage.Template,omitempty"` - NotificationsRemovedFromChannelEnabled *bool `json:"Notifications.RemovedFromChannel.Enabled,omitempty"` - NotificationsRemovedFromChannelSound *string `json:"Notifications.RemovedFromChannel.Sound,omitempty"` - NotificationsRemovedFromChannelTemplate *string `json:"Notifications.RemovedFromChannel.Template,omitempty"` - PostWebhookRetryCount *int32 `json:"PostWebhookRetryCount,omitempty"` - PostWebhookUrl *string `json:"PostWebhookUrl,omitempty"` - PreWebhookRetryCount *int32 `json:"PreWebhookRetryCount,omitempty"` - PreWebhookUrl *string `json:"PreWebhookUrl,omitempty"` - ReachabilityEnabled *bool `json:"ReachabilityEnabled,omitempty"` - ReadStatusEnabled *bool `json:"ReadStatusEnabled,omitempty"` - TypingIndicatorTimeout *int32 `json:"TypingIndicatorTimeout,omitempty"` - WebhookFilters *[]string `json:"WebhookFilters,omitempty"` - WebhookMethod *string `json:"WebhookMethod,omitempty"` + ConsumptionReportInterval *int32 `json:"ConsumptionReportInterval,omitempty"` + DefaultChannelCreatorRoleSid *string `json:"DefaultChannelCreatorRoleSid,omitempty"` + DefaultChannelRoleSid *string `json:"DefaultChannelRoleSid,omitempty"` + DefaultServiceRoleSid *string `json:"DefaultServiceRoleSid,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + LimitsChannelMembers *int32 `json:"Limits.ChannelMembers,omitempty"` + LimitsUserChannels *int32 `json:"Limits.UserChannels,omitempty"` + MediaCompatibilityMessage *string `json:"Media.CompatibilityMessage,omitempty"` + NotificationsAddedToChannelEnabled *bool `json:"Notifications.AddedToChannel.Enabled,omitempty"` + NotificationsAddedToChannelSound *string `json:"Notifications.AddedToChannel.Sound,omitempty"` + NotificationsAddedToChannelTemplate *string `json:"Notifications.AddedToChannel.Template,omitempty"` + NotificationsInvitedToChannelEnabled *bool `json:"Notifications.InvitedToChannel.Enabled,omitempty"` + NotificationsInvitedToChannelSound *string `json:"Notifications.InvitedToChannel.Sound,omitempty"` + NotificationsInvitedToChannelTemplate *string `json:"Notifications.InvitedToChannel.Template,omitempty"` + NotificationsLogEnabled *bool `json:"Notifications.LogEnabled,omitempty"` + NotificationsNewMessageBadgeCountEnabled *bool `json:"Notifications.NewMessage.BadgeCountEnabled,omitempty"` + NotificationsNewMessageEnabled *bool `json:"Notifications.NewMessage.Enabled,omitempty"` + NotificationsNewMessageSound *string `json:"Notifications.NewMessage.Sound,omitempty"` + NotificationsNewMessageTemplate *string `json:"Notifications.NewMessage.Template,omitempty"` + NotificationsRemovedFromChannelEnabled *bool `json:"Notifications.RemovedFromChannel.Enabled,omitempty"` + NotificationsRemovedFromChannelSound *string `json:"Notifications.RemovedFromChannel.Sound,omitempty"` + NotificationsRemovedFromChannelTemplate *string `json:"Notifications.RemovedFromChannel.Template,omitempty"` + PostWebhookRetryCount *int32 `json:"PostWebhookRetryCount,omitempty"` + PostWebhookUrl *string `json:"PostWebhookUrl,omitempty"` + PreWebhookRetryCount *int32 `json:"PreWebhookRetryCount,omitempty"` + PreWebhookUrl *string `json:"PreWebhookUrl,omitempty"` + ReachabilityEnabled *bool `json:"ReachabilityEnabled,omitempty"` + ReadStatusEnabled *bool `json:"ReadStatusEnabled,omitempty"` + TypingIndicatorTimeout *int32 `json:"TypingIndicatorTimeout,omitempty"` + WebhookFilters *[]string `json:"WebhookFilters,omitempty"` + WebhookMethod *string `json:"WebhookMethod,omitempty"` } /* @@ -2215,129 +2250,129 @@ type UpdateServiceParams struct { * @param "WebhookFilters" ([]string) - The list of webhook events that are enabled for this Service instance. See [Webhook Events](https://www.twilio.com/docs/chat/webhook-events) for more details. * @param "WebhookMethod" (string) - The HTTP method to use for calls to the `pre_webhook_url` and `post_webhook_url` webhooks. Can be: `POST` or `GET` and the default is `POST`. See [Webhook Events](https://www.twilio.com/docs/chat/webhook-events) for more details. * @return ChatV2Service - */ +*/ func (c *DefaultApiService) UpdateService(Sid string, params *UpdateServiceParams) (*ChatV2Service, error) { - path := "/v2/Services/{Sid}" + path := "/v2/Services/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.ConsumptionReportInterval != nil { - data.Set("ConsumptionReportInterval", fmt.Sprint(*params.ConsumptionReportInterval)) - } - if params != nil && params.DefaultChannelCreatorRoleSid != nil { - data.Set("DefaultChannelCreatorRoleSid", *params.DefaultChannelCreatorRoleSid) - } - if params != nil && params.DefaultChannelRoleSid != nil { - data.Set("DefaultChannelRoleSid", *params.DefaultChannelRoleSid) - } - if params != nil && params.DefaultServiceRoleSid != nil { - data.Set("DefaultServiceRoleSid", *params.DefaultServiceRoleSid) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.LimitsChannelMembers != nil { - data.Set("LimitsChannelMembers", fmt.Sprint(*params.LimitsChannelMembers)) - } - if params != nil && params.LimitsUserChannels != nil { - data.Set("LimitsUserChannels", fmt.Sprint(*params.LimitsUserChannels)) - } - if params != nil && params.MediaCompatibilityMessage != nil { - data.Set("MediaCompatibilityMessage", *params.MediaCompatibilityMessage) - } - if params != nil && params.NotificationsAddedToChannelEnabled != nil { - data.Set("NotificationsAddedToChannelEnabled", fmt.Sprint(*params.NotificationsAddedToChannelEnabled)) - } - if params != nil && params.NotificationsAddedToChannelSound != nil { - data.Set("NotificationsAddedToChannelSound", *params.NotificationsAddedToChannelSound) - } - if params != nil && params.NotificationsAddedToChannelTemplate != nil { - data.Set("NotificationsAddedToChannelTemplate", *params.NotificationsAddedToChannelTemplate) - } - if params != nil && params.NotificationsInvitedToChannelEnabled != nil { - data.Set("NotificationsInvitedToChannelEnabled", fmt.Sprint(*params.NotificationsInvitedToChannelEnabled)) - } - if params != nil && params.NotificationsInvitedToChannelSound != nil { - data.Set("NotificationsInvitedToChannelSound", *params.NotificationsInvitedToChannelSound) - } - if params != nil && params.NotificationsInvitedToChannelTemplate != nil { - data.Set("NotificationsInvitedToChannelTemplate", *params.NotificationsInvitedToChannelTemplate) - } - if params != nil && params.NotificationsLogEnabled != nil { - data.Set("NotificationsLogEnabled", fmt.Sprint(*params.NotificationsLogEnabled)) - } - if params != nil && params.NotificationsNewMessageBadgeCountEnabled != nil { - data.Set("NotificationsNewMessageBadgeCountEnabled", fmt.Sprint(*params.NotificationsNewMessageBadgeCountEnabled)) - } - if params != nil && params.NotificationsNewMessageEnabled != nil { - data.Set("NotificationsNewMessageEnabled", fmt.Sprint(*params.NotificationsNewMessageEnabled)) - } - if params != nil && params.NotificationsNewMessageSound != nil { - data.Set("NotificationsNewMessageSound", *params.NotificationsNewMessageSound) - } - if params != nil && params.NotificationsNewMessageTemplate != nil { - data.Set("NotificationsNewMessageTemplate", *params.NotificationsNewMessageTemplate) - } - if params != nil && params.NotificationsRemovedFromChannelEnabled != nil { - data.Set("NotificationsRemovedFromChannelEnabled", fmt.Sprint(*params.NotificationsRemovedFromChannelEnabled)) - } - if params != nil && params.NotificationsRemovedFromChannelSound != nil { - data.Set("NotificationsRemovedFromChannelSound", *params.NotificationsRemovedFromChannelSound) - } - if params != nil && params.NotificationsRemovedFromChannelTemplate != nil { - data.Set("NotificationsRemovedFromChannelTemplate", *params.NotificationsRemovedFromChannelTemplate) - } - if params != nil && params.PostWebhookRetryCount != nil { - data.Set("PostWebhookRetryCount", fmt.Sprint(*params.PostWebhookRetryCount)) - } - if params != nil && params.PostWebhookUrl != nil { - data.Set("PostWebhookUrl", *params.PostWebhookUrl) - } - if params != nil && params.PreWebhookRetryCount != nil { - data.Set("PreWebhookRetryCount", fmt.Sprint(*params.PreWebhookRetryCount)) - } - if params != nil && params.PreWebhookUrl != nil { - data.Set("PreWebhookUrl", *params.PreWebhookUrl) - } - if params != nil && params.ReachabilityEnabled != nil { - data.Set("ReachabilityEnabled", fmt.Sprint(*params.ReachabilityEnabled)) - } - if params != nil && params.ReadStatusEnabled != nil { - data.Set("ReadStatusEnabled", fmt.Sprint(*params.ReadStatusEnabled)) - } - if params != nil && params.TypingIndicatorTimeout != nil { - data.Set("TypingIndicatorTimeout", fmt.Sprint(*params.TypingIndicatorTimeout)) - } - if params != nil && params.WebhookFilters != nil { - data.Set("WebhookFilters", strings.Join(*params.WebhookFilters, ",")) - } - if params != nil && params.WebhookMethod != nil { - data.Set("WebhookMethod", *params.WebhookMethod) - } + if params != nil && params.ConsumptionReportInterval != nil { + data.Set("ConsumptionReportInterval", fmt.Sprint(*params.ConsumptionReportInterval)) +} + if params != nil && params.DefaultChannelCreatorRoleSid != nil { + data.Set("DefaultChannelCreatorRoleSid", *params.DefaultChannelCreatorRoleSid) +} + if params != nil && params.DefaultChannelRoleSid != nil { + data.Set("DefaultChannelRoleSid", *params.DefaultChannelRoleSid) +} + if params != nil && params.DefaultServiceRoleSid != nil { + data.Set("DefaultServiceRoleSid", *params.DefaultServiceRoleSid) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.LimitsChannelMembers != nil { + data.Set("LimitsChannelMembers", fmt.Sprint(*params.LimitsChannelMembers)) +} + if params != nil && params.LimitsUserChannels != nil { + data.Set("LimitsUserChannels", fmt.Sprint(*params.LimitsUserChannels)) +} + if params != nil && params.MediaCompatibilityMessage != nil { + data.Set("MediaCompatibilityMessage", *params.MediaCompatibilityMessage) +} + if params != nil && params.NotificationsAddedToChannelEnabled != nil { + data.Set("NotificationsAddedToChannelEnabled", fmt.Sprint(*params.NotificationsAddedToChannelEnabled)) +} + if params != nil && params.NotificationsAddedToChannelSound != nil { + data.Set("NotificationsAddedToChannelSound", *params.NotificationsAddedToChannelSound) +} + if params != nil && params.NotificationsAddedToChannelTemplate != nil { + data.Set("NotificationsAddedToChannelTemplate", *params.NotificationsAddedToChannelTemplate) +} + if params != nil && params.NotificationsInvitedToChannelEnabled != nil { + data.Set("NotificationsInvitedToChannelEnabled", fmt.Sprint(*params.NotificationsInvitedToChannelEnabled)) +} + if params != nil && params.NotificationsInvitedToChannelSound != nil { + data.Set("NotificationsInvitedToChannelSound", *params.NotificationsInvitedToChannelSound) +} + if params != nil && params.NotificationsInvitedToChannelTemplate != nil { + data.Set("NotificationsInvitedToChannelTemplate", *params.NotificationsInvitedToChannelTemplate) +} + if params != nil && params.NotificationsLogEnabled != nil { + data.Set("NotificationsLogEnabled", fmt.Sprint(*params.NotificationsLogEnabled)) +} + if params != nil && params.NotificationsNewMessageBadgeCountEnabled != nil { + data.Set("NotificationsNewMessageBadgeCountEnabled", fmt.Sprint(*params.NotificationsNewMessageBadgeCountEnabled)) +} + if params != nil && params.NotificationsNewMessageEnabled != nil { + data.Set("NotificationsNewMessageEnabled", fmt.Sprint(*params.NotificationsNewMessageEnabled)) +} + if params != nil && params.NotificationsNewMessageSound != nil { + data.Set("NotificationsNewMessageSound", *params.NotificationsNewMessageSound) +} + if params != nil && params.NotificationsNewMessageTemplate != nil { + data.Set("NotificationsNewMessageTemplate", *params.NotificationsNewMessageTemplate) +} + if params != nil && params.NotificationsRemovedFromChannelEnabled != nil { + data.Set("NotificationsRemovedFromChannelEnabled", fmt.Sprint(*params.NotificationsRemovedFromChannelEnabled)) +} + if params != nil && params.NotificationsRemovedFromChannelSound != nil { + data.Set("NotificationsRemovedFromChannelSound", *params.NotificationsRemovedFromChannelSound) +} + if params != nil && params.NotificationsRemovedFromChannelTemplate != nil { + data.Set("NotificationsRemovedFromChannelTemplate", *params.NotificationsRemovedFromChannelTemplate) +} + if params != nil && params.PostWebhookRetryCount != nil { + data.Set("PostWebhookRetryCount", fmt.Sprint(*params.PostWebhookRetryCount)) +} + if params != nil && params.PostWebhookUrl != nil { + data.Set("PostWebhookUrl", *params.PostWebhookUrl) +} + if params != nil && params.PreWebhookRetryCount != nil { + data.Set("PreWebhookRetryCount", fmt.Sprint(*params.PreWebhookRetryCount)) +} + if params != nil && params.PreWebhookUrl != nil { + data.Set("PreWebhookUrl", *params.PreWebhookUrl) +} + if params != nil && params.ReachabilityEnabled != nil { + data.Set("ReachabilityEnabled", fmt.Sprint(*params.ReachabilityEnabled)) +} + if params != nil && params.ReadStatusEnabled != nil { + data.Set("ReadStatusEnabled", fmt.Sprint(*params.ReadStatusEnabled)) +} + if params != nil && params.TypingIndicatorTimeout != nil { + data.Set("TypingIndicatorTimeout", fmt.Sprint(*params.TypingIndicatorTimeout)) +} + if params != nil && params.WebhookFilters != nil { + data.Set("WebhookFilters", strings.Join(*params.WebhookFilters, ",")) +} + if params != nil && params.WebhookMethod != nil { + data.Set("WebhookMethod", *params.WebhookMethod) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ChatV2Service{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ChatV2Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateUserParams Optional parameters for the method 'UpdateUser' type UpdateUserParams struct { XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` } /* @@ -2350,49 +2385,48 @@ type UpdateUserParams struct { * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It is often used for display purposes. * @param "RoleSid" (string) - The SID of the [Role](https://www.twilio.com/docs/chat/rest/role-resource) to assign to the User. * @return ChatV2ServiceUser - */ +*/ func (c *DefaultApiService) UpdateUser(ServiceSid string, Sid string, params *UpdateUserParams) (*ChatV2ServiceUser, error) { - path := "/v2/Services/{ServiceSid}/Users/{Sid}" + path := "/v2/Services/{ServiceSid}/Users/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.RoleSid != nil { - data.Set("RoleSid", *params.RoleSid) - } + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) +} if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ChatV2ServiceUser{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ChatV2ServiceUser{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } - // UpdateUserChannelParams Optional parameters for the method 'UpdateUserChannel' type UpdateUserChannelParams struct { - LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` + LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` LastConsumptionTimestamp *time.Time `json:"LastConsumptionTimestamp,omitempty"` - NotificationLevel *string `json:"NotificationLevel,omitempty"` + NotificationLevel *string `json:"NotificationLevel,omitempty"` } /* @@ -2405,37 +2439,38 @@ type UpdateUserChannelParams struct { * @param "LastConsumptionTimestamp" (time.Time) - The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) read event for the Member within the [Channel](https://www.twilio.com/docs/chat/channels). * @param "NotificationLevel" (string) - The push notification level to assign to the User Channel. Can be: `default` or `muted`. * @return ChatV2ServiceUserUserChannel - */ +*/ func (c *DefaultApiService) UpdateUserChannel(ServiceSid string, UserSid string, ChannelSid string, params *UpdateUserChannelParams) (*ChatV2ServiceUserUserChannel, error) { - path := "/v2/Services/{ServiceSid}/Users/{UserSid}/Channels/{ChannelSid}" + path := "/v2/Services/{ServiceSid}/Users/{UserSid}/Channels/{ChannelSid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"UserSid"+"}", UserSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.LastConsumedMessageIndex != nil { - data.Set("LastConsumedMessageIndex", fmt.Sprint(*params.LastConsumedMessageIndex)) - } - if params != nil && params.LastConsumptionTimestamp != nil { - data.Set("LastConsumptionTimestamp", fmt.Sprint(*params.LastConsumptionTimestamp)) - } - if params != nil && params.NotificationLevel != nil { - data.Set("NotificationLevel", *params.NotificationLevel) - } + if params != nil && params.LastConsumedMessageIndex != nil { + data.Set("LastConsumedMessageIndex", fmt.Sprint(*params.LastConsumedMessageIndex)) +} + if params != nil && params.LastConsumptionTimestamp != nil { + data.Set("LastConsumptionTimestamp", fmt.Sprint(*params.LastConsumptionTimestamp)) +} + if params != nil && params.NotificationLevel != nil { + data.Set("NotificationLevel", *params.NotificationLevel) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ChatV2ServiceUserUserChannel{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() + + ps := &ChatV2ServiceUserUserChannel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } diff --git a/twilio/rest/chat/v2/model_chat_v2_credential.go b/twilio/rest/chat/v2/model_chat_v2_credential.go index fd8eb761c..1eb1a7d42 100644 --- a/twilio/rest/chat/v2/model_chat_v2_credential.go +++ b/twilio/rest/chat/v2/model_chat_v2_credential.go @@ -1,20 +1,18 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // ChatV2Credential struct for ChatV2Credential type ChatV2Credential struct { // The SID of the Account that created the resource diff --git a/twilio/rest/chat/v2/model_chat_v2_service.go b/twilio/rest/chat/v2/model_chat_v2_service.go index 34218216e..c7a2f51ed 100644 --- a/twilio/rest/chat/v2/model_chat_v2_service.go +++ b/twilio/rest/chat/v2/model_chat_v2_service.go @@ -1,20 +1,18 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // ChatV2Service struct for ChatV2Service type ChatV2Service struct { // The SID of the Account that created the resource diff --git a/twilio/rest/chat/v2/model_chat_v2_service_binding.go b/twilio/rest/chat/v2/model_chat_v2_service_binding.go index 4047afab6..04feb7ea9 100644 --- a/twilio/rest/chat/v2/model_chat_v2_service_binding.go +++ b/twilio/rest/chat/v2/model_chat_v2_service_binding.go @@ -1,20 +1,18 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // ChatV2ServiceBinding struct for ChatV2ServiceBinding type ChatV2ServiceBinding struct { // The SID of the Account that created the resource diff --git a/twilio/rest/chat/v2/model_chat_v2_service_channel.go b/twilio/rest/chat/v2/model_chat_v2_service_channel.go index 4fb11d9c6..1eaf86778 100644 --- a/twilio/rest/chat/v2/model_chat_v2_service_channel.go +++ b/twilio/rest/chat/v2/model_chat_v2_service_channel.go @@ -1,20 +1,18 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // ChatV2ServiceChannel struct for ChatV2ServiceChannel type ChatV2ServiceChannel struct { // The SID of the Account that created the resource diff --git a/twilio/rest/chat/v2/model_chat_v2_service_channel_channel_webhook.go b/twilio/rest/chat/v2/model_chat_v2_service_channel_channel_webhook.go index 4ae08b97c..f27fa24f2 100644 --- a/twilio/rest/chat/v2/model_chat_v2_service_channel_channel_webhook.go +++ b/twilio/rest/chat/v2/model_chat_v2_service_channel_channel_webhook.go @@ -1,20 +1,18 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // ChatV2ServiceChannelChannelWebhook struct for ChatV2ServiceChannelChannelWebhook type ChatV2ServiceChannelChannelWebhook struct { // The SID of the Account that created the resource diff --git a/twilio/rest/chat/v2/model_chat_v2_service_channel_invite.go b/twilio/rest/chat/v2/model_chat_v2_service_channel_invite.go index 3f8f8038c..f3f5cb393 100644 --- a/twilio/rest/chat/v2/model_chat_v2_service_channel_invite.go +++ b/twilio/rest/chat/v2/model_chat_v2_service_channel_invite.go @@ -1,20 +1,18 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // ChatV2ServiceChannelInvite struct for ChatV2ServiceChannelInvite type ChatV2ServiceChannelInvite struct { // The SID of the Account that created the resource diff --git a/twilio/rest/chat/v2/model_chat_v2_service_channel_member.go b/twilio/rest/chat/v2/model_chat_v2_service_channel_member.go index 1bd6fac4a..3d7597924 100644 --- a/twilio/rest/chat/v2/model_chat_v2_service_channel_member.go +++ b/twilio/rest/chat/v2/model_chat_v2_service_channel_member.go @@ -1,20 +1,18 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // ChatV2ServiceChannelMember struct for ChatV2ServiceChannelMember type ChatV2ServiceChannelMember struct { // The SID of the Account that created the resource diff --git a/twilio/rest/chat/v2/model_chat_v2_service_channel_message.go b/twilio/rest/chat/v2/model_chat_v2_service_channel_message.go index 42b284fdd..6d9464447 100644 --- a/twilio/rest/chat/v2/model_chat_v2_service_channel_message.go +++ b/twilio/rest/chat/v2/model_chat_v2_service_channel_message.go @@ -1,20 +1,18 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // ChatV2ServiceChannelMessage struct for ChatV2ServiceChannelMessage type ChatV2ServiceChannelMessage struct { // The SID of the Account that created the resource diff --git a/twilio/rest/chat/v2/model_chat_v2_service_role.go b/twilio/rest/chat/v2/model_chat_v2_service_role.go index fd9a4abb8..941a51954 100644 --- a/twilio/rest/chat/v2/model_chat_v2_service_role.go +++ b/twilio/rest/chat/v2/model_chat_v2_service_role.go @@ -1,20 +1,18 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // ChatV2ServiceRole struct for ChatV2ServiceRole type ChatV2ServiceRole struct { // The SID of the Account that created the resource diff --git a/twilio/rest/chat/v2/model_chat_v2_service_user.go b/twilio/rest/chat/v2/model_chat_v2_service_user.go index 2eac57fe8..f00ecc28c 100644 --- a/twilio/rest/chat/v2/model_chat_v2_service_user.go +++ b/twilio/rest/chat/v2/model_chat_v2_service_user.go @@ -1,20 +1,18 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // ChatV2ServiceUser struct for ChatV2ServiceUser type ChatV2ServiceUser struct { // The SID of the Account that created the resource diff --git a/twilio/rest/chat/v2/model_chat_v2_service_user_user_binding.go b/twilio/rest/chat/v2/model_chat_v2_service_user_user_binding.go index ed39cd819..0d0c8fe8b 100644 --- a/twilio/rest/chat/v2/model_chat_v2_service_user_user_binding.go +++ b/twilio/rest/chat/v2/model_chat_v2_service_user_user_binding.go @@ -1,20 +1,18 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // ChatV2ServiceUserUserBinding struct for ChatV2ServiceUserUserBinding type ChatV2ServiceUserUserBinding struct { // The SID of the Account that created the resource diff --git a/twilio/rest/chat/v2/model_chat_v2_service_user_user_channel.go b/twilio/rest/chat/v2/model_chat_v2_service_user_user_channel.go index d658070b0..7b0b8b211 100644 --- a/twilio/rest/chat/v2/model_chat_v2_service_user_user_channel.go +++ b/twilio/rest/chat/v2/model_chat_v2_service_user_user_channel.go @@ -1,16 +1,15 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ChatV2ServiceUserUserChannel struct for ChatV2ServiceUserUserChannel type ChatV2ServiceUserUserChannel struct { // The SID of the Account that created the resource diff --git a/twilio/rest/chat/v2/model_list_binding_response.go b/twilio/rest/chat/v2/model_list_binding_response.go index ecee4ce41..82df8e165 100644 --- a/twilio/rest/chat/v2/model_list_binding_response.go +++ b/twilio/rest/chat/v2/model_list_binding_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListBindingResponse struct for ListBindingResponse type ListBindingResponse struct { - Bindings []ChatV2ServiceBinding `json:"Bindings,omitempty"` - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Bindings []ChatV2ServiceBinding `json:"Bindings,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/chat/v2/model_list_channel_response.go b/twilio/rest/chat/v2/model_list_channel_response.go index 0781b8ecc..d4babf699 100644 --- a/twilio/rest/chat/v2/model_list_channel_response.go +++ b/twilio/rest/chat/v2/model_list_channel_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListChannelResponse struct for ListChannelResponse type ListChannelResponse struct { - Channels []ChatV2ServiceChannel `json:"Channels,omitempty"` - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Channels []ChatV2ServiceChannel `json:"Channels,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/chat/v2/model_list_channel_webhook_response.go b/twilio/rest/chat/v2/model_list_channel_webhook_response.go index 9697a8884..bcf1e0aac 100644 --- a/twilio/rest/chat/v2/model_list_channel_webhook_response.go +++ b/twilio/rest/chat/v2/model_list_channel_webhook_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListChannelWebhookResponse struct for ListChannelWebhookResponse type ListChannelWebhookResponse struct { - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` Webhooks []ChatV2ServiceChannelChannelWebhook `json:"Webhooks,omitempty"` } diff --git a/twilio/rest/chat/v2/model_list_credential_response.go b/twilio/rest/chat/v2/model_list_credential_response.go index 19cbb1d5d..316809869 100644 --- a/twilio/rest/chat/v2/model_list_credential_response.go +++ b/twilio/rest/chat/v2/model_list_credential_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListCredentialResponse struct for ListCredentialResponse type ListCredentialResponse struct { - Credentials []ChatV2Credential `json:"Credentials,omitempty"` - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Credentials []ChatV2Credential `json:"Credentials,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/chat/v2/model_list_credential_response_meta.go b/twilio/rest/chat/v2/model_list_credential_response_meta.go index 76cc60bd1..3396dd7da 100644 --- a/twilio/rest/chat/v2/model_list_credential_response_meta.go +++ b/twilio/rest/chat/v2/model_list_credential_response_meta.go @@ -1,23 +1,22 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListCredentialResponseMeta struct for ListCredentialResponseMeta type ListCredentialResponseMeta struct { - FirstPageUrl string `json:"FirstPageUrl,omitempty"` - Key string `json:"Key,omitempty"` - NextPageUrl string `json:"NextPageUrl,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` - Url string `json:"Url,omitempty"` + Url string `json:"Url,omitempty"` } diff --git a/twilio/rest/chat/v2/model_list_invite_response.go b/twilio/rest/chat/v2/model_list_invite_response.go index 1523f209e..bc26ba557 100644 --- a/twilio/rest/chat/v2/model_list_invite_response.go +++ b/twilio/rest/chat/v2/model_list_invite_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListInviteResponse struct for ListInviteResponse type ListInviteResponse struct { Invites []ChatV2ServiceChannelInvite `json:"Invites,omitempty"` - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/chat/v2/model_list_member_response.go b/twilio/rest/chat/v2/model_list_member_response.go index 7554ac14d..ac94b13a2 100644 --- a/twilio/rest/chat/v2/model_list_member_response.go +++ b/twilio/rest/chat/v2/model_list_member_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListMemberResponse struct for ListMemberResponse type ListMemberResponse struct { Members []ChatV2ServiceChannelMember `json:"Members,omitempty"` - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/chat/v2/model_list_message_response.go b/twilio/rest/chat/v2/model_list_message_response.go index 103084172..adbe293d7 100644 --- a/twilio/rest/chat/v2/model_list_message_response.go +++ b/twilio/rest/chat/v2/model_list_message_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListMessageResponse struct for ListMessageResponse type ListMessageResponse struct { Messages []ChatV2ServiceChannelMessage `json:"Messages,omitempty"` - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/chat/v2/model_list_role_response.go b/twilio/rest/chat/v2/model_list_role_response.go index 1e7c7cea9..71c581295 100644 --- a/twilio/rest/chat/v2/model_list_role_response.go +++ b/twilio/rest/chat/v2/model_list_role_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListRoleResponse struct for ListRoleResponse type ListRoleResponse struct { - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` - Roles []ChatV2ServiceRole `json:"Roles,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Roles []ChatV2ServiceRole `json:"Roles,omitempty"` } diff --git a/twilio/rest/chat/v2/model_list_service_response.go b/twilio/rest/chat/v2/model_list_service_response.go index 15fa6d3a9..d8d80f169 100644 --- a/twilio/rest/chat/v2/model_list_service_response.go +++ b/twilio/rest/chat/v2/model_list_service_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListServiceResponse struct for ListServiceResponse type ListServiceResponse struct { - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` - Services []ChatV2Service `json:"Services,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Services []ChatV2Service `json:"Services,omitempty"` } diff --git a/twilio/rest/chat/v2/model_list_user_binding_response.go b/twilio/rest/chat/v2/model_list_user_binding_response.go index 09a48b544..496d0f607 100644 --- a/twilio/rest/chat/v2/model_list_user_binding_response.go +++ b/twilio/rest/chat/v2/model_list_user_binding_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListUserBindingResponse struct for ListUserBindingResponse type ListUserBindingResponse struct { Bindings []ChatV2ServiceUserUserBinding `json:"Bindings,omitempty"` - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/chat/v2/model_list_user_channel_response.go b/twilio/rest/chat/v2/model_list_user_channel_response.go index 127345f59..2e7b15da3 100644 --- a/twilio/rest/chat/v2/model_list_user_channel_response.go +++ b/twilio/rest/chat/v2/model_list_user_channel_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListUserChannelResponse struct for ListUserChannelResponse type ListUserChannelResponse struct { Channels []ChatV2ServiceUserUserChannel `json:"Channels,omitempty"` - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/chat/v2/model_list_user_response.go b/twilio/rest/chat/v2/model_list_user_response.go index 072111086..91be110be 100644 --- a/twilio/rest/chat/v2/model_list_user_response.go +++ b/twilio/rest/chat/v2/model_list_user_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListUserResponse struct for ListUserResponse type ListUserResponse struct { - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` - Users []ChatV2ServiceUser `json:"Users,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Users []ChatV2ServiceUser `json:"Users,omitempty"` } diff --git a/twilio/rest/conversations/v1/api_default.go b/twilio/rest/conversations/v1/api_default.go index a3d9ea0a6..806cf1e66 100644 --- a/twilio/rest/conversations/v1/api_default.go +++ b/twilio/rest/conversations/v1/api_default.go @@ -1,11 +1,11 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,11 +14,11 @@ package openapi import ( "encoding/json" "fmt" - "net/url" - "strings" - "time" - twilio "github.com/twilio/twilio-go/client" + "net/url" + "strings" + "time" + "reflect" ) type DefaultApiService struct { @@ -27,24 +27,24 @@ type DefaultApiService struct { } func NewDefaultApiService(client *twilio.Client) *DefaultApiService { - return &DefaultApiService{ - client: client, + return &DefaultApiService { + client: client, baseURL: "https://conversations.twilio.com", } } // CreateConversationParams Optional parameters for the method 'CreateConversation' type CreateConversationParams struct { - XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - MessagingServiceSid *string `json:"MessagingServiceSid,omitempty"` - State *string `json:"State,omitempty"` - TimersClosed *string `json:"Timers.Closed,omitempty"` - TimersInactive *string `json:"Timers.Inactive,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + MessagingServiceSid *string `json:"MessagingServiceSid,omitempty"` + State *string `json:"State,omitempty"` + TimersClosed *string `json:"Timers.Closed,omitempty"` + TimersInactive *string `json:"Timers.Inactive,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` } /* @@ -62,69 +62,68 @@ type CreateConversationParams struct { * @param "TimersInactive" (string) - ISO8601 duration when conversation will be switched to `inactive` state. Minimum value for this timer is 1 minute. * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. * @return ConversationsV1Conversation - */ +*/ func (c *DefaultApiService) CreateConversation(params *CreateConversationParams) (*ConversationsV1Conversation, error) { - path := "/v1/Conversations" + path := "/v1/Conversations" - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) - } - if params != nil && params.DateCreated != nil { - data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) - } - if params != nil && params.DateUpdated != nil { - data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.MessagingServiceSid != nil { - data.Set("MessagingServiceSid", *params.MessagingServiceSid) - } - if params != nil && params.State != nil { - data.Set("State", *params.State) - } - if params != nil && params.TimersClosed != nil { - data.Set("TimersClosed", *params.TimersClosed) - } - if params != nil && params.TimersInactive != nil { - data.Set("TimersInactive", *params.TimersInactive) - } - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) - } + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) +} + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) +} + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.MessagingServiceSid != nil { + data.Set("MessagingServiceSid", *params.MessagingServiceSid) +} + if params != nil && params.State != nil { + data.Set("State", *params.State) +} + if params != nil && params.TimersClosed != nil { + data.Set("TimersClosed", *params.TimersClosed) +} + if params != nil && params.TimersInactive != nil { + data.Set("TimersInactive", *params.TimersInactive) +} + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) +} if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ConversationsV1Conversation{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ConversationsV1Conversation{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } - // CreateConversationMessageParams Optional parameters for the method 'CreateConversationMessage' type CreateConversationMessageParams struct { - XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - Author *string `json:"Author,omitempty"` - Body *string `json:"Body,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - MediaSid *string `json:"MediaSid,omitempty"` + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + Author *string `json:"Author,omitempty"` + Body *string `json:"Body,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + MediaSid *string `json:"MediaSid,omitempty"` } /* @@ -140,63 +139,62 @@ type CreateConversationMessageParams struct { * @param "DateUpdated" (time.Time) - The date that this resource was last updated. `null` if the message has not been edited. * @param "MediaSid" (string) - The Media SID to be attached to the new Message. * @return ConversationsV1ConversationConversationMessage - */ +*/ func (c *DefaultApiService) CreateConversationMessage(ConversationSid string, params *CreateConversationMessageParams) (*ConversationsV1ConversationConversationMessage, error) { - path := "/v1/Conversations/{ConversationSid}/Messages" + path := "/v1/Conversations/{ConversationSid}/Messages" path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) - } - if params != nil && params.Author != nil { - data.Set("Author", *params.Author) - } - if params != nil && params.Body != nil { - data.Set("Body", *params.Body) - } - if params != nil && params.DateCreated != nil { - data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) - } - if params != nil && params.DateUpdated != nil { - data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) - } - if params != nil && params.MediaSid != nil { - data.Set("MediaSid", *params.MediaSid) - } + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) +} + if params != nil && params.Author != nil { + data.Set("Author", *params.Author) +} + if params != nil && params.Body != nil { + data.Set("Body", *params.Body) +} + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) +} + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) +} + if params != nil && params.MediaSid != nil { + data.Set("MediaSid", *params.MediaSid) +} if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ConversationsV1ConversationConversationMessage{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ConversationsV1ConversationConversationMessage{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } - // CreateConversationParticipantParams Optional parameters for the method 'CreateConversationParticipant' type CreateConversationParticipantParams struct { - XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Identity *string `json:"Identity,omitempty"` - MessagingBindingAddress *string `json:"MessagingBinding.Address,omitempty"` - MessagingBindingProjectedAddress *string `json:"MessagingBinding.ProjectedAddress,omitempty"` - MessagingBindingProxyAddress *string `json:"MessagingBinding.ProxyAddress,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + Identity *string `json:"Identity,omitempty"` + MessagingBindingAddress *string `json:"MessagingBinding.Address,omitempty"` + MessagingBindingProjectedAddress *string `json:"MessagingBinding.ProjectedAddress,omitempty"` + MessagingBindingProxyAddress *string `json:"MessagingBinding.ProxyAddress,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` } /* @@ -214,67 +212,66 @@ type CreateConversationParticipantParams struct { * @param "MessagingBindingProxyAddress" (string) - The address of the Twilio phone number (or WhatsApp number) that the participant is in contact with. This field, together with participant address, is only null when the participant is interacting from an SDK endpoint (see the 'identity' field). * @param "RoleSid" (string) - The SID of a conversation-level [Role](https://www.twilio.com/docs/conversations/api/role-resource) to assign to the participant. * @return ConversationsV1ConversationConversationParticipant - */ +*/ func (c *DefaultApiService) CreateConversationParticipant(ConversationSid string, params *CreateConversationParticipantParams) (*ConversationsV1ConversationConversationParticipant, error) { - path := "/v1/Conversations/{ConversationSid}/Participants" + path := "/v1/Conversations/{ConversationSid}/Participants" path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) - } - if params != nil && params.DateCreated != nil { - data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) - } - if params != nil && params.DateUpdated != nil { - data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) - } - if params != nil && params.Identity != nil { - data.Set("Identity", *params.Identity) - } - if params != nil && params.MessagingBindingAddress != nil { - data.Set("MessagingBindingAddress", *params.MessagingBindingAddress) - } - if params != nil && params.MessagingBindingProjectedAddress != nil { - data.Set("MessagingBindingProjectedAddress", *params.MessagingBindingProjectedAddress) - } - if params != nil && params.MessagingBindingProxyAddress != nil { - data.Set("MessagingBindingProxyAddress", *params.MessagingBindingProxyAddress) - } - if params != nil && params.RoleSid != nil { - data.Set("RoleSid", *params.RoleSid) - } + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) +} + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) +} + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) +} + if params != nil && params.Identity != nil { + data.Set("Identity", *params.Identity) +} + if params != nil && params.MessagingBindingAddress != nil { + data.Set("MessagingBindingAddress", *params.MessagingBindingAddress) +} + if params != nil && params.MessagingBindingProjectedAddress != nil { + data.Set("MessagingBindingProjectedAddress", *params.MessagingBindingProjectedAddress) +} + if params != nil && params.MessagingBindingProxyAddress != nil { + data.Set("MessagingBindingProxyAddress", *params.MessagingBindingProxyAddress) +} + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) +} if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ConversationsV1ConversationConversationParticipant{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ConversationsV1ConversationConversationParticipant{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } - // CreateConversationScopedWebhookParams Optional parameters for the method 'CreateConversationScopedWebhook' type CreateConversationScopedWebhookParams struct { - ConfigurationFilters *[]string `json:"Configuration.Filters,omitempty"` - ConfigurationFlowSid *string `json:"Configuration.FlowSid,omitempty"` - ConfigurationMethod *string `json:"Configuration.Method,omitempty"` - ConfigurationReplayAfter *int32 `json:"Configuration.ReplayAfter,omitempty"` - ConfigurationTriggers *[]string `json:"Configuration.Triggers,omitempty"` - ConfigurationUrl *string `json:"Configuration.Url,omitempty"` - Target *string `json:"Target,omitempty"` + ConfigurationFilters *[]string `json:"Configuration.Filters,omitempty"` + ConfigurationFlowSid *string `json:"Configuration.FlowSid,omitempty"` + ConfigurationMethod *string `json:"Configuration.Method,omitempty"` + ConfigurationReplayAfter *int32 `json:"Configuration.ReplayAfter,omitempty"` + ConfigurationTriggers *[]string `json:"Configuration.Triggers,omitempty"` + ConfigurationUrl *string `json:"Configuration.Url,omitempty"` + Target *string `json:"Target,omitempty"` } /* @@ -290,60 +287,60 @@ type CreateConversationScopedWebhookParams struct { * @param "ConfigurationUrl" (string) - The absolute url the webhook request should be sent to. * @param "Target" (string) - The target of this webhook: `webhook`, `studio`, `trigger` * @return ConversationsV1ConversationConversationScopedWebhook - */ +*/ func (c *DefaultApiService) CreateConversationScopedWebhook(ConversationSid string, params *CreateConversationScopedWebhookParams) (*ConversationsV1ConversationConversationScopedWebhook, error) { - path := "/v1/Conversations/{ConversationSid}/Webhooks" + path := "/v1/Conversations/{ConversationSid}/Webhooks" path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.ConfigurationFilters != nil { - data.Set("ConfigurationFilters", strings.Join(*params.ConfigurationFilters, ",")) - } - if params != nil && params.ConfigurationFlowSid != nil { - data.Set("ConfigurationFlowSid", *params.ConfigurationFlowSid) - } - if params != nil && params.ConfigurationMethod != nil { - data.Set("ConfigurationMethod", *params.ConfigurationMethod) - } - if params != nil && params.ConfigurationReplayAfter != nil { - data.Set("ConfigurationReplayAfter", fmt.Sprint(*params.ConfigurationReplayAfter)) - } - if params != nil && params.ConfigurationTriggers != nil { - data.Set("ConfigurationTriggers", strings.Join(*params.ConfigurationTriggers, ",")) - } - if params != nil && params.ConfigurationUrl != nil { - data.Set("ConfigurationUrl", *params.ConfigurationUrl) - } - if params != nil && params.Target != nil { - data.Set("Target", *params.Target) - } + if params != nil && params.ConfigurationFilters != nil { + data.Set("ConfigurationFilters", strings.Join(*params.ConfigurationFilters, ",")) +} + if params != nil && params.ConfigurationFlowSid != nil { + data.Set("ConfigurationFlowSid", *params.ConfigurationFlowSid) +} + if params != nil && params.ConfigurationMethod != nil { + data.Set("ConfigurationMethod", *params.ConfigurationMethod) +} + if params != nil && params.ConfigurationReplayAfter != nil { + data.Set("ConfigurationReplayAfter", fmt.Sprint(*params.ConfigurationReplayAfter)) +} + if params != nil && params.ConfigurationTriggers != nil { + data.Set("ConfigurationTriggers", strings.Join(*params.ConfigurationTriggers, ",")) +} + if params != nil && params.ConfigurationUrl != nil { + data.Set("ConfigurationUrl", *params.ConfigurationUrl) +} + if params != nil && params.Target != nil { + data.Set("Target", *params.Target) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ConversationsV1ConversationConversationScopedWebhook{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ConversationsV1ConversationConversationScopedWebhook{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateCredentialParams Optional parameters for the method 'CreateCredential' type CreateCredentialParams struct { - ApiKey *string `json:"ApiKey,omitempty"` - Certificate *string `json:"Certificate,omitempty"` + ApiKey *string `json:"ApiKey,omitempty"` + Certificate *string `json:"Certificate,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` - PrivateKey *string `json:"PrivateKey,omitempty"` - Sandbox *bool `json:"Sandbox,omitempty"` - Secret *string `json:"Secret,omitempty"` - Type *string `json:"Type,omitempty"` + PrivateKey *string `json:"PrivateKey,omitempty"` + Sandbox *bool `json:"Sandbox,omitempty"` + Secret *string `json:"Secret,omitempty"` + Type *string `json:"Type,omitempty"` } /* @@ -358,55 +355,55 @@ type CreateCredentialParams struct { * @param "Secret" (string) - [FCM only] The **Server key** of your project from the Firebase console, found under Settings / Cloud messaging. * @param "Type" (string) - The type of push-notification service the credential is for. Can be: `fcm`, `gcm`, or `apn`. * @return ConversationsV1Credential - */ +*/ func (c *DefaultApiService) CreateCredential(params *CreateCredentialParams) (*ConversationsV1Credential, error) { - path := "/v1/Credentials" + path := "/v1/Credentials" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.ApiKey != nil { - data.Set("ApiKey", *params.ApiKey) - } - if params != nil && params.Certificate != nil { - data.Set("Certificate", *params.Certificate) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.PrivateKey != nil { - data.Set("PrivateKey", *params.PrivateKey) - } - if params != nil && params.Sandbox != nil { - data.Set("Sandbox", fmt.Sprint(*params.Sandbox)) - } - if params != nil && params.Secret != nil { - data.Set("Secret", *params.Secret) - } - if params != nil && params.Type != nil { - data.Set("Type", *params.Type) - } + if params != nil && params.ApiKey != nil { + data.Set("ApiKey", *params.ApiKey) +} + if params != nil && params.Certificate != nil { + data.Set("Certificate", *params.Certificate) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.PrivateKey != nil { + data.Set("PrivateKey", *params.PrivateKey) +} + if params != nil && params.Sandbox != nil { + data.Set("Sandbox", fmt.Sprint(*params.Sandbox)) +} + if params != nil && params.Secret != nil { + data.Set("Secret", *params.Secret) +} + if params != nil && params.Type != nil { + data.Set("Type", *params.Type) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ConversationsV1Credential{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ConversationsV1Credential{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateRoleParams Optional parameters for the method 'CreateRole' type CreateRoleParams struct { - FriendlyName *string `json:"FriendlyName,omitempty"` - Permission *[]string `json:"Permission,omitempty"` - Type *string `json:"Type,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Permission *[]string `json:"Permission,omitempty"` + Type *string `json:"Type,omitempty"` } /* @@ -417,38 +414,38 @@ type CreateRoleParams struct { * @param "Permission" ([]string) - A permission that you grant to the new role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. The values for this parameter depend on the role's `type`. * @param "Type" (string) - The type of role. Can be: `conversation` for [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) roles or `service` for [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) roles. * @return ConversationsV1Role - */ +*/ func (c *DefaultApiService) CreateRole(params *CreateRoleParams) (*ConversationsV1Role, error) { - path := "/v1/Roles" + path := "/v1/Roles" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.Permission != nil { - data.Set("Permission", strings.Join(*params.Permission, ",")) - } - if params != nil && params.Type != nil { - data.Set("Type", *params.Type) - } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.Permission != nil { + data.Set("Permission", strings.Join(*params.Permission, ",")) +} + if params != nil && params.Type != nil { + data.Set("Type", *params.Type) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ConversationsV1Role{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ConversationsV1Role{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateServiceParams Optional parameters for the method 'CreateService' type CreateServiceParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` @@ -460,44 +457,44 @@ type CreateServiceParams struct { * @param optional nil or *CreateServiceParams - Optional Parameters: * @param "FriendlyName" (string) - The human-readable name of this service, limited to 256 characters. Optional. * @return ConversationsV1Service - */ +*/ func (c *DefaultApiService) CreateService(params *CreateServiceParams) (*ConversationsV1Service, error) { - path := "/v1/Services" + path := "/v1/Services" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ConversationsV1Service{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ConversationsV1Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateServiceConversationParams Optional parameters for the method 'CreateServiceConversation' type CreateServiceConversationParams struct { - XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - MessagingServiceSid *string `json:"MessagingServiceSid,omitempty"` - State *string `json:"State,omitempty"` - TimersClosed *string `json:"Timers.Closed,omitempty"` - TimersInactive *string `json:"Timers.Inactive,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + MessagingServiceSid *string `json:"MessagingServiceSid,omitempty"` + State *string `json:"State,omitempty"` + TimersClosed *string `json:"Timers.Closed,omitempty"` + TimersInactive *string `json:"Timers.Inactive,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` } /* @@ -516,70 +513,69 @@ type CreateServiceConversationParams struct { * @param "TimersInactive" (string) - ISO8601 duration when conversation will be switched to `inactive` state. Minimum value for this timer is 1 minute. * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. * @return ConversationsV1ServiceServiceConversation - */ +*/ func (c *DefaultApiService) CreateServiceConversation(ChatServiceSid string, params *CreateServiceConversationParams) (*ConversationsV1ServiceServiceConversation, error) { - path := "/v1/Services/{ChatServiceSid}/Conversations" + path := "/v1/Services/{ChatServiceSid}/Conversations" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) - } - if params != nil && params.DateCreated != nil { - data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) - } - if params != nil && params.DateUpdated != nil { - data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.MessagingServiceSid != nil { - data.Set("MessagingServiceSid", *params.MessagingServiceSid) - } - if params != nil && params.State != nil { - data.Set("State", *params.State) - } - if params != nil && params.TimersClosed != nil { - data.Set("TimersClosed", *params.TimersClosed) - } - if params != nil && params.TimersInactive != nil { - data.Set("TimersInactive", *params.TimersInactive) - } - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) - } + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) +} + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) +} + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.MessagingServiceSid != nil { + data.Set("MessagingServiceSid", *params.MessagingServiceSid) +} + if params != nil && params.State != nil { + data.Set("State", *params.State) +} + if params != nil && params.TimersClosed != nil { + data.Set("TimersClosed", *params.TimersClosed) +} + if params != nil && params.TimersInactive != nil { + data.Set("TimersInactive", *params.TimersInactive) +} + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) +} if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ConversationsV1ServiceServiceConversation{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ConversationsV1ServiceServiceConversation{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } - // CreateServiceConversationMessageParams Optional parameters for the method 'CreateServiceConversationMessage' type CreateServiceConversationMessageParams struct { - XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - Author *string `json:"Author,omitempty"` - Body *string `json:"Body,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - MediaSid *string `json:"MediaSid,omitempty"` + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + Author *string `json:"Author,omitempty"` + Body *string `json:"Body,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + MediaSid *string `json:"MediaSid,omitempty"` } /* @@ -596,64 +592,63 @@ type CreateServiceConversationMessageParams struct { * @param "DateUpdated" (time.Time) - The date that this resource was last updated. `null` if the message has not been edited. * @param "MediaSid" (string) - The Media SID to be attached to the new Message. * @return ConversationsV1ServiceServiceConversationServiceConversationMessage - */ +*/ func (c *DefaultApiService) CreateServiceConversationMessage(ChatServiceSid string, ConversationSid string, params *CreateServiceConversationMessageParams) (*ConversationsV1ServiceServiceConversationServiceConversationMessage, error) { - path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages" + path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) - } - if params != nil && params.Author != nil { - data.Set("Author", *params.Author) - } - if params != nil && params.Body != nil { - data.Set("Body", *params.Body) - } - if params != nil && params.DateCreated != nil { - data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) - } - if params != nil && params.DateUpdated != nil { - data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) - } - if params != nil && params.MediaSid != nil { - data.Set("MediaSid", *params.MediaSid) - } + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) +} + if params != nil && params.Author != nil { + data.Set("Author", *params.Author) +} + if params != nil && params.Body != nil { + data.Set("Body", *params.Body) +} + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) +} + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) +} + if params != nil && params.MediaSid != nil { + data.Set("MediaSid", *params.MediaSid) +} if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ConversationsV1ServiceServiceConversationServiceConversationMessage{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ConversationsV1ServiceServiceConversationServiceConversationMessage{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } - // CreateServiceConversationParticipantParams Optional parameters for the method 'CreateServiceConversationParticipant' type CreateServiceConversationParticipantParams struct { - XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Identity *string `json:"Identity,omitempty"` - MessagingBindingAddress *string `json:"MessagingBinding.Address,omitempty"` - MessagingBindingProjectedAddress *string `json:"MessagingBinding.ProjectedAddress,omitempty"` - MessagingBindingProxyAddress *string `json:"MessagingBinding.ProxyAddress,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + Identity *string `json:"Identity,omitempty"` + MessagingBindingAddress *string `json:"MessagingBinding.Address,omitempty"` + MessagingBindingProjectedAddress *string `json:"MessagingBinding.ProjectedAddress,omitempty"` + MessagingBindingProxyAddress *string `json:"MessagingBinding.ProxyAddress,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` } /* @@ -672,68 +667,67 @@ type CreateServiceConversationParticipantParams struct { * @param "MessagingBindingProxyAddress" (string) - The address of the Twilio phone number (or WhatsApp number) that the participant is in contact with. This field, together with participant address, is only null when the participant is interacting from an SDK endpoint (see the 'identity' field). * @param "RoleSid" (string) - The SID of a conversation-level [Role](https://www.twilio.com/docs/conversations/api/role-resource) to assign to the participant. * @return ConversationsV1ServiceServiceConversationServiceConversationParticipant - */ +*/ func (c *DefaultApiService) CreateServiceConversationParticipant(ChatServiceSid string, ConversationSid string, params *CreateServiceConversationParticipantParams) (*ConversationsV1ServiceServiceConversationServiceConversationParticipant, error) { - path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Participants" + path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Participants" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) - } - if params != nil && params.DateCreated != nil { - data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) - } - if params != nil && params.DateUpdated != nil { - data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) - } - if params != nil && params.Identity != nil { - data.Set("Identity", *params.Identity) - } - if params != nil && params.MessagingBindingAddress != nil { - data.Set("MessagingBindingAddress", *params.MessagingBindingAddress) - } - if params != nil && params.MessagingBindingProjectedAddress != nil { - data.Set("MessagingBindingProjectedAddress", *params.MessagingBindingProjectedAddress) - } - if params != nil && params.MessagingBindingProxyAddress != nil { - data.Set("MessagingBindingProxyAddress", *params.MessagingBindingProxyAddress) - } - if params != nil && params.RoleSid != nil { - data.Set("RoleSid", *params.RoleSid) - } + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) +} + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) +} + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) +} + if params != nil && params.Identity != nil { + data.Set("Identity", *params.Identity) +} + if params != nil && params.MessagingBindingAddress != nil { + data.Set("MessagingBindingAddress", *params.MessagingBindingAddress) +} + if params != nil && params.MessagingBindingProjectedAddress != nil { + data.Set("MessagingBindingProjectedAddress", *params.MessagingBindingProjectedAddress) +} + if params != nil && params.MessagingBindingProxyAddress != nil { + data.Set("MessagingBindingProxyAddress", *params.MessagingBindingProxyAddress) +} + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) +} if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ConversationsV1ServiceServiceConversationServiceConversationParticipant{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ConversationsV1ServiceServiceConversationServiceConversationParticipant{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } - // CreateServiceConversationScopedWebhookParams Optional parameters for the method 'CreateServiceConversationScopedWebhook' type CreateServiceConversationScopedWebhookParams struct { - ConfigurationFilters *[]string `json:"Configuration.Filters,omitempty"` - ConfigurationFlowSid *string `json:"Configuration.FlowSid,omitempty"` - ConfigurationMethod *string `json:"Configuration.Method,omitempty"` - ConfigurationReplayAfter *int32 `json:"Configuration.ReplayAfter,omitempty"` - ConfigurationTriggers *[]string `json:"Configuration.Triggers,omitempty"` - ConfigurationUrl *string `json:"Configuration.Url,omitempty"` - Target *string `json:"Target,omitempty"` + ConfigurationFilters *[]string `json:"Configuration.Filters,omitempty"` + ConfigurationFlowSid *string `json:"Configuration.FlowSid,omitempty"` + ConfigurationMethod *string `json:"Configuration.Method,omitempty"` + ConfigurationReplayAfter *int32 `json:"Configuration.ReplayAfter,omitempty"` + ConfigurationTriggers *[]string `json:"Configuration.Triggers,omitempty"` + ConfigurationUrl *string `json:"Configuration.Url,omitempty"` + Target *string `json:"Target,omitempty"` } /* @@ -750,57 +744,57 @@ type CreateServiceConversationScopedWebhookParams struct { * @param "ConfigurationUrl" (string) - The absolute url the webhook request should be sent to. * @param "Target" (string) - The target of this webhook: `webhook`, `studio`, `trigger` * @return ConversationsV1ServiceServiceConversationServiceConversationScopedWebhook - */ +*/ func (c *DefaultApiService) CreateServiceConversationScopedWebhook(ChatServiceSid string, ConversationSid string, params *CreateServiceConversationScopedWebhookParams) (*ConversationsV1ServiceServiceConversationServiceConversationScopedWebhook, error) { - path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Webhooks" + path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Webhooks" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.ConfigurationFilters != nil { - data.Set("ConfigurationFilters", strings.Join(*params.ConfigurationFilters, ",")) - } - if params != nil && params.ConfigurationFlowSid != nil { - data.Set("ConfigurationFlowSid", *params.ConfigurationFlowSid) - } - if params != nil && params.ConfigurationMethod != nil { - data.Set("ConfigurationMethod", *params.ConfigurationMethod) - } - if params != nil && params.ConfigurationReplayAfter != nil { - data.Set("ConfigurationReplayAfter", fmt.Sprint(*params.ConfigurationReplayAfter)) - } - if params != nil && params.ConfigurationTriggers != nil { - data.Set("ConfigurationTriggers", strings.Join(*params.ConfigurationTriggers, ",")) - } - if params != nil && params.ConfigurationUrl != nil { - data.Set("ConfigurationUrl", *params.ConfigurationUrl) - } - if params != nil && params.Target != nil { - data.Set("Target", *params.Target) - } + if params != nil && params.ConfigurationFilters != nil { + data.Set("ConfigurationFilters", strings.Join(*params.ConfigurationFilters, ",")) +} + if params != nil && params.ConfigurationFlowSid != nil { + data.Set("ConfigurationFlowSid", *params.ConfigurationFlowSid) +} + if params != nil && params.ConfigurationMethod != nil { + data.Set("ConfigurationMethod", *params.ConfigurationMethod) +} + if params != nil && params.ConfigurationReplayAfter != nil { + data.Set("ConfigurationReplayAfter", fmt.Sprint(*params.ConfigurationReplayAfter)) +} + if params != nil && params.ConfigurationTriggers != nil { + data.Set("ConfigurationTriggers", strings.Join(*params.ConfigurationTriggers, ",")) +} + if params != nil && params.ConfigurationUrl != nil { + data.Set("ConfigurationUrl", *params.ConfigurationUrl) +} + if params != nil && params.Target != nil { + data.Set("Target", *params.Target) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ConversationsV1ServiceServiceConversationServiceConversationScopedWebhook{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ConversationsV1ServiceServiceConversationServiceConversationScopedWebhook{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateServiceRoleParams Optional parameters for the method 'CreateServiceRole' type CreateServiceRoleParams struct { - FriendlyName *string `json:"FriendlyName,omitempty"` - Permission *[]string `json:"Permission,omitempty"` - Type *string `json:"Type,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Permission *[]string `json:"Permission,omitempty"` + Type *string `json:"Type,omitempty"` } /* @@ -812,46 +806,46 @@ type CreateServiceRoleParams struct { * @param "Permission" ([]string) - A permission that you grant to the new role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. The values for this parameter depend on the role's `type`. * @param "Type" (string) - The type of role. Can be: `conversation` for [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) roles or `service` for [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) roles. * @return ConversationsV1ServiceServiceRole - */ +*/ func (c *DefaultApiService) CreateServiceRole(ChatServiceSid string, params *CreateServiceRoleParams) (*ConversationsV1ServiceServiceRole, error) { - path := "/v1/Services/{ChatServiceSid}/Roles" + path := "/v1/Services/{ChatServiceSid}/Roles" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.Permission != nil { - data.Set("Permission", strings.Join(*params.Permission, ",")) - } - if params != nil && params.Type != nil { - data.Set("Type", *params.Type) - } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.Permission != nil { + data.Set("Permission", strings.Join(*params.Permission, ",")) +} + if params != nil && params.Type != nil { + data.Set("Type", *params.Type) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ConversationsV1ServiceServiceRole{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ConversationsV1ServiceServiceRole{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateServiceUserParams Optional parameters for the method 'CreateServiceUser' type CreateServiceUserParams struct { XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Identity *string `json:"Identity,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Identity *string `json:"Identity,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` } /* @@ -865,53 +859,52 @@ type CreateServiceUserParams struct { * @param "Identity" (string) - The application-defined string that uniquely identifies the resource's User within the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource). This value is often a username or an email address, and is case-sensitive. * @param "RoleSid" (string) - The SID of a service-level [Role](https://www.twilio.com/docs/conversations/api/role-resource) to assign to the user. * @return ConversationsV1ServiceServiceUser - */ +*/ func (c *DefaultApiService) CreateServiceUser(ChatServiceSid string, params *CreateServiceUserParams) (*ConversationsV1ServiceServiceUser, error) { - path := "/v1/Services/{ChatServiceSid}/Users" + path := "/v1/Services/{ChatServiceSid}/Users" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.Identity != nil { - data.Set("Identity", *params.Identity) - } - if params != nil && params.RoleSid != nil { - data.Set("RoleSid", *params.RoleSid) - } + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.Identity != nil { + data.Set("Identity", *params.Identity) +} + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) +} if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ConversationsV1ServiceServiceUser{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ConversationsV1ServiceServiceUser{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } - // CreateUserParams Optional parameters for the method 'CreateUser' type CreateUserParams struct { XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Identity *string `json:"Identity,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Identity *string `json:"Identity,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` } /* @@ -924,45 +917,44 @@ type CreateUserParams struct { * @param "Identity" (string) - The application-defined string that uniquely identifies the resource's User within the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource). This value is often a username or an email address, and is case-sensitive. * @param "RoleSid" (string) - The SID of a service-level [Role](https://www.twilio.com/docs/conversations/api/role-resource) to assign to the user. * @return ConversationsV1User - */ +*/ func (c *DefaultApiService) CreateUser(params *CreateUserParams) (*ConversationsV1User, error) { - path := "/v1/Users" + path := "/v1/Users" - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.Identity != nil { - data.Set("Identity", *params.Identity) - } - if params != nil && params.RoleSid != nil { - data.Set("RoleSid", *params.RoleSid) - } + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.Identity != nil { + data.Set("Identity", *params.Identity) +} + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) +} if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ConversationsV1User{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ConversationsV1User{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } - // DeleteConversationParams Optional parameters for the method 'DeleteConversation' type DeleteConversationParams struct { XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` @@ -974,28 +966,28 @@ type DeleteConversationParams struct { * @param Sid A 34 character string that uniquely identifies this resource. Can also be the `unique_name` of the Conversation. * @param optional nil or *DeleteConversationParams - Optional Parameters: * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header - */ -func (c *DefaultApiService) DeleteConversation(Sid string, params *DeleteConversationParams) error { - path := "/v1/Conversations/{Sid}" +*/ +func (c *DefaultApiService) DeleteConversation(Sid string, params *DeleteConversationParams) (error) { + path := "/v1/Conversations/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) + if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } - // DeleteConversationMessageParams Optional parameters for the method 'DeleteConversationMessage' type DeleteConversationMessageParams struct { XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` @@ -1008,29 +1000,29 @@ type DeleteConversationMessageParams struct { * @param Sid A 34 character string that uniquely identifies this resource. * @param optional nil or *DeleteConversationMessageParams - Optional Parameters: * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header - */ -func (c *DefaultApiService) DeleteConversationMessage(ConversationSid string, Sid string, params *DeleteConversationMessageParams) error { - path := "/v1/Conversations/{ConversationSid}/Messages/{Sid}" +*/ +func (c *DefaultApiService) DeleteConversationMessage(ConversationSid string, Sid string, params *DeleteConversationMessageParams) (error) { + path := "/v1/Conversations/{ConversationSid}/Messages/{Sid}" path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) + if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } - // DeleteConversationParticipantParams Optional parameters for the method 'DeleteConversationParticipant' type DeleteConversationParticipantParams struct { XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` @@ -1043,27 +1035,28 @@ type DeleteConversationParticipantParams struct { * @param Sid A 34 character string that uniquely identifies this resource. * @param optional nil or *DeleteConversationParticipantParams - Optional Parameters: * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header - */ -func (c *DefaultApiService) DeleteConversationParticipant(ConversationSid string, Sid string, params *DeleteConversationParticipantParams) error { - path := "/v1/Conversations/{ConversationSid}/Participants/{Sid}" +*/ +func (c *DefaultApiService) DeleteConversationParticipant(ConversationSid string, Sid string, params *DeleteConversationParticipantParams) (error) { + path := "/v1/Conversations/{ConversationSid}/Participants/{Sid}" path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) + if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -1071,89 +1064,97 @@ func (c *DefaultApiService) DeleteConversationParticipant(ConversationSid string * Remove an existing webhook scoped to the conversation * @param ConversationSid The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this webhook. * @param Sid A 34 character string that uniquely identifies this resource. - */ -func (c *DefaultApiService) DeleteConversationScopedWebhook(ConversationSid string, Sid string) error { - path := "/v1/Conversations/{ConversationSid}/Webhooks/{Sid}" +*/ +func (c *DefaultApiService) DeleteConversationScopedWebhook(ConversationSid string, Sid string, ) (error) { + path := "/v1/Conversations/{ConversationSid}/Webhooks/{Sid}" path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* * DeleteCredential Method for DeleteCredential * Remove a push notification credential from your account * @param Sid A 34 character string that uniquely identifies this resource. - */ -func (c *DefaultApiService) DeleteCredential(Sid string) error { - path := "/v1/Credentials/{Sid}" +*/ +func (c *DefaultApiService) DeleteCredential(Sid string, ) (error) { + path := "/v1/Credentials/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - return nil + defer resp.Body.Close() + + return nil } /* * DeleteRole Method for DeleteRole * Remove a user role from your account's default service * @param Sid The SID of the Role resource to delete. - */ -func (c *DefaultApiService) DeleteRole(Sid string) error { - path := "/v1/Roles/{Sid}" +*/ +func (c *DefaultApiService) DeleteRole(Sid string, ) (error) { + path := "/v1/Roles/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* * DeleteService Method for DeleteService * Remove a conversation service with all its nested resources from your account * @param Sid A 34 character string that uniquely identifies this resource. - */ -func (c *DefaultApiService) DeleteService(Sid string) error { - path := "/v1/Services/{Sid}" +*/ +func (c *DefaultApiService) DeleteService(Sid string, ) (error) { + path := "/v1/Services/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - return nil + defer resp.Body.Close() + + return nil } /* @@ -1161,25 +1162,26 @@ func (c *DefaultApiService) DeleteService(Sid string) error { * Remove a push notification binding from the conversation service * @param ChatServiceSid The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) to delete the Binding resource from. * @param Sid The SID of the Binding resource to delete. - */ -func (c *DefaultApiService) DeleteServiceBinding(ChatServiceSid string, Sid string) error { - path := "/v1/Services/{ChatServiceSid}/Bindings/{Sid}" +*/ +func (c *DefaultApiService) DeleteServiceBinding(ChatServiceSid string, Sid string, ) (error) { + path := "/v1/Services/{ChatServiceSid}/Bindings/{Sid}" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil -} + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + return nil +} // DeleteServiceConversationParams Optional parameters for the method 'DeleteServiceConversation' type DeleteServiceConversationParams struct { XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` @@ -1192,29 +1194,29 @@ type DeleteServiceConversationParams struct { * @param Sid A 34 character string that uniquely identifies this resource. Can also be the `unique_name` of the Conversation. * @param optional nil or *DeleteServiceConversationParams - Optional Parameters: * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header - */ -func (c *DefaultApiService) DeleteServiceConversation(ChatServiceSid string, Sid string, params *DeleteServiceConversationParams) error { - path := "/v1/Services/{ChatServiceSid}/Conversations/{Sid}" +*/ +func (c *DefaultApiService) DeleteServiceConversation(ChatServiceSid string, Sid string, params *DeleteServiceConversationParams) (error) { + path := "/v1/Services/{ChatServiceSid}/Conversations/{Sid}" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) + if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } - // DeleteServiceConversationMessageParams Optional parameters for the method 'DeleteServiceConversationMessage' type DeleteServiceConversationMessageParams struct { XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` @@ -1228,30 +1230,30 @@ type DeleteServiceConversationMessageParams struct { * @param Sid A 34 character string that uniquely identifies this resource. * @param optional nil or *DeleteServiceConversationMessageParams - Optional Parameters: * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header - */ -func (c *DefaultApiService) DeleteServiceConversationMessage(ChatServiceSid string, ConversationSid string, Sid string, params *DeleteServiceConversationMessageParams) error { - path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages/{Sid}" +*/ +func (c *DefaultApiService) DeleteServiceConversationMessage(ChatServiceSid string, ConversationSid string, Sid string, params *DeleteServiceConversationMessageParams) (error) { + path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages/{Sid}" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) + if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } - // DeleteServiceConversationParticipantParams Optional parameters for the method 'DeleteServiceConversationParticipant' type DeleteServiceConversationParticipantParams struct { XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` @@ -1265,28 +1267,29 @@ type DeleteServiceConversationParticipantParams struct { * @param Sid A 34 character string that uniquely identifies this resource. * @param optional nil or *DeleteServiceConversationParticipantParams - Optional Parameters: * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header - */ -func (c *DefaultApiService) DeleteServiceConversationParticipant(ChatServiceSid string, ConversationSid string, Sid string, params *DeleteServiceConversationParticipantParams) error { - path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Participants/{Sid}" +*/ +func (c *DefaultApiService) DeleteServiceConversationParticipant(ChatServiceSid string, ConversationSid string, Sid string, params *DeleteServiceConversationParticipantParams) (error) { + path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Participants/{Sid}" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) + if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -1295,24 +1298,26 @@ func (c *DefaultApiService) DeleteServiceConversationParticipant(ChatServiceSid * @param ChatServiceSid The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Participant resource is associated with. * @param ConversationSid The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this webhook. * @param Sid A 34 character string that uniquely identifies this resource. - */ -func (c *DefaultApiService) DeleteServiceConversationScopedWebhook(ChatServiceSid string, ConversationSid string, Sid string) error { - path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Webhooks/{Sid}" +*/ +func (c *DefaultApiService) DeleteServiceConversationScopedWebhook(ChatServiceSid string, ConversationSid string, Sid string, ) (error) { + path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Webhooks/{Sid}" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* @@ -1320,25 +1325,26 @@ func (c *DefaultApiService) DeleteServiceConversationScopedWebhook(ChatServiceSi * Remove a user role from your service * @param ChatServiceSid The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) to delete the Role resource from. * @param Sid The SID of the Role resource to delete. - */ -func (c *DefaultApiService) DeleteServiceRole(ChatServiceSid string, Sid string) error { - path := "/v1/Services/{ChatServiceSid}/Roles/{Sid}" +*/ +func (c *DefaultApiService) DeleteServiceRole(ChatServiceSid string, Sid string, ) (error) { + path := "/v1/Services/{ChatServiceSid}/Roles/{Sid}" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil -} + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + defer resp.Body.Close() + + return nil +} // DeleteServiceUserParams Optional parameters for the method 'DeleteServiceUser' type DeleteServiceUserParams struct { XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` @@ -1351,29 +1357,29 @@ type DeleteServiceUserParams struct { * @param Sid The SID of the User resource to delete. This value can be either the `sid` or the `identity` of the User resource to delete. * @param optional nil or *DeleteServiceUserParams - Optional Parameters: * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header - */ -func (c *DefaultApiService) DeleteServiceUser(ChatServiceSid string, Sid string, params *DeleteServiceUserParams) error { - path := "/v1/Services/{ChatServiceSid}/Users/{Sid}" +*/ +func (c *DefaultApiService) DeleteServiceUser(ChatServiceSid string, Sid string, params *DeleteServiceUserParams) (error) { + path := "/v1/Services/{ChatServiceSid}/Users/{Sid}" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) + if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } - // DeleteUserParams Optional parameters for the method 'DeleteUser' type DeleteUserParams struct { XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` @@ -1385,77 +1391,82 @@ type DeleteUserParams struct { * @param Sid The SID of the User resource to delete. This value can be either the `sid` or the `identity` of the User resource to delete. * @param optional nil or *DeleteUserParams - Optional Parameters: * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header - */ -func (c *DefaultApiService) DeleteUser(Sid string, params *DeleteUserParams) error { - path := "/v1/Users/{Sid}" +*/ +func (c *DefaultApiService) DeleteUser(Sid string, params *DeleteUserParams) (error) { + path := "/v1/Users/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) + if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* * FetchConfiguration Method for FetchConfiguration * Fetch the global configuration of conversations on your account * @return ConversationsV1Configuration - */ +*/ func (c *DefaultApiService) FetchConfiguration() (*ConversationsV1Configuration, error) { - path := "/v1/Configuration" + path := "/v1/Configuration" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ConversationsV1Configuration{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ConversationsV1Configuration{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * FetchConfigurationWebhook Method for FetchConfigurationWebhook * @return ConversationsV1ConfigurationConfigurationWebhook - */ +*/ func (c *DefaultApiService) FetchConfigurationWebhook() (*ConversationsV1ConfigurationConfigurationWebhook, error) { - path := "/v1/Configuration/Webhooks" + path := "/v1/Configuration/Webhooks" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ConversationsV1ConfigurationConfigurationWebhook{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ConversationsV1ConfigurationConfigurationWebhook{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -1463,27 +1474,29 @@ func (c *DefaultApiService) FetchConfigurationWebhook() (*ConversationsV1Configu * Fetch a conversation from your account's default service * @param Sid A 34 character string that uniquely identifies this resource. Can also be the `unique_name` of the Conversation. * @return ConversationsV1Conversation - */ -func (c *DefaultApiService) FetchConversation(Sid string) (*ConversationsV1Conversation, error) { - path := "/v1/Conversations/{Sid}" +*/ +func (c *DefaultApiService) FetchConversation(Sid string, ) (*ConversationsV1Conversation, error) { + path := "/v1/Conversations/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ConversationsV1Conversation{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &ConversationsV1Conversation{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -1492,28 +1505,30 @@ func (c *DefaultApiService) FetchConversation(Sid string) (*ConversationsV1Conve * @param ConversationSid The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this message. * @param Sid A 34 character string that uniquely identifies this resource. * @return ConversationsV1ConversationConversationMessage - */ -func (c *DefaultApiService) FetchConversationMessage(ConversationSid string, Sid string) (*ConversationsV1ConversationConversationMessage, error) { - path := "/v1/Conversations/{ConversationSid}/Messages/{Sid}" +*/ +func (c *DefaultApiService) FetchConversationMessage(ConversationSid string, Sid string, ) (*ConversationsV1ConversationConversationMessage, error) { + path := "/v1/Conversations/{ConversationSid}/Messages/{Sid}" path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ConversationsV1ConversationConversationMessage{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &ConversationsV1ConversationConversationMessage{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -1523,29 +1538,31 @@ func (c *DefaultApiService) FetchConversationMessage(ConversationSid string, Sid * @param MessageSid The SID of the message within a [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) the delivery receipt belongs to. * @param Sid A 34 character string that uniquely identifies this resource. * @return ConversationsV1ConversationConversationMessageConversationMessageReceipt - */ -func (c *DefaultApiService) FetchConversationMessageReceipt(ConversationSid string, MessageSid string, Sid string) (*ConversationsV1ConversationConversationMessageConversationMessageReceipt, error) { - path := "/v1/Conversations/{ConversationSid}/Messages/{MessageSid}/Receipts/{Sid}" +*/ +func (c *DefaultApiService) FetchConversationMessageReceipt(ConversationSid string, MessageSid string, Sid string, ) (*ConversationsV1ConversationConversationMessageConversationMessageReceipt, error) { + path := "/v1/Conversations/{ConversationSid}/Messages/{MessageSid}/Receipts/{Sid}" path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) path = strings.Replace(path, "{"+"MessageSid"+"}", MessageSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ConversationsV1ConversationConversationMessageConversationMessageReceipt{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &ConversationsV1ConversationConversationMessageConversationMessageReceipt{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -1554,28 +1571,30 @@ func (c *DefaultApiService) FetchConversationMessageReceipt(ConversationSid stri * @param ConversationSid The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this participant. * @param Sid A 34 character string that uniquely identifies this resource. * @return ConversationsV1ConversationConversationParticipant - */ -func (c *DefaultApiService) FetchConversationParticipant(ConversationSid string, Sid string) (*ConversationsV1ConversationConversationParticipant, error) { - path := "/v1/Conversations/{ConversationSid}/Participants/{Sid}" +*/ +func (c *DefaultApiService) FetchConversationParticipant(ConversationSid string, Sid string, ) (*ConversationsV1ConversationConversationParticipant, error) { + path := "/v1/Conversations/{ConversationSid}/Participants/{Sid}" path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ConversationsV1ConversationConversationParticipant{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &ConversationsV1ConversationConversationParticipant{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -1584,28 +1603,30 @@ func (c *DefaultApiService) FetchConversationParticipant(ConversationSid string, * @param ConversationSid The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this webhook. * @param Sid A 34 character string that uniquely identifies this resource. * @return ConversationsV1ConversationConversationScopedWebhook - */ -func (c *DefaultApiService) FetchConversationScopedWebhook(ConversationSid string, Sid string) (*ConversationsV1ConversationConversationScopedWebhook, error) { - path := "/v1/Conversations/{ConversationSid}/Webhooks/{Sid}" +*/ +func (c *DefaultApiService) FetchConversationScopedWebhook(ConversationSid string, Sid string, ) (*ConversationsV1ConversationConversationScopedWebhook, error) { + path := "/v1/Conversations/{ConversationSid}/Webhooks/{Sid}" path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ConversationsV1ConversationConversationScopedWebhook{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err + defer resp.Body.Close() + + ps := &ConversationsV1ConversationConversationScopedWebhook{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -1613,27 +1634,29 @@ func (c *DefaultApiService) FetchConversationScopedWebhook(ConversationSid strin * Fetch a push notification credential from your account * @param Sid A 34 character string that uniquely identifies this resource. * @return ConversationsV1Credential - */ -func (c *DefaultApiService) FetchCredential(Sid string) (*ConversationsV1Credential, error) { - path := "/v1/Credentials/{Sid}" +*/ +func (c *DefaultApiService) FetchCredential(Sid string, ) (*ConversationsV1Credential, error) { + path := "/v1/Credentials/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ConversationsV1Credential{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err + defer resp.Body.Close() + + ps := &ConversationsV1Credential{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -1641,27 +1664,29 @@ func (c *DefaultApiService) FetchCredential(Sid string) (*ConversationsV1Credent * Fetch a user role from your account's default service * @param Sid The SID of the Role resource to fetch. * @return ConversationsV1Role - */ -func (c *DefaultApiService) FetchRole(Sid string) (*ConversationsV1Role, error) { - path := "/v1/Roles/{Sid}" +*/ +func (c *DefaultApiService) FetchRole(Sid string, ) (*ConversationsV1Role, error) { + path := "/v1/Roles/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ConversationsV1Role{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &ConversationsV1Role{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -1669,27 +1694,29 @@ func (c *DefaultApiService) FetchRole(Sid string) (*ConversationsV1Role, error) * Fetch a conversation service from your account * @param Sid A 34 character string that uniquely identifies this resource. * @return ConversationsV1Service - */ -func (c *DefaultApiService) FetchService(Sid string) (*ConversationsV1Service, error) { - path := "/v1/Services/{Sid}" +*/ +func (c *DefaultApiService) FetchService(Sid string, ) (*ConversationsV1Service, error) { + path := "/v1/Services/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ConversationsV1Service{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ConversationsV1Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -1698,28 +1725,30 @@ func (c *DefaultApiService) FetchService(Sid string) (*ConversationsV1Service, e * @param ChatServiceSid The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Binding resource is associated with. * @param Sid A 34 character string that uniquely identifies this resource. * @return ConversationsV1ServiceServiceBinding - */ -func (c *DefaultApiService) FetchServiceBinding(ChatServiceSid string, Sid string) (*ConversationsV1ServiceServiceBinding, error) { - path := "/v1/Services/{ChatServiceSid}/Bindings/{Sid}" +*/ +func (c *DefaultApiService) FetchServiceBinding(ChatServiceSid string, Sid string, ) (*ConversationsV1ServiceServiceBinding, error) { + path := "/v1/Services/{ChatServiceSid}/Bindings/{Sid}" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ConversationsV1ServiceServiceBinding{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ConversationsV1ServiceServiceBinding{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -1727,27 +1756,29 @@ func (c *DefaultApiService) FetchServiceBinding(ChatServiceSid string, Sid strin * Fetch the configuration of a conversation service * @param ChatServiceSid The SID of the Service configuration resource to fetch. * @return ConversationsV1ServiceServiceConfiguration - */ -func (c *DefaultApiService) FetchServiceConfiguration(ChatServiceSid string) (*ConversationsV1ServiceServiceConfiguration, error) { - path := "/v1/Services/{ChatServiceSid}/Configuration" +*/ +func (c *DefaultApiService) FetchServiceConfiguration(ChatServiceSid string, ) (*ConversationsV1ServiceServiceConfiguration, error) { + path := "/v1/Services/{ChatServiceSid}/Configuration" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ConversationsV1ServiceServiceConfiguration{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ConversationsV1ServiceServiceConfiguration{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -1756,28 +1787,30 @@ func (c *DefaultApiService) FetchServiceConfiguration(ChatServiceSid string) (*C * @param ChatServiceSid The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Conversation resource is associated with. * @param Sid A 34 character string that uniquely identifies this resource. Can also be the `unique_name` of the Conversation. * @return ConversationsV1ServiceServiceConversation - */ -func (c *DefaultApiService) FetchServiceConversation(ChatServiceSid string, Sid string) (*ConversationsV1ServiceServiceConversation, error) { - path := "/v1/Services/{ChatServiceSid}/Conversations/{Sid}" +*/ +func (c *DefaultApiService) FetchServiceConversation(ChatServiceSid string, Sid string, ) (*ConversationsV1ServiceServiceConversation, error) { + path := "/v1/Services/{ChatServiceSid}/Conversations/{Sid}" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ConversationsV1ServiceServiceConversation{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ConversationsV1ServiceServiceConversation{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -1787,29 +1820,31 @@ func (c *DefaultApiService) FetchServiceConversation(ChatServiceSid string, Sid * @param ConversationSid The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this message. * @param Sid A 34 character string that uniquely identifies this resource. * @return ConversationsV1ServiceServiceConversationServiceConversationMessage - */ -func (c *DefaultApiService) FetchServiceConversationMessage(ChatServiceSid string, ConversationSid string, Sid string) (*ConversationsV1ServiceServiceConversationServiceConversationMessage, error) { - path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages/{Sid}" +*/ +func (c *DefaultApiService) FetchServiceConversationMessage(ChatServiceSid string, ConversationSid string, Sid string, ) (*ConversationsV1ServiceServiceConversationServiceConversationMessage, error) { + path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages/{Sid}" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ConversationsV1ServiceServiceConversationServiceConversationMessage{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &ConversationsV1ServiceServiceConversationServiceConversationMessage{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -1820,30 +1855,32 @@ func (c *DefaultApiService) FetchServiceConversationMessage(ChatServiceSid strin * @param MessageSid The SID of the message within a [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) the delivery receipt belongs to. * @param Sid A 34 character string that uniquely identifies this resource. * @return ConversationsV1ServiceServiceConversationServiceConversationMessageServiceConversationMessageReceipt - */ -func (c *DefaultApiService) FetchServiceConversationMessageReceipt(ChatServiceSid string, ConversationSid string, MessageSid string, Sid string) (*ConversationsV1ServiceServiceConversationServiceConversationMessageServiceConversationMessageReceipt, error) { - path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages/{MessageSid}/Receipts/{Sid}" +*/ +func (c *DefaultApiService) FetchServiceConversationMessageReceipt(ChatServiceSid string, ConversationSid string, MessageSid string, Sid string, ) (*ConversationsV1ServiceServiceConversationServiceConversationMessageServiceConversationMessageReceipt, error) { + path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages/{MessageSid}/Receipts/{Sid}" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) path = strings.Replace(path, "{"+"MessageSid"+"}", MessageSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ConversationsV1ServiceServiceConversationServiceConversationMessageServiceConversationMessageReceipt{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &ConversationsV1ServiceServiceConversationServiceConversationMessageServiceConversationMessageReceipt{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -1853,29 +1890,31 @@ func (c *DefaultApiService) FetchServiceConversationMessageReceipt(ChatServiceSi * @param ConversationSid The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this participant. * @param Sid A 34 character string that uniquely identifies this resource. * @return ConversationsV1ServiceServiceConversationServiceConversationParticipant - */ -func (c *DefaultApiService) FetchServiceConversationParticipant(ChatServiceSid string, ConversationSid string, Sid string) (*ConversationsV1ServiceServiceConversationServiceConversationParticipant, error) { - path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Participants/{Sid}" +*/ +func (c *DefaultApiService) FetchServiceConversationParticipant(ChatServiceSid string, ConversationSid string, Sid string, ) (*ConversationsV1ServiceServiceConversationServiceConversationParticipant, error) { + path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Participants/{Sid}" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ConversationsV1ServiceServiceConversationServiceConversationParticipant{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &ConversationsV1ServiceServiceConversationServiceConversationParticipant{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -1885,29 +1924,31 @@ func (c *DefaultApiService) FetchServiceConversationParticipant(ChatServiceSid s * @param ConversationSid The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this webhook. * @param Sid A 34 character string that uniquely identifies this resource. * @return ConversationsV1ServiceServiceConversationServiceConversationScopedWebhook - */ -func (c *DefaultApiService) FetchServiceConversationScopedWebhook(ChatServiceSid string, ConversationSid string, Sid string) (*ConversationsV1ServiceServiceConversationServiceConversationScopedWebhook, error) { - path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Webhooks/{Sid}" +*/ +func (c *DefaultApiService) FetchServiceConversationScopedWebhook(ChatServiceSid string, ConversationSid string, Sid string, ) (*ConversationsV1ServiceServiceConversationServiceConversationScopedWebhook, error) { + path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Webhooks/{Sid}" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ConversationsV1ServiceServiceConversationServiceConversationScopedWebhook{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &ConversationsV1ServiceServiceConversationServiceConversationScopedWebhook{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -1915,27 +1956,29 @@ func (c *DefaultApiService) FetchServiceConversationScopedWebhook(ChatServiceSid * Fetch push notification service settings * @param ChatServiceSid The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Configuration applies to. * @return ConversationsV1ServiceServiceConfigurationServiceNotification - */ -func (c *DefaultApiService) FetchServiceNotification(ChatServiceSid string) (*ConversationsV1ServiceServiceConfigurationServiceNotification, error) { - path := "/v1/Services/{ChatServiceSid}/Configuration/Notifications" +*/ +func (c *DefaultApiService) FetchServiceNotification(ChatServiceSid string, ) (*ConversationsV1ServiceServiceConfigurationServiceNotification, error) { + path := "/v1/Services/{ChatServiceSid}/Configuration/Notifications" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ConversationsV1ServiceServiceConfigurationServiceNotification{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err + defer resp.Body.Close() + + ps := &ConversationsV1ServiceServiceConfigurationServiceNotification{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -1944,28 +1987,30 @@ func (c *DefaultApiService) FetchServiceNotification(ChatServiceSid string) (*Co * @param ChatServiceSid The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) to fetch the Role resource from. * @param Sid The SID of the Role resource to fetch. * @return ConversationsV1ServiceServiceRole - */ -func (c *DefaultApiService) FetchServiceRole(ChatServiceSid string, Sid string) (*ConversationsV1ServiceServiceRole, error) { - path := "/v1/Services/{ChatServiceSid}/Roles/{Sid}" +*/ +func (c *DefaultApiService) FetchServiceRole(ChatServiceSid string, Sid string, ) (*ConversationsV1ServiceServiceRole, error) { + path := "/v1/Services/{ChatServiceSid}/Roles/{Sid}" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ConversationsV1ServiceServiceRole{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err + defer resp.Body.Close() + + ps := &ConversationsV1ServiceServiceRole{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -1974,28 +2019,30 @@ func (c *DefaultApiService) FetchServiceRole(ChatServiceSid string, Sid string) * @param ChatServiceSid The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) to fetch the User resource from. * @param Sid The SID of the User resource to fetch. This value can be either the `sid` or the `identity` of the User resource to fetch. * @return ConversationsV1ServiceServiceUser - */ -func (c *DefaultApiService) FetchServiceUser(ChatServiceSid string, Sid string) (*ConversationsV1ServiceServiceUser, error) { - path := "/v1/Services/{ChatServiceSid}/Users/{Sid}" +*/ +func (c *DefaultApiService) FetchServiceUser(ChatServiceSid string, Sid string, ) (*ConversationsV1ServiceServiceUser, error) { + path := "/v1/Services/{ChatServiceSid}/Users/{Sid}" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ConversationsV1ServiceServiceUser{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err + defer resp.Body.Close() + + ps := &ConversationsV1ServiceServiceUser{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -2003,29 +2050,30 @@ func (c *DefaultApiService) FetchServiceUser(ChatServiceSid string, Sid string) * Fetch a conversation user from your account's default service * @param Sid The SID of the User resource to fetch. This value can be either the `sid` or the `identity` of the User resource to fetch. * @return ConversationsV1User - */ -func (c *DefaultApiService) FetchUser(Sid string) (*ConversationsV1User, error) { - path := "/v1/Users/{Sid}" +*/ +func (c *DefaultApiService) FetchUser(Sid string, ) (*ConversationsV1User, error) { + path := "/v1/Users/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ConversationsV1User{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err -} + defer resp.Body.Close() + + ps := &ConversationsV1User{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListConversationParams Optional parameters for the method 'ListConversation' type ListConversationParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -2037,32 +2085,32 @@ type ListConversationParams struct { * @param optional nil or *ListConversationParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListConversationResponse - */ +*/ func (c *DefaultApiService) ListConversation(params *ListConversationParams) (*ListConversationResponse, error) { - path := "/v1/Conversations" + path := "/v1/Conversations" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListConversationResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListConversationResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListConversationMessageParams Optional parameters for the method 'ListConversationMessage' type ListConversationMessageParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -2075,33 +2123,33 @@ type ListConversationMessageParams struct { * @param optional nil or *ListConversationMessageParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListConversationMessageResponse - */ +*/ func (c *DefaultApiService) ListConversationMessage(ConversationSid string, params *ListConversationMessageParams) (*ListConversationMessageResponse, error) { - path := "/v1/Conversations/{ConversationSid}/Messages" + path := "/v1/Conversations/{ConversationSid}/Messages" path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListConversationMessageResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListConversationMessageResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListConversationMessageReceiptParams Optional parameters for the method 'ListConversationMessageReceipt' type ListConversationMessageReceiptParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -2115,34 +2163,34 @@ type ListConversationMessageReceiptParams struct { * @param optional nil or *ListConversationMessageReceiptParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListConversationMessageReceiptResponse - */ +*/ func (c *DefaultApiService) ListConversationMessageReceipt(ConversationSid string, MessageSid string, params *ListConversationMessageReceiptParams) (*ListConversationMessageReceiptResponse, error) { - path := "/v1/Conversations/{ConversationSid}/Messages/{MessageSid}/Receipts" + path := "/v1/Conversations/{ConversationSid}/Messages/{MessageSid}/Receipts" path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) path = strings.Replace(path, "{"+"MessageSid"+"}", MessageSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListConversationMessageReceiptResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListConversationMessageReceiptResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListConversationParticipantParams Optional parameters for the method 'ListConversationParticipant' type ListConversationParticipantParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -2155,33 +2203,33 @@ type ListConversationParticipantParams struct { * @param optional nil or *ListConversationParticipantParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListConversationParticipantResponse - */ +*/ func (c *DefaultApiService) ListConversationParticipant(ConversationSid string, params *ListConversationParticipantParams) (*ListConversationParticipantResponse, error) { - path := "/v1/Conversations/{ConversationSid}/Participants" + path := "/v1/Conversations/{ConversationSid}/Participants" path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListConversationParticipantResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListConversationParticipantResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListConversationScopedWebhookParams Optional parameters for the method 'ListConversationScopedWebhook' type ListConversationScopedWebhookParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -2194,33 +2242,33 @@ type ListConversationScopedWebhookParams struct { * @param optional nil or *ListConversationScopedWebhookParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListConversationScopedWebhookResponse - */ +*/ func (c *DefaultApiService) ListConversationScopedWebhook(ConversationSid string, params *ListConversationScopedWebhookParams) (*ListConversationScopedWebhookResponse, error) { - path := "/v1/Conversations/{ConversationSid}/Webhooks" + path := "/v1/Conversations/{ConversationSid}/Webhooks" path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListConversationScopedWebhookResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListConversationScopedWebhookResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListCredentialParams Optional parameters for the method 'ListCredential' type ListCredentialParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -2232,32 +2280,32 @@ type ListCredentialParams struct { * @param optional nil or *ListCredentialParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListCredentialResponse - */ +*/ func (c *DefaultApiService) ListCredential(params *ListCredentialParams) (*ListCredentialResponse, error) { - path := "/v1/Credentials" + path := "/v1/Credentials" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListCredentialResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListCredentialResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListRoleParams Optional parameters for the method 'ListRole' type ListRoleParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -2269,32 +2317,32 @@ type ListRoleParams struct { * @param optional nil or *ListRoleParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListRoleResponse - */ +*/ func (c *DefaultApiService) ListRole(params *ListRoleParams) (*ListRoleResponse, error) { - path := "/v1/Roles" + path := "/v1/Roles" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListRoleResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListRoleResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListServiceParams Optional parameters for the method 'ListService' type ListServiceParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -2306,37 +2354,37 @@ type ListServiceParams struct { * @param optional nil or *ListServiceParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListServiceResponse - */ +*/ func (c *DefaultApiService) ListService(params *ListServiceParams) (*ListServiceResponse, error) { - path := "/v1/Services" + path := "/v1/Services" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListServiceResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListServiceResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListServiceBindingParams Optional parameters for the method 'ListServiceBinding' type ListServiceBindingParams struct { BindingType *[]string `json:"BindingType,omitempty"` - Identity *[]string `json:"Identity,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + Identity *[]string `json:"Identity,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -2348,39 +2396,39 @@ type ListServiceBindingParams struct { * @param "Identity" ([]string) - The identity of a [Conversation User](https://www.twilio.com/docs/conversations/api/user-resource) this binding belongs to. See [access tokens](https://www.twilio.com/docs/conversations/create-tokens) for more details. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListServiceBindingResponse - */ +*/ func (c *DefaultApiService) ListServiceBinding(ChatServiceSid string, params *ListServiceBindingParams) (*ListServiceBindingResponse, error) { - path := "/v1/Services/{ChatServiceSid}/Bindings" + path := "/v1/Services/{ChatServiceSid}/Bindings" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.BindingType != nil { - data.Set("BindingType", strings.Join(*params.BindingType, ",")) - } - if params != nil && params.Identity != nil { - data.Set("Identity", strings.Join(*params.Identity, ",")) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.BindingType != nil { + data.Set("BindingType", strings.Join(*params.BindingType, ",")) +} + if params != nil && params.Identity != nil { + data.Set("Identity", strings.Join(*params.Identity, ",")) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListServiceBindingResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListServiceBindingResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListServiceConversationParams Optional parameters for the method 'ListServiceConversation' type ListServiceConversationParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -2393,33 +2441,33 @@ type ListServiceConversationParams struct { * @param optional nil or *ListServiceConversationParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListServiceConversationResponse - */ +*/ func (c *DefaultApiService) ListServiceConversation(ChatServiceSid string, params *ListServiceConversationParams) (*ListServiceConversationResponse, error) { - path := "/v1/Services/{ChatServiceSid}/Conversations" + path := "/v1/Services/{ChatServiceSid}/Conversations" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListServiceConversationResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListServiceConversationResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListServiceConversationMessageParams Optional parameters for the method 'ListServiceConversationMessage' type ListServiceConversationMessageParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -2433,34 +2481,34 @@ type ListServiceConversationMessageParams struct { * @param optional nil or *ListServiceConversationMessageParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListServiceConversationMessageResponse - */ +*/ func (c *DefaultApiService) ListServiceConversationMessage(ChatServiceSid string, ConversationSid string, params *ListServiceConversationMessageParams) (*ListServiceConversationMessageResponse, error) { - path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages" + path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListServiceConversationMessageResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListServiceConversationMessageResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListServiceConversationMessageReceiptParams Optional parameters for the method 'ListServiceConversationMessageReceipt' type ListServiceConversationMessageReceiptParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -2475,35 +2523,35 @@ type ListServiceConversationMessageReceiptParams struct { * @param optional nil or *ListServiceConversationMessageReceiptParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListServiceConversationMessageReceiptResponse - */ +*/ func (c *DefaultApiService) ListServiceConversationMessageReceipt(ChatServiceSid string, ConversationSid string, MessageSid string, params *ListServiceConversationMessageReceiptParams) (*ListServiceConversationMessageReceiptResponse, error) { - path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages/{MessageSid}/Receipts" + path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages/{MessageSid}/Receipts" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) path = strings.Replace(path, "{"+"MessageSid"+"}", MessageSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListServiceConversationMessageReceiptResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListServiceConversationMessageReceiptResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListServiceConversationParticipantParams Optional parameters for the method 'ListServiceConversationParticipant' type ListServiceConversationParticipantParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -2517,34 +2565,34 @@ type ListServiceConversationParticipantParams struct { * @param optional nil or *ListServiceConversationParticipantParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListServiceConversationParticipantResponse - */ +*/ func (c *DefaultApiService) ListServiceConversationParticipant(ChatServiceSid string, ConversationSid string, params *ListServiceConversationParticipantParams) (*ListServiceConversationParticipantResponse, error) { - path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Participants" + path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Participants" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListServiceConversationParticipantResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListServiceConversationParticipantResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListServiceConversationScopedWebhookParams Optional parameters for the method 'ListServiceConversationScopedWebhook' type ListServiceConversationScopedWebhookParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -2558,34 +2606,34 @@ type ListServiceConversationScopedWebhookParams struct { * @param optional nil or *ListServiceConversationScopedWebhookParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListServiceConversationScopedWebhookResponse - */ +*/ func (c *DefaultApiService) ListServiceConversationScopedWebhook(ChatServiceSid string, ConversationSid string, params *ListServiceConversationScopedWebhookParams) (*ListServiceConversationScopedWebhookResponse, error) { - path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Webhooks" + path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Webhooks" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListServiceConversationScopedWebhookResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListServiceConversationScopedWebhookResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListServiceRoleParams Optional parameters for the method 'ListServiceRole' type ListServiceRoleParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -2598,33 +2646,33 @@ type ListServiceRoleParams struct { * @param optional nil or *ListServiceRoleParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListServiceRoleResponse - */ +*/ func (c *DefaultApiService) ListServiceRole(ChatServiceSid string, params *ListServiceRoleParams) (*ListServiceRoleResponse, error) { - path := "/v1/Services/{ChatServiceSid}/Roles" + path := "/v1/Services/{ChatServiceSid}/Roles" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListServiceRoleResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListServiceRoleResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListServiceUserParams Optional parameters for the method 'ListServiceUser' type ListServiceUserParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -2637,33 +2685,33 @@ type ListServiceUserParams struct { * @param optional nil or *ListServiceUserParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListServiceUserResponse - */ +*/ func (c *DefaultApiService) ListServiceUser(ChatServiceSid string, params *ListServiceUserParams) (*ListServiceUserResponse, error) { - path := "/v1/Services/{ChatServiceSid}/Users" + path := "/v1/Services/{ChatServiceSid}/Users" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListServiceUserResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListServiceUserResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListUserParams Optional parameters for the method 'ListUser' type ListUserParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -2675,37 +2723,37 @@ type ListUserParams struct { * @param optional nil or *ListUserParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListUserResponse - */ +*/ func (c *DefaultApiService) ListUser(params *ListUserParams) (*ListUserResponse, error) { - path := "/v1/Users" + path := "/v1/Users" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListUserResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListUserResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateConfigurationParams Optional parameters for the method 'UpdateConfiguration' type UpdateConfigurationParams struct { - DefaultChatServiceSid *string `json:"DefaultChatServiceSid,omitempty"` - DefaultClosedTimer *string `json:"DefaultClosedTimer,omitempty"` - DefaultInactiveTimer *string `json:"DefaultInactiveTimer,omitempty"` + DefaultChatServiceSid *string `json:"DefaultChatServiceSid,omitempty"` + DefaultClosedTimer *string `json:"DefaultClosedTimer,omitempty"` + DefaultInactiveTimer *string `json:"DefaultInactiveTimer,omitempty"` DefaultMessagingServiceSid *string `json:"DefaultMessagingServiceSid,omitempty"` } @@ -2718,48 +2766,48 @@ type UpdateConfigurationParams struct { * @param "DefaultInactiveTimer" (string) - Default ISO8601 duration when conversation will be switched to `inactive` state. Minimum value for this timer is 1 minute. * @param "DefaultMessagingServiceSid" (string) - The SID of the default [Messaging Service](https://www.twilio.com/docs/sms/services/api) to use when creating a conversation. * @return ConversationsV1Configuration - */ +*/ func (c *DefaultApiService) UpdateConfiguration(params *UpdateConfigurationParams) (*ConversationsV1Configuration, error) { - path := "/v1/Configuration" + path := "/v1/Configuration" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.DefaultChatServiceSid != nil { - data.Set("DefaultChatServiceSid", *params.DefaultChatServiceSid) - } - if params != nil && params.DefaultClosedTimer != nil { - data.Set("DefaultClosedTimer", *params.DefaultClosedTimer) - } - if params != nil && params.DefaultInactiveTimer != nil { - data.Set("DefaultInactiveTimer", *params.DefaultInactiveTimer) - } - if params != nil && params.DefaultMessagingServiceSid != nil { - data.Set("DefaultMessagingServiceSid", *params.DefaultMessagingServiceSid) - } + if params != nil && params.DefaultChatServiceSid != nil { + data.Set("DefaultChatServiceSid", *params.DefaultChatServiceSid) +} + if params != nil && params.DefaultClosedTimer != nil { + data.Set("DefaultClosedTimer", *params.DefaultClosedTimer) +} + if params != nil && params.DefaultInactiveTimer != nil { + data.Set("DefaultInactiveTimer", *params.DefaultInactiveTimer) +} + if params != nil && params.DefaultMessagingServiceSid != nil { + data.Set("DefaultMessagingServiceSid", *params.DefaultMessagingServiceSid) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ConversationsV1Configuration{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ConversationsV1Configuration{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateConfigurationWebhookParams Optional parameters for the method 'UpdateConfigurationWebhook' type UpdateConfigurationWebhookParams struct { - Filters *[]string `json:"Filters,omitempty"` - Method *string `json:"Method,omitempty"` - PostWebhookUrl *string `json:"PostWebhookUrl,omitempty"` - PreWebhookUrl *string `json:"PreWebhookUrl,omitempty"` - Target *string `json:"Target,omitempty"` + Filters *[]string `json:"Filters,omitempty"` + Method *string `json:"Method,omitempty"` + PostWebhookUrl *string `json:"PostWebhookUrl,omitempty"` + PreWebhookUrl *string `json:"PreWebhookUrl,omitempty"` + Target *string `json:"Target,omitempty"` } /* @@ -2771,56 +2819,56 @@ type UpdateConfigurationWebhookParams struct { * @param "PreWebhookUrl" (string) - The absolute url the pre-event webhook request should be sent to. * @param "Target" (string) - The routing target of the webhook. * @return ConversationsV1ConfigurationConfigurationWebhook - */ +*/ func (c *DefaultApiService) UpdateConfigurationWebhook(params *UpdateConfigurationWebhookParams) (*ConversationsV1ConfigurationConfigurationWebhook, error) { - path := "/v1/Configuration/Webhooks" + path := "/v1/Configuration/Webhooks" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Filters != nil { - data.Set("Filters", strings.Join(*params.Filters, ",")) - } - if params != nil && params.Method != nil { - data.Set("Method", *params.Method) - } - if params != nil && params.PostWebhookUrl != nil { - data.Set("PostWebhookUrl", *params.PostWebhookUrl) - } - if params != nil && params.PreWebhookUrl != nil { - data.Set("PreWebhookUrl", *params.PreWebhookUrl) - } - if params != nil && params.Target != nil { - data.Set("Target", *params.Target) - } + if params != nil && params.Filters != nil { + data.Set("Filters", strings.Join(*params.Filters, ",")) +} + if params != nil && params.Method != nil { + data.Set("Method", *params.Method) +} + if params != nil && params.PostWebhookUrl != nil { + data.Set("PostWebhookUrl", *params.PostWebhookUrl) +} + if params != nil && params.PreWebhookUrl != nil { + data.Set("PreWebhookUrl", *params.PreWebhookUrl) +} + if params != nil && params.Target != nil { + data.Set("Target", *params.Target) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ConversationsV1ConfigurationConfigurationWebhook{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ConversationsV1ConfigurationConfigurationWebhook{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateConversationParams Optional parameters for the method 'UpdateConversation' type UpdateConversationParams struct { - XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - MessagingServiceSid *string `json:"MessagingServiceSid,omitempty"` - State *string `json:"State,omitempty"` - TimersClosed *string `json:"Timers.Closed,omitempty"` - TimersInactive *string `json:"Timers.Inactive,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + MessagingServiceSid *string `json:"MessagingServiceSid,omitempty"` + State *string `json:"State,omitempty"` + TimersClosed *string `json:"Timers.Closed,omitempty"` + TimersInactive *string `json:"Timers.Inactive,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` } /* @@ -2839,69 +2887,68 @@ type UpdateConversationParams struct { * @param "TimersInactive" (string) - ISO8601 duration when conversation will be switched to `inactive` state. Minimum value for this timer is 1 minute. * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. * @return ConversationsV1Conversation - */ +*/ func (c *DefaultApiService) UpdateConversation(Sid string, params *UpdateConversationParams) (*ConversationsV1Conversation, error) { - path := "/v1/Conversations/{Sid}" + path := "/v1/Conversations/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) - } - if params != nil && params.DateCreated != nil { - data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) - } - if params != nil && params.DateUpdated != nil { - data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.MessagingServiceSid != nil { - data.Set("MessagingServiceSid", *params.MessagingServiceSid) - } - if params != nil && params.State != nil { - data.Set("State", *params.State) - } - if params != nil && params.TimersClosed != nil { - data.Set("TimersClosed", *params.TimersClosed) - } - if params != nil && params.TimersInactive != nil { - data.Set("TimersInactive", *params.TimersInactive) - } - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) - } + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) +} + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) +} + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.MessagingServiceSid != nil { + data.Set("MessagingServiceSid", *params.MessagingServiceSid) +} + if params != nil && params.State != nil { + data.Set("State", *params.State) +} + if params != nil && params.TimersClosed != nil { + data.Set("TimersClosed", *params.TimersClosed) +} + if params != nil && params.TimersInactive != nil { + data.Set("TimersInactive", *params.TimersInactive) +} + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) +} if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ConversationsV1Conversation{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ConversationsV1Conversation{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } - // UpdateConversationMessageParams Optional parameters for the method 'UpdateConversationMessage' type UpdateConversationMessageParams struct { - XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - Author *string `json:"Author,omitempty"` - Body *string `json:"Body,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + Author *string `json:"Author,omitempty"` + Body *string `json:"Body,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` } /* @@ -2917,62 +2964,61 @@ type UpdateConversationMessageParams struct { * @param "DateCreated" (time.Time) - The date that this resource was created. * @param "DateUpdated" (time.Time) - The date that this resource was last updated. `null` if the message has not been edited. * @return ConversationsV1ConversationConversationMessage - */ +*/ func (c *DefaultApiService) UpdateConversationMessage(ConversationSid string, Sid string, params *UpdateConversationMessageParams) (*ConversationsV1ConversationConversationMessage, error) { - path := "/v1/Conversations/{ConversationSid}/Messages/{Sid}" + path := "/v1/Conversations/{ConversationSid}/Messages/{Sid}" path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) - } - if params != nil && params.Author != nil { - data.Set("Author", *params.Author) - } - if params != nil && params.Body != nil { - data.Set("Body", *params.Body) - } - if params != nil && params.DateCreated != nil { - data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) - } - if params != nil && params.DateUpdated != nil { - data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) - } + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) +} + if params != nil && params.Author != nil { + data.Set("Author", *params.Author) +} + if params != nil && params.Body != nil { + data.Set("Body", *params.Body) +} + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) +} + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) +} if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ConversationsV1ConversationConversationMessage{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ConversationsV1ConversationConversationMessage{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } - // UpdateConversationParticipantParams Optional parameters for the method 'UpdateConversationParticipant' type UpdateConversationParticipantParams struct { - XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Identity *string `json:"Identity,omitempty"` - LastReadMessageIndex *int32 `json:"LastReadMessageIndex,omitempty"` - LastReadTimestamp *string `json:"LastReadTimestamp,omitempty"` - MessagingBindingProjectedAddress *string `json:"MessagingBinding.ProjectedAddress,omitempty"` - MessagingBindingProxyAddress *string `json:"MessagingBinding.ProxyAddress,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + Identity *string `json:"Identity,omitempty"` + LastReadMessageIndex *int32 `json:"LastReadMessageIndex,omitempty"` + LastReadTimestamp *string `json:"LastReadTimestamp,omitempty"` + MessagingBindingProjectedAddress *string `json:"MessagingBinding.ProjectedAddress,omitempty"` + MessagingBindingProxyAddress *string `json:"MessagingBinding.ProxyAddress,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` } /* @@ -2992,69 +3038,68 @@ type UpdateConversationParticipantParams struct { * @param "MessagingBindingProxyAddress" (string) - The address of the Twilio phone number that the participant is in contact with. 'null' value will remove it. * @param "RoleSid" (string) - The SID of a conversation-level [Role](https://www.twilio.com/docs/conversations/api/role-resource) to assign to the participant. * @return ConversationsV1ConversationConversationParticipant - */ +*/ func (c *DefaultApiService) UpdateConversationParticipant(ConversationSid string, Sid string, params *UpdateConversationParticipantParams) (*ConversationsV1ConversationConversationParticipant, error) { - path := "/v1/Conversations/{ConversationSid}/Participants/{Sid}" + path := "/v1/Conversations/{ConversationSid}/Participants/{Sid}" path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) - } - if params != nil && params.DateCreated != nil { - data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) - } - if params != nil && params.DateUpdated != nil { - data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) - } - if params != nil && params.Identity != nil { - data.Set("Identity", *params.Identity) - } - if params != nil && params.LastReadMessageIndex != nil { - data.Set("LastReadMessageIndex", fmt.Sprint(*params.LastReadMessageIndex)) - } - if params != nil && params.LastReadTimestamp != nil { - data.Set("LastReadTimestamp", *params.LastReadTimestamp) - } - if params != nil && params.MessagingBindingProjectedAddress != nil { - data.Set("MessagingBindingProjectedAddress", *params.MessagingBindingProjectedAddress) - } - if params != nil && params.MessagingBindingProxyAddress != nil { - data.Set("MessagingBindingProxyAddress", *params.MessagingBindingProxyAddress) - } - if params != nil && params.RoleSid != nil { - data.Set("RoleSid", *params.RoleSid) - } + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) +} + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) +} + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) +} + if params != nil && params.Identity != nil { + data.Set("Identity", *params.Identity) +} + if params != nil && params.LastReadMessageIndex != nil { + data.Set("LastReadMessageIndex", fmt.Sprint(*params.LastReadMessageIndex)) +} + if params != nil && params.LastReadTimestamp != nil { + data.Set("LastReadTimestamp", *params.LastReadTimestamp) +} + if params != nil && params.MessagingBindingProjectedAddress != nil { + data.Set("MessagingBindingProjectedAddress", *params.MessagingBindingProjectedAddress) +} + if params != nil && params.MessagingBindingProxyAddress != nil { + data.Set("MessagingBindingProxyAddress", *params.MessagingBindingProxyAddress) +} + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) +} if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ConversationsV1ConversationConversationParticipant{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ConversationsV1ConversationConversationParticipant{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } - // UpdateConversationScopedWebhookParams Optional parameters for the method 'UpdateConversationScopedWebhook' type UpdateConversationScopedWebhookParams struct { - ConfigurationFilters *[]string `json:"Configuration.Filters,omitempty"` - ConfigurationFlowSid *string `json:"Configuration.FlowSid,omitempty"` - ConfigurationMethod *string `json:"Configuration.Method,omitempty"` + ConfigurationFilters *[]string `json:"Configuration.Filters,omitempty"` + ConfigurationFlowSid *string `json:"Configuration.FlowSid,omitempty"` + ConfigurationMethod *string `json:"Configuration.Method,omitempty"` ConfigurationTriggers *[]string `json:"Configuration.Triggers,omitempty"` - ConfigurationUrl *string `json:"Configuration.Url,omitempty"` + ConfigurationUrl *string `json:"Configuration.Url,omitempty"` } /* @@ -3069,55 +3114,55 @@ type UpdateConversationScopedWebhookParams struct { * @param "ConfigurationTriggers" ([]string) - The list of keywords, firing webhook event for this Conversation. * @param "ConfigurationUrl" (string) - The absolute url the webhook request should be sent to. * @return ConversationsV1ConversationConversationScopedWebhook - */ +*/ func (c *DefaultApiService) UpdateConversationScopedWebhook(ConversationSid string, Sid string, params *UpdateConversationScopedWebhookParams) (*ConversationsV1ConversationConversationScopedWebhook, error) { - path := "/v1/Conversations/{ConversationSid}/Webhooks/{Sid}" + path := "/v1/Conversations/{ConversationSid}/Webhooks/{Sid}" path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.ConfigurationFilters != nil { - data.Set("ConfigurationFilters", strings.Join(*params.ConfigurationFilters, ",")) - } - if params != nil && params.ConfigurationFlowSid != nil { - data.Set("ConfigurationFlowSid", *params.ConfigurationFlowSid) - } - if params != nil && params.ConfigurationMethod != nil { - data.Set("ConfigurationMethod", *params.ConfigurationMethod) - } - if params != nil && params.ConfigurationTriggers != nil { - data.Set("ConfigurationTriggers", strings.Join(*params.ConfigurationTriggers, ",")) - } - if params != nil && params.ConfigurationUrl != nil { - data.Set("ConfigurationUrl", *params.ConfigurationUrl) - } + if params != nil && params.ConfigurationFilters != nil { + data.Set("ConfigurationFilters", strings.Join(*params.ConfigurationFilters, ",")) +} + if params != nil && params.ConfigurationFlowSid != nil { + data.Set("ConfigurationFlowSid", *params.ConfigurationFlowSid) +} + if params != nil && params.ConfigurationMethod != nil { + data.Set("ConfigurationMethod", *params.ConfigurationMethod) +} + if params != nil && params.ConfigurationTriggers != nil { + data.Set("ConfigurationTriggers", strings.Join(*params.ConfigurationTriggers, ",")) +} + if params != nil && params.ConfigurationUrl != nil { + data.Set("ConfigurationUrl", *params.ConfigurationUrl) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ConversationsV1ConversationConversationScopedWebhook{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ConversationsV1ConversationConversationScopedWebhook{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateCredentialParams Optional parameters for the method 'UpdateCredential' type UpdateCredentialParams struct { - ApiKey *string `json:"ApiKey,omitempty"` - Certificate *string `json:"Certificate,omitempty"` + ApiKey *string `json:"ApiKey,omitempty"` + Certificate *string `json:"Certificate,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` - PrivateKey *string `json:"PrivateKey,omitempty"` - Sandbox *bool `json:"Sandbox,omitempty"` - Secret *string `json:"Secret,omitempty"` - Type *string `json:"Type,omitempty"` + PrivateKey *string `json:"PrivateKey,omitempty"` + Sandbox *bool `json:"Sandbox,omitempty"` + Secret *string `json:"Secret,omitempty"` + Type *string `json:"Type,omitempty"` } /* @@ -3133,51 +3178,51 @@ type UpdateCredentialParams struct { * @param "Secret" (string) - [FCM only] The **Server key** of your project from the Firebase console, found under Settings / Cloud messaging. * @param "Type" (string) - The type of push-notification service the credential is for. Can be: `fcm`, `gcm`, or `apn`. * @return ConversationsV1Credential - */ +*/ func (c *DefaultApiService) UpdateCredential(Sid string, params *UpdateCredentialParams) (*ConversationsV1Credential, error) { - path := "/v1/Credentials/{Sid}" + path := "/v1/Credentials/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.ApiKey != nil { - data.Set("ApiKey", *params.ApiKey) - } - if params != nil && params.Certificate != nil { - data.Set("Certificate", *params.Certificate) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.PrivateKey != nil { - data.Set("PrivateKey", *params.PrivateKey) - } - if params != nil && params.Sandbox != nil { - data.Set("Sandbox", fmt.Sprint(*params.Sandbox)) - } - if params != nil && params.Secret != nil { - data.Set("Secret", *params.Secret) - } - if params != nil && params.Type != nil { - data.Set("Type", *params.Type) - } + if params != nil && params.ApiKey != nil { + data.Set("ApiKey", *params.ApiKey) +} + if params != nil && params.Certificate != nil { + data.Set("Certificate", *params.Certificate) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.PrivateKey != nil { + data.Set("PrivateKey", *params.PrivateKey) +} + if params != nil && params.Sandbox != nil { + data.Set("Sandbox", fmt.Sprint(*params.Sandbox)) +} + if params != nil && params.Secret != nil { + data.Set("Secret", *params.Secret) +} + if params != nil && params.Type != nil { + data.Set("Type", *params.Type) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ConversationsV1Credential{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ConversationsV1Credential{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateRoleParams Optional parameters for the method 'UpdateRole' type UpdateRoleParams struct { Permission *[]string `json:"Permission,omitempty"` @@ -3190,39 +3235,39 @@ type UpdateRoleParams struct { * @param optional nil or *UpdateRoleParams - Optional Parameters: * @param "Permission" ([]string) - A permission that you grant to the role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. Note that the update action replaces all previously assigned permissions with those defined in the update action. To remove a permission, do not include it in the subsequent update action. The values for this parameter depend on the role's `type`. * @return ConversationsV1Role - */ +*/ func (c *DefaultApiService) UpdateRole(Sid string, params *UpdateRoleParams) (*ConversationsV1Role, error) { - path := "/v1/Roles/{Sid}" + path := "/v1/Roles/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Permission != nil { - data.Set("Permission", strings.Join(*params.Permission, ",")) - } + if params != nil && params.Permission != nil { + data.Set("Permission", strings.Join(*params.Permission, ",")) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ConversationsV1Role{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ConversationsV1Role{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateServiceConfigurationParams Optional parameters for the method 'UpdateServiceConfiguration' type UpdateServiceConfigurationParams struct { - DefaultChatServiceRoleSid *string `json:"DefaultChatServiceRoleSid,omitempty"` + DefaultChatServiceRoleSid *string `json:"DefaultChatServiceRoleSid,omitempty"` DefaultConversationCreatorRoleSid *string `json:"DefaultConversationCreatorRoleSid,omitempty"` - DefaultConversationRoleSid *string `json:"DefaultConversationRoleSid,omitempty"` - ReachabilityEnabled *bool `json:"ReachabilityEnabled,omitempty"` + DefaultConversationRoleSid *string `json:"DefaultConversationRoleSid,omitempty"` + ReachabilityEnabled *bool `json:"ReachabilityEnabled,omitempty"` } /* @@ -3235,54 +3280,54 @@ type UpdateServiceConfigurationParams struct { * @param "DefaultConversationRoleSid" (string) - The conversation-level role assigned to users when they are added to a conversation. See the [Conversation Role](https://www.twilio.com/docs/conversations/api/role-resource) for more info about roles. * @param "ReachabilityEnabled" (bool) - Whether the [Reachability Indicator](https://www.twilio.com/docs/chat/reachability-indicator) is enabled for this Conversations Service. The default is `false`. * @return ConversationsV1ServiceServiceConfiguration - */ +*/ func (c *DefaultApiService) UpdateServiceConfiguration(ChatServiceSid string, params *UpdateServiceConfigurationParams) (*ConversationsV1ServiceServiceConfiguration, error) { - path := "/v1/Services/{ChatServiceSid}/Configuration" + path := "/v1/Services/{ChatServiceSid}/Configuration" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.DefaultChatServiceRoleSid != nil { - data.Set("DefaultChatServiceRoleSid", *params.DefaultChatServiceRoleSid) - } - if params != nil && params.DefaultConversationCreatorRoleSid != nil { - data.Set("DefaultConversationCreatorRoleSid", *params.DefaultConversationCreatorRoleSid) - } - if params != nil && params.DefaultConversationRoleSid != nil { - data.Set("DefaultConversationRoleSid", *params.DefaultConversationRoleSid) - } - if params != nil && params.ReachabilityEnabled != nil { - data.Set("ReachabilityEnabled", fmt.Sprint(*params.ReachabilityEnabled)) - } + if params != nil && params.DefaultChatServiceRoleSid != nil { + data.Set("DefaultChatServiceRoleSid", *params.DefaultChatServiceRoleSid) +} + if params != nil && params.DefaultConversationCreatorRoleSid != nil { + data.Set("DefaultConversationCreatorRoleSid", *params.DefaultConversationCreatorRoleSid) +} + if params != nil && params.DefaultConversationRoleSid != nil { + data.Set("DefaultConversationRoleSid", *params.DefaultConversationRoleSid) +} + if params != nil && params.ReachabilityEnabled != nil { + data.Set("ReachabilityEnabled", fmt.Sprint(*params.ReachabilityEnabled)) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ConversationsV1ServiceServiceConfiguration{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ConversationsV1ServiceServiceConfiguration{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateServiceConversationParams Optional parameters for the method 'UpdateServiceConversation' type UpdateServiceConversationParams struct { - XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - MessagingServiceSid *string `json:"MessagingServiceSid,omitempty"` - State *string `json:"State,omitempty"` - TimersClosed *string `json:"Timers.Closed,omitempty"` - TimersInactive *string `json:"Timers.Inactive,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + MessagingServiceSid *string `json:"MessagingServiceSid,omitempty"` + State *string `json:"State,omitempty"` + TimersClosed *string `json:"Timers.Closed,omitempty"` + TimersInactive *string `json:"Timers.Inactive,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` } /* @@ -3302,70 +3347,69 @@ type UpdateServiceConversationParams struct { * @param "TimersInactive" (string) - ISO8601 duration when conversation will be switched to `inactive` state. Minimum value for this timer is 1 minute. * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. * @return ConversationsV1ServiceServiceConversation - */ +*/ func (c *DefaultApiService) UpdateServiceConversation(ChatServiceSid string, Sid string, params *UpdateServiceConversationParams) (*ConversationsV1ServiceServiceConversation, error) { - path := "/v1/Services/{ChatServiceSid}/Conversations/{Sid}" + path := "/v1/Services/{ChatServiceSid}/Conversations/{Sid}" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) - } - if params != nil && params.DateCreated != nil { - data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) - } - if params != nil && params.DateUpdated != nil { - data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.MessagingServiceSid != nil { - data.Set("MessagingServiceSid", *params.MessagingServiceSid) - } - if params != nil && params.State != nil { - data.Set("State", *params.State) - } - if params != nil && params.TimersClosed != nil { - data.Set("TimersClosed", *params.TimersClosed) - } - if params != nil && params.TimersInactive != nil { - data.Set("TimersInactive", *params.TimersInactive) - } - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) - } + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) +} + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) +} + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.MessagingServiceSid != nil { + data.Set("MessagingServiceSid", *params.MessagingServiceSid) +} + if params != nil && params.State != nil { + data.Set("State", *params.State) +} + if params != nil && params.TimersClosed != nil { + data.Set("TimersClosed", *params.TimersClosed) +} + if params != nil && params.TimersInactive != nil { + data.Set("TimersInactive", *params.TimersInactive) +} + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) +} if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ConversationsV1ServiceServiceConversation{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ConversationsV1ServiceServiceConversation{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } - // UpdateServiceConversationMessageParams Optional parameters for the method 'UpdateServiceConversationMessage' type UpdateServiceConversationMessageParams struct { - XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - Author *string `json:"Author,omitempty"` - Body *string `json:"Body,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + Author *string `json:"Author,omitempty"` + Body *string `json:"Body,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` } /* @@ -3382,63 +3426,62 @@ type UpdateServiceConversationMessageParams struct { * @param "DateCreated" (time.Time) - The date that this resource was created. * @param "DateUpdated" (time.Time) - The date that this resource was last updated. `null` if the message has not been edited. * @return ConversationsV1ServiceServiceConversationServiceConversationMessage - */ +*/ func (c *DefaultApiService) UpdateServiceConversationMessage(ChatServiceSid string, ConversationSid string, Sid string, params *UpdateServiceConversationMessageParams) (*ConversationsV1ServiceServiceConversationServiceConversationMessage, error) { - path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages/{Sid}" + path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages/{Sid}" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) - } - if params != nil && params.Author != nil { - data.Set("Author", *params.Author) - } - if params != nil && params.Body != nil { - data.Set("Body", *params.Body) - } - if params != nil && params.DateCreated != nil { - data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) - } - if params != nil && params.DateUpdated != nil { - data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) - } + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) +} + if params != nil && params.Author != nil { + data.Set("Author", *params.Author) +} + if params != nil && params.Body != nil { + data.Set("Body", *params.Body) +} + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) +} + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) +} if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ConversationsV1ServiceServiceConversationServiceConversationMessage{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ConversationsV1ServiceServiceConversationServiceConversationMessage{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } - // UpdateServiceConversationParticipantParams Optional parameters for the method 'UpdateServiceConversationParticipant' type UpdateServiceConversationParticipantParams struct { - XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Identity *string `json:"Identity,omitempty"` - LastReadMessageIndex *int32 `json:"LastReadMessageIndex,omitempty"` - LastReadTimestamp *string `json:"LastReadTimestamp,omitempty"` - MessagingBindingProjectedAddress *string `json:"MessagingBinding.ProjectedAddress,omitempty"` - MessagingBindingProxyAddress *string `json:"MessagingBinding.ProxyAddress,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + Identity *string `json:"Identity,omitempty"` + LastReadMessageIndex *int32 `json:"LastReadMessageIndex,omitempty"` + LastReadTimestamp *string `json:"LastReadTimestamp,omitempty"` + MessagingBindingProjectedAddress *string `json:"MessagingBinding.ProjectedAddress,omitempty"` + MessagingBindingProxyAddress *string `json:"MessagingBinding.ProxyAddress,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` } /* @@ -3459,70 +3502,69 @@ type UpdateServiceConversationParticipantParams struct { * @param "MessagingBindingProxyAddress" (string) - The address of the Twilio phone number that the participant is in contact with. 'null' value will remove it. * @param "RoleSid" (string) - The SID of a conversation-level [Role](https://www.twilio.com/docs/conversations/api/role-resource) to assign to the participant. * @return ConversationsV1ServiceServiceConversationServiceConversationParticipant - */ +*/ func (c *DefaultApiService) UpdateServiceConversationParticipant(ChatServiceSid string, ConversationSid string, Sid string, params *UpdateServiceConversationParticipantParams) (*ConversationsV1ServiceServiceConversationServiceConversationParticipant, error) { - path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Participants/{Sid}" + path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Participants/{Sid}" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) - } - if params != nil && params.DateCreated != nil { - data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) - } - if params != nil && params.DateUpdated != nil { - data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) - } - if params != nil && params.Identity != nil { - data.Set("Identity", *params.Identity) - } - if params != nil && params.LastReadMessageIndex != nil { - data.Set("LastReadMessageIndex", fmt.Sprint(*params.LastReadMessageIndex)) - } - if params != nil && params.LastReadTimestamp != nil { - data.Set("LastReadTimestamp", *params.LastReadTimestamp) - } - if params != nil && params.MessagingBindingProjectedAddress != nil { - data.Set("MessagingBindingProjectedAddress", *params.MessagingBindingProjectedAddress) - } - if params != nil && params.MessagingBindingProxyAddress != nil { - data.Set("MessagingBindingProxyAddress", *params.MessagingBindingProxyAddress) - } - if params != nil && params.RoleSid != nil { - data.Set("RoleSid", *params.RoleSid) - } + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) +} + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) +} + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) +} + if params != nil && params.Identity != nil { + data.Set("Identity", *params.Identity) +} + if params != nil && params.LastReadMessageIndex != nil { + data.Set("LastReadMessageIndex", fmt.Sprint(*params.LastReadMessageIndex)) +} + if params != nil && params.LastReadTimestamp != nil { + data.Set("LastReadTimestamp", *params.LastReadTimestamp) +} + if params != nil && params.MessagingBindingProjectedAddress != nil { + data.Set("MessagingBindingProjectedAddress", *params.MessagingBindingProjectedAddress) +} + if params != nil && params.MessagingBindingProxyAddress != nil { + data.Set("MessagingBindingProxyAddress", *params.MessagingBindingProxyAddress) +} + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) +} if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ConversationsV1ServiceServiceConversationServiceConversationParticipant{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ConversationsV1ServiceServiceConversationServiceConversationParticipant{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } - // UpdateServiceConversationScopedWebhookParams Optional parameters for the method 'UpdateServiceConversationScopedWebhook' type UpdateServiceConversationScopedWebhookParams struct { - ConfigurationFilters *[]string `json:"Configuration.Filters,omitempty"` - ConfigurationFlowSid *string `json:"Configuration.FlowSid,omitempty"` - ConfigurationMethod *string `json:"Configuration.Method,omitempty"` + ConfigurationFilters *[]string `json:"Configuration.Filters,omitempty"` + ConfigurationFlowSid *string `json:"Configuration.FlowSid,omitempty"` + ConfigurationMethod *string `json:"Configuration.Method,omitempty"` ConfigurationTriggers *[]string `json:"Configuration.Triggers,omitempty"` - ConfigurationUrl *string `json:"Configuration.Url,omitempty"` + ConfigurationUrl *string `json:"Configuration.Url,omitempty"` } /* @@ -3538,59 +3580,59 @@ type UpdateServiceConversationScopedWebhookParams struct { * @param "ConfigurationTriggers" ([]string) - The list of keywords, firing webhook event for this Conversation. * @param "ConfigurationUrl" (string) - The absolute url the webhook request should be sent to. * @return ConversationsV1ServiceServiceConversationServiceConversationScopedWebhook - */ +*/ func (c *DefaultApiService) UpdateServiceConversationScopedWebhook(ChatServiceSid string, ConversationSid string, Sid string, params *UpdateServiceConversationScopedWebhookParams) (*ConversationsV1ServiceServiceConversationServiceConversationScopedWebhook, error) { - path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Webhooks/{Sid}" + path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Webhooks/{Sid}" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.ConfigurationFilters != nil { - data.Set("ConfigurationFilters", strings.Join(*params.ConfigurationFilters, ",")) - } - if params != nil && params.ConfigurationFlowSid != nil { - data.Set("ConfigurationFlowSid", *params.ConfigurationFlowSid) - } - if params != nil && params.ConfigurationMethod != nil { - data.Set("ConfigurationMethod", *params.ConfigurationMethod) - } - if params != nil && params.ConfigurationTriggers != nil { - data.Set("ConfigurationTriggers", strings.Join(*params.ConfigurationTriggers, ",")) - } - if params != nil && params.ConfigurationUrl != nil { - data.Set("ConfigurationUrl", *params.ConfigurationUrl) - } + if params != nil && params.ConfigurationFilters != nil { + data.Set("ConfigurationFilters", strings.Join(*params.ConfigurationFilters, ",")) +} + if params != nil && params.ConfigurationFlowSid != nil { + data.Set("ConfigurationFlowSid", *params.ConfigurationFlowSid) +} + if params != nil && params.ConfigurationMethod != nil { + data.Set("ConfigurationMethod", *params.ConfigurationMethod) +} + if params != nil && params.ConfigurationTriggers != nil { + data.Set("ConfigurationTriggers", strings.Join(*params.ConfigurationTriggers, ",")) +} + if params != nil && params.ConfigurationUrl != nil { + data.Set("ConfigurationUrl", *params.ConfigurationUrl) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ConversationsV1ServiceServiceConversationServiceConversationScopedWebhook{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ConversationsV1ServiceServiceConversationServiceConversationScopedWebhook{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateServiceNotificationParams Optional parameters for the method 'UpdateServiceNotification' type UpdateServiceNotificationParams struct { - AddedToConversationEnabled *bool `json:"AddedToConversation.Enabled,omitempty"` - AddedToConversationSound *string `json:"AddedToConversation.Sound,omitempty"` - AddedToConversationTemplate *string `json:"AddedToConversation.Template,omitempty"` - LogEnabled *bool `json:"LogEnabled,omitempty"` - NewMessageBadgeCountEnabled *bool `json:"NewMessage.BadgeCountEnabled,omitempty"` - NewMessageEnabled *bool `json:"NewMessage.Enabled,omitempty"` - NewMessageSound *string `json:"NewMessage.Sound,omitempty"` - NewMessageTemplate *string `json:"NewMessage.Template,omitempty"` - RemovedFromConversationEnabled *bool `json:"RemovedFromConversation.Enabled,omitempty"` - RemovedFromConversationSound *string `json:"RemovedFromConversation.Sound,omitempty"` + AddedToConversationEnabled *bool `json:"AddedToConversation.Enabled,omitempty"` + AddedToConversationSound *string `json:"AddedToConversation.Sound,omitempty"` + AddedToConversationTemplate *string `json:"AddedToConversation.Template,omitempty"` + LogEnabled *bool `json:"LogEnabled,omitempty"` + NewMessageBadgeCountEnabled *bool `json:"NewMessage.BadgeCountEnabled,omitempty"` + NewMessageEnabled *bool `json:"NewMessage.Enabled,omitempty"` + NewMessageSound *string `json:"NewMessage.Sound,omitempty"` + NewMessageTemplate *string `json:"NewMessage.Template,omitempty"` + RemovedFromConversationEnabled *bool `json:"RemovedFromConversation.Enabled,omitempty"` + RemovedFromConversationSound *string `json:"RemovedFromConversation.Sound,omitempty"` RemovedFromConversationTemplate *string `json:"RemovedFromConversation.Template,omitempty"` } @@ -3611,63 +3653,63 @@ type UpdateServiceNotificationParams struct { * @param "RemovedFromConversationSound" (string) - The name of the sound to play to a user when they are removed from a conversation and `removed_from_conversation.enabled` is `true`. * @param "RemovedFromConversationTemplate" (string) - The template to use to create the notification text displayed to a user when they are removed from a conversation and `removed_from_conversation.enabled` is `true`. * @return ConversationsV1ServiceServiceConfigurationServiceNotification - */ +*/ func (c *DefaultApiService) UpdateServiceNotification(ChatServiceSid string, params *UpdateServiceNotificationParams) (*ConversationsV1ServiceServiceConfigurationServiceNotification, error) { - path := "/v1/Services/{ChatServiceSid}/Configuration/Notifications" + path := "/v1/Services/{ChatServiceSid}/Configuration/Notifications" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.AddedToConversationEnabled != nil { - data.Set("AddedToConversationEnabled", fmt.Sprint(*params.AddedToConversationEnabled)) - } - if params != nil && params.AddedToConversationSound != nil { - data.Set("AddedToConversationSound", *params.AddedToConversationSound) - } - if params != nil && params.AddedToConversationTemplate != nil { - data.Set("AddedToConversationTemplate", *params.AddedToConversationTemplate) - } - if params != nil && params.LogEnabled != nil { - data.Set("LogEnabled", fmt.Sprint(*params.LogEnabled)) - } - if params != nil && params.NewMessageBadgeCountEnabled != nil { - data.Set("NewMessageBadgeCountEnabled", fmt.Sprint(*params.NewMessageBadgeCountEnabled)) - } - if params != nil && params.NewMessageEnabled != nil { - data.Set("NewMessageEnabled", fmt.Sprint(*params.NewMessageEnabled)) - } - if params != nil && params.NewMessageSound != nil { - data.Set("NewMessageSound", *params.NewMessageSound) - } - if params != nil && params.NewMessageTemplate != nil { - data.Set("NewMessageTemplate", *params.NewMessageTemplate) - } - if params != nil && params.RemovedFromConversationEnabled != nil { - data.Set("RemovedFromConversationEnabled", fmt.Sprint(*params.RemovedFromConversationEnabled)) - } - if params != nil && params.RemovedFromConversationSound != nil { - data.Set("RemovedFromConversationSound", *params.RemovedFromConversationSound) - } - if params != nil && params.RemovedFromConversationTemplate != nil { - data.Set("RemovedFromConversationTemplate", *params.RemovedFromConversationTemplate) - } + if params != nil && params.AddedToConversationEnabled != nil { + data.Set("AddedToConversationEnabled", fmt.Sprint(*params.AddedToConversationEnabled)) +} + if params != nil && params.AddedToConversationSound != nil { + data.Set("AddedToConversationSound", *params.AddedToConversationSound) +} + if params != nil && params.AddedToConversationTemplate != nil { + data.Set("AddedToConversationTemplate", *params.AddedToConversationTemplate) +} + if params != nil && params.LogEnabled != nil { + data.Set("LogEnabled", fmt.Sprint(*params.LogEnabled)) +} + if params != nil && params.NewMessageBadgeCountEnabled != nil { + data.Set("NewMessageBadgeCountEnabled", fmt.Sprint(*params.NewMessageBadgeCountEnabled)) +} + if params != nil && params.NewMessageEnabled != nil { + data.Set("NewMessageEnabled", fmt.Sprint(*params.NewMessageEnabled)) +} + if params != nil && params.NewMessageSound != nil { + data.Set("NewMessageSound", *params.NewMessageSound) +} + if params != nil && params.NewMessageTemplate != nil { + data.Set("NewMessageTemplate", *params.NewMessageTemplate) +} + if params != nil && params.RemovedFromConversationEnabled != nil { + data.Set("RemovedFromConversationEnabled", fmt.Sprint(*params.RemovedFromConversationEnabled)) +} + if params != nil && params.RemovedFromConversationSound != nil { + data.Set("RemovedFromConversationSound", *params.RemovedFromConversationSound) +} + if params != nil && params.RemovedFromConversationTemplate != nil { + data.Set("RemovedFromConversationTemplate", *params.RemovedFromConversationTemplate) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ConversationsV1ServiceServiceConfigurationServiceNotification{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ConversationsV1ServiceServiceConfigurationServiceNotification{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateServiceRoleParams Optional parameters for the method 'UpdateServiceRole' type UpdateServiceRoleParams struct { Permission *[]string `json:"Permission,omitempty"` @@ -3681,40 +3723,40 @@ type UpdateServiceRoleParams struct { * @param optional nil or *UpdateServiceRoleParams - Optional Parameters: * @param "Permission" ([]string) - A permission that you grant to the role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. Note that the update action replaces all previously assigned permissions with those defined in the update action. To remove a permission, do not include it in the subsequent update action. The values for this parameter depend on the role's `type`. * @return ConversationsV1ServiceServiceRole - */ +*/ func (c *DefaultApiService) UpdateServiceRole(ChatServiceSid string, Sid string, params *UpdateServiceRoleParams) (*ConversationsV1ServiceServiceRole, error) { - path := "/v1/Services/{ChatServiceSid}/Roles/{Sid}" + path := "/v1/Services/{ChatServiceSid}/Roles/{Sid}" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Permission != nil { - data.Set("Permission", strings.Join(*params.Permission, ",")) - } + if params != nil && params.Permission != nil { + data.Set("Permission", strings.Join(*params.Permission, ",")) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ConversationsV1ServiceServiceRole{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ConversationsV1ServiceServiceRole{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateServiceUserParams Optional parameters for the method 'UpdateServiceUser' type UpdateServiceUserParams struct { XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` } /* @@ -3728,50 +3770,49 @@ type UpdateServiceUserParams struct { * @param "FriendlyName" (string) - The string that you assigned to describe the resource. * @param "RoleSid" (string) - The SID of a service-level [Role](https://www.twilio.com/docs/conversations/api/role-resource) to assign to the user. * @return ConversationsV1ServiceServiceUser - */ +*/ func (c *DefaultApiService) UpdateServiceUser(ChatServiceSid string, Sid string, params *UpdateServiceUserParams) (*ConversationsV1ServiceServiceUser, error) { - path := "/v1/Services/{ChatServiceSid}/Users/{Sid}" + path := "/v1/Services/{ChatServiceSid}/Users/{Sid}" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.RoleSid != nil { - data.Set("RoleSid", *params.RoleSid) - } + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) +} if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ConversationsV1ServiceServiceUser{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ConversationsV1ServiceServiceUser{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } - // UpdateUserParams Optional parameters for the method 'UpdateUser' type UpdateUserParams struct { XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` } /* @@ -3784,39 +3825,39 @@ type UpdateUserParams struct { * @param "FriendlyName" (string) - The string that you assigned to describe the resource. * @param "RoleSid" (string) - The SID of a service-level [Role](https://www.twilio.com/docs/conversations/api/role-resource) to assign to the user. * @return ConversationsV1User - */ +*/ func (c *DefaultApiService) UpdateUser(Sid string, params *UpdateUserParams) (*ConversationsV1User, error) { - path := "/v1/Users/{Sid}" + path := "/v1/Users/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.RoleSid != nil { - data.Set("RoleSid", *params.RoleSid) - } + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) +} if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ConversationsV1User{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ConversationsV1User{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } diff --git a/twilio/rest/conversations/v1/model_conversations_v1_configuration.go b/twilio/rest/conversations/v1/model_conversations_v1_configuration.go index aa34120b8..c429370f6 100644 --- a/twilio/rest/conversations/v1/model_conversations_v1_configuration.go +++ b/twilio/rest/conversations/v1/model_conversations_v1_configuration.go @@ -1,16 +1,15 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ConversationsV1Configuration struct for ConversationsV1Configuration type ConversationsV1Configuration struct { // The SID of the Account responsible for this configuration. diff --git a/twilio/rest/conversations/v1/model_conversations_v1_configuration_configuration_webhook.go b/twilio/rest/conversations/v1/model_conversations_v1_configuration_configuration_webhook.go index e912125e2..f5cd9ed2e 100644 --- a/twilio/rest/conversations/v1/model_conversations_v1_configuration_configuration_webhook.go +++ b/twilio/rest/conversations/v1/model_conversations_v1_configuration_configuration_webhook.go @@ -1,16 +1,15 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ConversationsV1ConfigurationConfigurationWebhook struct for ConversationsV1ConfigurationConfigurationWebhook type ConversationsV1ConfigurationConfigurationWebhook struct { // The unique ID of the Account responsible for this conversation. diff --git a/twilio/rest/conversations/v1/model_conversations_v1_conversation.go b/twilio/rest/conversations/v1/model_conversations_v1_conversation.go index 1672ff665..15d185303 100644 --- a/twilio/rest/conversations/v1/model_conversations_v1_conversation.go +++ b/twilio/rest/conversations/v1/model_conversations_v1_conversation.go @@ -1,20 +1,18 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // ConversationsV1Conversation struct for ConversationsV1Conversation type ConversationsV1Conversation struct { // The unique ID of the Account responsible for this conversation. diff --git a/twilio/rest/conversations/v1/model_conversations_v1_conversation_conversation_message.go b/twilio/rest/conversations/v1/model_conversations_v1_conversation_conversation_message.go index faf0b770d..5c70998d7 100644 --- a/twilio/rest/conversations/v1/model_conversations_v1_conversation_conversation_message.go +++ b/twilio/rest/conversations/v1/model_conversations_v1_conversation_conversation_message.go @@ -1,20 +1,18 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // ConversationsV1ConversationConversationMessage struct for ConversationsV1ConversationConversationMessage type ConversationsV1ConversationConversationMessage struct { // The unique ID of the Account responsible for this message. diff --git a/twilio/rest/conversations/v1/model_conversations_v1_conversation_conversation_message_conversation_message_receipt.go b/twilio/rest/conversations/v1/model_conversations_v1_conversation_conversation_message_conversation_message_receipt.go index e938c6db1..84a8d9de4 100644 --- a/twilio/rest/conversations/v1/model_conversations_v1_conversation_conversation_message_conversation_message_receipt.go +++ b/twilio/rest/conversations/v1/model_conversations_v1_conversation_conversation_message_conversation_message_receipt.go @@ -1,20 +1,18 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // ConversationsV1ConversationConversationMessageConversationMessageReceipt struct for ConversationsV1ConversationConversationMessageConversationMessageReceipt type ConversationsV1ConversationConversationMessageConversationMessageReceipt struct { // The unique ID of the Account responsible for this participant. diff --git a/twilio/rest/conversations/v1/model_conversations_v1_conversation_conversation_participant.go b/twilio/rest/conversations/v1/model_conversations_v1_conversation_conversation_participant.go index 329811ff7..5c382aed2 100644 --- a/twilio/rest/conversations/v1/model_conversations_v1_conversation_conversation_participant.go +++ b/twilio/rest/conversations/v1/model_conversations_v1_conversation_conversation_participant.go @@ -1,20 +1,18 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // ConversationsV1ConversationConversationParticipant struct for ConversationsV1ConversationConversationParticipant type ConversationsV1ConversationConversationParticipant struct { // The unique ID of the Account responsible for this participant. diff --git a/twilio/rest/conversations/v1/model_conversations_v1_conversation_conversation_scoped_webhook.go b/twilio/rest/conversations/v1/model_conversations_v1_conversation_conversation_scoped_webhook.go index 29c79f140..c00563d9a 100644 --- a/twilio/rest/conversations/v1/model_conversations_v1_conversation_conversation_scoped_webhook.go +++ b/twilio/rest/conversations/v1/model_conversations_v1_conversation_conversation_scoped_webhook.go @@ -1,20 +1,18 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // ConversationsV1ConversationConversationScopedWebhook struct for ConversationsV1ConversationConversationScopedWebhook type ConversationsV1ConversationConversationScopedWebhook struct { // The unique ID of the Account responsible for this conversation. diff --git a/twilio/rest/conversations/v1/model_conversations_v1_credential.go b/twilio/rest/conversations/v1/model_conversations_v1_credential.go index d4b50aae4..1f0e93e75 100644 --- a/twilio/rest/conversations/v1/model_conversations_v1_credential.go +++ b/twilio/rest/conversations/v1/model_conversations_v1_credential.go @@ -1,20 +1,18 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // ConversationsV1Credential struct for ConversationsV1Credential type ConversationsV1Credential struct { // The unique ID of the Account responsible for this credential. diff --git a/twilio/rest/conversations/v1/model_conversations_v1_role.go b/twilio/rest/conversations/v1/model_conversations_v1_role.go index 45273ca81..39ac59675 100644 --- a/twilio/rest/conversations/v1/model_conversations_v1_role.go +++ b/twilio/rest/conversations/v1/model_conversations_v1_role.go @@ -1,20 +1,18 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // ConversationsV1Role struct for ConversationsV1Role type ConversationsV1Role struct { // The SID of the Account that created the resource diff --git a/twilio/rest/conversations/v1/model_conversations_v1_service.go b/twilio/rest/conversations/v1/model_conversations_v1_service.go index 8c507161e..4a79b961a 100644 --- a/twilio/rest/conversations/v1/model_conversations_v1_service.go +++ b/twilio/rest/conversations/v1/model_conversations_v1_service.go @@ -1,20 +1,18 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // ConversationsV1Service struct for ConversationsV1Service type ConversationsV1Service struct { // The unique ID of the Account responsible for this service. diff --git a/twilio/rest/conversations/v1/model_conversations_v1_service_service_binding.go b/twilio/rest/conversations/v1/model_conversations_v1_service_service_binding.go index b7614c707..c687a8078 100644 --- a/twilio/rest/conversations/v1/model_conversations_v1_service_service_binding.go +++ b/twilio/rest/conversations/v1/model_conversations_v1_service_service_binding.go @@ -1,20 +1,18 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // ConversationsV1ServiceServiceBinding struct for ConversationsV1ServiceServiceBinding type ConversationsV1ServiceServiceBinding struct { // The unique ID of the Account responsible for this binding. diff --git a/twilio/rest/conversations/v1/model_conversations_v1_service_service_configuration.go b/twilio/rest/conversations/v1/model_conversations_v1_service_service_configuration.go index 840672011..1aa0e5c48 100644 --- a/twilio/rest/conversations/v1/model_conversations_v1_service_service_configuration.go +++ b/twilio/rest/conversations/v1/model_conversations_v1_service_service_configuration.go @@ -1,16 +1,15 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ConversationsV1ServiceServiceConfiguration struct for ConversationsV1ServiceServiceConfiguration type ConversationsV1ServiceServiceConfiguration struct { // The unique string that identifies the resource diff --git a/twilio/rest/conversations/v1/model_conversations_v1_service_service_configuration_service_notification.go b/twilio/rest/conversations/v1/model_conversations_v1_service_service_configuration_service_notification.go index cbad1d98b..8d72edbb0 100644 --- a/twilio/rest/conversations/v1/model_conversations_v1_service_service_configuration_service_notification.go +++ b/twilio/rest/conversations/v1/model_conversations_v1_service_service_configuration_service_notification.go @@ -1,16 +1,15 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ConversationsV1ServiceServiceConfigurationServiceNotification struct for ConversationsV1ServiceServiceConfigurationServiceNotification type ConversationsV1ServiceServiceConfigurationServiceNotification struct { // The unique ID of the Account responsible for this configuration. diff --git a/twilio/rest/conversations/v1/model_conversations_v1_service_service_conversation.go b/twilio/rest/conversations/v1/model_conversations_v1_service_service_conversation.go index 31311dd22..ad38b47d8 100644 --- a/twilio/rest/conversations/v1/model_conversations_v1_service_service_conversation.go +++ b/twilio/rest/conversations/v1/model_conversations_v1_service_service_conversation.go @@ -1,20 +1,18 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // ConversationsV1ServiceServiceConversation struct for ConversationsV1ServiceServiceConversation type ConversationsV1ServiceServiceConversation struct { // The unique ID of the Account responsible for this conversation. diff --git a/twilio/rest/conversations/v1/model_conversations_v1_service_service_conversation_service_conversation_message.go b/twilio/rest/conversations/v1/model_conversations_v1_service_service_conversation_service_conversation_message.go index 4092f5a09..5b0f7930d 100644 --- a/twilio/rest/conversations/v1/model_conversations_v1_service_service_conversation_service_conversation_message.go +++ b/twilio/rest/conversations/v1/model_conversations_v1_service_service_conversation_service_conversation_message.go @@ -1,20 +1,18 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // ConversationsV1ServiceServiceConversationServiceConversationMessage struct for ConversationsV1ServiceServiceConversationServiceConversationMessage type ConversationsV1ServiceServiceConversationServiceConversationMessage struct { // The unique ID of the Account responsible for this message. diff --git a/twilio/rest/conversations/v1/model_conversations_v1_service_service_conversation_service_conversation_message_service_conversation_message_receipt.go b/twilio/rest/conversations/v1/model_conversations_v1_service_service_conversation_service_conversation_message_service_conversation_message_receipt.go index 022729c08..0262a5b3d 100644 --- a/twilio/rest/conversations/v1/model_conversations_v1_service_service_conversation_service_conversation_message_service_conversation_message_receipt.go +++ b/twilio/rest/conversations/v1/model_conversations_v1_service_service_conversation_service_conversation_message_service_conversation_message_receipt.go @@ -1,20 +1,18 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // ConversationsV1ServiceServiceConversationServiceConversationMessageServiceConversationMessageReceipt struct for ConversationsV1ServiceServiceConversationServiceConversationMessageServiceConversationMessageReceipt type ConversationsV1ServiceServiceConversationServiceConversationMessageServiceConversationMessageReceipt struct { // The unique ID of the Account responsible for this participant. diff --git a/twilio/rest/conversations/v1/model_conversations_v1_service_service_conversation_service_conversation_participant.go b/twilio/rest/conversations/v1/model_conversations_v1_service_service_conversation_service_conversation_participant.go index e049ba7e0..b8ec8ea62 100644 --- a/twilio/rest/conversations/v1/model_conversations_v1_service_service_conversation_service_conversation_participant.go +++ b/twilio/rest/conversations/v1/model_conversations_v1_service_service_conversation_service_conversation_participant.go @@ -1,20 +1,18 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // ConversationsV1ServiceServiceConversationServiceConversationParticipant struct for ConversationsV1ServiceServiceConversationServiceConversationParticipant type ConversationsV1ServiceServiceConversationServiceConversationParticipant struct { // The unique ID of the Account responsible for this participant. diff --git a/twilio/rest/conversations/v1/model_conversations_v1_service_service_conversation_service_conversation_scoped_webhook.go b/twilio/rest/conversations/v1/model_conversations_v1_service_service_conversation_service_conversation_scoped_webhook.go index 6a732617d..4b7125990 100644 --- a/twilio/rest/conversations/v1/model_conversations_v1_service_service_conversation_service_conversation_scoped_webhook.go +++ b/twilio/rest/conversations/v1/model_conversations_v1_service_service_conversation_service_conversation_scoped_webhook.go @@ -1,20 +1,18 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // ConversationsV1ServiceServiceConversationServiceConversationScopedWebhook struct for ConversationsV1ServiceServiceConversationServiceConversationScopedWebhook type ConversationsV1ServiceServiceConversationServiceConversationScopedWebhook struct { // The unique ID of the Account responsible for this conversation. diff --git a/twilio/rest/conversations/v1/model_conversations_v1_service_service_role.go b/twilio/rest/conversations/v1/model_conversations_v1_service_service_role.go index f5cd6baab..0a7e0f36e 100644 --- a/twilio/rest/conversations/v1/model_conversations_v1_service_service_role.go +++ b/twilio/rest/conversations/v1/model_conversations_v1_service_service_role.go @@ -1,20 +1,18 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // ConversationsV1ServiceServiceRole struct for ConversationsV1ServiceServiceRole type ConversationsV1ServiceServiceRole struct { // The SID of the Account that created the resource diff --git a/twilio/rest/conversations/v1/model_conversations_v1_service_service_user.go b/twilio/rest/conversations/v1/model_conversations_v1_service_service_user.go index e5faa0514..97a4b1f71 100644 --- a/twilio/rest/conversations/v1/model_conversations_v1_service_service_user.go +++ b/twilio/rest/conversations/v1/model_conversations_v1_service_service_user.go @@ -1,20 +1,18 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // ConversationsV1ServiceServiceUser struct for ConversationsV1ServiceServiceUser type ConversationsV1ServiceServiceUser struct { // The SID of the Account that created the resource diff --git a/twilio/rest/conversations/v1/model_conversations_v1_user.go b/twilio/rest/conversations/v1/model_conversations_v1_user.go index d5e7b146f..08a74a71d 100644 --- a/twilio/rest/conversations/v1/model_conversations_v1_user.go +++ b/twilio/rest/conversations/v1/model_conversations_v1_user.go @@ -1,20 +1,18 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // ConversationsV1User struct for ConversationsV1User type ConversationsV1User struct { // The SID of the Account that created the resource diff --git a/twilio/rest/conversations/v1/model_list_conversation_message_receipt_response.go b/twilio/rest/conversations/v1/model_list_conversation_message_receipt_response.go index a8b51f9b8..0568331d2 100644 --- a/twilio/rest/conversations/v1/model_list_conversation_message_receipt_response.go +++ b/twilio/rest/conversations/v1/model_list_conversation_message_receipt_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListConversationMessageReceiptResponse struct for ListConversationMessageReceiptResponse type ListConversationMessageReceiptResponse struct { DeliveryReceipts []ConversationsV1ConversationConversationMessageConversationMessageReceipt `json:"DeliveryReceipts,omitempty"` - Meta ListConversationResponseMeta `json:"Meta,omitempty"` + Meta ListConversationResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/conversations/v1/model_list_conversation_message_response.go b/twilio/rest/conversations/v1/model_list_conversation_message_response.go index b91592567..3bf0e87a1 100644 --- a/twilio/rest/conversations/v1/model_list_conversation_message_response.go +++ b/twilio/rest/conversations/v1/model_list_conversation_message_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListConversationMessageResponse struct for ListConversationMessageResponse type ListConversationMessageResponse struct { Messages []ConversationsV1ConversationConversationMessage `json:"Messages,omitempty"` - Meta ListConversationResponseMeta `json:"Meta,omitempty"` + Meta ListConversationResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/conversations/v1/model_list_conversation_participant_response.go b/twilio/rest/conversations/v1/model_list_conversation_participant_response.go index 39be602b7..ea8b31594 100644 --- a/twilio/rest/conversations/v1/model_list_conversation_participant_response.go +++ b/twilio/rest/conversations/v1/model_list_conversation_participant_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListConversationParticipantResponse struct for ListConversationParticipantResponse type ListConversationParticipantResponse struct { - Meta ListConversationResponseMeta `json:"Meta,omitempty"` + Meta ListConversationResponseMeta `json:"Meta,omitempty"` Participants []ConversationsV1ConversationConversationParticipant `json:"Participants,omitempty"` } diff --git a/twilio/rest/conversations/v1/model_list_conversation_response.go b/twilio/rest/conversations/v1/model_list_conversation_response.go index c5f98796b..e46104c2f 100644 --- a/twilio/rest/conversations/v1/model_list_conversation_response.go +++ b/twilio/rest/conversations/v1/model_list_conversation_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListConversationResponse struct for ListConversationResponse type ListConversationResponse struct { Conversations []ConversationsV1Conversation `json:"Conversations,omitempty"` - Meta ListConversationResponseMeta `json:"Meta,omitempty"` + Meta ListConversationResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/conversations/v1/model_list_conversation_response_meta.go b/twilio/rest/conversations/v1/model_list_conversation_response_meta.go index 82b60c3f4..eb186c38a 100644 --- a/twilio/rest/conversations/v1/model_list_conversation_response_meta.go +++ b/twilio/rest/conversations/v1/model_list_conversation_response_meta.go @@ -1,23 +1,22 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListConversationResponseMeta struct for ListConversationResponseMeta type ListConversationResponseMeta struct { - FirstPageUrl string `json:"FirstPageUrl,omitempty"` - Key string `json:"Key,omitempty"` - NextPageUrl string `json:"NextPageUrl,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` - Url string `json:"Url,omitempty"` + Url string `json:"Url,omitempty"` } diff --git a/twilio/rest/conversations/v1/model_list_conversation_scoped_webhook_response.go b/twilio/rest/conversations/v1/model_list_conversation_scoped_webhook_response.go index 67e05d9ed..007aab467 100644 --- a/twilio/rest/conversations/v1/model_list_conversation_scoped_webhook_response.go +++ b/twilio/rest/conversations/v1/model_list_conversation_scoped_webhook_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListConversationScopedWebhookResponse struct for ListConversationScopedWebhookResponse type ListConversationScopedWebhookResponse struct { - Meta ListConversationResponseMeta `json:"Meta,omitempty"` + Meta ListConversationResponseMeta `json:"Meta,omitempty"` Webhooks []ConversationsV1ConversationConversationScopedWebhook `json:"Webhooks,omitempty"` } diff --git a/twilio/rest/conversations/v1/model_list_credential_response.go b/twilio/rest/conversations/v1/model_list_credential_response.go index 8ec0067c7..fb3dfa83e 100644 --- a/twilio/rest/conversations/v1/model_list_credential_response.go +++ b/twilio/rest/conversations/v1/model_list_credential_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListCredentialResponse struct for ListCredentialResponse type ListCredentialResponse struct { - Credentials []ConversationsV1Credential `json:"Credentials,omitempty"` - Meta ListConversationResponseMeta `json:"Meta,omitempty"` + Credentials []ConversationsV1Credential `json:"Credentials,omitempty"` + Meta ListConversationResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/conversations/v1/model_list_role_response.go b/twilio/rest/conversations/v1/model_list_role_response.go index 155e8b329..c40076d8f 100644 --- a/twilio/rest/conversations/v1/model_list_role_response.go +++ b/twilio/rest/conversations/v1/model_list_role_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListRoleResponse struct for ListRoleResponse type ListRoleResponse struct { - Meta ListConversationResponseMeta `json:"Meta,omitempty"` - Roles []ConversationsV1Role `json:"Roles,omitempty"` + Meta ListConversationResponseMeta `json:"Meta,omitempty"` + Roles []ConversationsV1Role `json:"Roles,omitempty"` } diff --git a/twilio/rest/conversations/v1/model_list_service_binding_response.go b/twilio/rest/conversations/v1/model_list_service_binding_response.go index e5411ec57..0704b8568 100644 --- a/twilio/rest/conversations/v1/model_list_service_binding_response.go +++ b/twilio/rest/conversations/v1/model_list_service_binding_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListServiceBindingResponse struct for ListServiceBindingResponse type ListServiceBindingResponse struct { Bindings []ConversationsV1ServiceServiceBinding `json:"Bindings,omitempty"` - Meta ListConversationResponseMeta `json:"Meta,omitempty"` + Meta ListConversationResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/conversations/v1/model_list_service_conversation_message_receipt_response.go b/twilio/rest/conversations/v1/model_list_service_conversation_message_receipt_response.go index 82a8f25cb..4282c9559 100644 --- a/twilio/rest/conversations/v1/model_list_service_conversation_message_receipt_response.go +++ b/twilio/rest/conversations/v1/model_list_service_conversation_message_receipt_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListServiceConversationMessageReceiptResponse struct for ListServiceConversationMessageReceiptResponse type ListServiceConversationMessageReceiptResponse struct { DeliveryReceipts []ConversationsV1ServiceServiceConversationServiceConversationMessageServiceConversationMessageReceipt `json:"DeliveryReceipts,omitempty"` - Meta ListConversationResponseMeta `json:"Meta,omitempty"` + Meta ListConversationResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/conversations/v1/model_list_service_conversation_message_response.go b/twilio/rest/conversations/v1/model_list_service_conversation_message_response.go index 9db562aae..41729862c 100644 --- a/twilio/rest/conversations/v1/model_list_service_conversation_message_response.go +++ b/twilio/rest/conversations/v1/model_list_service_conversation_message_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListServiceConversationMessageResponse struct for ListServiceConversationMessageResponse type ListServiceConversationMessageResponse struct { Messages []ConversationsV1ServiceServiceConversationServiceConversationMessage `json:"Messages,omitempty"` - Meta ListConversationResponseMeta `json:"Meta,omitempty"` + Meta ListConversationResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/conversations/v1/model_list_service_conversation_participant_response.go b/twilio/rest/conversations/v1/model_list_service_conversation_participant_response.go index da7fb9d18..e31f0d820 100644 --- a/twilio/rest/conversations/v1/model_list_service_conversation_participant_response.go +++ b/twilio/rest/conversations/v1/model_list_service_conversation_participant_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListServiceConversationParticipantResponse struct for ListServiceConversationParticipantResponse type ListServiceConversationParticipantResponse struct { - Meta ListConversationResponseMeta `json:"Meta,omitempty"` + Meta ListConversationResponseMeta `json:"Meta,omitempty"` Participants []ConversationsV1ServiceServiceConversationServiceConversationParticipant `json:"Participants,omitempty"` } diff --git a/twilio/rest/conversations/v1/model_list_service_conversation_response.go b/twilio/rest/conversations/v1/model_list_service_conversation_response.go index e1dc798e7..f8e7c66f9 100644 --- a/twilio/rest/conversations/v1/model_list_service_conversation_response.go +++ b/twilio/rest/conversations/v1/model_list_service_conversation_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListServiceConversationResponse struct for ListServiceConversationResponse type ListServiceConversationResponse struct { Conversations []ConversationsV1ServiceServiceConversation `json:"Conversations,omitempty"` - Meta ListConversationResponseMeta `json:"Meta,omitempty"` + Meta ListConversationResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/conversations/v1/model_list_service_conversation_scoped_webhook_response.go b/twilio/rest/conversations/v1/model_list_service_conversation_scoped_webhook_response.go index 26212848d..22f7cdc70 100644 --- a/twilio/rest/conversations/v1/model_list_service_conversation_scoped_webhook_response.go +++ b/twilio/rest/conversations/v1/model_list_service_conversation_scoped_webhook_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListServiceConversationScopedWebhookResponse struct for ListServiceConversationScopedWebhookResponse type ListServiceConversationScopedWebhookResponse struct { - Meta ListConversationResponseMeta `json:"Meta,omitempty"` + Meta ListConversationResponseMeta `json:"Meta,omitempty"` Webhooks []ConversationsV1ServiceServiceConversationServiceConversationScopedWebhook `json:"Webhooks,omitempty"` } diff --git a/twilio/rest/conversations/v1/model_list_service_response.go b/twilio/rest/conversations/v1/model_list_service_response.go index b8c85a20c..bc722c0a6 100644 --- a/twilio/rest/conversations/v1/model_list_service_response.go +++ b/twilio/rest/conversations/v1/model_list_service_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListServiceResponse struct for ListServiceResponse type ListServiceResponse struct { - Meta ListConversationResponseMeta `json:"Meta,omitempty"` - Services []ConversationsV1Service `json:"Services,omitempty"` + Meta ListConversationResponseMeta `json:"Meta,omitempty"` + Services []ConversationsV1Service `json:"Services,omitempty"` } diff --git a/twilio/rest/conversations/v1/model_list_service_role_response.go b/twilio/rest/conversations/v1/model_list_service_role_response.go index 6cf248f09..fa24e0b36 100644 --- a/twilio/rest/conversations/v1/model_list_service_role_response.go +++ b/twilio/rest/conversations/v1/model_list_service_role_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListServiceRoleResponse struct for ListServiceRoleResponse type ListServiceRoleResponse struct { - Meta ListConversationResponseMeta `json:"Meta,omitempty"` + Meta ListConversationResponseMeta `json:"Meta,omitempty"` Roles []ConversationsV1ServiceServiceRole `json:"Roles,omitempty"` } diff --git a/twilio/rest/conversations/v1/model_list_service_user_response.go b/twilio/rest/conversations/v1/model_list_service_user_response.go index 154b201e4..4b7653964 100644 --- a/twilio/rest/conversations/v1/model_list_service_user_response.go +++ b/twilio/rest/conversations/v1/model_list_service_user_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListServiceUserResponse struct for ListServiceUserResponse type ListServiceUserResponse struct { - Meta ListConversationResponseMeta `json:"Meta,omitempty"` + Meta ListConversationResponseMeta `json:"Meta,omitempty"` Users []ConversationsV1ServiceServiceUser `json:"Users,omitempty"` } diff --git a/twilio/rest/conversations/v1/model_list_user_response.go b/twilio/rest/conversations/v1/model_list_user_response.go index 4deab1b3e..5eb6f0b2f 100644 --- a/twilio/rest/conversations/v1/model_list_user_response.go +++ b/twilio/rest/conversations/v1/model_list_user_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListUserResponse struct for ListUserResponse type ListUserResponse struct { - Meta ListConversationResponseMeta `json:"Meta,omitempty"` - Users []ConversationsV1User `json:"Users,omitempty"` + Meta ListConversationResponseMeta `json:"Meta,omitempty"` + Users []ConversationsV1User `json:"Users,omitempty"` } diff --git a/twilio/rest/events/v1/api_default.go b/twilio/rest/events/v1/api_default.go index 75da51538..6574dd567 100644 --- a/twilio/rest/events/v1/api_default.go +++ b/twilio/rest/events/v1/api_default.go @@ -1,11 +1,11 @@ /* - * Twilio - Events - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Events + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,10 +14,9 @@ package openapi import ( "encoding/json" "fmt" - "net/url" - "strings" - twilio "github.com/twilio/twilio-go/client" + "net/url" + "strings" ) type DefaultApiService struct { @@ -26,17 +25,17 @@ type DefaultApiService struct { } func NewDefaultApiService(client *twilio.Client) *DefaultApiService { - return &DefaultApiService{ - client: client, + return &DefaultApiService { + client: client, baseURL: "https://events.twilio.com", } } // CreateSinkParams Optional parameters for the method 'CreateSink' type CreateSinkParams struct { - Description *string `json:"Description,omitempty"` + Description *string `json:"Description,omitempty"` SinkConfiguration *map[string]interface{} `json:"SinkConfiguration,omitempty"` - SinkType *string `json:"SinkType,omitempty"` + SinkType *string `json:"SinkType,omitempty"` } /* @@ -47,42 +46,43 @@ type CreateSinkParams struct { * @param "SinkConfiguration" (map[string]interface{}) - The information required for Twilio to connect to the provided Sink encoded as JSON. * @param "SinkType" (string) - The Sink type. Can only be \\\"kinesis\\\" or \\\"webhook\\\" currently. * @return EventsV1Sink - */ +*/ func (c *DefaultApiService) CreateSink(params *CreateSinkParams) (*EventsV1Sink, error) { - path := "/v1/Sinks" + path := "/v1/Sinks" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Description != nil { - data.Set("Description", *params.Description) + if params != nil && params.Description != nil { + data.Set("Description", *params.Description) +} + if params != nil && params.SinkConfiguration != nil { + v, err := json.Marshal(params.SinkConfiguration) + + if err != nil { + return nil, err } - if params != nil && params.SinkConfiguration != nil { - v, err := json.Marshal(params.SinkConfiguration) - if err != nil { - return nil, err - } + data.Set("SinkConfiguration", fmt.Sprint(v)) +} + if params != nil && params.SinkType != nil { + data.Set("SinkType", *params.SinkType) +} - data.Set("SinkConfiguration", fmt.Sprint(v)) - } - if params != nil && params.SinkType != nil { - data.Set("SinkType", *params.SinkType) - } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &EventsV1Sink{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &EventsV1Sink{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -90,29 +90,30 @@ func (c *DefaultApiService) CreateSink(params *CreateSinkParams) (*EventsV1Sink, * Create a new Sink Test Event for the given Sink. * @param Sid A 34 character string that uniquely identifies the Sink to be Tested. * @return EventsV1SinkSinkTest - */ -func (c *DefaultApiService) CreateSinkTest(Sid string) (*EventsV1SinkSinkTest, error) { - path := "/v1/Sinks/{Sid}/Test" +*/ +func (c *DefaultApiService) CreateSinkTest(Sid string, ) (*EventsV1SinkSinkTest, error) { + path := "/v1/Sinks/{Sid}/Test" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &EventsV1SinkSinkTest{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err -} + defer resp.Body.Close() + + ps := &EventsV1SinkSinkTest{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateSinkValidateParams Optional parameters for the method 'CreateSinkValidate' type CreateSinkValidateParams struct { TestId *string `json:"TestId,omitempty"` @@ -125,38 +126,38 @@ type CreateSinkValidateParams struct { * @param optional nil or *CreateSinkValidateParams - Optional Parameters: * @param "TestId" (string) - A 34 character string that uniquely identifies the test event for a Sink being validated. * @return EventsV1SinkSinkValidate - */ +*/ func (c *DefaultApiService) CreateSinkValidate(Sid string, params *CreateSinkValidateParams) (*EventsV1SinkSinkValidate, error) { - path := "/v1/Sinks/{Sid}/Validate" + path := "/v1/Sinks/{Sid}/Validate" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.TestId != nil { - data.Set("TestId", *params.TestId) - } + if params != nil && params.TestId != nil { + data.Set("TestId", *params.TestId) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &EventsV1SinkSinkValidate{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &EventsV1SinkSinkValidate{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateSubscriptionParams Optional parameters for the method 'CreateSubscription' type CreateSubscriptionParams struct { - Description *string `json:"Description,omitempty"` - SinkSid *string `json:"SinkSid,omitempty"` - Types *[]map[string]interface{} `json:"Types,omitempty"` + Description *string `json:"Description,omitempty"` + SinkSid *string `json:"SinkSid,omitempty"` + Types *[]map[string]interface{} `json:"Types,omitempty"` } /* @@ -167,86 +168,91 @@ type CreateSubscriptionParams struct { * @param "SinkSid" (string) - The SID of the sink that events selected by this subscription should be sent to. Sink must be active for the subscription to be created. * @param "Types" ([]map[string]interface{}) - An array of objects containing the subscribed Event Types * @return EventsV1Subscription - */ +*/ func (c *DefaultApiService) CreateSubscription(params *CreateSubscriptionParams) (*EventsV1Subscription, error) { - path := "/v1/Subscriptions" + path := "/v1/Subscriptions" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Description != nil { - data.Set("Description", *params.Description) - } - if params != nil && params.SinkSid != nil { - data.Set("SinkSid", *params.SinkSid) + if params != nil && params.Description != nil { + data.Set("Description", *params.Description) +} + if params != nil && params.SinkSid != nil { + data.Set("SinkSid", *params.SinkSid) +} + if params != nil && params.Types != nil { + v, err := json.Marshal(params.Types) + + if err != nil { + return nil, err } - if params != nil && params.Types != nil { - v, err := json.Marshal(params.Types) - if err != nil { - return nil, err - } + data.Set("Types", fmt.Sprint(v)) +} - data.Set("Types", fmt.Sprint(v)) - } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &EventsV1Subscription{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &EventsV1Subscription{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * DeleteSink Method for DeleteSink * Delete a specific Sink. * @param Sid A 34 character string that uniquely identifies this Sink. - */ -func (c *DefaultApiService) DeleteSink(Sid string) error { - path := "/v1/Sinks/{Sid}" +*/ +func (c *DefaultApiService) DeleteSink(Sid string, ) (error) { + path := "/v1/Sinks/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* * DeleteSubscription Method for DeleteSubscription * Delete a specific Subscription. * @param Sid A 34 character string that uniquely identifies this Subscription. - */ -func (c *DefaultApiService) DeleteSubscription(Sid string) error { - path := "/v1/Subscriptions/{Sid}" +*/ +func (c *DefaultApiService) DeleteSubscription(Sid string, ) (error) { + path := "/v1/Subscriptions/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - return nil + defer resp.Body.Close() + + return nil } /* @@ -254,27 +260,29 @@ func (c *DefaultApiService) DeleteSubscription(Sid string) error { * Fetch a specific Event Type. * @param Type A string that uniquely identifies this Event Type. * @return EventsV1EventType - */ -func (c *DefaultApiService) FetchEventType(Type string) (*EventsV1EventType, error) { - path := "/v1/Types/{Type}" +*/ +func (c *DefaultApiService) FetchEventType(Type string, ) (*EventsV1EventType, error) { + path := "/v1/Types/{Type}" path = strings.Replace(path, "{"+"Type"+"}", Type, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &EventsV1EventType{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err + defer resp.Body.Close() + + ps := &EventsV1EventType{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -282,27 +290,29 @@ func (c *DefaultApiService) FetchEventType(Type string) (*EventsV1EventType, err * Fetch a specific schema with its nested versions. * @param Id The unique identifier of the schema. Each schema can have multiple versions, that share the same id. * @return EventsV1Schema - */ -func (c *DefaultApiService) FetchSchema(Id string) (*EventsV1Schema, error) { - path := "/v1/Schemas/{Id}" +*/ +func (c *DefaultApiService) FetchSchema(Id string, ) (*EventsV1Schema, error) { + path := "/v1/Schemas/{Id}" path = strings.Replace(path, "{"+"Id"+"}", Id, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &EventsV1Schema{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &EventsV1Schema{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -310,27 +320,29 @@ func (c *DefaultApiService) FetchSchema(Id string) (*EventsV1Schema, error) { * Fetch a specific Sink. * @param Sid A 34 character string that uniquely identifies this Sink. * @return EventsV1Sink - */ -func (c *DefaultApiService) FetchSink(Sid string) (*EventsV1Sink, error) { - path := "/v1/Sinks/{Sid}" +*/ +func (c *DefaultApiService) FetchSink(Sid string, ) (*EventsV1Sink, error) { + path := "/v1/Sinks/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &EventsV1Sink{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err + defer resp.Body.Close() + + ps := &EventsV1Sink{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -338,27 +350,29 @@ func (c *DefaultApiService) FetchSink(Sid string) (*EventsV1Sink, error) { * Fetch a specific Subscription. * @param Sid A 34 character string that uniquely identifies this Subscription. * @return EventsV1Subscription - */ -func (c *DefaultApiService) FetchSubscription(Sid string) (*EventsV1Subscription, error) { - path := "/v1/Subscriptions/{Sid}" +*/ +func (c *DefaultApiService) FetchSubscription(Sid string, ) (*EventsV1Subscription, error) { + path := "/v1/Subscriptions/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &EventsV1Subscription{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &EventsV1Subscription{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -367,30 +381,31 @@ func (c *DefaultApiService) FetchSubscription(Sid string) (*EventsV1Subscription * @param Id The unique identifier of the schema. Each schema can have multiple versions, that share the same id. * @param SchemaVersion The version of the schema * @return EventsV1SchemaVersion - */ -func (c *DefaultApiService) FetchVersion(Id string, SchemaVersion int32) (*EventsV1SchemaVersion, error) { - path := "/v1/Schemas/{Id}/Versions/{SchemaVersion}" +*/ +func (c *DefaultApiService) FetchVersion(Id string, SchemaVersion int32, ) (*EventsV1SchemaVersion, error) { + path := "/v1/Schemas/{Id}/Versions/{SchemaVersion}" path = strings.Replace(path, "{"+"Id"+"}", Id, -1) path = strings.Replace(path, "{"+"SchemaVersion"+"}", fmt.Sprint(SchemaVersion), -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &EventsV1SchemaVersion{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err -} + defer resp.Body.Close() + + ps := &EventsV1SchemaVersion{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListEventTypeParams Optional parameters for the method 'ListEventType' type ListEventTypeParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -402,32 +417,32 @@ type ListEventTypeParams struct { * @param optional nil or *ListEventTypeParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListEventTypeResponse - */ +*/ func (c *DefaultApiService) ListEventType(params *ListEventTypeParams) (*ListEventTypeResponse, error) { - path := "/v1/Types" + path := "/v1/Types" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListEventTypeResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListEventTypeResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListSinkParams Optional parameters for the method 'ListSink' type ListSinkParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -439,32 +454,32 @@ type ListSinkParams struct { * @param optional nil or *ListSinkParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListSinkResponse - */ +*/ func (c *DefaultApiService) ListSink(params *ListSinkParams) (*ListSinkResponse, error) { - path := "/v1/Sinks" + path := "/v1/Sinks" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListSinkResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListSinkResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListSubscribedEventParams Optional parameters for the method 'ListSubscribedEvent' type ListSubscribedEventParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -477,37 +492,37 @@ type ListSubscribedEventParams struct { * @param optional nil or *ListSubscribedEventParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListSubscribedEventResponse - */ +*/ func (c *DefaultApiService) ListSubscribedEvent(SubscriptionSid string, params *ListSubscribedEventParams) (*ListSubscribedEventResponse, error) { - path := "/v1/Subscriptions/{SubscriptionSid}/SubscribedEvents" + path := "/v1/Subscriptions/{SubscriptionSid}/SubscribedEvents" path = strings.Replace(path, "{"+"SubscriptionSid"+"}", SubscriptionSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListSubscribedEventResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListSubscribedEventResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListSubscriptionParams Optional parameters for the method 'ListSubscription' type ListSubscriptionParams struct { - SinkSid *string `json:"SinkSid,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + SinkSid *string `json:"SinkSid,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -517,35 +532,35 @@ type ListSubscriptionParams struct { * @param "SinkSid" (string) - The SID of the sink that the list of Subscriptions should be filtered by. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListSubscriptionResponse - */ +*/ func (c *DefaultApiService) ListSubscription(params *ListSubscriptionParams) (*ListSubscriptionResponse, error) { - path := "/v1/Subscriptions" + path := "/v1/Subscriptions" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.SinkSid != nil { - data.Set("SinkSid", *params.SinkSid) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.SinkSid != nil { + data.Set("SinkSid", *params.SinkSid) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListSubscriptionResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListSubscriptionResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListVersionParams Optional parameters for the method 'ListVersion' type ListVersionParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -558,37 +573,37 @@ type ListVersionParams struct { * @param optional nil or *ListVersionParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListVersionResponse - */ +*/ func (c *DefaultApiService) ListVersion(Id string, params *ListVersionParams) (*ListVersionResponse, error) { - path := "/v1/Schemas/{Id}/Versions" + path := "/v1/Schemas/{Id}/Versions" path = strings.Replace(path, "{"+"Id"+"}", Id, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListVersionResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListVersionResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateSubscriptionParams Optional parameters for the method 'UpdateSubscription' type UpdateSubscriptionParams struct { Description *string `json:"Description,omitempty"` - SinkSid *string `json:"SinkSid,omitempty"` + SinkSid *string `json:"SinkSid,omitempty"` } /* @@ -599,32 +614,33 @@ type UpdateSubscriptionParams struct { * @param "Description" (string) - A human readable description for the Subscription. * @param "SinkSid" (string) - The SID of the sink that events selected by this subscription should be sent to. Sink must be active for the subscription to be created. * @return EventsV1Subscription - */ +*/ func (c *DefaultApiService) UpdateSubscription(Sid string, params *UpdateSubscriptionParams) (*EventsV1Subscription, error) { - path := "/v1/Subscriptions/{Sid}" + path := "/v1/Subscriptions/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Description != nil { - data.Set("Description", *params.Description) - } - if params != nil && params.SinkSid != nil { - data.Set("SinkSid", *params.SinkSid) - } + if params != nil && params.Description != nil { + data.Set("Description", *params.Description) +} + if params != nil && params.SinkSid != nil { + data.Set("SinkSid", *params.SinkSid) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &EventsV1Subscription{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() + + ps := &EventsV1Subscription{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } diff --git a/twilio/rest/events/v1/model_events_v1_event_type.go b/twilio/rest/events/v1/model_events_v1_event_type.go index 7f584f80f..e79ea85c0 100644 --- a/twilio/rest/events/v1/model_events_v1_event_type.go +++ b/twilio/rest/events/v1/model_events_v1_event_type.go @@ -1,20 +1,18 @@ /* - * Twilio - Events - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Events + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // EventsV1EventType struct for EventsV1EventType type EventsV1EventType struct { // The date this Event Type was created. @@ -22,8 +20,8 @@ type EventsV1EventType struct { // The date this Event Type was updated. DateUpdated *time.Time `json:"DateUpdated,omitempty"` // Event Type description. - Description *string `json:"Description,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` + Description *string `json:"Description,omitempty"` + Links *map[string]interface{} `json:"Links,omitempty"` // The Schema identifier for this Event Type. SchemaId *string `json:"SchemaId,omitempty"` // The Event Type identifier. diff --git a/twilio/rest/events/v1/model_events_v1_schema.go b/twilio/rest/events/v1/model_events_v1_schema.go index 099caf55d..8db77bdfc 100644 --- a/twilio/rest/events/v1/model_events_v1_schema.go +++ b/twilio/rest/events/v1/model_events_v1_schema.go @@ -1,20 +1,18 @@ /* - * Twilio - Events - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Events + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // EventsV1Schema struct for EventsV1Schema type EventsV1Schema struct { // Schema Identifier. diff --git a/twilio/rest/events/v1/model_events_v1_schema_version.go b/twilio/rest/events/v1/model_events_v1_schema_version.go index c24bdc9a9..4fc39ad70 100644 --- a/twilio/rest/events/v1/model_events_v1_schema_version.go +++ b/twilio/rest/events/v1/model_events_v1_schema_version.go @@ -1,26 +1,24 @@ /* - * Twilio - Events - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Events + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // EventsV1SchemaVersion struct for EventsV1SchemaVersion type EventsV1SchemaVersion struct { // The date the schema version was created. DateCreated *time.Time `json:"DateCreated,omitempty"` // The unique identifier of the schema. - Id *string `json:"Id,omitempty"` + Id *string `json:"Id,omitempty"` Raw *string `json:"Raw,omitempty"` // The version of this schema. SchemaVersion *int32 `json:"SchemaVersion,omitempty"` diff --git a/twilio/rest/events/v1/model_events_v1_sink.go b/twilio/rest/events/v1/model_events_v1_sink.go index af2471c2c..bd51d77b4 100644 --- a/twilio/rest/events/v1/model_events_v1_sink.go +++ b/twilio/rest/events/v1/model_events_v1_sink.go @@ -1,20 +1,18 @@ /* - * Twilio - Events - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Events + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // EventsV1Sink struct for EventsV1Sink type EventsV1Sink struct { // The date this Sink was created diff --git a/twilio/rest/events/v1/model_events_v1_sink_sink_test_.go b/twilio/rest/events/v1/model_events_v1_sink_sink_test_.go index 0b1b9ab94..04ad42091 100644 --- a/twilio/rest/events/v1/model_events_v1_sink_sink_test_.go +++ b/twilio/rest/events/v1/model_events_v1_sink_sink_test_.go @@ -1,16 +1,15 @@ /* - * Twilio - Events - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Events + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // EventsV1SinkSinkTest struct for EventsV1SinkSinkTest type EventsV1SinkSinkTest struct { // Feedback indicating whether the test event was generated. diff --git a/twilio/rest/events/v1/model_events_v1_sink_sink_validate.go b/twilio/rest/events/v1/model_events_v1_sink_sink_validate.go index cc1edc5dd..f8e032b83 100644 --- a/twilio/rest/events/v1/model_events_v1_sink_sink_validate.go +++ b/twilio/rest/events/v1/model_events_v1_sink_sink_validate.go @@ -1,16 +1,15 @@ /* - * Twilio - Events - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Events + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // EventsV1SinkSinkValidate struct for EventsV1SinkSinkValidate type EventsV1SinkSinkValidate struct { // Feedback indicating whether the given Sink was validated. diff --git a/twilio/rest/events/v1/model_events_v1_subscription.go b/twilio/rest/events/v1/model_events_v1_subscription.go index ff8845246..0830226d1 100644 --- a/twilio/rest/events/v1/model_events_v1_subscription.go +++ b/twilio/rest/events/v1/model_events_v1_subscription.go @@ -1,20 +1,18 @@ /* - * Twilio - Events - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Events + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // EventsV1Subscription struct for EventsV1Subscription type EventsV1Subscription struct { // Account SID. diff --git a/twilio/rest/events/v1/model_events_v1_subscription_subscribed_event.go b/twilio/rest/events/v1/model_events_v1_subscription_subscribed_event.go index 011122b6b..590175ba6 100644 --- a/twilio/rest/events/v1/model_events_v1_subscription_subscribed_event.go +++ b/twilio/rest/events/v1/model_events_v1_subscription_subscribed_event.go @@ -1,16 +1,15 @@ /* - * Twilio - Events - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Events + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // EventsV1SubscriptionSubscribedEvent struct for EventsV1SubscriptionSubscribedEvent type EventsV1SubscriptionSubscribedEvent struct { // Account SID. diff --git a/twilio/rest/events/v1/model_list_event_type_response.go b/twilio/rest/events/v1/model_list_event_type_response.go index 52b44bc62..98592cd9b 100644 --- a/twilio/rest/events/v1/model_list_event_type_response.go +++ b/twilio/rest/events/v1/model_list_event_type_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Events - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Events + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListEventTypeResponse struct for ListEventTypeResponse type ListEventTypeResponse struct { - Meta ListVersionResponseMeta `json:"Meta,omitempty"` - Types []EventsV1EventType `json:"Types,omitempty"` + Meta ListVersionResponseMeta `json:"Meta,omitempty"` + Types []EventsV1EventType `json:"Types,omitempty"` } diff --git a/twilio/rest/events/v1/model_list_sink_response.go b/twilio/rest/events/v1/model_list_sink_response.go index f417f7041..d4a62c9e4 100644 --- a/twilio/rest/events/v1/model_list_sink_response.go +++ b/twilio/rest/events/v1/model_list_sink_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Events - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Events + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListSinkResponse struct for ListSinkResponse type ListSinkResponse struct { - Meta ListVersionResponseMeta `json:"Meta,omitempty"` - Sinks []EventsV1Sink `json:"Sinks,omitempty"` + Meta ListVersionResponseMeta `json:"Meta,omitempty"` + Sinks []EventsV1Sink `json:"Sinks,omitempty"` } diff --git a/twilio/rest/events/v1/model_list_subscribed_event_response.go b/twilio/rest/events/v1/model_list_subscribed_event_response.go index a62292231..8d6f618e7 100644 --- a/twilio/rest/events/v1/model_list_subscribed_event_response.go +++ b/twilio/rest/events/v1/model_list_subscribed_event_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Events - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Events + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListSubscribedEventResponse struct for ListSubscribedEventResponse type ListSubscribedEventResponse struct { - Meta ListVersionResponseMeta `json:"Meta,omitempty"` + Meta ListVersionResponseMeta `json:"Meta,omitempty"` Types []EventsV1SubscriptionSubscribedEvent `json:"Types,omitempty"` } diff --git a/twilio/rest/events/v1/model_list_subscription_response.go b/twilio/rest/events/v1/model_list_subscription_response.go index 264350bfd..94fd1af21 100644 --- a/twilio/rest/events/v1/model_list_subscription_response.go +++ b/twilio/rest/events/v1/model_list_subscription_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Events - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Events + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListSubscriptionResponse struct for ListSubscriptionResponse type ListSubscriptionResponse struct { - Meta ListVersionResponseMeta `json:"Meta,omitempty"` - Subscriptions []EventsV1Subscription `json:"Subscriptions,omitempty"` + Meta ListVersionResponseMeta `json:"Meta,omitempty"` + Subscriptions []EventsV1Subscription `json:"Subscriptions,omitempty"` } diff --git a/twilio/rest/events/v1/model_list_version_response.go b/twilio/rest/events/v1/model_list_version_response.go index 8a1df167f..0e59276c0 100644 --- a/twilio/rest/events/v1/model_list_version_response.go +++ b/twilio/rest/events/v1/model_list_version_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Events - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Events + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListVersionResponse struct for ListVersionResponse type ListVersionResponse struct { - Meta ListVersionResponseMeta `json:"Meta,omitempty"` + Meta ListVersionResponseMeta `json:"Meta,omitempty"` SchemaVersions []EventsV1SchemaVersion `json:"SchemaVersions,omitempty"` } diff --git a/twilio/rest/events/v1/model_list_version_response_meta.go b/twilio/rest/events/v1/model_list_version_response_meta.go index 54742c464..eeeb16b8f 100644 --- a/twilio/rest/events/v1/model_list_version_response_meta.go +++ b/twilio/rest/events/v1/model_list_version_response_meta.go @@ -1,23 +1,22 @@ /* - * Twilio - Events - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Events + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListVersionResponseMeta struct for ListVersionResponseMeta type ListVersionResponseMeta struct { - FirstPageUrl string `json:"FirstPageUrl,omitempty"` - Key string `json:"Key,omitempty"` - NextPageUrl string `json:"NextPageUrl,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` - Url string `json:"Url,omitempty"` + Url string `json:"Url,omitempty"` } diff --git a/twilio/rest/fax/v1/api_default.go b/twilio/rest/fax/v1/api_default.go index 9b0f31d73..c4cb994af 100644 --- a/twilio/rest/fax/v1/api_default.go +++ b/twilio/rest/fax/v1/api_default.go @@ -1,11 +1,11 @@ /* - * Twilio - Fax - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Fax + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,11 +14,10 @@ package openapi import ( "encoding/json" "fmt" - "net/url" - "strings" - "time" - twilio "github.com/twilio/twilio-go/client" + "net/url" + "strings" + "time" ) type DefaultApiService struct { @@ -27,23 +26,23 @@ type DefaultApiService struct { } func NewDefaultApiService(client *twilio.Client) *DefaultApiService { - return &DefaultApiService{ - client: client, + return &DefaultApiService { + client: client, baseURL: "https://fax.twilio.com", } } // CreateFaxParams Optional parameters for the method 'CreateFax' type CreateFaxParams struct { - From *string `json:"From,omitempty"` - MediaUrl *string `json:"MediaUrl,omitempty"` - Quality *string `json:"Quality,omitempty"` + From *string `json:"From,omitempty"` + MediaUrl *string `json:"MediaUrl,omitempty"` + Quality *string `json:"Quality,omitempty"` SipAuthPassword *string `json:"SipAuthPassword,omitempty"` SipAuthUsername *string `json:"SipAuthUsername,omitempty"` - StatusCallback *string `json:"StatusCallback,omitempty"` - StoreMedia *bool `json:"StoreMedia,omitempty"` - To *string `json:"To,omitempty"` - Ttl *int32 `json:"Ttl,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` + StoreMedia *bool `json:"StoreMedia,omitempty"` + To *string `json:"To,omitempty"` + Ttl *int32 `json:"Ttl,omitempty"` } /* @@ -60,76 +59,79 @@ type CreateFaxParams struct { * @param "To" (string) - The phone number to receive the fax in [E.164](https://www.twilio.com/docs/glossary/what-e164) format or the recipient's SIP URI. * @param "Ttl" (int32) - How long in minutes from when the fax is initiated that we should try to send the fax. * @return FaxV1Fax - */ +*/ func (c *DefaultApiService) CreateFax(params *CreateFaxParams) (*FaxV1Fax, error) { - path := "/v1/Faxes" + path := "/v1/Faxes" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.From != nil { - data.Set("From", *params.From) - } - if params != nil && params.MediaUrl != nil { - data.Set("MediaUrl", *params.MediaUrl) - } - if params != nil && params.Quality != nil { - data.Set("Quality", *params.Quality) - } - if params != nil && params.SipAuthPassword != nil { - data.Set("SipAuthPassword", *params.SipAuthPassword) - } - if params != nil && params.SipAuthUsername != nil { - data.Set("SipAuthUsername", *params.SipAuthUsername) - } - if params != nil && params.StatusCallback != nil { - data.Set("StatusCallback", *params.StatusCallback) - } - if params != nil && params.StoreMedia != nil { - data.Set("StoreMedia", fmt.Sprint(*params.StoreMedia)) - } - if params != nil && params.To != nil { - data.Set("To", *params.To) - } - if params != nil && params.Ttl != nil { - data.Set("Ttl", fmt.Sprint(*params.Ttl)) - } + if params != nil && params.From != nil { + data.Set("From", *params.From) +} + if params != nil && params.MediaUrl != nil { + data.Set("MediaUrl", *params.MediaUrl) +} + if params != nil && params.Quality != nil { + data.Set("Quality", *params.Quality) +} + if params != nil && params.SipAuthPassword != nil { + data.Set("SipAuthPassword", *params.SipAuthPassword) +} + if params != nil && params.SipAuthUsername != nil { + data.Set("SipAuthUsername", *params.SipAuthUsername) +} + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) +} + if params != nil && params.StoreMedia != nil { + data.Set("StoreMedia", fmt.Sprint(*params.StoreMedia)) +} + if params != nil && params.To != nil { + data.Set("To", *params.To) +} + if params != nil && params.Ttl != nil { + data.Set("Ttl", fmt.Sprint(*params.Ttl)) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &FaxV1Fax{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err + ps := &FaxV1Fax{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* * DeleteFax Method for DeleteFax * Delete a specific fax and its associated media. * @param Sid The Twilio-provided string that uniquely identifies the Fax resource to delete. - */ -func (c *DefaultApiService) DeleteFax(Sid string) error { - path := "/v1/Faxes/{Sid}" +*/ +func (c *DefaultApiService) DeleteFax(Sid string, ) (error) { + path := "/v1/Faxes/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* @@ -137,23 +139,25 @@ func (c *DefaultApiService) DeleteFax(Sid string) error { * Delete a specific fax media instance. * @param FaxSid The SID of the fax with the FaxMedia resource to delete. * @param Sid The Twilio-provided string that uniquely identifies the FaxMedia resource to delete. - */ -func (c *DefaultApiService) DeleteFaxMedia(FaxSid string, Sid string) error { - path := "/v1/Faxes/{FaxSid}/Media/{Sid}" +*/ +func (c *DefaultApiService) DeleteFaxMedia(FaxSid string, Sid string, ) (error) { + path := "/v1/Faxes/{FaxSid}/Media/{Sid}" path = strings.Replace(path, "{"+"FaxSid"+"}", FaxSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - return nil + defer resp.Body.Close() + + return nil } /* @@ -161,27 +165,29 @@ func (c *DefaultApiService) DeleteFaxMedia(FaxSid string, Sid string) error { * Fetch a specific fax. * @param Sid The Twilio-provided string that uniquely identifies the Fax resource to fetch. * @return FaxV1Fax - */ -func (c *DefaultApiService) FetchFax(Sid string) (*FaxV1Fax, error) { - path := "/v1/Faxes/{Sid}" +*/ +func (c *DefaultApiService) FetchFax(Sid string, ) (*FaxV1Fax, error) { + path := "/v1/Faxes/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &FaxV1Fax{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &FaxV1Fax{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -190,37 +196,38 @@ func (c *DefaultApiService) FetchFax(Sid string) (*FaxV1Fax, error) { * @param FaxSid The SID of the fax with the FaxMedia resource to fetch. * @param Sid The Twilio-provided string that uniquely identifies the FaxMedia resource to fetch. * @return FaxV1FaxFaxMedia - */ -func (c *DefaultApiService) FetchFaxMedia(FaxSid string, Sid string) (*FaxV1FaxFaxMedia, error) { - path := "/v1/Faxes/{FaxSid}/Media/{Sid}" +*/ +func (c *DefaultApiService) FetchFaxMedia(FaxSid string, Sid string, ) (*FaxV1FaxFaxMedia, error) { + path := "/v1/Faxes/{FaxSid}/Media/{Sid}" path = strings.Replace(path, "{"+"FaxSid"+"}", FaxSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &FaxV1FaxFaxMedia{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err -} + defer resp.Body.Close() + ps := &FaxV1FaxFaxMedia{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} // ListFaxParams Optional parameters for the method 'ListFax' type ListFaxParams struct { - From *string `json:"From,omitempty"` - To *string `json:"To,omitempty"` + From *string `json:"From,omitempty"` + To *string `json:"To,omitempty"` DateCreatedOnOrBefore *time.Time `json:"DateCreatedOnOrBefore,omitempty"` - DateCreatedAfter *time.Time `json:"DateCreatedAfter,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + DateCreatedAfter *time.Time `json:"DateCreatedAfter,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -233,44 +240,44 @@ type ListFaxParams struct { * @param "DateCreatedAfter" (time.Time) - Retrieve only those faxes with a `date_created` that is later than this value, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListFaxResponse - */ +*/ func (c *DefaultApiService) ListFax(params *ListFaxParams) (*ListFaxResponse, error) { - path := "/v1/Faxes" + path := "/v1/Faxes" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.From != nil { - data.Set("From", *params.From) - } - if params != nil && params.To != nil { - data.Set("To", *params.To) - } - if params != nil && params.DateCreatedOnOrBefore != nil { - data.Set("DateCreatedOnOrBefore", fmt.Sprint(*params.DateCreatedOnOrBefore)) - } - if params != nil && params.DateCreatedAfter != nil { - data.Set("DateCreatedAfter", fmt.Sprint(*params.DateCreatedAfter)) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.From != nil { + data.Set("From", *params.From) +} + if params != nil && params.To != nil { + data.Set("To", *params.To) +} + if params != nil && params.DateCreatedOnOrBefore != nil { + data.Set("DateCreatedOnOrBefore", fmt.Sprint(*params.DateCreatedOnOrBefore)) +} + if params != nil && params.DateCreatedAfter != nil { + data.Set("DateCreatedAfter", fmt.Sprint(*params.DateCreatedAfter)) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListFaxResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListFaxResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListFaxMediaParams Optional parameters for the method 'ListFaxMedia' type ListFaxMediaParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -283,33 +290,33 @@ type ListFaxMediaParams struct { * @param optional nil or *ListFaxMediaParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListFaxMediaResponse - */ +*/ func (c *DefaultApiService) ListFaxMedia(FaxSid string, params *ListFaxMediaParams) (*ListFaxMediaResponse, error) { - path := "/v1/Faxes/{FaxSid}/Media" + path := "/v1/Faxes/{FaxSid}/Media" path = strings.Replace(path, "{"+"FaxSid"+"}", FaxSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListFaxMediaResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListFaxMediaResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateFaxParams Optional parameters for the method 'UpdateFax' type UpdateFaxParams struct { Status *string `json:"Status,omitempty"` @@ -322,29 +329,30 @@ type UpdateFaxParams struct { * @param optional nil or *UpdateFaxParams - Optional Parameters: * @param "Status" (string) - The new [status](https://www.twilio.com/docs/fax/api/fax-resource#fax-status-values) of the resource. Can be only `canceled`. This may fail if transmission has already started. * @return FaxV1Fax - */ +*/ func (c *DefaultApiService) UpdateFax(Sid string, params *UpdateFaxParams) (*FaxV1Fax, error) { - path := "/v1/Faxes/{Sid}" + path := "/v1/Faxes/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) - } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &FaxV1Fax{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() + + ps := &FaxV1Fax{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } diff --git a/twilio/rest/fax/v1/model_fax_v1_fax.go b/twilio/rest/fax/v1/model_fax_v1_fax.go index e865046c9..87e9f5ea6 100644 --- a/twilio/rest/fax/v1/model_fax_v1_fax.go +++ b/twilio/rest/fax/v1/model_fax_v1_fax.go @@ -1,20 +1,18 @@ /* - * Twilio - Fax - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Fax + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // FaxV1Fax struct for FaxV1Fax type FaxV1Fax struct { // The SID of the Account that created the resource diff --git a/twilio/rest/fax/v1/model_fax_v1_fax_fax_media.go b/twilio/rest/fax/v1/model_fax_v1_fax_fax_media.go index efd90ac88..69641b669 100644 --- a/twilio/rest/fax/v1/model_fax_v1_fax_fax_media.go +++ b/twilio/rest/fax/v1/model_fax_v1_fax_fax_media.go @@ -1,20 +1,18 @@ /* - * Twilio - Fax - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Fax + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // FaxV1FaxFaxMedia struct for FaxV1FaxFaxMedia type FaxV1FaxFaxMedia struct { // The SID of the Account that created the resource diff --git a/twilio/rest/fax/v1/model_list_fax_media_response.go b/twilio/rest/fax/v1/model_list_fax_media_response.go index a98135d46..1a5f4717c 100644 --- a/twilio/rest/fax/v1/model_list_fax_media_response.go +++ b/twilio/rest/fax/v1/model_list_fax_media_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Fax - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Fax + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListFaxMediaResponse struct for ListFaxMediaResponse type ListFaxMediaResponse struct { - Media []FaxV1FaxFaxMedia `json:"Media,omitempty"` - Meta ListFaxResponseMeta `json:"Meta,omitempty"` + Media []FaxV1FaxFaxMedia `json:"Media,omitempty"` + Meta ListFaxResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/fax/v1/model_list_fax_response.go b/twilio/rest/fax/v1/model_list_fax_response.go index 75429773d..33e9d6cf1 100644 --- a/twilio/rest/fax/v1/model_list_fax_response.go +++ b/twilio/rest/fax/v1/model_list_fax_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Fax - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Fax + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListFaxResponse struct for ListFaxResponse type ListFaxResponse struct { - Faxes []FaxV1Fax `json:"Faxes,omitempty"` - Meta ListFaxResponseMeta `json:"Meta,omitempty"` + Faxes []FaxV1Fax `json:"Faxes,omitempty"` + Meta ListFaxResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/fax/v1/model_list_fax_response_meta.go b/twilio/rest/fax/v1/model_list_fax_response_meta.go index 1cf2f2409..3a975a222 100644 --- a/twilio/rest/fax/v1/model_list_fax_response_meta.go +++ b/twilio/rest/fax/v1/model_list_fax_response_meta.go @@ -1,23 +1,22 @@ /* - * Twilio - Fax - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Fax + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListFaxResponseMeta struct for ListFaxResponseMeta type ListFaxResponseMeta struct { - FirstPageUrl string `json:"FirstPageUrl,omitempty"` - Key string `json:"Key,omitempty"` - NextPageUrl string `json:"NextPageUrl,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` - Url string `json:"Url,omitempty"` + Url string `json:"Url,omitempty"` } diff --git a/twilio/rest/flex/v1/api_default.go b/twilio/rest/flex/v1/api_default.go index e47382d31..ca91efe63 100644 --- a/twilio/rest/flex/v1/api_default.go +++ b/twilio/rest/flex/v1/api_default.go @@ -1,11 +1,11 @@ /* - * Twilio - Flex - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Flex + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,10 +14,9 @@ package openapi import ( "encoding/json" "fmt" - "net/url" - "strings" - twilio "github.com/twilio/twilio-go/client" + "net/url" + "strings" ) type DefaultApiService struct { @@ -26,24 +25,24 @@ type DefaultApiService struct { } func NewDefaultApiService(client *twilio.Client) *DefaultApiService { - return &DefaultApiService{ - client: client, + return &DefaultApiService { + client: client, baseURL: "https://flex-api.twilio.com", } } // CreateChannelParams Optional parameters for the method 'CreateChannel' type CreateChannelParams struct { - ChatFriendlyName *string `json:"ChatFriendlyName,omitempty"` - ChatUniqueName *string `json:"ChatUniqueName,omitempty"` + ChatFriendlyName *string `json:"ChatFriendlyName,omitempty"` + ChatUniqueName *string `json:"ChatUniqueName,omitempty"` ChatUserFriendlyName *string `json:"ChatUserFriendlyName,omitempty"` - FlexFlowSid *string `json:"FlexFlowSid,omitempty"` - Identity *string `json:"Identity,omitempty"` - LongLived *bool `json:"LongLived,omitempty"` - PreEngagementData *string `json:"PreEngagementData,omitempty"` - Target *string `json:"Target,omitempty"` - TaskAttributes *string `json:"TaskAttributes,omitempty"` - TaskSid *string `json:"TaskSid,omitempty"` + FlexFlowSid *string `json:"FlexFlowSid,omitempty"` + Identity *string `json:"Identity,omitempty"` + LongLived *bool `json:"LongLived,omitempty"` + PreEngagementData *string `json:"PreEngagementData,omitempty"` + Target *string `json:"Target,omitempty"` + TaskAttributes *string `json:"TaskAttributes,omitempty"` + TaskSid *string `json:"TaskSid,omitempty"` } /* @@ -60,78 +59,78 @@ type CreateChannelParams struct { * @param "TaskAttributes" (string) - The Task attributes to be added for the TaskRouter Task. * @param "TaskSid" (string) - The SID of the TaskRouter Task. Only valid when integration type is `task`. `null` for integration types `studio` & `external` * @return FlexV1Channel - */ +*/ func (c *DefaultApiService) CreateChannel(params *CreateChannelParams) (*FlexV1Channel, error) { - path := "/v1/Channels" + path := "/v1/Channels" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.ChatFriendlyName != nil { - data.Set("ChatFriendlyName", *params.ChatFriendlyName) - } - if params != nil && params.ChatUniqueName != nil { - data.Set("ChatUniqueName", *params.ChatUniqueName) - } - if params != nil && params.ChatUserFriendlyName != nil { - data.Set("ChatUserFriendlyName", *params.ChatUserFriendlyName) - } - if params != nil && params.FlexFlowSid != nil { - data.Set("FlexFlowSid", *params.FlexFlowSid) - } - if params != nil && params.Identity != nil { - data.Set("Identity", *params.Identity) - } - if params != nil && params.LongLived != nil { - data.Set("LongLived", fmt.Sprint(*params.LongLived)) - } - if params != nil && params.PreEngagementData != nil { - data.Set("PreEngagementData", *params.PreEngagementData) - } - if params != nil && params.Target != nil { - data.Set("Target", *params.Target) - } - if params != nil && params.TaskAttributes != nil { - data.Set("TaskAttributes", *params.TaskAttributes) - } - if params != nil && params.TaskSid != nil { - data.Set("TaskSid", *params.TaskSid) - } + if params != nil && params.ChatFriendlyName != nil { + data.Set("ChatFriendlyName", *params.ChatFriendlyName) +} + if params != nil && params.ChatUniqueName != nil { + data.Set("ChatUniqueName", *params.ChatUniqueName) +} + if params != nil && params.ChatUserFriendlyName != nil { + data.Set("ChatUserFriendlyName", *params.ChatUserFriendlyName) +} + if params != nil && params.FlexFlowSid != nil { + data.Set("FlexFlowSid", *params.FlexFlowSid) +} + if params != nil && params.Identity != nil { + data.Set("Identity", *params.Identity) +} + if params != nil && params.LongLived != nil { + data.Set("LongLived", fmt.Sprint(*params.LongLived)) +} + if params != nil && params.PreEngagementData != nil { + data.Set("PreEngagementData", *params.PreEngagementData) +} + if params != nil && params.Target != nil { + data.Set("Target", *params.Target) +} + if params != nil && params.TaskAttributes != nil { + data.Set("TaskAttributes", *params.TaskAttributes) +} + if params != nil && params.TaskSid != nil { + data.Set("TaskSid", *params.TaskSid) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &FlexV1Channel{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &FlexV1Channel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateFlexFlowParams Optional parameters for the method 'CreateFlexFlow' type CreateFlexFlowParams struct { - ChannelType *string `json:"ChannelType,omitempty"` - ChatServiceSid *string `json:"ChatServiceSid,omitempty"` - ContactIdentity *string `json:"ContactIdentity,omitempty"` - Enabled *bool `json:"Enabled,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - IntegrationChannel *string `json:"Integration.Channel,omitempty"` - IntegrationCreationOnMessage *bool `json:"Integration.CreationOnMessage,omitempty"` - IntegrationFlowSid *string `json:"Integration.FlowSid,omitempty"` - IntegrationPriority *int32 `json:"Integration.Priority,omitempty"` - IntegrationRetryCount *int32 `json:"Integration.RetryCount,omitempty"` - IntegrationTimeout *int32 `json:"Integration.Timeout,omitempty"` - IntegrationUrl *string `json:"Integration.Url,omitempty"` - IntegrationWorkflowSid *string `json:"Integration.WorkflowSid,omitempty"` - IntegrationWorkspaceSid *string `json:"Integration.WorkspaceSid,omitempty"` - IntegrationType *string `json:"IntegrationType,omitempty"` - JanitorEnabled *bool `json:"JanitorEnabled,omitempty"` - LongLived *bool `json:"LongLived,omitempty"` + ChannelType *string `json:"ChannelType,omitempty"` + ChatServiceSid *string `json:"ChatServiceSid,omitempty"` + ContactIdentity *string `json:"ContactIdentity,omitempty"` + Enabled *bool `json:"Enabled,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + IntegrationChannel *string `json:"Integration.Channel,omitempty"` + IntegrationCreationOnMessage *bool `json:"Integration.CreationOnMessage,omitempty"` + IntegrationFlowSid *string `json:"Integration.FlowSid,omitempty"` + IntegrationPriority *int32 `json:"Integration.Priority,omitempty"` + IntegrationRetryCount *int32 `json:"Integration.RetryCount,omitempty"` + IntegrationTimeout *int32 `json:"Integration.Timeout,omitempty"` + IntegrationUrl *string `json:"Integration.Url,omitempty"` + IntegrationWorkflowSid *string `json:"Integration.WorkflowSid,omitempty"` + IntegrationWorkspaceSid *string `json:"Integration.WorkspaceSid,omitempty"` + IntegrationType *string `json:"IntegrationType,omitempty"` + JanitorEnabled *bool `json:"JanitorEnabled,omitempty"` + LongLived *bool `json:"LongLived,omitempty"` } /* @@ -155,88 +154,88 @@ type CreateFlexFlowParams struct { * @param "JanitorEnabled" (bool) - When enabled, the Messaging Channel Janitor will remove active Proxy sessions if the associated Task is deleted outside of the Flex UI. Defaults to `false`. * @param "LongLived" (bool) - When enabled, Flex will keep the chat channel active so that it may be used for subsequent interactions with a contact identity. Defaults to `false`. * @return FlexV1FlexFlow - */ +*/ func (c *DefaultApiService) CreateFlexFlow(params *CreateFlexFlowParams) (*FlexV1FlexFlow, error) { - path := "/v1/FlexFlows" + path := "/v1/FlexFlows" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.ChannelType != nil { - data.Set("ChannelType", *params.ChannelType) - } - if params != nil && params.ChatServiceSid != nil { - data.Set("ChatServiceSid", *params.ChatServiceSid) - } - if params != nil && params.ContactIdentity != nil { - data.Set("ContactIdentity", *params.ContactIdentity) - } - if params != nil && params.Enabled != nil { - data.Set("Enabled", fmt.Sprint(*params.Enabled)) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.IntegrationChannel != nil { - data.Set("IntegrationChannel", *params.IntegrationChannel) - } - if params != nil && params.IntegrationCreationOnMessage != nil { - data.Set("IntegrationCreationOnMessage", fmt.Sprint(*params.IntegrationCreationOnMessage)) - } - if params != nil && params.IntegrationFlowSid != nil { - data.Set("IntegrationFlowSid", *params.IntegrationFlowSid) - } - if params != nil && params.IntegrationPriority != nil { - data.Set("IntegrationPriority", fmt.Sprint(*params.IntegrationPriority)) - } - if params != nil && params.IntegrationRetryCount != nil { - data.Set("IntegrationRetryCount", fmt.Sprint(*params.IntegrationRetryCount)) - } - if params != nil && params.IntegrationTimeout != nil { - data.Set("IntegrationTimeout", fmt.Sprint(*params.IntegrationTimeout)) - } - if params != nil && params.IntegrationUrl != nil { - data.Set("IntegrationUrl", *params.IntegrationUrl) - } - if params != nil && params.IntegrationWorkflowSid != nil { - data.Set("IntegrationWorkflowSid", *params.IntegrationWorkflowSid) - } - if params != nil && params.IntegrationWorkspaceSid != nil { - data.Set("IntegrationWorkspaceSid", *params.IntegrationWorkspaceSid) - } - if params != nil && params.IntegrationType != nil { - data.Set("IntegrationType", *params.IntegrationType) - } - if params != nil && params.JanitorEnabled != nil { - data.Set("JanitorEnabled", fmt.Sprint(*params.JanitorEnabled)) - } - if params != nil && params.LongLived != nil { - data.Set("LongLived", fmt.Sprint(*params.LongLived)) - } + if params != nil && params.ChannelType != nil { + data.Set("ChannelType", *params.ChannelType) +} + if params != nil && params.ChatServiceSid != nil { + data.Set("ChatServiceSid", *params.ChatServiceSid) +} + if params != nil && params.ContactIdentity != nil { + data.Set("ContactIdentity", *params.ContactIdentity) +} + if params != nil && params.Enabled != nil { + data.Set("Enabled", fmt.Sprint(*params.Enabled)) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.IntegrationChannel != nil { + data.Set("IntegrationChannel", *params.IntegrationChannel) +} + if params != nil && params.IntegrationCreationOnMessage != nil { + data.Set("IntegrationCreationOnMessage", fmt.Sprint(*params.IntegrationCreationOnMessage)) +} + if params != nil && params.IntegrationFlowSid != nil { + data.Set("IntegrationFlowSid", *params.IntegrationFlowSid) +} + if params != nil && params.IntegrationPriority != nil { + data.Set("IntegrationPriority", fmt.Sprint(*params.IntegrationPriority)) +} + if params != nil && params.IntegrationRetryCount != nil { + data.Set("IntegrationRetryCount", fmt.Sprint(*params.IntegrationRetryCount)) +} + if params != nil && params.IntegrationTimeout != nil { + data.Set("IntegrationTimeout", fmt.Sprint(*params.IntegrationTimeout)) +} + if params != nil && params.IntegrationUrl != nil { + data.Set("IntegrationUrl", *params.IntegrationUrl) +} + if params != nil && params.IntegrationWorkflowSid != nil { + data.Set("IntegrationWorkflowSid", *params.IntegrationWorkflowSid) +} + if params != nil && params.IntegrationWorkspaceSid != nil { + data.Set("IntegrationWorkspaceSid", *params.IntegrationWorkspaceSid) +} + if params != nil && params.IntegrationType != nil { + data.Set("IntegrationType", *params.IntegrationType) +} + if params != nil && params.JanitorEnabled != nil { + data.Set("JanitorEnabled", fmt.Sprint(*params.JanitorEnabled)) +} + if params != nil && params.LongLived != nil { + data.Set("LongLived", fmt.Sprint(*params.LongLived)) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &FlexV1FlexFlow{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &FlexV1FlexFlow{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateWebChannelParams Optional parameters for the method 'CreateWebChannel' type CreateWebChannelParams struct { - ChatFriendlyName *string `json:"ChatFriendlyName,omitempty"` - ChatUniqueName *string `json:"ChatUniqueName,omitempty"` + ChatFriendlyName *string `json:"ChatFriendlyName,omitempty"` + ChatUniqueName *string `json:"ChatUniqueName,omitempty"` CustomerFriendlyName *string `json:"CustomerFriendlyName,omitempty"` - FlexFlowSid *string `json:"FlexFlowSid,omitempty"` - Identity *string `json:"Identity,omitempty"` - PreEngagementData *string `json:"PreEngagementData,omitempty"` + FlexFlowSid *string `json:"FlexFlowSid,omitempty"` + Identity *string `json:"Identity,omitempty"` + PreEngagementData *string `json:"PreEngagementData,omitempty"` } /* @@ -249,137 +248,145 @@ type CreateWebChannelParams struct { * @param "Identity" (string) - The chat identity. * @param "PreEngagementData" (string) - The pre-engagement data. * @return FlexV1WebChannel - */ +*/ func (c *DefaultApiService) CreateWebChannel(params *CreateWebChannelParams) (*FlexV1WebChannel, error) { - path := "/v1/WebChannels" + path := "/v1/WebChannels" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.ChatFriendlyName != nil { - data.Set("ChatFriendlyName", *params.ChatFriendlyName) - } - if params != nil && params.ChatUniqueName != nil { - data.Set("ChatUniqueName", *params.ChatUniqueName) - } - if params != nil && params.CustomerFriendlyName != nil { - data.Set("CustomerFriendlyName", *params.CustomerFriendlyName) - } - if params != nil && params.FlexFlowSid != nil { - data.Set("FlexFlowSid", *params.FlexFlowSid) - } - if params != nil && params.Identity != nil { - data.Set("Identity", *params.Identity) - } - if params != nil && params.PreEngagementData != nil { - data.Set("PreEngagementData", *params.PreEngagementData) - } + if params != nil && params.ChatFriendlyName != nil { + data.Set("ChatFriendlyName", *params.ChatFriendlyName) +} + if params != nil && params.ChatUniqueName != nil { + data.Set("ChatUniqueName", *params.ChatUniqueName) +} + if params != nil && params.CustomerFriendlyName != nil { + data.Set("CustomerFriendlyName", *params.CustomerFriendlyName) +} + if params != nil && params.FlexFlowSid != nil { + data.Set("FlexFlowSid", *params.FlexFlowSid) +} + if params != nil && params.Identity != nil { + data.Set("Identity", *params.Identity) +} + if params != nil && params.PreEngagementData != nil { + data.Set("PreEngagementData", *params.PreEngagementData) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &FlexV1WebChannel{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() + + ps := &FlexV1WebChannel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * DeleteChannel Method for DeleteChannel * @param Sid The SID of the Flex chat channel resource to delete. - */ -func (c *DefaultApiService) DeleteChannel(Sid string) error { - path := "/v1/Channels/{Sid}" +*/ +func (c *DefaultApiService) DeleteChannel(Sid string, ) (error) { + path := "/v1/Channels/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* * DeleteFlexFlow Method for DeleteFlexFlow * @param Sid The SID of the Flex Flow resource to delete. - */ -func (c *DefaultApiService) DeleteFlexFlow(Sid string) error { - path := "/v1/FlexFlows/{Sid}" +*/ +func (c *DefaultApiService) DeleteFlexFlow(Sid string, ) (error) { + path := "/v1/FlexFlows/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* * DeleteWebChannel Method for DeleteWebChannel * @param Sid The SID of the WebChannel resource to delete. - */ -func (c *DefaultApiService) DeleteWebChannel(Sid string) error { - path := "/v1/WebChannels/{Sid}" +*/ +func (c *DefaultApiService) DeleteWebChannel(Sid string, ) (error) { + path := "/v1/WebChannels/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* * FetchChannel Method for FetchChannel * @param Sid The SID of the Flex chat channel resource to fetch. * @return FlexV1Channel - */ -func (c *DefaultApiService) FetchChannel(Sid string) (*FlexV1Channel, error) { - path := "/v1/Channels/{Sid}" +*/ +func (c *DefaultApiService) FetchChannel(Sid string, ) (*FlexV1Channel, error) { + path := "/v1/Channels/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &FlexV1Channel{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err -} + defer resp.Body.Close() + ps := &FlexV1Channel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} // FetchConfigurationParams Optional parameters for the method 'FetchConfiguration' type FetchConfigurationParams struct { UiVersion *string `json:"UiVersion,omitempty"` @@ -390,86 +397,90 @@ type FetchConfigurationParams struct { * @param optional nil or *FetchConfigurationParams - Optional Parameters: * @param "UiVersion" (string) - The Pinned UI version of the Configuration resource to fetch. * @return FlexV1Configuration - */ +*/ func (c *DefaultApiService) FetchConfiguration(params *FetchConfigurationParams) (*FlexV1Configuration, error) { - path := "/v1/Configuration" + path := "/v1/Configuration" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.UiVersion != nil { - data.Set("UiVersion", *params.UiVersion) - } + if params != nil && params.UiVersion != nil { + data.Set("UiVersion", *params.UiVersion) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &FlexV1Configuration{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err + ps := &FlexV1Configuration{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* * FetchFlexFlow Method for FetchFlexFlow * @param Sid The SID of the Flex Flow resource to fetch. * @return FlexV1FlexFlow - */ -func (c *DefaultApiService) FetchFlexFlow(Sid string) (*FlexV1FlexFlow, error) { - path := "/v1/FlexFlows/{Sid}" +*/ +func (c *DefaultApiService) FetchFlexFlow(Sid string, ) (*FlexV1FlexFlow, error) { + path := "/v1/FlexFlows/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &FlexV1FlexFlow{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err + defer resp.Body.Close() + + ps := &FlexV1FlexFlow{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* * FetchWebChannel Method for FetchWebChannel * @param Sid The SID of the WebChannel resource to fetch. * @return FlexV1WebChannel - */ -func (c *DefaultApiService) FetchWebChannel(Sid string) (*FlexV1WebChannel, error) { - path := "/v1/WebChannels/{Sid}" +*/ +func (c *DefaultApiService) FetchWebChannel(Sid string, ) (*FlexV1WebChannel, error) { + path := "/v1/WebChannels/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &FlexV1WebChannel{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err -} + defer resp.Body.Close() + + ps := &FlexV1WebChannel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListChannelParams Optional parameters for the method 'ListChannel' type ListChannelParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -480,36 +491,36 @@ type ListChannelParams struct { * @param optional nil or *ListChannelParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListChannelResponse - */ +*/ func (c *DefaultApiService) ListChannel(params *ListChannelParams) (*ListChannelResponse, error) { - path := "/v1/Channels" + path := "/v1/Channels" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListChannelResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListChannelResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListFlexFlowParams Optional parameters for the method 'ListFlexFlow' type ListFlexFlowParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -518,35 +529,35 @@ type ListFlexFlowParams struct { * @param "FriendlyName" (string) - The `friendly_name` of the Flex Flow resources to read. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListFlexFlowResponse - */ +*/ func (c *DefaultApiService) ListFlexFlow(params *ListFlexFlowParams) (*ListFlexFlowResponse, error) { - path := "/v1/FlexFlows" + path := "/v1/FlexFlows" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListFlexFlowResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListFlexFlowResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListWebChannelParams Optional parameters for the method 'ListWebChannel' type ListWebChannelParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -557,76 +568,78 @@ type ListWebChannelParams struct { * @param optional nil or *ListWebChannelParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListWebChannelResponse - */ +*/ func (c *DefaultApiService) ListWebChannel(params *ListWebChannelParams) (*ListWebChannelResponse, error) { - path := "/v1/WebChannels" + path := "/v1/WebChannels" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListWebChannelResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() + + ps := &ListWebChannelResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * UpdateConfiguration Method for UpdateConfiguration * @return FlexV1Configuration - */ +*/ func (c *DefaultApiService) UpdateConfiguration() (*FlexV1Configuration, error) { - path := "/v1/Configuration" + path := "/v1/Configuration" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &FlexV1Configuration{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err -} + defer resp.Body.Close() + + ps := &FlexV1Configuration{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateFlexFlowParams Optional parameters for the method 'UpdateFlexFlow' type UpdateFlexFlowParams struct { - ChannelType *string `json:"ChannelType,omitempty"` - ChatServiceSid *string `json:"ChatServiceSid,omitempty"` - ContactIdentity *string `json:"ContactIdentity,omitempty"` - Enabled *bool `json:"Enabled,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - IntegrationChannel *string `json:"Integration.Channel,omitempty"` - IntegrationCreationOnMessage *bool `json:"Integration.CreationOnMessage,omitempty"` - IntegrationFlowSid *string `json:"Integration.FlowSid,omitempty"` - IntegrationPriority *int32 `json:"Integration.Priority,omitempty"` - IntegrationRetryCount *int32 `json:"Integration.RetryCount,omitempty"` - IntegrationTimeout *int32 `json:"Integration.Timeout,omitempty"` - IntegrationUrl *string `json:"Integration.Url,omitempty"` - IntegrationWorkflowSid *string `json:"Integration.WorkflowSid,omitempty"` - IntegrationWorkspaceSid *string `json:"Integration.WorkspaceSid,omitempty"` - IntegrationType *string `json:"IntegrationType,omitempty"` - JanitorEnabled *bool `json:"JanitorEnabled,omitempty"` - LongLived *bool `json:"LongLived,omitempty"` + ChannelType *string `json:"ChannelType,omitempty"` + ChatServiceSid *string `json:"ChatServiceSid,omitempty"` + ContactIdentity *string `json:"ContactIdentity,omitempty"` + Enabled *bool `json:"Enabled,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + IntegrationChannel *string `json:"Integration.Channel,omitempty"` + IntegrationCreationOnMessage *bool `json:"Integration.CreationOnMessage,omitempty"` + IntegrationFlowSid *string `json:"Integration.FlowSid,omitempty"` + IntegrationPriority *int32 `json:"Integration.Priority,omitempty"` + IntegrationRetryCount *int32 `json:"Integration.RetryCount,omitempty"` + IntegrationTimeout *int32 `json:"Integration.Timeout,omitempty"` + IntegrationUrl *string `json:"Integration.Url,omitempty"` + IntegrationWorkflowSid *string `json:"Integration.WorkflowSid,omitempty"` + IntegrationWorkspaceSid *string `json:"Integration.WorkspaceSid,omitempty"` + IntegrationType *string `json:"IntegrationType,omitempty"` + JanitorEnabled *bool `json:"JanitorEnabled,omitempty"` + LongLived *bool `json:"LongLived,omitempty"` } /* @@ -651,84 +664,84 @@ type UpdateFlexFlowParams struct { * @param "JanitorEnabled" (bool) - When enabled, the Messaging Channel Janitor will remove active Proxy sessions if the associated Task is deleted outside of the Flex UI. Defaults to `false`. * @param "LongLived" (bool) - When enabled, Flex will keep the chat channel active so that it may be used for subsequent interactions with a contact identity. Defaults to `false`. * @return FlexV1FlexFlow - */ +*/ func (c *DefaultApiService) UpdateFlexFlow(Sid string, params *UpdateFlexFlowParams) (*FlexV1FlexFlow, error) { - path := "/v1/FlexFlows/{Sid}" + path := "/v1/FlexFlows/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.ChannelType != nil { - data.Set("ChannelType", *params.ChannelType) - } - if params != nil && params.ChatServiceSid != nil { - data.Set("ChatServiceSid", *params.ChatServiceSid) - } - if params != nil && params.ContactIdentity != nil { - data.Set("ContactIdentity", *params.ContactIdentity) - } - if params != nil && params.Enabled != nil { - data.Set("Enabled", fmt.Sprint(*params.Enabled)) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.IntegrationChannel != nil { - data.Set("IntegrationChannel", *params.IntegrationChannel) - } - if params != nil && params.IntegrationCreationOnMessage != nil { - data.Set("IntegrationCreationOnMessage", fmt.Sprint(*params.IntegrationCreationOnMessage)) - } - if params != nil && params.IntegrationFlowSid != nil { - data.Set("IntegrationFlowSid", *params.IntegrationFlowSid) - } - if params != nil && params.IntegrationPriority != nil { - data.Set("IntegrationPriority", fmt.Sprint(*params.IntegrationPriority)) - } - if params != nil && params.IntegrationRetryCount != nil { - data.Set("IntegrationRetryCount", fmt.Sprint(*params.IntegrationRetryCount)) - } - if params != nil && params.IntegrationTimeout != nil { - data.Set("IntegrationTimeout", fmt.Sprint(*params.IntegrationTimeout)) - } - if params != nil && params.IntegrationUrl != nil { - data.Set("IntegrationUrl", *params.IntegrationUrl) - } - if params != nil && params.IntegrationWorkflowSid != nil { - data.Set("IntegrationWorkflowSid", *params.IntegrationWorkflowSid) - } - if params != nil && params.IntegrationWorkspaceSid != nil { - data.Set("IntegrationWorkspaceSid", *params.IntegrationWorkspaceSid) - } - if params != nil && params.IntegrationType != nil { - data.Set("IntegrationType", *params.IntegrationType) - } - if params != nil && params.JanitorEnabled != nil { - data.Set("JanitorEnabled", fmt.Sprint(*params.JanitorEnabled)) - } - if params != nil && params.LongLived != nil { - data.Set("LongLived", fmt.Sprint(*params.LongLived)) - } + if params != nil && params.ChannelType != nil { + data.Set("ChannelType", *params.ChannelType) +} + if params != nil && params.ChatServiceSid != nil { + data.Set("ChatServiceSid", *params.ChatServiceSid) +} + if params != nil && params.ContactIdentity != nil { + data.Set("ContactIdentity", *params.ContactIdentity) +} + if params != nil && params.Enabled != nil { + data.Set("Enabled", fmt.Sprint(*params.Enabled)) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.IntegrationChannel != nil { + data.Set("IntegrationChannel", *params.IntegrationChannel) +} + if params != nil && params.IntegrationCreationOnMessage != nil { + data.Set("IntegrationCreationOnMessage", fmt.Sprint(*params.IntegrationCreationOnMessage)) +} + if params != nil && params.IntegrationFlowSid != nil { + data.Set("IntegrationFlowSid", *params.IntegrationFlowSid) +} + if params != nil && params.IntegrationPriority != nil { + data.Set("IntegrationPriority", fmt.Sprint(*params.IntegrationPriority)) +} + if params != nil && params.IntegrationRetryCount != nil { + data.Set("IntegrationRetryCount", fmt.Sprint(*params.IntegrationRetryCount)) +} + if params != nil && params.IntegrationTimeout != nil { + data.Set("IntegrationTimeout", fmt.Sprint(*params.IntegrationTimeout)) +} + if params != nil && params.IntegrationUrl != nil { + data.Set("IntegrationUrl", *params.IntegrationUrl) +} + if params != nil && params.IntegrationWorkflowSid != nil { + data.Set("IntegrationWorkflowSid", *params.IntegrationWorkflowSid) +} + if params != nil && params.IntegrationWorkspaceSid != nil { + data.Set("IntegrationWorkspaceSid", *params.IntegrationWorkspaceSid) +} + if params != nil && params.IntegrationType != nil { + data.Set("IntegrationType", *params.IntegrationType) +} + if params != nil && params.JanitorEnabled != nil { + data.Set("JanitorEnabled", fmt.Sprint(*params.JanitorEnabled)) +} + if params != nil && params.LongLived != nil { + data.Set("LongLived", fmt.Sprint(*params.LongLived)) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &FlexV1FlexFlow{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &FlexV1FlexFlow{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateWebChannelParams Optional parameters for the method 'UpdateWebChannel' type UpdateWebChannelParams struct { - ChatStatus *string `json:"ChatStatus,omitempty"` + ChatStatus *string `json:"ChatStatus,omitempty"` PostEngagementData *string `json:"PostEngagementData,omitempty"` } @@ -739,32 +752,33 @@ type UpdateWebChannelParams struct { * @param "ChatStatus" (string) - The chat status. Can only be `inactive`. * @param "PostEngagementData" (string) - The post-engagement data. * @return FlexV1WebChannel - */ +*/ func (c *DefaultApiService) UpdateWebChannel(Sid string, params *UpdateWebChannelParams) (*FlexV1WebChannel, error) { - path := "/v1/WebChannels/{Sid}" + path := "/v1/WebChannels/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.ChatStatus != nil { - data.Set("ChatStatus", *params.ChatStatus) - } - if params != nil && params.PostEngagementData != nil { - data.Set("PostEngagementData", *params.PostEngagementData) - } + if params != nil && params.ChatStatus != nil { + data.Set("ChatStatus", *params.ChatStatus) +} + if params != nil && params.PostEngagementData != nil { + data.Set("PostEngagementData", *params.PostEngagementData) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &FlexV1WebChannel{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() + + ps := &FlexV1WebChannel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } diff --git a/twilio/rest/flex/v1/model_flex_v1_channel.go b/twilio/rest/flex/v1/model_flex_v1_channel.go index 540a6f14b..e3fcb4c13 100644 --- a/twilio/rest/flex/v1/model_flex_v1_channel.go +++ b/twilio/rest/flex/v1/model_flex_v1_channel.go @@ -1,20 +1,18 @@ /* - * Twilio - Flex - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Flex + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // FlexV1Channel struct for FlexV1Channel type FlexV1Channel struct { // The SID of the Account that created the resource and owns this Workflow diff --git a/twilio/rest/flex/v1/model_flex_v1_configuration.go b/twilio/rest/flex/v1/model_flex_v1_configuration.go index cca75524f..24d937f53 100644 --- a/twilio/rest/flex/v1/model_flex_v1_configuration.go +++ b/twilio/rest/flex/v1/model_flex_v1_configuration.go @@ -1,20 +1,18 @@ /* - * Twilio - Flex - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Flex + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // FlexV1Configuration struct for FlexV1Configuration type FlexV1Configuration struct { // The SID of the Account that created the resource diff --git a/twilio/rest/flex/v1/model_flex_v1_flex_flow.go b/twilio/rest/flex/v1/model_flex_v1_flex_flow.go index f21e4c781..21aa72ec2 100644 --- a/twilio/rest/flex/v1/model_flex_v1_flex_flow.go +++ b/twilio/rest/flex/v1/model_flex_v1_flex_flow.go @@ -1,20 +1,18 @@ /* - * Twilio - Flex - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Flex + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // FlexV1FlexFlow struct for FlexV1FlexFlow type FlexV1FlexFlow struct { // The SID of the Account that created the resource diff --git a/twilio/rest/flex/v1/model_flex_v1_web_channel.go b/twilio/rest/flex/v1/model_flex_v1_web_channel.go index f031c7d46..845e7b36d 100644 --- a/twilio/rest/flex/v1/model_flex_v1_web_channel.go +++ b/twilio/rest/flex/v1/model_flex_v1_web_channel.go @@ -1,20 +1,18 @@ /* - * Twilio - Flex - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Flex + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // FlexV1WebChannel struct for FlexV1WebChannel type FlexV1WebChannel struct { // The SID of the Account that created the resource and owns this Workflow diff --git a/twilio/rest/flex/v1/model_list_channel_response.go b/twilio/rest/flex/v1/model_list_channel_response.go index 23dac0328..9db7f03f0 100644 --- a/twilio/rest/flex/v1/model_list_channel_response.go +++ b/twilio/rest/flex/v1/model_list_channel_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Flex - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Flex + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListChannelResponse struct for ListChannelResponse type ListChannelResponse struct { - FlexChatChannels []FlexV1Channel `json:"FlexChatChannels,omitempty"` - Meta ListChannelResponseMeta `json:"Meta,omitempty"` + FlexChatChannels []FlexV1Channel `json:"FlexChatChannels,omitempty"` + Meta ListChannelResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/flex/v1/model_list_channel_response_meta.go b/twilio/rest/flex/v1/model_list_channel_response_meta.go index fa70d5cf5..022721677 100644 --- a/twilio/rest/flex/v1/model_list_channel_response_meta.go +++ b/twilio/rest/flex/v1/model_list_channel_response_meta.go @@ -1,23 +1,22 @@ /* - * Twilio - Flex - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Flex + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListChannelResponseMeta struct for ListChannelResponseMeta type ListChannelResponseMeta struct { - FirstPageUrl string `json:"FirstPageUrl,omitempty"` - Key string `json:"Key,omitempty"` - NextPageUrl string `json:"NextPageUrl,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` - Url string `json:"Url,omitempty"` + Url string `json:"Url,omitempty"` } diff --git a/twilio/rest/flex/v1/model_list_flex_flow_response.go b/twilio/rest/flex/v1/model_list_flex_flow_response.go index 970124d46..25983f533 100644 --- a/twilio/rest/flex/v1/model_list_flex_flow_response.go +++ b/twilio/rest/flex/v1/model_list_flex_flow_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Flex - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Flex + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListFlexFlowResponse struct for ListFlexFlowResponse type ListFlexFlowResponse struct { - FlexFlows []FlexV1FlexFlow `json:"FlexFlows,omitempty"` - Meta ListChannelResponseMeta `json:"Meta,omitempty"` + FlexFlows []FlexV1FlexFlow `json:"FlexFlows,omitempty"` + Meta ListChannelResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/flex/v1/model_list_web_channel_response.go b/twilio/rest/flex/v1/model_list_web_channel_response.go index f97b6d25c..6856be1e3 100644 --- a/twilio/rest/flex/v1/model_list_web_channel_response.go +++ b/twilio/rest/flex/v1/model_list_web_channel_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Flex - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Flex + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListWebChannelResponse struct for ListWebChannelResponse type ListWebChannelResponse struct { - FlexChatChannels []FlexV1WebChannel `json:"FlexChatChannels,omitempty"` - Meta ListChannelResponseMeta `json:"Meta,omitempty"` + FlexChatChannels []FlexV1WebChannel `json:"FlexChatChannels,omitempty"` + Meta ListChannelResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/insights/v1/api_default.go b/twilio/rest/insights/v1/api_default.go index 768a79177..f5f7effa9 100644 --- a/twilio/rest/insights/v1/api_default.go +++ b/twilio/rest/insights/v1/api_default.go @@ -1,11 +1,11 @@ /* - * Twilio - Insights - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Insights + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,11 +14,11 @@ package openapi import ( "encoding/json" "fmt" - "net/url" - "strings" - "time" - twilio "github.com/twilio/twilio-go/client" + "net/url" + "strings" + "reflect" + "time" ) type DefaultApiService struct { @@ -27,39 +27,41 @@ type DefaultApiService struct { } func NewDefaultApiService(client *twilio.Client) *DefaultApiService { - return &DefaultApiService{ - client: client, + return &DefaultApiService { + client: client, baseURL: "https://insights.twilio.com", } } + /* * FetchCall Method for FetchCall * @param Sid * @return InsightsV1Call - */ -func (c *DefaultApiService) FetchCall(Sid string) (*InsightsV1Call, error) { - path := "/v1/Voice/{Sid}" +*/ +func (c *DefaultApiService) FetchCall(Sid string, ) (*InsightsV1Call, error) { + path := "/v1/Voice/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &InsightsV1Call{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err -} + defer resp.Body.Close() + ps := &InsightsV1Call{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} // FetchSummaryParams Optional parameters for the method 'FetchSummary' type FetchSummaryParams struct { ProcessingState *string `json:"ProcessingState,omitempty"` @@ -69,33 +71,34 @@ type FetchSummaryParams struct { * FetchSummary Method for FetchSummary * @param CallSid * @param optional nil or *FetchSummaryParams - Optional Parameters: -* @param "ProcessingState" (string) - +* @param "ProcessingState" (string) - * @return InsightsV1CallSummary - */ +*/ func (c *DefaultApiService) FetchSummary(CallSid string, params *FetchSummaryParams) (*InsightsV1CallSummary, error) { - path := "/v1/Voice/{CallSid}/Summary" + path := "/v1/Voice/{CallSid}/Summary" path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.ProcessingState != nil { - data.Set("ProcessingState", *params.ProcessingState) - } + if params != nil && params.ProcessingState != nil { + data.Set("ProcessingState", *params.ProcessingState) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &InsightsV1CallSummary{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err + ps := &InsightsV1CallSummary{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -103,148 +106,151 @@ func (c *DefaultApiService) FetchSummary(CallSid string, params *FetchSummaryPar * @param RoomSid * @param ParticipantSid * @return InsightsV1VideoRoomSummaryVideoParticipantSummary - */ -func (c *DefaultApiService) FetchVideoParticipantSummary(RoomSid string, ParticipantSid string) (*InsightsV1VideoRoomSummaryVideoParticipantSummary, error) { - path := "/v1/Video/Rooms/{RoomSid}/Participants/{ParticipantSid}" +*/ +func (c *DefaultApiService) FetchVideoParticipantSummary(RoomSid string, ParticipantSid string, ) (*InsightsV1VideoRoomSummaryVideoParticipantSummary, error) { + path := "/v1/Video/Rooms/{RoomSid}/Participants/{ParticipantSid}" path = strings.Replace(path, "{"+"RoomSid"+"}", RoomSid, -1) path = strings.Replace(path, "{"+"ParticipantSid"+"}", ParticipantSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &InsightsV1VideoRoomSummaryVideoParticipantSummary{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &InsightsV1VideoRoomSummaryVideoParticipantSummary{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* * FetchVideoRoomSummary Method for FetchVideoRoomSummary * @param RoomSid * @return InsightsV1VideoRoomSummary - */ -func (c *DefaultApiService) FetchVideoRoomSummary(RoomSid string) (*InsightsV1VideoRoomSummary, error) { - path := "/v1/Video/Rooms/{RoomSid}" +*/ +func (c *DefaultApiService) FetchVideoRoomSummary(RoomSid string, ) (*InsightsV1VideoRoomSummary, error) { + path := "/v1/Video/Rooms/{RoomSid}" path = strings.Replace(path, "{"+"RoomSid"+"}", RoomSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &InsightsV1VideoRoomSummary{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err -} + defer resp.Body.Close() + ps := &InsightsV1VideoRoomSummary{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} // ListEventParams Optional parameters for the method 'ListEvent' type ListEventParams struct { - Edge *string `json:"Edge,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + Edge *string `json:"Edge,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* * ListEvent Method for ListEvent * @param CallSid * @param optional nil or *ListEventParams - Optional Parameters: -* @param "Edge" (string) - +* @param "Edge" (string) - * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListEventResponse - */ +*/ func (c *DefaultApiService) ListEvent(CallSid string, params *ListEventParams) (*ListEventResponse, error) { - path := "/v1/Voice/{CallSid}/Events" + path := "/v1/Voice/{CallSid}/Events" path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Edge != nil { - data.Set("Edge", *params.Edge) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.Edge != nil { + data.Set("Edge", *params.Edge) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListEventResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListEventResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListMetricParams Optional parameters for the method 'ListMetric' type ListMetricParams struct { - Edge *string `json:"Edge,omitempty"` + Edge *string `json:"Edge,omitempty"` Direction *string `json:"Direction,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* * ListMetric Method for ListMetric * @param CallSid * @param optional nil or *ListMetricParams - Optional Parameters: -* @param "Edge" (string) - -* @param "Direction" (string) - +* @param "Edge" (string) - +* @param "Direction" (string) - * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListMetricResponse - */ +*/ func (c *DefaultApiService) ListMetric(CallSid string, params *ListMetricParams) (*ListMetricResponse, error) { - path := "/v1/Voice/{CallSid}/Metrics" + path := "/v1/Voice/{CallSid}/Metrics" path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Edge != nil { - data.Set("Edge", *params.Edge) - } - if params != nil && params.Direction != nil { - data.Set("Direction", *params.Direction) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.Edge != nil { + data.Set("Edge", *params.Edge) +} + if params != nil && params.Direction != nil { + data.Set("Direction", *params.Direction) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListMetricResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListMetricResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListVideoParticipantSummaryParams Optional parameters for the method 'ListVideoParticipantSummary' type ListVideoParticipantSummaryParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -256,90 +262,91 @@ type ListVideoParticipantSummaryParams struct { * @param optional nil or *ListVideoParticipantSummaryParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListVideoParticipantSummaryResponse - */ +*/ func (c *DefaultApiService) ListVideoParticipantSummary(RoomSid string, params *ListVideoParticipantSummaryParams) (*ListVideoParticipantSummaryResponse, error) { - path := "/v1/Video/Rooms/{RoomSid}/Participants" + path := "/v1/Video/Rooms/{RoomSid}/Participants" path = strings.Replace(path, "{"+"RoomSid"+"}", RoomSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListVideoParticipantSummaryResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListVideoParticipantSummaryResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListVideoRoomSummaryParams Optional parameters for the method 'ListVideoRoomSummary' type ListVideoRoomSummaryParams struct { - RoomType *[]string `json:"RoomType,omitempty"` - Codec *[]string `json:"Codec,omitempty"` - RoomName *string `json:"RoomName,omitempty"` - CreatedAfter *time.Time `json:"CreatedAfter,omitempty"` + RoomType *[]string `json:"RoomType,omitempty"` + Codec *[]string `json:"Codec,omitempty"` + RoomName *string `json:"RoomName,omitempty"` + CreatedAfter *time.Time `json:"CreatedAfter,omitempty"` CreatedBefore *time.Time `json:"CreatedBefore,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* * ListVideoRoomSummary Method for ListVideoRoomSummary * @param optional nil or *ListVideoRoomSummaryParams - Optional Parameters: -* @param "RoomType" ([]string) - -* @param "Codec" ([]string) - -* @param "RoomName" (string) - -* @param "CreatedAfter" (time.Time) - -* @param "CreatedBefore" (time.Time) - +* @param "RoomType" ([]string) - +* @param "Codec" ([]string) - +* @param "RoomName" (string) - +* @param "CreatedAfter" (time.Time) - +* @param "CreatedBefore" (time.Time) - * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListVideoRoomSummaryResponse - */ +*/ func (c *DefaultApiService) ListVideoRoomSummary(params *ListVideoRoomSummaryParams) (*ListVideoRoomSummaryResponse, error) { - path := "/v1/Video/Rooms" + path := "/v1/Video/Rooms" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.RoomType != nil { - data.Set("RoomType", strings.Join(*params.RoomType, ",")) - } - if params != nil && params.Codec != nil { - data.Set("Codec", strings.Join(*params.Codec, ",")) - } - if params != nil && params.RoomName != nil { - data.Set("RoomName", *params.RoomName) - } - if params != nil && params.CreatedAfter != nil { - data.Set("CreatedAfter", fmt.Sprint(*params.CreatedAfter)) - } - if params != nil && params.CreatedBefore != nil { - data.Set("CreatedBefore", fmt.Sprint(*params.CreatedBefore)) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.RoomType != nil { + data.Set("RoomType", strings.Join(*params.RoomType, ",")) +} + if params != nil && params.Codec != nil { + data.Set("Codec", strings.Join(*params.Codec, ",")) +} + if params != nil && params.RoomName != nil { + data.Set("RoomName", *params.RoomName) +} + if params != nil && params.CreatedAfter != nil { + data.Set("CreatedAfter", fmt.Sprint(*params.CreatedAfter)) +} + if params != nil && params.CreatedBefore != nil { + data.Set("CreatedBefore", fmt.Sprint(*params.CreatedBefore)) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListVideoRoomSummaryResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() + + ps := &ListVideoRoomSummaryResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } diff --git a/twilio/rest/insights/v1/model_insights_v1_call.go b/twilio/rest/insights/v1/model_insights_v1_call.go index c079bd63d..94a34507b 100644 --- a/twilio/rest/insights/v1/model_insights_v1_call.go +++ b/twilio/rest/insights/v1/model_insights_v1_call.go @@ -1,19 +1,18 @@ /* - * Twilio - Insights - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Insights + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // InsightsV1Call struct for InsightsV1Call type InsightsV1Call struct { Links *map[string]interface{} `json:"Links,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` + Sid *string `json:"Sid,omitempty"` + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/insights/v1/model_insights_v1_call_event.go b/twilio/rest/insights/v1/model_insights_v1_call_event.go index 5b914a16e..42c89af4b 100644 --- a/twilio/rest/insights/v1/model_insights_v1_call_event.go +++ b/twilio/rest/insights/v1/model_insights_v1_call_event.go @@ -1,27 +1,26 @@ /* - * Twilio - Insights - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Insights + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // InsightsV1CallEvent struct for InsightsV1CallEvent type InsightsV1CallEvent struct { - AccountSid *string `json:"AccountSid,omitempty"` - CallSid *string `json:"CallSid,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` + CallSid *string `json:"CallSid,omitempty"` CarrierEdge *map[string]interface{} `json:"CarrierEdge,omitempty"` - ClientEdge *map[string]interface{} `json:"ClientEdge,omitempty"` - Edge *string `json:"Edge,omitempty"` - Group *string `json:"Group,omitempty"` - Level *string `json:"Level,omitempty"` - Name *string `json:"Name,omitempty"` - SdkEdge *map[string]interface{} `json:"SdkEdge,omitempty"` - SipEdge *map[string]interface{} `json:"SipEdge,omitempty"` - Timestamp *string `json:"Timestamp,omitempty"` + ClientEdge *map[string]interface{} `json:"ClientEdge,omitempty"` + Edge *string `json:"Edge,omitempty"` + Group *string `json:"Group,omitempty"` + Level *string `json:"Level,omitempty"` + Name *string `json:"Name,omitempty"` + SdkEdge *map[string]interface{} `json:"SdkEdge,omitempty"` + SipEdge *map[string]interface{} `json:"SipEdge,omitempty"` + Timestamp *string `json:"Timestamp,omitempty"` } diff --git a/twilio/rest/insights/v1/model_insights_v1_call_metric.go b/twilio/rest/insights/v1/model_insights_v1_call_metric.go index c6e293d40..d2a94106c 100644 --- a/twilio/rest/insights/v1/model_insights_v1_call_metric.go +++ b/twilio/rest/insights/v1/model_insights_v1_call_metric.go @@ -1,25 +1,24 @@ /* - * Twilio - Insights - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Insights + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // InsightsV1CallMetric struct for InsightsV1CallMetric type InsightsV1CallMetric struct { - AccountSid *string `json:"AccountSid,omitempty"` - CallSid *string `json:"CallSid,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` + CallSid *string `json:"CallSid,omitempty"` CarrierEdge *map[string]interface{} `json:"CarrierEdge,omitempty"` - ClientEdge *map[string]interface{} `json:"ClientEdge,omitempty"` - Direction *string `json:"Direction,omitempty"` - Edge *string `json:"Edge,omitempty"` - SdkEdge *map[string]interface{} `json:"SdkEdge,omitempty"` - SipEdge *map[string]interface{} `json:"SipEdge,omitempty"` - Timestamp *string `json:"Timestamp,omitempty"` + ClientEdge *map[string]interface{} `json:"ClientEdge,omitempty"` + Direction *string `json:"Direction,omitempty"` + Edge *string `json:"Edge,omitempty"` + SdkEdge *map[string]interface{} `json:"SdkEdge,omitempty"` + SipEdge *map[string]interface{} `json:"SipEdge,omitempty"` + Timestamp *string `json:"Timestamp,omitempty"` } diff --git a/twilio/rest/insights/v1/model_insights_v1_call_summary.go b/twilio/rest/insights/v1/model_insights_v1_call_summary.go index faf5c3616..d720fdd8b 100644 --- a/twilio/rest/insights/v1/model_insights_v1_call_summary.go +++ b/twilio/rest/insights/v1/model_insights_v1_call_summary.go @@ -1,41 +1,39 @@ /* - * Twilio - Insights - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Insights + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // InsightsV1CallSummary struct for InsightsV1CallSummary type InsightsV1CallSummary struct { - AccountSid *string `json:"AccountSid,omitempty"` - Attributes *map[string]interface{} `json:"Attributes,omitempty"` - CallSid *string `json:"CallSid,omitempty"` - CallState *string `json:"CallState,omitempty"` - CallType *string `json:"CallType,omitempty"` - CarrierEdge *map[string]interface{} `json:"CarrierEdge,omitempty"` - ClientEdge *map[string]interface{} `json:"ClientEdge,omitempty"` - ConnectDuration *int32 `json:"ConnectDuration,omitempty"` - CreatedTime *time.Time `json:"CreatedTime,omitempty"` - Duration *int32 `json:"Duration,omitempty"` - EndTime *time.Time `json:"EndTime,omitempty"` - From *map[string]interface{} `json:"From,omitempty"` - ProcessingState *string `json:"ProcessingState,omitempty"` - Properties *map[string]interface{} `json:"Properties,omitempty"` - SdkEdge *map[string]interface{} `json:"SdkEdge,omitempty"` - SipEdge *map[string]interface{} `json:"SipEdge,omitempty"` - StartTime *time.Time `json:"StartTime,omitempty"` - Tags *[]string `json:"Tags,omitempty"` - To *map[string]interface{} `json:"To,omitempty"` - Trust *map[string]interface{} `json:"Trust,omitempty"` - Url *string `json:"Url,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` + Attributes *map[string]interface{} `json:"Attributes,omitempty"` + CallSid *string `json:"CallSid,omitempty"` + CallState *string `json:"CallState,omitempty"` + CallType *string `json:"CallType,omitempty"` + CarrierEdge *map[string]interface{} `json:"CarrierEdge,omitempty"` + ClientEdge *map[string]interface{} `json:"ClientEdge,omitempty"` + ConnectDuration *int32 `json:"ConnectDuration,omitempty"` + CreatedTime *time.Time `json:"CreatedTime,omitempty"` + Duration *int32 `json:"Duration,omitempty"` + EndTime *time.Time `json:"EndTime,omitempty"` + From *map[string]interface{} `json:"From,omitempty"` + ProcessingState *string `json:"ProcessingState,omitempty"` + Properties *map[string]interface{} `json:"Properties,omitempty"` + SdkEdge *map[string]interface{} `json:"SdkEdge,omitempty"` + SipEdge *map[string]interface{} `json:"SipEdge,omitempty"` + StartTime *time.Time `json:"StartTime,omitempty"` + Tags *[]string `json:"Tags,omitempty"` + To *map[string]interface{} `json:"To,omitempty"` + Trust *map[string]interface{} `json:"Trust,omitempty"` + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/insights/v1/model_insights_v1_video_room_summary.go b/twilio/rest/insights/v1/model_insights_v1_video_room_summary.go index 7a78fc55e..45cfbd371 100644 --- a/twilio/rest/insights/v1/model_insights_v1_video_room_summary.go +++ b/twilio/rest/insights/v1/model_insights_v1_video_room_summary.go @@ -1,46 +1,44 @@ /* - * Twilio - Insights - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Insights + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // InsightsV1VideoRoomSummary struct for InsightsV1VideoRoomSummary type InsightsV1VideoRoomSummary struct { - AccountSid *string `json:"AccountSid,omitempty"` - Codecs *[]string `json:"Codecs,omitempty"` - ConcurrentParticipants *int32 `json:"ConcurrentParticipants,omitempty"` - CreateTime *time.Time `json:"CreateTime,omitempty"` - CreatedMethod *string `json:"CreatedMethod,omitempty"` - DurationSec *int32 `json:"DurationSec,omitempty"` - EdgeLocation *string `json:"EdgeLocation,omitempty"` - EndReason *string `json:"EndReason,omitempty"` - EndTime *time.Time `json:"EndTime,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - MaxConcurrentParticipants *int32 `json:"MaxConcurrentParticipants,omitempty"` - MaxParticipants *int32 `json:"MaxParticipants,omitempty"` - MediaRegion *string `json:"MediaRegion,omitempty"` - ProcessingState *string `json:"ProcessingState,omitempty"` - RecordingEnabled *bool `json:"RecordingEnabled,omitempty"` - RoomName *string `json:"RoomName,omitempty"` - RoomSid *string `json:"RoomSid,omitempty"` - RoomStatus *string `json:"RoomStatus,omitempty"` - RoomType *string `json:"RoomType,omitempty"` - StatusCallback *string `json:"StatusCallback,omitempty"` - StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` - TotalParticipantDurationSec *int32 `json:"TotalParticipantDurationSec,omitempty"` - TotalRecordingDurationSec *int32 `json:"TotalRecordingDurationSec,omitempty"` - UniqueParticipantIdentities *int32 `json:"UniqueParticipantIdentities,omitempty"` - UniqueParticipants *int32 `json:"UniqueParticipants,omitempty"` - Url *string `json:"Url,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` + Codecs *[]string `json:"Codecs,omitempty"` + ConcurrentParticipants *int32 `json:"ConcurrentParticipants,omitempty"` + CreateTime *time.Time `json:"CreateTime,omitempty"` + CreatedMethod *string `json:"CreatedMethod,omitempty"` + DurationSec *int32 `json:"DurationSec,omitempty"` + EdgeLocation *string `json:"EdgeLocation,omitempty"` + EndReason *string `json:"EndReason,omitempty"` + EndTime *time.Time `json:"EndTime,omitempty"` + Links *map[string]interface{} `json:"Links,omitempty"` + MaxConcurrentParticipants *int32 `json:"MaxConcurrentParticipants,omitempty"` + MaxParticipants *int32 `json:"MaxParticipants,omitempty"` + MediaRegion *string `json:"MediaRegion,omitempty"` + ProcessingState *string `json:"ProcessingState,omitempty"` + RecordingEnabled *bool `json:"RecordingEnabled,omitempty"` + RoomName *string `json:"RoomName,omitempty"` + RoomSid *string `json:"RoomSid,omitempty"` + RoomStatus *string `json:"RoomStatus,omitempty"` + RoomType *string `json:"RoomType,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` + StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` + TotalParticipantDurationSec *int32 `json:"TotalParticipantDurationSec,omitempty"` + TotalRecordingDurationSec *int32 `json:"TotalRecordingDurationSec,omitempty"` + UniqueParticipantIdentities *int32 `json:"UniqueParticipantIdentities,omitempty"` + UniqueParticipants *int32 `json:"UniqueParticipants,omitempty"` + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/insights/v1/model_insights_v1_video_room_summary_video_participant_summary.go b/twilio/rest/insights/v1/model_insights_v1_video_room_summary_video_participant_summary.go index 3da85601d..ad8829aa4 100644 --- a/twilio/rest/insights/v1/model_insights_v1_video_room_summary_video_participant_summary.go +++ b/twilio/rest/insights/v1/model_insights_v1_video_room_summary_video_participant_summary.go @@ -1,37 +1,35 @@ /* - * Twilio - Insights - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Insights + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // InsightsV1VideoRoomSummaryVideoParticipantSummary struct for InsightsV1VideoRoomSummaryVideoParticipantSummary type InsightsV1VideoRoomSummaryVideoParticipantSummary struct { - AccountSid *string `json:"AccountSid,omitempty"` - Codecs *[]string `json:"Codecs,omitempty"` - DurationSec *int32 `json:"DurationSec,omitempty"` - EdgeLocation *string `json:"EdgeLocation,omitempty"` - EndReason *string `json:"EndReason,omitempty"` - ErrorCode *int32 `json:"ErrorCode,omitempty"` - ErrorCodeUrl *string `json:"ErrorCodeUrl,omitempty"` - JoinTime *time.Time `json:"JoinTime,omitempty"` - LeaveTime *time.Time `json:"LeaveTime,omitempty"` - MediaRegion *string `json:"MediaRegion,omitempty"` - ParticipantIdentity *string `json:"ParticipantIdentity,omitempty"` - ParticipantSid *string `json:"ParticipantSid,omitempty"` - Properties *map[string]interface{} `json:"Properties,omitempty"` - PublisherInfo *map[string]interface{} `json:"PublisherInfo,omitempty"` - RoomSid *string `json:"RoomSid,omitempty"` - Status *string `json:"Status,omitempty"` - Url *string `json:"Url,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` + Codecs *[]string `json:"Codecs,omitempty"` + DurationSec *int32 `json:"DurationSec,omitempty"` + EdgeLocation *string `json:"EdgeLocation,omitempty"` + EndReason *string `json:"EndReason,omitempty"` + ErrorCode *int32 `json:"ErrorCode,omitempty"` + ErrorCodeUrl *string `json:"ErrorCodeUrl,omitempty"` + JoinTime *time.Time `json:"JoinTime,omitempty"` + LeaveTime *time.Time `json:"LeaveTime,omitempty"` + MediaRegion *string `json:"MediaRegion,omitempty"` + ParticipantIdentity *string `json:"ParticipantIdentity,omitempty"` + ParticipantSid *string `json:"ParticipantSid,omitempty"` + Properties *map[string]interface{} `json:"Properties,omitempty"` + PublisherInfo *map[string]interface{} `json:"PublisherInfo,omitempty"` + RoomSid *string `json:"RoomSid,omitempty"` + Status *string `json:"Status,omitempty"` + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/insights/v1/model_list_event_response.go b/twilio/rest/insights/v1/model_list_event_response.go index a4d853557..b8a6b6fc0 100644 --- a/twilio/rest/insights/v1/model_list_event_response.go +++ b/twilio/rest/insights/v1/model_list_event_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Insights - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Insights + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListEventResponse struct for ListEventResponse type ListEventResponse struct { - Events []InsightsV1CallEvent `json:"Events,omitempty"` - Meta ListVideoRoomSummaryResponseMeta `json:"Meta,omitempty"` + Events []InsightsV1CallEvent `json:"Events,omitempty"` + Meta ListVideoRoomSummaryResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/insights/v1/model_list_metric_response.go b/twilio/rest/insights/v1/model_list_metric_response.go index 40367251b..70079ce26 100644 --- a/twilio/rest/insights/v1/model_list_metric_response.go +++ b/twilio/rest/insights/v1/model_list_metric_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Insights - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Insights + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListMetricResponse struct for ListMetricResponse type ListMetricResponse struct { - Meta ListVideoRoomSummaryResponseMeta `json:"Meta,omitempty"` - Metrics []InsightsV1CallMetric `json:"Metrics,omitempty"` + Meta ListVideoRoomSummaryResponseMeta `json:"Meta,omitempty"` + Metrics []InsightsV1CallMetric `json:"Metrics,omitempty"` } diff --git a/twilio/rest/insights/v1/model_list_video_participant_summary_response.go b/twilio/rest/insights/v1/model_list_video_participant_summary_response.go index 2c367dbd8..fbb55f417 100644 --- a/twilio/rest/insights/v1/model_list_video_participant_summary_response.go +++ b/twilio/rest/insights/v1/model_list_video_participant_summary_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Insights - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Insights + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListVideoParticipantSummaryResponse struct for ListVideoParticipantSummaryResponse type ListVideoParticipantSummaryResponse struct { - Meta ListVideoRoomSummaryResponseMeta `json:"Meta,omitempty"` + Meta ListVideoRoomSummaryResponseMeta `json:"Meta,omitempty"` Participants []InsightsV1VideoRoomSummaryVideoParticipantSummary `json:"Participants,omitempty"` } diff --git a/twilio/rest/insights/v1/model_list_video_room_summary_response.go b/twilio/rest/insights/v1/model_list_video_room_summary_response.go index ddcfcc4f0..3068d31f8 100644 --- a/twilio/rest/insights/v1/model_list_video_room_summary_response.go +++ b/twilio/rest/insights/v1/model_list_video_room_summary_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Insights - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Insights + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListVideoRoomSummaryResponse struct for ListVideoRoomSummaryResponse type ListVideoRoomSummaryResponse struct { - Meta ListVideoRoomSummaryResponseMeta `json:"Meta,omitempty"` - Rooms []InsightsV1VideoRoomSummary `json:"Rooms,omitempty"` + Meta ListVideoRoomSummaryResponseMeta `json:"Meta,omitempty"` + Rooms []InsightsV1VideoRoomSummary `json:"Rooms,omitempty"` } diff --git a/twilio/rest/insights/v1/model_list_video_room_summary_response_meta.go b/twilio/rest/insights/v1/model_list_video_room_summary_response_meta.go index 9e5c33a7b..d5ace5062 100644 --- a/twilio/rest/insights/v1/model_list_video_room_summary_response_meta.go +++ b/twilio/rest/insights/v1/model_list_video_room_summary_response_meta.go @@ -1,23 +1,22 @@ /* - * Twilio - Insights - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Insights + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListVideoRoomSummaryResponseMeta struct for ListVideoRoomSummaryResponseMeta type ListVideoRoomSummaryResponseMeta struct { - FirstPageUrl string `json:"FirstPageUrl,omitempty"` - Key string `json:"Key,omitempty"` - NextPageUrl string `json:"NextPageUrl,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` - Url string `json:"Url,omitempty"` + Url string `json:"Url,omitempty"` } diff --git a/twilio/rest/ip_messaging/v1/api_default.go b/twilio/rest/ip_messaging/v1/api_default.go index bc44f9380..2c550dfc6 100644 --- a/twilio/rest/ip_messaging/v1/api_default.go +++ b/twilio/rest/ip_messaging/v1/api_default.go @@ -1,11 +1,11 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,10 +14,10 @@ package openapi import ( "encoding/json" "fmt" - "net/url" - "strings" - twilio "github.com/twilio/twilio-go/client" + "net/url" + "strings" + "reflect" ) type DefaultApiService struct { @@ -26,135 +26,135 @@ type DefaultApiService struct { } func NewDefaultApiService(client *twilio.Client) *DefaultApiService { - return &DefaultApiService{ - client: client, + return &DefaultApiService { + client: client, baseURL: "https://ip-messaging.twilio.com", } } // CreateChannelParams Optional parameters for the method 'CreateChannel' type CreateChannelParams struct { - Attributes *string `json:"Attributes,omitempty"` + Attributes *string `json:"Attributes,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` - Type *string `json:"Type,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + Type *string `json:"Type,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` } /* * CreateChannel Method for CreateChannel * @param ServiceSid * @param optional nil or *CreateChannelParams - Optional Parameters: -* @param "Attributes" (string) - -* @param "FriendlyName" (string) - -* @param "Type" (string) - -* @param "UniqueName" (string) - +* @param "Attributes" (string) - +* @param "FriendlyName" (string) - +* @param "Type" (string) - +* @param "UniqueName" (string) - * @return IpMessagingV1ServiceChannel - */ +*/ func (c *DefaultApiService) CreateChannel(ServiceSid string, params *CreateChannelParams) (*IpMessagingV1ServiceChannel, error) { - path := "/v1/Services/{ServiceSid}/Channels" + path := "/v1/Services/{ServiceSid}/Channels" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.Type != nil { - data.Set("Type", *params.Type) - } - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) - } + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.Type != nil { + data.Set("Type", *params.Type) +} + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &IpMessagingV1ServiceChannel{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &IpMessagingV1ServiceChannel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateCredentialParams Optional parameters for the method 'CreateCredential' type CreateCredentialParams struct { - ApiKey *string `json:"ApiKey,omitempty"` - Certificate *string `json:"Certificate,omitempty"` + ApiKey *string `json:"ApiKey,omitempty"` + Certificate *string `json:"Certificate,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` - PrivateKey *string `json:"PrivateKey,omitempty"` - Sandbox *bool `json:"Sandbox,omitempty"` - Secret *string `json:"Secret,omitempty"` - Type *string `json:"Type,omitempty"` + PrivateKey *string `json:"PrivateKey,omitempty"` + Sandbox *bool `json:"Sandbox,omitempty"` + Secret *string `json:"Secret,omitempty"` + Type *string `json:"Type,omitempty"` } /* * CreateCredential Method for CreateCredential * @param optional nil or *CreateCredentialParams - Optional Parameters: -* @param "ApiKey" (string) - -* @param "Certificate" (string) - -* @param "FriendlyName" (string) - -* @param "PrivateKey" (string) - -* @param "Sandbox" (bool) - -* @param "Secret" (string) - -* @param "Type" (string) - +* @param "ApiKey" (string) - +* @param "Certificate" (string) - +* @param "FriendlyName" (string) - +* @param "PrivateKey" (string) - +* @param "Sandbox" (bool) - +* @param "Secret" (string) - +* @param "Type" (string) - * @return IpMessagingV1Credential - */ +*/ func (c *DefaultApiService) CreateCredential(params *CreateCredentialParams) (*IpMessagingV1Credential, error) { - path := "/v1/Credentials" + path := "/v1/Credentials" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.ApiKey != nil { - data.Set("ApiKey", *params.ApiKey) - } - if params != nil && params.Certificate != nil { - data.Set("Certificate", *params.Certificate) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.PrivateKey != nil { - data.Set("PrivateKey", *params.PrivateKey) - } - if params != nil && params.Sandbox != nil { - data.Set("Sandbox", fmt.Sprint(*params.Sandbox)) - } - if params != nil && params.Secret != nil { - data.Set("Secret", *params.Secret) - } - if params != nil && params.Type != nil { - data.Set("Type", *params.Type) - } + if params != nil && params.ApiKey != nil { + data.Set("ApiKey", *params.ApiKey) +} + if params != nil && params.Certificate != nil { + data.Set("Certificate", *params.Certificate) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.PrivateKey != nil { + data.Set("PrivateKey", *params.PrivateKey) +} + if params != nil && params.Sandbox != nil { + data.Set("Sandbox", fmt.Sprint(*params.Sandbox)) +} + if params != nil && params.Secret != nil { + data.Set("Secret", *params.Secret) +} + if params != nil && params.Type != nil { + data.Set("Type", *params.Type) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &IpMessagingV1Credential{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &IpMessagingV1Credential{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateInviteParams Optional parameters for the method 'CreateInvite' type CreateInviteParams struct { Identity *string `json:"Identity,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` } /* @@ -162,44 +162,44 @@ type CreateInviteParams struct { * @param ServiceSid * @param ChannelSid * @param optional nil or *CreateInviteParams - Optional Parameters: -* @param "Identity" (string) - -* @param "RoleSid" (string) - +* @param "Identity" (string) - +* @param "RoleSid" (string) - * @return IpMessagingV1ServiceChannelInvite - */ +*/ func (c *DefaultApiService) CreateInvite(ServiceSid string, ChannelSid string, params *CreateInviteParams) (*IpMessagingV1ServiceChannelInvite, error) { - path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Invites" + path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Invites" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Identity != nil { - data.Set("Identity", *params.Identity) - } - if params != nil && params.RoleSid != nil { - data.Set("RoleSid", *params.RoleSid) - } + if params != nil && params.Identity != nil { + data.Set("Identity", *params.Identity) +} + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &IpMessagingV1ServiceChannelInvite{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &IpMessagingV1ServiceChannelInvite{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateMemberParams Optional parameters for the method 'CreateMember' type CreateMemberParams struct { Identity *string `json:"Identity,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` } /* @@ -207,45 +207,45 @@ type CreateMemberParams struct { * @param ServiceSid * @param ChannelSid * @param optional nil or *CreateMemberParams - Optional Parameters: -* @param "Identity" (string) - -* @param "RoleSid" (string) - +* @param "Identity" (string) - +* @param "RoleSid" (string) - * @return IpMessagingV1ServiceChannelMember - */ +*/ func (c *DefaultApiService) CreateMember(ServiceSid string, ChannelSid string, params *CreateMemberParams) (*IpMessagingV1ServiceChannelMember, error) { - path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members" + path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Identity != nil { - data.Set("Identity", *params.Identity) - } - if params != nil && params.RoleSid != nil { - data.Set("RoleSid", *params.RoleSid) - } + if params != nil && params.Identity != nil { + data.Set("Identity", *params.Identity) +} + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &IpMessagingV1ServiceChannelMember{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &IpMessagingV1ServiceChannelMember{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateMessageParams Optional parameters for the method 'CreateMessage' type CreateMessageParams struct { Attributes *string `json:"Attributes,omitempty"` - Body *string `json:"Body,omitempty"` - From *string `json:"From,omitempty"` + Body *string `json:"Body,omitempty"` + From *string `json:"From,omitempty"` } /* @@ -253,92 +253,92 @@ type CreateMessageParams struct { * @param ServiceSid * @param ChannelSid * @param optional nil or *CreateMessageParams - Optional Parameters: -* @param "Attributes" (string) - -* @param "Body" (string) - -* @param "From" (string) - +* @param "Attributes" (string) - +* @param "Body" (string) - +* @param "From" (string) - * @return IpMessagingV1ServiceChannelMessage - */ +*/ func (c *DefaultApiService) CreateMessage(ServiceSid string, ChannelSid string, params *CreateMessageParams) (*IpMessagingV1ServiceChannelMessage, error) { - path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages" + path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) - } - if params != nil && params.Body != nil { - data.Set("Body", *params.Body) - } - if params != nil && params.From != nil { - data.Set("From", *params.From) - } + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) +} + if params != nil && params.Body != nil { + data.Set("Body", *params.Body) +} + if params != nil && params.From != nil { + data.Set("From", *params.From) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &IpMessagingV1ServiceChannelMessage{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &IpMessagingV1ServiceChannelMessage{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateRoleParams Optional parameters for the method 'CreateRole' type CreateRoleParams struct { - FriendlyName *string `json:"FriendlyName,omitempty"` - Permission *[]string `json:"Permission,omitempty"` - Type *string `json:"Type,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Permission *[]string `json:"Permission,omitempty"` + Type *string `json:"Type,omitempty"` } /* * CreateRole Method for CreateRole * @param ServiceSid * @param optional nil or *CreateRoleParams - Optional Parameters: -* @param "FriendlyName" (string) - -* @param "Permission" ([]string) - -* @param "Type" (string) - +* @param "FriendlyName" (string) - +* @param "Permission" ([]string) - +* @param "Type" (string) - * @return IpMessagingV1ServiceRole - */ +*/ func (c *DefaultApiService) CreateRole(ServiceSid string, params *CreateRoleParams) (*IpMessagingV1ServiceRole, error) { - path := "/v1/Services/{ServiceSid}/Roles" + path := "/v1/Services/{ServiceSid}/Roles" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.Permission != nil { - data.Set("Permission", strings.Join(*params.Permission, ",")) - } - if params != nil && params.Type != nil { - data.Set("Type", *params.Type) - } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.Permission != nil { + data.Set("Permission", strings.Join(*params.Permission, ",")) +} + if params != nil && params.Type != nil { + data.Set("Type", *params.Type) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &IpMessagingV1ServiceRole{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &IpMessagingV1ServiceRole{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateServiceParams Optional parameters for the method 'CreateService' type CreateServiceParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` @@ -347,129 +347,134 @@ type CreateServiceParams struct { /* * CreateService Method for CreateService * @param optional nil or *CreateServiceParams - Optional Parameters: -* @param "FriendlyName" (string) - +* @param "FriendlyName" (string) - * @return IpMessagingV1Service - */ +*/ func (c *DefaultApiService) CreateService(params *CreateServiceParams) (*IpMessagingV1Service, error) { - path := "/v1/Services" + path := "/v1/Services" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &IpMessagingV1Service{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &IpMessagingV1Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateUserParams Optional parameters for the method 'CreateUser' type CreateUserParams struct { - Attributes *string `json:"Attributes,omitempty"` + Attributes *string `json:"Attributes,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` - Identity *string `json:"Identity,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` + Identity *string `json:"Identity,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` } /* * CreateUser Method for CreateUser * @param ServiceSid * @param optional nil or *CreateUserParams - Optional Parameters: -* @param "Attributes" (string) - -* @param "FriendlyName" (string) - -* @param "Identity" (string) - -* @param "RoleSid" (string) - +* @param "Attributes" (string) - +* @param "FriendlyName" (string) - +* @param "Identity" (string) - +* @param "RoleSid" (string) - * @return IpMessagingV1ServiceUser - */ +*/ func (c *DefaultApiService) CreateUser(ServiceSid string, params *CreateUserParams) (*IpMessagingV1ServiceUser, error) { - path := "/v1/Services/{ServiceSid}/Users" + path := "/v1/Services/{ServiceSid}/Users" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.Identity != nil { - data.Set("Identity", *params.Identity) - } - if params != nil && params.RoleSid != nil { - data.Set("RoleSid", *params.RoleSid) - } + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.Identity != nil { + data.Set("Identity", *params.Identity) +} + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &IpMessagingV1ServiceUser{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() + + ps := &IpMessagingV1ServiceUser{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * DeleteChannel Method for DeleteChannel * @param ServiceSid * @param Sid - */ -func (c *DefaultApiService) DeleteChannel(ServiceSid string, Sid string) error { - path := "/v1/Services/{ServiceSid}/Channels/{Sid}" +*/ +func (c *DefaultApiService) DeleteChannel(ServiceSid string, Sid string, ) (error) { + path := "/v1/Services/{ServiceSid}/Channels/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* * DeleteCredential Method for DeleteCredential * @param Sid - */ -func (c *DefaultApiService) DeleteCredential(Sid string) error { - path := "/v1/Credentials/{Sid}" +*/ +func (c *DefaultApiService) DeleteCredential(Sid string, ) (error) { + path := "/v1/Credentials/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* @@ -477,24 +482,26 @@ func (c *DefaultApiService) DeleteCredential(Sid string) error { * @param ServiceSid * @param ChannelSid * @param Sid - */ -func (c *DefaultApiService) DeleteInvite(ServiceSid string, ChannelSid string, Sid string) error { - path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Invites/{Sid}" +*/ +func (c *DefaultApiService) DeleteInvite(ServiceSid string, ChannelSid string, Sid string, ) (error) { + path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Invites/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* @@ -502,24 +509,26 @@ func (c *DefaultApiService) DeleteInvite(ServiceSid string, ChannelSid string, S * @param ServiceSid * @param ChannelSid * @param Sid - */ -func (c *DefaultApiService) DeleteMember(ServiceSid string, ChannelSid string, Sid string) error { - path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}" +*/ +func (c *DefaultApiService) DeleteMember(ServiceSid string, ChannelSid string, Sid string, ) (error) { + path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* @@ -527,91 +536,99 @@ func (c *DefaultApiService) DeleteMember(ServiceSid string, ChannelSid string, S * @param ServiceSid * @param ChannelSid * @param Sid - */ -func (c *DefaultApiService) DeleteMessage(ServiceSid string, ChannelSid string, Sid string) error { - path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}" +*/ +func (c *DefaultApiService) DeleteMessage(ServiceSid string, ChannelSid string, Sid string, ) (error) { + path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* * DeleteRole Method for DeleteRole * @param ServiceSid * @param Sid - */ -func (c *DefaultApiService) DeleteRole(ServiceSid string, Sid string) error { - path := "/v1/Services/{ServiceSid}/Roles/{Sid}" +*/ +func (c *DefaultApiService) DeleteRole(ServiceSid string, Sid string, ) (error) { + path := "/v1/Services/{ServiceSid}/Roles/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* * DeleteService Method for DeleteService * @param Sid - */ -func (c *DefaultApiService) DeleteService(Sid string) error { - path := "/v1/Services/{Sid}" +*/ +func (c *DefaultApiService) DeleteService(Sid string, ) (error) { + path := "/v1/Services/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* * DeleteUser Method for DeleteUser * @param ServiceSid * @param Sid - */ -func (c *DefaultApiService) DeleteUser(ServiceSid string, Sid string) error { - path := "/v1/Services/{ServiceSid}/Users/{Sid}" +*/ +func (c *DefaultApiService) DeleteUser(ServiceSid string, Sid string, ) (error) { + path := "/v1/Services/{ServiceSid}/Users/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* @@ -619,55 +636,59 @@ func (c *DefaultApiService) DeleteUser(ServiceSid string, Sid string) error { * @param ServiceSid * @param Sid * @return IpMessagingV1ServiceChannel - */ -func (c *DefaultApiService) FetchChannel(ServiceSid string, Sid string) (*IpMessagingV1ServiceChannel, error) { - path := "/v1/Services/{ServiceSid}/Channels/{Sid}" +*/ +func (c *DefaultApiService) FetchChannel(ServiceSid string, Sid string, ) (*IpMessagingV1ServiceChannel, error) { + path := "/v1/Services/{ServiceSid}/Channels/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &IpMessagingV1ServiceChannel{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &IpMessagingV1ServiceChannel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* * FetchCredential Method for FetchCredential * @param Sid * @return IpMessagingV1Credential - */ -func (c *DefaultApiService) FetchCredential(Sid string) (*IpMessagingV1Credential, error) { - path := "/v1/Credentials/{Sid}" +*/ +func (c *DefaultApiService) FetchCredential(Sid string, ) (*IpMessagingV1Credential, error) { + path := "/v1/Credentials/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &IpMessagingV1Credential{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err + defer resp.Body.Close() + + ps := &IpMessagingV1Credential{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -676,29 +697,31 @@ func (c *DefaultApiService) FetchCredential(Sid string) (*IpMessagingV1Credentia * @param ChannelSid * @param Sid * @return IpMessagingV1ServiceChannelInvite - */ -func (c *DefaultApiService) FetchInvite(ServiceSid string, ChannelSid string, Sid string) (*IpMessagingV1ServiceChannelInvite, error) { - path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Invites/{Sid}" +*/ +func (c *DefaultApiService) FetchInvite(ServiceSid string, ChannelSid string, Sid string, ) (*IpMessagingV1ServiceChannelInvite, error) { + path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Invites/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &IpMessagingV1ServiceChannelInvite{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &IpMessagingV1ServiceChannelInvite{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -707,29 +730,31 @@ func (c *DefaultApiService) FetchInvite(ServiceSid string, ChannelSid string, Si * @param ChannelSid * @param Sid * @return IpMessagingV1ServiceChannelMember - */ -func (c *DefaultApiService) FetchMember(ServiceSid string, ChannelSid string, Sid string) (*IpMessagingV1ServiceChannelMember, error) { - path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}" +*/ +func (c *DefaultApiService) FetchMember(ServiceSid string, ChannelSid string, Sid string, ) (*IpMessagingV1ServiceChannelMember, error) { + path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &IpMessagingV1ServiceChannelMember{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &IpMessagingV1ServiceChannelMember{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -738,29 +763,31 @@ func (c *DefaultApiService) FetchMember(ServiceSid string, ChannelSid string, Si * @param ChannelSid * @param Sid * @return IpMessagingV1ServiceChannelMessage - */ -func (c *DefaultApiService) FetchMessage(ServiceSid string, ChannelSid string, Sid string) (*IpMessagingV1ServiceChannelMessage, error) { - path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}" +*/ +func (c *DefaultApiService) FetchMessage(ServiceSid string, ChannelSid string, Sid string, ) (*IpMessagingV1ServiceChannelMessage, error) { + path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &IpMessagingV1ServiceChannelMessage{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err + defer resp.Body.Close() + + ps := &IpMessagingV1ServiceChannelMessage{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -768,55 +795,59 @@ func (c *DefaultApiService) FetchMessage(ServiceSid string, ChannelSid string, S * @param ServiceSid * @param Sid * @return IpMessagingV1ServiceRole - */ -func (c *DefaultApiService) FetchRole(ServiceSid string, Sid string) (*IpMessagingV1ServiceRole, error) { - path := "/v1/Services/{ServiceSid}/Roles/{Sid}" +*/ +func (c *DefaultApiService) FetchRole(ServiceSid string, Sid string, ) (*IpMessagingV1ServiceRole, error) { + path := "/v1/Services/{ServiceSid}/Roles/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &IpMessagingV1ServiceRole{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &IpMessagingV1ServiceRole{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * FetchService Method for FetchService * @param Sid * @return IpMessagingV1Service - */ -func (c *DefaultApiService) FetchService(Sid string) (*IpMessagingV1Service, error) { - path := "/v1/Services/{Sid}" +*/ +func (c *DefaultApiService) FetchService(Sid string, ) (*IpMessagingV1Service, error) { + path := "/v1/Services/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &IpMessagingV1Service{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &IpMessagingV1Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -824,73 +855,74 @@ func (c *DefaultApiService) FetchService(Sid string) (*IpMessagingV1Service, err * @param ServiceSid * @param Sid * @return IpMessagingV1ServiceUser - */ -func (c *DefaultApiService) FetchUser(ServiceSid string, Sid string) (*IpMessagingV1ServiceUser, error) { - path := "/v1/Services/{ServiceSid}/Users/{Sid}" +*/ +func (c *DefaultApiService) FetchUser(ServiceSid string, Sid string, ) (*IpMessagingV1ServiceUser, error) { + path := "/v1/Services/{ServiceSid}/Users/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &IpMessagingV1ServiceUser{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err -} + defer resp.Body.Close() + + ps := &IpMessagingV1ServiceUser{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListChannelParams Optional parameters for the method 'ListChannel' type ListChannelParams struct { - Type *[]string `json:"Type,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + Type *[]string `json:"Type,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* * ListChannel Method for ListChannel * @param ServiceSid * @param optional nil or *ListChannelParams - Optional Parameters: -* @param "Type" ([]string) - +* @param "Type" ([]string) - * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListChannelResponse - */ +*/ func (c *DefaultApiService) ListChannel(ServiceSid string, params *ListChannelParams) (*ListChannelResponse, error) { - path := "/v1/Services/{ServiceSid}/Channels" + path := "/v1/Services/{ServiceSid}/Channels" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Type != nil { - data.Set("Type", strings.Join(*params.Type, ",")) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.Type != nil { + data.Set("Type", strings.Join(*params.Type, ",")) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListChannelResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListChannelResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListCredentialParams Optional parameters for the method 'ListCredential' type ListCredentialParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -901,36 +933,36 @@ type ListCredentialParams struct { * @param optional nil or *ListCredentialParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListCredentialResponse - */ +*/ func (c *DefaultApiService) ListCredential(params *ListCredentialParams) (*ListCredentialResponse, error) { - path := "/v1/Credentials" + path := "/v1/Credentials" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListCredentialResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListCredentialResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListInviteParams Optional parameters for the method 'ListInvite' type ListInviteParams struct { Identity *[]string `json:"Identity,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -938,44 +970,44 @@ type ListInviteParams struct { * @param ServiceSid * @param ChannelSid * @param optional nil or *ListInviteParams - Optional Parameters: -* @param "Identity" ([]string) - +* @param "Identity" ([]string) - * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListInviteResponse - */ +*/ func (c *DefaultApiService) ListInvite(ServiceSid string, ChannelSid string, params *ListInviteParams) (*ListInviteResponse, error) { - path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Invites" + path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Invites" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Identity != nil { - data.Set("Identity", strings.Join(*params.Identity, ",")) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.Identity != nil { + data.Set("Identity", strings.Join(*params.Identity, ",")) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListInviteResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListInviteResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListMemberParams Optional parameters for the method 'ListMember' type ListMemberParams struct { Identity *[]string `json:"Identity,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -983,44 +1015,44 @@ type ListMemberParams struct { * @param ServiceSid * @param ChannelSid * @param optional nil or *ListMemberParams - Optional Parameters: -* @param "Identity" ([]string) - +* @param "Identity" ([]string) - * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListMemberResponse - */ +*/ func (c *DefaultApiService) ListMember(ServiceSid string, ChannelSid string, params *ListMemberParams) (*ListMemberResponse, error) { - path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members" + path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Identity != nil { - data.Set("Identity", strings.Join(*params.Identity, ",")) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.Identity != nil { + data.Set("Identity", strings.Join(*params.Identity, ",")) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListMemberResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListMemberResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListMessageParams Optional parameters for the method 'ListMessage' type ListMessageParams struct { - Order *string `json:"Order,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + Order *string `json:"Order,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -1028,40 +1060,40 @@ type ListMessageParams struct { * @param ServiceSid * @param ChannelSid * @param optional nil or *ListMessageParams - Optional Parameters: -* @param "Order" (string) - +* @param "Order" (string) - * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListMessageResponse - */ +*/ func (c *DefaultApiService) ListMessage(ServiceSid string, ChannelSid string, params *ListMessageParams) (*ListMessageResponse, error) { - path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages" + path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Order != nil { - data.Set("Order", *params.Order) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.Order != nil { + data.Set("Order", *params.Order) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListMessageResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListMessageResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListRoleParams Optional parameters for the method 'ListRole' type ListRoleParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1073,33 +1105,33 @@ type ListRoleParams struct { * @param optional nil or *ListRoleParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListRoleResponse - */ +*/ func (c *DefaultApiService) ListRole(ServiceSid string, params *ListRoleParams) (*ListRoleResponse, error) { - path := "/v1/Services/{ServiceSid}/Roles" + path := "/v1/Services/{ServiceSid}/Roles" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListRoleResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListRoleResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListServiceParams Optional parameters for the method 'ListService' type ListServiceParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1110,32 +1142,32 @@ type ListServiceParams struct { * @param optional nil or *ListServiceParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListServiceResponse - */ +*/ func (c *DefaultApiService) ListService(params *ListServiceParams) (*ListServiceResponse, error) { - path := "/v1/Services" + path := "/v1/Services" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListServiceResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListServiceResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListUserParams Optional parameters for the method 'ListUser' type ListUserParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1147,33 +1179,33 @@ type ListUserParams struct { * @param optional nil or *ListUserParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListUserResponse - */ +*/ func (c *DefaultApiService) ListUser(ServiceSid string, params *ListUserParams) (*ListUserResponse, error) { - path := "/v1/Services/{ServiceSid}/Users" + path := "/v1/Services/{ServiceSid}/Users" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListUserResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListUserResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListUserChannelParams Optional parameters for the method 'ListUserChannel' type ListUserChannelParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1186,39 +1218,39 @@ type ListUserChannelParams struct { * @param optional nil or *ListUserChannelParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListUserChannelResponse - */ +*/ func (c *DefaultApiService) ListUserChannel(ServiceSid string, UserSid string, params *ListUserChannelParams) (*ListUserChannelResponse, error) { - path := "/v1/Services/{ServiceSid}/Users/{UserSid}/Channels" + path := "/v1/Services/{ServiceSid}/Users/{UserSid}/Channels" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"UserSid"+"}", UserSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListUserChannelResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListUserChannelResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateChannelParams Optional parameters for the method 'UpdateChannel' type UpdateChannelParams struct { - Attributes *string `json:"Attributes,omitempty"` + Attributes *string `json:"Attributes,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` } /* @@ -1226,111 +1258,111 @@ type UpdateChannelParams struct { * @param ServiceSid * @param Sid * @param optional nil or *UpdateChannelParams - Optional Parameters: -* @param "Attributes" (string) - -* @param "FriendlyName" (string) - -* @param "UniqueName" (string) - +* @param "Attributes" (string) - +* @param "FriendlyName" (string) - +* @param "UniqueName" (string) - * @return IpMessagingV1ServiceChannel - */ +*/ func (c *DefaultApiService) UpdateChannel(ServiceSid string, Sid string, params *UpdateChannelParams) (*IpMessagingV1ServiceChannel, error) { - path := "/v1/Services/{ServiceSid}/Channels/{Sid}" + path := "/v1/Services/{ServiceSid}/Channels/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) - } + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &IpMessagingV1ServiceChannel{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &IpMessagingV1ServiceChannel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateCredentialParams Optional parameters for the method 'UpdateCredential' type UpdateCredentialParams struct { - ApiKey *string `json:"ApiKey,omitempty"` - Certificate *string `json:"Certificate,omitempty"` + ApiKey *string `json:"ApiKey,omitempty"` + Certificate *string `json:"Certificate,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` - PrivateKey *string `json:"PrivateKey,omitempty"` - Sandbox *bool `json:"Sandbox,omitempty"` - Secret *string `json:"Secret,omitempty"` + PrivateKey *string `json:"PrivateKey,omitempty"` + Sandbox *bool `json:"Sandbox,omitempty"` + Secret *string `json:"Secret,omitempty"` } /* * UpdateCredential Method for UpdateCredential * @param Sid * @param optional nil or *UpdateCredentialParams - Optional Parameters: -* @param "ApiKey" (string) - -* @param "Certificate" (string) - -* @param "FriendlyName" (string) - -* @param "PrivateKey" (string) - -* @param "Sandbox" (bool) - -* @param "Secret" (string) - +* @param "ApiKey" (string) - +* @param "Certificate" (string) - +* @param "FriendlyName" (string) - +* @param "PrivateKey" (string) - +* @param "Sandbox" (bool) - +* @param "Secret" (string) - * @return IpMessagingV1Credential - */ +*/ func (c *DefaultApiService) UpdateCredential(Sid string, params *UpdateCredentialParams) (*IpMessagingV1Credential, error) { - path := "/v1/Credentials/{Sid}" + path := "/v1/Credentials/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.ApiKey != nil { - data.Set("ApiKey", *params.ApiKey) - } - if params != nil && params.Certificate != nil { - data.Set("Certificate", *params.Certificate) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.PrivateKey != nil { - data.Set("PrivateKey", *params.PrivateKey) - } - if params != nil && params.Sandbox != nil { - data.Set("Sandbox", fmt.Sprint(*params.Sandbox)) - } - if params != nil && params.Secret != nil { - data.Set("Secret", *params.Secret) - } + if params != nil && params.ApiKey != nil { + data.Set("ApiKey", *params.ApiKey) +} + if params != nil && params.Certificate != nil { + data.Set("Certificate", *params.Certificate) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.PrivateKey != nil { + data.Set("PrivateKey", *params.PrivateKey) +} + if params != nil && params.Sandbox != nil { + data.Set("Sandbox", fmt.Sprint(*params.Sandbox)) +} + if params != nil && params.Secret != nil { + data.Set("Secret", *params.Secret) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &IpMessagingV1Credential{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &IpMessagingV1Credential{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateMemberParams Optional parameters for the method 'UpdateMember' type UpdateMemberParams struct { - LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` + LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` } /* @@ -1339,45 +1371,45 @@ type UpdateMemberParams struct { * @param ChannelSid * @param Sid * @param optional nil or *UpdateMemberParams - Optional Parameters: -* @param "LastConsumedMessageIndex" (*int32) - -* @param "RoleSid" (string) - +* @param "LastConsumedMessageIndex" (*int32) - +* @param "RoleSid" (string) - * @return IpMessagingV1ServiceChannelMember - */ +*/ func (c *DefaultApiService) UpdateMember(ServiceSid string, ChannelSid string, Sid string, params *UpdateMemberParams) (*IpMessagingV1ServiceChannelMember, error) { - path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}" + path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.LastConsumedMessageIndex != nil { - data.Set("LastConsumedMessageIndex", fmt.Sprint(*params.LastConsumedMessageIndex)) - } - if params != nil && params.RoleSid != nil { - data.Set("RoleSid", *params.RoleSid) - } + if params != nil && params.LastConsumedMessageIndex != nil { + data.Set("LastConsumedMessageIndex", fmt.Sprint(*params.LastConsumedMessageIndex)) +} + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &IpMessagingV1ServiceChannelMember{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &IpMessagingV1ServiceChannelMember{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateMessageParams Optional parameters for the method 'UpdateMessage' type UpdateMessageParams struct { Attributes *string `json:"Attributes,omitempty"` - Body *string `json:"Body,omitempty"` + Body *string `json:"Body,omitempty"` } /* @@ -1386,41 +1418,41 @@ type UpdateMessageParams struct { * @param ChannelSid * @param Sid * @param optional nil or *UpdateMessageParams - Optional Parameters: -* @param "Attributes" (string) - -* @param "Body" (string) - +* @param "Attributes" (string) - +* @param "Body" (string) - * @return IpMessagingV1ServiceChannelMessage - */ +*/ func (c *DefaultApiService) UpdateMessage(ServiceSid string, ChannelSid string, Sid string, params *UpdateMessageParams) (*IpMessagingV1ServiceChannelMessage, error) { - path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}" + path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) - } - if params != nil && params.Body != nil { - data.Set("Body", *params.Body) - } + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) +} + if params != nil && params.Body != nil { + data.Set("Body", *params.Body) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &IpMessagingV1ServiceChannelMessage{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &IpMessagingV1ServiceChannelMessage{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateRoleParams Optional parameters for the method 'UpdateRole' type UpdateRoleParams struct { Permission *[]string `json:"Permission,omitempty"` @@ -1431,344 +1463,344 @@ type UpdateRoleParams struct { * @param ServiceSid * @param Sid * @param optional nil or *UpdateRoleParams - Optional Parameters: -* @param "Permission" ([]string) - +* @param "Permission" ([]string) - * @return IpMessagingV1ServiceRole - */ +*/ func (c *DefaultApiService) UpdateRole(ServiceSid string, Sid string, params *UpdateRoleParams) (*IpMessagingV1ServiceRole, error) { - path := "/v1/Services/{ServiceSid}/Roles/{Sid}" + path := "/v1/Services/{ServiceSid}/Roles/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Permission != nil { - data.Set("Permission", strings.Join(*params.Permission, ",")) - } + if params != nil && params.Permission != nil { + data.Set("Permission", strings.Join(*params.Permission, ",")) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &IpMessagingV1ServiceRole{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &IpMessagingV1ServiceRole{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateServiceParams Optional parameters for the method 'UpdateService' type UpdateServiceParams struct { - ConsumptionReportInterval *int32 `json:"ConsumptionReportInterval,omitempty"` - DefaultChannelCreatorRoleSid *string `json:"DefaultChannelCreatorRoleSid,omitempty"` - DefaultChannelRoleSid *string `json:"DefaultChannelRoleSid,omitempty"` - DefaultServiceRoleSid *string `json:"DefaultServiceRoleSid,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - LimitsChannelMembers *int32 `json:"Limits.ChannelMembers,omitempty"` - LimitsUserChannels *int32 `json:"Limits.UserChannels,omitempty"` - NotificationsAddedToChannelEnabled *bool `json:"Notifications.AddedToChannel.Enabled,omitempty"` - NotificationsAddedToChannelTemplate *string `json:"Notifications.AddedToChannel.Template,omitempty"` - NotificationsInvitedToChannelEnabled *bool `json:"Notifications.InvitedToChannel.Enabled,omitempty"` - NotificationsInvitedToChannelTemplate *string `json:"Notifications.InvitedToChannel.Template,omitempty"` - NotificationsNewMessageEnabled *bool `json:"Notifications.NewMessage.Enabled,omitempty"` - NotificationsNewMessageTemplate *string `json:"Notifications.NewMessage.Template,omitempty"` - NotificationsRemovedFromChannelEnabled *bool `json:"Notifications.RemovedFromChannel.Enabled,omitempty"` - NotificationsRemovedFromChannelTemplate *string `json:"Notifications.RemovedFromChannel.Template,omitempty"` - PostWebhookUrl *string `json:"PostWebhookUrl,omitempty"` - PreWebhookUrl *string `json:"PreWebhookUrl,omitempty"` - ReachabilityEnabled *bool `json:"ReachabilityEnabled,omitempty"` - ReadStatusEnabled *bool `json:"ReadStatusEnabled,omitempty"` - TypingIndicatorTimeout *int32 `json:"TypingIndicatorTimeout,omitempty"` - WebhookFilters *[]string `json:"WebhookFilters,omitempty"` - WebhookMethod *string `json:"WebhookMethod,omitempty"` - WebhooksOnChannelAddMethod *string `json:"Webhooks.OnChannelAdd.Method,omitempty"` - WebhooksOnChannelAddUrl *string `json:"Webhooks.OnChannelAdd.Url,omitempty"` - WebhooksOnChannelAddedMethod *string `json:"Webhooks.OnChannelAdded.Method,omitempty"` - WebhooksOnChannelAddedUrl *string `json:"Webhooks.OnChannelAdded.Url,omitempty"` - WebhooksOnChannelDestroyMethod *string `json:"Webhooks.OnChannelDestroy.Method,omitempty"` - WebhooksOnChannelDestroyUrl *string `json:"Webhooks.OnChannelDestroy.Url,omitempty"` - WebhooksOnChannelDestroyedMethod *string `json:"Webhooks.OnChannelDestroyed.Method,omitempty"` - WebhooksOnChannelDestroyedUrl *string `json:"Webhooks.OnChannelDestroyed.Url,omitempty"` - WebhooksOnChannelUpdateMethod *string `json:"Webhooks.OnChannelUpdate.Method,omitempty"` - WebhooksOnChannelUpdateUrl *string `json:"Webhooks.OnChannelUpdate.Url,omitempty"` - WebhooksOnChannelUpdatedMethod *string `json:"Webhooks.OnChannelUpdated.Method,omitempty"` - WebhooksOnChannelUpdatedUrl *string `json:"Webhooks.OnChannelUpdated.Url,omitempty"` - WebhooksOnMemberAddMethod *string `json:"Webhooks.OnMemberAdd.Method,omitempty"` - WebhooksOnMemberAddUrl *string `json:"Webhooks.OnMemberAdd.Url,omitempty"` - WebhooksOnMemberAddedMethod *string `json:"Webhooks.OnMemberAdded.Method,omitempty"` - WebhooksOnMemberAddedUrl *string `json:"Webhooks.OnMemberAdded.Url,omitempty"` - WebhooksOnMemberRemoveMethod *string `json:"Webhooks.OnMemberRemove.Method,omitempty"` - WebhooksOnMemberRemoveUrl *string `json:"Webhooks.OnMemberRemove.Url,omitempty"` - WebhooksOnMemberRemovedMethod *string `json:"Webhooks.OnMemberRemoved.Method,omitempty"` - WebhooksOnMemberRemovedUrl *string `json:"Webhooks.OnMemberRemoved.Url,omitempty"` - WebhooksOnMessageRemoveMethod *string `json:"Webhooks.OnMessageRemove.Method,omitempty"` - WebhooksOnMessageRemoveUrl *string `json:"Webhooks.OnMessageRemove.Url,omitempty"` - WebhooksOnMessageRemovedMethod *string `json:"Webhooks.OnMessageRemoved.Method,omitempty"` - WebhooksOnMessageRemovedUrl *string `json:"Webhooks.OnMessageRemoved.Url,omitempty"` - WebhooksOnMessageSendMethod *string `json:"Webhooks.OnMessageSend.Method,omitempty"` - WebhooksOnMessageSendUrl *string `json:"Webhooks.OnMessageSend.Url,omitempty"` - WebhooksOnMessageSentMethod *string `json:"Webhooks.OnMessageSent.Method,omitempty"` - WebhooksOnMessageSentUrl *string `json:"Webhooks.OnMessageSent.Url,omitempty"` - WebhooksOnMessageUpdateMethod *string `json:"Webhooks.OnMessageUpdate.Method,omitempty"` - WebhooksOnMessageUpdateUrl *string `json:"Webhooks.OnMessageUpdate.Url,omitempty"` - WebhooksOnMessageUpdatedMethod *string `json:"Webhooks.OnMessageUpdated.Method,omitempty"` - WebhooksOnMessageUpdatedUrl *string `json:"Webhooks.OnMessageUpdated.Url,omitempty"` + ConsumptionReportInterval *int32 `json:"ConsumptionReportInterval,omitempty"` + DefaultChannelCreatorRoleSid *string `json:"DefaultChannelCreatorRoleSid,omitempty"` + DefaultChannelRoleSid *string `json:"DefaultChannelRoleSid,omitempty"` + DefaultServiceRoleSid *string `json:"DefaultServiceRoleSid,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + LimitsChannelMembers *int32 `json:"Limits.ChannelMembers,omitempty"` + LimitsUserChannels *int32 `json:"Limits.UserChannels,omitempty"` + NotificationsAddedToChannelEnabled *bool `json:"Notifications.AddedToChannel.Enabled,omitempty"` + NotificationsAddedToChannelTemplate *string `json:"Notifications.AddedToChannel.Template,omitempty"` + NotificationsInvitedToChannelEnabled *bool `json:"Notifications.InvitedToChannel.Enabled,omitempty"` + NotificationsInvitedToChannelTemplate *string `json:"Notifications.InvitedToChannel.Template,omitempty"` + NotificationsNewMessageEnabled *bool `json:"Notifications.NewMessage.Enabled,omitempty"` + NotificationsNewMessageTemplate *string `json:"Notifications.NewMessage.Template,omitempty"` + NotificationsRemovedFromChannelEnabled *bool `json:"Notifications.RemovedFromChannel.Enabled,omitempty"` + NotificationsRemovedFromChannelTemplate *string `json:"Notifications.RemovedFromChannel.Template,omitempty"` + PostWebhookUrl *string `json:"PostWebhookUrl,omitempty"` + PreWebhookUrl *string `json:"PreWebhookUrl,omitempty"` + ReachabilityEnabled *bool `json:"ReachabilityEnabled,omitempty"` + ReadStatusEnabled *bool `json:"ReadStatusEnabled,omitempty"` + TypingIndicatorTimeout *int32 `json:"TypingIndicatorTimeout,omitempty"` + WebhookFilters *[]string `json:"WebhookFilters,omitempty"` + WebhookMethod *string `json:"WebhookMethod,omitempty"` + WebhooksOnChannelAddMethod *string `json:"Webhooks.OnChannelAdd.Method,omitempty"` + WebhooksOnChannelAddUrl *string `json:"Webhooks.OnChannelAdd.Url,omitempty"` + WebhooksOnChannelAddedMethod *string `json:"Webhooks.OnChannelAdded.Method,omitempty"` + WebhooksOnChannelAddedUrl *string `json:"Webhooks.OnChannelAdded.Url,omitempty"` + WebhooksOnChannelDestroyMethod *string `json:"Webhooks.OnChannelDestroy.Method,omitempty"` + WebhooksOnChannelDestroyUrl *string `json:"Webhooks.OnChannelDestroy.Url,omitempty"` + WebhooksOnChannelDestroyedMethod *string `json:"Webhooks.OnChannelDestroyed.Method,omitempty"` + WebhooksOnChannelDestroyedUrl *string `json:"Webhooks.OnChannelDestroyed.Url,omitempty"` + WebhooksOnChannelUpdateMethod *string `json:"Webhooks.OnChannelUpdate.Method,omitempty"` + WebhooksOnChannelUpdateUrl *string `json:"Webhooks.OnChannelUpdate.Url,omitempty"` + WebhooksOnChannelUpdatedMethod *string `json:"Webhooks.OnChannelUpdated.Method,omitempty"` + WebhooksOnChannelUpdatedUrl *string `json:"Webhooks.OnChannelUpdated.Url,omitempty"` + WebhooksOnMemberAddMethod *string `json:"Webhooks.OnMemberAdd.Method,omitempty"` + WebhooksOnMemberAddUrl *string `json:"Webhooks.OnMemberAdd.Url,omitempty"` + WebhooksOnMemberAddedMethod *string `json:"Webhooks.OnMemberAdded.Method,omitempty"` + WebhooksOnMemberAddedUrl *string `json:"Webhooks.OnMemberAdded.Url,omitempty"` + WebhooksOnMemberRemoveMethod *string `json:"Webhooks.OnMemberRemove.Method,omitempty"` + WebhooksOnMemberRemoveUrl *string `json:"Webhooks.OnMemberRemove.Url,omitempty"` + WebhooksOnMemberRemovedMethod *string `json:"Webhooks.OnMemberRemoved.Method,omitempty"` + WebhooksOnMemberRemovedUrl *string `json:"Webhooks.OnMemberRemoved.Url,omitempty"` + WebhooksOnMessageRemoveMethod *string `json:"Webhooks.OnMessageRemove.Method,omitempty"` + WebhooksOnMessageRemoveUrl *string `json:"Webhooks.OnMessageRemove.Url,omitempty"` + WebhooksOnMessageRemovedMethod *string `json:"Webhooks.OnMessageRemoved.Method,omitempty"` + WebhooksOnMessageRemovedUrl *string `json:"Webhooks.OnMessageRemoved.Url,omitempty"` + WebhooksOnMessageSendMethod *string `json:"Webhooks.OnMessageSend.Method,omitempty"` + WebhooksOnMessageSendUrl *string `json:"Webhooks.OnMessageSend.Url,omitempty"` + WebhooksOnMessageSentMethod *string `json:"Webhooks.OnMessageSent.Method,omitempty"` + WebhooksOnMessageSentUrl *string `json:"Webhooks.OnMessageSent.Url,omitempty"` + WebhooksOnMessageUpdateMethod *string `json:"Webhooks.OnMessageUpdate.Method,omitempty"` + WebhooksOnMessageUpdateUrl *string `json:"Webhooks.OnMessageUpdate.Url,omitempty"` + WebhooksOnMessageUpdatedMethod *string `json:"Webhooks.OnMessageUpdated.Method,omitempty"` + WebhooksOnMessageUpdatedUrl *string `json:"Webhooks.OnMessageUpdated.Url,omitempty"` } /* * UpdateService Method for UpdateService * @param Sid * @param optional nil or *UpdateServiceParams - Optional Parameters: -* @param "ConsumptionReportInterval" (int32) - -* @param "DefaultChannelCreatorRoleSid" (string) - -* @param "DefaultChannelRoleSid" (string) - -* @param "DefaultServiceRoleSid" (string) - -* @param "FriendlyName" (string) - -* @param "LimitsChannelMembers" (int32) - -* @param "LimitsUserChannels" (int32) - -* @param "NotificationsAddedToChannelEnabled" (bool) - -* @param "NotificationsAddedToChannelTemplate" (string) - -* @param "NotificationsInvitedToChannelEnabled" (bool) - -* @param "NotificationsInvitedToChannelTemplate" (string) - -* @param "NotificationsNewMessageEnabled" (bool) - -* @param "NotificationsNewMessageTemplate" (string) - -* @param "NotificationsRemovedFromChannelEnabled" (bool) - -* @param "NotificationsRemovedFromChannelTemplate" (string) - -* @param "PostWebhookUrl" (string) - -* @param "PreWebhookUrl" (string) - -* @param "ReachabilityEnabled" (bool) - -* @param "ReadStatusEnabled" (bool) - -* @param "TypingIndicatorTimeout" (int32) - -* @param "WebhookFilters" ([]string) - -* @param "WebhookMethod" (string) - -* @param "WebhooksOnChannelAddMethod" (string) - -* @param "WebhooksOnChannelAddUrl" (string) - -* @param "WebhooksOnChannelAddedMethod" (string) - -* @param "WebhooksOnChannelAddedUrl" (string) - -* @param "WebhooksOnChannelDestroyMethod" (string) - -* @param "WebhooksOnChannelDestroyUrl" (string) - -* @param "WebhooksOnChannelDestroyedMethod" (string) - -* @param "WebhooksOnChannelDestroyedUrl" (string) - -* @param "WebhooksOnChannelUpdateMethod" (string) - -* @param "WebhooksOnChannelUpdateUrl" (string) - -* @param "WebhooksOnChannelUpdatedMethod" (string) - -* @param "WebhooksOnChannelUpdatedUrl" (string) - -* @param "WebhooksOnMemberAddMethod" (string) - -* @param "WebhooksOnMemberAddUrl" (string) - -* @param "WebhooksOnMemberAddedMethod" (string) - -* @param "WebhooksOnMemberAddedUrl" (string) - -* @param "WebhooksOnMemberRemoveMethod" (string) - -* @param "WebhooksOnMemberRemoveUrl" (string) - -* @param "WebhooksOnMemberRemovedMethod" (string) - -* @param "WebhooksOnMemberRemovedUrl" (string) - -* @param "WebhooksOnMessageRemoveMethod" (string) - -* @param "WebhooksOnMessageRemoveUrl" (string) - -* @param "WebhooksOnMessageRemovedMethod" (string) - -* @param "WebhooksOnMessageRemovedUrl" (string) - -* @param "WebhooksOnMessageSendMethod" (string) - -* @param "WebhooksOnMessageSendUrl" (string) - -* @param "WebhooksOnMessageSentMethod" (string) - -* @param "WebhooksOnMessageSentUrl" (string) - -* @param "WebhooksOnMessageUpdateMethod" (string) - -* @param "WebhooksOnMessageUpdateUrl" (string) - -* @param "WebhooksOnMessageUpdatedMethod" (string) - -* @param "WebhooksOnMessageUpdatedUrl" (string) - +* @param "ConsumptionReportInterval" (int32) - +* @param "DefaultChannelCreatorRoleSid" (string) - +* @param "DefaultChannelRoleSid" (string) - +* @param "DefaultServiceRoleSid" (string) - +* @param "FriendlyName" (string) - +* @param "LimitsChannelMembers" (int32) - +* @param "LimitsUserChannels" (int32) - +* @param "NotificationsAddedToChannelEnabled" (bool) - +* @param "NotificationsAddedToChannelTemplate" (string) - +* @param "NotificationsInvitedToChannelEnabled" (bool) - +* @param "NotificationsInvitedToChannelTemplate" (string) - +* @param "NotificationsNewMessageEnabled" (bool) - +* @param "NotificationsNewMessageTemplate" (string) - +* @param "NotificationsRemovedFromChannelEnabled" (bool) - +* @param "NotificationsRemovedFromChannelTemplate" (string) - +* @param "PostWebhookUrl" (string) - +* @param "PreWebhookUrl" (string) - +* @param "ReachabilityEnabled" (bool) - +* @param "ReadStatusEnabled" (bool) - +* @param "TypingIndicatorTimeout" (int32) - +* @param "WebhookFilters" ([]string) - +* @param "WebhookMethod" (string) - +* @param "WebhooksOnChannelAddMethod" (string) - +* @param "WebhooksOnChannelAddUrl" (string) - +* @param "WebhooksOnChannelAddedMethod" (string) - +* @param "WebhooksOnChannelAddedUrl" (string) - +* @param "WebhooksOnChannelDestroyMethod" (string) - +* @param "WebhooksOnChannelDestroyUrl" (string) - +* @param "WebhooksOnChannelDestroyedMethod" (string) - +* @param "WebhooksOnChannelDestroyedUrl" (string) - +* @param "WebhooksOnChannelUpdateMethod" (string) - +* @param "WebhooksOnChannelUpdateUrl" (string) - +* @param "WebhooksOnChannelUpdatedMethod" (string) - +* @param "WebhooksOnChannelUpdatedUrl" (string) - +* @param "WebhooksOnMemberAddMethod" (string) - +* @param "WebhooksOnMemberAddUrl" (string) - +* @param "WebhooksOnMemberAddedMethod" (string) - +* @param "WebhooksOnMemberAddedUrl" (string) - +* @param "WebhooksOnMemberRemoveMethod" (string) - +* @param "WebhooksOnMemberRemoveUrl" (string) - +* @param "WebhooksOnMemberRemovedMethod" (string) - +* @param "WebhooksOnMemberRemovedUrl" (string) - +* @param "WebhooksOnMessageRemoveMethod" (string) - +* @param "WebhooksOnMessageRemoveUrl" (string) - +* @param "WebhooksOnMessageRemovedMethod" (string) - +* @param "WebhooksOnMessageRemovedUrl" (string) - +* @param "WebhooksOnMessageSendMethod" (string) - +* @param "WebhooksOnMessageSendUrl" (string) - +* @param "WebhooksOnMessageSentMethod" (string) - +* @param "WebhooksOnMessageSentUrl" (string) - +* @param "WebhooksOnMessageUpdateMethod" (string) - +* @param "WebhooksOnMessageUpdateUrl" (string) - +* @param "WebhooksOnMessageUpdatedMethod" (string) - +* @param "WebhooksOnMessageUpdatedUrl" (string) - * @return IpMessagingV1Service - */ +*/ func (c *DefaultApiService) UpdateService(Sid string, params *UpdateServiceParams) (*IpMessagingV1Service, error) { - path := "/v1/Services/{Sid}" + path := "/v1/Services/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.ConsumptionReportInterval != nil { - data.Set("ConsumptionReportInterval", fmt.Sprint(*params.ConsumptionReportInterval)) - } - if params != nil && params.DefaultChannelCreatorRoleSid != nil { - data.Set("DefaultChannelCreatorRoleSid", *params.DefaultChannelCreatorRoleSid) - } - if params != nil && params.DefaultChannelRoleSid != nil { - data.Set("DefaultChannelRoleSid", *params.DefaultChannelRoleSid) - } - if params != nil && params.DefaultServiceRoleSid != nil { - data.Set("DefaultServiceRoleSid", *params.DefaultServiceRoleSid) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.LimitsChannelMembers != nil { - data.Set("LimitsChannelMembers", fmt.Sprint(*params.LimitsChannelMembers)) - } - if params != nil && params.LimitsUserChannels != nil { - data.Set("LimitsUserChannels", fmt.Sprint(*params.LimitsUserChannels)) - } - if params != nil && params.NotificationsAddedToChannelEnabled != nil { - data.Set("NotificationsAddedToChannelEnabled", fmt.Sprint(*params.NotificationsAddedToChannelEnabled)) - } - if params != nil && params.NotificationsAddedToChannelTemplate != nil { - data.Set("NotificationsAddedToChannelTemplate", *params.NotificationsAddedToChannelTemplate) - } - if params != nil && params.NotificationsInvitedToChannelEnabled != nil { - data.Set("NotificationsInvitedToChannelEnabled", fmt.Sprint(*params.NotificationsInvitedToChannelEnabled)) - } - if params != nil && params.NotificationsInvitedToChannelTemplate != nil { - data.Set("NotificationsInvitedToChannelTemplate", *params.NotificationsInvitedToChannelTemplate) - } - if params != nil && params.NotificationsNewMessageEnabled != nil { - data.Set("NotificationsNewMessageEnabled", fmt.Sprint(*params.NotificationsNewMessageEnabled)) - } - if params != nil && params.NotificationsNewMessageTemplate != nil { - data.Set("NotificationsNewMessageTemplate", *params.NotificationsNewMessageTemplate) - } - if params != nil && params.NotificationsRemovedFromChannelEnabled != nil { - data.Set("NotificationsRemovedFromChannelEnabled", fmt.Sprint(*params.NotificationsRemovedFromChannelEnabled)) - } - if params != nil && params.NotificationsRemovedFromChannelTemplate != nil { - data.Set("NotificationsRemovedFromChannelTemplate", *params.NotificationsRemovedFromChannelTemplate) - } - if params != nil && params.PostWebhookUrl != nil { - data.Set("PostWebhookUrl", *params.PostWebhookUrl) - } - if params != nil && params.PreWebhookUrl != nil { - data.Set("PreWebhookUrl", *params.PreWebhookUrl) - } - if params != nil && params.ReachabilityEnabled != nil { - data.Set("ReachabilityEnabled", fmt.Sprint(*params.ReachabilityEnabled)) - } - if params != nil && params.ReadStatusEnabled != nil { - data.Set("ReadStatusEnabled", fmt.Sprint(*params.ReadStatusEnabled)) - } - if params != nil && params.TypingIndicatorTimeout != nil { - data.Set("TypingIndicatorTimeout", fmt.Sprint(*params.TypingIndicatorTimeout)) - } - if params != nil && params.WebhookFilters != nil { - data.Set("WebhookFilters", strings.Join(*params.WebhookFilters, ",")) - } - if params != nil && params.WebhookMethod != nil { - data.Set("WebhookMethod", *params.WebhookMethod) - } - if params != nil && params.WebhooksOnChannelAddMethod != nil { - data.Set("WebhooksOnChannelAddMethod", *params.WebhooksOnChannelAddMethod) - } - if params != nil && params.WebhooksOnChannelAddUrl != nil { - data.Set("WebhooksOnChannelAddUrl", *params.WebhooksOnChannelAddUrl) - } - if params != nil && params.WebhooksOnChannelAddedMethod != nil { - data.Set("WebhooksOnChannelAddedMethod", *params.WebhooksOnChannelAddedMethod) - } - if params != nil && params.WebhooksOnChannelAddedUrl != nil { - data.Set("WebhooksOnChannelAddedUrl", *params.WebhooksOnChannelAddedUrl) - } - if params != nil && params.WebhooksOnChannelDestroyMethod != nil { - data.Set("WebhooksOnChannelDestroyMethod", *params.WebhooksOnChannelDestroyMethod) - } - if params != nil && params.WebhooksOnChannelDestroyUrl != nil { - data.Set("WebhooksOnChannelDestroyUrl", *params.WebhooksOnChannelDestroyUrl) - } - if params != nil && params.WebhooksOnChannelDestroyedMethod != nil { - data.Set("WebhooksOnChannelDestroyedMethod", *params.WebhooksOnChannelDestroyedMethod) - } - if params != nil && params.WebhooksOnChannelDestroyedUrl != nil { - data.Set("WebhooksOnChannelDestroyedUrl", *params.WebhooksOnChannelDestroyedUrl) - } - if params != nil && params.WebhooksOnChannelUpdateMethod != nil { - data.Set("WebhooksOnChannelUpdateMethod", *params.WebhooksOnChannelUpdateMethod) - } - if params != nil && params.WebhooksOnChannelUpdateUrl != nil { - data.Set("WebhooksOnChannelUpdateUrl", *params.WebhooksOnChannelUpdateUrl) - } - if params != nil && params.WebhooksOnChannelUpdatedMethod != nil { - data.Set("WebhooksOnChannelUpdatedMethod", *params.WebhooksOnChannelUpdatedMethod) - } - if params != nil && params.WebhooksOnChannelUpdatedUrl != nil { - data.Set("WebhooksOnChannelUpdatedUrl", *params.WebhooksOnChannelUpdatedUrl) - } - if params != nil && params.WebhooksOnMemberAddMethod != nil { - data.Set("WebhooksOnMemberAddMethod", *params.WebhooksOnMemberAddMethod) - } - if params != nil && params.WebhooksOnMemberAddUrl != nil { - data.Set("WebhooksOnMemberAddUrl", *params.WebhooksOnMemberAddUrl) - } - if params != nil && params.WebhooksOnMemberAddedMethod != nil { - data.Set("WebhooksOnMemberAddedMethod", *params.WebhooksOnMemberAddedMethod) - } - if params != nil && params.WebhooksOnMemberAddedUrl != nil { - data.Set("WebhooksOnMemberAddedUrl", *params.WebhooksOnMemberAddedUrl) - } - if params != nil && params.WebhooksOnMemberRemoveMethod != nil { - data.Set("WebhooksOnMemberRemoveMethod", *params.WebhooksOnMemberRemoveMethod) - } - if params != nil && params.WebhooksOnMemberRemoveUrl != nil { - data.Set("WebhooksOnMemberRemoveUrl", *params.WebhooksOnMemberRemoveUrl) - } - if params != nil && params.WebhooksOnMemberRemovedMethod != nil { - data.Set("WebhooksOnMemberRemovedMethod", *params.WebhooksOnMemberRemovedMethod) - } - if params != nil && params.WebhooksOnMemberRemovedUrl != nil { - data.Set("WebhooksOnMemberRemovedUrl", *params.WebhooksOnMemberRemovedUrl) - } - if params != nil && params.WebhooksOnMessageRemoveMethod != nil { - data.Set("WebhooksOnMessageRemoveMethod", *params.WebhooksOnMessageRemoveMethod) - } - if params != nil && params.WebhooksOnMessageRemoveUrl != nil { - data.Set("WebhooksOnMessageRemoveUrl", *params.WebhooksOnMessageRemoveUrl) - } - if params != nil && params.WebhooksOnMessageRemovedMethod != nil { - data.Set("WebhooksOnMessageRemovedMethod", *params.WebhooksOnMessageRemovedMethod) - } - if params != nil && params.WebhooksOnMessageRemovedUrl != nil { - data.Set("WebhooksOnMessageRemovedUrl", *params.WebhooksOnMessageRemovedUrl) - } - if params != nil && params.WebhooksOnMessageSendMethod != nil { - data.Set("WebhooksOnMessageSendMethod", *params.WebhooksOnMessageSendMethod) - } - if params != nil && params.WebhooksOnMessageSendUrl != nil { - data.Set("WebhooksOnMessageSendUrl", *params.WebhooksOnMessageSendUrl) - } - if params != nil && params.WebhooksOnMessageSentMethod != nil { - data.Set("WebhooksOnMessageSentMethod", *params.WebhooksOnMessageSentMethod) - } - if params != nil && params.WebhooksOnMessageSentUrl != nil { - data.Set("WebhooksOnMessageSentUrl", *params.WebhooksOnMessageSentUrl) - } - if params != nil && params.WebhooksOnMessageUpdateMethod != nil { - data.Set("WebhooksOnMessageUpdateMethod", *params.WebhooksOnMessageUpdateMethod) - } - if params != nil && params.WebhooksOnMessageUpdateUrl != nil { - data.Set("WebhooksOnMessageUpdateUrl", *params.WebhooksOnMessageUpdateUrl) - } - if params != nil && params.WebhooksOnMessageUpdatedMethod != nil { - data.Set("WebhooksOnMessageUpdatedMethod", *params.WebhooksOnMessageUpdatedMethod) - } - if params != nil && params.WebhooksOnMessageUpdatedUrl != nil { - data.Set("WebhooksOnMessageUpdatedUrl", *params.WebhooksOnMessageUpdatedUrl) - } + if params != nil && params.ConsumptionReportInterval != nil { + data.Set("ConsumptionReportInterval", fmt.Sprint(*params.ConsumptionReportInterval)) +} + if params != nil && params.DefaultChannelCreatorRoleSid != nil { + data.Set("DefaultChannelCreatorRoleSid", *params.DefaultChannelCreatorRoleSid) +} + if params != nil && params.DefaultChannelRoleSid != nil { + data.Set("DefaultChannelRoleSid", *params.DefaultChannelRoleSid) +} + if params != nil && params.DefaultServiceRoleSid != nil { + data.Set("DefaultServiceRoleSid", *params.DefaultServiceRoleSid) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.LimitsChannelMembers != nil { + data.Set("LimitsChannelMembers", fmt.Sprint(*params.LimitsChannelMembers)) +} + if params != nil && params.LimitsUserChannels != nil { + data.Set("LimitsUserChannels", fmt.Sprint(*params.LimitsUserChannels)) +} + if params != nil && params.NotificationsAddedToChannelEnabled != nil { + data.Set("NotificationsAddedToChannelEnabled", fmt.Sprint(*params.NotificationsAddedToChannelEnabled)) +} + if params != nil && params.NotificationsAddedToChannelTemplate != nil { + data.Set("NotificationsAddedToChannelTemplate", *params.NotificationsAddedToChannelTemplate) +} + if params != nil && params.NotificationsInvitedToChannelEnabled != nil { + data.Set("NotificationsInvitedToChannelEnabled", fmt.Sprint(*params.NotificationsInvitedToChannelEnabled)) +} + if params != nil && params.NotificationsInvitedToChannelTemplate != nil { + data.Set("NotificationsInvitedToChannelTemplate", *params.NotificationsInvitedToChannelTemplate) +} + if params != nil && params.NotificationsNewMessageEnabled != nil { + data.Set("NotificationsNewMessageEnabled", fmt.Sprint(*params.NotificationsNewMessageEnabled)) +} + if params != nil && params.NotificationsNewMessageTemplate != nil { + data.Set("NotificationsNewMessageTemplate", *params.NotificationsNewMessageTemplate) +} + if params != nil && params.NotificationsRemovedFromChannelEnabled != nil { + data.Set("NotificationsRemovedFromChannelEnabled", fmt.Sprint(*params.NotificationsRemovedFromChannelEnabled)) +} + if params != nil && params.NotificationsRemovedFromChannelTemplate != nil { + data.Set("NotificationsRemovedFromChannelTemplate", *params.NotificationsRemovedFromChannelTemplate) +} + if params != nil && params.PostWebhookUrl != nil { + data.Set("PostWebhookUrl", *params.PostWebhookUrl) +} + if params != nil && params.PreWebhookUrl != nil { + data.Set("PreWebhookUrl", *params.PreWebhookUrl) +} + if params != nil && params.ReachabilityEnabled != nil { + data.Set("ReachabilityEnabled", fmt.Sprint(*params.ReachabilityEnabled)) +} + if params != nil && params.ReadStatusEnabled != nil { + data.Set("ReadStatusEnabled", fmt.Sprint(*params.ReadStatusEnabled)) +} + if params != nil && params.TypingIndicatorTimeout != nil { + data.Set("TypingIndicatorTimeout", fmt.Sprint(*params.TypingIndicatorTimeout)) +} + if params != nil && params.WebhookFilters != nil { + data.Set("WebhookFilters", strings.Join(*params.WebhookFilters, ",")) +} + if params != nil && params.WebhookMethod != nil { + data.Set("WebhookMethod", *params.WebhookMethod) +} + if params != nil && params.WebhooksOnChannelAddMethod != nil { + data.Set("WebhooksOnChannelAddMethod", *params.WebhooksOnChannelAddMethod) +} + if params != nil && params.WebhooksOnChannelAddUrl != nil { + data.Set("WebhooksOnChannelAddUrl", *params.WebhooksOnChannelAddUrl) +} + if params != nil && params.WebhooksOnChannelAddedMethod != nil { + data.Set("WebhooksOnChannelAddedMethod", *params.WebhooksOnChannelAddedMethod) +} + if params != nil && params.WebhooksOnChannelAddedUrl != nil { + data.Set("WebhooksOnChannelAddedUrl", *params.WebhooksOnChannelAddedUrl) +} + if params != nil && params.WebhooksOnChannelDestroyMethod != nil { + data.Set("WebhooksOnChannelDestroyMethod", *params.WebhooksOnChannelDestroyMethod) +} + if params != nil && params.WebhooksOnChannelDestroyUrl != nil { + data.Set("WebhooksOnChannelDestroyUrl", *params.WebhooksOnChannelDestroyUrl) +} + if params != nil && params.WebhooksOnChannelDestroyedMethod != nil { + data.Set("WebhooksOnChannelDestroyedMethod", *params.WebhooksOnChannelDestroyedMethod) +} + if params != nil && params.WebhooksOnChannelDestroyedUrl != nil { + data.Set("WebhooksOnChannelDestroyedUrl", *params.WebhooksOnChannelDestroyedUrl) +} + if params != nil && params.WebhooksOnChannelUpdateMethod != nil { + data.Set("WebhooksOnChannelUpdateMethod", *params.WebhooksOnChannelUpdateMethod) +} + if params != nil && params.WebhooksOnChannelUpdateUrl != nil { + data.Set("WebhooksOnChannelUpdateUrl", *params.WebhooksOnChannelUpdateUrl) +} + if params != nil && params.WebhooksOnChannelUpdatedMethod != nil { + data.Set("WebhooksOnChannelUpdatedMethod", *params.WebhooksOnChannelUpdatedMethod) +} + if params != nil && params.WebhooksOnChannelUpdatedUrl != nil { + data.Set("WebhooksOnChannelUpdatedUrl", *params.WebhooksOnChannelUpdatedUrl) +} + if params != nil && params.WebhooksOnMemberAddMethod != nil { + data.Set("WebhooksOnMemberAddMethod", *params.WebhooksOnMemberAddMethod) +} + if params != nil && params.WebhooksOnMemberAddUrl != nil { + data.Set("WebhooksOnMemberAddUrl", *params.WebhooksOnMemberAddUrl) +} + if params != nil && params.WebhooksOnMemberAddedMethod != nil { + data.Set("WebhooksOnMemberAddedMethod", *params.WebhooksOnMemberAddedMethod) +} + if params != nil && params.WebhooksOnMemberAddedUrl != nil { + data.Set("WebhooksOnMemberAddedUrl", *params.WebhooksOnMemberAddedUrl) +} + if params != nil && params.WebhooksOnMemberRemoveMethod != nil { + data.Set("WebhooksOnMemberRemoveMethod", *params.WebhooksOnMemberRemoveMethod) +} + if params != nil && params.WebhooksOnMemberRemoveUrl != nil { + data.Set("WebhooksOnMemberRemoveUrl", *params.WebhooksOnMemberRemoveUrl) +} + if params != nil && params.WebhooksOnMemberRemovedMethod != nil { + data.Set("WebhooksOnMemberRemovedMethod", *params.WebhooksOnMemberRemovedMethod) +} + if params != nil && params.WebhooksOnMemberRemovedUrl != nil { + data.Set("WebhooksOnMemberRemovedUrl", *params.WebhooksOnMemberRemovedUrl) +} + if params != nil && params.WebhooksOnMessageRemoveMethod != nil { + data.Set("WebhooksOnMessageRemoveMethod", *params.WebhooksOnMessageRemoveMethod) +} + if params != nil && params.WebhooksOnMessageRemoveUrl != nil { + data.Set("WebhooksOnMessageRemoveUrl", *params.WebhooksOnMessageRemoveUrl) +} + if params != nil && params.WebhooksOnMessageRemovedMethod != nil { + data.Set("WebhooksOnMessageRemovedMethod", *params.WebhooksOnMessageRemovedMethod) +} + if params != nil && params.WebhooksOnMessageRemovedUrl != nil { + data.Set("WebhooksOnMessageRemovedUrl", *params.WebhooksOnMessageRemovedUrl) +} + if params != nil && params.WebhooksOnMessageSendMethod != nil { + data.Set("WebhooksOnMessageSendMethod", *params.WebhooksOnMessageSendMethod) +} + if params != nil && params.WebhooksOnMessageSendUrl != nil { + data.Set("WebhooksOnMessageSendUrl", *params.WebhooksOnMessageSendUrl) +} + if params != nil && params.WebhooksOnMessageSentMethod != nil { + data.Set("WebhooksOnMessageSentMethod", *params.WebhooksOnMessageSentMethod) +} + if params != nil && params.WebhooksOnMessageSentUrl != nil { + data.Set("WebhooksOnMessageSentUrl", *params.WebhooksOnMessageSentUrl) +} + if params != nil && params.WebhooksOnMessageUpdateMethod != nil { + data.Set("WebhooksOnMessageUpdateMethod", *params.WebhooksOnMessageUpdateMethod) +} + if params != nil && params.WebhooksOnMessageUpdateUrl != nil { + data.Set("WebhooksOnMessageUpdateUrl", *params.WebhooksOnMessageUpdateUrl) +} + if params != nil && params.WebhooksOnMessageUpdatedMethod != nil { + data.Set("WebhooksOnMessageUpdatedMethod", *params.WebhooksOnMessageUpdatedMethod) +} + if params != nil && params.WebhooksOnMessageUpdatedUrl != nil { + data.Set("WebhooksOnMessageUpdatedUrl", *params.WebhooksOnMessageUpdatedUrl) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &IpMessagingV1Service{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &IpMessagingV1Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateUserParams Optional parameters for the method 'UpdateUser' type UpdateUserParams struct { - Attributes *string `json:"Attributes,omitempty"` + Attributes *string `json:"Attributes,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` } /* @@ -1776,40 +1808,41 @@ type UpdateUserParams struct { * @param ServiceSid * @param Sid * @param optional nil or *UpdateUserParams - Optional Parameters: -* @param "Attributes" (string) - -* @param "FriendlyName" (string) - -* @param "RoleSid" (string) - +* @param "Attributes" (string) - +* @param "FriendlyName" (string) - +* @param "RoleSid" (string) - * @return IpMessagingV1ServiceUser - */ +*/ func (c *DefaultApiService) UpdateUser(ServiceSid string, Sid string, params *UpdateUserParams) (*IpMessagingV1ServiceUser, error) { - path := "/v1/Services/{ServiceSid}/Users/{Sid}" + path := "/v1/Services/{ServiceSid}/Users/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.RoleSid != nil { - data.Set("RoleSid", *params.RoleSid) - } + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &IpMessagingV1ServiceUser{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() + + ps := &IpMessagingV1ServiceUser{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } diff --git a/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_credential.go b/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_credential.go index b7f6a9ea2..296e20f80 100644 --- a/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_credential.go +++ b/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_credential.go @@ -1,28 +1,26 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // IpMessagingV1Credential struct for IpMessagingV1Credential type IpMessagingV1Credential struct { - AccountSid *string `json:"AccountSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Sandbox *string `json:"Sandbox,omitempty"` - Sid *string `json:"Sid,omitempty"` - Type *string `json:"Type,omitempty"` - Url *string `json:"Url,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Sandbox *string `json:"Sandbox,omitempty"` + Sid *string `json:"Sid,omitempty"` + Type *string `json:"Type,omitempty"` + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service.go b/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service.go index a43267d51..7d39834ba 100644 --- a/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service.go +++ b/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service.go @@ -1,41 +1,39 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // IpMessagingV1Service struct for IpMessagingV1Service type IpMessagingV1Service struct { - AccountSid *string `json:"AccountSid,omitempty"` - ConsumptionReportInterval *int32 `json:"ConsumptionReportInterval,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - DefaultChannelCreatorRoleSid *string `json:"DefaultChannelCreatorRoleSid,omitempty"` - DefaultChannelRoleSid *string `json:"DefaultChannelRoleSid,omitempty"` - DefaultServiceRoleSid *string `json:"DefaultServiceRoleSid,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Limits *map[string]interface{} `json:"Limits,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - Notifications *map[string]interface{} `json:"Notifications,omitempty"` - PostWebhookUrl *string `json:"PostWebhookUrl,omitempty"` - PreWebhookUrl *string `json:"PreWebhookUrl,omitempty"` - ReachabilityEnabled *bool `json:"ReachabilityEnabled,omitempty"` - ReadStatusEnabled *bool `json:"ReadStatusEnabled,omitempty"` - Sid *string `json:"Sid,omitempty"` - TypingIndicatorTimeout *int32 `json:"TypingIndicatorTimeout,omitempty"` - Url *string `json:"Url,omitempty"` - WebhookFilters *[]string `json:"WebhookFilters,omitempty"` - WebhookMethod *string `json:"WebhookMethod,omitempty"` - Webhooks *map[string]interface{} `json:"Webhooks,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` + ConsumptionReportInterval *int32 `json:"ConsumptionReportInterval,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + DefaultChannelCreatorRoleSid *string `json:"DefaultChannelCreatorRoleSid,omitempty"` + DefaultChannelRoleSid *string `json:"DefaultChannelRoleSid,omitempty"` + DefaultServiceRoleSid *string `json:"DefaultServiceRoleSid,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Limits *map[string]interface{} `json:"Limits,omitempty"` + Links *map[string]interface{} `json:"Links,omitempty"` + Notifications *map[string]interface{} `json:"Notifications,omitempty"` + PostWebhookUrl *string `json:"PostWebhookUrl,omitempty"` + PreWebhookUrl *string `json:"PreWebhookUrl,omitempty"` + ReachabilityEnabled *bool `json:"ReachabilityEnabled,omitempty"` + ReadStatusEnabled *bool `json:"ReadStatusEnabled,omitempty"` + Sid *string `json:"Sid,omitempty"` + TypingIndicatorTimeout *int32 `json:"TypingIndicatorTimeout,omitempty"` + Url *string `json:"Url,omitempty"` + WebhookFilters *[]string `json:"WebhookFilters,omitempty"` + WebhookMethod *string `json:"WebhookMethod,omitempty"` + Webhooks *map[string]interface{} `json:"Webhooks,omitempty"` } diff --git a/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service_channel.go b/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service_channel.go index 34c6e7ba0..2c9998d17 100644 --- a/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service_channel.go +++ b/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service_channel.go @@ -1,34 +1,32 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // IpMessagingV1ServiceChannel struct for IpMessagingV1ServiceChannel type IpMessagingV1ServiceChannel struct { - AccountSid *string `json:"AccountSid,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - CreatedBy *string `json:"CreatedBy,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - MembersCount *int32 `json:"MembersCount,omitempty"` - MessagesCount *int32 `json:"MessagesCount,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Type *string `json:"Type,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` - Url *string `json:"Url,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + CreatedBy *string `json:"CreatedBy,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Links *map[string]interface{} `json:"Links,omitempty"` + MembersCount *int32 `json:"MembersCount,omitempty"` + MessagesCount *int32 `json:"MessagesCount,omitempty"` + ServiceSid *string `json:"ServiceSid,omitempty"` + Sid *string `json:"Sid,omitempty"` + Type *string `json:"Type,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service_channel_invite.go b/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service_channel_invite.go index ef305a131..a122784f6 100644 --- a/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service_channel_invite.go +++ b/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service_channel_invite.go @@ -1,30 +1,28 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // IpMessagingV1ServiceChannelInvite struct for IpMessagingV1ServiceChannelInvite type IpMessagingV1ServiceChannelInvite struct { - AccountSid *string `json:"AccountSid,omitempty"` - ChannelSid *string `json:"ChannelSid,omitempty"` - CreatedBy *string `json:"CreatedBy,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` + ChannelSid *string `json:"ChannelSid,omitempty"` + CreatedBy *string `json:"CreatedBy,omitempty"` DateCreated *time.Time `json:"DateCreated,omitempty"` DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Identity *string `json:"Identity,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` + Identity *string `json:"Identity,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` + ServiceSid *string `json:"ServiceSid,omitempty"` + Sid *string `json:"Sid,omitempty"` + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service_channel_member.go b/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service_channel_member.go index 7581ecd55..c8fa172b8 100644 --- a/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service_channel_member.go +++ b/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service_channel_member.go @@ -1,31 +1,29 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // IpMessagingV1ServiceChannelMember struct for IpMessagingV1ServiceChannelMember type IpMessagingV1ServiceChannelMember struct { - AccountSid *string `json:"AccountSid,omitempty"` - ChannelSid *string `json:"ChannelSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Identity *string `json:"Identity,omitempty"` - LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` + ChannelSid *string `json:"ChannelSid,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + Identity *string `json:"Identity,omitempty"` + LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` LastConsumptionTimestamp *time.Time `json:"LastConsumptionTimestamp,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` + ServiceSid *string `json:"ServiceSid,omitempty"` + Sid *string `json:"Sid,omitempty"` + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service_channel_message.go b/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service_channel_message.go index 717c9b616..0b798d061 100644 --- a/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service_channel_message.go +++ b/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service_channel_message.go @@ -1,33 +1,31 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // IpMessagingV1ServiceChannelMessage struct for IpMessagingV1ServiceChannelMessage type IpMessagingV1ServiceChannelMessage struct { - AccountSid *string `json:"AccountSid,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - Body *string `json:"Body,omitempty"` - ChannelSid *string `json:"ChannelSid,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + Body *string `json:"Body,omitempty"` + ChannelSid *string `json:"ChannelSid,omitempty"` DateCreated *time.Time `json:"DateCreated,omitempty"` DateUpdated *time.Time `json:"DateUpdated,omitempty"` - From *string `json:"From,omitempty"` - Index *int32 `json:"Index,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - To *string `json:"To,omitempty"` - Url *string `json:"Url,omitempty"` - WasEdited *bool `json:"WasEdited,omitempty"` + From *string `json:"From,omitempty"` + Index *int32 `json:"Index,omitempty"` + ServiceSid *string `json:"ServiceSid,omitempty"` + Sid *string `json:"Sid,omitempty"` + To *string `json:"To,omitempty"` + Url *string `json:"Url,omitempty"` + WasEdited *bool `json:"WasEdited,omitempty"` } diff --git a/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service_role.go b/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service_role.go index c3719e5cf..fdb581c28 100644 --- a/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service_role.go +++ b/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service_role.go @@ -1,29 +1,27 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // IpMessagingV1ServiceRole struct for IpMessagingV1ServiceRole type IpMessagingV1ServiceRole struct { - AccountSid *string `json:"AccountSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Permissions *[]string `json:"Permissions,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Type *string `json:"Type,omitempty"` - Url *string `json:"Url,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Permissions *[]string `json:"Permissions,omitempty"` + ServiceSid *string `json:"ServiceSid,omitempty"` + Sid *string `json:"Sid,omitempty"` + Type *string `json:"Type,omitempty"` + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service_user.go b/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service_user.go index 581e22ea8..1dc9772b8 100644 --- a/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service_user.go +++ b/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service_user.go @@ -1,34 +1,32 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // IpMessagingV1ServiceUser struct for IpMessagingV1ServiceUser type IpMessagingV1ServiceUser struct { - AccountSid *string `json:"AccountSid,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Identity *string `json:"Identity,omitempty"` - IsNotifiable *bool `json:"IsNotifiable,omitempty"` - IsOnline *bool `json:"IsOnline,omitempty"` - JoinedChannelsCount *int32 `json:"JoinedChannelsCount,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Identity *string `json:"Identity,omitempty"` + IsNotifiable *bool `json:"IsNotifiable,omitempty"` + IsOnline *bool `json:"IsOnline,omitempty"` + JoinedChannelsCount *int32 `json:"JoinedChannelsCount,omitempty"` + Links *map[string]interface{} `json:"Links,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` + ServiceSid *string `json:"ServiceSid,omitempty"` + Sid *string `json:"Sid,omitempty"` + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service_user_user_channel.go b/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service_user_user_channel.go index 05f8e57ba..815149d96 100644 --- a/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service_user_user_channel.go +++ b/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service_user_user_channel.go @@ -1,24 +1,23 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // IpMessagingV1ServiceUserUserChannel struct for IpMessagingV1ServiceUserUserChannel type IpMessagingV1ServiceUserUserChannel struct { - AccountSid *string `json:"AccountSid,omitempty"` - ChannelSid *string `json:"ChannelSid,omitempty"` - LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - MemberSid *string `json:"MemberSid,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Status *string `json:"Status,omitempty"` - UnreadMessagesCount *int32 `json:"UnreadMessagesCount,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` + ChannelSid *string `json:"ChannelSid,omitempty"` + LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` + Links *map[string]interface{} `json:"Links,omitempty"` + MemberSid *string `json:"MemberSid,omitempty"` + ServiceSid *string `json:"ServiceSid,omitempty"` + Status *string `json:"Status,omitempty"` + UnreadMessagesCount *int32 `json:"UnreadMessagesCount,omitempty"` } diff --git a/twilio/rest/ip_messaging/v1/model_list_channel_response.go b/twilio/rest/ip_messaging/v1/model_list_channel_response.go index d3432b2df..163e4c852 100644 --- a/twilio/rest/ip_messaging/v1/model_list_channel_response.go +++ b/twilio/rest/ip_messaging/v1/model_list_channel_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListChannelResponse struct for ListChannelResponse type ListChannelResponse struct { Channels []IpMessagingV1ServiceChannel `json:"Channels,omitempty"` - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/ip_messaging/v1/model_list_credential_response.go b/twilio/rest/ip_messaging/v1/model_list_credential_response.go index c4fb177a3..733be1d18 100644 --- a/twilio/rest/ip_messaging/v1/model_list_credential_response.go +++ b/twilio/rest/ip_messaging/v1/model_list_credential_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListCredentialResponse struct for ListCredentialResponse type ListCredentialResponse struct { - Credentials []IpMessagingV1Credential `json:"Credentials,omitempty"` - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Credentials []IpMessagingV1Credential `json:"Credentials,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/ip_messaging/v1/model_list_credential_response_meta.go b/twilio/rest/ip_messaging/v1/model_list_credential_response_meta.go index 87cc4ce5e..64bed8506 100644 --- a/twilio/rest/ip_messaging/v1/model_list_credential_response_meta.go +++ b/twilio/rest/ip_messaging/v1/model_list_credential_response_meta.go @@ -1,23 +1,22 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListCredentialResponseMeta struct for ListCredentialResponseMeta type ListCredentialResponseMeta struct { - FirstPageUrl string `json:"FirstPageUrl,omitempty"` - Key string `json:"Key,omitempty"` - NextPageUrl string `json:"NextPageUrl,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` - Url string `json:"Url,omitempty"` + Url string `json:"Url,omitempty"` } diff --git a/twilio/rest/ip_messaging/v1/model_list_invite_response.go b/twilio/rest/ip_messaging/v1/model_list_invite_response.go index cee98afd8..508907738 100644 --- a/twilio/rest/ip_messaging/v1/model_list_invite_response.go +++ b/twilio/rest/ip_messaging/v1/model_list_invite_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListInviteResponse struct for ListInviteResponse type ListInviteResponse struct { Invites []IpMessagingV1ServiceChannelInvite `json:"Invites,omitempty"` - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/ip_messaging/v1/model_list_member_response.go b/twilio/rest/ip_messaging/v1/model_list_member_response.go index 2b0726639..a19306b21 100644 --- a/twilio/rest/ip_messaging/v1/model_list_member_response.go +++ b/twilio/rest/ip_messaging/v1/model_list_member_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListMemberResponse struct for ListMemberResponse type ListMemberResponse struct { Members []IpMessagingV1ServiceChannelMember `json:"Members,omitempty"` - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/ip_messaging/v1/model_list_message_response.go b/twilio/rest/ip_messaging/v1/model_list_message_response.go index 03fd62305..aba54b946 100644 --- a/twilio/rest/ip_messaging/v1/model_list_message_response.go +++ b/twilio/rest/ip_messaging/v1/model_list_message_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListMessageResponse struct for ListMessageResponse type ListMessageResponse struct { Messages []IpMessagingV1ServiceChannelMessage `json:"Messages,omitempty"` - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/ip_messaging/v1/model_list_role_response.go b/twilio/rest/ip_messaging/v1/model_list_role_response.go index 557def78f..785a8a54e 100644 --- a/twilio/rest/ip_messaging/v1/model_list_role_response.go +++ b/twilio/rest/ip_messaging/v1/model_list_role_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListRoleResponse struct for ListRoleResponse type ListRoleResponse struct { - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` Roles []IpMessagingV1ServiceRole `json:"Roles,omitempty"` } diff --git a/twilio/rest/ip_messaging/v1/model_list_service_response.go b/twilio/rest/ip_messaging/v1/model_list_service_response.go index 07249d437..000fb8ef8 100644 --- a/twilio/rest/ip_messaging/v1/model_list_service_response.go +++ b/twilio/rest/ip_messaging/v1/model_list_service_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListServiceResponse struct for ListServiceResponse type ListServiceResponse struct { - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` - Services []IpMessagingV1Service `json:"Services,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Services []IpMessagingV1Service `json:"Services,omitempty"` } diff --git a/twilio/rest/ip_messaging/v1/model_list_user_channel_response.go b/twilio/rest/ip_messaging/v1/model_list_user_channel_response.go index b3552c85e..5974f35b5 100644 --- a/twilio/rest/ip_messaging/v1/model_list_user_channel_response.go +++ b/twilio/rest/ip_messaging/v1/model_list_user_channel_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListUserChannelResponse struct for ListUserChannelResponse type ListUserChannelResponse struct { Channels []IpMessagingV1ServiceUserUserChannel `json:"Channels,omitempty"` - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/ip_messaging/v1/model_list_user_response.go b/twilio/rest/ip_messaging/v1/model_list_user_response.go index d316d0ed6..6a7881a9c 100644 --- a/twilio/rest/ip_messaging/v1/model_list_user_response.go +++ b/twilio/rest/ip_messaging/v1/model_list_user_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListUserResponse struct for ListUserResponse type ListUserResponse struct { - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` Users []IpMessagingV1ServiceUser `json:"Users,omitempty"` } diff --git a/twilio/rest/ip_messaging/v2/api_default.go b/twilio/rest/ip_messaging/v2/api_default.go index 5b92d5204..bc2ea3f27 100644 --- a/twilio/rest/ip_messaging/v2/api_default.go +++ b/twilio/rest/ip_messaging/v2/api_default.go @@ -1,11 +1,11 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,11 +14,11 @@ package openapi import ( "encoding/json" "fmt" - "net/url" - "strings" - "time" - twilio "github.com/twilio/twilio-go/client" + "net/url" + "strings" + "time" + "reflect" ) type DefaultApiService struct { @@ -27,22 +27,22 @@ type DefaultApiService struct { } func NewDefaultApiService(client *twilio.Client) *DefaultApiService { - return &DefaultApiService{ - client: client, + return &DefaultApiService { + client: client, baseURL: "https://ip-messaging.twilio.com", } } // CreateChannelParams Optional parameters for the method 'CreateChannel' type CreateChannelParams struct { - XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - CreatedBy *string `json:"CreatedBy,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Type *string `json:"Type,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + CreatedBy *string `json:"CreatedBy,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Type *string `json:"Type,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` } /* @@ -50,72 +50,71 @@ type CreateChannelParams struct { * @param ServiceSid * @param optional nil or *CreateChannelParams - Optional Parameters: * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header -* @param "Attributes" (string) - -* @param "CreatedBy" (string) - -* @param "DateCreated" (time.Time) - -* @param "DateUpdated" (time.Time) - -* @param "FriendlyName" (string) - -* @param "Type" (string) - -* @param "UniqueName" (string) - +* @param "Attributes" (string) - +* @param "CreatedBy" (string) - +* @param "DateCreated" (time.Time) - +* @param "DateUpdated" (time.Time) - +* @param "FriendlyName" (string) - +* @param "Type" (string) - +* @param "UniqueName" (string) - * @return IpMessagingV2ServiceChannel - */ +*/ func (c *DefaultApiService) CreateChannel(ServiceSid string, params *CreateChannelParams) (*IpMessagingV2ServiceChannel, error) { - path := "/v2/Services/{ServiceSid}/Channels" + path := "/v2/Services/{ServiceSid}/Channels" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) - } - if params != nil && params.CreatedBy != nil { - data.Set("CreatedBy", *params.CreatedBy) - } - if params != nil && params.DateCreated != nil { - data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) - } - if params != nil && params.DateUpdated != nil { - data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.Type != nil { - data.Set("Type", *params.Type) - } - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) - } + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) +} + if params != nil && params.CreatedBy != nil { + data.Set("CreatedBy", *params.CreatedBy) +} + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) +} + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.Type != nil { + data.Set("Type", *params.Type) +} + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) +} if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &IpMessagingV2ServiceChannel{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &IpMessagingV2ServiceChannel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } - // CreateChannelWebhookParams Optional parameters for the method 'CreateChannelWebhook' type CreateChannelWebhookParams struct { - ConfigurationFilters *[]string `json:"Configuration.Filters,omitempty"` - ConfigurationFlowSid *string `json:"Configuration.FlowSid,omitempty"` - ConfigurationMethod *string `json:"Configuration.Method,omitempty"` - ConfigurationRetryCount *int32 `json:"Configuration.RetryCount,omitempty"` - ConfigurationTriggers *[]string `json:"Configuration.Triggers,omitempty"` - ConfigurationUrl *string `json:"Configuration.Url,omitempty"` - Type *string `json:"Type,omitempty"` + ConfigurationFilters *[]string `json:"Configuration.Filters,omitempty"` + ConfigurationFlowSid *string `json:"Configuration.FlowSid,omitempty"` + ConfigurationMethod *string `json:"Configuration.Method,omitempty"` + ConfigurationRetryCount *int32 `json:"Configuration.RetryCount,omitempty"` + ConfigurationTriggers *[]string `json:"Configuration.Triggers,omitempty"` + ConfigurationUrl *string `json:"Configuration.Url,omitempty"` + Type *string `json:"Type,omitempty"` } /* @@ -123,130 +122,130 @@ type CreateChannelWebhookParams struct { * @param ServiceSid * @param ChannelSid * @param optional nil or *CreateChannelWebhookParams - Optional Parameters: -* @param "ConfigurationFilters" ([]string) - -* @param "ConfigurationFlowSid" (string) - -* @param "ConfigurationMethod" (string) - -* @param "ConfigurationRetryCount" (int32) - -* @param "ConfigurationTriggers" ([]string) - -* @param "ConfigurationUrl" (string) - -* @param "Type" (string) - +* @param "ConfigurationFilters" ([]string) - +* @param "ConfigurationFlowSid" (string) - +* @param "ConfigurationMethod" (string) - +* @param "ConfigurationRetryCount" (int32) - +* @param "ConfigurationTriggers" ([]string) - +* @param "ConfigurationUrl" (string) - +* @param "Type" (string) - * @return IpMessagingV2ServiceChannelChannelWebhook - */ +*/ func (c *DefaultApiService) CreateChannelWebhook(ServiceSid string, ChannelSid string, params *CreateChannelWebhookParams) (*IpMessagingV2ServiceChannelChannelWebhook, error) { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks" + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.ConfigurationFilters != nil { - data.Set("ConfigurationFilters", strings.Join(*params.ConfigurationFilters, ",")) - } - if params != nil && params.ConfigurationFlowSid != nil { - data.Set("ConfigurationFlowSid", *params.ConfigurationFlowSid) - } - if params != nil && params.ConfigurationMethod != nil { - data.Set("ConfigurationMethod", *params.ConfigurationMethod) - } - if params != nil && params.ConfigurationRetryCount != nil { - data.Set("ConfigurationRetryCount", fmt.Sprint(*params.ConfigurationRetryCount)) - } - if params != nil && params.ConfigurationTriggers != nil { - data.Set("ConfigurationTriggers", strings.Join(*params.ConfigurationTriggers, ",")) - } - if params != nil && params.ConfigurationUrl != nil { - data.Set("ConfigurationUrl", *params.ConfigurationUrl) - } - if params != nil && params.Type != nil { - data.Set("Type", *params.Type) - } + if params != nil && params.ConfigurationFilters != nil { + data.Set("ConfigurationFilters", strings.Join(*params.ConfigurationFilters, ",")) +} + if params != nil && params.ConfigurationFlowSid != nil { + data.Set("ConfigurationFlowSid", *params.ConfigurationFlowSid) +} + if params != nil && params.ConfigurationMethod != nil { + data.Set("ConfigurationMethod", *params.ConfigurationMethod) +} + if params != nil && params.ConfigurationRetryCount != nil { + data.Set("ConfigurationRetryCount", fmt.Sprint(*params.ConfigurationRetryCount)) +} + if params != nil && params.ConfigurationTriggers != nil { + data.Set("ConfigurationTriggers", strings.Join(*params.ConfigurationTriggers, ",")) +} + if params != nil && params.ConfigurationUrl != nil { + data.Set("ConfigurationUrl", *params.ConfigurationUrl) +} + if params != nil && params.Type != nil { + data.Set("Type", *params.Type) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &IpMessagingV2ServiceChannelChannelWebhook{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &IpMessagingV2ServiceChannelChannelWebhook{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateCredentialParams Optional parameters for the method 'CreateCredential' type CreateCredentialParams struct { - ApiKey *string `json:"ApiKey,omitempty"` - Certificate *string `json:"Certificate,omitempty"` + ApiKey *string `json:"ApiKey,omitempty"` + Certificate *string `json:"Certificate,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` - PrivateKey *string `json:"PrivateKey,omitempty"` - Sandbox *bool `json:"Sandbox,omitempty"` - Secret *string `json:"Secret,omitempty"` - Type *string `json:"Type,omitempty"` + PrivateKey *string `json:"PrivateKey,omitempty"` + Sandbox *bool `json:"Sandbox,omitempty"` + Secret *string `json:"Secret,omitempty"` + Type *string `json:"Type,omitempty"` } /* * CreateCredential Method for CreateCredential * @param optional nil or *CreateCredentialParams - Optional Parameters: -* @param "ApiKey" (string) - -* @param "Certificate" (string) - -* @param "FriendlyName" (string) - -* @param "PrivateKey" (string) - -* @param "Sandbox" (bool) - -* @param "Secret" (string) - -* @param "Type" (string) - +* @param "ApiKey" (string) - +* @param "Certificate" (string) - +* @param "FriendlyName" (string) - +* @param "PrivateKey" (string) - +* @param "Sandbox" (bool) - +* @param "Secret" (string) - +* @param "Type" (string) - * @return IpMessagingV2Credential - */ +*/ func (c *DefaultApiService) CreateCredential(params *CreateCredentialParams) (*IpMessagingV2Credential, error) { - path := "/v2/Credentials" + path := "/v2/Credentials" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.ApiKey != nil { - data.Set("ApiKey", *params.ApiKey) - } - if params != nil && params.Certificate != nil { - data.Set("Certificate", *params.Certificate) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.PrivateKey != nil { - data.Set("PrivateKey", *params.PrivateKey) - } - if params != nil && params.Sandbox != nil { - data.Set("Sandbox", fmt.Sprint(*params.Sandbox)) - } - if params != nil && params.Secret != nil { - data.Set("Secret", *params.Secret) - } - if params != nil && params.Type != nil { - data.Set("Type", *params.Type) - } + if params != nil && params.ApiKey != nil { + data.Set("ApiKey", *params.ApiKey) +} + if params != nil && params.Certificate != nil { + data.Set("Certificate", *params.Certificate) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.PrivateKey != nil { + data.Set("PrivateKey", *params.PrivateKey) +} + if params != nil && params.Sandbox != nil { + data.Set("Sandbox", fmt.Sprint(*params.Sandbox)) +} + if params != nil && params.Secret != nil { + data.Set("Secret", *params.Secret) +} + if params != nil && params.Type != nil { + data.Set("Type", *params.Type) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &IpMessagingV2Credential{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &IpMessagingV2Credential{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateInviteParams Optional parameters for the method 'CreateInvite' type CreateInviteParams struct { Identity *string `json:"Identity,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` } /* @@ -254,50 +253,50 @@ type CreateInviteParams struct { * @param ServiceSid * @param ChannelSid * @param optional nil or *CreateInviteParams - Optional Parameters: -* @param "Identity" (string) - -* @param "RoleSid" (string) - +* @param "Identity" (string) - +* @param "RoleSid" (string) - * @return IpMessagingV2ServiceChannelInvite - */ +*/ func (c *DefaultApiService) CreateInvite(ServiceSid string, ChannelSid string, params *CreateInviteParams) (*IpMessagingV2ServiceChannelInvite, error) { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Invites" + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Invites" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Identity != nil { - data.Set("Identity", *params.Identity) - } - if params != nil && params.RoleSid != nil { - data.Set("RoleSid", *params.RoleSid) - } + if params != nil && params.Identity != nil { + data.Set("Identity", *params.Identity) +} + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &IpMessagingV2ServiceChannelInvite{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &IpMessagingV2ServiceChannelInvite{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateMemberParams Optional parameters for the method 'CreateMember' type CreateMemberParams struct { - XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Identity *string `json:"Identity,omitempty"` - LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + Identity *string `json:"Identity,omitempty"` + LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` LastConsumptionTimestamp *time.Time `json:"LastConsumptionTimestamp,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` } /* @@ -306,74 +305,73 @@ type CreateMemberParams struct { * @param ChannelSid * @param optional nil or *CreateMemberParams - Optional Parameters: * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header -* @param "Attributes" (string) - -* @param "DateCreated" (time.Time) - -* @param "DateUpdated" (time.Time) - -* @param "Identity" (string) - -* @param "LastConsumedMessageIndex" (*int32) - -* @param "LastConsumptionTimestamp" (time.Time) - -* @param "RoleSid" (string) - +* @param "Attributes" (string) - +* @param "DateCreated" (time.Time) - +* @param "DateUpdated" (time.Time) - +* @param "Identity" (string) - +* @param "LastConsumedMessageIndex" (*int32) - +* @param "LastConsumptionTimestamp" (time.Time) - +* @param "RoleSid" (string) - * @return IpMessagingV2ServiceChannelMember - */ +*/ func (c *DefaultApiService) CreateMember(ServiceSid string, ChannelSid string, params *CreateMemberParams) (*IpMessagingV2ServiceChannelMember, error) { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members" + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) - } - if params != nil && params.DateCreated != nil { - data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) - } - if params != nil && params.DateUpdated != nil { - data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) - } - if params != nil && params.Identity != nil { - data.Set("Identity", *params.Identity) - } - if params != nil && params.LastConsumedMessageIndex != nil { - data.Set("LastConsumedMessageIndex", fmt.Sprint(*params.LastConsumedMessageIndex)) - } - if params != nil && params.LastConsumptionTimestamp != nil { - data.Set("LastConsumptionTimestamp", fmt.Sprint(*params.LastConsumptionTimestamp)) - } - if params != nil && params.RoleSid != nil { - data.Set("RoleSid", *params.RoleSid) - } + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) +} + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) +} + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) +} + if params != nil && params.Identity != nil { + data.Set("Identity", *params.Identity) +} + if params != nil && params.LastConsumedMessageIndex != nil { + data.Set("LastConsumedMessageIndex", fmt.Sprint(*params.LastConsumedMessageIndex)) +} + if params != nil && params.LastConsumptionTimestamp != nil { + data.Set("LastConsumptionTimestamp", fmt.Sprint(*params.LastConsumptionTimestamp)) +} + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) +} if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &IpMessagingV2ServiceChannelMember{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &IpMessagingV2ServiceChannelMember{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } - // CreateMessageParams Optional parameters for the method 'CreateMessage' type CreateMessageParams struct { - XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - Body *string `json:"Body,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - From *string `json:"From,omitempty"` - LastUpdatedBy *string `json:"LastUpdatedBy,omitempty"` - MediaSid *string `json:"MediaSid,omitempty"` + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + Body *string `json:"Body,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + From *string `json:"From,omitempty"` + LastUpdatedBy *string `json:"LastUpdatedBy,omitempty"` + MediaSid *string `json:"MediaSid,omitempty"` } /* @@ -382,112 +380,111 @@ type CreateMessageParams struct { * @param ChannelSid * @param optional nil or *CreateMessageParams - Optional Parameters: * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header -* @param "Attributes" (string) - -* @param "Body" (string) - -* @param "DateCreated" (time.Time) - -* @param "DateUpdated" (time.Time) - -* @param "From" (string) - -* @param "LastUpdatedBy" (string) - -* @param "MediaSid" (string) - +* @param "Attributes" (string) - +* @param "Body" (string) - +* @param "DateCreated" (time.Time) - +* @param "DateUpdated" (time.Time) - +* @param "From" (string) - +* @param "LastUpdatedBy" (string) - +* @param "MediaSid" (string) - * @return IpMessagingV2ServiceChannelMessage - */ +*/ func (c *DefaultApiService) CreateMessage(ServiceSid string, ChannelSid string, params *CreateMessageParams) (*IpMessagingV2ServiceChannelMessage, error) { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages" + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) - } - if params != nil && params.Body != nil { - data.Set("Body", *params.Body) - } - if params != nil && params.DateCreated != nil { - data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) - } - if params != nil && params.DateUpdated != nil { - data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) - } - if params != nil && params.From != nil { - data.Set("From", *params.From) - } - if params != nil && params.LastUpdatedBy != nil { - data.Set("LastUpdatedBy", *params.LastUpdatedBy) - } - if params != nil && params.MediaSid != nil { - data.Set("MediaSid", *params.MediaSid) - } + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) +} + if params != nil && params.Body != nil { + data.Set("Body", *params.Body) +} + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) +} + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) +} + if params != nil && params.From != nil { + data.Set("From", *params.From) +} + if params != nil && params.LastUpdatedBy != nil { + data.Set("LastUpdatedBy", *params.LastUpdatedBy) +} + if params != nil && params.MediaSid != nil { + data.Set("MediaSid", *params.MediaSid) +} if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &IpMessagingV2ServiceChannelMessage{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &IpMessagingV2ServiceChannelMessage{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } - // CreateRoleParams Optional parameters for the method 'CreateRole' type CreateRoleParams struct { - FriendlyName *string `json:"FriendlyName,omitempty"` - Permission *[]string `json:"Permission,omitempty"` - Type *string `json:"Type,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Permission *[]string `json:"Permission,omitempty"` + Type *string `json:"Type,omitempty"` } /* * CreateRole Method for CreateRole * @param ServiceSid * @param optional nil or *CreateRoleParams - Optional Parameters: -* @param "FriendlyName" (string) - -* @param "Permission" ([]string) - -* @param "Type" (string) - +* @param "FriendlyName" (string) - +* @param "Permission" ([]string) - +* @param "Type" (string) - * @return IpMessagingV2ServiceRole - */ +*/ func (c *DefaultApiService) CreateRole(ServiceSid string, params *CreateRoleParams) (*IpMessagingV2ServiceRole, error) { - path := "/v2/Services/{ServiceSid}/Roles" + path := "/v2/Services/{ServiceSid}/Roles" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.Permission != nil { - data.Set("Permission", strings.Join(*params.Permission, ",")) - } - if params != nil && params.Type != nil { - data.Set("Type", *params.Type) - } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.Permission != nil { + data.Set("Permission", strings.Join(*params.Permission, ",")) +} + if params != nil && params.Type != nil { + data.Set("Type", *params.Type) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &IpMessagingV2ServiceRole{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &IpMessagingV2ServiceRole{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateServiceParams Optional parameters for the method 'CreateService' type CreateServiceParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` @@ -496,41 +493,41 @@ type CreateServiceParams struct { /* * CreateService Method for CreateService * @param optional nil or *CreateServiceParams - Optional Parameters: -* @param "FriendlyName" (string) - +* @param "FriendlyName" (string) - * @return IpMessagingV2Service - */ +*/ func (c *DefaultApiService) CreateService(params *CreateServiceParams) (*IpMessagingV2Service, error) { - path := "/v2/Services" + path := "/v2/Services" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &IpMessagingV2Service{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &IpMessagingV2Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateUserParams Optional parameters for the method 'CreateUser' type CreateUserParams struct { XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Identity *string `json:"Identity,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Identity *string `json:"Identity,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` } /* @@ -538,74 +535,75 @@ type CreateUserParams struct { * @param ServiceSid * @param optional nil or *CreateUserParams - Optional Parameters: * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header -* @param "Attributes" (string) - -* @param "FriendlyName" (string) - -* @param "Identity" (string) - -* @param "RoleSid" (string) - +* @param "Attributes" (string) - +* @param "FriendlyName" (string) - +* @param "Identity" (string) - +* @param "RoleSid" (string) - * @return IpMessagingV2ServiceUser - */ +*/ func (c *DefaultApiService) CreateUser(ServiceSid string, params *CreateUserParams) (*IpMessagingV2ServiceUser, error) { - path := "/v2/Services/{ServiceSid}/Users" + path := "/v2/Services/{ServiceSid}/Users" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.Identity != nil { - data.Set("Identity", *params.Identity) - } - if params != nil && params.RoleSid != nil { - data.Set("RoleSid", *params.RoleSid) - } + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.Identity != nil { + data.Set("Identity", *params.Identity) +} + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) +} if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &IpMessagingV2ServiceUser{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &IpMessagingV2ServiceUser{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * DeleteBinding Method for DeleteBinding * @param ServiceSid * @param Sid - */ -func (c *DefaultApiService) DeleteBinding(ServiceSid string, Sid string) error { - path := "/v2/Services/{ServiceSid}/Bindings/{Sid}" +*/ +func (c *DefaultApiService) DeleteBinding(ServiceSid string, Sid string, ) (error) { + path := "/v2/Services/{ServiceSid}/Bindings/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil -} + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + defer resp.Body.Close() + + return nil +} // DeleteChannelParams Optional parameters for the method 'DeleteChannel' type DeleteChannelParams struct { XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` @@ -617,27 +615,28 @@ type DeleteChannelParams struct { * @param Sid * @param optional nil or *DeleteChannelParams - Optional Parameters: * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header - */ -func (c *DefaultApiService) DeleteChannel(ServiceSid string, Sid string, params *DeleteChannelParams) error { - path := "/v2/Services/{ServiceSid}/Channels/{Sid}" +*/ +func (c *DefaultApiService) DeleteChannel(ServiceSid string, Sid string, params *DeleteChannelParams) (error) { + path := "/v2/Services/{ServiceSid}/Channels/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) + if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -645,45 +644,49 @@ func (c *DefaultApiService) DeleteChannel(ServiceSid string, Sid string, params * @param ServiceSid * @param ChannelSid * @param Sid - */ -func (c *DefaultApiService) DeleteChannelWebhook(ServiceSid string, ChannelSid string, Sid string) error { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks/{Sid}" +*/ +func (c *DefaultApiService) DeleteChannelWebhook(ServiceSid string, ChannelSid string, Sid string, ) (error) { + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - return nil + defer resp.Body.Close() + + return nil } /* * DeleteCredential Method for DeleteCredential * @param Sid - */ -func (c *DefaultApiService) DeleteCredential(Sid string) error { - path := "/v2/Credentials/{Sid}" +*/ +func (c *DefaultApiService) DeleteCredential(Sid string, ) (error) { + path := "/v2/Credentials/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* @@ -691,26 +694,27 @@ func (c *DefaultApiService) DeleteCredential(Sid string) error { * @param ServiceSid * @param ChannelSid * @param Sid - */ -func (c *DefaultApiService) DeleteInvite(ServiceSid string, ChannelSid string, Sid string) error { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Invites/{Sid}" +*/ +func (c *DefaultApiService) DeleteInvite(ServiceSid string, ChannelSid string, Sid string, ) (error) { + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Invites/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil -} + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + defer resp.Body.Close() + + return nil +} // DeleteMemberParams Optional parameters for the method 'DeleteMember' type DeleteMemberParams struct { XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` @@ -723,30 +727,30 @@ type DeleteMemberParams struct { * @param Sid * @param optional nil or *DeleteMemberParams - Optional Parameters: * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header - */ -func (c *DefaultApiService) DeleteMember(ServiceSid string, ChannelSid string, Sid string, params *DeleteMemberParams) error { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}" +*/ +func (c *DefaultApiService) DeleteMember(ServiceSid string, ChannelSid string, Sid string, params *DeleteMemberParams) (error) { + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) + if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } - // DeleteMessageParams Optional parameters for the method 'DeleteMessage' type DeleteMessageParams struct { XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` @@ -759,95 +763,102 @@ type DeleteMessageParams struct { * @param Sid * @param optional nil or *DeleteMessageParams - Optional Parameters: * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header - */ -func (c *DefaultApiService) DeleteMessage(ServiceSid string, ChannelSid string, Sid string, params *DeleteMessageParams) error { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}" +*/ +func (c *DefaultApiService) DeleteMessage(ServiceSid string, ChannelSid string, Sid string, params *DeleteMessageParams) (error) { + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) + if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* * DeleteRole Method for DeleteRole * @param ServiceSid * @param Sid - */ -func (c *DefaultApiService) DeleteRole(ServiceSid string, Sid string) error { - path := "/v2/Services/{ServiceSid}/Roles/{Sid}" +*/ +func (c *DefaultApiService) DeleteRole(ServiceSid string, Sid string, ) (error) { + path := "/v2/Services/{ServiceSid}/Roles/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - return nil + defer resp.Body.Close() + + return nil } /* * DeleteService Method for DeleteService * @param Sid - */ -func (c *DefaultApiService) DeleteService(Sid string) error { - path := "/v2/Services/{Sid}" +*/ +func (c *DefaultApiService) DeleteService(Sid string, ) (error) { + path := "/v2/Services/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* * DeleteUser Method for DeleteUser * @param ServiceSid * @param Sid - */ -func (c *DefaultApiService) DeleteUser(ServiceSid string, Sid string) error { - path := "/v2/Services/{ServiceSid}/Users/{Sid}" +*/ +func (c *DefaultApiService) DeleteUser(ServiceSid string, Sid string, ) (error) { + path := "/v2/Services/{ServiceSid}/Users/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - return nil + defer resp.Body.Close() + + return nil } /* @@ -855,24 +866,26 @@ func (c *DefaultApiService) DeleteUser(ServiceSid string, Sid string) error { * @param ServiceSid * @param UserSid * @param Sid - */ -func (c *DefaultApiService) DeleteUserBinding(ServiceSid string, UserSid string, Sid string) error { - path := "/v2/Services/{ServiceSid}/Users/{UserSid}/Bindings/{Sid}" +*/ +func (c *DefaultApiService) DeleteUserBinding(ServiceSid string, UserSid string, Sid string, ) (error) { + path := "/v2/Services/{ServiceSid}/Users/{UserSid}/Bindings/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"UserSid"+"}", UserSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* @@ -880,24 +893,26 @@ func (c *DefaultApiService) DeleteUserBinding(ServiceSid string, UserSid string, * @param ServiceSid * @param UserSid * @param ChannelSid - */ -func (c *DefaultApiService) DeleteUserChannel(ServiceSid string, UserSid string, ChannelSid string) error { - path := "/v2/Services/{ServiceSid}/Users/{UserSid}/Channels/{ChannelSid}" +*/ +func (c *DefaultApiService) DeleteUserChannel(ServiceSid string, UserSid string, ChannelSid string, ) (error) { + path := "/v2/Services/{ServiceSid}/Users/{UserSid}/Channels/{ChannelSid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"UserSid"+"}", UserSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* @@ -905,28 +920,30 @@ func (c *DefaultApiService) DeleteUserChannel(ServiceSid string, UserSid string, * @param ServiceSid * @param Sid * @return IpMessagingV2ServiceBinding - */ -func (c *DefaultApiService) FetchBinding(ServiceSid string, Sid string) (*IpMessagingV2ServiceBinding, error) { - path := "/v2/Services/{ServiceSid}/Bindings/{Sid}" +*/ +func (c *DefaultApiService) FetchBinding(ServiceSid string, Sid string, ) (*IpMessagingV2ServiceBinding, error) { + path := "/v2/Services/{ServiceSid}/Bindings/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &IpMessagingV2ServiceBinding{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err + defer resp.Body.Close() + + ps := &IpMessagingV2ServiceBinding{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -934,28 +951,30 @@ func (c *DefaultApiService) FetchBinding(ServiceSid string, Sid string) (*IpMess * @param ServiceSid * @param Sid * @return IpMessagingV2ServiceChannel - */ -func (c *DefaultApiService) FetchChannel(ServiceSid string, Sid string) (*IpMessagingV2ServiceChannel, error) { - path := "/v2/Services/{ServiceSid}/Channels/{Sid}" +*/ +func (c *DefaultApiService) FetchChannel(ServiceSid string, Sid string, ) (*IpMessagingV2ServiceChannel, error) { + path := "/v2/Services/{ServiceSid}/Channels/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &IpMessagingV2ServiceChannel{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err + defer resp.Body.Close() + + ps := &IpMessagingV2ServiceChannel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -964,56 +983,60 @@ func (c *DefaultApiService) FetchChannel(ServiceSid string, Sid string) (*IpMess * @param ChannelSid * @param Sid * @return IpMessagingV2ServiceChannelChannelWebhook - */ -func (c *DefaultApiService) FetchChannelWebhook(ServiceSid string, ChannelSid string, Sid string) (*IpMessagingV2ServiceChannelChannelWebhook, error) { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks/{Sid}" +*/ +func (c *DefaultApiService) FetchChannelWebhook(ServiceSid string, ChannelSid string, Sid string, ) (*IpMessagingV2ServiceChannelChannelWebhook, error) { + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &IpMessagingV2ServiceChannelChannelWebhook{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err + defer resp.Body.Close() + + ps := &IpMessagingV2ServiceChannelChannelWebhook{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* * FetchCredential Method for FetchCredential * @param Sid * @return IpMessagingV2Credential - */ -func (c *DefaultApiService) FetchCredential(Sid string) (*IpMessagingV2Credential, error) { - path := "/v2/Credentials/{Sid}" +*/ +func (c *DefaultApiService) FetchCredential(Sid string, ) (*IpMessagingV2Credential, error) { + path := "/v2/Credentials/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &IpMessagingV2Credential{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &IpMessagingV2Credential{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -1022,29 +1045,31 @@ func (c *DefaultApiService) FetchCredential(Sid string) (*IpMessagingV2Credentia * @param ChannelSid * @param Sid * @return IpMessagingV2ServiceChannelInvite - */ -func (c *DefaultApiService) FetchInvite(ServiceSid string, ChannelSid string, Sid string) (*IpMessagingV2ServiceChannelInvite, error) { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Invites/{Sid}" +*/ +func (c *DefaultApiService) FetchInvite(ServiceSid string, ChannelSid string, Sid string, ) (*IpMessagingV2ServiceChannelInvite, error) { + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Invites/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &IpMessagingV2ServiceChannelInvite{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &IpMessagingV2ServiceChannelInvite{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -1053,29 +1078,31 @@ func (c *DefaultApiService) FetchInvite(ServiceSid string, ChannelSid string, Si * @param ChannelSid * @param Sid * @return IpMessagingV2ServiceChannelMember - */ -func (c *DefaultApiService) FetchMember(ServiceSid string, ChannelSid string, Sid string) (*IpMessagingV2ServiceChannelMember, error) { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}" +*/ +func (c *DefaultApiService) FetchMember(ServiceSid string, ChannelSid string, Sid string, ) (*IpMessagingV2ServiceChannelMember, error) { + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &IpMessagingV2ServiceChannelMember{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &IpMessagingV2ServiceChannelMember{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -1084,29 +1111,31 @@ func (c *DefaultApiService) FetchMember(ServiceSid string, ChannelSid string, Si * @param ChannelSid * @param Sid * @return IpMessagingV2ServiceChannelMessage - */ -func (c *DefaultApiService) FetchMessage(ServiceSid string, ChannelSid string, Sid string) (*IpMessagingV2ServiceChannelMessage, error) { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}" +*/ +func (c *DefaultApiService) FetchMessage(ServiceSid string, ChannelSid string, Sid string, ) (*IpMessagingV2ServiceChannelMessage, error) { + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &IpMessagingV2ServiceChannelMessage{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &IpMessagingV2ServiceChannelMessage{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -1114,55 +1143,59 @@ func (c *DefaultApiService) FetchMessage(ServiceSid string, ChannelSid string, S * @param ServiceSid * @param Sid * @return IpMessagingV2ServiceRole - */ -func (c *DefaultApiService) FetchRole(ServiceSid string, Sid string) (*IpMessagingV2ServiceRole, error) { - path := "/v2/Services/{ServiceSid}/Roles/{Sid}" +*/ +func (c *DefaultApiService) FetchRole(ServiceSid string, Sid string, ) (*IpMessagingV2ServiceRole, error) { + path := "/v2/Services/{ServiceSid}/Roles/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &IpMessagingV2ServiceRole{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &IpMessagingV2ServiceRole{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * FetchService Method for FetchService * @param Sid * @return IpMessagingV2Service - */ -func (c *DefaultApiService) FetchService(Sid string) (*IpMessagingV2Service, error) { - path := "/v2/Services/{Sid}" +*/ +func (c *DefaultApiService) FetchService(Sid string, ) (*IpMessagingV2Service, error) { + path := "/v2/Services/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &IpMessagingV2Service{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &IpMessagingV2Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -1170,28 +1203,30 @@ func (c *DefaultApiService) FetchService(Sid string) (*IpMessagingV2Service, err * @param ServiceSid * @param Sid * @return IpMessagingV2ServiceUser - */ -func (c *DefaultApiService) FetchUser(ServiceSid string, Sid string) (*IpMessagingV2ServiceUser, error) { - path := "/v2/Services/{ServiceSid}/Users/{Sid}" +*/ +func (c *DefaultApiService) FetchUser(ServiceSid string, Sid string, ) (*IpMessagingV2ServiceUser, error) { + path := "/v2/Services/{ServiceSid}/Users/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &IpMessagingV2ServiceUser{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &IpMessagingV2ServiceUser{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -1200,29 +1235,31 @@ func (c *DefaultApiService) FetchUser(ServiceSid string, Sid string) (*IpMessagi * @param UserSid * @param Sid * @return IpMessagingV2ServiceUserUserBinding - */ -func (c *DefaultApiService) FetchUserBinding(ServiceSid string, UserSid string, Sid string) (*IpMessagingV2ServiceUserUserBinding, error) { - path := "/v2/Services/{ServiceSid}/Users/{UserSid}/Bindings/{Sid}" +*/ +func (c *DefaultApiService) FetchUserBinding(ServiceSid string, UserSid string, Sid string, ) (*IpMessagingV2ServiceUserUserBinding, error) { + path := "/v2/Services/{ServiceSid}/Users/{UserSid}/Bindings/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"UserSid"+"}", UserSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &IpMessagingV2ServiceUserUserBinding{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &IpMessagingV2ServiceUserUserBinding{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -1231,122 +1268,123 @@ func (c *DefaultApiService) FetchUserBinding(ServiceSid string, UserSid string, * @param UserSid * @param ChannelSid * @return IpMessagingV2ServiceUserUserChannel - */ -func (c *DefaultApiService) FetchUserChannel(ServiceSid string, UserSid string, ChannelSid string) (*IpMessagingV2ServiceUserUserChannel, error) { - path := "/v2/Services/{ServiceSid}/Users/{UserSid}/Channels/{ChannelSid}" +*/ +func (c *DefaultApiService) FetchUserChannel(ServiceSid string, UserSid string, ChannelSid string, ) (*IpMessagingV2ServiceUserUserChannel, error) { + path := "/v2/Services/{ServiceSid}/Users/{UserSid}/Channels/{ChannelSid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"UserSid"+"}", UserSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &IpMessagingV2ServiceUserUserChannel{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err -} + defer resp.Body.Close() + ps := &IpMessagingV2ServiceUserUserChannel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} // ListBindingParams Optional parameters for the method 'ListBinding' type ListBindingParams struct { BindingType *[]string `json:"BindingType,omitempty"` - Identity *[]string `json:"Identity,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + Identity *[]string `json:"Identity,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* * ListBinding Method for ListBinding * @param ServiceSid * @param optional nil or *ListBindingParams - Optional Parameters: -* @param "BindingType" ([]string) - -* @param "Identity" ([]string) - +* @param "BindingType" ([]string) - +* @param "Identity" ([]string) - * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListBindingResponse - */ +*/ func (c *DefaultApiService) ListBinding(ServiceSid string, params *ListBindingParams) (*ListBindingResponse, error) { - path := "/v2/Services/{ServiceSid}/Bindings" + path := "/v2/Services/{ServiceSid}/Bindings" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.BindingType != nil { - data.Set("BindingType", strings.Join(*params.BindingType, ",")) - } - if params != nil && params.Identity != nil { - data.Set("Identity", strings.Join(*params.Identity, ",")) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.BindingType != nil { + data.Set("BindingType", strings.Join(*params.BindingType, ",")) +} + if params != nil && params.Identity != nil { + data.Set("Identity", strings.Join(*params.Identity, ",")) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListBindingResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListBindingResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListChannelParams Optional parameters for the method 'ListChannel' type ListChannelParams struct { - Type *[]string `json:"Type,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + Type *[]string `json:"Type,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* * ListChannel Method for ListChannel * @param ServiceSid * @param optional nil or *ListChannelParams - Optional Parameters: -* @param "Type" ([]string) - +* @param "Type" ([]string) - * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListChannelResponse - */ +*/ func (c *DefaultApiService) ListChannel(ServiceSid string, params *ListChannelParams) (*ListChannelResponse, error) { - path := "/v2/Services/{ServiceSid}/Channels" + path := "/v2/Services/{ServiceSid}/Channels" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Type != nil { - data.Set("Type", strings.Join(*params.Type, ",")) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.Type != nil { + data.Set("Type", strings.Join(*params.Type, ",")) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListChannelResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListChannelResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListChannelWebhookParams Optional parameters for the method 'ListChannelWebhook' type ListChannelWebhookParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1359,34 +1397,34 @@ type ListChannelWebhookParams struct { * @param optional nil or *ListChannelWebhookParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListChannelWebhookResponse - */ +*/ func (c *DefaultApiService) ListChannelWebhook(ServiceSid string, ChannelSid string, params *ListChannelWebhookParams) (*ListChannelWebhookResponse, error) { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks" + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListChannelWebhookResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListChannelWebhookResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListCredentialParams Optional parameters for the method 'ListCredential' type ListCredentialParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1397,36 +1435,36 @@ type ListCredentialParams struct { * @param optional nil or *ListCredentialParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListCredentialResponse - */ +*/ func (c *DefaultApiService) ListCredential(params *ListCredentialParams) (*ListCredentialResponse, error) { - path := "/v2/Credentials" + path := "/v2/Credentials" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListCredentialResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListCredentialResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListInviteParams Optional parameters for the method 'ListInvite' type ListInviteParams struct { Identity *[]string `json:"Identity,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -1434,44 +1472,44 @@ type ListInviteParams struct { * @param ServiceSid * @param ChannelSid * @param optional nil or *ListInviteParams - Optional Parameters: -* @param "Identity" ([]string) - +* @param "Identity" ([]string) - * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListInviteResponse - */ +*/ func (c *DefaultApiService) ListInvite(ServiceSid string, ChannelSid string, params *ListInviteParams) (*ListInviteResponse, error) { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Invites" + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Invites" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Identity != nil { - data.Set("Identity", strings.Join(*params.Identity, ",")) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.Identity != nil { + data.Set("Identity", strings.Join(*params.Identity, ",")) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListInviteResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListInviteResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListMemberParams Optional parameters for the method 'ListMember' type ListMemberParams struct { Identity *[]string `json:"Identity,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -1479,44 +1517,44 @@ type ListMemberParams struct { * @param ServiceSid * @param ChannelSid * @param optional nil or *ListMemberParams - Optional Parameters: -* @param "Identity" ([]string) - +* @param "Identity" ([]string) - * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListMemberResponse - */ +*/ func (c *DefaultApiService) ListMember(ServiceSid string, ChannelSid string, params *ListMemberParams) (*ListMemberResponse, error) { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members" + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Identity != nil { - data.Set("Identity", strings.Join(*params.Identity, ",")) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.Identity != nil { + data.Set("Identity", strings.Join(*params.Identity, ",")) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListMemberResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListMemberResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListMessageParams Optional parameters for the method 'ListMessage' type ListMessageParams struct { - Order *string `json:"Order,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + Order *string `json:"Order,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -1524,40 +1562,40 @@ type ListMessageParams struct { * @param ServiceSid * @param ChannelSid * @param optional nil or *ListMessageParams - Optional Parameters: -* @param "Order" (string) - +* @param "Order" (string) - * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListMessageResponse - */ +*/ func (c *DefaultApiService) ListMessage(ServiceSid string, ChannelSid string, params *ListMessageParams) (*ListMessageResponse, error) { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages" + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Order != nil { - data.Set("Order", *params.Order) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.Order != nil { + data.Set("Order", *params.Order) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListMessageResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListMessageResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListRoleParams Optional parameters for the method 'ListRole' type ListRoleParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1569,33 +1607,33 @@ type ListRoleParams struct { * @param optional nil or *ListRoleParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListRoleResponse - */ +*/ func (c *DefaultApiService) ListRole(ServiceSid string, params *ListRoleParams) (*ListRoleResponse, error) { - path := "/v2/Services/{ServiceSid}/Roles" + path := "/v2/Services/{ServiceSid}/Roles" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListRoleResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListRoleResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListServiceParams Optional parameters for the method 'ListService' type ListServiceParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1606,32 +1644,32 @@ type ListServiceParams struct { * @param optional nil or *ListServiceParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListServiceResponse - */ +*/ func (c *DefaultApiService) ListService(params *ListServiceParams) (*ListServiceResponse, error) { - path := "/v2/Services" + path := "/v2/Services" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListServiceResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListServiceResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListUserParams Optional parameters for the method 'ListUser' type ListUserParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1643,37 +1681,37 @@ type ListUserParams struct { * @param optional nil or *ListUserParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListUserResponse - */ +*/ func (c *DefaultApiService) ListUser(ServiceSid string, params *ListUserParams) (*ListUserResponse, error) { - path := "/v2/Services/{ServiceSid}/Users" + path := "/v2/Services/{ServiceSid}/Users" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListUserResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListUserResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListUserBindingParams Optional parameters for the method 'ListUserBinding' type ListUserBindingParams struct { BindingType *[]string `json:"BindingType,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -1681,40 +1719,40 @@ type ListUserBindingParams struct { * @param ServiceSid * @param UserSid * @param optional nil or *ListUserBindingParams - Optional Parameters: -* @param "BindingType" ([]string) - +* @param "BindingType" ([]string) - * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListUserBindingResponse - */ +*/ func (c *DefaultApiService) ListUserBinding(ServiceSid string, UserSid string, params *ListUserBindingParams) (*ListUserBindingResponse, error) { - path := "/v2/Services/{ServiceSid}/Users/{UserSid}/Bindings" + path := "/v2/Services/{ServiceSid}/Users/{UserSid}/Bindings" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"UserSid"+"}", UserSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.BindingType != nil { - data.Set("BindingType", strings.Join(*params.BindingType, ",")) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.BindingType != nil { + data.Set("BindingType", strings.Join(*params.BindingType, ",")) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListUserBindingResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListUserBindingResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListUserChannelParams Optional parameters for the method 'ListUserChannel' type ListUserChannelParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1727,43 +1765,43 @@ type ListUserChannelParams struct { * @param optional nil or *ListUserChannelParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListUserChannelResponse - */ +*/ func (c *DefaultApiService) ListUserChannel(ServiceSid string, UserSid string, params *ListUserChannelParams) (*ListUserChannelResponse, error) { - path := "/v2/Services/{ServiceSid}/Users/{UserSid}/Channels" + path := "/v2/Services/{ServiceSid}/Users/{UserSid}/Channels" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"UserSid"+"}", UserSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListUserChannelResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListUserChannelResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateChannelParams Optional parameters for the method 'UpdateChannel' type UpdateChannelParams struct { - XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - CreatedBy *string `json:"CreatedBy,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + CreatedBy *string `json:"CreatedBy,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` } /* @@ -1772,68 +1810,67 @@ type UpdateChannelParams struct { * @param Sid * @param optional nil or *UpdateChannelParams - Optional Parameters: * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header -* @param "Attributes" (string) - -* @param "CreatedBy" (string) - -* @param "DateCreated" (time.Time) - -* @param "DateUpdated" (time.Time) - -* @param "FriendlyName" (string) - -* @param "UniqueName" (string) - +* @param "Attributes" (string) - +* @param "CreatedBy" (string) - +* @param "DateCreated" (time.Time) - +* @param "DateUpdated" (time.Time) - +* @param "FriendlyName" (string) - +* @param "UniqueName" (string) - * @return IpMessagingV2ServiceChannel - */ +*/ func (c *DefaultApiService) UpdateChannel(ServiceSid string, Sid string, params *UpdateChannelParams) (*IpMessagingV2ServiceChannel, error) { - path := "/v2/Services/{ServiceSid}/Channels/{Sid}" + path := "/v2/Services/{ServiceSid}/Channels/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) - } - if params != nil && params.CreatedBy != nil { - data.Set("CreatedBy", *params.CreatedBy) - } - if params != nil && params.DateCreated != nil { - data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) - } - if params != nil && params.DateUpdated != nil { - data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) - } + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) +} + if params != nil && params.CreatedBy != nil { + data.Set("CreatedBy", *params.CreatedBy) +} + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) +} + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) +} if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &IpMessagingV2ServiceChannel{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &IpMessagingV2ServiceChannel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } - // UpdateChannelWebhookParams Optional parameters for the method 'UpdateChannelWebhook' type UpdateChannelWebhookParams struct { - ConfigurationFilters *[]string `json:"Configuration.Filters,omitempty"` - ConfigurationFlowSid *string `json:"Configuration.FlowSid,omitempty"` - ConfigurationMethod *string `json:"Configuration.Method,omitempty"` - ConfigurationRetryCount *int32 `json:"Configuration.RetryCount,omitempty"` - ConfigurationTriggers *[]string `json:"Configuration.Triggers,omitempty"` - ConfigurationUrl *string `json:"Configuration.Url,omitempty"` + ConfigurationFilters *[]string `json:"Configuration.Filters,omitempty"` + ConfigurationFlowSid *string `json:"Configuration.FlowSid,omitempty"` + ConfigurationMethod *string `json:"Configuration.Method,omitempty"` + ConfigurationRetryCount *int32 `json:"Configuration.RetryCount,omitempty"` + ConfigurationTriggers *[]string `json:"Configuration.Triggers,omitempty"` + ConfigurationUrl *string `json:"Configuration.Url,omitempty"` } /* @@ -1842,129 +1879,129 @@ type UpdateChannelWebhookParams struct { * @param ChannelSid * @param Sid * @param optional nil or *UpdateChannelWebhookParams - Optional Parameters: -* @param "ConfigurationFilters" ([]string) - -* @param "ConfigurationFlowSid" (string) - -* @param "ConfigurationMethod" (string) - -* @param "ConfigurationRetryCount" (int32) - -* @param "ConfigurationTriggers" ([]string) - -* @param "ConfigurationUrl" (string) - +* @param "ConfigurationFilters" ([]string) - +* @param "ConfigurationFlowSid" (string) - +* @param "ConfigurationMethod" (string) - +* @param "ConfigurationRetryCount" (int32) - +* @param "ConfigurationTriggers" ([]string) - +* @param "ConfigurationUrl" (string) - * @return IpMessagingV2ServiceChannelChannelWebhook - */ +*/ func (c *DefaultApiService) UpdateChannelWebhook(ServiceSid string, ChannelSid string, Sid string, params *UpdateChannelWebhookParams) (*IpMessagingV2ServiceChannelChannelWebhook, error) { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks/{Sid}" + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.ConfigurationFilters != nil { - data.Set("ConfigurationFilters", strings.Join(*params.ConfigurationFilters, ",")) - } - if params != nil && params.ConfigurationFlowSid != nil { - data.Set("ConfigurationFlowSid", *params.ConfigurationFlowSid) - } - if params != nil && params.ConfigurationMethod != nil { - data.Set("ConfigurationMethod", *params.ConfigurationMethod) - } - if params != nil && params.ConfigurationRetryCount != nil { - data.Set("ConfigurationRetryCount", fmt.Sprint(*params.ConfigurationRetryCount)) - } - if params != nil && params.ConfigurationTriggers != nil { - data.Set("ConfigurationTriggers", strings.Join(*params.ConfigurationTriggers, ",")) - } - if params != nil && params.ConfigurationUrl != nil { - data.Set("ConfigurationUrl", *params.ConfigurationUrl) - } + if params != nil && params.ConfigurationFilters != nil { + data.Set("ConfigurationFilters", strings.Join(*params.ConfigurationFilters, ",")) +} + if params != nil && params.ConfigurationFlowSid != nil { + data.Set("ConfigurationFlowSid", *params.ConfigurationFlowSid) +} + if params != nil && params.ConfigurationMethod != nil { + data.Set("ConfigurationMethod", *params.ConfigurationMethod) +} + if params != nil && params.ConfigurationRetryCount != nil { + data.Set("ConfigurationRetryCount", fmt.Sprint(*params.ConfigurationRetryCount)) +} + if params != nil && params.ConfigurationTriggers != nil { + data.Set("ConfigurationTriggers", strings.Join(*params.ConfigurationTriggers, ",")) +} + if params != nil && params.ConfigurationUrl != nil { + data.Set("ConfigurationUrl", *params.ConfigurationUrl) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &IpMessagingV2ServiceChannelChannelWebhook{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &IpMessagingV2ServiceChannelChannelWebhook{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateCredentialParams Optional parameters for the method 'UpdateCredential' type UpdateCredentialParams struct { - ApiKey *string `json:"ApiKey,omitempty"` - Certificate *string `json:"Certificate,omitempty"` + ApiKey *string `json:"ApiKey,omitempty"` + Certificate *string `json:"Certificate,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` - PrivateKey *string `json:"PrivateKey,omitempty"` - Sandbox *bool `json:"Sandbox,omitempty"` - Secret *string `json:"Secret,omitempty"` + PrivateKey *string `json:"PrivateKey,omitempty"` + Sandbox *bool `json:"Sandbox,omitempty"` + Secret *string `json:"Secret,omitempty"` } /* * UpdateCredential Method for UpdateCredential * @param Sid * @param optional nil or *UpdateCredentialParams - Optional Parameters: -* @param "ApiKey" (string) - -* @param "Certificate" (string) - -* @param "FriendlyName" (string) - -* @param "PrivateKey" (string) - -* @param "Sandbox" (bool) - -* @param "Secret" (string) - +* @param "ApiKey" (string) - +* @param "Certificate" (string) - +* @param "FriendlyName" (string) - +* @param "PrivateKey" (string) - +* @param "Sandbox" (bool) - +* @param "Secret" (string) - * @return IpMessagingV2Credential - */ +*/ func (c *DefaultApiService) UpdateCredential(Sid string, params *UpdateCredentialParams) (*IpMessagingV2Credential, error) { - path := "/v2/Credentials/{Sid}" + path := "/v2/Credentials/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.ApiKey != nil { - data.Set("ApiKey", *params.ApiKey) - } - if params != nil && params.Certificate != nil { - data.Set("Certificate", *params.Certificate) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.PrivateKey != nil { - data.Set("PrivateKey", *params.PrivateKey) - } - if params != nil && params.Sandbox != nil { - data.Set("Sandbox", fmt.Sprint(*params.Sandbox)) - } - if params != nil && params.Secret != nil { - data.Set("Secret", *params.Secret) - } + if params != nil && params.ApiKey != nil { + data.Set("ApiKey", *params.ApiKey) +} + if params != nil && params.Certificate != nil { + data.Set("Certificate", *params.Certificate) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.PrivateKey != nil { + data.Set("PrivateKey", *params.PrivateKey) +} + if params != nil && params.Sandbox != nil { + data.Set("Sandbox", fmt.Sprint(*params.Sandbox)) +} + if params != nil && params.Secret != nil { + data.Set("Secret", *params.Secret) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &IpMessagingV2Credential{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &IpMessagingV2Credential{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateMemberParams Optional parameters for the method 'UpdateMember' type UpdateMemberParams struct { - XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` LastConsumptionTimestamp *time.Time `json:"LastConsumptionTimestamp,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` } /* @@ -1974,70 +2011,69 @@ type UpdateMemberParams struct { * @param Sid * @param optional nil or *UpdateMemberParams - Optional Parameters: * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header -* @param "Attributes" (string) - -* @param "DateCreated" (time.Time) - -* @param "DateUpdated" (time.Time) - -* @param "LastConsumedMessageIndex" (*int32) - -* @param "LastConsumptionTimestamp" (time.Time) - -* @param "RoleSid" (string) - +* @param "Attributes" (string) - +* @param "DateCreated" (time.Time) - +* @param "DateUpdated" (time.Time) - +* @param "LastConsumedMessageIndex" (*int32) - +* @param "LastConsumptionTimestamp" (time.Time) - +* @param "RoleSid" (string) - * @return IpMessagingV2ServiceChannelMember - */ +*/ func (c *DefaultApiService) UpdateMember(ServiceSid string, ChannelSid string, Sid string, params *UpdateMemberParams) (*IpMessagingV2ServiceChannelMember, error) { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}" + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) - } - if params != nil && params.DateCreated != nil { - data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) - } - if params != nil && params.DateUpdated != nil { - data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) - } - if params != nil && params.LastConsumedMessageIndex != nil { - data.Set("LastConsumedMessageIndex", fmt.Sprint(*params.LastConsumedMessageIndex)) - } - if params != nil && params.LastConsumptionTimestamp != nil { - data.Set("LastConsumptionTimestamp", fmt.Sprint(*params.LastConsumptionTimestamp)) - } - if params != nil && params.RoleSid != nil { - data.Set("RoleSid", *params.RoleSid) - } + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) +} + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) +} + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) +} + if params != nil && params.LastConsumedMessageIndex != nil { + data.Set("LastConsumedMessageIndex", fmt.Sprint(*params.LastConsumedMessageIndex)) +} + if params != nil && params.LastConsumptionTimestamp != nil { + data.Set("LastConsumptionTimestamp", fmt.Sprint(*params.LastConsumptionTimestamp)) +} + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) +} if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &IpMessagingV2ServiceChannelMember{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &IpMessagingV2ServiceChannelMember{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } - // UpdateMessageParams Optional parameters for the method 'UpdateMessage' type UpdateMessageParams struct { - XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - Body *string `json:"Body,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - From *string `json:"From,omitempty"` - LastUpdatedBy *string `json:"LastUpdatedBy,omitempty"` + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + Body *string `json:"Body,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + From *string `json:"From,omitempty"` + LastUpdatedBy *string `json:"LastUpdatedBy,omitempty"` } /* @@ -2047,61 +2083,60 @@ type UpdateMessageParams struct { * @param Sid * @param optional nil or *UpdateMessageParams - Optional Parameters: * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header -* @param "Attributes" (string) - -* @param "Body" (string) - -* @param "DateCreated" (time.Time) - -* @param "DateUpdated" (time.Time) - -* @param "From" (string) - -* @param "LastUpdatedBy" (string) - +* @param "Attributes" (string) - +* @param "Body" (string) - +* @param "DateCreated" (time.Time) - +* @param "DateUpdated" (time.Time) - +* @param "From" (string) - +* @param "LastUpdatedBy" (string) - * @return IpMessagingV2ServiceChannelMessage - */ +*/ func (c *DefaultApiService) UpdateMessage(ServiceSid string, ChannelSid string, Sid string, params *UpdateMessageParams) (*IpMessagingV2ServiceChannelMessage, error) { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}" + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) - } - if params != nil && params.Body != nil { - data.Set("Body", *params.Body) - } - if params != nil && params.DateCreated != nil { - data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) - } - if params != nil && params.DateUpdated != nil { - data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) - } - if params != nil && params.From != nil { - data.Set("From", *params.From) - } - if params != nil && params.LastUpdatedBy != nil { - data.Set("LastUpdatedBy", *params.LastUpdatedBy) - } + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) +} + if params != nil && params.Body != nil { + data.Set("Body", *params.Body) +} + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) +} + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) +} + if params != nil && params.From != nil { + data.Set("From", *params.From) +} + if params != nil && params.LastUpdatedBy != nil { + data.Set("LastUpdatedBy", *params.LastUpdatedBy) +} if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &IpMessagingV2ServiceChannelMessage{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &IpMessagingV2ServiceChannelMessage{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } - // UpdateRoleParams Optional parameters for the method 'UpdateRole' type UpdateRoleParams struct { Permission *[]string `json:"Permission,omitempty"` @@ -2112,230 +2147,230 @@ type UpdateRoleParams struct { * @param ServiceSid * @param Sid * @param optional nil or *UpdateRoleParams - Optional Parameters: -* @param "Permission" ([]string) - +* @param "Permission" ([]string) - * @return IpMessagingV2ServiceRole - */ +*/ func (c *DefaultApiService) UpdateRole(ServiceSid string, Sid string, params *UpdateRoleParams) (*IpMessagingV2ServiceRole, error) { - path := "/v2/Services/{ServiceSid}/Roles/{Sid}" + path := "/v2/Services/{ServiceSid}/Roles/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Permission != nil { - data.Set("Permission", strings.Join(*params.Permission, ",")) - } + if params != nil && params.Permission != nil { + data.Set("Permission", strings.Join(*params.Permission, ",")) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &IpMessagingV2ServiceRole{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &IpMessagingV2ServiceRole{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateServiceParams Optional parameters for the method 'UpdateService' type UpdateServiceParams struct { - ConsumptionReportInterval *int32 `json:"ConsumptionReportInterval,omitempty"` - DefaultChannelCreatorRoleSid *string `json:"DefaultChannelCreatorRoleSid,omitempty"` - DefaultChannelRoleSid *string `json:"DefaultChannelRoleSid,omitempty"` - DefaultServiceRoleSid *string `json:"DefaultServiceRoleSid,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - LimitsChannelMembers *int32 `json:"Limits.ChannelMembers,omitempty"` - LimitsUserChannels *int32 `json:"Limits.UserChannels,omitempty"` - MediaCompatibilityMessage *string `json:"Media.CompatibilityMessage,omitempty"` - NotificationsAddedToChannelEnabled *bool `json:"Notifications.AddedToChannel.Enabled,omitempty"` - NotificationsAddedToChannelSound *string `json:"Notifications.AddedToChannel.Sound,omitempty"` - NotificationsAddedToChannelTemplate *string `json:"Notifications.AddedToChannel.Template,omitempty"` - NotificationsInvitedToChannelEnabled *bool `json:"Notifications.InvitedToChannel.Enabled,omitempty"` - NotificationsInvitedToChannelSound *string `json:"Notifications.InvitedToChannel.Sound,omitempty"` - NotificationsInvitedToChannelTemplate *string `json:"Notifications.InvitedToChannel.Template,omitempty"` - NotificationsLogEnabled *bool `json:"Notifications.LogEnabled,omitempty"` - NotificationsNewMessageBadgeCountEnabled *bool `json:"Notifications.NewMessage.BadgeCountEnabled,omitempty"` - NotificationsNewMessageEnabled *bool `json:"Notifications.NewMessage.Enabled,omitempty"` - NotificationsNewMessageSound *string `json:"Notifications.NewMessage.Sound,omitempty"` - NotificationsNewMessageTemplate *string `json:"Notifications.NewMessage.Template,omitempty"` - NotificationsRemovedFromChannelEnabled *bool `json:"Notifications.RemovedFromChannel.Enabled,omitempty"` - NotificationsRemovedFromChannelSound *string `json:"Notifications.RemovedFromChannel.Sound,omitempty"` - NotificationsRemovedFromChannelTemplate *string `json:"Notifications.RemovedFromChannel.Template,omitempty"` - PostWebhookRetryCount *int32 `json:"PostWebhookRetryCount,omitempty"` - PostWebhookUrl *string `json:"PostWebhookUrl,omitempty"` - PreWebhookRetryCount *int32 `json:"PreWebhookRetryCount,omitempty"` - PreWebhookUrl *string `json:"PreWebhookUrl,omitempty"` - ReachabilityEnabled *bool `json:"ReachabilityEnabled,omitempty"` - ReadStatusEnabled *bool `json:"ReadStatusEnabled,omitempty"` - TypingIndicatorTimeout *int32 `json:"TypingIndicatorTimeout,omitempty"` - WebhookFilters *[]string `json:"WebhookFilters,omitempty"` - WebhookMethod *string `json:"WebhookMethod,omitempty"` + ConsumptionReportInterval *int32 `json:"ConsumptionReportInterval,omitempty"` + DefaultChannelCreatorRoleSid *string `json:"DefaultChannelCreatorRoleSid,omitempty"` + DefaultChannelRoleSid *string `json:"DefaultChannelRoleSid,omitempty"` + DefaultServiceRoleSid *string `json:"DefaultServiceRoleSid,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + LimitsChannelMembers *int32 `json:"Limits.ChannelMembers,omitempty"` + LimitsUserChannels *int32 `json:"Limits.UserChannels,omitempty"` + MediaCompatibilityMessage *string `json:"Media.CompatibilityMessage,omitempty"` + NotificationsAddedToChannelEnabled *bool `json:"Notifications.AddedToChannel.Enabled,omitempty"` + NotificationsAddedToChannelSound *string `json:"Notifications.AddedToChannel.Sound,omitempty"` + NotificationsAddedToChannelTemplate *string `json:"Notifications.AddedToChannel.Template,omitempty"` + NotificationsInvitedToChannelEnabled *bool `json:"Notifications.InvitedToChannel.Enabled,omitempty"` + NotificationsInvitedToChannelSound *string `json:"Notifications.InvitedToChannel.Sound,omitempty"` + NotificationsInvitedToChannelTemplate *string `json:"Notifications.InvitedToChannel.Template,omitempty"` + NotificationsLogEnabled *bool `json:"Notifications.LogEnabled,omitempty"` + NotificationsNewMessageBadgeCountEnabled *bool `json:"Notifications.NewMessage.BadgeCountEnabled,omitempty"` + NotificationsNewMessageEnabled *bool `json:"Notifications.NewMessage.Enabled,omitempty"` + NotificationsNewMessageSound *string `json:"Notifications.NewMessage.Sound,omitempty"` + NotificationsNewMessageTemplate *string `json:"Notifications.NewMessage.Template,omitempty"` + NotificationsRemovedFromChannelEnabled *bool `json:"Notifications.RemovedFromChannel.Enabled,omitempty"` + NotificationsRemovedFromChannelSound *string `json:"Notifications.RemovedFromChannel.Sound,omitempty"` + NotificationsRemovedFromChannelTemplate *string `json:"Notifications.RemovedFromChannel.Template,omitempty"` + PostWebhookRetryCount *int32 `json:"PostWebhookRetryCount,omitempty"` + PostWebhookUrl *string `json:"PostWebhookUrl,omitempty"` + PreWebhookRetryCount *int32 `json:"PreWebhookRetryCount,omitempty"` + PreWebhookUrl *string `json:"PreWebhookUrl,omitempty"` + ReachabilityEnabled *bool `json:"ReachabilityEnabled,omitempty"` + ReadStatusEnabled *bool `json:"ReadStatusEnabled,omitempty"` + TypingIndicatorTimeout *int32 `json:"TypingIndicatorTimeout,omitempty"` + WebhookFilters *[]string `json:"WebhookFilters,omitempty"` + WebhookMethod *string `json:"WebhookMethod,omitempty"` } /* * UpdateService Method for UpdateService * @param Sid * @param optional nil or *UpdateServiceParams - Optional Parameters: -* @param "ConsumptionReportInterval" (int32) - -* @param "DefaultChannelCreatorRoleSid" (string) - -* @param "DefaultChannelRoleSid" (string) - -* @param "DefaultServiceRoleSid" (string) - -* @param "FriendlyName" (string) - -* @param "LimitsChannelMembers" (int32) - -* @param "LimitsUserChannels" (int32) - -* @param "MediaCompatibilityMessage" (string) - -* @param "NotificationsAddedToChannelEnabled" (bool) - -* @param "NotificationsAddedToChannelSound" (string) - -* @param "NotificationsAddedToChannelTemplate" (string) - -* @param "NotificationsInvitedToChannelEnabled" (bool) - -* @param "NotificationsInvitedToChannelSound" (string) - -* @param "NotificationsInvitedToChannelTemplate" (string) - -* @param "NotificationsLogEnabled" (bool) - -* @param "NotificationsNewMessageBadgeCountEnabled" (bool) - -* @param "NotificationsNewMessageEnabled" (bool) - -* @param "NotificationsNewMessageSound" (string) - -* @param "NotificationsNewMessageTemplate" (string) - -* @param "NotificationsRemovedFromChannelEnabled" (bool) - -* @param "NotificationsRemovedFromChannelSound" (string) - -* @param "NotificationsRemovedFromChannelTemplate" (string) - -* @param "PostWebhookRetryCount" (int32) - -* @param "PostWebhookUrl" (string) - -* @param "PreWebhookRetryCount" (int32) - -* @param "PreWebhookUrl" (string) - -* @param "ReachabilityEnabled" (bool) - -* @param "ReadStatusEnabled" (bool) - -* @param "TypingIndicatorTimeout" (int32) - -* @param "WebhookFilters" ([]string) - -* @param "WebhookMethod" (string) - +* @param "ConsumptionReportInterval" (int32) - +* @param "DefaultChannelCreatorRoleSid" (string) - +* @param "DefaultChannelRoleSid" (string) - +* @param "DefaultServiceRoleSid" (string) - +* @param "FriendlyName" (string) - +* @param "LimitsChannelMembers" (int32) - +* @param "LimitsUserChannels" (int32) - +* @param "MediaCompatibilityMessage" (string) - +* @param "NotificationsAddedToChannelEnabled" (bool) - +* @param "NotificationsAddedToChannelSound" (string) - +* @param "NotificationsAddedToChannelTemplate" (string) - +* @param "NotificationsInvitedToChannelEnabled" (bool) - +* @param "NotificationsInvitedToChannelSound" (string) - +* @param "NotificationsInvitedToChannelTemplate" (string) - +* @param "NotificationsLogEnabled" (bool) - +* @param "NotificationsNewMessageBadgeCountEnabled" (bool) - +* @param "NotificationsNewMessageEnabled" (bool) - +* @param "NotificationsNewMessageSound" (string) - +* @param "NotificationsNewMessageTemplate" (string) - +* @param "NotificationsRemovedFromChannelEnabled" (bool) - +* @param "NotificationsRemovedFromChannelSound" (string) - +* @param "NotificationsRemovedFromChannelTemplate" (string) - +* @param "PostWebhookRetryCount" (int32) - +* @param "PostWebhookUrl" (string) - +* @param "PreWebhookRetryCount" (int32) - +* @param "PreWebhookUrl" (string) - +* @param "ReachabilityEnabled" (bool) - +* @param "ReadStatusEnabled" (bool) - +* @param "TypingIndicatorTimeout" (int32) - +* @param "WebhookFilters" ([]string) - +* @param "WebhookMethod" (string) - * @return IpMessagingV2Service - */ +*/ func (c *DefaultApiService) UpdateService(Sid string, params *UpdateServiceParams) (*IpMessagingV2Service, error) { - path := "/v2/Services/{Sid}" + path := "/v2/Services/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.ConsumptionReportInterval != nil { - data.Set("ConsumptionReportInterval", fmt.Sprint(*params.ConsumptionReportInterval)) - } - if params != nil && params.DefaultChannelCreatorRoleSid != nil { - data.Set("DefaultChannelCreatorRoleSid", *params.DefaultChannelCreatorRoleSid) - } - if params != nil && params.DefaultChannelRoleSid != nil { - data.Set("DefaultChannelRoleSid", *params.DefaultChannelRoleSid) - } - if params != nil && params.DefaultServiceRoleSid != nil { - data.Set("DefaultServiceRoleSid", *params.DefaultServiceRoleSid) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.LimitsChannelMembers != nil { - data.Set("LimitsChannelMembers", fmt.Sprint(*params.LimitsChannelMembers)) - } - if params != nil && params.LimitsUserChannels != nil { - data.Set("LimitsUserChannels", fmt.Sprint(*params.LimitsUserChannels)) - } - if params != nil && params.MediaCompatibilityMessage != nil { - data.Set("MediaCompatibilityMessage", *params.MediaCompatibilityMessage) - } - if params != nil && params.NotificationsAddedToChannelEnabled != nil { - data.Set("NotificationsAddedToChannelEnabled", fmt.Sprint(*params.NotificationsAddedToChannelEnabled)) - } - if params != nil && params.NotificationsAddedToChannelSound != nil { - data.Set("NotificationsAddedToChannelSound", *params.NotificationsAddedToChannelSound) - } - if params != nil && params.NotificationsAddedToChannelTemplate != nil { - data.Set("NotificationsAddedToChannelTemplate", *params.NotificationsAddedToChannelTemplate) - } - if params != nil && params.NotificationsInvitedToChannelEnabled != nil { - data.Set("NotificationsInvitedToChannelEnabled", fmt.Sprint(*params.NotificationsInvitedToChannelEnabled)) - } - if params != nil && params.NotificationsInvitedToChannelSound != nil { - data.Set("NotificationsInvitedToChannelSound", *params.NotificationsInvitedToChannelSound) - } - if params != nil && params.NotificationsInvitedToChannelTemplate != nil { - data.Set("NotificationsInvitedToChannelTemplate", *params.NotificationsInvitedToChannelTemplate) - } - if params != nil && params.NotificationsLogEnabled != nil { - data.Set("NotificationsLogEnabled", fmt.Sprint(*params.NotificationsLogEnabled)) - } - if params != nil && params.NotificationsNewMessageBadgeCountEnabled != nil { - data.Set("NotificationsNewMessageBadgeCountEnabled", fmt.Sprint(*params.NotificationsNewMessageBadgeCountEnabled)) - } - if params != nil && params.NotificationsNewMessageEnabled != nil { - data.Set("NotificationsNewMessageEnabled", fmt.Sprint(*params.NotificationsNewMessageEnabled)) - } - if params != nil && params.NotificationsNewMessageSound != nil { - data.Set("NotificationsNewMessageSound", *params.NotificationsNewMessageSound) - } - if params != nil && params.NotificationsNewMessageTemplate != nil { - data.Set("NotificationsNewMessageTemplate", *params.NotificationsNewMessageTemplate) - } - if params != nil && params.NotificationsRemovedFromChannelEnabled != nil { - data.Set("NotificationsRemovedFromChannelEnabled", fmt.Sprint(*params.NotificationsRemovedFromChannelEnabled)) - } - if params != nil && params.NotificationsRemovedFromChannelSound != nil { - data.Set("NotificationsRemovedFromChannelSound", *params.NotificationsRemovedFromChannelSound) - } - if params != nil && params.NotificationsRemovedFromChannelTemplate != nil { - data.Set("NotificationsRemovedFromChannelTemplate", *params.NotificationsRemovedFromChannelTemplate) - } - if params != nil && params.PostWebhookRetryCount != nil { - data.Set("PostWebhookRetryCount", fmt.Sprint(*params.PostWebhookRetryCount)) - } - if params != nil && params.PostWebhookUrl != nil { - data.Set("PostWebhookUrl", *params.PostWebhookUrl) - } - if params != nil && params.PreWebhookRetryCount != nil { - data.Set("PreWebhookRetryCount", fmt.Sprint(*params.PreWebhookRetryCount)) - } - if params != nil && params.PreWebhookUrl != nil { - data.Set("PreWebhookUrl", *params.PreWebhookUrl) - } - if params != nil && params.ReachabilityEnabled != nil { - data.Set("ReachabilityEnabled", fmt.Sprint(*params.ReachabilityEnabled)) - } - if params != nil && params.ReadStatusEnabled != nil { - data.Set("ReadStatusEnabled", fmt.Sprint(*params.ReadStatusEnabled)) - } - if params != nil && params.TypingIndicatorTimeout != nil { - data.Set("TypingIndicatorTimeout", fmt.Sprint(*params.TypingIndicatorTimeout)) - } - if params != nil && params.WebhookFilters != nil { - data.Set("WebhookFilters", strings.Join(*params.WebhookFilters, ",")) - } - if params != nil && params.WebhookMethod != nil { - data.Set("WebhookMethod", *params.WebhookMethod) - } + if params != nil && params.ConsumptionReportInterval != nil { + data.Set("ConsumptionReportInterval", fmt.Sprint(*params.ConsumptionReportInterval)) +} + if params != nil && params.DefaultChannelCreatorRoleSid != nil { + data.Set("DefaultChannelCreatorRoleSid", *params.DefaultChannelCreatorRoleSid) +} + if params != nil && params.DefaultChannelRoleSid != nil { + data.Set("DefaultChannelRoleSid", *params.DefaultChannelRoleSid) +} + if params != nil && params.DefaultServiceRoleSid != nil { + data.Set("DefaultServiceRoleSid", *params.DefaultServiceRoleSid) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.LimitsChannelMembers != nil { + data.Set("LimitsChannelMembers", fmt.Sprint(*params.LimitsChannelMembers)) +} + if params != nil && params.LimitsUserChannels != nil { + data.Set("LimitsUserChannels", fmt.Sprint(*params.LimitsUserChannels)) +} + if params != nil && params.MediaCompatibilityMessage != nil { + data.Set("MediaCompatibilityMessage", *params.MediaCompatibilityMessage) +} + if params != nil && params.NotificationsAddedToChannelEnabled != nil { + data.Set("NotificationsAddedToChannelEnabled", fmt.Sprint(*params.NotificationsAddedToChannelEnabled)) +} + if params != nil && params.NotificationsAddedToChannelSound != nil { + data.Set("NotificationsAddedToChannelSound", *params.NotificationsAddedToChannelSound) +} + if params != nil && params.NotificationsAddedToChannelTemplate != nil { + data.Set("NotificationsAddedToChannelTemplate", *params.NotificationsAddedToChannelTemplate) +} + if params != nil && params.NotificationsInvitedToChannelEnabled != nil { + data.Set("NotificationsInvitedToChannelEnabled", fmt.Sprint(*params.NotificationsInvitedToChannelEnabled)) +} + if params != nil && params.NotificationsInvitedToChannelSound != nil { + data.Set("NotificationsInvitedToChannelSound", *params.NotificationsInvitedToChannelSound) +} + if params != nil && params.NotificationsInvitedToChannelTemplate != nil { + data.Set("NotificationsInvitedToChannelTemplate", *params.NotificationsInvitedToChannelTemplate) +} + if params != nil && params.NotificationsLogEnabled != nil { + data.Set("NotificationsLogEnabled", fmt.Sprint(*params.NotificationsLogEnabled)) +} + if params != nil && params.NotificationsNewMessageBadgeCountEnabled != nil { + data.Set("NotificationsNewMessageBadgeCountEnabled", fmt.Sprint(*params.NotificationsNewMessageBadgeCountEnabled)) +} + if params != nil && params.NotificationsNewMessageEnabled != nil { + data.Set("NotificationsNewMessageEnabled", fmt.Sprint(*params.NotificationsNewMessageEnabled)) +} + if params != nil && params.NotificationsNewMessageSound != nil { + data.Set("NotificationsNewMessageSound", *params.NotificationsNewMessageSound) +} + if params != nil && params.NotificationsNewMessageTemplate != nil { + data.Set("NotificationsNewMessageTemplate", *params.NotificationsNewMessageTemplate) +} + if params != nil && params.NotificationsRemovedFromChannelEnabled != nil { + data.Set("NotificationsRemovedFromChannelEnabled", fmt.Sprint(*params.NotificationsRemovedFromChannelEnabled)) +} + if params != nil && params.NotificationsRemovedFromChannelSound != nil { + data.Set("NotificationsRemovedFromChannelSound", *params.NotificationsRemovedFromChannelSound) +} + if params != nil && params.NotificationsRemovedFromChannelTemplate != nil { + data.Set("NotificationsRemovedFromChannelTemplate", *params.NotificationsRemovedFromChannelTemplate) +} + if params != nil && params.PostWebhookRetryCount != nil { + data.Set("PostWebhookRetryCount", fmt.Sprint(*params.PostWebhookRetryCount)) +} + if params != nil && params.PostWebhookUrl != nil { + data.Set("PostWebhookUrl", *params.PostWebhookUrl) +} + if params != nil && params.PreWebhookRetryCount != nil { + data.Set("PreWebhookRetryCount", fmt.Sprint(*params.PreWebhookRetryCount)) +} + if params != nil && params.PreWebhookUrl != nil { + data.Set("PreWebhookUrl", *params.PreWebhookUrl) +} + if params != nil && params.ReachabilityEnabled != nil { + data.Set("ReachabilityEnabled", fmt.Sprint(*params.ReachabilityEnabled)) +} + if params != nil && params.ReadStatusEnabled != nil { + data.Set("ReadStatusEnabled", fmt.Sprint(*params.ReadStatusEnabled)) +} + if params != nil && params.TypingIndicatorTimeout != nil { + data.Set("TypingIndicatorTimeout", fmt.Sprint(*params.TypingIndicatorTimeout)) +} + if params != nil && params.WebhookFilters != nil { + data.Set("WebhookFilters", strings.Join(*params.WebhookFilters, ",")) +} + if params != nil && params.WebhookMethod != nil { + data.Set("WebhookMethod", *params.WebhookMethod) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &IpMessagingV2Service{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &IpMessagingV2Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateUserParams Optional parameters for the method 'UpdateUser' type UpdateUserParams struct { XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` } /* @@ -2344,53 +2379,52 @@ type UpdateUserParams struct { * @param Sid * @param optional nil or *UpdateUserParams - Optional Parameters: * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header -* @param "Attributes" (string) - -* @param "FriendlyName" (string) - -* @param "RoleSid" (string) - +* @param "Attributes" (string) - +* @param "FriendlyName" (string) - +* @param "RoleSid" (string) - * @return IpMessagingV2ServiceUser - */ +*/ func (c *DefaultApiService) UpdateUser(ServiceSid string, Sid string, params *UpdateUserParams) (*IpMessagingV2ServiceUser, error) { - path := "/v2/Services/{ServiceSid}/Users/{Sid}" + path := "/v2/Services/{ServiceSid}/Users/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.RoleSid != nil { - data.Set("RoleSid", *params.RoleSid) - } + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) +} if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &IpMessagingV2ServiceUser{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &IpMessagingV2ServiceUser{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } - // UpdateUserChannelParams Optional parameters for the method 'UpdateUserChannel' type UpdateUserChannelParams struct { - LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` + LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` LastConsumptionTimestamp *time.Time `json:"LastConsumptionTimestamp,omitempty"` - NotificationLevel *string `json:"NotificationLevel,omitempty"` + NotificationLevel *string `json:"NotificationLevel,omitempty"` } /* @@ -2399,41 +2433,42 @@ type UpdateUserChannelParams struct { * @param UserSid * @param ChannelSid * @param optional nil or *UpdateUserChannelParams - Optional Parameters: -* @param "LastConsumedMessageIndex" (*int32) - -* @param "LastConsumptionTimestamp" (time.Time) - -* @param "NotificationLevel" (string) - +* @param "LastConsumedMessageIndex" (*int32) - +* @param "LastConsumptionTimestamp" (time.Time) - +* @param "NotificationLevel" (string) - * @return IpMessagingV2ServiceUserUserChannel - */ +*/ func (c *DefaultApiService) UpdateUserChannel(ServiceSid string, UserSid string, ChannelSid string, params *UpdateUserChannelParams) (*IpMessagingV2ServiceUserUserChannel, error) { - path := "/v2/Services/{ServiceSid}/Users/{UserSid}/Channels/{ChannelSid}" + path := "/v2/Services/{ServiceSid}/Users/{UserSid}/Channels/{ChannelSid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"UserSid"+"}", UserSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.LastConsumedMessageIndex != nil { - data.Set("LastConsumedMessageIndex", fmt.Sprint(*params.LastConsumedMessageIndex)) - } - if params != nil && params.LastConsumptionTimestamp != nil { - data.Set("LastConsumptionTimestamp", fmt.Sprint(*params.LastConsumptionTimestamp)) - } - if params != nil && params.NotificationLevel != nil { - data.Set("NotificationLevel", *params.NotificationLevel) - } + if params != nil && params.LastConsumedMessageIndex != nil { + data.Set("LastConsumedMessageIndex", fmt.Sprint(*params.LastConsumedMessageIndex)) +} + if params != nil && params.LastConsumptionTimestamp != nil { + data.Set("LastConsumptionTimestamp", fmt.Sprint(*params.LastConsumptionTimestamp)) +} + if params != nil && params.NotificationLevel != nil { + data.Set("NotificationLevel", *params.NotificationLevel) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &IpMessagingV2ServiceUserUserChannel{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() + + ps := &IpMessagingV2ServiceUserUserChannel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } diff --git a/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_credential.go b/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_credential.go index 640604592..c4b0a832a 100644 --- a/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_credential.go +++ b/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_credential.go @@ -1,28 +1,26 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // IpMessagingV2Credential struct for IpMessagingV2Credential type IpMessagingV2Credential struct { - AccountSid *string `json:"AccountSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Sandbox *string `json:"Sandbox,omitempty"` - Sid *string `json:"Sid,omitempty"` - Type *string `json:"Type,omitempty"` - Url *string `json:"Url,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Sandbox *string `json:"Sandbox,omitempty"` + Sid *string `json:"Sid,omitempty"` + Type *string `json:"Type,omitempty"` + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service.go b/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service.go index 54f7021fc..bad97024b 100644 --- a/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service.go +++ b/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service.go @@ -1,43 +1,41 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // IpMessagingV2Service struct for IpMessagingV2Service type IpMessagingV2Service struct { - AccountSid *string `json:"AccountSid,omitempty"` - ConsumptionReportInterval *int32 `json:"ConsumptionReportInterval,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - DefaultChannelCreatorRoleSid *string `json:"DefaultChannelCreatorRoleSid,omitempty"` - DefaultChannelRoleSid *string `json:"DefaultChannelRoleSid,omitempty"` - DefaultServiceRoleSid *string `json:"DefaultServiceRoleSid,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Limits *map[string]interface{} `json:"Limits,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - Media *map[string]interface{} `json:"Media,omitempty"` - Notifications *map[string]interface{} `json:"Notifications,omitempty"` - PostWebhookRetryCount *int32 `json:"PostWebhookRetryCount,omitempty"` - PostWebhookUrl *string `json:"PostWebhookUrl,omitempty"` - PreWebhookRetryCount *int32 `json:"PreWebhookRetryCount,omitempty"` - PreWebhookUrl *string `json:"PreWebhookUrl,omitempty"` - ReachabilityEnabled *bool `json:"ReachabilityEnabled,omitempty"` - ReadStatusEnabled *bool `json:"ReadStatusEnabled,omitempty"` - Sid *string `json:"Sid,omitempty"` - TypingIndicatorTimeout *int32 `json:"TypingIndicatorTimeout,omitempty"` - Url *string `json:"Url,omitempty"` - WebhookFilters *[]string `json:"WebhookFilters,omitempty"` - WebhookMethod *string `json:"WebhookMethod,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` + ConsumptionReportInterval *int32 `json:"ConsumptionReportInterval,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + DefaultChannelCreatorRoleSid *string `json:"DefaultChannelCreatorRoleSid,omitempty"` + DefaultChannelRoleSid *string `json:"DefaultChannelRoleSid,omitempty"` + DefaultServiceRoleSid *string `json:"DefaultServiceRoleSid,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Limits *map[string]interface{} `json:"Limits,omitempty"` + Links *map[string]interface{} `json:"Links,omitempty"` + Media *map[string]interface{} `json:"Media,omitempty"` + Notifications *map[string]interface{} `json:"Notifications,omitempty"` + PostWebhookRetryCount *int32 `json:"PostWebhookRetryCount,omitempty"` + PostWebhookUrl *string `json:"PostWebhookUrl,omitempty"` + PreWebhookRetryCount *int32 `json:"PreWebhookRetryCount,omitempty"` + PreWebhookUrl *string `json:"PreWebhookUrl,omitempty"` + ReachabilityEnabled *bool `json:"ReachabilityEnabled,omitempty"` + ReadStatusEnabled *bool `json:"ReadStatusEnabled,omitempty"` + Sid *string `json:"Sid,omitempty"` + TypingIndicatorTimeout *int32 `json:"TypingIndicatorTimeout,omitempty"` + Url *string `json:"Url,omitempty"` + WebhookFilters *[]string `json:"WebhookFilters,omitempty"` + WebhookMethod *string `json:"WebhookMethod,omitempty"` } diff --git a/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_binding.go b/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_binding.go index cac16feda..101adc23b 100644 --- a/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_binding.go +++ b/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_binding.go @@ -1,32 +1,30 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // IpMessagingV2ServiceBinding struct for IpMessagingV2ServiceBinding type IpMessagingV2ServiceBinding struct { - AccountSid *string `json:"AccountSid,omitempty"` - BindingType *string `json:"BindingType,omitempty"` - CredentialSid *string `json:"CredentialSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Endpoint *string `json:"Endpoint,omitempty"` - Identity *string `json:"Identity,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - MessageTypes *[]string `json:"MessageTypes,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` + BindingType *string `json:"BindingType,omitempty"` + CredentialSid *string `json:"CredentialSid,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + Endpoint *string `json:"Endpoint,omitempty"` + Identity *string `json:"Identity,omitempty"` + Links *map[string]interface{} `json:"Links,omitempty"` + MessageTypes *[]string `json:"MessageTypes,omitempty"` + ServiceSid *string `json:"ServiceSid,omitempty"` + Sid *string `json:"Sid,omitempty"` + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_channel.go b/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_channel.go index 372267ec5..c6a2607bf 100644 --- a/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_channel.go +++ b/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_channel.go @@ -1,34 +1,32 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // IpMessagingV2ServiceChannel struct for IpMessagingV2ServiceChannel type IpMessagingV2ServiceChannel struct { - AccountSid *string `json:"AccountSid,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - CreatedBy *string `json:"CreatedBy,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - MembersCount *int32 `json:"MembersCount,omitempty"` - MessagesCount *int32 `json:"MessagesCount,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Type *string `json:"Type,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` - Url *string `json:"Url,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + CreatedBy *string `json:"CreatedBy,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Links *map[string]interface{} `json:"Links,omitempty"` + MembersCount *int32 `json:"MembersCount,omitempty"` + MessagesCount *int32 `json:"MessagesCount,omitempty"` + ServiceSid *string `json:"ServiceSid,omitempty"` + Sid *string `json:"Sid,omitempty"` + Type *string `json:"Type,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_channel_channel_webhook.go b/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_channel_channel_webhook.go index 7af76adcc..03122da47 100644 --- a/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_channel_channel_webhook.go +++ b/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_channel_channel_webhook.go @@ -1,29 +1,27 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // IpMessagingV2ServiceChannelChannelWebhook struct for IpMessagingV2ServiceChannelChannelWebhook type IpMessagingV2ServiceChannelChannelWebhook struct { - AccountSid *string `json:"AccountSid,omitempty"` - ChannelSid *string `json:"ChannelSid,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` + ChannelSid *string `json:"ChannelSid,omitempty"` Configuration *map[string]interface{} `json:"Configuration,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Type *string `json:"Type,omitempty"` - Url *string `json:"Url,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + ServiceSid *string `json:"ServiceSid,omitempty"` + Sid *string `json:"Sid,omitempty"` + Type *string `json:"Type,omitempty"` + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_channel_invite.go b/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_channel_invite.go index a8f469083..ea287ac70 100644 --- a/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_channel_invite.go +++ b/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_channel_invite.go @@ -1,30 +1,28 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // IpMessagingV2ServiceChannelInvite struct for IpMessagingV2ServiceChannelInvite type IpMessagingV2ServiceChannelInvite struct { - AccountSid *string `json:"AccountSid,omitempty"` - ChannelSid *string `json:"ChannelSid,omitempty"` - CreatedBy *string `json:"CreatedBy,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` + ChannelSid *string `json:"ChannelSid,omitempty"` + CreatedBy *string `json:"CreatedBy,omitempty"` DateCreated *time.Time `json:"DateCreated,omitempty"` DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Identity *string `json:"Identity,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` + Identity *string `json:"Identity,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` + ServiceSid *string `json:"ServiceSid,omitempty"` + Sid *string `json:"Sid,omitempty"` + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_channel_member.go b/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_channel_member.go index e0aca20e8..4f4124965 100644 --- a/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_channel_member.go +++ b/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_channel_member.go @@ -1,32 +1,30 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // IpMessagingV2ServiceChannelMember struct for IpMessagingV2ServiceChannelMember type IpMessagingV2ServiceChannelMember struct { - AccountSid *string `json:"AccountSid,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - ChannelSid *string `json:"ChannelSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Identity *string `json:"Identity,omitempty"` - LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + ChannelSid *string `json:"ChannelSid,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + Identity *string `json:"Identity,omitempty"` + LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` LastConsumptionTimestamp *time.Time `json:"LastConsumptionTimestamp,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` + ServiceSid *string `json:"ServiceSid,omitempty"` + Sid *string `json:"Sid,omitempty"` + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_channel_message.go b/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_channel_message.go index 1ed268652..c4ceef32e 100644 --- a/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_channel_message.go +++ b/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_channel_message.go @@ -1,36 +1,34 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // IpMessagingV2ServiceChannelMessage struct for IpMessagingV2ServiceChannelMessage type IpMessagingV2ServiceChannelMessage struct { - AccountSid *string `json:"AccountSid,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - Body *string `json:"Body,omitempty"` - ChannelSid *string `json:"ChannelSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - From *string `json:"From,omitempty"` - Index *int32 `json:"Index,omitempty"` - LastUpdatedBy *string `json:"LastUpdatedBy,omitempty"` - Media *map[string]interface{} `json:"Media,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - To *string `json:"To,omitempty"` - Type *string `json:"Type,omitempty"` - Url *string `json:"Url,omitempty"` - WasEdited *bool `json:"WasEdited,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + Body *string `json:"Body,omitempty"` + ChannelSid *string `json:"ChannelSid,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + From *string `json:"From,omitempty"` + Index *int32 `json:"Index,omitempty"` + LastUpdatedBy *string `json:"LastUpdatedBy,omitempty"` + Media *map[string]interface{} `json:"Media,omitempty"` + ServiceSid *string `json:"ServiceSid,omitempty"` + Sid *string `json:"Sid,omitempty"` + To *string `json:"To,omitempty"` + Type *string `json:"Type,omitempty"` + Url *string `json:"Url,omitempty"` + WasEdited *bool `json:"WasEdited,omitempty"` } diff --git a/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_role.go b/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_role.go index 9b0f5ca1d..65ea834c1 100644 --- a/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_role.go +++ b/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_role.go @@ -1,29 +1,27 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // IpMessagingV2ServiceRole struct for IpMessagingV2ServiceRole type IpMessagingV2ServiceRole struct { - AccountSid *string `json:"AccountSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Permissions *[]string `json:"Permissions,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Type *string `json:"Type,omitempty"` - Url *string `json:"Url,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Permissions *[]string `json:"Permissions,omitempty"` + ServiceSid *string `json:"ServiceSid,omitempty"` + Sid *string `json:"Sid,omitempty"` + Type *string `json:"Type,omitempty"` + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_user.go b/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_user.go index 4d85c43a7..3598084d0 100644 --- a/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_user.go +++ b/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_user.go @@ -1,34 +1,32 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // IpMessagingV2ServiceUser struct for IpMessagingV2ServiceUser type IpMessagingV2ServiceUser struct { - AccountSid *string `json:"AccountSid,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Identity *string `json:"Identity,omitempty"` - IsNotifiable *bool `json:"IsNotifiable,omitempty"` - IsOnline *bool `json:"IsOnline,omitempty"` - JoinedChannelsCount *int32 `json:"JoinedChannelsCount,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Identity *string `json:"Identity,omitempty"` + IsNotifiable *bool `json:"IsNotifiable,omitempty"` + IsOnline *bool `json:"IsOnline,omitempty"` + JoinedChannelsCount *int32 `json:"JoinedChannelsCount,omitempty"` + Links *map[string]interface{} `json:"Links,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` + ServiceSid *string `json:"ServiceSid,omitempty"` + Sid *string `json:"Sid,omitempty"` + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_user_user_binding.go b/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_user_user_binding.go index dc540913f..3dc0fffc0 100644 --- a/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_user_user_binding.go +++ b/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_user_user_binding.go @@ -1,32 +1,30 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // IpMessagingV2ServiceUserUserBinding struct for IpMessagingV2ServiceUserUserBinding type IpMessagingV2ServiceUserUserBinding struct { - AccountSid *string `json:"AccountSid,omitempty"` - BindingType *string `json:"BindingType,omitempty"` - CredentialSid *string `json:"CredentialSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Endpoint *string `json:"Endpoint,omitempty"` - Identity *string `json:"Identity,omitempty"` - MessageTypes *[]string `json:"MessageTypes,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` - UserSid *string `json:"UserSid,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` + BindingType *string `json:"BindingType,omitempty"` + CredentialSid *string `json:"CredentialSid,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + Endpoint *string `json:"Endpoint,omitempty"` + Identity *string `json:"Identity,omitempty"` + MessageTypes *[]string `json:"MessageTypes,omitempty"` + ServiceSid *string `json:"ServiceSid,omitempty"` + Sid *string `json:"Sid,omitempty"` + Url *string `json:"Url,omitempty"` + UserSid *string `json:"UserSid,omitempty"` } diff --git a/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_user_user_channel.go b/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_user_user_channel.go index 74c0d7f6c..324902da2 100644 --- a/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_user_user_channel.go +++ b/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_user_user_channel.go @@ -1,27 +1,26 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // IpMessagingV2ServiceUserUserChannel struct for IpMessagingV2ServiceUserUserChannel type IpMessagingV2ServiceUserUserChannel struct { - AccountSid *string `json:"AccountSid,omitempty"` - ChannelSid *string `json:"ChannelSid,omitempty"` - LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - MemberSid *string `json:"MemberSid,omitempty"` - NotificationLevel *string `json:"NotificationLevel,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Status *string `json:"Status,omitempty"` - UnreadMessagesCount *int32 `json:"UnreadMessagesCount,omitempty"` - Url *string `json:"Url,omitempty"` - UserSid *string `json:"UserSid,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` + ChannelSid *string `json:"ChannelSid,omitempty"` + LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` + Links *map[string]interface{} `json:"Links,omitempty"` + MemberSid *string `json:"MemberSid,omitempty"` + NotificationLevel *string `json:"NotificationLevel,omitempty"` + ServiceSid *string `json:"ServiceSid,omitempty"` + Status *string `json:"Status,omitempty"` + UnreadMessagesCount *int32 `json:"UnreadMessagesCount,omitempty"` + Url *string `json:"Url,omitempty"` + UserSid *string `json:"UserSid,omitempty"` } diff --git a/twilio/rest/ip_messaging/v2/model_list_binding_response.go b/twilio/rest/ip_messaging/v2/model_list_binding_response.go index 9b092965e..55f9d4aa9 100644 --- a/twilio/rest/ip_messaging/v2/model_list_binding_response.go +++ b/twilio/rest/ip_messaging/v2/model_list_binding_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListBindingResponse struct for ListBindingResponse type ListBindingResponse struct { Bindings []IpMessagingV2ServiceBinding `json:"Bindings,omitempty"` - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/ip_messaging/v2/model_list_channel_response.go b/twilio/rest/ip_messaging/v2/model_list_channel_response.go index 1204553ff..d5325b0d3 100644 --- a/twilio/rest/ip_messaging/v2/model_list_channel_response.go +++ b/twilio/rest/ip_messaging/v2/model_list_channel_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListChannelResponse struct for ListChannelResponse type ListChannelResponse struct { Channels []IpMessagingV2ServiceChannel `json:"Channels,omitempty"` - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/ip_messaging/v2/model_list_channel_webhook_response.go b/twilio/rest/ip_messaging/v2/model_list_channel_webhook_response.go index 1c826e0e6..9ceb0c04d 100644 --- a/twilio/rest/ip_messaging/v2/model_list_channel_webhook_response.go +++ b/twilio/rest/ip_messaging/v2/model_list_channel_webhook_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListChannelWebhookResponse struct for ListChannelWebhookResponse type ListChannelWebhookResponse struct { - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` Webhooks []IpMessagingV2ServiceChannelChannelWebhook `json:"Webhooks,omitempty"` } diff --git a/twilio/rest/ip_messaging/v2/model_list_credential_response.go b/twilio/rest/ip_messaging/v2/model_list_credential_response.go index bc1448450..836f1296e 100644 --- a/twilio/rest/ip_messaging/v2/model_list_credential_response.go +++ b/twilio/rest/ip_messaging/v2/model_list_credential_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListCredentialResponse struct for ListCredentialResponse type ListCredentialResponse struct { - Credentials []IpMessagingV2Credential `json:"Credentials,omitempty"` - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Credentials []IpMessagingV2Credential `json:"Credentials,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/ip_messaging/v2/model_list_credential_response_meta.go b/twilio/rest/ip_messaging/v2/model_list_credential_response_meta.go index 87cc4ce5e..64bed8506 100644 --- a/twilio/rest/ip_messaging/v2/model_list_credential_response_meta.go +++ b/twilio/rest/ip_messaging/v2/model_list_credential_response_meta.go @@ -1,23 +1,22 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListCredentialResponseMeta struct for ListCredentialResponseMeta type ListCredentialResponseMeta struct { - FirstPageUrl string `json:"FirstPageUrl,omitempty"` - Key string `json:"Key,omitempty"` - NextPageUrl string `json:"NextPageUrl,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` - Url string `json:"Url,omitempty"` + Url string `json:"Url,omitempty"` } diff --git a/twilio/rest/ip_messaging/v2/model_list_invite_response.go b/twilio/rest/ip_messaging/v2/model_list_invite_response.go index 1b6266363..65cdbf5ae 100644 --- a/twilio/rest/ip_messaging/v2/model_list_invite_response.go +++ b/twilio/rest/ip_messaging/v2/model_list_invite_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListInviteResponse struct for ListInviteResponse type ListInviteResponse struct { Invites []IpMessagingV2ServiceChannelInvite `json:"Invites,omitempty"` - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/ip_messaging/v2/model_list_member_response.go b/twilio/rest/ip_messaging/v2/model_list_member_response.go index cf887d3f6..b5857edaf 100644 --- a/twilio/rest/ip_messaging/v2/model_list_member_response.go +++ b/twilio/rest/ip_messaging/v2/model_list_member_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListMemberResponse struct for ListMemberResponse type ListMemberResponse struct { Members []IpMessagingV2ServiceChannelMember `json:"Members,omitempty"` - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/ip_messaging/v2/model_list_message_response.go b/twilio/rest/ip_messaging/v2/model_list_message_response.go index 8d42969a9..c6615d839 100644 --- a/twilio/rest/ip_messaging/v2/model_list_message_response.go +++ b/twilio/rest/ip_messaging/v2/model_list_message_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListMessageResponse struct for ListMessageResponse type ListMessageResponse struct { Messages []IpMessagingV2ServiceChannelMessage `json:"Messages,omitempty"` - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/ip_messaging/v2/model_list_role_response.go b/twilio/rest/ip_messaging/v2/model_list_role_response.go index 240561e07..a32cff6cd 100644 --- a/twilio/rest/ip_messaging/v2/model_list_role_response.go +++ b/twilio/rest/ip_messaging/v2/model_list_role_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListRoleResponse struct for ListRoleResponse type ListRoleResponse struct { - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` Roles []IpMessagingV2ServiceRole `json:"Roles,omitempty"` } diff --git a/twilio/rest/ip_messaging/v2/model_list_service_response.go b/twilio/rest/ip_messaging/v2/model_list_service_response.go index 271999b7c..35c36ef30 100644 --- a/twilio/rest/ip_messaging/v2/model_list_service_response.go +++ b/twilio/rest/ip_messaging/v2/model_list_service_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListServiceResponse struct for ListServiceResponse type ListServiceResponse struct { - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` - Services []IpMessagingV2Service `json:"Services,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Services []IpMessagingV2Service `json:"Services,omitempty"` } diff --git a/twilio/rest/ip_messaging/v2/model_list_user_binding_response.go b/twilio/rest/ip_messaging/v2/model_list_user_binding_response.go index 2042517d4..5e39a2a72 100644 --- a/twilio/rest/ip_messaging/v2/model_list_user_binding_response.go +++ b/twilio/rest/ip_messaging/v2/model_list_user_binding_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListUserBindingResponse struct for ListUserBindingResponse type ListUserBindingResponse struct { Bindings []IpMessagingV2ServiceUserUserBinding `json:"Bindings,omitempty"` - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/ip_messaging/v2/model_list_user_channel_response.go b/twilio/rest/ip_messaging/v2/model_list_user_channel_response.go index 22a096e5c..9a231381a 100644 --- a/twilio/rest/ip_messaging/v2/model_list_user_channel_response.go +++ b/twilio/rest/ip_messaging/v2/model_list_user_channel_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListUserChannelResponse struct for ListUserChannelResponse type ListUserChannelResponse struct { Channels []IpMessagingV2ServiceUserUserChannel `json:"Channels,omitempty"` - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/ip_messaging/v2/model_list_user_response.go b/twilio/rest/ip_messaging/v2/model_list_user_response.go index 6a86ca912..1a3ad7d35 100644 --- a/twilio/rest/ip_messaging/v2/model_list_user_response.go +++ b/twilio/rest/ip_messaging/v2/model_list_user_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListUserResponse struct for ListUserResponse type ListUserResponse struct { - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` Users []IpMessagingV2ServiceUser `json:"Users,omitempty"` } diff --git a/twilio/rest/lookups/v1/api_default.go b/twilio/rest/lookups/v1/api_default.go index ec5a54700..d6156847f 100644 --- a/twilio/rest/lookups/v1/api_default.go +++ b/twilio/rest/lookups/v1/api_default.go @@ -1,11 +1,11 @@ /* - * Twilio - Lookups - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Lookups + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,10 +14,10 @@ package openapi import ( "encoding/json" "fmt" - "net/url" - "strings" - twilio "github.com/twilio/twilio-go/client" + "net/url" + "strings" + "reflect" ) type DefaultApiService struct { @@ -26,18 +26,18 @@ type DefaultApiService struct { } func NewDefaultApiService(client *twilio.Client) *DefaultApiService { - return &DefaultApiService{ - client: client, + return &DefaultApiService { + client: client, baseURL: "https://lookups.twilio.com", } } // FetchPhoneNumberParams Optional parameters for the method 'FetchPhoneNumber' type FetchPhoneNumberParams struct { - CountryCode *string `json:"CountryCode,omitempty"` - Type *[]string `json:"Type,omitempty"` - AddOns *[]string `json:"AddOns,omitempty"` - AddOnsData *map[string]interface{} `json:"AddOnsData,omitempty"` + CountryCode *string `json:"CountryCode,omitempty"` + Type *[]string `json:"Type,omitempty"` + AddOns *[]string `json:"AddOns,omitempty"` + AddOnsData *map[string]interface{} `json:"AddOnsData,omitempty"` } /* @@ -49,44 +49,45 @@ type FetchPhoneNumberParams struct { * @param "AddOns" ([]string) - The `unique_name` of an Add-on you would like to invoke. Can be the `unique_name` of an Add-on that is installed on your account. You can specify multiple instances of this parameter to invoke multiple Add-ons. For more information about Add-ons, see the [Add-ons documentation](https://www.twilio.com/docs/add-ons). * @param "AddOnsData" (map[string]interface{}) - Data specific to the add-on you would like to invoke. The content and format of this value depends on the add-on. * @return LookupsV1PhoneNumber - */ +*/ func (c *DefaultApiService) FetchPhoneNumber(PhoneNumber string, params *FetchPhoneNumberParams) (*LookupsV1PhoneNumber, error) { - path := "/v1/PhoneNumbers/{PhoneNumber}" + path := "/v1/PhoneNumbers/{PhoneNumber}" path = strings.Replace(path, "{"+"PhoneNumber"+"}", PhoneNumber, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.CountryCode != nil { - data.Set("CountryCode", *params.CountryCode) - } - if params != nil && params.Type != nil { - data.Set("Type", strings.Join(*params.Type, ",")) - } - if params != nil && params.AddOns != nil { - data.Set("AddOns", strings.Join(*params.AddOns, ",")) + if params != nil && params.CountryCode != nil { + data.Set("CountryCode", *params.CountryCode) +} + if params != nil && params.Type != nil { + data.Set("Type", strings.Join(*params.Type, ",")) +} + if params != nil && params.AddOns != nil { + data.Set("AddOns", strings.Join(*params.AddOns, ",")) +} + if params != nil && params.AddOnsData != nil { + v, err := json.Marshal(params.AddOnsData) + + if err != nil { + return nil, err } - if params != nil && params.AddOnsData != nil { - v, err := json.Marshal(params.AddOnsData) - if err != nil { - return nil, err - } + data.Set("AddOnsData", fmt.Sprint(v)) +} - data.Set("AddOnsData", fmt.Sprint(v)) - } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &LookupsV1PhoneNumber{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &LookupsV1PhoneNumber{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } diff --git a/twilio/rest/lookups/v1/model_lookups_v1_phone_number.go b/twilio/rest/lookups/v1/model_lookups_v1_phone_number.go index 86ce02bfe..80bac1cdd 100644 --- a/twilio/rest/lookups/v1/model_lookups_v1_phone_number.go +++ b/twilio/rest/lookups/v1/model_lookups_v1_phone_number.go @@ -1,16 +1,15 @@ /* - * Twilio - Lookups - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Lookups + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // LookupsV1PhoneNumber struct for LookupsV1PhoneNumber type LookupsV1PhoneNumber struct { // A JSON string with the results of the Add-ons you specified diff --git a/twilio/rest/messaging/v1/api_default.go b/twilio/rest/messaging/v1/api_default.go index 707139f7c..8689d63f9 100644 --- a/twilio/rest/messaging/v1/api_default.go +++ b/twilio/rest/messaging/v1/api_default.go @@ -1,11 +1,11 @@ /* - * Twilio - Messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,11 +14,10 @@ package openapi import ( "encoding/json" "fmt" - "net/url" - "strings" - "time" - twilio "github.com/twilio/twilio-go/client" + "net/url" + "strings" + "time" ) type DefaultApiService struct { @@ -27,8 +26,8 @@ type DefaultApiService struct { } func NewDefaultApiService(client *twilio.Client) *DefaultApiService { - return &DefaultApiService{ - client: client, + return &DefaultApiService { + client: client, baseURL: "https://messaging.twilio.com", } } @@ -44,36 +43,36 @@ type CreateAlphaSenderParams struct { * @param optional nil or *CreateAlphaSenderParams - Optional Parameters: * @param "AlphaSender" (string) - The Alphanumeric Sender ID string. Can be up to 11 characters long. Valid characters are A-Z, a-z, 0-9, space, and hyphen `-`. This value cannot contain only numbers. * @return MessagingV1ServiceAlphaSender - */ +*/ func (c *DefaultApiService) CreateAlphaSender(ServiceSid string, params *CreateAlphaSenderParams) (*MessagingV1ServiceAlphaSender, error) { - path := "/v1/Services/{ServiceSid}/AlphaSenders" + path := "/v1/Services/{ServiceSid}/AlphaSenders" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.AlphaSender != nil { - data.Set("AlphaSender", *params.AlphaSender) - } + if params != nil && params.AlphaSender != nil { + data.Set("AlphaSender", *params.AlphaSender) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &MessagingV1ServiceAlphaSender{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &MessagingV1ServiceAlphaSender{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateBrandRegistrationsParams Optional parameters for the method 'CreateBrandRegistrations' type CreateBrandRegistrationsParams struct { - A2pProfileBundleSid *string `json:"A2pProfileBundleSid,omitempty"` + A2pProfileBundleSid *string `json:"A2pProfileBundleSid,omitempty"` CustomerProfileBundleSid *string `json:"CustomerProfileBundleSid,omitempty"` } @@ -83,35 +82,35 @@ type CreateBrandRegistrationsParams struct { * @param "A2pProfileBundleSid" (string) - A2P Messaging Profile Bundle Sid. * @param "CustomerProfileBundleSid" (string) - Customer Profile Bundle Sid. * @return MessagingV1BrandRegistrations - */ +*/ func (c *DefaultApiService) CreateBrandRegistrations(params *CreateBrandRegistrationsParams) (*MessagingV1BrandRegistrations, error) { - path := "/v1/a2p/BrandRegistrations" + path := "/v1/a2p/BrandRegistrations" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.A2pProfileBundleSid != nil { - data.Set("A2pProfileBundleSid", *params.A2pProfileBundleSid) - } - if params != nil && params.CustomerProfileBundleSid != nil { - data.Set("CustomerProfileBundleSid", *params.CustomerProfileBundleSid) - } + if params != nil && params.A2pProfileBundleSid != nil { + data.Set("A2pProfileBundleSid", *params.A2pProfileBundleSid) +} + if params != nil && params.CustomerProfileBundleSid != nil { + data.Set("CustomerProfileBundleSid", *params.CustomerProfileBundleSid) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &MessagingV1BrandRegistrations{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &MessagingV1BrandRegistrations{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreatePhoneNumberParams Optional parameters for the method 'CreatePhoneNumber' type CreatePhoneNumberParams struct { PhoneNumberSid *string `json:"PhoneNumberSid,omitempty"` @@ -123,49 +122,49 @@ type CreatePhoneNumberParams struct { * @param optional nil or *CreatePhoneNumberParams - Optional Parameters: * @param "PhoneNumberSid" (string) - The SID of the Phone Number being added to the Service. * @return MessagingV1ServicePhoneNumber - */ +*/ func (c *DefaultApiService) CreatePhoneNumber(ServiceSid string, params *CreatePhoneNumberParams) (*MessagingV1ServicePhoneNumber, error) { - path := "/v1/Services/{ServiceSid}/PhoneNumbers" + path := "/v1/Services/{ServiceSid}/PhoneNumbers" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PhoneNumberSid != nil { - data.Set("PhoneNumberSid", *params.PhoneNumberSid) - } + if params != nil && params.PhoneNumberSid != nil { + data.Set("PhoneNumberSid", *params.PhoneNumberSid) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &MessagingV1ServicePhoneNumber{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &MessagingV1ServicePhoneNumber{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateServiceParams Optional parameters for the method 'CreateService' type CreateServiceParams struct { - AreaCodeGeomatch *bool `json:"AreaCodeGeomatch,omitempty"` - FallbackMethod *string `json:"FallbackMethod,omitempty"` - FallbackToLongCode *bool `json:"FallbackToLongCode,omitempty"` - FallbackUrl *string `json:"FallbackUrl,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - InboundMethod *string `json:"InboundMethod,omitempty"` - InboundRequestUrl *string `json:"InboundRequestUrl,omitempty"` - MmsConverter *bool `json:"MmsConverter,omitempty"` - ScanMessageContent *string `json:"ScanMessageContent,omitempty"` - SmartEncoding *bool `json:"SmartEncoding,omitempty"` - StatusCallback *string `json:"StatusCallback,omitempty"` - StickySender *bool `json:"StickySender,omitempty"` - SynchronousValidation *bool `json:"SynchronousValidation,omitempty"` - ValidityPeriod *int32 `json:"ValidityPeriod,omitempty"` + AreaCodeGeomatch *bool `json:"AreaCodeGeomatch,omitempty"` + FallbackMethod *string `json:"FallbackMethod,omitempty"` + FallbackToLongCode *bool `json:"FallbackToLongCode,omitempty"` + FallbackUrl *string `json:"FallbackUrl,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + InboundMethod *string `json:"InboundMethod,omitempty"` + InboundRequestUrl *string `json:"InboundRequestUrl,omitempty"` + MmsConverter *bool `json:"MmsConverter,omitempty"` + ScanMessageContent *string `json:"ScanMessageContent,omitempty"` + SmartEncoding *bool `json:"SmartEncoding,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` + StickySender *bool `json:"StickySender,omitempty"` + SynchronousValidation *bool `json:"SynchronousValidation,omitempty"` + ValidityPeriod *int32 `json:"ValidityPeriod,omitempty"` } /* @@ -186,71 +185,71 @@ type CreateServiceParams struct { * @param "SynchronousValidation" (bool) - Reserved. * @param "ValidityPeriod" (int32) - How long, in seconds, messages sent from the Service are valid. Can be an integer from `1` to `14,400`. * @return MessagingV1Service - */ +*/ func (c *DefaultApiService) CreateService(params *CreateServiceParams) (*MessagingV1Service, error) { - path := "/v1/Services" + path := "/v1/Services" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.AreaCodeGeomatch != nil { - data.Set("AreaCodeGeomatch", fmt.Sprint(*params.AreaCodeGeomatch)) - } - if params != nil && params.FallbackMethod != nil { - data.Set("FallbackMethod", *params.FallbackMethod) - } - if params != nil && params.FallbackToLongCode != nil { - data.Set("FallbackToLongCode", fmt.Sprint(*params.FallbackToLongCode)) - } - if params != nil && params.FallbackUrl != nil { - data.Set("FallbackUrl", *params.FallbackUrl) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.InboundMethod != nil { - data.Set("InboundMethod", *params.InboundMethod) - } - if params != nil && params.InboundRequestUrl != nil { - data.Set("InboundRequestUrl", *params.InboundRequestUrl) - } - if params != nil && params.MmsConverter != nil { - data.Set("MmsConverter", fmt.Sprint(*params.MmsConverter)) - } - if params != nil && params.ScanMessageContent != nil { - data.Set("ScanMessageContent", *params.ScanMessageContent) - } - if params != nil && params.SmartEncoding != nil { - data.Set("SmartEncoding", fmt.Sprint(*params.SmartEncoding)) - } - if params != nil && params.StatusCallback != nil { - data.Set("StatusCallback", *params.StatusCallback) - } - if params != nil && params.StickySender != nil { - data.Set("StickySender", fmt.Sprint(*params.StickySender)) - } - if params != nil && params.SynchronousValidation != nil { - data.Set("SynchronousValidation", fmt.Sprint(*params.SynchronousValidation)) - } - if params != nil && params.ValidityPeriod != nil { - data.Set("ValidityPeriod", fmt.Sprint(*params.ValidityPeriod)) - } + if params != nil && params.AreaCodeGeomatch != nil { + data.Set("AreaCodeGeomatch", fmt.Sprint(*params.AreaCodeGeomatch)) +} + if params != nil && params.FallbackMethod != nil { + data.Set("FallbackMethod", *params.FallbackMethod) +} + if params != nil && params.FallbackToLongCode != nil { + data.Set("FallbackToLongCode", fmt.Sprint(*params.FallbackToLongCode)) +} + if params != nil && params.FallbackUrl != nil { + data.Set("FallbackUrl", *params.FallbackUrl) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.InboundMethod != nil { + data.Set("InboundMethod", *params.InboundMethod) +} + if params != nil && params.InboundRequestUrl != nil { + data.Set("InboundRequestUrl", *params.InboundRequestUrl) +} + if params != nil && params.MmsConverter != nil { + data.Set("MmsConverter", fmt.Sprint(*params.MmsConverter)) +} + if params != nil && params.ScanMessageContent != nil { + data.Set("ScanMessageContent", *params.ScanMessageContent) +} + if params != nil && params.SmartEncoding != nil { + data.Set("SmartEncoding", fmt.Sprint(*params.SmartEncoding)) +} + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) +} + if params != nil && params.StickySender != nil { + data.Set("StickySender", fmt.Sprint(*params.StickySender)) +} + if params != nil && params.SynchronousValidation != nil { + data.Set("SynchronousValidation", fmt.Sprint(*params.SynchronousValidation)) +} + if params != nil && params.ValidityPeriod != nil { + data.Set("ValidityPeriod", fmt.Sprint(*params.ValidityPeriod)) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &MessagingV1Service{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &MessagingV1Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateShortCodeParams Optional parameters for the method 'CreateShortCode' type CreateShortCodeParams struct { ShortCodeSid *string `json:"ShortCodeSid,omitempty"` @@ -262,121 +261,130 @@ type CreateShortCodeParams struct { * @param optional nil or *CreateShortCodeParams - Optional Parameters: * @param "ShortCodeSid" (string) - The SID of the ShortCode resource being added to the Service. * @return MessagingV1ServiceShortCode - */ +*/ func (c *DefaultApiService) CreateShortCode(ServiceSid string, params *CreateShortCodeParams) (*MessagingV1ServiceShortCode, error) { - path := "/v1/Services/{ServiceSid}/ShortCodes" + path := "/v1/Services/{ServiceSid}/ShortCodes" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.ShortCodeSid != nil { - data.Set("ShortCodeSid", *params.ShortCodeSid) - } + if params != nil && params.ShortCodeSid != nil { + data.Set("ShortCodeSid", *params.ShortCodeSid) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &MessagingV1ServiceShortCode{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() + + ps := &MessagingV1ServiceShortCode{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * DeleteAlphaSender Method for DeleteAlphaSender * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to delete the resource from. * @param Sid The SID of the AlphaSender resource to delete. - */ -func (c *DefaultApiService) DeleteAlphaSender(ServiceSid string, Sid string) error { - path := "/v1/Services/{ServiceSid}/AlphaSenders/{Sid}" +*/ +func (c *DefaultApiService) DeleteAlphaSender(ServiceSid string, Sid string, ) (error) { + path := "/v1/Services/{ServiceSid}/AlphaSenders/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* * DeletePhoneNumber Method for DeletePhoneNumber * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to delete the resource from. * @param Sid The SID of the PhoneNumber resource to delete. - */ -func (c *DefaultApiService) DeletePhoneNumber(ServiceSid string, Sid string) error { - path := "/v1/Services/{ServiceSid}/PhoneNumbers/{Sid}" +*/ +func (c *DefaultApiService) DeletePhoneNumber(ServiceSid string, Sid string, ) (error) { + path := "/v1/Services/{ServiceSid}/PhoneNumbers/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - return nil + defer resp.Body.Close() + + return nil } /* * DeleteService Method for DeleteService * @param Sid The SID of the Service resource to delete. - */ -func (c *DefaultApiService) DeleteService(Sid string) error { - path := "/v1/Services/{Sid}" +*/ +func (c *DefaultApiService) DeleteService(Sid string, ) (error) { + path := "/v1/Services/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - return nil + defer resp.Body.Close() + + return nil } /* * DeleteShortCode Method for DeleteShortCode * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to delete the resource from. * @param Sid The SID of the ShortCode resource to delete. - */ -func (c *DefaultApiService) DeleteShortCode(ServiceSid string, Sid string) error { - path := "/v1/Services/{ServiceSid}/ShortCodes/{Sid}" +*/ +func (c *DefaultApiService) DeleteShortCode(ServiceSid string, Sid string, ) (error) { + path := "/v1/Services/{ServiceSid}/ShortCodes/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* @@ -384,57 +392,60 @@ func (c *DefaultApiService) DeleteShortCode(ServiceSid string, Sid string) error * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to fetch the resource from. * @param Sid The SID of the AlphaSender resource to fetch. * @return MessagingV1ServiceAlphaSender - */ -func (c *DefaultApiService) FetchAlphaSender(ServiceSid string, Sid string) (*MessagingV1ServiceAlphaSender, error) { - path := "/v1/Services/{ServiceSid}/AlphaSenders/{Sid}" +*/ +func (c *DefaultApiService) FetchAlphaSender(ServiceSid string, Sid string, ) (*MessagingV1ServiceAlphaSender, error) { + path := "/v1/Services/{ServiceSid}/AlphaSenders/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &MessagingV1ServiceAlphaSender{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &MessagingV1ServiceAlphaSender{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* * FetchBrandRegistrations Method for FetchBrandRegistrations * @param Sid The SID of the Brand Registration resource to fetch. * @return MessagingV1BrandRegistrations - */ -func (c *DefaultApiService) FetchBrandRegistrations(Sid string) (*MessagingV1BrandRegistrations, error) { - path := "/v1/a2p/BrandRegistrations/{Sid}" +*/ +func (c *DefaultApiService) FetchBrandRegistrations(Sid string, ) (*MessagingV1BrandRegistrations, error) { + path := "/v1/a2p/BrandRegistrations/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &MessagingV1BrandRegistrations{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err -} + defer resp.Body.Close() + + ps := &MessagingV1BrandRegistrations{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // FetchDeactivationParams Optional parameters for the method 'FetchDeactivation' type FetchDeactivationParams struct { Date *time.Time `json:"Date,omitempty"` @@ -445,25 +456,26 @@ type FetchDeactivationParams struct { * Fetch a list of all United States numbers that have been deactivated on a specific date. * @param optional nil or *FetchDeactivationParams - Optional Parameters: * @param "Date" (time.Time) - The request will return a list of all United States Phone Numbers that were deactivated on the day specified by this parameter. This date should be specified in YYYY-MM-DD format. - */ -func (c *DefaultApiService) FetchDeactivation(params *FetchDeactivationParams) error { - path := "/v1/Deactivations" +*/ +func (c *DefaultApiService) FetchDeactivation(params *FetchDeactivationParams) (error) { + path := "/v1/Deactivations" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Date != nil { - data.Set("Date", fmt.Sprint(*params.Date)) - } + if params != nil && params.Date != nil { + data.Set("Date", fmt.Sprint(*params.Date)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() - return nil + return nil } /* @@ -471,55 +483,59 @@ func (c *DefaultApiService) FetchDeactivation(params *FetchDeactivationParams) e * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to fetch the resource from. * @param Sid The SID of the PhoneNumber resource to fetch. * @return MessagingV1ServicePhoneNumber - */ -func (c *DefaultApiService) FetchPhoneNumber(ServiceSid string, Sid string) (*MessagingV1ServicePhoneNumber, error) { - path := "/v1/Services/{ServiceSid}/PhoneNumbers/{Sid}" +*/ +func (c *DefaultApiService) FetchPhoneNumber(ServiceSid string, Sid string, ) (*MessagingV1ServicePhoneNumber, error) { + path := "/v1/Services/{ServiceSid}/PhoneNumbers/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &MessagingV1ServicePhoneNumber{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &MessagingV1ServicePhoneNumber{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* * FetchService Method for FetchService * @param Sid The SID of the Service resource to fetch. * @return MessagingV1Service - */ -func (c *DefaultApiService) FetchService(Sid string) (*MessagingV1Service, error) { - path := "/v1/Services/{Sid}" +*/ +func (c *DefaultApiService) FetchService(Sid string, ) (*MessagingV1Service, error) { + path := "/v1/Services/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &MessagingV1Service{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &MessagingV1Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -527,30 +543,31 @@ func (c *DefaultApiService) FetchService(Sid string) (*MessagingV1Service, error * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to fetch the resource from. * @param Sid The SID of the ShortCode resource to fetch. * @return MessagingV1ServiceShortCode - */ -func (c *DefaultApiService) FetchShortCode(ServiceSid string, Sid string) (*MessagingV1ServiceShortCode, error) { - path := "/v1/Services/{ServiceSid}/ShortCodes/{Sid}" +*/ +func (c *DefaultApiService) FetchShortCode(ServiceSid string, Sid string, ) (*MessagingV1ServiceShortCode, error) { + path := "/v1/Services/{ServiceSid}/ShortCodes/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &MessagingV1ServiceShortCode{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err -} + defer resp.Body.Close() + + ps := &MessagingV1ServiceShortCode{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListAlphaSenderParams Optional parameters for the method 'ListAlphaSender' type ListAlphaSenderParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -562,33 +579,33 @@ type ListAlphaSenderParams struct { * @param optional nil or *ListAlphaSenderParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListAlphaSenderResponse - */ +*/ func (c *DefaultApiService) ListAlphaSender(ServiceSid string, params *ListAlphaSenderParams) (*ListAlphaSenderResponse, error) { - path := "/v1/Services/{ServiceSid}/AlphaSenders" + path := "/v1/Services/{ServiceSid}/AlphaSenders" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListAlphaSenderResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListAlphaSenderResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListBrandRegistrationsParams Optional parameters for the method 'ListBrandRegistrations' type ListBrandRegistrationsParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -599,32 +616,32 @@ type ListBrandRegistrationsParams struct { * @param optional nil or *ListBrandRegistrationsParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListBrandRegistrationsResponse - */ +*/ func (c *DefaultApiService) ListBrandRegistrations(params *ListBrandRegistrationsParams) (*ListBrandRegistrationsResponse, error) { - path := "/v1/a2p/BrandRegistrations" + path := "/v1/a2p/BrandRegistrations" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListBrandRegistrationsResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListBrandRegistrationsResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListPhoneNumberParams Optional parameters for the method 'ListPhoneNumber' type ListPhoneNumberParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -636,33 +653,33 @@ type ListPhoneNumberParams struct { * @param optional nil or *ListPhoneNumberParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListPhoneNumberResponse - */ +*/ func (c *DefaultApiService) ListPhoneNumber(ServiceSid string, params *ListPhoneNumberParams) (*ListPhoneNumberResponse, error) { - path := "/v1/Services/{ServiceSid}/PhoneNumbers" + path := "/v1/Services/{ServiceSid}/PhoneNumbers" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListPhoneNumberResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListPhoneNumberResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListServiceParams Optional parameters for the method 'ListService' type ListServiceParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -673,32 +690,32 @@ type ListServiceParams struct { * @param optional nil or *ListServiceParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListServiceResponse - */ +*/ func (c *DefaultApiService) ListService(params *ListServiceParams) (*ListServiceResponse, error) { - path := "/v1/Services" + path := "/v1/Services" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListServiceResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListServiceResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListShortCodeParams Optional parameters for the method 'ListShortCode' type ListShortCodeParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -710,49 +727,49 @@ type ListShortCodeParams struct { * @param optional nil or *ListShortCodeParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListShortCodeResponse - */ +*/ func (c *DefaultApiService) ListShortCode(ServiceSid string, params *ListShortCodeParams) (*ListShortCodeResponse, error) { - path := "/v1/Services/{ServiceSid}/ShortCodes" + path := "/v1/Services/{ServiceSid}/ShortCodes" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListShortCodeResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListShortCodeResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateServiceParams Optional parameters for the method 'UpdateService' type UpdateServiceParams struct { - AreaCodeGeomatch *bool `json:"AreaCodeGeomatch,omitempty"` - FallbackMethod *string `json:"FallbackMethod,omitempty"` - FallbackToLongCode *bool `json:"FallbackToLongCode,omitempty"` - FallbackUrl *string `json:"FallbackUrl,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - InboundMethod *string `json:"InboundMethod,omitempty"` - InboundRequestUrl *string `json:"InboundRequestUrl,omitempty"` - MmsConverter *bool `json:"MmsConverter,omitempty"` - ScanMessageContent *string `json:"ScanMessageContent,omitempty"` - SmartEncoding *bool `json:"SmartEncoding,omitempty"` - StatusCallback *string `json:"StatusCallback,omitempty"` - StickySender *bool `json:"StickySender,omitempty"` - SynchronousValidation *bool `json:"SynchronousValidation,omitempty"` - ValidityPeriod *int32 `json:"ValidityPeriod,omitempty"` + AreaCodeGeomatch *bool `json:"AreaCodeGeomatch,omitempty"` + FallbackMethod *string `json:"FallbackMethod,omitempty"` + FallbackToLongCode *bool `json:"FallbackToLongCode,omitempty"` + FallbackUrl *string `json:"FallbackUrl,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + InboundMethod *string `json:"InboundMethod,omitempty"` + InboundRequestUrl *string `json:"InboundRequestUrl,omitempty"` + MmsConverter *bool `json:"MmsConverter,omitempty"` + ScanMessageContent *string `json:"ScanMessageContent,omitempty"` + SmartEncoding *bool `json:"SmartEncoding,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` + StickySender *bool `json:"StickySender,omitempty"` + SynchronousValidation *bool `json:"SynchronousValidation,omitempty"` + ValidityPeriod *int32 `json:"ValidityPeriod,omitempty"` } /* @@ -774,68 +791,69 @@ type UpdateServiceParams struct { * @param "SynchronousValidation" (bool) - Reserved. * @param "ValidityPeriod" (int32) - How long, in seconds, messages sent from the Service are valid. Can be an integer from `1` to `14,400`. * @return MessagingV1Service - */ +*/ func (c *DefaultApiService) UpdateService(Sid string, params *UpdateServiceParams) (*MessagingV1Service, error) { - path := "/v1/Services/{Sid}" + path := "/v1/Services/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.AreaCodeGeomatch != nil { - data.Set("AreaCodeGeomatch", fmt.Sprint(*params.AreaCodeGeomatch)) - } - if params != nil && params.FallbackMethod != nil { - data.Set("FallbackMethod", *params.FallbackMethod) - } - if params != nil && params.FallbackToLongCode != nil { - data.Set("FallbackToLongCode", fmt.Sprint(*params.FallbackToLongCode)) - } - if params != nil && params.FallbackUrl != nil { - data.Set("FallbackUrl", *params.FallbackUrl) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.InboundMethod != nil { - data.Set("InboundMethod", *params.InboundMethod) - } - if params != nil && params.InboundRequestUrl != nil { - data.Set("InboundRequestUrl", *params.InboundRequestUrl) - } - if params != nil && params.MmsConverter != nil { - data.Set("MmsConverter", fmt.Sprint(*params.MmsConverter)) - } - if params != nil && params.ScanMessageContent != nil { - data.Set("ScanMessageContent", *params.ScanMessageContent) - } - if params != nil && params.SmartEncoding != nil { - data.Set("SmartEncoding", fmt.Sprint(*params.SmartEncoding)) - } - if params != nil && params.StatusCallback != nil { - data.Set("StatusCallback", *params.StatusCallback) - } - if params != nil && params.StickySender != nil { - data.Set("StickySender", fmt.Sprint(*params.StickySender)) - } - if params != nil && params.SynchronousValidation != nil { - data.Set("SynchronousValidation", fmt.Sprint(*params.SynchronousValidation)) - } - if params != nil && params.ValidityPeriod != nil { - data.Set("ValidityPeriod", fmt.Sprint(*params.ValidityPeriod)) - } + if params != nil && params.AreaCodeGeomatch != nil { + data.Set("AreaCodeGeomatch", fmt.Sprint(*params.AreaCodeGeomatch)) +} + if params != nil && params.FallbackMethod != nil { + data.Set("FallbackMethod", *params.FallbackMethod) +} + if params != nil && params.FallbackToLongCode != nil { + data.Set("FallbackToLongCode", fmt.Sprint(*params.FallbackToLongCode)) +} + if params != nil && params.FallbackUrl != nil { + data.Set("FallbackUrl", *params.FallbackUrl) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.InboundMethod != nil { + data.Set("InboundMethod", *params.InboundMethod) +} + if params != nil && params.InboundRequestUrl != nil { + data.Set("InboundRequestUrl", *params.InboundRequestUrl) +} + if params != nil && params.MmsConverter != nil { + data.Set("MmsConverter", fmt.Sprint(*params.MmsConverter)) +} + if params != nil && params.ScanMessageContent != nil { + data.Set("ScanMessageContent", *params.ScanMessageContent) +} + if params != nil && params.SmartEncoding != nil { + data.Set("SmartEncoding", fmt.Sprint(*params.SmartEncoding)) +} + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) +} + if params != nil && params.StickySender != nil { + data.Set("StickySender", fmt.Sprint(*params.StickySender)) +} + if params != nil && params.SynchronousValidation != nil { + data.Set("SynchronousValidation", fmt.Sprint(*params.SynchronousValidation)) +} + if params != nil && params.ValidityPeriod != nil { + data.Set("ValidityPeriod", fmt.Sprint(*params.ValidityPeriod)) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &MessagingV1Service{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() + + ps := &MessagingV1Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } diff --git a/twilio/rest/messaging/v1/model_list_alpha_sender_response.go b/twilio/rest/messaging/v1/model_list_alpha_sender_response.go index b0eb4742e..25ecfcf31 100644 --- a/twilio/rest/messaging/v1/model_list_alpha_sender_response.go +++ b/twilio/rest/messaging/v1/model_list_alpha_sender_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListAlphaSenderResponse struct for ListAlphaSenderResponse type ListAlphaSenderResponse struct { AlphaSenders []MessagingV1ServiceAlphaSender `json:"AlphaSenders,omitempty"` - Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/messaging/v1/model_list_brand_registrations_response.go b/twilio/rest/messaging/v1/model_list_brand_registrations_response.go index 266b23fe1..4227e057d 100644 --- a/twilio/rest/messaging/v1/model_list_brand_registrations_response.go +++ b/twilio/rest/messaging/v1/model_list_brand_registrations_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListBrandRegistrationsResponse struct for ListBrandRegistrationsResponse type ListBrandRegistrationsResponse struct { Data []MessagingV1BrandRegistrations `json:"Data,omitempty"` - Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/messaging/v1/model_list_phone_number_response.go b/twilio/rest/messaging/v1/model_list_phone_number_response.go index d1889ff47..87b3ce9c5 100644 --- a/twilio/rest/messaging/v1/model_list_phone_number_response.go +++ b/twilio/rest/messaging/v1/model_list_phone_number_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListPhoneNumberResponse struct for ListPhoneNumberResponse type ListPhoneNumberResponse struct { - Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` PhoneNumbers []MessagingV1ServicePhoneNumber `json:"PhoneNumbers,omitempty"` } diff --git a/twilio/rest/messaging/v1/model_list_service_response.go b/twilio/rest/messaging/v1/model_list_service_response.go index f581bd901..21bc3707b 100644 --- a/twilio/rest/messaging/v1/model_list_service_response.go +++ b/twilio/rest/messaging/v1/model_list_service_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListServiceResponse struct for ListServiceResponse type ListServiceResponse struct { - Meta ListServiceResponseMeta `json:"Meta,omitempty"` - Services []MessagingV1Service `json:"Services,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Services []MessagingV1Service `json:"Services,omitempty"` } diff --git a/twilio/rest/messaging/v1/model_list_service_response_meta.go b/twilio/rest/messaging/v1/model_list_service_response_meta.go index a73887a0d..249441ff4 100644 --- a/twilio/rest/messaging/v1/model_list_service_response_meta.go +++ b/twilio/rest/messaging/v1/model_list_service_response_meta.go @@ -1,23 +1,22 @@ /* - * Twilio - Messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListServiceResponseMeta struct for ListServiceResponseMeta type ListServiceResponseMeta struct { - FirstPageUrl string `json:"FirstPageUrl,omitempty"` - Key string `json:"Key,omitempty"` - NextPageUrl string `json:"NextPageUrl,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` - Url string `json:"Url,omitempty"` + Url string `json:"Url,omitempty"` } diff --git a/twilio/rest/messaging/v1/model_list_short_code_response.go b/twilio/rest/messaging/v1/model_list_short_code_response.go index e967f58c7..575ee6f3d 100644 --- a/twilio/rest/messaging/v1/model_list_short_code_response.go +++ b/twilio/rest/messaging/v1/model_list_short_code_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListShortCodeResponse struct for ListShortCodeResponse type ListShortCodeResponse struct { - Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` ShortCodes []MessagingV1ServiceShortCode `json:"ShortCodes,omitempty"` } diff --git a/twilio/rest/messaging/v1/model_messaging_v1_brand_registrations.go b/twilio/rest/messaging/v1/model_messaging_v1_brand_registrations.go index 0bd2b5c0e..48b98e9bd 100644 --- a/twilio/rest/messaging/v1/model_messaging_v1_brand_registrations.go +++ b/twilio/rest/messaging/v1/model_messaging_v1_brand_registrations.go @@ -1,20 +1,18 @@ /* - * Twilio - Messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // MessagingV1BrandRegistrations struct for MessagingV1BrandRegistrations type MessagingV1BrandRegistrations struct { // A2P Messaging Profile Bundle BundleSid diff --git a/twilio/rest/messaging/v1/model_messaging_v1_deactivation.go b/twilio/rest/messaging/v1/model_messaging_v1_deactivation.go index 2fbe36298..d400a4a1a 100644 --- a/twilio/rest/messaging/v1/model_messaging_v1_deactivation.go +++ b/twilio/rest/messaging/v1/model_messaging_v1_deactivation.go @@ -1,16 +1,15 @@ /* - * Twilio - Messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // MessagingV1Deactivation struct for MessagingV1Deactivation type MessagingV1Deactivation struct { // Redirect url to the list of deactivated numbers. diff --git a/twilio/rest/messaging/v1/model_messaging_v1_service.go b/twilio/rest/messaging/v1/model_messaging_v1_service.go index b844a93fd..362481619 100644 --- a/twilio/rest/messaging/v1/model_messaging_v1_service.go +++ b/twilio/rest/messaging/v1/model_messaging_v1_service.go @@ -1,20 +1,18 @@ /* - * Twilio - Messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // MessagingV1Service struct for MessagingV1Service type MessagingV1Service struct { // The SID of the Account that created the resource diff --git a/twilio/rest/messaging/v1/model_messaging_v1_service_alpha_sender.go b/twilio/rest/messaging/v1/model_messaging_v1_service_alpha_sender.go index c3b694996..4cefdd449 100644 --- a/twilio/rest/messaging/v1/model_messaging_v1_service_alpha_sender.go +++ b/twilio/rest/messaging/v1/model_messaging_v1_service_alpha_sender.go @@ -1,20 +1,18 @@ /* - * Twilio - Messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // MessagingV1ServiceAlphaSender struct for MessagingV1ServiceAlphaSender type MessagingV1ServiceAlphaSender struct { // The SID of the Account that created the resource diff --git a/twilio/rest/messaging/v1/model_messaging_v1_service_phone_number.go b/twilio/rest/messaging/v1/model_messaging_v1_service_phone_number.go index 528255668..14dba5f68 100644 --- a/twilio/rest/messaging/v1/model_messaging_v1_service_phone_number.go +++ b/twilio/rest/messaging/v1/model_messaging_v1_service_phone_number.go @@ -1,20 +1,18 @@ /* - * Twilio - Messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // MessagingV1ServicePhoneNumber struct for MessagingV1ServicePhoneNumber type MessagingV1ServicePhoneNumber struct { // The SID of the Account that created the resource diff --git a/twilio/rest/messaging/v1/model_messaging_v1_service_short_code.go b/twilio/rest/messaging/v1/model_messaging_v1_service_short_code.go index 409f85468..80ccefa87 100644 --- a/twilio/rest/messaging/v1/model_messaging_v1_service_short_code.go +++ b/twilio/rest/messaging/v1/model_messaging_v1_service_short_code.go @@ -1,20 +1,18 @@ /* - * Twilio - Messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // MessagingV1ServiceShortCode struct for MessagingV1ServiceShortCode type MessagingV1ServiceShortCode struct { // The SID of the Account that created the resource diff --git a/twilio/rest/monitor/v1/api_default.go b/twilio/rest/monitor/v1/api_default.go index 75912db79..75a502b00 100644 --- a/twilio/rest/monitor/v1/api_default.go +++ b/twilio/rest/monitor/v1/api_default.go @@ -1,11 +1,11 @@ /* - * Twilio - Monitor - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Monitor + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,11 +14,10 @@ package openapi import ( "encoding/json" "fmt" - "net/url" - "strings" - "time" - twilio "github.com/twilio/twilio-go/client" + "net/url" + "strings" + "time" ) type DefaultApiService struct { @@ -27,72 +26,76 @@ type DefaultApiService struct { } func NewDefaultApiService(client *twilio.Client) *DefaultApiService { - return &DefaultApiService{ - client: client, + return &DefaultApiService { + client: client, baseURL: "https://monitor.twilio.com", } } + /* * FetchAlert Method for FetchAlert * @param Sid The SID of the Alert resource to fetch. * @return MonitorV1AlertInstance - */ -func (c *DefaultApiService) FetchAlert(Sid string) (*MonitorV1AlertInstance, error) { - path := "/v1/Alerts/{Sid}" +*/ +func (c *DefaultApiService) FetchAlert(Sid string, ) (*MonitorV1AlertInstance, error) { + path := "/v1/Alerts/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &MonitorV1AlertInstance{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err + defer resp.Body.Close() + + ps := &MonitorV1AlertInstance{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* * FetchEvent Method for FetchEvent * @param Sid The SID of the Event resource to fetch. * @return MonitorV1Event - */ -func (c *DefaultApiService) FetchEvent(Sid string) (*MonitorV1Event, error) { - path := "/v1/Events/{Sid}" +*/ +func (c *DefaultApiService) FetchEvent(Sid string, ) (*MonitorV1Event, error) { + path := "/v1/Events/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &MonitorV1Event{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err -} + defer resp.Body.Close() + ps := &MonitorV1Event{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} // ListAlertParams Optional parameters for the method 'ListAlert' type ListAlertParams struct { - LogLevel *string `json:"LogLevel,omitempty"` + LogLevel *string `json:"LogLevel,omitempty"` StartDate *time.Time `json:"StartDate,omitempty"` - EndDate *time.Time `json:"EndDate,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + EndDate *time.Time `json:"EndDate,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -103,50 +106,50 @@ type ListAlertParams struct { * @param "EndDate" (time.Time) - Only include alerts that occurred on or before this date and time. Specify the date and time in GMT and format as `YYYY-MM-DD` or `YYYY-MM-DDThh:mm:ssZ`. Queries for alerts older than 30 days are not supported. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListAlertResponse - */ +*/ func (c *DefaultApiService) ListAlert(params *ListAlertParams) (*ListAlertResponse, error) { - path := "/v1/Alerts" + path := "/v1/Alerts" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.LogLevel != nil { - data.Set("LogLevel", *params.LogLevel) - } - if params != nil && params.StartDate != nil { - data.Set("StartDate", fmt.Sprint(*params.StartDate)) - } - if params != nil && params.EndDate != nil { - data.Set("EndDate", fmt.Sprint(*params.EndDate)) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.LogLevel != nil { + data.Set("LogLevel", *params.LogLevel) +} + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) +} + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListAlertResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListAlertResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListEventParams Optional parameters for the method 'ListEvent' type ListEventParams struct { - ActorSid *string `json:"ActorSid,omitempty"` - EventType *string `json:"EventType,omitempty"` - ResourceSid *string `json:"ResourceSid,omitempty"` - SourceIpAddress *string `json:"SourceIpAddress,omitempty"` - StartDate *time.Time `json:"StartDate,omitempty"` - EndDate *time.Time `json:"EndDate,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + ActorSid *string `json:"ActorSid,omitempty"` + EventType *string `json:"EventType,omitempty"` + ResourceSid *string `json:"ResourceSid,omitempty"` + SourceIpAddress *string `json:"SourceIpAddress,omitempty"` + StartDate *time.Time `json:"StartDate,omitempty"` + EndDate *time.Time `json:"EndDate,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -161,46 +164,47 @@ type ListEventParams struct { * @param "EndDate" (time.Time) - Only include events that occurred on or before this date. Specify the date in GMT and [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListEventResponse - */ +*/ func (c *DefaultApiService) ListEvent(params *ListEventParams) (*ListEventResponse, error) { - path := "/v1/Events" + path := "/v1/Events" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.ActorSid != nil { - data.Set("ActorSid", *params.ActorSid) - } - if params != nil && params.EventType != nil { - data.Set("EventType", *params.EventType) - } - if params != nil && params.ResourceSid != nil { - data.Set("ResourceSid", *params.ResourceSid) - } - if params != nil && params.SourceIpAddress != nil { - data.Set("SourceIpAddress", *params.SourceIpAddress) - } - if params != nil && params.StartDate != nil { - data.Set("StartDate", fmt.Sprint(*params.StartDate)) - } - if params != nil && params.EndDate != nil { - data.Set("EndDate", fmt.Sprint(*params.EndDate)) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.ActorSid != nil { + data.Set("ActorSid", *params.ActorSid) +} + if params != nil && params.EventType != nil { + data.Set("EventType", *params.EventType) +} + if params != nil && params.ResourceSid != nil { + data.Set("ResourceSid", *params.ResourceSid) +} + if params != nil && params.SourceIpAddress != nil { + data.Set("SourceIpAddress", *params.SourceIpAddress) +} + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) +} + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListEventResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() + + ps := &ListEventResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } diff --git a/twilio/rest/monitor/v1/model_list_alert_response.go b/twilio/rest/monitor/v1/model_list_alert_response.go index c56b6f5c9..e96e4b32a 100644 --- a/twilio/rest/monitor/v1/model_list_alert_response.go +++ b/twilio/rest/monitor/v1/model_list_alert_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Monitor - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Monitor + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListAlertResponse struct for ListAlertResponse type ListAlertResponse struct { - Alerts []MonitorV1Alert `json:"Alerts,omitempty"` - Meta ListAlertResponseMeta `json:"Meta,omitempty"` + Alerts []MonitorV1Alert `json:"Alerts,omitempty"` + Meta ListAlertResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/monitor/v1/model_list_alert_response_meta.go b/twilio/rest/monitor/v1/model_list_alert_response_meta.go index eb6982988..bd39253f2 100644 --- a/twilio/rest/monitor/v1/model_list_alert_response_meta.go +++ b/twilio/rest/monitor/v1/model_list_alert_response_meta.go @@ -1,23 +1,22 @@ /* - * Twilio - Monitor - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Monitor + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListAlertResponseMeta struct for ListAlertResponseMeta type ListAlertResponseMeta struct { - FirstPageUrl string `json:"FirstPageUrl,omitempty"` - Key string `json:"Key,omitempty"` - NextPageUrl string `json:"NextPageUrl,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` - Url string `json:"Url,omitempty"` + Url string `json:"Url,omitempty"` } diff --git a/twilio/rest/monitor/v1/model_list_event_response.go b/twilio/rest/monitor/v1/model_list_event_response.go index d450c95c7..459737454 100644 --- a/twilio/rest/monitor/v1/model_list_event_response.go +++ b/twilio/rest/monitor/v1/model_list_event_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Monitor - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Monitor + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListEventResponse struct for ListEventResponse type ListEventResponse struct { - Events []MonitorV1Event `json:"Events,omitempty"` - Meta ListAlertResponseMeta `json:"Meta,omitempty"` + Events []MonitorV1Event `json:"Events,omitempty"` + Meta ListAlertResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/monitor/v1/model_monitor_v1_alert.go b/twilio/rest/monitor/v1/model_monitor_v1_alert.go index afa5a531a..2c9f78cd0 100644 --- a/twilio/rest/monitor/v1/model_monitor_v1_alert.go +++ b/twilio/rest/monitor/v1/model_monitor_v1_alert.go @@ -1,20 +1,18 @@ /* - * Twilio - Monitor - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Monitor + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // MonitorV1Alert struct for MonitorV1Alert type MonitorV1Alert struct { // The SID of the Account that created the resource diff --git a/twilio/rest/monitor/v1/model_monitor_v1_alert_instance.go b/twilio/rest/monitor/v1/model_monitor_v1_alert_instance.go index c81a94feb..95cf6ab03 100644 --- a/twilio/rest/monitor/v1/model_monitor_v1_alert_instance.go +++ b/twilio/rest/monitor/v1/model_monitor_v1_alert_instance.go @@ -1,20 +1,18 @@ /* - * Twilio - Monitor - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Monitor + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // MonitorV1AlertInstance struct for MonitorV1AlertInstance type MonitorV1AlertInstance struct { // The SID of the Account that created the resource diff --git a/twilio/rest/monitor/v1/model_monitor_v1_event.go b/twilio/rest/monitor/v1/model_monitor_v1_event.go index 6a9087130..acb3f87c9 100644 --- a/twilio/rest/monitor/v1/model_monitor_v1_event.go +++ b/twilio/rest/monitor/v1/model_monitor_v1_event.go @@ -1,20 +1,18 @@ /* - * Twilio - Monitor - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Monitor + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // MonitorV1Event struct for MonitorV1Event type MonitorV1Event struct { // The SID of the Account that created the resource diff --git a/twilio/rest/notify/v1/api_default.go b/twilio/rest/notify/v1/api_default.go index 2482879cb..a2d9bc94a 100644 --- a/twilio/rest/notify/v1/api_default.go +++ b/twilio/rest/notify/v1/api_default.go @@ -1,11 +1,11 @@ /* - * Twilio - Notify - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Notify + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,11 +14,11 @@ package openapi import ( "encoding/json" "fmt" - "net/url" - "strings" - "time" - twilio "github.com/twilio/twilio-go/client" + "net/url" + "strings" + "time" + "reflect" ) type DefaultApiService struct { @@ -27,21 +27,21 @@ type DefaultApiService struct { } func NewDefaultApiService(client *twilio.Client) *DefaultApiService { - return &DefaultApiService{ - client: client, + return &DefaultApiService { + client: client, baseURL: "https://notify.twilio.com", } } // CreateBindingParams Optional parameters for the method 'CreateBinding' type CreateBindingParams struct { - Address *string `json:"Address,omitempty"` - BindingType *string `json:"BindingType,omitempty"` - CredentialSid *string `json:"CredentialSid,omitempty"` - Endpoint *string `json:"Endpoint,omitempty"` - Identity *string `json:"Identity,omitempty"` - NotificationProtocolVersion *string `json:"NotificationProtocolVersion,omitempty"` - Tag *[]string `json:"Tag,omitempty"` + Address *string `json:"Address,omitempty"` + BindingType *string `json:"BindingType,omitempty"` + CredentialSid *string `json:"CredentialSid,omitempty"` + Endpoint *string `json:"Endpoint,omitempty"` + Identity *string `json:"Identity,omitempty"` + NotificationProtocolVersion *string `json:"NotificationProtocolVersion,omitempty"` + Tag *[]string `json:"Tag,omitempty"` } /* @@ -56,60 +56,60 @@ type CreateBindingParams struct { * @param "NotificationProtocolVersion" (string) - The protocol version to use to send the notification. This defaults to the value of `default_xxxx_notification_protocol_version` for the protocol in the [Service](https://www.twilio.com/docs/notify/api/service-resource). The current version is `\\\"3\\\"` for `apn`, `fcm`, and `gcm` type Bindings. The parameter is not applicable to `sms` and `facebook-messenger` type Bindings as the data format is fixed. * @param "Tag" ([]string) - A tag that can be used to select the Bindings to notify. Repeat this parameter to specify more than one tag, up to a total of 20 tags. * @return NotifyV1ServiceBinding - */ +*/ func (c *DefaultApiService) CreateBinding(ServiceSid string, params *CreateBindingParams) (*NotifyV1ServiceBinding, error) { - path := "/v1/Services/{ServiceSid}/Bindings" + path := "/v1/Services/{ServiceSid}/Bindings" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Address != nil { - data.Set("Address", *params.Address) - } - if params != nil && params.BindingType != nil { - data.Set("BindingType", *params.BindingType) - } - if params != nil && params.CredentialSid != nil { - data.Set("CredentialSid", *params.CredentialSid) - } - if params != nil && params.Endpoint != nil { - data.Set("Endpoint", *params.Endpoint) - } - if params != nil && params.Identity != nil { - data.Set("Identity", *params.Identity) - } - if params != nil && params.NotificationProtocolVersion != nil { - data.Set("NotificationProtocolVersion", *params.NotificationProtocolVersion) - } - if params != nil && params.Tag != nil { - data.Set("Tag", strings.Join(*params.Tag, ",")) - } + if params != nil && params.Address != nil { + data.Set("Address", *params.Address) +} + if params != nil && params.BindingType != nil { + data.Set("BindingType", *params.BindingType) +} + if params != nil && params.CredentialSid != nil { + data.Set("CredentialSid", *params.CredentialSid) +} + if params != nil && params.Endpoint != nil { + data.Set("Endpoint", *params.Endpoint) +} + if params != nil && params.Identity != nil { + data.Set("Identity", *params.Identity) +} + if params != nil && params.NotificationProtocolVersion != nil { + data.Set("NotificationProtocolVersion", *params.NotificationProtocolVersion) +} + if params != nil && params.Tag != nil { + data.Set("Tag", strings.Join(*params.Tag, ",")) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &NotifyV1ServiceBinding{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &NotifyV1ServiceBinding{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateCredentialParams Optional parameters for the method 'CreateCredential' type CreateCredentialParams struct { - ApiKey *string `json:"ApiKey,omitempty"` - Certificate *string `json:"Certificate,omitempty"` + ApiKey *string `json:"ApiKey,omitempty"` + Certificate *string `json:"Certificate,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` - PrivateKey *string `json:"PrivateKey,omitempty"` - Sandbox *bool `json:"Sandbox,omitempty"` - Secret *string `json:"Secret,omitempty"` - Type *string `json:"Type,omitempty"` + PrivateKey *string `json:"PrivateKey,omitempty"` + Sandbox *bool `json:"Sandbox,omitempty"` + Secret *string `json:"Secret,omitempty"` + Type *string `json:"Type,omitempty"` } /* @@ -123,70 +123,70 @@ type CreateCredentialParams struct { * @param "Secret" (string) - [FCM only] The `Server key` of your project from Firebase console under Settings / Cloud messaging. * @param "Type" (string) - The Credential type. Can be: `gcm`, `fcm`, or `apn`. * @return NotifyV1Credential - */ +*/ func (c *DefaultApiService) CreateCredential(params *CreateCredentialParams) (*NotifyV1Credential, error) { - path := "/v1/Credentials" + path := "/v1/Credentials" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.ApiKey != nil { - data.Set("ApiKey", *params.ApiKey) - } - if params != nil && params.Certificate != nil { - data.Set("Certificate", *params.Certificate) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.PrivateKey != nil { - data.Set("PrivateKey", *params.PrivateKey) - } - if params != nil && params.Sandbox != nil { - data.Set("Sandbox", fmt.Sprint(*params.Sandbox)) - } - if params != nil && params.Secret != nil { - data.Set("Secret", *params.Secret) - } - if params != nil && params.Type != nil { - data.Set("Type", *params.Type) - } + if params != nil && params.ApiKey != nil { + data.Set("ApiKey", *params.ApiKey) +} + if params != nil && params.Certificate != nil { + data.Set("Certificate", *params.Certificate) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.PrivateKey != nil { + data.Set("PrivateKey", *params.PrivateKey) +} + if params != nil && params.Sandbox != nil { + data.Set("Sandbox", fmt.Sprint(*params.Sandbox)) +} + if params != nil && params.Secret != nil { + data.Set("Secret", *params.Secret) +} + if params != nil && params.Type != nil { + data.Set("Type", *params.Type) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &NotifyV1Credential{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &NotifyV1Credential{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateNotificationParams Optional parameters for the method 'CreateNotification' type CreateNotificationParams struct { - Action *string `json:"Action,omitempty"` - Alexa *map[string]interface{} `json:"Alexa,omitempty"` - Apn *map[string]interface{} `json:"Apn,omitempty"` - Body *string `json:"Body,omitempty"` - Data *map[string]interface{} `json:"Data,omitempty"` - DeliveryCallbackUrl *string `json:"DeliveryCallbackUrl,omitempty"` - FacebookMessenger *map[string]interface{} `json:"FacebookMessenger,omitempty"` - Fcm *map[string]interface{} `json:"Fcm,omitempty"` - Gcm *map[string]interface{} `json:"Gcm,omitempty"` - Identity *[]string `json:"Identity,omitempty"` - Priority *string `json:"Priority,omitempty"` - Segment *[]string `json:"Segment,omitempty"` - Sms *map[string]interface{} `json:"Sms,omitempty"` - Sound *string `json:"Sound,omitempty"` - Tag *[]string `json:"Tag,omitempty"` - Title *string `json:"Title,omitempty"` - ToBinding *[]string `json:"ToBinding,omitempty"` - Ttl *int32 `json:"Ttl,omitempty"` + Action *string `json:"Action,omitempty"` + Alexa *map[string]interface{} `json:"Alexa,omitempty"` + Apn *map[string]interface{} `json:"Apn,omitempty"` + Body *string `json:"Body,omitempty"` + Data *map[string]interface{} `json:"Data,omitempty"` + DeliveryCallbackUrl *string `json:"DeliveryCallbackUrl,omitempty"` + FacebookMessenger *map[string]interface{} `json:"FacebookMessenger,omitempty"` + Fcm *map[string]interface{} `json:"Fcm,omitempty"` + Gcm *map[string]interface{} `json:"Gcm,omitempty"` + Identity *[]string `json:"Identity,omitempty"` + Priority *string `json:"Priority,omitempty"` + Segment *[]string `json:"Segment,omitempty"` + Sms *map[string]interface{} `json:"Sms,omitempty"` + Sound *string `json:"Sound,omitempty"` + Tag *[]string `json:"Tag,omitempty"` + Title *string `json:"Title,omitempty"` + ToBinding *[]string `json:"ToBinding,omitempty"` + Ttl *int32 `json:"Ttl,omitempty"` } /* @@ -212,142 +212,142 @@ type CreateNotificationParams struct { * @param "ToBinding" ([]string) - The destination address specified as a JSON string. Multiple `to_binding` parameters can be included but the total size of the request entity should not exceed 1MB. This is typically sufficient for 10,000 phone numbers. * @param "Ttl" (int32) - How long, in seconds, the notification is valid. Can be an integer between 0 and 2,419,200, which is 4 weeks, the default and the maximum supported time to live (TTL). Delivery should be attempted if the device is offline until the TTL elapses. Zero means that the notification delivery is attempted immediately, only once, and is not stored for future delivery. SMS does not support this property. * @return NotifyV1ServiceNotification - */ +*/ func (c *DefaultApiService) CreateNotification(ServiceSid string, params *CreateNotificationParams) (*NotifyV1ServiceNotification, error) { - path := "/v1/Services/{ServiceSid}/Notifications" + path := "/v1/Services/{ServiceSid}/Notifications" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + + if params != nil && params.Action != nil { + data.Set("Action", *params.Action) +} + if params != nil && params.Alexa != nil { + v, err := json.Marshal(params.Alexa) - if params != nil && params.Action != nil { - data.Set("Action", *params.Action) + if err != nil { + return nil, err } - if params != nil && params.Alexa != nil { - v, err := json.Marshal(params.Alexa) - if err != nil { - return nil, err - } + data.Set("Alexa", fmt.Sprint(v)) +} + if params != nil && params.Apn != nil { + v, err := json.Marshal(params.Apn) - data.Set("Alexa", fmt.Sprint(v)) + if err != nil { + return nil, err } - if params != nil && params.Apn != nil { - v, err := json.Marshal(params.Apn) - if err != nil { - return nil, err - } + data.Set("Apn", fmt.Sprint(v)) +} + if params != nil && params.Body != nil { + data.Set("Body", *params.Body) +} + if params != nil && params.Data != nil { + v, err := json.Marshal(params.Data) - data.Set("Apn", fmt.Sprint(v)) - } - if params != nil && params.Body != nil { - data.Set("Body", *params.Body) + if err != nil { + return nil, err } - if params != nil && params.Data != nil { - v, err := json.Marshal(params.Data) - if err != nil { - return nil, err - } + data.Set("Data", fmt.Sprint(v)) +} + if params != nil && params.DeliveryCallbackUrl != nil { + data.Set("DeliveryCallbackUrl", *params.DeliveryCallbackUrl) +} + if params != nil && params.FacebookMessenger != nil { + v, err := json.Marshal(params.FacebookMessenger) - data.Set("Data", fmt.Sprint(v)) - } - if params != nil && params.DeliveryCallbackUrl != nil { - data.Set("DeliveryCallbackUrl", *params.DeliveryCallbackUrl) + if err != nil { + return nil, err } - if params != nil && params.FacebookMessenger != nil { - v, err := json.Marshal(params.FacebookMessenger) - if err != nil { - return nil, err - } + data.Set("FacebookMessenger", fmt.Sprint(v)) +} + if params != nil && params.Fcm != nil { + v, err := json.Marshal(params.Fcm) - data.Set("FacebookMessenger", fmt.Sprint(v)) + if err != nil { + return nil, err } - if params != nil && params.Fcm != nil { - v, err := json.Marshal(params.Fcm) - if err != nil { - return nil, err - } + data.Set("Fcm", fmt.Sprint(v)) +} + if params != nil && params.Gcm != nil { + v, err := json.Marshal(params.Gcm) - data.Set("Fcm", fmt.Sprint(v)) + if err != nil { + return nil, err } - if params != nil && params.Gcm != nil { - v, err := json.Marshal(params.Gcm) - if err != nil { - return nil, err - } + data.Set("Gcm", fmt.Sprint(v)) +} + if params != nil && params.Identity != nil { + data.Set("Identity", strings.Join(*params.Identity, ",")) +} + if params != nil && params.Priority != nil { + data.Set("Priority", *params.Priority) +} + if params != nil && params.Segment != nil { + data.Set("Segment", strings.Join(*params.Segment, ",")) +} + if params != nil && params.Sms != nil { + v, err := json.Marshal(params.Sms) - data.Set("Gcm", fmt.Sprint(v)) - } - if params != nil && params.Identity != nil { - data.Set("Identity", strings.Join(*params.Identity, ",")) - } - if params != nil && params.Priority != nil { - data.Set("Priority", *params.Priority) - } - if params != nil && params.Segment != nil { - data.Set("Segment", strings.Join(*params.Segment, ",")) + if err != nil { + return nil, err } - if params != nil && params.Sms != nil { - v, err := json.Marshal(params.Sms) - if err != nil { - return nil, err - } + data.Set("Sms", fmt.Sprint(v)) +} + if params != nil && params.Sound != nil { + data.Set("Sound", *params.Sound) +} + if params != nil && params.Tag != nil { + data.Set("Tag", strings.Join(*params.Tag, ",")) +} + if params != nil && params.Title != nil { + data.Set("Title", *params.Title) +} + if params != nil && params.ToBinding != nil { + data.Set("ToBinding", strings.Join(*params.ToBinding, ",")) +} + if params != nil && params.Ttl != nil { + data.Set("Ttl", fmt.Sprint(*params.Ttl)) +} - data.Set("Sms", fmt.Sprint(v)) - } - if params != nil && params.Sound != nil { - data.Set("Sound", *params.Sound) - } - if params != nil && params.Tag != nil { - data.Set("Tag", strings.Join(*params.Tag, ",")) - } - if params != nil && params.Title != nil { - data.Set("Title", *params.Title) - } - if params != nil && params.ToBinding != nil { - data.Set("ToBinding", strings.Join(*params.ToBinding, ",")) - } - if params != nil && params.Ttl != nil { - data.Set("Ttl", fmt.Sprint(*params.Ttl)) - } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &NotifyV1ServiceNotification{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &NotifyV1ServiceNotification{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } - // CreateServiceParams Optional parameters for the method 'CreateService' type CreateServiceParams struct { - AlexaSkillId *string `json:"AlexaSkillId,omitempty"` - ApnCredentialSid *string `json:"ApnCredentialSid,omitempty"` + AlexaSkillId *string `json:"AlexaSkillId,omitempty"` + ApnCredentialSid *string `json:"ApnCredentialSid,omitempty"` DefaultAlexaNotificationProtocolVersion *string `json:"DefaultAlexaNotificationProtocolVersion,omitempty"` - DefaultApnNotificationProtocolVersion *string `json:"DefaultApnNotificationProtocolVersion,omitempty"` - DefaultFcmNotificationProtocolVersion *string `json:"DefaultFcmNotificationProtocolVersion,omitempty"` - DefaultGcmNotificationProtocolVersion *string `json:"DefaultGcmNotificationProtocolVersion,omitempty"` - DeliveryCallbackEnabled *bool `json:"DeliveryCallbackEnabled,omitempty"` - DeliveryCallbackUrl *string `json:"DeliveryCallbackUrl,omitempty"` - FacebookMessengerPageId *string `json:"FacebookMessengerPageId,omitempty"` - FcmCredentialSid *string `json:"FcmCredentialSid,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - GcmCredentialSid *string `json:"GcmCredentialSid,omitempty"` - LogEnabled *bool `json:"LogEnabled,omitempty"` - MessagingServiceSid *string `json:"MessagingServiceSid,omitempty"` + DefaultApnNotificationProtocolVersion *string `json:"DefaultApnNotificationProtocolVersion,omitempty"` + DefaultFcmNotificationProtocolVersion *string `json:"DefaultFcmNotificationProtocolVersion,omitempty"` + DefaultGcmNotificationProtocolVersion *string `json:"DefaultGcmNotificationProtocolVersion,omitempty"` + DeliveryCallbackEnabled *bool `json:"DeliveryCallbackEnabled,omitempty"` + DeliveryCallbackUrl *string `json:"DeliveryCallbackUrl,omitempty"` + FacebookMessengerPageId *string `json:"FacebookMessengerPageId,omitempty"` + FcmCredentialSid *string `json:"FcmCredentialSid,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + GcmCredentialSid *string `json:"GcmCredentialSid,omitempty"` + LogEnabled *bool `json:"LogEnabled,omitempty"` + MessagingServiceSid *string `json:"MessagingServiceSid,omitempty"` } /* @@ -368,134 +368,141 @@ type CreateServiceParams struct { * @param "LogEnabled" (bool) - Whether to log notifications. Can be: `true` or `false` and the default is `true`. * @param "MessagingServiceSid" (string) - The SID of the [Messaging Service](https://www.twilio.com/docs/sms/send-messages#messaging-services) to use for SMS Bindings. This parameter must be set in order to send SMS notifications. * @return NotifyV1Service - */ +*/ func (c *DefaultApiService) CreateService(params *CreateServiceParams) (*NotifyV1Service, error) { - path := "/v1/Services" + path := "/v1/Services" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.AlexaSkillId != nil { - data.Set("AlexaSkillId", *params.AlexaSkillId) - } - if params != nil && params.ApnCredentialSid != nil { - data.Set("ApnCredentialSid", *params.ApnCredentialSid) - } - if params != nil && params.DefaultAlexaNotificationProtocolVersion != nil { - data.Set("DefaultAlexaNotificationProtocolVersion", *params.DefaultAlexaNotificationProtocolVersion) - } - if params != nil && params.DefaultApnNotificationProtocolVersion != nil { - data.Set("DefaultApnNotificationProtocolVersion", *params.DefaultApnNotificationProtocolVersion) - } - if params != nil && params.DefaultFcmNotificationProtocolVersion != nil { - data.Set("DefaultFcmNotificationProtocolVersion", *params.DefaultFcmNotificationProtocolVersion) - } - if params != nil && params.DefaultGcmNotificationProtocolVersion != nil { - data.Set("DefaultGcmNotificationProtocolVersion", *params.DefaultGcmNotificationProtocolVersion) - } - if params != nil && params.DeliveryCallbackEnabled != nil { - data.Set("DeliveryCallbackEnabled", fmt.Sprint(*params.DeliveryCallbackEnabled)) - } - if params != nil && params.DeliveryCallbackUrl != nil { - data.Set("DeliveryCallbackUrl", *params.DeliveryCallbackUrl) - } - if params != nil && params.FacebookMessengerPageId != nil { - data.Set("FacebookMessengerPageId", *params.FacebookMessengerPageId) - } - if params != nil && params.FcmCredentialSid != nil { - data.Set("FcmCredentialSid", *params.FcmCredentialSid) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.GcmCredentialSid != nil { - data.Set("GcmCredentialSid", *params.GcmCredentialSid) - } - if params != nil && params.LogEnabled != nil { - data.Set("LogEnabled", fmt.Sprint(*params.LogEnabled)) - } - if params != nil && params.MessagingServiceSid != nil { - data.Set("MessagingServiceSid", *params.MessagingServiceSid) - } + if params != nil && params.AlexaSkillId != nil { + data.Set("AlexaSkillId", *params.AlexaSkillId) +} + if params != nil && params.ApnCredentialSid != nil { + data.Set("ApnCredentialSid", *params.ApnCredentialSid) +} + if params != nil && params.DefaultAlexaNotificationProtocolVersion != nil { + data.Set("DefaultAlexaNotificationProtocolVersion", *params.DefaultAlexaNotificationProtocolVersion) +} + if params != nil && params.DefaultApnNotificationProtocolVersion != nil { + data.Set("DefaultApnNotificationProtocolVersion", *params.DefaultApnNotificationProtocolVersion) +} + if params != nil && params.DefaultFcmNotificationProtocolVersion != nil { + data.Set("DefaultFcmNotificationProtocolVersion", *params.DefaultFcmNotificationProtocolVersion) +} + if params != nil && params.DefaultGcmNotificationProtocolVersion != nil { + data.Set("DefaultGcmNotificationProtocolVersion", *params.DefaultGcmNotificationProtocolVersion) +} + if params != nil && params.DeliveryCallbackEnabled != nil { + data.Set("DeliveryCallbackEnabled", fmt.Sprint(*params.DeliveryCallbackEnabled)) +} + if params != nil && params.DeliveryCallbackUrl != nil { + data.Set("DeliveryCallbackUrl", *params.DeliveryCallbackUrl) +} + if params != nil && params.FacebookMessengerPageId != nil { + data.Set("FacebookMessengerPageId", *params.FacebookMessengerPageId) +} + if params != nil && params.FcmCredentialSid != nil { + data.Set("FcmCredentialSid", *params.FcmCredentialSid) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.GcmCredentialSid != nil { + data.Set("GcmCredentialSid", *params.GcmCredentialSid) +} + if params != nil && params.LogEnabled != nil { + data.Set("LogEnabled", fmt.Sprint(*params.LogEnabled)) +} + if params != nil && params.MessagingServiceSid != nil { + data.Set("MessagingServiceSid", *params.MessagingServiceSid) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &NotifyV1Service{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() + + ps := &NotifyV1Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * DeleteBinding Method for DeleteBinding * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/notify/api/service-resource) to delete the resource from. * @param Sid The Twilio-provided string that uniquely identifies the Binding resource to delete. - */ -func (c *DefaultApiService) DeleteBinding(ServiceSid string, Sid string) error { - path := "/v1/Services/{ServiceSid}/Bindings/{Sid}" +*/ +func (c *DefaultApiService) DeleteBinding(ServiceSid string, Sid string, ) (error) { + path := "/v1/Services/{ServiceSid}/Bindings/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* * DeleteCredential Method for DeleteCredential * @param Sid The Twilio-provided string that uniquely identifies the Credential resource to delete. - */ -func (c *DefaultApiService) DeleteCredential(Sid string) error { - path := "/v1/Credentials/{Sid}" +*/ +func (c *DefaultApiService) DeleteCredential(Sid string, ) (error) { + path := "/v1/Credentials/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* * DeleteService Method for DeleteService * @param Sid The Twilio-provided string that uniquely identifies the Service resource to delete. - */ -func (c *DefaultApiService) DeleteService(Sid string) error { - path := "/v1/Services/{Sid}" +*/ +func (c *DefaultApiService) DeleteService(Sid string, ) (error) { + path := "/v1/Services/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* @@ -503,91 +510,96 @@ func (c *DefaultApiService) DeleteService(Sid string) error { * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/notify/api/service-resource) to fetch the resource from. * @param Sid The Twilio-provided string that uniquely identifies the Binding resource to fetch. * @return NotifyV1ServiceBinding - */ -func (c *DefaultApiService) FetchBinding(ServiceSid string, Sid string) (*NotifyV1ServiceBinding, error) { - path := "/v1/Services/{ServiceSid}/Bindings/{Sid}" +*/ +func (c *DefaultApiService) FetchBinding(ServiceSid string, Sid string, ) (*NotifyV1ServiceBinding, error) { + path := "/v1/Services/{ServiceSid}/Bindings/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &NotifyV1ServiceBinding{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &NotifyV1ServiceBinding{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * FetchCredential Method for FetchCredential * @param Sid The Twilio-provided string that uniquely identifies the Credential resource to fetch. * @return NotifyV1Credential - */ -func (c *DefaultApiService) FetchCredential(Sid string) (*NotifyV1Credential, error) { - path := "/v1/Credentials/{Sid}" +*/ +func (c *DefaultApiService) FetchCredential(Sid string, ) (*NotifyV1Credential, error) { + path := "/v1/Credentials/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &NotifyV1Credential{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err + defer resp.Body.Close() + + ps := &NotifyV1Credential{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* * FetchService Method for FetchService * @param Sid The Twilio-provided string that uniquely identifies the Service resource to fetch. * @return NotifyV1Service - */ -func (c *DefaultApiService) FetchService(Sid string) (*NotifyV1Service, error) { - path := "/v1/Services/{Sid}" +*/ +func (c *DefaultApiService) FetchService(Sid string, ) (*NotifyV1Service, error) { + path := "/v1/Services/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &NotifyV1Service{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err -} + defer resp.Body.Close() + + ps := &NotifyV1Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListBindingParams Optional parameters for the method 'ListBinding' type ListBindingParams struct { StartDate *time.Time `json:"StartDate,omitempty"` - EndDate *time.Time `json:"EndDate,omitempty"` - Identity *[]string `json:"Identity,omitempty"` - Tag *[]string `json:"Tag,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + EndDate *time.Time `json:"EndDate,omitempty"` + Identity *[]string `json:"Identity,omitempty"` + Tag *[]string `json:"Tag,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -600,45 +612,45 @@ type ListBindingParams struct { * @param "Tag" ([]string) - Only list Bindings that have all of the specified Tags. The following implicit tags are available: `all`, `apn`, `fcm`, `gcm`, `sms`, `facebook-messenger`. Up to 5 tags are allowed. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListBindingResponse - */ +*/ func (c *DefaultApiService) ListBinding(ServiceSid string, params *ListBindingParams) (*ListBindingResponse, error) { - path := "/v1/Services/{ServiceSid}/Bindings" + path := "/v1/Services/{ServiceSid}/Bindings" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.StartDate != nil { - data.Set("StartDate", fmt.Sprint(*params.StartDate)) - } - if params != nil && params.EndDate != nil { - data.Set("EndDate", fmt.Sprint(*params.EndDate)) - } - if params != nil && params.Identity != nil { - data.Set("Identity", strings.Join(*params.Identity, ",")) - } - if params != nil && params.Tag != nil { - data.Set("Tag", strings.Join(*params.Tag, ",")) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) +} + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) +} + if params != nil && params.Identity != nil { + data.Set("Identity", strings.Join(*params.Identity, ",")) +} + if params != nil && params.Tag != nil { + data.Set("Tag", strings.Join(*params.Tag, ",")) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListBindingResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListBindingResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListCredentialParams Optional parameters for the method 'ListCredential' type ListCredentialParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -649,36 +661,36 @@ type ListCredentialParams struct { * @param optional nil or *ListCredentialParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListCredentialResponse - */ +*/ func (c *DefaultApiService) ListCredential(params *ListCredentialParams) (*ListCredentialResponse, error) { - path := "/v1/Credentials" + path := "/v1/Credentials" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListCredentialResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListCredentialResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListServiceParams Optional parameters for the method 'ListService' type ListServiceParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -687,43 +699,43 @@ type ListServiceParams struct { * @param "FriendlyName" (string) - The string that identifies the Service resources to read. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListServiceResponse - */ +*/ func (c *DefaultApiService) ListService(params *ListServiceParams) (*ListServiceResponse, error) { - path := "/v1/Services" + path := "/v1/Services" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListServiceResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListServiceResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateCredentialParams Optional parameters for the method 'UpdateCredential' type UpdateCredentialParams struct { - ApiKey *string `json:"ApiKey,omitempty"` - Certificate *string `json:"Certificate,omitempty"` + ApiKey *string `json:"ApiKey,omitempty"` + Certificate *string `json:"Certificate,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` - PrivateKey *string `json:"PrivateKey,omitempty"` - Sandbox *bool `json:"Sandbox,omitempty"` - Secret *string `json:"Secret,omitempty"` + PrivateKey *string `json:"PrivateKey,omitempty"` + Sandbox *bool `json:"Sandbox,omitempty"` + Secret *string `json:"Secret,omitempty"` } /* @@ -737,64 +749,64 @@ type UpdateCredentialParams struct { * @param "Sandbox" (bool) - [APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production. * @param "Secret" (string) - [FCM only] The `Server key` of your project from Firebase console under Settings / Cloud messaging. * @return NotifyV1Credential - */ +*/ func (c *DefaultApiService) UpdateCredential(Sid string, params *UpdateCredentialParams) (*NotifyV1Credential, error) { - path := "/v1/Credentials/{Sid}" + path := "/v1/Credentials/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.ApiKey != nil { - data.Set("ApiKey", *params.ApiKey) - } - if params != nil && params.Certificate != nil { - data.Set("Certificate", *params.Certificate) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.PrivateKey != nil { - data.Set("PrivateKey", *params.PrivateKey) - } - if params != nil && params.Sandbox != nil { - data.Set("Sandbox", fmt.Sprint(*params.Sandbox)) - } - if params != nil && params.Secret != nil { - data.Set("Secret", *params.Secret) - } + if params != nil && params.ApiKey != nil { + data.Set("ApiKey", *params.ApiKey) +} + if params != nil && params.Certificate != nil { + data.Set("Certificate", *params.Certificate) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.PrivateKey != nil { + data.Set("PrivateKey", *params.PrivateKey) +} + if params != nil && params.Sandbox != nil { + data.Set("Sandbox", fmt.Sprint(*params.Sandbox)) +} + if params != nil && params.Secret != nil { + data.Set("Secret", *params.Secret) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &NotifyV1Credential{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &NotifyV1Credential{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateServiceParams Optional parameters for the method 'UpdateService' type UpdateServiceParams struct { - AlexaSkillId *string `json:"AlexaSkillId,omitempty"` - ApnCredentialSid *string `json:"ApnCredentialSid,omitempty"` + AlexaSkillId *string `json:"AlexaSkillId,omitempty"` + ApnCredentialSid *string `json:"ApnCredentialSid,omitempty"` DefaultAlexaNotificationProtocolVersion *string `json:"DefaultAlexaNotificationProtocolVersion,omitempty"` - DefaultApnNotificationProtocolVersion *string `json:"DefaultApnNotificationProtocolVersion,omitempty"` - DefaultFcmNotificationProtocolVersion *string `json:"DefaultFcmNotificationProtocolVersion,omitempty"` - DefaultGcmNotificationProtocolVersion *string `json:"DefaultGcmNotificationProtocolVersion,omitempty"` - DeliveryCallbackEnabled *bool `json:"DeliveryCallbackEnabled,omitempty"` - DeliveryCallbackUrl *string `json:"DeliveryCallbackUrl,omitempty"` - FacebookMessengerPageId *string `json:"FacebookMessengerPageId,omitempty"` - FcmCredentialSid *string `json:"FcmCredentialSid,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - GcmCredentialSid *string `json:"GcmCredentialSid,omitempty"` - LogEnabled *bool `json:"LogEnabled,omitempty"` - MessagingServiceSid *string `json:"MessagingServiceSid,omitempty"` + DefaultApnNotificationProtocolVersion *string `json:"DefaultApnNotificationProtocolVersion,omitempty"` + DefaultFcmNotificationProtocolVersion *string `json:"DefaultFcmNotificationProtocolVersion,omitempty"` + DefaultGcmNotificationProtocolVersion *string `json:"DefaultGcmNotificationProtocolVersion,omitempty"` + DeliveryCallbackEnabled *bool `json:"DeliveryCallbackEnabled,omitempty"` + DeliveryCallbackUrl *string `json:"DeliveryCallbackUrl,omitempty"` + FacebookMessengerPageId *string `json:"FacebookMessengerPageId,omitempty"` + FcmCredentialSid *string `json:"FcmCredentialSid,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + GcmCredentialSid *string `json:"GcmCredentialSid,omitempty"` + LogEnabled *bool `json:"LogEnabled,omitempty"` + MessagingServiceSid *string `json:"MessagingServiceSid,omitempty"` } /* @@ -816,68 +828,69 @@ type UpdateServiceParams struct { * @param "LogEnabled" (bool) - Whether to log notifications. Can be: `true` or `false` and the default is `true`. * @param "MessagingServiceSid" (string) - The SID of the [Messaging Service](https://www.twilio.com/docs/sms/send-messages#messaging-services) to use for SMS Bindings. This parameter must be set in order to send SMS notifications. * @return NotifyV1Service - */ +*/ func (c *DefaultApiService) UpdateService(Sid string, params *UpdateServiceParams) (*NotifyV1Service, error) { - path := "/v1/Services/{Sid}" + path := "/v1/Services/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.AlexaSkillId != nil { - data.Set("AlexaSkillId", *params.AlexaSkillId) - } - if params != nil && params.ApnCredentialSid != nil { - data.Set("ApnCredentialSid", *params.ApnCredentialSid) - } - if params != nil && params.DefaultAlexaNotificationProtocolVersion != nil { - data.Set("DefaultAlexaNotificationProtocolVersion", *params.DefaultAlexaNotificationProtocolVersion) - } - if params != nil && params.DefaultApnNotificationProtocolVersion != nil { - data.Set("DefaultApnNotificationProtocolVersion", *params.DefaultApnNotificationProtocolVersion) - } - if params != nil && params.DefaultFcmNotificationProtocolVersion != nil { - data.Set("DefaultFcmNotificationProtocolVersion", *params.DefaultFcmNotificationProtocolVersion) - } - if params != nil && params.DefaultGcmNotificationProtocolVersion != nil { - data.Set("DefaultGcmNotificationProtocolVersion", *params.DefaultGcmNotificationProtocolVersion) - } - if params != nil && params.DeliveryCallbackEnabled != nil { - data.Set("DeliveryCallbackEnabled", fmt.Sprint(*params.DeliveryCallbackEnabled)) - } - if params != nil && params.DeliveryCallbackUrl != nil { - data.Set("DeliveryCallbackUrl", *params.DeliveryCallbackUrl) - } - if params != nil && params.FacebookMessengerPageId != nil { - data.Set("FacebookMessengerPageId", *params.FacebookMessengerPageId) - } - if params != nil && params.FcmCredentialSid != nil { - data.Set("FcmCredentialSid", *params.FcmCredentialSid) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.GcmCredentialSid != nil { - data.Set("GcmCredentialSid", *params.GcmCredentialSid) - } - if params != nil && params.LogEnabled != nil { - data.Set("LogEnabled", fmt.Sprint(*params.LogEnabled)) - } - if params != nil && params.MessagingServiceSid != nil { - data.Set("MessagingServiceSid", *params.MessagingServiceSid) - } + if params != nil && params.AlexaSkillId != nil { + data.Set("AlexaSkillId", *params.AlexaSkillId) +} + if params != nil && params.ApnCredentialSid != nil { + data.Set("ApnCredentialSid", *params.ApnCredentialSid) +} + if params != nil && params.DefaultAlexaNotificationProtocolVersion != nil { + data.Set("DefaultAlexaNotificationProtocolVersion", *params.DefaultAlexaNotificationProtocolVersion) +} + if params != nil && params.DefaultApnNotificationProtocolVersion != nil { + data.Set("DefaultApnNotificationProtocolVersion", *params.DefaultApnNotificationProtocolVersion) +} + if params != nil && params.DefaultFcmNotificationProtocolVersion != nil { + data.Set("DefaultFcmNotificationProtocolVersion", *params.DefaultFcmNotificationProtocolVersion) +} + if params != nil && params.DefaultGcmNotificationProtocolVersion != nil { + data.Set("DefaultGcmNotificationProtocolVersion", *params.DefaultGcmNotificationProtocolVersion) +} + if params != nil && params.DeliveryCallbackEnabled != nil { + data.Set("DeliveryCallbackEnabled", fmt.Sprint(*params.DeliveryCallbackEnabled)) +} + if params != nil && params.DeliveryCallbackUrl != nil { + data.Set("DeliveryCallbackUrl", *params.DeliveryCallbackUrl) +} + if params != nil && params.FacebookMessengerPageId != nil { + data.Set("FacebookMessengerPageId", *params.FacebookMessengerPageId) +} + if params != nil && params.FcmCredentialSid != nil { + data.Set("FcmCredentialSid", *params.FcmCredentialSid) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.GcmCredentialSid != nil { + data.Set("GcmCredentialSid", *params.GcmCredentialSid) +} + if params != nil && params.LogEnabled != nil { + data.Set("LogEnabled", fmt.Sprint(*params.LogEnabled)) +} + if params != nil && params.MessagingServiceSid != nil { + data.Set("MessagingServiceSid", *params.MessagingServiceSid) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &NotifyV1Service{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() + + ps := &NotifyV1Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } diff --git a/twilio/rest/notify/v1/model_list_binding_response.go b/twilio/rest/notify/v1/model_list_binding_response.go index f281fc3aa..6303c4875 100644 --- a/twilio/rest/notify/v1/model_list_binding_response.go +++ b/twilio/rest/notify/v1/model_list_binding_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Notify - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Notify + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListBindingResponse struct for ListBindingResponse type ListBindingResponse struct { - Bindings []NotifyV1ServiceBinding `json:"Bindings,omitempty"` - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Bindings []NotifyV1ServiceBinding `json:"Bindings,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/notify/v1/model_list_credential_response.go b/twilio/rest/notify/v1/model_list_credential_response.go index 26d054fd1..d9f2bc6e4 100644 --- a/twilio/rest/notify/v1/model_list_credential_response.go +++ b/twilio/rest/notify/v1/model_list_credential_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Notify - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Notify + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListCredentialResponse struct for ListCredentialResponse type ListCredentialResponse struct { - Credentials []NotifyV1Credential `json:"Credentials,omitempty"` - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Credentials []NotifyV1Credential `json:"Credentials,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/notify/v1/model_list_credential_response_meta.go b/twilio/rest/notify/v1/model_list_credential_response_meta.go index df339dd71..5ba9eca9e 100644 --- a/twilio/rest/notify/v1/model_list_credential_response_meta.go +++ b/twilio/rest/notify/v1/model_list_credential_response_meta.go @@ -1,23 +1,22 @@ /* - * Twilio - Notify - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Notify + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListCredentialResponseMeta struct for ListCredentialResponseMeta type ListCredentialResponseMeta struct { - FirstPageUrl string `json:"FirstPageUrl,omitempty"` - Key string `json:"Key,omitempty"` - NextPageUrl string `json:"NextPageUrl,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` - Url string `json:"Url,omitempty"` + Url string `json:"Url,omitempty"` } diff --git a/twilio/rest/notify/v1/model_list_service_response.go b/twilio/rest/notify/v1/model_list_service_response.go index 9794d4300..375c97391 100644 --- a/twilio/rest/notify/v1/model_list_service_response.go +++ b/twilio/rest/notify/v1/model_list_service_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Notify - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Notify + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListServiceResponse struct for ListServiceResponse type ListServiceResponse struct { - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` - Services []NotifyV1Service `json:"Services,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Services []NotifyV1Service `json:"Services,omitempty"` } diff --git a/twilio/rest/notify/v1/model_notify_v1_credential.go b/twilio/rest/notify/v1/model_notify_v1_credential.go index 45708b33d..ddfc8005c 100644 --- a/twilio/rest/notify/v1/model_notify_v1_credential.go +++ b/twilio/rest/notify/v1/model_notify_v1_credential.go @@ -1,20 +1,18 @@ /* - * Twilio - Notify - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Notify + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // NotifyV1Credential struct for NotifyV1Credential type NotifyV1Credential struct { // The SID of the Account that created the resource diff --git a/twilio/rest/notify/v1/model_notify_v1_service.go b/twilio/rest/notify/v1/model_notify_v1_service.go index 69dd55901..d53716c42 100644 --- a/twilio/rest/notify/v1/model_notify_v1_service.go +++ b/twilio/rest/notify/v1/model_notify_v1_service.go @@ -1,20 +1,18 @@ /* - * Twilio - Notify - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Notify + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // NotifyV1Service struct for NotifyV1Service type NotifyV1Service struct { // The SID of the Account that created the resource diff --git a/twilio/rest/notify/v1/model_notify_v1_service_binding.go b/twilio/rest/notify/v1/model_notify_v1_service_binding.go index 6e051ba70..a9088a58a 100644 --- a/twilio/rest/notify/v1/model_notify_v1_service_binding.go +++ b/twilio/rest/notify/v1/model_notify_v1_service_binding.go @@ -1,20 +1,18 @@ /* - * Twilio - Notify - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Notify + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // NotifyV1ServiceBinding struct for NotifyV1ServiceBinding type NotifyV1ServiceBinding struct { // The SID of the Account that created the resource diff --git a/twilio/rest/notify/v1/model_notify_v1_service_notification.go b/twilio/rest/notify/v1/model_notify_v1_service_notification.go index 402a73940..e72be4d0b 100644 --- a/twilio/rest/notify/v1/model_notify_v1_service_notification.go +++ b/twilio/rest/notify/v1/model_notify_v1_service_notification.go @@ -1,20 +1,18 @@ /* - * Twilio - Notify - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Notify + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // NotifyV1ServiceNotification struct for NotifyV1ServiceNotification type NotifyV1ServiceNotification struct { // The SID of the Account that created the resource diff --git a/twilio/rest/numbers/v2/api_default.go b/twilio/rest/numbers/v2/api_default.go index 9c2a0046a..e2170fe73 100644 --- a/twilio/rest/numbers/v2/api_default.go +++ b/twilio/rest/numbers/v2/api_default.go @@ -1,11 +1,11 @@ /* - * Twilio - Numbers - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Numbers + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,10 +14,9 @@ package openapi import ( "encoding/json" "fmt" - "net/url" - "strings" - twilio "github.com/twilio/twilio-go/client" + "net/url" + "strings" ) type DefaultApiService struct { @@ -26,20 +25,20 @@ type DefaultApiService struct { } func NewDefaultApiService(client *twilio.Client) *DefaultApiService { - return &DefaultApiService{ - client: client, + return &DefaultApiService { + client: client, baseURL: "https://numbers.twilio.com", } } // CreateBundleParams Optional parameters for the method 'CreateBundle' type CreateBundleParams struct { - Email *string `json:"Email,omitempty"` - EndUserType *string `json:"EndUserType,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - IsoCountry *string `json:"IsoCountry,omitempty"` - NumberType *string `json:"NumberType,omitempty"` - RegulationSid *string `json:"RegulationSid,omitempty"` + Email *string `json:"Email,omitempty"` + EndUserType *string `json:"EndUserType,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + IsoCountry *string `json:"IsoCountry,omitempty"` + NumberType *string `json:"NumberType,omitempty"` + RegulationSid *string `json:"RegulationSid,omitempty"` StatusCallback *string `json:"StatusCallback,omitempty"` } @@ -55,55 +54,55 @@ type CreateBundleParams struct { * @param "RegulationSid" (string) - The unique string of a regulation that is associated to the Bundle resource. * @param "StatusCallback" (string) - The URL we call to inform your application of status changes. * @return NumbersV2RegulatoryComplianceBundle - */ +*/ func (c *DefaultApiService) CreateBundle(params *CreateBundleParams) (*NumbersV2RegulatoryComplianceBundle, error) { - path := "/v2/RegulatoryCompliance/Bundles" + path := "/v2/RegulatoryCompliance/Bundles" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Email != nil { - data.Set("Email", *params.Email) - } - if params != nil && params.EndUserType != nil { - data.Set("EndUserType", *params.EndUserType) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.IsoCountry != nil { - data.Set("IsoCountry", *params.IsoCountry) - } - if params != nil && params.NumberType != nil { - data.Set("NumberType", *params.NumberType) - } - if params != nil && params.RegulationSid != nil { - data.Set("RegulationSid", *params.RegulationSid) - } - if params != nil && params.StatusCallback != nil { - data.Set("StatusCallback", *params.StatusCallback) - } + if params != nil && params.Email != nil { + data.Set("Email", *params.Email) +} + if params != nil && params.EndUserType != nil { + data.Set("EndUserType", *params.EndUserType) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.IsoCountry != nil { + data.Set("IsoCountry", *params.IsoCountry) +} + if params != nil && params.NumberType != nil { + data.Set("NumberType", *params.NumberType) +} + if params != nil && params.RegulationSid != nil { + data.Set("RegulationSid", *params.RegulationSid) +} + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &NumbersV2RegulatoryComplianceBundle{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &NumbersV2RegulatoryComplianceBundle{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateEndUserParams Optional parameters for the method 'CreateEndUser' type CreateEndUserParams struct { - Attributes *map[string]interface{} `json:"Attributes,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Type *string `json:"Type,omitempty"` + Attributes *map[string]interface{} `json:"Attributes,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Type *string `json:"Type,omitempty"` } /* @@ -114,71 +113,73 @@ type CreateEndUserParams struct { * @param "FriendlyName" (string) - The string that you assigned to describe the resource. * @param "Type" (string) - The type of end user of the Bundle resource - can be `individual` or `business`. * @return NumbersV2RegulatoryComplianceEndUser - */ +*/ func (c *DefaultApiService) CreateEndUser(params *CreateEndUserParams) (*NumbersV2RegulatoryComplianceEndUser, error) { - path := "/v2/RegulatoryCompliance/EndUsers" - - data := url.Values{} - headers := 0 - - if params != nil && params.Attributes != nil { - v, err := json.Marshal(params.Attributes) + path := "/v2/RegulatoryCompliance/EndUsers" - if err != nil { - return nil, err - } + data := url.Values{} + headers := 0 - data.Set("Attributes", fmt.Sprint(v)) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.Type != nil { - data.Set("Type", *params.Type) - } + if params != nil && params.Attributes != nil { + v, err := json.Marshal(params.Attributes) - resp, err := c.client.Post(c.baseURL+path, data, headers) if err != nil { - return nil, err + return nil, err } - defer resp.Body.Close() + data.Set("Attributes", fmt.Sprint(v)) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.Type != nil { + data.Set("Type", *params.Type) +} - ps := &NumbersV2RegulatoryComplianceEndUser{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - return ps, err + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &NumbersV2RegulatoryComplianceEndUser{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* * CreateEvaluation Method for CreateEvaluation * @param BundleSid * @return NumbersV2RegulatoryComplianceBundleEvaluation - */ -func (c *DefaultApiService) CreateEvaluation(BundleSid string) (*NumbersV2RegulatoryComplianceBundleEvaluation, error) { - path := "/v2/RegulatoryCompliance/Bundles/{BundleSid}/Evaluations" +*/ +func (c *DefaultApiService) CreateEvaluation(BundleSid string, ) (*NumbersV2RegulatoryComplianceBundleEvaluation, error) { + path := "/v2/RegulatoryCompliance/Bundles/{BundleSid}/Evaluations" path = strings.Replace(path, "{"+"BundleSid"+"}", BundleSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &NumbersV2RegulatoryComplianceBundleEvaluation{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err -} + defer resp.Body.Close() + ps := &NumbersV2RegulatoryComplianceBundleEvaluation{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} // CreateItemAssignmentParams Optional parameters for the method 'CreateItemAssignment' type CreateItemAssignmentParams struct { ObjectSid *string `json:"ObjectSid,omitempty"` @@ -191,38 +192,38 @@ type CreateItemAssignmentParams struct { * @param optional nil or *CreateItemAssignmentParams - Optional Parameters: * @param "ObjectSid" (string) - The SID of an object bag that holds information of the different items. * @return NumbersV2RegulatoryComplianceBundleItemAssignment - */ +*/ func (c *DefaultApiService) CreateItemAssignment(BundleSid string, params *CreateItemAssignmentParams) (*NumbersV2RegulatoryComplianceBundleItemAssignment, error) { - path := "/v2/RegulatoryCompliance/Bundles/{BundleSid}/ItemAssignments" + path := "/v2/RegulatoryCompliance/Bundles/{BundleSid}/ItemAssignments" path = strings.Replace(path, "{"+"BundleSid"+"}", BundleSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.ObjectSid != nil { - data.Set("ObjectSid", *params.ObjectSid) - } + if params != nil && params.ObjectSid != nil { + data.Set("ObjectSid", *params.ObjectSid) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &NumbersV2RegulatoryComplianceBundleItemAssignment{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &NumbersV2RegulatoryComplianceBundleItemAssignment{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateSupportingDocumentParams Optional parameters for the method 'CreateSupportingDocument' type CreateSupportingDocumentParams struct { - Attributes *map[string]interface{} `json:"Attributes,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Type *string `json:"Type,omitempty"` + Attributes *map[string]interface{} `json:"Attributes,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Type *string `json:"Type,omitempty"` } /* @@ -233,86 +234,91 @@ type CreateSupportingDocumentParams struct { * @param "FriendlyName" (string) - The string that you assigned to describe the resource. * @param "Type" (string) - The type of the Supporting Document. * @return NumbersV2RegulatoryComplianceSupportingDocument - */ +*/ func (c *DefaultApiService) CreateSupportingDocument(params *CreateSupportingDocumentParams) (*NumbersV2RegulatoryComplianceSupportingDocument, error) { - path := "/v2/RegulatoryCompliance/SupportingDocuments" - - data := url.Values{} - headers := 0 + path := "/v2/RegulatoryCompliance/SupportingDocuments" - if params != nil && params.Attributes != nil { - v, err := json.Marshal(params.Attributes) + data := url.Values{} + headers := 0 - if err != nil { - return nil, err - } + if params != nil && params.Attributes != nil { + v, err := json.Marshal(params.Attributes) - data.Set("Attributes", fmt.Sprint(v)) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.Type != nil { - data.Set("Type", *params.Type) - } - - resp, err := c.client.Post(c.baseURL+path, data, headers) if err != nil { - return nil, err + return nil, err } - defer resp.Body.Close() + data.Set("Attributes", fmt.Sprint(v)) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.Type != nil { + data.Set("Type", *params.Type) +} - ps := &NumbersV2RegulatoryComplianceSupportingDocument{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - return ps, err + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &NumbersV2RegulatoryComplianceSupportingDocument{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* * DeleteBundle Method for DeleteBundle * Delete a specific Bundle. * @param Sid The unique string that we created to identify the Bundle resource. - */ -func (c *DefaultApiService) DeleteBundle(Sid string) error { - path := "/v2/RegulatoryCompliance/Bundles/{Sid}" +*/ +func (c *DefaultApiService) DeleteBundle(Sid string, ) (error) { + path := "/v2/RegulatoryCompliance/Bundles/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - return nil + defer resp.Body.Close() + + return nil } /* * DeleteEndUser Method for DeleteEndUser * Delete a specific End User. * @param Sid The unique string created by Twilio to identify the End User resource. - */ -func (c *DefaultApiService) DeleteEndUser(Sid string) error { - path := "/v2/RegulatoryCompliance/EndUsers/{Sid}" +*/ +func (c *DefaultApiService) DeleteEndUser(Sid string, ) (error) { + path := "/v2/RegulatoryCompliance/EndUsers/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - return nil + defer resp.Body.Close() + + return nil } /* @@ -320,45 +326,49 @@ func (c *DefaultApiService) DeleteEndUser(Sid string) error { * Remove an Assignment Item Instance. * @param BundleSid The unique string that we created to identify the Bundle resource. * @param Sid The unique string that we created to identify the Identity resource. - */ -func (c *DefaultApiService) DeleteItemAssignment(BundleSid string, Sid string) error { - path := "/v2/RegulatoryCompliance/Bundles/{BundleSid}/ItemAssignments/{Sid}" +*/ +func (c *DefaultApiService) DeleteItemAssignment(BundleSid string, Sid string, ) (error) { + path := "/v2/RegulatoryCompliance/Bundles/{BundleSid}/ItemAssignments/{Sid}" path = strings.Replace(path, "{"+"BundleSid"+"}", BundleSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* * DeleteSupportingDocument Method for DeleteSupportingDocument * Delete a specific Supporting Document. * @param Sid The unique string created by Twilio to identify the Supporting Document resource. - */ -func (c *DefaultApiService) DeleteSupportingDocument(Sid string) error { - path := "/v2/RegulatoryCompliance/SupportingDocuments/{Sid}" +*/ +func (c *DefaultApiService) DeleteSupportingDocument(Sid string, ) (error) { + path := "/v2/RegulatoryCompliance/SupportingDocuments/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* @@ -366,27 +376,29 @@ func (c *DefaultApiService) DeleteSupportingDocument(Sid string) error { * Fetch a specific Bundle instance. * @param Sid The unique string that we created to identify the Bundle resource. * @return NumbersV2RegulatoryComplianceBundle - */ -func (c *DefaultApiService) FetchBundle(Sid string) (*NumbersV2RegulatoryComplianceBundle, error) { - path := "/v2/RegulatoryCompliance/Bundles/{Sid}" +*/ +func (c *DefaultApiService) FetchBundle(Sid string, ) (*NumbersV2RegulatoryComplianceBundle, error) { + path := "/v2/RegulatoryCompliance/Bundles/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &NumbersV2RegulatoryComplianceBundle{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &NumbersV2RegulatoryComplianceBundle{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -394,27 +406,29 @@ func (c *DefaultApiService) FetchBundle(Sid string) (*NumbersV2RegulatoryComplia * Fetch specific End User Instance. * @param Sid The unique string created by Twilio to identify the End User resource. * @return NumbersV2RegulatoryComplianceEndUser - */ -func (c *DefaultApiService) FetchEndUser(Sid string) (*NumbersV2RegulatoryComplianceEndUser, error) { - path := "/v2/RegulatoryCompliance/EndUsers/{Sid}" +*/ +func (c *DefaultApiService) FetchEndUser(Sid string, ) (*NumbersV2RegulatoryComplianceEndUser, error) { + path := "/v2/RegulatoryCompliance/EndUsers/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &NumbersV2RegulatoryComplianceEndUser{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err + defer resp.Body.Close() + + ps := &NumbersV2RegulatoryComplianceEndUser{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -422,27 +436,29 @@ func (c *DefaultApiService) FetchEndUser(Sid string) (*NumbersV2RegulatoryCompli * Fetch a specific End-User Type Instance. * @param Sid The unique string that identifies the End-User Type resource. * @return NumbersV2RegulatoryComplianceEndUserType - */ -func (c *DefaultApiService) FetchEndUserType(Sid string) (*NumbersV2RegulatoryComplianceEndUserType, error) { - path := "/v2/RegulatoryCompliance/EndUserTypes/{Sid}" +*/ +func (c *DefaultApiService) FetchEndUserType(Sid string, ) (*NumbersV2RegulatoryComplianceEndUserType, error) { + path := "/v2/RegulatoryCompliance/EndUserTypes/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &NumbersV2RegulatoryComplianceEndUserType{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &NumbersV2RegulatoryComplianceEndUserType{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -451,28 +467,30 @@ func (c *DefaultApiService) FetchEndUserType(Sid string) (*NumbersV2RegulatoryCo * @param BundleSid The unique string that we created to identify the Bundle resource. * @param Sid The unique string that identifies the Evaluation resource. * @return NumbersV2RegulatoryComplianceBundleEvaluation - */ -func (c *DefaultApiService) FetchEvaluation(BundleSid string, Sid string) (*NumbersV2RegulatoryComplianceBundleEvaluation, error) { - path := "/v2/RegulatoryCompliance/Bundles/{BundleSid}/Evaluations/{Sid}" +*/ +func (c *DefaultApiService) FetchEvaluation(BundleSid string, Sid string, ) (*NumbersV2RegulatoryComplianceBundleEvaluation, error) { + path := "/v2/RegulatoryCompliance/Bundles/{BundleSid}/Evaluations/{Sid}" path = strings.Replace(path, "{"+"BundleSid"+"}", BundleSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &NumbersV2RegulatoryComplianceBundleEvaluation{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &NumbersV2RegulatoryComplianceBundleEvaluation{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -481,28 +499,30 @@ func (c *DefaultApiService) FetchEvaluation(BundleSid string, Sid string) (*Numb * @param BundleSid The unique string that we created to identify the Bundle resource. * @param Sid The unique string that we created to identify the Identity resource. * @return NumbersV2RegulatoryComplianceBundleItemAssignment - */ -func (c *DefaultApiService) FetchItemAssignment(BundleSid string, Sid string) (*NumbersV2RegulatoryComplianceBundleItemAssignment, error) { - path := "/v2/RegulatoryCompliance/Bundles/{BundleSid}/ItemAssignments/{Sid}" +*/ +func (c *DefaultApiService) FetchItemAssignment(BundleSid string, Sid string, ) (*NumbersV2RegulatoryComplianceBundleItemAssignment, error) { + path := "/v2/RegulatoryCompliance/Bundles/{BundleSid}/ItemAssignments/{Sid}" path = strings.Replace(path, "{"+"BundleSid"+"}", BundleSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &NumbersV2RegulatoryComplianceBundleItemAssignment{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &NumbersV2RegulatoryComplianceBundleItemAssignment{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -510,27 +530,29 @@ func (c *DefaultApiService) FetchItemAssignment(BundleSid string, Sid string) (* * Fetch specific Regulation Instance. * @param Sid The unique string that identifies the Regulation resource. * @return NumbersV2RegulatoryComplianceRegulation - */ -func (c *DefaultApiService) FetchRegulation(Sid string) (*NumbersV2RegulatoryComplianceRegulation, error) { - path := "/v2/RegulatoryCompliance/Regulations/{Sid}" +*/ +func (c *DefaultApiService) FetchRegulation(Sid string, ) (*NumbersV2RegulatoryComplianceRegulation, error) { + path := "/v2/RegulatoryCompliance/Regulations/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &NumbersV2RegulatoryComplianceRegulation{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &NumbersV2RegulatoryComplianceRegulation{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -538,27 +560,29 @@ func (c *DefaultApiService) FetchRegulation(Sid string) (*NumbersV2RegulatoryCom * Fetch specific Supporting Document Instance. * @param Sid The unique string created by Twilio to identify the Supporting Document resource. * @return NumbersV2RegulatoryComplianceSupportingDocument - */ -func (c *DefaultApiService) FetchSupportingDocument(Sid string) (*NumbersV2RegulatoryComplianceSupportingDocument, error) { - path := "/v2/RegulatoryCompliance/SupportingDocuments/{Sid}" +*/ +func (c *DefaultApiService) FetchSupportingDocument(Sid string, ) (*NumbersV2RegulatoryComplianceSupportingDocument, error) { + path := "/v2/RegulatoryCompliance/SupportingDocuments/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &NumbersV2RegulatoryComplianceSupportingDocument{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err + defer resp.Body.Close() + + ps := &NumbersV2RegulatoryComplianceSupportingDocument{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -566,37 +590,38 @@ func (c *DefaultApiService) FetchSupportingDocument(Sid string) (*NumbersV2Regul * Fetch a specific Supporting Document Type Instance. * @param Sid The unique string that identifies the Supporting Document Type resource. * @return NumbersV2RegulatoryComplianceSupportingDocumentType - */ -func (c *DefaultApiService) FetchSupportingDocumentType(Sid string) (*NumbersV2RegulatoryComplianceSupportingDocumentType, error) { - path := "/v2/RegulatoryCompliance/SupportingDocumentTypes/{Sid}" +*/ +func (c *DefaultApiService) FetchSupportingDocumentType(Sid string, ) (*NumbersV2RegulatoryComplianceSupportingDocumentType, error) { + path := "/v2/RegulatoryCompliance/SupportingDocumentTypes/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &NumbersV2RegulatoryComplianceSupportingDocumentType{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err -} + defer resp.Body.Close() + + ps := &NumbersV2RegulatoryComplianceSupportingDocumentType{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListBundleParams Optional parameters for the method 'ListBundle' type ListBundleParams struct { - Status *string `json:"Status,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` + Status *string `json:"Status,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` RegulationSid *string `json:"RegulationSid,omitempty"` - IsoCountry *string `json:"IsoCountry,omitempty"` - NumberType *string `json:"NumberType,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + IsoCountry *string `json:"IsoCountry,omitempty"` + NumberType *string `json:"NumberType,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -610,47 +635,47 @@ type ListBundleParams struct { * @param "NumberType" (string) - The type of phone number of the Bundle's ownership request. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListBundleResponse - */ +*/ func (c *DefaultApiService) ListBundle(params *ListBundleParams) (*ListBundleResponse, error) { - path := "/v2/RegulatoryCompliance/Bundles" + path := "/v2/RegulatoryCompliance/Bundles" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.RegulationSid != nil { - data.Set("RegulationSid", *params.RegulationSid) - } - if params != nil && params.IsoCountry != nil { - data.Set("IsoCountry", *params.IsoCountry) - } - if params != nil && params.NumberType != nil { - data.Set("NumberType", *params.NumberType) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.RegulationSid != nil { + data.Set("RegulationSid", *params.RegulationSid) +} + if params != nil && params.IsoCountry != nil { + data.Set("IsoCountry", *params.IsoCountry) +} + if params != nil && params.NumberType != nil { + data.Set("NumberType", *params.NumberType) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListBundleResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListBundleResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListEndUserParams Optional parameters for the method 'ListEndUser' type ListEndUserParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -662,32 +687,32 @@ type ListEndUserParams struct { * @param optional nil or *ListEndUserParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListEndUserResponse - */ +*/ func (c *DefaultApiService) ListEndUser(params *ListEndUserParams) (*ListEndUserResponse, error) { - path := "/v2/RegulatoryCompliance/EndUsers" + path := "/v2/RegulatoryCompliance/EndUsers" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListEndUserResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListEndUserResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListEndUserTypeParams Optional parameters for the method 'ListEndUserType' type ListEndUserTypeParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -699,32 +724,32 @@ type ListEndUserTypeParams struct { * @param optional nil or *ListEndUserTypeParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListEndUserTypeResponse - */ +*/ func (c *DefaultApiService) ListEndUserType(params *ListEndUserTypeParams) (*ListEndUserTypeResponse, error) { - path := "/v2/RegulatoryCompliance/EndUserTypes" + path := "/v2/RegulatoryCompliance/EndUserTypes" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListEndUserTypeResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListEndUserTypeResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListEvaluationParams Optional parameters for the method 'ListEvaluation' type ListEvaluationParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -737,33 +762,33 @@ type ListEvaluationParams struct { * @param optional nil or *ListEvaluationParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListEvaluationResponse - */ +*/ func (c *DefaultApiService) ListEvaluation(BundleSid string, params *ListEvaluationParams) (*ListEvaluationResponse, error) { - path := "/v2/RegulatoryCompliance/Bundles/{BundleSid}/Evaluations" + path := "/v2/RegulatoryCompliance/Bundles/{BundleSid}/Evaluations" path = strings.Replace(path, "{"+"BundleSid"+"}", BundleSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListEvaluationResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListEvaluationResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListItemAssignmentParams Optional parameters for the method 'ListItemAssignment' type ListItemAssignmentParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -776,39 +801,39 @@ type ListItemAssignmentParams struct { * @param optional nil or *ListItemAssignmentParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListItemAssignmentResponse - */ +*/ func (c *DefaultApiService) ListItemAssignment(BundleSid string, params *ListItemAssignmentParams) (*ListItemAssignmentResponse, error) { - path := "/v2/RegulatoryCompliance/Bundles/{BundleSid}/ItemAssignments" + path := "/v2/RegulatoryCompliance/Bundles/{BundleSid}/ItemAssignments" path = strings.Replace(path, "{"+"BundleSid"+"}", BundleSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListItemAssignmentResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListItemAssignmentResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListRegulationParams Optional parameters for the method 'ListRegulation' type ListRegulationParams struct { EndUserType *string `json:"EndUserType,omitempty"` - IsoCountry *string `json:"IsoCountry,omitempty"` - NumberType *string `json:"NumberType,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + IsoCountry *string `json:"IsoCountry,omitempty"` + NumberType *string `json:"NumberType,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -820,41 +845,41 @@ type ListRegulationParams struct { * @param "NumberType" (string) - The type of phone number that the regulatory requiremnt is restricting. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListRegulationResponse - */ +*/ func (c *DefaultApiService) ListRegulation(params *ListRegulationParams) (*ListRegulationResponse, error) { - path := "/v2/RegulatoryCompliance/Regulations" + path := "/v2/RegulatoryCompliance/Regulations" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.EndUserType != nil { - data.Set("EndUserType", *params.EndUserType) - } - if params != nil && params.IsoCountry != nil { - data.Set("IsoCountry", *params.IsoCountry) - } - if params != nil && params.NumberType != nil { - data.Set("NumberType", *params.NumberType) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.EndUserType != nil { + data.Set("EndUserType", *params.EndUserType) +} + if params != nil && params.IsoCountry != nil { + data.Set("IsoCountry", *params.IsoCountry) +} + if params != nil && params.NumberType != nil { + data.Set("NumberType", *params.NumberType) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListRegulationResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListRegulationResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListSupportingDocumentParams Optional parameters for the method 'ListSupportingDocument' type ListSupportingDocumentParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -866,32 +891,32 @@ type ListSupportingDocumentParams struct { * @param optional nil or *ListSupportingDocumentParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListSupportingDocumentResponse - */ +*/ func (c *DefaultApiService) ListSupportingDocument(params *ListSupportingDocumentParams) (*ListSupportingDocumentResponse, error) { - path := "/v2/RegulatoryCompliance/SupportingDocuments" + path := "/v2/RegulatoryCompliance/SupportingDocuments" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListSupportingDocumentResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListSupportingDocumentResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListSupportingDocumentTypeParams Optional parameters for the method 'ListSupportingDocumentType' type ListSupportingDocumentTypeParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -903,37 +928,37 @@ type ListSupportingDocumentTypeParams struct { * @param optional nil or *ListSupportingDocumentTypeParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListSupportingDocumentTypeResponse - */ +*/ func (c *DefaultApiService) ListSupportingDocumentType(params *ListSupportingDocumentTypeParams) (*ListSupportingDocumentTypeResponse, error) { - path := "/v2/RegulatoryCompliance/SupportingDocumentTypes" + path := "/v2/RegulatoryCompliance/SupportingDocumentTypes" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListSupportingDocumentTypeResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListSupportingDocumentTypeResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateBundleParams Optional parameters for the method 'UpdateBundle' type UpdateBundleParams struct { - Email *string `json:"Email,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Status *string `json:"Status,omitempty"` + Email *string `json:"Email,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Status *string `json:"Status,omitempty"` StatusCallback *string `json:"StatusCallback,omitempty"` } @@ -947,46 +972,46 @@ type UpdateBundleParams struct { * @param "Status" (string) - The verification status of the Bundle resource. * @param "StatusCallback" (string) - The URL we call to inform your application of status changes. * @return NumbersV2RegulatoryComplianceBundle - */ +*/ func (c *DefaultApiService) UpdateBundle(Sid string, params *UpdateBundleParams) (*NumbersV2RegulatoryComplianceBundle, error) { - path := "/v2/RegulatoryCompliance/Bundles/{Sid}" + path := "/v2/RegulatoryCompliance/Bundles/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Email != nil { - data.Set("Email", *params.Email) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) - } - if params != nil && params.StatusCallback != nil { - data.Set("StatusCallback", *params.StatusCallback) - } + if params != nil && params.Email != nil { + data.Set("Email", *params.Email) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) +} + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &NumbersV2RegulatoryComplianceBundle{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &NumbersV2RegulatoryComplianceBundle{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateEndUserParams Optional parameters for the method 'UpdateEndUser' type UpdateEndUserParams struct { - Attributes *map[string]interface{} `json:"Attributes,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` + Attributes *map[string]interface{} `json:"Attributes,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` } /* @@ -997,46 +1022,46 @@ type UpdateEndUserParams struct { * @param "Attributes" (map[string]interface{}) - The set of parameters that are the attributes of the End User resource which are derived End User Types. * @param "FriendlyName" (string) - The string that you assigned to describe the resource. * @return NumbersV2RegulatoryComplianceEndUser - */ +*/ func (c *DefaultApiService) UpdateEndUser(Sid string, params *UpdateEndUserParams) (*NumbersV2RegulatoryComplianceEndUser, error) { - path := "/v2/RegulatoryCompliance/EndUsers/{Sid}" + path := "/v2/RegulatoryCompliance/EndUsers/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Attributes != nil { - v, err := json.Marshal(params.Attributes) + if params != nil && params.Attributes != nil { + v, err := json.Marshal(params.Attributes) - if err != nil { - return nil, err - } - - data.Set("Attributes", fmt.Sprint(v)) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - - resp, err := c.client.Post(c.baseURL+path, data, headers) if err != nil { - return nil, err + return nil, err } - defer resp.Body.Close() + data.Set("Attributes", fmt.Sprint(v)) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} - ps := &NumbersV2RegulatoryComplianceEndUser{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - return ps, err -} + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + ps := &NumbersV2RegulatoryComplianceEndUser{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} // UpdateSupportingDocumentParams Optional parameters for the method 'UpdateSupportingDocument' type UpdateSupportingDocumentParams struct { - Attributes *map[string]interface{} `json:"Attributes,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` + Attributes *map[string]interface{} `json:"Attributes,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` } /* @@ -1047,38 +1072,39 @@ type UpdateSupportingDocumentParams struct { * @param "Attributes" (map[string]interface{}) - The set of parameters that are the attributes of the Supporting Document resource which are derived Supporting Document Types. * @param "FriendlyName" (string) - The string that you assigned to describe the resource. * @return NumbersV2RegulatoryComplianceSupportingDocument - */ +*/ func (c *DefaultApiService) UpdateSupportingDocument(Sid string, params *UpdateSupportingDocumentParams) (*NumbersV2RegulatoryComplianceSupportingDocument, error) { - path := "/v2/RegulatoryCompliance/SupportingDocuments/{Sid}" + path := "/v2/RegulatoryCompliance/SupportingDocuments/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Attributes != nil { - v, err := json.Marshal(params.Attributes) - - if err != nil { - return nil, err - } - - data.Set("Attributes", fmt.Sprint(v)) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } + if params != nil && params.Attributes != nil { + v, err := json.Marshal(params.Attributes) - resp, err := c.client.Post(c.baseURL+path, data, headers) if err != nil { - return nil, err + return nil, err } - defer resp.Body.Close() + data.Set("Attributes", fmt.Sprint(v)) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} - ps := &NumbersV2RegulatoryComplianceSupportingDocument{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - return ps, err + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &NumbersV2RegulatoryComplianceSupportingDocument{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } diff --git a/twilio/rest/numbers/v2/model_list_bundle_response.go b/twilio/rest/numbers/v2/model_list_bundle_response.go index a1e35a94e..6680ec50b 100644 --- a/twilio/rest/numbers/v2/model_list_bundle_response.go +++ b/twilio/rest/numbers/v2/model_list_bundle_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Numbers - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Numbers + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListBundleResponse struct for ListBundleResponse type ListBundleResponse struct { - Meta ListBundleResponseMeta `json:"Meta,omitempty"` + Meta ListBundleResponseMeta `json:"Meta,omitempty"` Results []NumbersV2RegulatoryComplianceBundle `json:"Results,omitempty"` } diff --git a/twilio/rest/numbers/v2/model_list_bundle_response_meta.go b/twilio/rest/numbers/v2/model_list_bundle_response_meta.go index 0e7a76039..be4e3c018 100644 --- a/twilio/rest/numbers/v2/model_list_bundle_response_meta.go +++ b/twilio/rest/numbers/v2/model_list_bundle_response_meta.go @@ -1,23 +1,22 @@ /* - * Twilio - Numbers - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Numbers + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListBundleResponseMeta struct for ListBundleResponseMeta type ListBundleResponseMeta struct { - FirstPageUrl string `json:"FirstPageUrl,omitempty"` - Key string `json:"Key,omitempty"` - NextPageUrl string `json:"NextPageUrl,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` - Url string `json:"Url,omitempty"` + Url string `json:"Url,omitempty"` } diff --git a/twilio/rest/numbers/v2/model_list_end_user_response.go b/twilio/rest/numbers/v2/model_list_end_user_response.go index bc956cf85..0bad695e0 100644 --- a/twilio/rest/numbers/v2/model_list_end_user_response.go +++ b/twilio/rest/numbers/v2/model_list_end_user_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Numbers - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Numbers + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListEndUserResponse struct for ListEndUserResponse type ListEndUserResponse struct { - Meta ListBundleResponseMeta `json:"Meta,omitempty"` + Meta ListBundleResponseMeta `json:"Meta,omitempty"` Results []NumbersV2RegulatoryComplianceEndUser `json:"Results,omitempty"` } diff --git a/twilio/rest/numbers/v2/model_list_end_user_type_response.go b/twilio/rest/numbers/v2/model_list_end_user_type_response.go index 242c9aab5..81b367ef5 100644 --- a/twilio/rest/numbers/v2/model_list_end_user_type_response.go +++ b/twilio/rest/numbers/v2/model_list_end_user_type_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Numbers - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Numbers + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListEndUserTypeResponse struct for ListEndUserTypeResponse type ListEndUserTypeResponse struct { EndUserTypes []NumbersV2RegulatoryComplianceEndUserType `json:"EndUserTypes,omitempty"` - Meta ListBundleResponseMeta `json:"Meta,omitempty"` + Meta ListBundleResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/numbers/v2/model_list_evaluation_response.go b/twilio/rest/numbers/v2/model_list_evaluation_response.go index 4a7d0498d..39d824d6a 100644 --- a/twilio/rest/numbers/v2/model_list_evaluation_response.go +++ b/twilio/rest/numbers/v2/model_list_evaluation_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Numbers - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Numbers + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListEvaluationResponse struct for ListEvaluationResponse type ListEvaluationResponse struct { - Meta ListBundleResponseMeta `json:"Meta,omitempty"` + Meta ListBundleResponseMeta `json:"Meta,omitempty"` Results []NumbersV2RegulatoryComplianceBundleEvaluation `json:"Results,omitempty"` } diff --git a/twilio/rest/numbers/v2/model_list_item_assignment_response.go b/twilio/rest/numbers/v2/model_list_item_assignment_response.go index 8270be244..4086bcd19 100644 --- a/twilio/rest/numbers/v2/model_list_item_assignment_response.go +++ b/twilio/rest/numbers/v2/model_list_item_assignment_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Numbers - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Numbers + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListItemAssignmentResponse struct for ListItemAssignmentResponse type ListItemAssignmentResponse struct { - Meta ListBundleResponseMeta `json:"Meta,omitempty"` + Meta ListBundleResponseMeta `json:"Meta,omitempty"` Results []NumbersV2RegulatoryComplianceBundleItemAssignment `json:"Results,omitempty"` } diff --git a/twilio/rest/numbers/v2/model_list_regulation_response.go b/twilio/rest/numbers/v2/model_list_regulation_response.go index 8c1506687..0300ae22b 100644 --- a/twilio/rest/numbers/v2/model_list_regulation_response.go +++ b/twilio/rest/numbers/v2/model_list_regulation_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Numbers - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Numbers + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListRegulationResponse struct for ListRegulationResponse type ListRegulationResponse struct { - Meta ListBundleResponseMeta `json:"Meta,omitempty"` + Meta ListBundleResponseMeta `json:"Meta,omitempty"` Results []NumbersV2RegulatoryComplianceRegulation `json:"Results,omitempty"` } diff --git a/twilio/rest/numbers/v2/model_list_supporting_document_response.go b/twilio/rest/numbers/v2/model_list_supporting_document_response.go index 8c1f42798..1823ba133 100644 --- a/twilio/rest/numbers/v2/model_list_supporting_document_response.go +++ b/twilio/rest/numbers/v2/model_list_supporting_document_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Numbers - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Numbers + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListSupportingDocumentResponse struct for ListSupportingDocumentResponse type ListSupportingDocumentResponse struct { - Meta ListBundleResponseMeta `json:"Meta,omitempty"` + Meta ListBundleResponseMeta `json:"Meta,omitempty"` Results []NumbersV2RegulatoryComplianceSupportingDocument `json:"Results,omitempty"` } diff --git a/twilio/rest/numbers/v2/model_list_supporting_document_type_response.go b/twilio/rest/numbers/v2/model_list_supporting_document_type_response.go index 4ef13f718..650c83529 100644 --- a/twilio/rest/numbers/v2/model_list_supporting_document_type_response.go +++ b/twilio/rest/numbers/v2/model_list_supporting_document_type_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Numbers - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Numbers + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListSupportingDocumentTypeResponse struct for ListSupportingDocumentTypeResponse type ListSupportingDocumentTypeResponse struct { - Meta ListBundleResponseMeta `json:"Meta,omitempty"` + Meta ListBundleResponseMeta `json:"Meta,omitempty"` SupportingDocumentTypes []NumbersV2RegulatoryComplianceSupportingDocumentType `json:"SupportingDocumentTypes,omitempty"` } diff --git a/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_bundle.go b/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_bundle.go index bdf7e9547..9cc585ec2 100644 --- a/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_bundle.go +++ b/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_bundle.go @@ -1,20 +1,18 @@ /* - * Twilio - Numbers - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Numbers + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // NumbersV2RegulatoryComplianceBundle struct for NumbersV2RegulatoryComplianceBundle type NumbersV2RegulatoryComplianceBundle struct { // The SID of the Account that created the resource diff --git a/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_bundle_evaluation.go b/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_bundle_evaluation.go index 2db73e245..0b4c9e581 100644 --- a/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_bundle_evaluation.go +++ b/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_bundle_evaluation.go @@ -1,26 +1,24 @@ /* - * Twilio - Numbers - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Numbers + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // NumbersV2RegulatoryComplianceBundleEvaluation struct for NumbersV2RegulatoryComplianceBundleEvaluation type NumbersV2RegulatoryComplianceBundleEvaluation struct { // The SID of the Account that created the resource AccountSid *string `json:"AccountSid,omitempty"` // The unique string that identifies the resource - BundleSid *string `json:"BundleSid,omitempty"` + BundleSid *string `json:"BundleSid,omitempty"` DateCreated *time.Time `json:"DateCreated,omitempty"` // The unique string of a regulation RegulationSid *string `json:"RegulationSid,omitempty"` @@ -30,5 +28,5 @@ type NumbersV2RegulatoryComplianceBundleEvaluation struct { Sid *string `json:"Sid,omitempty"` // The compliance status of the Evaluation resource Status *string `json:"Status,omitempty"` - Url *string `json:"Url,omitempty"` + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_bundle_item_assignment.go b/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_bundle_item_assignment.go index baebc8887..a43e6c307 100644 --- a/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_bundle_item_assignment.go +++ b/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_bundle_item_assignment.go @@ -1,20 +1,18 @@ /* - * Twilio - Numbers - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Numbers + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // NumbersV2RegulatoryComplianceBundleItemAssignment struct for NumbersV2RegulatoryComplianceBundleItemAssignment type NumbersV2RegulatoryComplianceBundleItemAssignment struct { // The SID of the Account that created the resource diff --git a/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_end_user.go b/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_end_user.go index fad844f70..9bcdb0eb4 100644 --- a/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_end_user.go +++ b/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_end_user.go @@ -1,20 +1,18 @@ /* - * Twilio - Numbers - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Numbers + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // NumbersV2RegulatoryComplianceEndUser struct for NumbersV2RegulatoryComplianceEndUser type NumbersV2RegulatoryComplianceEndUser struct { // The SID of the Account that created the resource diff --git a/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_end_user_type.go b/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_end_user_type.go index ed40740ff..f8e13b6ad 100644 --- a/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_end_user_type.go +++ b/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_end_user_type.go @@ -1,16 +1,15 @@ /* - * Twilio - Numbers - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Numbers + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // NumbersV2RegulatoryComplianceEndUserType struct for NumbersV2RegulatoryComplianceEndUserType type NumbersV2RegulatoryComplianceEndUserType struct { // The required information for creating an End-User. diff --git a/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_regulation.go b/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_regulation.go index a0e9df577..58a07e342 100644 --- a/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_regulation.go +++ b/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_regulation.go @@ -1,16 +1,15 @@ /* - * Twilio - Numbers - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Numbers + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // NumbersV2RegulatoryComplianceRegulation struct for NumbersV2RegulatoryComplianceRegulation type NumbersV2RegulatoryComplianceRegulation struct { // The type of End User of the Regulation resource diff --git a/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_supporting_document.go b/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_supporting_document.go index 4c5dd75fe..52c261e3c 100644 --- a/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_supporting_document.go +++ b/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_supporting_document.go @@ -1,20 +1,18 @@ /* - * Twilio - Numbers - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Numbers + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // NumbersV2RegulatoryComplianceSupportingDocument struct for NumbersV2RegulatoryComplianceSupportingDocument type NumbersV2RegulatoryComplianceSupportingDocument struct { // The SID of the Account that created the resource diff --git a/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_supporting_document_type.go b/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_supporting_document_type.go index 53b8665eb..ba003e0af 100644 --- a/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_supporting_document_type.go +++ b/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_supporting_document_type.go @@ -1,16 +1,15 @@ /* - * Twilio - Numbers - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Numbers + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // NumbersV2RegulatoryComplianceSupportingDocumentType struct for NumbersV2RegulatoryComplianceSupportingDocumentType type NumbersV2RegulatoryComplianceSupportingDocumentType struct { // The required information for creating a Supporting Document diff --git a/twilio/rest/pricing/v1/api_default.go b/twilio/rest/pricing/v1/api_default.go index 344c8bdb6..7c8ed438d 100644 --- a/twilio/rest/pricing/v1/api_default.go +++ b/twilio/rest/pricing/v1/api_default.go @@ -1,11 +1,11 @@ /* - * Twilio - Pricing - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,10 +14,9 @@ package openapi import ( "encoding/json" "fmt" - "net/url" - "strings" - twilio "github.com/twilio/twilio-go/client" + "net/url" + "strings" ) type DefaultApiService struct { @@ -26,120 +25,128 @@ type DefaultApiService struct { } func NewDefaultApiService(client *twilio.Client) *DefaultApiService { - return &DefaultApiService{ - client: client, + return &DefaultApiService { + client: client, baseURL: "https://pricing.twilio.com", } } + /* * FetchMessagingCountry Method for FetchMessagingCountry * @param IsoCountry The [ISO country code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the pricing information to fetch. * @return PricingV1MessagingMessagingCountryInstance - */ -func (c *DefaultApiService) FetchMessagingCountry(IsoCountry string) (*PricingV1MessagingMessagingCountryInstance, error) { - path := "/v1/Messaging/Countries/{IsoCountry}" +*/ +func (c *DefaultApiService) FetchMessagingCountry(IsoCountry string, ) (*PricingV1MessagingMessagingCountryInstance, error) { + path := "/v1/Messaging/Countries/{IsoCountry}" path = strings.Replace(path, "{"+"IsoCountry"+"}", IsoCountry, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &PricingV1MessagingMessagingCountryInstance{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PricingV1MessagingMessagingCountryInstance{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * FetchPhoneNumberCountry Method for FetchPhoneNumberCountry * @param IsoCountry The [ISO country code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the pricing information to fetch. * @return PricingV1PhoneNumberPhoneNumberCountryInstance - */ -func (c *DefaultApiService) FetchPhoneNumberCountry(IsoCountry string) (*PricingV1PhoneNumberPhoneNumberCountryInstance, error) { - path := "/v1/PhoneNumbers/Countries/{IsoCountry}" +*/ +func (c *DefaultApiService) FetchPhoneNumberCountry(IsoCountry string, ) (*PricingV1PhoneNumberPhoneNumberCountryInstance, error) { + path := "/v1/PhoneNumbers/Countries/{IsoCountry}" path = strings.Replace(path, "{"+"IsoCountry"+"}", IsoCountry, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &PricingV1PhoneNumberPhoneNumberCountryInstance{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err + defer resp.Body.Close() + + ps := &PricingV1PhoneNumberPhoneNumberCountryInstance{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* * FetchVoiceCountry Method for FetchVoiceCountry * @param IsoCountry The [ISO country code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the pricing information to fetch. * @return PricingV1VoiceVoiceCountryInstance - */ -func (c *DefaultApiService) FetchVoiceCountry(IsoCountry string) (*PricingV1VoiceVoiceCountryInstance, error) { - path := "/v1/Voice/Countries/{IsoCountry}" +*/ +func (c *DefaultApiService) FetchVoiceCountry(IsoCountry string, ) (*PricingV1VoiceVoiceCountryInstance, error) { + path := "/v1/Voice/Countries/{IsoCountry}" path = strings.Replace(path, "{"+"IsoCountry"+"}", IsoCountry, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &PricingV1VoiceVoiceCountryInstance{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &PricingV1VoiceVoiceCountryInstance{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* * FetchVoiceNumber Method for FetchVoiceNumber * @param Number The phone number to fetch. * @return PricingV1VoiceVoiceNumber - */ -func (c *DefaultApiService) FetchVoiceNumber(Number string) (*PricingV1VoiceVoiceNumber, error) { - path := "/v1/Voice/Numbers/{Number}" +*/ +func (c *DefaultApiService) FetchVoiceNumber(Number string, ) (*PricingV1VoiceVoiceNumber, error) { + path := "/v1/Voice/Numbers/{Number}" path = strings.Replace(path, "{"+"Number"+"}", Number, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &PricingV1VoiceVoiceNumber{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err -} + defer resp.Body.Close() + ps := &PricingV1VoiceVoiceNumber{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} // ListMessagingCountryParams Optional parameters for the method 'ListMessagingCountry' type ListMessagingCountryParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -150,32 +157,32 @@ type ListMessagingCountryParams struct { * @param optional nil or *ListMessagingCountryParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListMessagingCountryResponse - */ +*/ func (c *DefaultApiService) ListMessagingCountry(params *ListMessagingCountryParams) (*ListMessagingCountryResponse, error) { - path := "/v1/Messaging/Countries" + path := "/v1/Messaging/Countries" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListMessagingCountryResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListMessagingCountryResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListPhoneNumberCountryParams Optional parameters for the method 'ListPhoneNumberCountry' type ListPhoneNumberCountryParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -186,32 +193,32 @@ type ListPhoneNumberCountryParams struct { * @param optional nil or *ListPhoneNumberCountryParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListPhoneNumberCountryResponse - */ +*/ func (c *DefaultApiService) ListPhoneNumberCountry(params *ListPhoneNumberCountryParams) (*ListPhoneNumberCountryResponse, error) { - path := "/v1/PhoneNumbers/Countries" + path := "/v1/PhoneNumbers/Countries" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListPhoneNumberCountryResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListPhoneNumberCountryResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListVoiceCountryParams Optional parameters for the method 'ListVoiceCountry' type ListVoiceCountryParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -222,28 +229,29 @@ type ListVoiceCountryParams struct { * @param optional nil or *ListVoiceCountryParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListVoiceCountryResponse - */ +*/ func (c *DefaultApiService) ListVoiceCountry(params *ListVoiceCountryParams) (*ListVoiceCountryResponse, error) { - path := "/v1/Voice/Countries" + path := "/v1/Voice/Countries" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListVoiceCountryResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() + + ps := &ListVoiceCountryResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } diff --git a/twilio/rest/pricing/v1/model_list_messaging_country_response.go b/twilio/rest/pricing/v1/model_list_messaging_country_response.go index 11d718486..fe8fab607 100644 --- a/twilio/rest/pricing/v1/model_list_messaging_country_response.go +++ b/twilio/rest/pricing/v1/model_list_messaging_country_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Pricing - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListMessagingCountryResponse struct for ListMessagingCountryResponse type ListMessagingCountryResponse struct { Countries []PricingV1MessagingMessagingCountry `json:"Countries,omitempty"` - Meta ListMessagingCountryResponseMeta `json:"Meta,omitempty"` + Meta ListMessagingCountryResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/pricing/v1/model_list_messaging_country_response_meta.go b/twilio/rest/pricing/v1/model_list_messaging_country_response_meta.go index f4f5fd118..6920911ea 100644 --- a/twilio/rest/pricing/v1/model_list_messaging_country_response_meta.go +++ b/twilio/rest/pricing/v1/model_list_messaging_country_response_meta.go @@ -1,23 +1,22 @@ /* - * Twilio - Pricing - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListMessagingCountryResponseMeta struct for ListMessagingCountryResponseMeta type ListMessagingCountryResponseMeta struct { - FirstPageUrl string `json:"FirstPageUrl,omitempty"` - Key string `json:"Key,omitempty"` - NextPageUrl string `json:"NextPageUrl,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` - Url string `json:"Url,omitempty"` + Url string `json:"Url,omitempty"` } diff --git a/twilio/rest/pricing/v1/model_list_phone_number_country_response.go b/twilio/rest/pricing/v1/model_list_phone_number_country_response.go index 4210d2b6f..14f0946a9 100644 --- a/twilio/rest/pricing/v1/model_list_phone_number_country_response.go +++ b/twilio/rest/pricing/v1/model_list_phone_number_country_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Pricing - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListPhoneNumberCountryResponse struct for ListPhoneNumberCountryResponse type ListPhoneNumberCountryResponse struct { Countries []PricingV1PhoneNumberPhoneNumberCountry `json:"Countries,omitempty"` - Meta ListMessagingCountryResponseMeta `json:"Meta,omitempty"` + Meta ListMessagingCountryResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/pricing/v1/model_list_voice_country_response.go b/twilio/rest/pricing/v1/model_list_voice_country_response.go index 0da901612..2af159c75 100644 --- a/twilio/rest/pricing/v1/model_list_voice_country_response.go +++ b/twilio/rest/pricing/v1/model_list_voice_country_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Pricing - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListVoiceCountryResponse struct for ListVoiceCountryResponse type ListVoiceCountryResponse struct { - Countries []PricingV1VoiceVoiceCountry `json:"Countries,omitempty"` - Meta ListMessagingCountryResponseMeta `json:"Meta,omitempty"` + Countries []PricingV1VoiceVoiceCountry `json:"Countries,omitempty"` + Meta ListMessagingCountryResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/pricing/v1/model_pricing_v1_messaging.go b/twilio/rest/pricing/v1/model_pricing_v1_messaging.go index 90c6a6fd6..0da347218 100644 --- a/twilio/rest/pricing/v1/model_pricing_v1_messaging.go +++ b/twilio/rest/pricing/v1/model_pricing_v1_messaging.go @@ -1,19 +1,18 @@ /* - * Twilio - Pricing - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // PricingV1Messaging struct for PricingV1Messaging type PricingV1Messaging struct { Links *map[string]interface{} `json:"Links,omitempty"` - Name *string `json:"Name,omitempty"` - Url *string `json:"Url,omitempty"` + Name *string `json:"Name,omitempty"` + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/pricing/v1/model_pricing_v1_messaging_messaging_country.go b/twilio/rest/pricing/v1/model_pricing_v1_messaging_messaging_country.go index 7aa303631..f69597a00 100644 --- a/twilio/rest/pricing/v1/model_pricing_v1_messaging_messaging_country.go +++ b/twilio/rest/pricing/v1/model_pricing_v1_messaging_messaging_country.go @@ -1,16 +1,15 @@ /* - * Twilio - Pricing - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // PricingV1MessagingMessagingCountry struct for PricingV1MessagingMessagingCountry type PricingV1MessagingMessagingCountry struct { // The name of the country diff --git a/twilio/rest/pricing/v1/model_pricing_v1_messaging_messaging_country_instance.go b/twilio/rest/pricing/v1/model_pricing_v1_messaging_messaging_country_instance.go index 319631551..0e984ef26 100644 --- a/twilio/rest/pricing/v1/model_pricing_v1_messaging_messaging_country_instance.go +++ b/twilio/rest/pricing/v1/model_pricing_v1_messaging_messaging_country_instance.go @@ -1,16 +1,15 @@ /* - * Twilio - Pricing - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // PricingV1MessagingMessagingCountryInstance struct for PricingV1MessagingMessagingCountryInstance type PricingV1MessagingMessagingCountryInstance struct { // The name of the country diff --git a/twilio/rest/pricing/v1/model_pricing_v1_messaging_messaging_country_instance_inbound_sms_prices.go b/twilio/rest/pricing/v1/model_pricing_v1_messaging_messaging_country_instance_inbound_sms_prices.go index 12a393e15..7b5ca563f 100644 --- a/twilio/rest/pricing/v1/model_pricing_v1_messaging_messaging_country_instance_inbound_sms_prices.go +++ b/twilio/rest/pricing/v1/model_pricing_v1_messaging_messaging_country_instance_inbound_sms_prices.go @@ -1,19 +1,18 @@ /* - * Twilio - Pricing - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // PricingV1MessagingMessagingCountryInstanceInboundSmsPrices struct for PricingV1MessagingMessagingCountryInstanceInboundSmsPrices type PricingV1MessagingMessagingCountryInstanceInboundSmsPrices struct { - BasePrice float32 `json:"BasePrice,omitempty"` + BasePrice float32 `json:"BasePrice,omitempty"` CurrentPrice float32 `json:"CurrentPrice,omitempty"` - NumberType string `json:"NumberType,omitempty"` + NumberType string `json:"NumberType,omitempty"` } diff --git a/twilio/rest/pricing/v1/model_pricing_v1_messaging_messaging_country_instance_outbound_sms_prices.go b/twilio/rest/pricing/v1/model_pricing_v1_messaging_messaging_country_instance_outbound_sms_prices.go index 5211bf193..d126cf9e0 100644 --- a/twilio/rest/pricing/v1/model_pricing_v1_messaging_messaging_country_instance_outbound_sms_prices.go +++ b/twilio/rest/pricing/v1/model_pricing_v1_messaging_messaging_country_instance_outbound_sms_prices.go @@ -1,20 +1,19 @@ /* - * Twilio - Pricing - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // PricingV1MessagingMessagingCountryInstanceOutboundSmsPrices struct for PricingV1MessagingMessagingCountryInstanceOutboundSmsPrices type PricingV1MessagingMessagingCountryInstanceOutboundSmsPrices struct { - Carrier string `json:"Carrier,omitempty"` - Mcc string `json:"Mcc,omitempty"` - Mnc string `json:"Mnc,omitempty"` - Prices []PricingV1MessagingMessagingCountryInstanceInboundSmsPrices `json:"Prices,omitempty"` + Carrier string `json:"Carrier,omitempty"` + Mcc string `json:"Mcc,omitempty"` + Mnc string `json:"Mnc,omitempty"` + Prices []PricingV1MessagingMessagingCountryInstanceInboundSmsPrices `json:"Prices,omitempty"` } diff --git a/twilio/rest/pricing/v1/model_pricing_v1_phone_number.go b/twilio/rest/pricing/v1/model_pricing_v1_phone_number.go index 1623695fd..e414c9b8e 100644 --- a/twilio/rest/pricing/v1/model_pricing_v1_phone_number.go +++ b/twilio/rest/pricing/v1/model_pricing_v1_phone_number.go @@ -1,19 +1,18 @@ /* - * Twilio - Pricing - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // PricingV1PhoneNumber struct for PricingV1PhoneNumber type PricingV1PhoneNumber struct { Links *map[string]interface{} `json:"Links,omitempty"` - Name *string `json:"Name,omitempty"` - Url *string `json:"Url,omitempty"` + Name *string `json:"Name,omitempty"` + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/pricing/v1/model_pricing_v1_phone_number_phone_number_country.go b/twilio/rest/pricing/v1/model_pricing_v1_phone_number_phone_number_country.go index 5f0a46886..a8c216cb3 100644 --- a/twilio/rest/pricing/v1/model_pricing_v1_phone_number_phone_number_country.go +++ b/twilio/rest/pricing/v1/model_pricing_v1_phone_number_phone_number_country.go @@ -1,21 +1,20 @@ /* - * Twilio - Pricing - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // PricingV1PhoneNumberPhoneNumberCountry struct for PricingV1PhoneNumberPhoneNumberCountry type PricingV1PhoneNumberPhoneNumberCountry struct { // The name of the country Country *string `json:"Country,omitempty"` - // The ISO country code + // The ISO country code IsoCountry *string `json:"IsoCountry,omitempty"` // The absolute URL of the resource Url *string `json:"Url,omitempty"` diff --git a/twilio/rest/pricing/v1/model_pricing_v1_phone_number_phone_number_country_instance.go b/twilio/rest/pricing/v1/model_pricing_v1_phone_number_phone_number_country_instance.go index 339b12d8b..8a4ad7c67 100644 --- a/twilio/rest/pricing/v1/model_pricing_v1_phone_number_phone_number_country_instance.go +++ b/twilio/rest/pricing/v1/model_pricing_v1_phone_number_phone_number_country_instance.go @@ -1,21 +1,20 @@ /* - * Twilio - Pricing - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // PricingV1PhoneNumberPhoneNumberCountryInstance struct for PricingV1PhoneNumberPhoneNumberCountryInstance type PricingV1PhoneNumberPhoneNumberCountryInstance struct { // The name of the country Country *string `json:"Country,omitempty"` - // The ISO country code + // The ISO country code IsoCountry *string `json:"IsoCountry,omitempty"` // The list of PhoneNumberPrices records PhoneNumberPrices *[]PricingV1MessagingMessagingCountryInstanceInboundSmsPrices `json:"PhoneNumberPrices,omitempty"` diff --git a/twilio/rest/pricing/v1/model_pricing_v1_voice.go b/twilio/rest/pricing/v1/model_pricing_v1_voice.go index b47d27235..9cf8b9aab 100644 --- a/twilio/rest/pricing/v1/model_pricing_v1_voice.go +++ b/twilio/rest/pricing/v1/model_pricing_v1_voice.go @@ -1,19 +1,18 @@ /* - * Twilio - Pricing - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // PricingV1Voice struct for PricingV1Voice type PricingV1Voice struct { Links *map[string]interface{} `json:"Links,omitempty"` - Name *string `json:"Name,omitempty"` - Url *string `json:"Url,omitempty"` + Name *string `json:"Name,omitempty"` + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/pricing/v1/model_pricing_v1_voice_voice_country.go b/twilio/rest/pricing/v1/model_pricing_v1_voice_voice_country.go index 10fc21bdb..c4e868223 100644 --- a/twilio/rest/pricing/v1/model_pricing_v1_voice_voice_country.go +++ b/twilio/rest/pricing/v1/model_pricing_v1_voice_voice_country.go @@ -1,16 +1,15 @@ /* - * Twilio - Pricing - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // PricingV1VoiceVoiceCountry struct for PricingV1VoiceVoiceCountry type PricingV1VoiceVoiceCountry struct { // The name of the country diff --git a/twilio/rest/pricing/v1/model_pricing_v1_voice_voice_country_instance.go b/twilio/rest/pricing/v1/model_pricing_v1_voice_voice_country_instance.go index ad10a94d1..fcd1182b9 100644 --- a/twilio/rest/pricing/v1/model_pricing_v1_voice_voice_country_instance.go +++ b/twilio/rest/pricing/v1/model_pricing_v1_voice_voice_country_instance.go @@ -1,16 +1,15 @@ /* - * Twilio - Pricing - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // PricingV1VoiceVoiceCountryInstance struct for PricingV1VoiceVoiceCountryInstance type PricingV1VoiceVoiceCountryInstance struct { // The name of the country diff --git a/twilio/rest/pricing/v1/model_pricing_v1_voice_voice_country_instance_outbound_prefix_prices.go b/twilio/rest/pricing/v1/model_pricing_v1_voice_voice_country_instance_outbound_prefix_prices.go index c084c649e..73ca55909 100644 --- a/twilio/rest/pricing/v1/model_pricing_v1_voice_voice_country_instance_outbound_prefix_prices.go +++ b/twilio/rest/pricing/v1/model_pricing_v1_voice_voice_country_instance_outbound_prefix_prices.go @@ -1,20 +1,19 @@ /* - * Twilio - Pricing - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // PricingV1VoiceVoiceCountryInstanceOutboundPrefixPrices struct for PricingV1VoiceVoiceCountryInstanceOutboundPrefixPrices type PricingV1VoiceVoiceCountryInstanceOutboundPrefixPrices struct { - BasePrice float32 `json:"BasePrice,omitempty"` - CurrentPrice float32 `json:"CurrentPrice,omitempty"` - FriendlyName string `json:"FriendlyName,omitempty"` - Prefixes []string `json:"Prefixes,omitempty"` + BasePrice float32 `json:"BasePrice,omitempty"` + CurrentPrice float32 `json:"CurrentPrice,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Prefixes []string `json:"Prefixes,omitempty"` } diff --git a/twilio/rest/pricing/v1/model_pricing_v1_voice_voice_number.go b/twilio/rest/pricing/v1/model_pricing_v1_voice_voice_number.go index 200cb9f4b..9c42c3793 100644 --- a/twilio/rest/pricing/v1/model_pricing_v1_voice_voice_number.go +++ b/twilio/rest/pricing/v1/model_pricing_v1_voice_voice_number.go @@ -1,25 +1,24 @@ /* - * Twilio - Pricing - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // PricingV1VoiceVoiceNumber struct for PricingV1VoiceVoiceNumber type PricingV1VoiceVoiceNumber struct { // The name of the country - Country *string `json:"Country,omitempty"` + Country *string `json:"Country,omitempty"` InboundCallPrice *PricingV1VoiceVoiceNumberInboundCallPrice `json:"InboundCallPrice,omitempty"` // The ISO country code IsoCountry *string `json:"IsoCountry,omitempty"` // The phone number - Number *string `json:"Number,omitempty"` + Number *string `json:"Number,omitempty"` OutboundCallPrice *PricingV1VoiceVoiceNumberOutboundCallPrice `json:"OutboundCallPrice,omitempty"` // The currency in which prices are measured, in ISO 4127 format (e.g. usd, eur, jpy) PriceUnit *string `json:"PriceUnit,omitempty"` diff --git a/twilio/rest/pricing/v1/model_pricing_v1_voice_voice_number_inbound_call_price.go b/twilio/rest/pricing/v1/model_pricing_v1_voice_voice_number_inbound_call_price.go index 340823499..9ec912dbe 100644 --- a/twilio/rest/pricing/v1/model_pricing_v1_voice_voice_number_inbound_call_price.go +++ b/twilio/rest/pricing/v1/model_pricing_v1_voice_voice_number_inbound_call_price.go @@ -1,19 +1,18 @@ /* - * Twilio - Pricing - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // PricingV1VoiceVoiceNumberInboundCallPrice The InboundCallPrice record type PricingV1VoiceVoiceNumberInboundCallPrice struct { - BasePrice float32 `json:"BasePrice,omitempty"` + BasePrice float32 `json:"BasePrice,omitempty"` CurrentPrice float32 `json:"CurrentPrice,omitempty"` - NumberType string `json:"NumberType,omitempty"` + NumberType string `json:"NumberType,omitempty"` } diff --git a/twilio/rest/pricing/v1/model_pricing_v1_voice_voice_number_outbound_call_price.go b/twilio/rest/pricing/v1/model_pricing_v1_voice_voice_number_outbound_call_price.go index ba708dc2a..f7afe9e93 100644 --- a/twilio/rest/pricing/v1/model_pricing_v1_voice_voice_number_outbound_call_price.go +++ b/twilio/rest/pricing/v1/model_pricing_v1_voice_voice_number_outbound_call_price.go @@ -1,18 +1,17 @@ /* - * Twilio - Pricing - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // PricingV1VoiceVoiceNumberOutboundCallPrice The OutboundCallPrice record type PricingV1VoiceVoiceNumberOutboundCallPrice struct { - BasePrice float32 `json:"BasePrice,omitempty"` + BasePrice float32 `json:"BasePrice,omitempty"` CurrentPrice float32 `json:"CurrentPrice,omitempty"` } diff --git a/twilio/rest/pricing/v2/api_default.go b/twilio/rest/pricing/v2/api_default.go index ab3329bd0..95233f660 100644 --- a/twilio/rest/pricing/v2/api_default.go +++ b/twilio/rest/pricing/v2/api_default.go @@ -1,11 +1,11 @@ /* - * Twilio - Pricing - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,10 +14,9 @@ package openapi import ( "encoding/json" "fmt" - "net/url" - "strings" - twilio "github.com/twilio/twilio-go/client" + "net/url" + "strings" ) type DefaultApiService struct { @@ -26,40 +25,42 @@ type DefaultApiService struct { } func NewDefaultApiService(client *twilio.Client) *DefaultApiService { - return &DefaultApiService{ - client: client, + return &DefaultApiService { + client: client, baseURL: "https://pricing.twilio.com", } } + /* * FetchVoiceCountry Method for FetchVoiceCountry * Fetch a specific Country. * @param IsoCountry The [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the origin-based voice pricing information to fetch. * @return PricingV2VoiceVoiceCountryInstance - */ -func (c *DefaultApiService) FetchVoiceCountry(IsoCountry string) (*PricingV2VoiceVoiceCountryInstance, error) { - path := "/v2/Voice/Countries/{IsoCountry}" +*/ +func (c *DefaultApiService) FetchVoiceCountry(IsoCountry string, ) (*PricingV2VoiceVoiceCountryInstance, error) { + path := "/v2/Voice/Countries/{IsoCountry}" path = strings.Replace(path, "{"+"IsoCountry"+"}", IsoCountry, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &PricingV2VoiceVoiceCountryInstance{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err -} + defer resp.Body.Close() + + ps := &PricingV2VoiceVoiceCountryInstance{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // FetchVoiceNumberParams Optional parameters for the method 'FetchVoiceNumber' type FetchVoiceNumberParams struct { OriginationNumber *string `json:"OriginationNumber,omitempty"` @@ -72,33 +73,33 @@ type FetchVoiceNumberParams struct { * @param optional nil or *FetchVoiceNumberParams - Optional Parameters: * @param "OriginationNumber" (string) - The origination phone number, in [E.164](https://www.twilio.com/docs/glossary/what-e164) format, for which to fetch the origin-based voice pricing information. E.164 format consists of a + followed by the country code and subscriber number. * @return PricingV2VoiceVoiceNumber - */ +*/ func (c *DefaultApiService) FetchVoiceNumber(DestinationNumber string, params *FetchVoiceNumberParams) (*PricingV2VoiceVoiceNumber, error) { - path := "/v2/Voice/Numbers/{DestinationNumber}" + path := "/v2/Voice/Numbers/{DestinationNumber}" path = strings.Replace(path, "{"+"DestinationNumber"+"}", DestinationNumber, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.OriginationNumber != nil { - data.Set("OriginationNumber", *params.OriginationNumber) - } + if params != nil && params.OriginationNumber != nil { + data.Set("OriginationNumber", *params.OriginationNumber) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &PricingV2VoiceVoiceNumber{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &PricingV2VoiceVoiceNumber{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListVoiceCountryParams Optional parameters for the method 'ListVoiceCountry' type ListVoiceCountryParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -109,28 +110,29 @@ type ListVoiceCountryParams struct { * @param optional nil or *ListVoiceCountryParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListVoiceCountryResponse - */ +*/ func (c *DefaultApiService) ListVoiceCountry(params *ListVoiceCountryParams) (*ListVoiceCountryResponse, error) { - path := "/v2/Voice/Countries" + path := "/v2/Voice/Countries" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListVoiceCountryResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() + + ps := &ListVoiceCountryResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } diff --git a/twilio/rest/pricing/v2/model_list_voice_country_response.go b/twilio/rest/pricing/v2/model_list_voice_country_response.go index 3b5d5cc3d..6f9bc0ebc 100644 --- a/twilio/rest/pricing/v2/model_list_voice_country_response.go +++ b/twilio/rest/pricing/v2/model_list_voice_country_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Pricing - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListVoiceCountryResponse struct for ListVoiceCountryResponse type ListVoiceCountryResponse struct { Countries []PricingV2VoiceVoiceCountry `json:"Countries,omitempty"` - Meta ListVoiceCountryResponseMeta `json:"Meta,omitempty"` + Meta ListVoiceCountryResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/pricing/v2/model_list_voice_country_response_meta.go b/twilio/rest/pricing/v2/model_list_voice_country_response_meta.go index 82ae32642..76a0f64e3 100644 --- a/twilio/rest/pricing/v2/model_list_voice_country_response_meta.go +++ b/twilio/rest/pricing/v2/model_list_voice_country_response_meta.go @@ -1,23 +1,22 @@ /* - * Twilio - Pricing - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListVoiceCountryResponseMeta struct for ListVoiceCountryResponseMeta type ListVoiceCountryResponseMeta struct { - FirstPageUrl string `json:"FirstPageUrl,omitempty"` - Key string `json:"Key,omitempty"` - NextPageUrl string `json:"NextPageUrl,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` - Url string `json:"Url,omitempty"` + Url string `json:"Url,omitempty"` } diff --git a/twilio/rest/pricing/v2/model_pricing_v2_voice.go b/twilio/rest/pricing/v2/model_pricing_v2_voice.go index a595d69dc..89c664a79 100644 --- a/twilio/rest/pricing/v2/model_pricing_v2_voice.go +++ b/twilio/rest/pricing/v2/model_pricing_v2_voice.go @@ -1,16 +1,15 @@ /* - * Twilio - Pricing - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // PricingV2Voice struct for PricingV2Voice type PricingV2Voice struct { // The URLs of the related Countries and Numbers resources diff --git a/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_country.go b/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_country.go index cee3cb968..968bff234 100644 --- a/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_country.go +++ b/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_country.go @@ -1,16 +1,15 @@ /* - * Twilio - Pricing - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // PricingV2VoiceVoiceCountry struct for PricingV2VoiceVoiceCountry type PricingV2VoiceVoiceCountry struct { // The name of the country diff --git a/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_country_instance.go b/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_country_instance.go index 4085704b4..b29818cf0 100644 --- a/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_country_instance.go +++ b/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_country_instance.go @@ -1,16 +1,15 @@ /* - * Twilio - Pricing - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // PricingV2VoiceVoiceCountryInstance struct for PricingV2VoiceVoiceCountryInstance type PricingV2VoiceVoiceCountryInstance struct { // The name of the country diff --git a/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_country_instance_inbound_call_prices.go b/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_country_instance_inbound_call_prices.go index 4c9fc3138..c40ec1348 100644 --- a/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_country_instance_inbound_call_prices.go +++ b/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_country_instance_inbound_call_prices.go @@ -1,19 +1,18 @@ /* - * Twilio - Pricing - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // PricingV2VoiceVoiceCountryInstanceInboundCallPrices struct for PricingV2VoiceVoiceCountryInstanceInboundCallPrices type PricingV2VoiceVoiceCountryInstanceInboundCallPrices struct { - BasePrice float32 `json:"BasePrice,omitempty"` + BasePrice float32 `json:"BasePrice,omitempty"` CurrentPrice float32 `json:"CurrentPrice,omitempty"` - NumberType string `json:"NumberType,omitempty"` + NumberType string `json:"NumberType,omitempty"` } diff --git a/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_country_instance_outbound_prefix_prices.go b/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_country_instance_outbound_prefix_prices.go index 52842775d..0df5a9f1b 100644 --- a/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_country_instance_outbound_prefix_prices.go +++ b/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_country_instance_outbound_prefix_prices.go @@ -1,21 +1,20 @@ /* - * Twilio - Pricing - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // PricingV2VoiceVoiceCountryInstanceOutboundPrefixPrices struct for PricingV2VoiceVoiceCountryInstanceOutboundPrefixPrices type PricingV2VoiceVoiceCountryInstanceOutboundPrefixPrices struct { - BasePrice float32 `json:"BasePrice,omitempty"` - CurrentPrice float32 `json:"CurrentPrice,omitempty"` + BasePrice float32 `json:"BasePrice,omitempty"` + CurrentPrice float32 `json:"CurrentPrice,omitempty"` DestinationPrefixes []string `json:"DestinationPrefixes,omitempty"` - FriendlyName string `json:"FriendlyName,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` OriginationPrefixes []string `json:"OriginationPrefixes,omitempty"` } diff --git a/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_number.go b/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_number.go index 0afead333..99fa21749 100644 --- a/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_number.go +++ b/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_number.go @@ -1,23 +1,22 @@ /* - * Twilio - Pricing - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // PricingV2VoiceVoiceNumber struct for PricingV2VoiceVoiceNumber type PricingV2VoiceVoiceNumber struct { // The name of the country Country *string `json:"Country,omitempty"` // The destination phone number, in E.164 format - DestinationNumber *string `json:"DestinationNumber,omitempty"` - InboundCallPrice *PricingV2VoiceVoiceNumberInboundCallPrice `json:"InboundCallPrice,omitempty"` + DestinationNumber *string `json:"DestinationNumber,omitempty"` + InboundCallPrice *PricingV2VoiceVoiceNumberInboundCallPrice `json:"InboundCallPrice,omitempty"` // The ISO country code IsoCountry *string `json:"IsoCountry,omitempty"` // The origination phone number, in E.164 format diff --git a/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_number_inbound_call_price.go b/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_number_inbound_call_price.go index da9db3ec0..ae3ea090e 100644 --- a/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_number_inbound_call_price.go +++ b/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_number_inbound_call_price.go @@ -1,19 +1,18 @@ /* - * Twilio - Pricing - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // PricingV2VoiceVoiceNumberInboundCallPrice The InboundCallPrice record type PricingV2VoiceVoiceNumberInboundCallPrice struct { - BasePrice float32 `json:"BasePrice,omitempty"` + BasePrice float32 `json:"BasePrice,omitempty"` CurrentPrice float32 `json:"CurrentPrice,omitempty"` - NumberType string `json:"NumberType,omitempty"` + NumberType string `json:"NumberType,omitempty"` } diff --git a/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_number_outbound_call_prices.go b/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_number_outbound_call_prices.go index 08855a660..58a4a11b4 100644 --- a/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_number_outbound_call_prices.go +++ b/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_number_outbound_call_prices.go @@ -1,19 +1,18 @@ /* - * Twilio - Pricing - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // PricingV2VoiceVoiceNumberOutboundCallPrices struct for PricingV2VoiceVoiceNumberOutboundCallPrices type PricingV2VoiceVoiceNumberOutboundCallPrices struct { - BasePrice float32 `json:"BasePrice,omitempty"` - CurrentPrice float32 `json:"CurrentPrice,omitempty"` + BasePrice float32 `json:"BasePrice,omitempty"` + CurrentPrice float32 `json:"CurrentPrice,omitempty"` OriginationPrefixes []string `json:"OriginationPrefixes,omitempty"` } diff --git a/twilio/rest/proxy/v1/api_default.go b/twilio/rest/proxy/v1/api_default.go index 5a389f026..7649c1a81 100644 --- a/twilio/rest/proxy/v1/api_default.go +++ b/twilio/rest/proxy/v1/api_default.go @@ -1,11 +1,11 @@ /* - * Twilio - Proxy - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Proxy + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,11 +14,10 @@ package openapi import ( "encoding/json" "fmt" - "net/url" - "strings" - "time" - twilio "github.com/twilio/twilio-go/client" + "net/url" + "strings" + "time" ) type DefaultApiService struct { @@ -27,15 +26,15 @@ type DefaultApiService struct { } func NewDefaultApiService(client *twilio.Client) *DefaultApiService { - return &DefaultApiService{ - client: client, + return &DefaultApiService { + client: client, baseURL: "https://proxy.twilio.com", } } // CreateMessageInteractionParams Optional parameters for the method 'CreateMessageInteraction' type CreateMessageInteractionParams struct { - Body *string `json:"Body,omitempty"` + Body *string `json:"Body,omitempty"` MediaUrl *[]string `json:"MediaUrl,omitempty"` } @@ -49,45 +48,45 @@ type CreateMessageInteractionParams struct { * @param "Body" (string) - The message to send to the participant * @param "MediaUrl" ([]string) - Reserved. Not currently supported. * @return ProxyV1ServiceSessionParticipantMessageInteraction - */ +*/ func (c *DefaultApiService) CreateMessageInteraction(ServiceSid string, SessionSid string, ParticipantSid string, params *CreateMessageInteractionParams) (*ProxyV1ServiceSessionParticipantMessageInteraction, error) { - path := "/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants/{ParticipantSid}/MessageInteractions" + path := "/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants/{ParticipantSid}/MessageInteractions" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"SessionSid"+"}", SessionSid, -1) path = strings.Replace(path, "{"+"ParticipantSid"+"}", ParticipantSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Body != nil { - data.Set("Body", *params.Body) - } - if params != nil && params.MediaUrl != nil { - data.Set("MediaUrl", strings.Join(*params.MediaUrl, ",")) - } + if params != nil && params.Body != nil { + data.Set("Body", *params.Body) +} + if params != nil && params.MediaUrl != nil { + data.Set("MediaUrl", strings.Join(*params.MediaUrl, ",")) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ProxyV1ServiceSessionParticipantMessageInteraction{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ProxyV1ServiceSessionParticipantMessageInteraction{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateParticipantParams Optional parameters for the method 'CreateParticipant' type CreateParticipantParams struct { - FailOnParticipantConflict *bool `json:"FailOnParticipantConflict,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Identifier *string `json:"Identifier,omitempty"` - ProxyIdentifier *string `json:"ProxyIdentifier,omitempty"` - ProxyIdentifierSid *string `json:"ProxyIdentifierSid,omitempty"` + FailOnParticipantConflict *bool `json:"FailOnParticipantConflict,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Identifier *string `json:"Identifier,omitempty"` + ProxyIdentifier *string `json:"ProxyIdentifier,omitempty"` + ProxyIdentifierSid *string `json:"ProxyIdentifierSid,omitempty"` } /* @@ -102,51 +101,51 @@ type CreateParticipantParams struct { * @param "ProxyIdentifier" (string) - The proxy phone number to use for the Participant. If not specified, Proxy will select a number from the pool. * @param "ProxyIdentifierSid" (string) - The SID of the Proxy Identifier to assign to the Participant. * @return ProxyV1ServiceSessionParticipant - */ +*/ func (c *DefaultApiService) CreateParticipant(ServiceSid string, SessionSid string, params *CreateParticipantParams) (*ProxyV1ServiceSessionParticipant, error) { - path := "/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants" + path := "/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"SessionSid"+"}", SessionSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.FailOnParticipantConflict != nil { - data.Set("FailOnParticipantConflict", fmt.Sprint(*params.FailOnParticipantConflict)) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.Identifier != nil { - data.Set("Identifier", *params.Identifier) - } - if params != nil && params.ProxyIdentifier != nil { - data.Set("ProxyIdentifier", *params.ProxyIdentifier) - } - if params != nil && params.ProxyIdentifierSid != nil { - data.Set("ProxyIdentifierSid", *params.ProxyIdentifierSid) - } + if params != nil && params.FailOnParticipantConflict != nil { + data.Set("FailOnParticipantConflict", fmt.Sprint(*params.FailOnParticipantConflict)) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.Identifier != nil { + data.Set("Identifier", *params.Identifier) +} + if params != nil && params.ProxyIdentifier != nil { + data.Set("ProxyIdentifier", *params.ProxyIdentifier) +} + if params != nil && params.ProxyIdentifierSid != nil { + data.Set("ProxyIdentifierSid", *params.ProxyIdentifierSid) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ProxyV1ServiceSessionParticipant{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ProxyV1ServiceSessionParticipant{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreatePhoneNumberParams Optional parameters for the method 'CreatePhoneNumber' type CreatePhoneNumberParams struct { - IsReserved *bool `json:"IsReserved,omitempty"` + IsReserved *bool `json:"IsReserved,omitempty"` PhoneNumber *string `json:"PhoneNumber,omitempty"` - Sid *string `json:"Sid,omitempty"` + Sid *string `json:"Sid,omitempty"` } /* @@ -158,49 +157,49 @@ type CreatePhoneNumberParams struct { * @param "PhoneNumber" (string) - The phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format. E.164 phone numbers consist of a + followed by the country code and subscriber number without punctuation characters. For example, +14155551234. * @param "Sid" (string) - The SID of a Twilio [IncomingPhoneNumber](https://www.twilio.com/docs/phone-numbers/api/incomingphonenumber-resource) resource that represents the Twilio Number you would like to assign to your Proxy Service. * @return ProxyV1ServicePhoneNumber - */ +*/ func (c *DefaultApiService) CreatePhoneNumber(ServiceSid string, params *CreatePhoneNumberParams) (*ProxyV1ServicePhoneNumber, error) { - path := "/v1/Services/{ServiceSid}/PhoneNumbers" + path := "/v1/Services/{ServiceSid}/PhoneNumbers" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.IsReserved != nil { - data.Set("IsReserved", fmt.Sprint(*params.IsReserved)) - } - if params != nil && params.PhoneNumber != nil { - data.Set("PhoneNumber", *params.PhoneNumber) - } - if params != nil && params.Sid != nil { - data.Set("Sid", *params.Sid) - } + if params != nil && params.IsReserved != nil { + data.Set("IsReserved", fmt.Sprint(*params.IsReserved)) +} + if params != nil && params.PhoneNumber != nil { + data.Set("PhoneNumber", *params.PhoneNumber) +} + if params != nil && params.Sid != nil { + data.Set("Sid", *params.Sid) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ProxyV1ServicePhoneNumber{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ProxyV1ServicePhoneNumber{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateServiceParams Optional parameters for the method 'CreateService' type CreateServiceParams struct { - CallbackUrl *string `json:"CallbackUrl,omitempty"` - ChatInstanceSid *string `json:"ChatInstanceSid,omitempty"` - DefaultTtl *int32 `json:"DefaultTtl,omitempty"` - GeoMatchLevel *string `json:"GeoMatchLevel,omitempty"` - InterceptCallbackUrl *string `json:"InterceptCallbackUrl,omitempty"` + CallbackUrl *string `json:"CallbackUrl,omitempty"` + ChatInstanceSid *string `json:"ChatInstanceSid,omitempty"` + DefaultTtl *int32 `json:"DefaultTtl,omitempty"` + GeoMatchLevel *string `json:"GeoMatchLevel,omitempty"` + InterceptCallbackUrl *string `json:"InterceptCallbackUrl,omitempty"` NumberSelectionBehavior *string `json:"NumberSelectionBehavior,omitempty"` OutOfSessionCallbackUrl *string `json:"OutOfSessionCallbackUrl,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` } /* @@ -216,62 +215,62 @@ type CreateServiceParams struct { * @param "OutOfSessionCallbackUrl" (string) - The URL we should call when an inbound call or SMS action occurs on a closed or non-existent Session. If your server (or a Twilio [function](https://www.twilio.com/functions)) responds with valid [TwiML](https://www.twilio.com/docs/voice/twiml), we will process it. This means it is possible, for example, to play a message for a call, send an automated text message response, or redirect a call to another Phone Number. See [Out-of-Session Callback Response Guide](https://www.twilio.com/docs/proxy/out-session-callback-response-guide) for more information. * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. This value must be 191 characters or fewer in length and be unique. **This value should not have PII.** * @return ProxyV1Service - */ +*/ func (c *DefaultApiService) CreateService(params *CreateServiceParams) (*ProxyV1Service, error) { - path := "/v1/Services" + path := "/v1/Services" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.CallbackUrl != nil { - data.Set("CallbackUrl", *params.CallbackUrl) - } - if params != nil && params.ChatInstanceSid != nil { - data.Set("ChatInstanceSid", *params.ChatInstanceSid) - } - if params != nil && params.DefaultTtl != nil { - data.Set("DefaultTtl", fmt.Sprint(*params.DefaultTtl)) - } - if params != nil && params.GeoMatchLevel != nil { - data.Set("GeoMatchLevel", *params.GeoMatchLevel) - } - if params != nil && params.InterceptCallbackUrl != nil { - data.Set("InterceptCallbackUrl", *params.InterceptCallbackUrl) - } - if params != nil && params.NumberSelectionBehavior != nil { - data.Set("NumberSelectionBehavior", *params.NumberSelectionBehavior) - } - if params != nil && params.OutOfSessionCallbackUrl != nil { - data.Set("OutOfSessionCallbackUrl", *params.OutOfSessionCallbackUrl) - } - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) - } + if params != nil && params.CallbackUrl != nil { + data.Set("CallbackUrl", *params.CallbackUrl) +} + if params != nil && params.ChatInstanceSid != nil { + data.Set("ChatInstanceSid", *params.ChatInstanceSid) +} + if params != nil && params.DefaultTtl != nil { + data.Set("DefaultTtl", fmt.Sprint(*params.DefaultTtl)) +} + if params != nil && params.GeoMatchLevel != nil { + data.Set("GeoMatchLevel", *params.GeoMatchLevel) +} + if params != nil && params.InterceptCallbackUrl != nil { + data.Set("InterceptCallbackUrl", *params.InterceptCallbackUrl) +} + if params != nil && params.NumberSelectionBehavior != nil { + data.Set("NumberSelectionBehavior", *params.NumberSelectionBehavior) +} + if params != nil && params.OutOfSessionCallbackUrl != nil { + data.Set("OutOfSessionCallbackUrl", *params.OutOfSessionCallbackUrl) +} + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ProxyV1Service{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ProxyV1Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateSessionParams Optional parameters for the method 'CreateSession' type CreateSessionParams struct { - DateExpiry *time.Time `json:"DateExpiry,omitempty"` - FailOnParticipantConflict *bool `json:"FailOnParticipantConflict,omitempty"` - Mode *string `json:"Mode,omitempty"` - Participants *[]map[string]interface{} `json:"Participants,omitempty"` - Status *string `json:"Status,omitempty"` - Ttl *int32 `json:"Ttl,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + DateExpiry *time.Time `json:"DateExpiry,omitempty"` + FailOnParticipantConflict *bool `json:"FailOnParticipantConflict,omitempty"` + Mode *string `json:"Mode,omitempty"` + Participants *[]map[string]interface{} `json:"Participants,omitempty"` + Status *string `json:"Status,omitempty"` + Ttl *int32 `json:"Ttl,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` } /* @@ -287,57 +286,57 @@ type CreateSessionParams struct { * @param "Ttl" (int32) - The time, in seconds, when the session will expire. The time is measured from the last Session create or the Session's last Interaction. * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. This value must be 191 characters or fewer in length and be unique. **This value should not have PII.** * @return ProxyV1ServiceSession - */ +*/ func (c *DefaultApiService) CreateSession(ServiceSid string, params *CreateSessionParams) (*ProxyV1ServiceSession, error) { - path := "/v1/Services/{ServiceSid}/Sessions" + path := "/v1/Services/{ServiceSid}/Sessions" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.DateExpiry != nil { - data.Set("DateExpiry", fmt.Sprint(*params.DateExpiry)) - } - if params != nil && params.FailOnParticipantConflict != nil { - data.Set("FailOnParticipantConflict", fmt.Sprint(*params.FailOnParticipantConflict)) - } - if params != nil && params.Mode != nil { - data.Set("Mode", *params.Mode) + if params != nil && params.DateExpiry != nil { + data.Set("DateExpiry", fmt.Sprint(*params.DateExpiry)) +} + if params != nil && params.FailOnParticipantConflict != nil { + data.Set("FailOnParticipantConflict", fmt.Sprint(*params.FailOnParticipantConflict)) +} + if params != nil && params.Mode != nil { + data.Set("Mode", *params.Mode) +} + if params != nil && params.Participants != nil { + v, err := json.Marshal(params.Participants) + + if err != nil { + return nil, err } - if params != nil && params.Participants != nil { - v, err := json.Marshal(params.Participants) - if err != nil { - return nil, err - } + data.Set("Participants", fmt.Sprint(v)) +} + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) +} + if params != nil && params.Ttl != nil { + data.Set("Ttl", fmt.Sprint(*params.Ttl)) +} + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) +} - data.Set("Participants", fmt.Sprint(v)) - } - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) - } - if params != nil && params.Ttl != nil { - data.Set("Ttl", fmt.Sprint(*params.Ttl)) - } - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) - } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ProxyV1ServiceSession{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ProxyV1ServiceSession{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } - // CreateShortCodeParams Optional parameters for the method 'CreateShortCode' type CreateShortCodeParams struct { Sid *string `json:"Sid,omitempty"` @@ -350,31 +349,32 @@ type CreateShortCodeParams struct { * @param optional nil or *CreateShortCodeParams - Optional Parameters: * @param "Sid" (string) - The SID of a Twilio [ShortCode](https://www.twilio.com/docs/sms/api/short-code) resource that represents the short code you would like to assign to your Proxy Service. * @return ProxyV1ServiceShortCode - */ +*/ func (c *DefaultApiService) CreateShortCode(ServiceSid string, params *CreateShortCodeParams) (*ProxyV1ServiceShortCode, error) { - path := "/v1/Services/{ServiceSid}/ShortCodes" + path := "/v1/Services/{ServiceSid}/ShortCodes" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Sid != nil { - data.Set("Sid", *params.Sid) - } + if params != nil && params.Sid != nil { + data.Set("Sid", *params.Sid) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ProxyV1ServiceShortCode{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() + + ps := &ProxyV1ServiceShortCode{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -383,24 +383,26 @@ func (c *DefaultApiService) CreateShortCode(ServiceSid string, params *CreateSho * @param ServiceSid The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) of the resource to delete. * @param SessionSid The SID of the parent [Session](https://www.twilio.com/docs/proxy/api/session) of the resource to delete. * @param Sid The Twilio-provided string that uniquely identifies the Interaction resource to delete. - */ -func (c *DefaultApiService) DeleteInteraction(ServiceSid string, SessionSid string, Sid string) error { - path := "/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Interactions/{Sid}" +*/ +func (c *DefaultApiService) DeleteInteraction(ServiceSid string, SessionSid string, Sid string, ) (error) { + path := "/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Interactions/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"SessionSid"+"}", SessionSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* @@ -409,24 +411,26 @@ func (c *DefaultApiService) DeleteInteraction(ServiceSid string, SessionSid stri * @param ServiceSid The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) of the resource to delete. * @param SessionSid The SID of the parent [Session](https://www.twilio.com/docs/proxy/api/session) of the resource to delete. * @param Sid The Twilio-provided string that uniquely identifies the Participant resource to delete. - */ -func (c *DefaultApiService) DeleteParticipant(ServiceSid string, SessionSid string, Sid string) error { - path := "/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants/{Sid}" +*/ +func (c *DefaultApiService) DeleteParticipant(ServiceSid string, SessionSid string, Sid string, ) (error) { + path := "/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"SessionSid"+"}", SessionSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - return nil + defer resp.Body.Close() + + return nil } /* @@ -434,45 +438,49 @@ func (c *DefaultApiService) DeleteParticipant(ServiceSid string, SessionSid stri * Delete a specific Phone Number from a Service. * @param ServiceSid The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) of the PhoneNumber resource to delete. * @param Sid The Twilio-provided string that uniquely identifies the PhoneNumber resource to delete. - */ -func (c *DefaultApiService) DeletePhoneNumber(ServiceSid string, Sid string) error { - path := "/v1/Services/{ServiceSid}/PhoneNumbers/{Sid}" +*/ +func (c *DefaultApiService) DeletePhoneNumber(ServiceSid string, Sid string, ) (error) { + path := "/v1/Services/{ServiceSid}/PhoneNumbers/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - return nil + defer resp.Body.Close() + + return nil } /* * DeleteService Method for DeleteService * Delete a specific Service. * @param Sid The Twilio-provided string that uniquely identifies the Service resource to delete. - */ -func (c *DefaultApiService) DeleteService(Sid string) error { - path := "/v1/Services/{Sid}" +*/ +func (c *DefaultApiService) DeleteService(Sid string, ) (error) { + path := "/v1/Services/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - return nil + defer resp.Body.Close() + + return nil } /* @@ -480,23 +488,25 @@ func (c *DefaultApiService) DeleteService(Sid string) error { * Delete a specific Session. * @param ServiceSid The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) of the resource to delete. * @param Sid The Twilio-provided string that uniquely identifies the Session resource to delete. - */ -func (c *DefaultApiService) DeleteSession(ServiceSid string, Sid string) error { - path := "/v1/Services/{ServiceSid}/Sessions/{Sid}" +*/ +func (c *DefaultApiService) DeleteSession(ServiceSid string, Sid string, ) (error) { + path := "/v1/Services/{ServiceSid}/Sessions/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* @@ -504,23 +514,25 @@ func (c *DefaultApiService) DeleteSession(ServiceSid string, Sid string) error { * Delete a specific Short Code from a Service. * @param ServiceSid The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) resource to delete the ShortCode resource from. * @param Sid The Twilio-provided string that uniquely identifies the ShortCode resource to delete. - */ -func (c *DefaultApiService) DeleteShortCode(ServiceSid string, Sid string) error { - path := "/v1/Services/{ServiceSid}/ShortCodes/{Sid}" +*/ +func (c *DefaultApiService) DeleteShortCode(ServiceSid string, Sid string, ) (error) { + path := "/v1/Services/{ServiceSid}/ShortCodes/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* @@ -530,29 +542,31 @@ func (c *DefaultApiService) DeleteShortCode(ServiceSid string, Sid string) error * @param SessionSid The SID of the parent [Session](https://www.twilio.com/docs/proxy/api/session) of the resource to fetch. * @param Sid The Twilio-provided string that uniquely identifies the Interaction resource to fetch. * @return ProxyV1ServiceSessionInteraction - */ -func (c *DefaultApiService) FetchInteraction(ServiceSid string, SessionSid string, Sid string) (*ProxyV1ServiceSessionInteraction, error) { - path := "/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Interactions/{Sid}" +*/ +func (c *DefaultApiService) FetchInteraction(ServiceSid string, SessionSid string, Sid string, ) (*ProxyV1ServiceSessionInteraction, error) { + path := "/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Interactions/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"SessionSid"+"}", SessionSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ProxyV1ServiceSessionInteraction{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &ProxyV1ServiceSessionInteraction{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -562,30 +576,32 @@ func (c *DefaultApiService) FetchInteraction(ServiceSid string, SessionSid strin * @param ParticipantSid The SID of the [Participant](https://www.twilio.com/docs/proxy/api/participant) resource. * @param Sid The Twilio-provided string that uniquely identifies the MessageInteraction resource to fetch. * @return ProxyV1ServiceSessionParticipantMessageInteraction - */ -func (c *DefaultApiService) FetchMessageInteraction(ServiceSid string, SessionSid string, ParticipantSid string, Sid string) (*ProxyV1ServiceSessionParticipantMessageInteraction, error) { - path := "/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants/{ParticipantSid}/MessageInteractions/{Sid}" +*/ +func (c *DefaultApiService) FetchMessageInteraction(ServiceSid string, SessionSid string, ParticipantSid string, Sid string, ) (*ProxyV1ServiceSessionParticipantMessageInteraction, error) { + path := "/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants/{ParticipantSid}/MessageInteractions/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"SessionSid"+"}", SessionSid, -1) path = strings.Replace(path, "{"+"ParticipantSid"+"}", ParticipantSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ProxyV1ServiceSessionParticipantMessageInteraction{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err + defer resp.Body.Close() + + ps := &ProxyV1ServiceSessionParticipantMessageInteraction{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -595,29 +611,31 @@ func (c *DefaultApiService) FetchMessageInteraction(ServiceSid string, SessionSi * @param SessionSid The SID of the parent [Session](https://www.twilio.com/docs/proxy/api/session) of the resource to fetch. * @param Sid The Twilio-provided string that uniquely identifies the Participant resource to fetch. * @return ProxyV1ServiceSessionParticipant - */ -func (c *DefaultApiService) FetchParticipant(ServiceSid string, SessionSid string, Sid string) (*ProxyV1ServiceSessionParticipant, error) { - path := "/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants/{Sid}" +*/ +func (c *DefaultApiService) FetchParticipant(ServiceSid string, SessionSid string, Sid string, ) (*ProxyV1ServiceSessionParticipant, error) { + path := "/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"SessionSid"+"}", SessionSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ProxyV1ServiceSessionParticipant{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ProxyV1ServiceSessionParticipant{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -626,28 +644,30 @@ func (c *DefaultApiService) FetchParticipant(ServiceSid string, SessionSid strin * @param ServiceSid The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) of the PhoneNumber resource to fetch. * @param Sid The Twilio-provided string that uniquely identifies the PhoneNumber resource to fetch. * @return ProxyV1ServicePhoneNumber - */ -func (c *DefaultApiService) FetchPhoneNumber(ServiceSid string, Sid string) (*ProxyV1ServicePhoneNumber, error) { - path := "/v1/Services/{ServiceSid}/PhoneNumbers/{Sid}" +*/ +func (c *DefaultApiService) FetchPhoneNumber(ServiceSid string, Sid string, ) (*ProxyV1ServicePhoneNumber, error) { + path := "/v1/Services/{ServiceSid}/PhoneNumbers/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ProxyV1ServicePhoneNumber{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &ProxyV1ServicePhoneNumber{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -655,27 +675,29 @@ func (c *DefaultApiService) FetchPhoneNumber(ServiceSid string, Sid string) (*Pr * Fetch a specific Service. * @param Sid The Twilio-provided string that uniquely identifies the Service resource to fetch. * @return ProxyV1Service - */ -func (c *DefaultApiService) FetchService(Sid string) (*ProxyV1Service, error) { - path := "/v1/Services/{Sid}" +*/ +func (c *DefaultApiService) FetchService(Sid string, ) (*ProxyV1Service, error) { + path := "/v1/Services/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ProxyV1Service{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err + defer resp.Body.Close() + + ps := &ProxyV1Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -684,28 +706,30 @@ func (c *DefaultApiService) FetchService(Sid string) (*ProxyV1Service, error) { * @param ServiceSid The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) of the resource to fetch. * @param Sid The Twilio-provided string that uniquely identifies the Session resource to fetch. * @return ProxyV1ServiceSession - */ -func (c *DefaultApiService) FetchSession(ServiceSid string, Sid string) (*ProxyV1ServiceSession, error) { - path := "/v1/Services/{ServiceSid}/Sessions/{Sid}" +*/ +func (c *DefaultApiService) FetchSession(ServiceSid string, Sid string, ) (*ProxyV1ServiceSession, error) { + path := "/v1/Services/{ServiceSid}/Sessions/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ProxyV1ServiceSession{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &ProxyV1ServiceSession{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -714,30 +738,31 @@ func (c *DefaultApiService) FetchSession(ServiceSid string, Sid string) (*ProxyV * @param ServiceSid The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) to fetch the resource from. * @param Sid The Twilio-provided string that uniquely identifies the ShortCode resource to fetch. * @return ProxyV1ServiceShortCode - */ -func (c *DefaultApiService) FetchShortCode(ServiceSid string, Sid string) (*ProxyV1ServiceShortCode, error) { - path := "/v1/Services/{ServiceSid}/ShortCodes/{Sid}" +*/ +func (c *DefaultApiService) FetchShortCode(ServiceSid string, Sid string, ) (*ProxyV1ServiceShortCode, error) { + path := "/v1/Services/{ServiceSid}/ShortCodes/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ProxyV1ServiceShortCode{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err -} + defer resp.Body.Close() + + ps := &ProxyV1ServiceShortCode{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListInteractionParams Optional parameters for the method 'ListInteraction' type ListInteractionParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -751,34 +776,34 @@ type ListInteractionParams struct { * @param optional nil or *ListInteractionParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListInteractionResponse - */ +*/ func (c *DefaultApiService) ListInteraction(ServiceSid string, SessionSid string, params *ListInteractionParams) (*ListInteractionResponse, error) { - path := "/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Interactions" + path := "/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Interactions" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"SessionSid"+"}", SessionSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListInteractionResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListInteractionResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListMessageInteractionParams Optional parameters for the method 'ListMessageInteraction' type ListMessageInteractionParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -792,35 +817,35 @@ type ListMessageInteractionParams struct { * @param optional nil or *ListMessageInteractionParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListMessageInteractionResponse - */ +*/ func (c *DefaultApiService) ListMessageInteraction(ServiceSid string, SessionSid string, ParticipantSid string, params *ListMessageInteractionParams) (*ListMessageInteractionResponse, error) { - path := "/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants/{ParticipantSid}/MessageInteractions" + path := "/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants/{ParticipantSid}/MessageInteractions" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"SessionSid"+"}", SessionSid, -1) path = strings.Replace(path, "{"+"ParticipantSid"+"}", ParticipantSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListMessageInteractionResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListMessageInteractionResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListParticipantParams Optional parameters for the method 'ListParticipant' type ListParticipantParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -834,34 +859,34 @@ type ListParticipantParams struct { * @param optional nil or *ListParticipantParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListParticipantResponse - */ +*/ func (c *DefaultApiService) ListParticipant(ServiceSid string, SessionSid string, params *ListParticipantParams) (*ListParticipantResponse, error) { - path := "/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants" + path := "/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"SessionSid"+"}", SessionSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListParticipantResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListParticipantResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListPhoneNumberParams Optional parameters for the method 'ListPhoneNumber' type ListPhoneNumberParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -874,33 +899,33 @@ type ListPhoneNumberParams struct { * @param optional nil or *ListPhoneNumberParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListPhoneNumberResponse - */ +*/ func (c *DefaultApiService) ListPhoneNumber(ServiceSid string, params *ListPhoneNumberParams) (*ListPhoneNumberResponse, error) { - path := "/v1/Services/{ServiceSid}/PhoneNumbers" + path := "/v1/Services/{ServiceSid}/PhoneNumbers" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListPhoneNumberResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListPhoneNumberResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListServiceParams Optional parameters for the method 'ListService' type ListServiceParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -912,32 +937,32 @@ type ListServiceParams struct { * @param optional nil or *ListServiceParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListServiceResponse - */ +*/ func (c *DefaultApiService) ListService(params *ListServiceParams) (*ListServiceResponse, error) { - path := "/v1/Services" + path := "/v1/Services" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListServiceResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListServiceResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListSessionParams Optional parameters for the method 'ListSession' type ListSessionParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -950,33 +975,33 @@ type ListSessionParams struct { * @param optional nil or *ListSessionParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListSessionResponse - */ +*/ func (c *DefaultApiService) ListSession(ServiceSid string, params *ListSessionParams) (*ListSessionResponse, error) { - path := "/v1/Services/{ServiceSid}/Sessions" + path := "/v1/Services/{ServiceSid}/Sessions" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListSessionResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListSessionResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListShortCodeParams Optional parameters for the method 'ListShortCode' type ListShortCodeParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -989,33 +1014,33 @@ type ListShortCodeParams struct { * @param optional nil or *ListShortCodeParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListShortCodeResponse - */ +*/ func (c *DefaultApiService) ListShortCode(ServiceSid string, params *ListShortCodeParams) (*ListShortCodeResponse, error) { - path := "/v1/Services/{ServiceSid}/ShortCodes" + path := "/v1/Services/{ServiceSid}/ShortCodes" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListShortCodeResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListShortCodeResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdatePhoneNumberParams Optional parameters for the method 'UpdatePhoneNumber' type UpdatePhoneNumberParams struct { IsReserved *bool `json:"IsReserved,omitempty"` @@ -1029,44 +1054,44 @@ type UpdatePhoneNumberParams struct { * @param optional nil or *UpdatePhoneNumberParams - Optional Parameters: * @param "IsReserved" (bool) - Whether the phone number should be reserved and not be assigned to a participant using proxy pool logic. See [Reserved Phone Numbers](https://www.twilio.com/docs/proxy/reserved-phone-numbers) for more information. * @return ProxyV1ServicePhoneNumber - */ +*/ func (c *DefaultApiService) UpdatePhoneNumber(ServiceSid string, Sid string, params *UpdatePhoneNumberParams) (*ProxyV1ServicePhoneNumber, error) { - path := "/v1/Services/{ServiceSid}/PhoneNumbers/{Sid}" + path := "/v1/Services/{ServiceSid}/PhoneNumbers/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.IsReserved != nil { - data.Set("IsReserved", fmt.Sprint(*params.IsReserved)) - } + if params != nil && params.IsReserved != nil { + data.Set("IsReserved", fmt.Sprint(*params.IsReserved)) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ProxyV1ServicePhoneNumber{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ProxyV1ServicePhoneNumber{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateServiceParams Optional parameters for the method 'UpdateService' type UpdateServiceParams struct { - CallbackUrl *string `json:"CallbackUrl,omitempty"` - ChatInstanceSid *string `json:"ChatInstanceSid,omitempty"` - DefaultTtl *int32 `json:"DefaultTtl,omitempty"` - GeoMatchLevel *string `json:"GeoMatchLevel,omitempty"` - InterceptCallbackUrl *string `json:"InterceptCallbackUrl,omitempty"` + CallbackUrl *string `json:"CallbackUrl,omitempty"` + ChatInstanceSid *string `json:"ChatInstanceSid,omitempty"` + DefaultTtl *int32 `json:"DefaultTtl,omitempty"` + GeoMatchLevel *string `json:"GeoMatchLevel,omitempty"` + InterceptCallbackUrl *string `json:"InterceptCallbackUrl,omitempty"` NumberSelectionBehavior *string `json:"NumberSelectionBehavior,omitempty"` OutOfSessionCallbackUrl *string `json:"OutOfSessionCallbackUrl,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` } /* @@ -1083,60 +1108,60 @@ type UpdateServiceParams struct { * @param "OutOfSessionCallbackUrl" (string) - The URL we should call when an inbound call or SMS action occurs on a closed or non-existent Session. If your server (or a Twilio [function](https://www.twilio.com/functions)) responds with valid [TwiML](https://www.twilio.com/docs/voice/twiml), we will process it. This means it is possible, for example, to play a message for a call, send an automated text message response, or redirect a call to another Phone Number. See [Out-of-Session Callback Response Guide](https://www.twilio.com/docs/proxy/out-session-callback-response-guide) for more information. * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. This value must be 191 characters or fewer in length and be unique. **This value should not have PII.** * @return ProxyV1Service - */ +*/ func (c *DefaultApiService) UpdateService(Sid string, params *UpdateServiceParams) (*ProxyV1Service, error) { - path := "/v1/Services/{Sid}" + path := "/v1/Services/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.CallbackUrl != nil { - data.Set("CallbackUrl", *params.CallbackUrl) - } - if params != nil && params.ChatInstanceSid != nil { - data.Set("ChatInstanceSid", *params.ChatInstanceSid) - } - if params != nil && params.DefaultTtl != nil { - data.Set("DefaultTtl", fmt.Sprint(*params.DefaultTtl)) - } - if params != nil && params.GeoMatchLevel != nil { - data.Set("GeoMatchLevel", *params.GeoMatchLevel) - } - if params != nil && params.InterceptCallbackUrl != nil { - data.Set("InterceptCallbackUrl", *params.InterceptCallbackUrl) - } - if params != nil && params.NumberSelectionBehavior != nil { - data.Set("NumberSelectionBehavior", *params.NumberSelectionBehavior) - } - if params != nil && params.OutOfSessionCallbackUrl != nil { - data.Set("OutOfSessionCallbackUrl", *params.OutOfSessionCallbackUrl) - } - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) - } + if params != nil && params.CallbackUrl != nil { + data.Set("CallbackUrl", *params.CallbackUrl) +} + if params != nil && params.ChatInstanceSid != nil { + data.Set("ChatInstanceSid", *params.ChatInstanceSid) +} + if params != nil && params.DefaultTtl != nil { + data.Set("DefaultTtl", fmt.Sprint(*params.DefaultTtl)) +} + if params != nil && params.GeoMatchLevel != nil { + data.Set("GeoMatchLevel", *params.GeoMatchLevel) +} + if params != nil && params.InterceptCallbackUrl != nil { + data.Set("InterceptCallbackUrl", *params.InterceptCallbackUrl) +} + if params != nil && params.NumberSelectionBehavior != nil { + data.Set("NumberSelectionBehavior", *params.NumberSelectionBehavior) +} + if params != nil && params.OutOfSessionCallbackUrl != nil { + data.Set("OutOfSessionCallbackUrl", *params.OutOfSessionCallbackUrl) +} + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ProxyV1Service{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ProxyV1Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateSessionParams Optional parameters for the method 'UpdateSession' type UpdateSessionParams struct { - DateExpiry *time.Time `json:"DateExpiry,omitempty"` - FailOnParticipantConflict *bool `json:"FailOnParticipantConflict,omitempty"` - Status *string `json:"Status,omitempty"` - Ttl *int32 `json:"Ttl,omitempty"` + DateExpiry *time.Time `json:"DateExpiry,omitempty"` + FailOnParticipantConflict *bool `json:"FailOnParticipantConflict,omitempty"` + Status *string `json:"Status,omitempty"` + Ttl *int32 `json:"Ttl,omitempty"` } /* @@ -1150,43 +1175,43 @@ type UpdateSessionParams struct { * @param "Status" (string) - The new status of the resource. Can be: `in-progress` to re-open a session or `closed` to close a session. * @param "Ttl" (int32) - The time, in seconds, when the session will expire. The time is measured from the last Session create or the Session's last Interaction. * @return ProxyV1ServiceSession - */ +*/ func (c *DefaultApiService) UpdateSession(ServiceSid string, Sid string, params *UpdateSessionParams) (*ProxyV1ServiceSession, error) { - path := "/v1/Services/{ServiceSid}/Sessions/{Sid}" + path := "/v1/Services/{ServiceSid}/Sessions/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.DateExpiry != nil { - data.Set("DateExpiry", fmt.Sprint(*params.DateExpiry)) - } - if params != nil && params.FailOnParticipantConflict != nil { - data.Set("FailOnParticipantConflict", fmt.Sprint(*params.FailOnParticipantConflict)) - } - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) - } - if params != nil && params.Ttl != nil { - data.Set("Ttl", fmt.Sprint(*params.Ttl)) - } + if params != nil && params.DateExpiry != nil { + data.Set("DateExpiry", fmt.Sprint(*params.DateExpiry)) +} + if params != nil && params.FailOnParticipantConflict != nil { + data.Set("FailOnParticipantConflict", fmt.Sprint(*params.FailOnParticipantConflict)) +} + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) +} + if params != nil && params.Ttl != nil { + data.Set("Ttl", fmt.Sprint(*params.Ttl)) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ProxyV1ServiceSession{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ProxyV1ServiceSession{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateShortCodeParams Optional parameters for the method 'UpdateShortCode' type UpdateShortCodeParams struct { IsReserved *bool `json:"IsReserved,omitempty"` @@ -1200,30 +1225,31 @@ type UpdateShortCodeParams struct { * @param optional nil or *UpdateShortCodeParams - Optional Parameters: * @param "IsReserved" (bool) - Whether the short code should be reserved and not be assigned to a participant using proxy pool logic. See [Reserved Phone Numbers](https://www.twilio.com/docs/proxy/reserved-phone-numbers) for more information. * @return ProxyV1ServiceShortCode - */ +*/ func (c *DefaultApiService) UpdateShortCode(ServiceSid string, Sid string, params *UpdateShortCodeParams) (*ProxyV1ServiceShortCode, error) { - path := "/v1/Services/{ServiceSid}/ShortCodes/{Sid}" + path := "/v1/Services/{ServiceSid}/ShortCodes/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.IsReserved != nil { - data.Set("IsReserved", fmt.Sprint(*params.IsReserved)) - } + if params != nil && params.IsReserved != nil { + data.Set("IsReserved", fmt.Sprint(*params.IsReserved)) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ProxyV1ServiceShortCode{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() + + ps := &ProxyV1ServiceShortCode{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } diff --git a/twilio/rest/proxy/v1/model_list_interaction_response.go b/twilio/rest/proxy/v1/model_list_interaction_response.go index 582269de5..b0fbf39c2 100644 --- a/twilio/rest/proxy/v1/model_list_interaction_response.go +++ b/twilio/rest/proxy/v1/model_list_interaction_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Proxy - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Proxy + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListInteractionResponse struct for ListInteractionResponse type ListInteractionResponse struct { Interactions []ProxyV1ServiceSessionInteraction `json:"Interactions,omitempty"` - Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/proxy/v1/model_list_message_interaction_response.go b/twilio/rest/proxy/v1/model_list_message_interaction_response.go index 56fed4a7f..957e13eaf 100644 --- a/twilio/rest/proxy/v1/model_list_message_interaction_response.go +++ b/twilio/rest/proxy/v1/model_list_message_interaction_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Proxy - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Proxy + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListMessageInteractionResponse struct for ListMessageInteractionResponse type ListMessageInteractionResponse struct { Interactions []ProxyV1ServiceSessionParticipantMessageInteraction `json:"Interactions,omitempty"` - Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/proxy/v1/model_list_participant_response.go b/twilio/rest/proxy/v1/model_list_participant_response.go index 9aa265431..21c99528d 100644 --- a/twilio/rest/proxy/v1/model_list_participant_response.go +++ b/twilio/rest/proxy/v1/model_list_participant_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Proxy - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Proxy + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListParticipantResponse struct for ListParticipantResponse type ListParticipantResponse struct { - Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` Participants []ProxyV1ServiceSessionParticipant `json:"Participants,omitempty"` } diff --git a/twilio/rest/proxy/v1/model_list_phone_number_response.go b/twilio/rest/proxy/v1/model_list_phone_number_response.go index a8782c891..942d3e507 100644 --- a/twilio/rest/proxy/v1/model_list_phone_number_response.go +++ b/twilio/rest/proxy/v1/model_list_phone_number_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Proxy - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Proxy + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListPhoneNumberResponse struct for ListPhoneNumberResponse type ListPhoneNumberResponse struct { - Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` PhoneNumbers []ProxyV1ServicePhoneNumber `json:"PhoneNumbers,omitempty"` } diff --git a/twilio/rest/proxy/v1/model_list_service_response.go b/twilio/rest/proxy/v1/model_list_service_response.go index d47ad23f6..4af1daffa 100644 --- a/twilio/rest/proxy/v1/model_list_service_response.go +++ b/twilio/rest/proxy/v1/model_list_service_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Proxy - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Proxy + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListServiceResponse struct for ListServiceResponse type ListServiceResponse struct { - Meta ListServiceResponseMeta `json:"Meta,omitempty"` - Services []ProxyV1Service `json:"Services,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Services []ProxyV1Service `json:"Services,omitempty"` } diff --git a/twilio/rest/proxy/v1/model_list_service_response_meta.go b/twilio/rest/proxy/v1/model_list_service_response_meta.go index 9524b1da5..7e6c1356c 100644 --- a/twilio/rest/proxy/v1/model_list_service_response_meta.go +++ b/twilio/rest/proxy/v1/model_list_service_response_meta.go @@ -1,23 +1,22 @@ /* - * Twilio - Proxy - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Proxy + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListServiceResponseMeta struct for ListServiceResponseMeta type ListServiceResponseMeta struct { - FirstPageUrl string `json:"FirstPageUrl,omitempty"` - Key string `json:"Key,omitempty"` - NextPageUrl string `json:"NextPageUrl,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` - Url string `json:"Url,omitempty"` + Url string `json:"Url,omitempty"` } diff --git a/twilio/rest/proxy/v1/model_list_session_response.go b/twilio/rest/proxy/v1/model_list_session_response.go index c64a404bd..6aa5f0446 100644 --- a/twilio/rest/proxy/v1/model_list_session_response.go +++ b/twilio/rest/proxy/v1/model_list_session_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Proxy - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Proxy + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListSessionResponse struct for ListSessionResponse type ListSessionResponse struct { - Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` Sessions []ProxyV1ServiceSession `json:"Sessions,omitempty"` } diff --git a/twilio/rest/proxy/v1/model_list_short_code_response.go b/twilio/rest/proxy/v1/model_list_short_code_response.go index 1ace03c82..dbcb94c0f 100644 --- a/twilio/rest/proxy/v1/model_list_short_code_response.go +++ b/twilio/rest/proxy/v1/model_list_short_code_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Proxy - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Proxy + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListShortCodeResponse struct for ListShortCodeResponse type ListShortCodeResponse struct { - Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` ShortCodes []ProxyV1ServiceShortCode `json:"ShortCodes,omitempty"` } diff --git a/twilio/rest/proxy/v1/model_proxy_v1_service.go b/twilio/rest/proxy/v1/model_proxy_v1_service.go index 2bd02c8d8..b6be76bde 100644 --- a/twilio/rest/proxy/v1/model_proxy_v1_service.go +++ b/twilio/rest/proxy/v1/model_proxy_v1_service.go @@ -1,20 +1,18 @@ /* - * Twilio - Proxy - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Proxy + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // ProxyV1Service struct for ProxyV1Service type ProxyV1Service struct { // The SID of the Account that created the resource diff --git a/twilio/rest/proxy/v1/model_proxy_v1_service_phone_number.go b/twilio/rest/proxy/v1/model_proxy_v1_service_phone_number.go index 6a90f910c..8b22fb588 100644 --- a/twilio/rest/proxy/v1/model_proxy_v1_service_phone_number.go +++ b/twilio/rest/proxy/v1/model_proxy_v1_service_phone_number.go @@ -1,24 +1,22 @@ /* - * Twilio - Proxy - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Proxy + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // ProxyV1ServicePhoneNumber struct for ProxyV1ServicePhoneNumber type ProxyV1ServicePhoneNumber struct { // The SID of the Account that created the resource - AccountSid *string `json:"AccountSid,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` Capabilities *ProxyV1ServicePhoneNumberCapabilities `json:"Capabilities,omitempty"` // The ISO 8601 date and time in GMT when the resource was created DateCreated *time.Time `json:"DateCreated,omitempty"` diff --git a/twilio/rest/proxy/v1/model_proxy_v1_service_phone_number_capabilities.go b/twilio/rest/proxy/v1/model_proxy_v1_service_phone_number_capabilities.go index 666f614d5..e99b3b3f9 100644 --- a/twilio/rest/proxy/v1/model_proxy_v1_service_phone_number_capabilities.go +++ b/twilio/rest/proxy/v1/model_proxy_v1_service_phone_number_capabilities.go @@ -1,20 +1,19 @@ /* - * Twilio - Proxy - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Proxy + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ProxyV1ServicePhoneNumberCapabilities The capabilities of the phone number type ProxyV1ServicePhoneNumberCapabilities struct { - Fax bool `json:"Fax,omitempty"` - Mms bool `json:"Mms,omitempty"` - Sms bool `json:"Sms,omitempty"` + Fax bool `json:"Fax,omitempty"` + Mms bool `json:"Mms,omitempty"` + Sms bool `json:"Sms,omitempty"` Voice bool `json:"Voice,omitempty"` } diff --git a/twilio/rest/proxy/v1/model_proxy_v1_service_session.go b/twilio/rest/proxy/v1/model_proxy_v1_service_session.go index e4c6c3a09..79e6e2052 100644 --- a/twilio/rest/proxy/v1/model_proxy_v1_service_session.go +++ b/twilio/rest/proxy/v1/model_proxy_v1_service_session.go @@ -1,20 +1,18 @@ /* - * Twilio - Proxy - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Proxy + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // ProxyV1ServiceSession struct for ProxyV1ServiceSession type ProxyV1ServiceSession struct { // The SID of the Account that created the resource diff --git a/twilio/rest/proxy/v1/model_proxy_v1_service_session_interaction.go b/twilio/rest/proxy/v1/model_proxy_v1_service_session_interaction.go index 23b30e212..cc95e4243 100644 --- a/twilio/rest/proxy/v1/model_proxy_v1_service_session_interaction.go +++ b/twilio/rest/proxy/v1/model_proxy_v1_service_session_interaction.go @@ -1,20 +1,18 @@ /* - * Twilio - Proxy - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Proxy + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // ProxyV1ServiceSessionInteraction struct for ProxyV1ServiceSessionInteraction type ProxyV1ServiceSessionInteraction struct { // The SID of the Account that created the resource diff --git a/twilio/rest/proxy/v1/model_proxy_v1_service_session_participant.go b/twilio/rest/proxy/v1/model_proxy_v1_service_session_participant.go index 01862d695..c13becf70 100644 --- a/twilio/rest/proxy/v1/model_proxy_v1_service_session_participant.go +++ b/twilio/rest/proxy/v1/model_proxy_v1_service_session_participant.go @@ -1,20 +1,18 @@ /* - * Twilio - Proxy - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Proxy + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // ProxyV1ServiceSessionParticipant struct for ProxyV1ServiceSessionParticipant type ProxyV1ServiceSessionParticipant struct { // The SID of the Account that created the resource diff --git a/twilio/rest/proxy/v1/model_proxy_v1_service_session_participant_message_interaction.go b/twilio/rest/proxy/v1/model_proxy_v1_service_session_participant_message_interaction.go index fee12332b..b6b29b363 100644 --- a/twilio/rest/proxy/v1/model_proxy_v1_service_session_participant_message_interaction.go +++ b/twilio/rest/proxy/v1/model_proxy_v1_service_session_participant_message_interaction.go @@ -1,20 +1,18 @@ /* - * Twilio - Proxy - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Proxy + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // ProxyV1ServiceSessionParticipantMessageInteraction struct for ProxyV1ServiceSessionParticipantMessageInteraction type ProxyV1ServiceSessionParticipantMessageInteraction struct { // The SID of the Account that created the resource diff --git a/twilio/rest/proxy/v1/model_proxy_v1_service_short_code.go b/twilio/rest/proxy/v1/model_proxy_v1_service_short_code.go index e2a78f985..f987ed3b6 100644 --- a/twilio/rest/proxy/v1/model_proxy_v1_service_short_code.go +++ b/twilio/rest/proxy/v1/model_proxy_v1_service_short_code.go @@ -1,24 +1,22 @@ /* - * Twilio - Proxy - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Proxy + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // ProxyV1ServiceShortCode struct for ProxyV1ServiceShortCode type ProxyV1ServiceShortCode struct { // The SID of the Account that created the resource - AccountSid *string `json:"AccountSid,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` Capabilities *ProxyV1ServiceShortCodeCapabilities `json:"Capabilities,omitempty"` // The ISO 8601 date and time in GMT when the resource was created DateCreated *time.Time `json:"DateCreated,omitempty"` diff --git a/twilio/rest/proxy/v1/model_proxy_v1_service_short_code_capabilities.go b/twilio/rest/proxy/v1/model_proxy_v1_service_short_code_capabilities.go index 8a43f4e2d..18332e03e 100644 --- a/twilio/rest/proxy/v1/model_proxy_v1_service_short_code_capabilities.go +++ b/twilio/rest/proxy/v1/model_proxy_v1_service_short_code_capabilities.go @@ -1,20 +1,19 @@ /* - * Twilio - Proxy - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Proxy + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ProxyV1ServiceShortCodeCapabilities The capabilities of the short code type ProxyV1ServiceShortCodeCapabilities struct { - Fax bool `json:"Fax,omitempty"` - Mms bool `json:"Mms,omitempty"` - Sms bool `json:"Sms,omitempty"` + Fax bool `json:"Fax,omitempty"` + Mms bool `json:"Mms,omitempty"` + Sms bool `json:"Sms,omitempty"` Voice bool `json:"Voice,omitempty"` } diff --git a/twilio/rest/serverless/v1/api_default.go b/twilio/rest/serverless/v1/api_default.go index 115541cfa..f138f6f8e 100644 --- a/twilio/rest/serverless/v1/api_default.go +++ b/twilio/rest/serverless/v1/api_default.go @@ -1,11 +1,11 @@ /* - * Twilio - Serverless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,11 +14,10 @@ package openapi import ( "encoding/json" "fmt" - "net/url" - "strings" - "time" - twilio "github.com/twilio/twilio-go/client" + "net/url" + "strings" + "time" ) type DefaultApiService struct { @@ -27,8 +26,8 @@ type DefaultApiService struct { } func NewDefaultApiService(client *twilio.Client) *DefaultApiService { - return &DefaultApiService{ - client: client, + return &DefaultApiService { + client: client, baseURL: "https://serverless.twilio.com", } } @@ -45,39 +44,39 @@ type CreateAssetParams struct { * @param optional nil or *CreateAssetParams - Optional Parameters: * @param "FriendlyName" (string) - A descriptive string that you create to describe the Asset resource. It can be a maximum of 255 characters. * @return ServerlessV1ServiceAsset - */ +*/ func (c *DefaultApiService) CreateAsset(ServiceSid string, params *CreateAssetParams) (*ServerlessV1ServiceAsset, error) { - path := "/v1/Services/{ServiceSid}/Assets" + path := "/v1/Services/{ServiceSid}/Assets" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ServerlessV1ServiceAsset{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ServerlessV1ServiceAsset{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateBuildParams Optional parameters for the method 'CreateBuild' type CreateBuildParams struct { - AssetVersions *[]string `json:"AssetVersions,omitempty"` - Dependencies *string `json:"Dependencies,omitempty"` + AssetVersions *[]string `json:"AssetVersions,omitempty"` + Dependencies *string `json:"Dependencies,omitempty"` FunctionVersions *[]string `json:"FunctionVersions,omitempty"` - Runtime *string `json:"Runtime,omitempty"` + Runtime *string `json:"Runtime,omitempty"` } /* @@ -90,42 +89,42 @@ type CreateBuildParams struct { * @param "FunctionVersions" ([]string) - The list of the Function Version resource SIDs to include in the Build. * @param "Runtime" (string) - The Runtime version that will be used to run the Build resource when it is deployed. * @return ServerlessV1ServiceBuild - */ +*/ func (c *DefaultApiService) CreateBuild(ServiceSid string, params *CreateBuildParams) (*ServerlessV1ServiceBuild, error) { - path := "/v1/Services/{ServiceSid}/Builds" + path := "/v1/Services/{ServiceSid}/Builds" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.AssetVersions != nil { - data.Set("AssetVersions", strings.Join(*params.AssetVersions, ",")) - } - if params != nil && params.Dependencies != nil { - data.Set("Dependencies", *params.Dependencies) - } - if params != nil && params.FunctionVersions != nil { - data.Set("FunctionVersions", strings.Join(*params.FunctionVersions, ",")) - } - if params != nil && params.Runtime != nil { - data.Set("Runtime", *params.Runtime) - } + if params != nil && params.AssetVersions != nil { + data.Set("AssetVersions", strings.Join(*params.AssetVersions, ",")) +} + if params != nil && params.Dependencies != nil { + data.Set("Dependencies", *params.Dependencies) +} + if params != nil && params.FunctionVersions != nil { + data.Set("FunctionVersions", strings.Join(*params.FunctionVersions, ",")) +} + if params != nil && params.Runtime != nil { + data.Set("Runtime", *params.Runtime) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ServerlessV1ServiceBuild{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ServerlessV1ServiceBuild{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateDeploymentParams Optional parameters for the method 'CreateDeployment' type CreateDeploymentParams struct { BuildSid *string `json:"BuildSid,omitempty"` @@ -139,38 +138,38 @@ type CreateDeploymentParams struct { * @param optional nil or *CreateDeploymentParams - Optional Parameters: * @param "BuildSid" (string) - The SID of the Build for the Deployment. * @return ServerlessV1ServiceEnvironmentDeployment - */ +*/ func (c *DefaultApiService) CreateDeployment(ServiceSid string, EnvironmentSid string, params *CreateDeploymentParams) (*ServerlessV1ServiceEnvironmentDeployment, error) { - path := "/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Deployments" + path := "/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Deployments" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"EnvironmentSid"+"}", EnvironmentSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.BuildSid != nil { - data.Set("BuildSid", *params.BuildSid) - } + if params != nil && params.BuildSid != nil { + data.Set("BuildSid", *params.BuildSid) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ServerlessV1ServiceEnvironmentDeployment{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ServerlessV1ServiceEnvironmentDeployment{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateEnvironmentParams Optional parameters for the method 'CreateEnvironment' type CreateEnvironmentParams struct { DomainSuffix *string `json:"DomainSuffix,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` } /* @@ -181,36 +180,36 @@ type CreateEnvironmentParams struct { * @param "DomainSuffix" (string) - A URL-friendly name that represents the environment and forms part of the domain name. It can be a maximum of 16 characters. * @param "UniqueName" (string) - A user-defined string that uniquely identifies the Environment resource. It can be a maximum of 100 characters. * @return ServerlessV1ServiceEnvironment - */ +*/ func (c *DefaultApiService) CreateEnvironment(ServiceSid string, params *CreateEnvironmentParams) (*ServerlessV1ServiceEnvironment, error) { - path := "/v1/Services/{ServiceSid}/Environments" + path := "/v1/Services/{ServiceSid}/Environments" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.DomainSuffix != nil { - data.Set("DomainSuffix", *params.DomainSuffix) - } - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) - } + if params != nil && params.DomainSuffix != nil { + data.Set("DomainSuffix", *params.DomainSuffix) +} + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ServerlessV1ServiceEnvironment{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ServerlessV1ServiceEnvironment{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateFunctionParams Optional parameters for the method 'CreateFunction' type CreateFunctionParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` @@ -223,39 +222,39 @@ type CreateFunctionParams struct { * @param optional nil or *CreateFunctionParams - Optional Parameters: * @param "FriendlyName" (string) - A descriptive string that you create to describe the Function resource. It can be a maximum of 255 characters. * @return ServerlessV1ServiceFunction - */ +*/ func (c *DefaultApiService) CreateFunction(ServiceSid string, params *CreateFunctionParams) (*ServerlessV1ServiceFunction, error) { - path := "/v1/Services/{ServiceSid}/Functions" + path := "/v1/Services/{ServiceSid}/Functions" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ServerlessV1ServiceFunction{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ServerlessV1ServiceFunction{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateServiceParams Optional parameters for the method 'CreateService' type CreateServiceParams struct { - FriendlyName *string `json:"FriendlyName,omitempty"` - IncludeCredentials *bool `json:"IncludeCredentials,omitempty"` - UiEditable *bool `json:"UiEditable,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + IncludeCredentials *bool `json:"IncludeCredentials,omitempty"` + UiEditable *bool `json:"UiEditable,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` } /* @@ -267,44 +266,44 @@ type CreateServiceParams struct { * @param "UiEditable" (bool) - Whether the Service's properties and subresources can be edited via the UI. The default value is `false`. * @param "UniqueName" (string) - A user-defined string that uniquely identifies the Service resource. It can be used as an alternative to the `sid` in the URL path to address the Service resource. This value must be 50 characters or less in length and be unique. * @return ServerlessV1Service - */ +*/ func (c *DefaultApiService) CreateService(params *CreateServiceParams) (*ServerlessV1Service, error) { - path := "/v1/Services" + path := "/v1/Services" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.IncludeCredentials != nil { - data.Set("IncludeCredentials", fmt.Sprint(*params.IncludeCredentials)) - } - if params != nil && params.UiEditable != nil { - data.Set("UiEditable", fmt.Sprint(*params.UiEditable)) - } - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) - } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.IncludeCredentials != nil { + data.Set("IncludeCredentials", fmt.Sprint(*params.IncludeCredentials)) +} + if params != nil && params.UiEditable != nil { + data.Set("UiEditable", fmt.Sprint(*params.UiEditable)) +} + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ServerlessV1Service{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ServerlessV1Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateVariableParams Optional parameters for the method 'CreateVariable' type CreateVariableParams struct { - Key *string `json:"Key,omitempty"` + Key *string `json:"Key,omitempty"` Value *string `json:"Value,omitempty"` } @@ -317,35 +316,36 @@ type CreateVariableParams struct { * @param "Key" (string) - A string by which the Variable resource can be referenced. It can be a maximum of 128 characters. * @param "Value" (string) - A string that contains the actual value of the Variable. It can be a maximum of 450 bytes in size. * @return ServerlessV1ServiceEnvironmentVariable - */ +*/ func (c *DefaultApiService) CreateVariable(ServiceSid string, EnvironmentSid string, params *CreateVariableParams) (*ServerlessV1ServiceEnvironmentVariable, error) { - path := "/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Variables" + path := "/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Variables" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"EnvironmentSid"+"}", EnvironmentSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Key != nil { - data.Set("Key", *params.Key) - } - if params != nil && params.Value != nil { - data.Set("Value", *params.Value) - } + if params != nil && params.Key != nil { + data.Set("Key", *params.Key) +} + if params != nil && params.Value != nil { + data.Set("Value", *params.Value) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ServerlessV1ServiceEnvironmentVariable{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() + + ps := &ServerlessV1ServiceEnvironmentVariable{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -353,23 +353,25 @@ func (c *DefaultApiService) CreateVariable(ServiceSid string, EnvironmentSid str * Delete an Asset resource. * @param ServiceSid The SID of the Service to delete the Asset resource from. * @param Sid The SID that identifies the Asset resource to delete. - */ -func (c *DefaultApiService) DeleteAsset(ServiceSid string, Sid string) error { - path := "/v1/Services/{ServiceSid}/Assets/{Sid}" +*/ +func (c *DefaultApiService) DeleteAsset(ServiceSid string, Sid string, ) (error) { + path := "/v1/Services/{ServiceSid}/Assets/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* @@ -377,23 +379,25 @@ func (c *DefaultApiService) DeleteAsset(ServiceSid string, Sid string) error { * Delete a Build resource. * @param ServiceSid The SID of the Service to delete the Build resource from. * @param Sid The SID of the Build resource to delete. - */ -func (c *DefaultApiService) DeleteBuild(ServiceSid string, Sid string) error { - path := "/v1/Services/{ServiceSid}/Builds/{Sid}" +*/ +func (c *DefaultApiService) DeleteBuild(ServiceSid string, Sid string, ) (error) { + path := "/v1/Services/{ServiceSid}/Builds/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - return nil + defer resp.Body.Close() + + return nil } /* @@ -401,23 +405,25 @@ func (c *DefaultApiService) DeleteBuild(ServiceSid string, Sid string) error { * Delete a specific environment. * @param ServiceSid The SID of the Service to delete the Environment resource from. * @param Sid The SID of the Environment resource to delete. - */ -func (c *DefaultApiService) DeleteEnvironment(ServiceSid string, Sid string) error { - path := "/v1/Services/{ServiceSid}/Environments/{Sid}" +*/ +func (c *DefaultApiService) DeleteEnvironment(ServiceSid string, Sid string, ) (error) { + path := "/v1/Services/{ServiceSid}/Environments/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* @@ -425,45 +431,49 @@ func (c *DefaultApiService) DeleteEnvironment(ServiceSid string, Sid string) err * Delete a Function resource. * @param ServiceSid The SID of the Service to delete the Function resource from. * @param Sid The SID of the Function resource to delete. - */ -func (c *DefaultApiService) DeleteFunction(ServiceSid string, Sid string) error { - path := "/v1/Services/{ServiceSid}/Functions/{Sid}" +*/ +func (c *DefaultApiService) DeleteFunction(ServiceSid string, Sid string, ) (error) { + path := "/v1/Services/{ServiceSid}/Functions/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* * DeleteService Method for DeleteService * Delete a Service resource. * @param Sid The `sid` or `unique_name` of the Service resource to delete. - */ -func (c *DefaultApiService) DeleteService(Sid string) error { - path := "/v1/Services/{Sid}" +*/ +func (c *DefaultApiService) DeleteService(Sid string, ) (error) { + path := "/v1/Services/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - return nil + defer resp.Body.Close() + + return nil } /* @@ -472,24 +482,26 @@ func (c *DefaultApiService) DeleteService(Sid string) error { * @param ServiceSid The SID of the Service to delete the Variable resource from. * @param EnvironmentSid The SID of the Environment with the Variables to delete. * @param Sid The SID of the Variable resource to delete. - */ -func (c *DefaultApiService) DeleteVariable(ServiceSid string, EnvironmentSid string, Sid string) error { - path := "/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Variables/{Sid}" +*/ +func (c *DefaultApiService) DeleteVariable(ServiceSid string, EnvironmentSid string, Sid string, ) (error) { + path := "/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Variables/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"EnvironmentSid"+"}", EnvironmentSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - return nil + defer resp.Body.Close() + + return nil } /* @@ -498,28 +510,30 @@ func (c *DefaultApiService) DeleteVariable(ServiceSid string, EnvironmentSid str * @param ServiceSid The SID of the Service to fetch the Asset resource from. * @param Sid The SID that identifies the Asset resource to fetch. * @return ServerlessV1ServiceAsset - */ -func (c *DefaultApiService) FetchAsset(ServiceSid string, Sid string) (*ServerlessV1ServiceAsset, error) { - path := "/v1/Services/{ServiceSid}/Assets/{Sid}" +*/ +func (c *DefaultApiService) FetchAsset(ServiceSid string, Sid string, ) (*ServerlessV1ServiceAsset, error) { + path := "/v1/Services/{ServiceSid}/Assets/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ServerlessV1ServiceAsset{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &ServerlessV1ServiceAsset{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -529,29 +543,31 @@ func (c *DefaultApiService) FetchAsset(ServiceSid string, Sid string) (*Serverle * @param AssetSid The SID of the Asset resource that is the parent of the Asset Version resource to fetch. * @param Sid The SID of the Asset Version resource to fetch. * @return ServerlessV1ServiceAssetAssetVersion - */ -func (c *DefaultApiService) FetchAssetVersion(ServiceSid string, AssetSid string, Sid string) (*ServerlessV1ServiceAssetAssetVersion, error) { - path := "/v1/Services/{ServiceSid}/Assets/{AssetSid}/Versions/{Sid}" +*/ +func (c *DefaultApiService) FetchAssetVersion(ServiceSid string, AssetSid string, Sid string, ) (*ServerlessV1ServiceAssetAssetVersion, error) { + path := "/v1/Services/{ServiceSid}/Assets/{AssetSid}/Versions/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"AssetSid"+"}", AssetSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ServerlessV1ServiceAssetAssetVersion{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err + defer resp.Body.Close() + + ps := &ServerlessV1ServiceAssetAssetVersion{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -560,28 +576,30 @@ func (c *DefaultApiService) FetchAssetVersion(ServiceSid string, AssetSid string * @param ServiceSid The SID of the Service to fetch the Build resource from. * @param Sid The SID of the Build resource to fetch. * @return ServerlessV1ServiceBuild - */ -func (c *DefaultApiService) FetchBuild(ServiceSid string, Sid string) (*ServerlessV1ServiceBuild, error) { - path := "/v1/Services/{ServiceSid}/Builds/{Sid}" +*/ +func (c *DefaultApiService) FetchBuild(ServiceSid string, Sid string, ) (*ServerlessV1ServiceBuild, error) { + path := "/v1/Services/{ServiceSid}/Builds/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ServerlessV1ServiceBuild{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err + defer resp.Body.Close() + + ps := &ServerlessV1ServiceBuild{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -590,28 +608,30 @@ func (c *DefaultApiService) FetchBuild(ServiceSid string, Sid string) (*Serverle * @param ServiceSid The SID of the Service to fetch the Build resource from. * @param Sid The SID of the Build resource to fetch. * @return ServerlessV1ServiceBuildBuildStatus - */ -func (c *DefaultApiService) FetchBuildStatus(ServiceSid string, Sid string) (*ServerlessV1ServiceBuildBuildStatus, error) { - path := "/v1/Services/{ServiceSid}/Builds/{Sid}/Status" +*/ +func (c *DefaultApiService) FetchBuildStatus(ServiceSid string, Sid string, ) (*ServerlessV1ServiceBuildBuildStatus, error) { + path := "/v1/Services/{ServiceSid}/Builds/{Sid}/Status" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ServerlessV1ServiceBuildBuildStatus{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &ServerlessV1ServiceBuildBuildStatus{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -621,29 +641,31 @@ func (c *DefaultApiService) FetchBuildStatus(ServiceSid string, Sid string) (*Se * @param EnvironmentSid The SID of the Environment used by the Deployment to fetch. * @param Sid The SID that identifies the Deployment resource to fetch. * @return ServerlessV1ServiceEnvironmentDeployment - */ -func (c *DefaultApiService) FetchDeployment(ServiceSid string, EnvironmentSid string, Sid string) (*ServerlessV1ServiceEnvironmentDeployment, error) { - path := "/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Deployments/{Sid}" +*/ +func (c *DefaultApiService) FetchDeployment(ServiceSid string, EnvironmentSid string, Sid string, ) (*ServerlessV1ServiceEnvironmentDeployment, error) { + path := "/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Deployments/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"EnvironmentSid"+"}", EnvironmentSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ServerlessV1ServiceEnvironmentDeployment{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ServerlessV1ServiceEnvironmentDeployment{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -652,28 +674,30 @@ func (c *DefaultApiService) FetchDeployment(ServiceSid string, EnvironmentSid st * @param ServiceSid The SID of the Service to fetch the Environment resource from. * @param Sid The SID of the Environment resource to fetch. * @return ServerlessV1ServiceEnvironment - */ -func (c *DefaultApiService) FetchEnvironment(ServiceSid string, Sid string) (*ServerlessV1ServiceEnvironment, error) { - path := "/v1/Services/{ServiceSid}/Environments/{Sid}" +*/ +func (c *DefaultApiService) FetchEnvironment(ServiceSid string, Sid string, ) (*ServerlessV1ServiceEnvironment, error) { + path := "/v1/Services/{ServiceSid}/Environments/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ServerlessV1ServiceEnvironment{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ServerlessV1ServiceEnvironment{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -682,28 +706,30 @@ func (c *DefaultApiService) FetchEnvironment(ServiceSid string, Sid string) (*Se * @param ServiceSid The SID of the Service to fetch the Function resource from. * @param Sid The SID of the Function resource to fetch. * @return ServerlessV1ServiceFunction - */ -func (c *DefaultApiService) FetchFunction(ServiceSid string, Sid string) (*ServerlessV1ServiceFunction, error) { - path := "/v1/Services/{ServiceSid}/Functions/{Sid}" +*/ +func (c *DefaultApiService) FetchFunction(ServiceSid string, Sid string, ) (*ServerlessV1ServiceFunction, error) { + path := "/v1/Services/{ServiceSid}/Functions/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ServerlessV1ServiceFunction{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &ServerlessV1ServiceFunction{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -713,29 +739,31 @@ func (c *DefaultApiService) FetchFunction(ServiceSid string, Sid string) (*Serve * @param FunctionSid The SID of the function that is the parent of the Function Version resource to fetch. * @param Sid The SID of the Function Version resource to fetch. * @return ServerlessV1ServiceFunctionFunctionVersion - */ -func (c *DefaultApiService) FetchFunctionVersion(ServiceSid string, FunctionSid string, Sid string) (*ServerlessV1ServiceFunctionFunctionVersion, error) { - path := "/v1/Services/{ServiceSid}/Functions/{FunctionSid}/Versions/{Sid}" +*/ +func (c *DefaultApiService) FetchFunctionVersion(ServiceSid string, FunctionSid string, Sid string, ) (*ServerlessV1ServiceFunctionFunctionVersion, error) { + path := "/v1/Services/{ServiceSid}/Functions/{FunctionSid}/Versions/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"FunctionSid"+"}", FunctionSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ServerlessV1ServiceFunctionFunctionVersion{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &ServerlessV1ServiceFunctionFunctionVersion{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -745,29 +773,31 @@ func (c *DefaultApiService) FetchFunctionVersion(ServiceSid string, FunctionSid * @param FunctionSid The SID of the Function that is the parent of the Function Version content to fetch. * @param Sid The SID of the Function Version content to fetch. * @return ServerlessV1ServiceFunctionFunctionVersionFunctionVersionContent - */ -func (c *DefaultApiService) FetchFunctionVersionContent(ServiceSid string, FunctionSid string, Sid string) (*ServerlessV1ServiceFunctionFunctionVersionFunctionVersionContent, error) { - path := "/v1/Services/{ServiceSid}/Functions/{FunctionSid}/Versions/{Sid}/Content" +*/ +func (c *DefaultApiService) FetchFunctionVersionContent(ServiceSid string, FunctionSid string, Sid string, ) (*ServerlessV1ServiceFunctionFunctionVersionFunctionVersionContent, error) { + path := "/v1/Services/{ServiceSid}/Functions/{FunctionSid}/Versions/{Sid}/Content" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"FunctionSid"+"}", FunctionSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ServerlessV1ServiceFunctionFunctionVersionFunctionVersionContent{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err + defer resp.Body.Close() + + ps := &ServerlessV1ServiceFunctionFunctionVersionFunctionVersionContent{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -777,29 +807,31 @@ func (c *DefaultApiService) FetchFunctionVersionContent(ServiceSid string, Funct * @param EnvironmentSid The SID of the environment with the Log resource to fetch. * @param Sid The SID of the Log resource to fetch. * @return ServerlessV1ServiceEnvironmentLog - */ -func (c *DefaultApiService) FetchLog(ServiceSid string, EnvironmentSid string, Sid string) (*ServerlessV1ServiceEnvironmentLog, error) { - path := "/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Logs/{Sid}" +*/ +func (c *DefaultApiService) FetchLog(ServiceSid string, EnvironmentSid string, Sid string, ) (*ServerlessV1ServiceEnvironmentLog, error) { + path := "/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Logs/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"EnvironmentSid"+"}", EnvironmentSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ServerlessV1ServiceEnvironmentLog{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err + defer resp.Body.Close() + + ps := &ServerlessV1ServiceEnvironmentLog{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -807,27 +839,29 @@ func (c *DefaultApiService) FetchLog(ServiceSid string, EnvironmentSid string, S * Retrieve a specific Service resource. * @param Sid The `sid` or `unique_name` of the Service resource to fetch. * @return ServerlessV1Service - */ -func (c *DefaultApiService) FetchService(Sid string) (*ServerlessV1Service, error) { - path := "/v1/Services/{Sid}" +*/ +func (c *DefaultApiService) FetchService(Sid string, ) (*ServerlessV1Service, error) { + path := "/v1/Services/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ServerlessV1Service{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &ServerlessV1Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -837,31 +871,32 @@ func (c *DefaultApiService) FetchService(Sid string) (*ServerlessV1Service, erro * @param EnvironmentSid The SID of the Environment with the Variable resource to fetch. * @param Sid The SID of the Variable resource to fetch. * @return ServerlessV1ServiceEnvironmentVariable - */ -func (c *DefaultApiService) FetchVariable(ServiceSid string, EnvironmentSid string, Sid string) (*ServerlessV1ServiceEnvironmentVariable, error) { - path := "/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Variables/{Sid}" +*/ +func (c *DefaultApiService) FetchVariable(ServiceSid string, EnvironmentSid string, Sid string, ) (*ServerlessV1ServiceEnvironmentVariable, error) { + path := "/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Variables/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"EnvironmentSid"+"}", EnvironmentSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &ServerlessV1ServiceEnvironmentVariable{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err -} + defer resp.Body.Close() + + ps := &ServerlessV1ServiceEnvironmentVariable{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListAssetParams Optional parameters for the method 'ListAsset' type ListAssetParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -874,33 +909,33 @@ type ListAssetParams struct { * @param optional nil or *ListAssetParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListAssetResponse - */ +*/ func (c *DefaultApiService) ListAsset(ServiceSid string, params *ListAssetParams) (*ListAssetResponse, error) { - path := "/v1/Services/{ServiceSid}/Assets" + path := "/v1/Services/{ServiceSid}/Assets" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListAssetResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListAssetResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListAssetVersionParams Optional parameters for the method 'ListAssetVersion' type ListAssetVersionParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -914,34 +949,34 @@ type ListAssetVersionParams struct { * @param optional nil or *ListAssetVersionParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListAssetVersionResponse - */ +*/ func (c *DefaultApiService) ListAssetVersion(ServiceSid string, AssetSid string, params *ListAssetVersionParams) (*ListAssetVersionResponse, error) { - path := "/v1/Services/{ServiceSid}/Assets/{AssetSid}/Versions" + path := "/v1/Services/{ServiceSid}/Assets/{AssetSid}/Versions" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"AssetSid"+"}", AssetSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListAssetVersionResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListAssetVersionResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListBuildParams Optional parameters for the method 'ListBuild' type ListBuildParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -954,33 +989,33 @@ type ListBuildParams struct { * @param optional nil or *ListBuildParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListBuildResponse - */ +*/ func (c *DefaultApiService) ListBuild(ServiceSid string, params *ListBuildParams) (*ListBuildResponse, error) { - path := "/v1/Services/{ServiceSid}/Builds" + path := "/v1/Services/{ServiceSid}/Builds" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListBuildResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListBuildResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListDeploymentParams Optional parameters for the method 'ListDeployment' type ListDeploymentParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -994,34 +1029,34 @@ type ListDeploymentParams struct { * @param optional nil or *ListDeploymentParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListDeploymentResponse - */ +*/ func (c *DefaultApiService) ListDeployment(ServiceSid string, EnvironmentSid string, params *ListDeploymentParams) (*ListDeploymentResponse, error) { - path := "/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Deployments" + path := "/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Deployments" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"EnvironmentSid"+"}", EnvironmentSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListDeploymentResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListDeploymentResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListEnvironmentParams Optional parameters for the method 'ListEnvironment' type ListEnvironmentParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1034,33 +1069,33 @@ type ListEnvironmentParams struct { * @param optional nil or *ListEnvironmentParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListEnvironmentResponse - */ +*/ func (c *DefaultApiService) ListEnvironment(ServiceSid string, params *ListEnvironmentParams) (*ListEnvironmentResponse, error) { - path := "/v1/Services/{ServiceSid}/Environments" + path := "/v1/Services/{ServiceSid}/Environments" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListEnvironmentResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListEnvironmentResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListFunctionParams Optional parameters for the method 'ListFunction' type ListFunctionParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1073,33 +1108,33 @@ type ListFunctionParams struct { * @param optional nil or *ListFunctionParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListFunctionResponse - */ +*/ func (c *DefaultApiService) ListFunction(ServiceSid string, params *ListFunctionParams) (*ListFunctionResponse, error) { - path := "/v1/Services/{ServiceSid}/Functions" + path := "/v1/Services/{ServiceSid}/Functions" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListFunctionResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListFunctionResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListFunctionVersionParams Optional parameters for the method 'ListFunctionVersion' type ListFunctionVersionParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1113,40 +1148,40 @@ type ListFunctionVersionParams struct { * @param optional nil or *ListFunctionVersionParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListFunctionVersionResponse - */ +*/ func (c *DefaultApiService) ListFunctionVersion(ServiceSid string, FunctionSid string, params *ListFunctionVersionParams) (*ListFunctionVersionResponse, error) { - path := "/v1/Services/{ServiceSid}/Functions/{FunctionSid}/Versions" + path := "/v1/Services/{ServiceSid}/Functions/{FunctionSid}/Versions" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"FunctionSid"+"}", FunctionSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListFunctionVersionResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListFunctionVersionResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListLogParams Optional parameters for the method 'ListLog' type ListLogParams struct { - FunctionSid *string `json:"FunctionSid,omitempty"` - StartDate *time.Time `json:"StartDate,omitempty"` - EndDate *time.Time `json:"EndDate,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + FunctionSid *string `json:"FunctionSid,omitempty"` + StartDate *time.Time `json:"StartDate,omitempty"` + EndDate *time.Time `json:"EndDate,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -1160,43 +1195,43 @@ type ListLogParams struct { * @param "EndDate" (time.Time) - The date/time (in GMT, ISO 8601) before which the Log resources must have been created. Defaults to current date/time. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListLogResponse - */ +*/ func (c *DefaultApiService) ListLog(ServiceSid string, EnvironmentSid string, params *ListLogParams) (*ListLogResponse, error) { - path := "/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Logs" + path := "/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Logs" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"EnvironmentSid"+"}", EnvironmentSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.FunctionSid != nil { - data.Set("FunctionSid", *params.FunctionSid) - } - if params != nil && params.StartDate != nil { - data.Set("StartDate", fmt.Sprint(*params.StartDate)) - } - if params != nil && params.EndDate != nil { - data.Set("EndDate", fmt.Sprint(*params.EndDate)) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.FunctionSid != nil { + data.Set("FunctionSid", *params.FunctionSid) +} + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) +} + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListLogResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListLogResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListServiceParams Optional parameters for the method 'ListService' type ListServiceParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1208,32 +1243,32 @@ type ListServiceParams struct { * @param optional nil or *ListServiceParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListServiceResponse - */ +*/ func (c *DefaultApiService) ListService(params *ListServiceParams) (*ListServiceResponse, error) { - path := "/v1/Services" + path := "/v1/Services" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListServiceResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListServiceResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListVariableParams Optional parameters for the method 'ListVariable' type ListVariableParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1247,34 +1282,34 @@ type ListVariableParams struct { * @param optional nil or *ListVariableParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListVariableResponse - */ +*/ func (c *DefaultApiService) ListVariable(ServiceSid string, EnvironmentSid string, params *ListVariableParams) (*ListVariableResponse, error) { - path := "/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Variables" + path := "/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Variables" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"EnvironmentSid"+"}", EnvironmentSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListVariableResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListVariableResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateAssetParams Optional parameters for the method 'UpdateAsset' type UpdateAssetParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` @@ -1288,34 +1323,34 @@ type UpdateAssetParams struct { * @param optional nil or *UpdateAssetParams - Optional Parameters: * @param "FriendlyName" (string) - A descriptive string that you create to describe the Asset resource. It can be a maximum of 255 characters. * @return ServerlessV1ServiceAsset - */ +*/ func (c *DefaultApiService) UpdateAsset(ServiceSid string, Sid string, params *UpdateAssetParams) (*ServerlessV1ServiceAsset, error) { - path := "/v1/Services/{ServiceSid}/Assets/{Sid}" + path := "/v1/Services/{ServiceSid}/Assets/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ServerlessV1ServiceAsset{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ServerlessV1ServiceAsset{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateFunctionParams Optional parameters for the method 'UpdateFunction' type UpdateFunctionParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` @@ -1329,39 +1364,39 @@ type UpdateFunctionParams struct { * @param optional nil or *UpdateFunctionParams - Optional Parameters: * @param "FriendlyName" (string) - A descriptive string that you create to describe the Function resource. It can be a maximum of 255 characters. * @return ServerlessV1ServiceFunction - */ +*/ func (c *DefaultApiService) UpdateFunction(ServiceSid string, Sid string, params *UpdateFunctionParams) (*ServerlessV1ServiceFunction, error) { - path := "/v1/Services/{ServiceSid}/Functions/{Sid}" + path := "/v1/Services/{ServiceSid}/Functions/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ServerlessV1ServiceFunction{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ServerlessV1ServiceFunction{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateServiceParams Optional parameters for the method 'UpdateService' type UpdateServiceParams struct { - FriendlyName *string `json:"FriendlyName,omitempty"` - IncludeCredentials *bool `json:"IncludeCredentials,omitempty"` - UiEditable *bool `json:"UiEditable,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + IncludeCredentials *bool `json:"IncludeCredentials,omitempty"` + UiEditable *bool `json:"UiEditable,omitempty"` } /* @@ -1373,42 +1408,42 @@ type UpdateServiceParams struct { * @param "IncludeCredentials" (bool) - Whether to inject Account credentials into a function invocation context. * @param "UiEditable" (bool) - Whether the Service resource's properties and subresources can be edited via the UI. The default value is `false`. * @return ServerlessV1Service - */ +*/ func (c *DefaultApiService) UpdateService(Sid string, params *UpdateServiceParams) (*ServerlessV1Service, error) { - path := "/v1/Services/{Sid}" + path := "/v1/Services/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.IncludeCredentials != nil { - data.Set("IncludeCredentials", fmt.Sprint(*params.IncludeCredentials)) - } - if params != nil && params.UiEditable != nil { - data.Set("UiEditable", fmt.Sprint(*params.UiEditable)) - } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.IncludeCredentials != nil { + data.Set("IncludeCredentials", fmt.Sprint(*params.IncludeCredentials)) +} + if params != nil && params.UiEditable != nil { + data.Set("UiEditable", fmt.Sprint(*params.UiEditable)) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ServerlessV1Service{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ServerlessV1Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateVariableParams Optional parameters for the method 'UpdateVariable' type UpdateVariableParams struct { - Key *string `json:"Key,omitempty"` + Key *string `json:"Key,omitempty"` Value *string `json:"Value,omitempty"` } @@ -1422,34 +1457,35 @@ type UpdateVariableParams struct { * @param "Key" (string) - A string by which the Variable resource can be referenced. It can be a maximum of 128 characters. * @param "Value" (string) - A string that contains the actual value of the Variable. It can be a maximum of 450 bytes in size. * @return ServerlessV1ServiceEnvironmentVariable - */ +*/ func (c *DefaultApiService) UpdateVariable(ServiceSid string, EnvironmentSid string, Sid string, params *UpdateVariableParams) (*ServerlessV1ServiceEnvironmentVariable, error) { - path := "/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Variables/{Sid}" + path := "/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Variables/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"EnvironmentSid"+"}", EnvironmentSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Key != nil { - data.Set("Key", *params.Key) - } - if params != nil && params.Value != nil { - data.Set("Value", *params.Value) - } + if params != nil && params.Key != nil { + data.Set("Key", *params.Key) +} + if params != nil && params.Value != nil { + data.Set("Value", *params.Value) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ServerlessV1ServiceEnvironmentVariable{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() + + ps := &ServerlessV1ServiceEnvironmentVariable{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } diff --git a/twilio/rest/serverless/v1/model_list_asset_response.go b/twilio/rest/serverless/v1/model_list_asset_response.go index 90b98ca94..e5537cd92 100644 --- a/twilio/rest/serverless/v1/model_list_asset_response.go +++ b/twilio/rest/serverless/v1/model_list_asset_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Serverless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListAssetResponse struct for ListAssetResponse type ListAssetResponse struct { Assets []ServerlessV1ServiceAsset `json:"Assets,omitempty"` - Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/serverless/v1/model_list_asset_version_response.go b/twilio/rest/serverless/v1/model_list_asset_version_response.go index 398df5d3d..082af3690 100644 --- a/twilio/rest/serverless/v1/model_list_asset_version_response.go +++ b/twilio/rest/serverless/v1/model_list_asset_version_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Serverless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListAssetVersionResponse struct for ListAssetVersionResponse type ListAssetVersionResponse struct { AssetVersions []ServerlessV1ServiceAssetAssetVersion `json:"AssetVersions,omitempty"` - Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/serverless/v1/model_list_build_response.go b/twilio/rest/serverless/v1/model_list_build_response.go index b2630f5e0..6f8ca89da 100644 --- a/twilio/rest/serverless/v1/model_list_build_response.go +++ b/twilio/rest/serverless/v1/model_list_build_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Serverless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListBuildResponse struct for ListBuildResponse type ListBuildResponse struct { Builds []ServerlessV1ServiceBuild `json:"Builds,omitempty"` - Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/serverless/v1/model_list_deployment_response.go b/twilio/rest/serverless/v1/model_list_deployment_response.go index ea6b602e9..7045aeac4 100644 --- a/twilio/rest/serverless/v1/model_list_deployment_response.go +++ b/twilio/rest/serverless/v1/model_list_deployment_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Serverless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListDeploymentResponse struct for ListDeploymentResponse type ListDeploymentResponse struct { Deployments []ServerlessV1ServiceEnvironmentDeployment `json:"Deployments,omitempty"` - Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/serverless/v1/model_list_environment_response.go b/twilio/rest/serverless/v1/model_list_environment_response.go index 2e333d54d..138d8e2e7 100644 --- a/twilio/rest/serverless/v1/model_list_environment_response.go +++ b/twilio/rest/serverless/v1/model_list_environment_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Serverless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListEnvironmentResponse struct for ListEnvironmentResponse type ListEnvironmentResponse struct { Environments []ServerlessV1ServiceEnvironment `json:"Environments,omitempty"` - Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/serverless/v1/model_list_function_response.go b/twilio/rest/serverless/v1/model_list_function_response.go index b3a2a435f..838efb211 100644 --- a/twilio/rest/serverless/v1/model_list_function_response.go +++ b/twilio/rest/serverless/v1/model_list_function_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Serverless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListFunctionResponse struct for ListFunctionResponse type ListFunctionResponse struct { Functions []ServerlessV1ServiceFunction `json:"Functions,omitempty"` - Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/serverless/v1/model_list_function_version_response.go b/twilio/rest/serverless/v1/model_list_function_version_response.go index 3f86bd50e..65f69de70 100644 --- a/twilio/rest/serverless/v1/model_list_function_version_response.go +++ b/twilio/rest/serverless/v1/model_list_function_version_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Serverless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListFunctionVersionResponse struct for ListFunctionVersionResponse type ListFunctionVersionResponse struct { FunctionVersions []ServerlessV1ServiceFunctionFunctionVersion `json:"FunctionVersions,omitempty"` - Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/serverless/v1/model_list_log_response.go b/twilio/rest/serverless/v1/model_list_log_response.go index 4ae0c8eb6..9e578f228 100644 --- a/twilio/rest/serverless/v1/model_list_log_response.go +++ b/twilio/rest/serverless/v1/model_list_log_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Serverless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListLogResponse struct for ListLogResponse type ListLogResponse struct { Logs []ServerlessV1ServiceEnvironmentLog `json:"Logs,omitempty"` - Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/serverless/v1/model_list_service_response.go b/twilio/rest/serverless/v1/model_list_service_response.go index 380ed6719..a5f62ec90 100644 --- a/twilio/rest/serverless/v1/model_list_service_response.go +++ b/twilio/rest/serverless/v1/model_list_service_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Serverless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListServiceResponse struct for ListServiceResponse type ListServiceResponse struct { - Meta ListServiceResponseMeta `json:"Meta,omitempty"` - Services []ServerlessV1Service `json:"Services,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Services []ServerlessV1Service `json:"Services,omitempty"` } diff --git a/twilio/rest/serverless/v1/model_list_service_response_meta.go b/twilio/rest/serverless/v1/model_list_service_response_meta.go index 9902b68c7..e4490875d 100644 --- a/twilio/rest/serverless/v1/model_list_service_response_meta.go +++ b/twilio/rest/serverless/v1/model_list_service_response_meta.go @@ -1,23 +1,22 @@ /* - * Twilio - Serverless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListServiceResponseMeta struct for ListServiceResponseMeta type ListServiceResponseMeta struct { - FirstPageUrl string `json:"FirstPageUrl,omitempty"` - Key string `json:"Key,omitempty"` - NextPageUrl string `json:"NextPageUrl,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` - Url string `json:"Url,omitempty"` + Url string `json:"Url,omitempty"` } diff --git a/twilio/rest/serverless/v1/model_list_variable_response.go b/twilio/rest/serverless/v1/model_list_variable_response.go index 53ae649e1..556ac9f6c 100644 --- a/twilio/rest/serverless/v1/model_list_variable_response.go +++ b/twilio/rest/serverless/v1/model_list_variable_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Serverless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListVariableResponse struct for ListVariableResponse type ListVariableResponse struct { - Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` Variables []ServerlessV1ServiceEnvironmentVariable `json:"Variables,omitempty"` } diff --git a/twilio/rest/serverless/v1/model_serverless_v1_service.go b/twilio/rest/serverless/v1/model_serverless_v1_service.go index f0cdf88d7..356cea9eb 100644 --- a/twilio/rest/serverless/v1/model_serverless_v1_service.go +++ b/twilio/rest/serverless/v1/model_serverless_v1_service.go @@ -1,20 +1,18 @@ /* - * Twilio - Serverless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // ServerlessV1Service struct for ServerlessV1Service type ServerlessV1Service struct { // The SID of the Account that created the Service resource diff --git a/twilio/rest/serverless/v1/model_serverless_v1_service_asset.go b/twilio/rest/serverless/v1/model_serverless_v1_service_asset.go index f4c4fe47d..2888f920e 100644 --- a/twilio/rest/serverless/v1/model_serverless_v1_service_asset.go +++ b/twilio/rest/serverless/v1/model_serverless_v1_service_asset.go @@ -1,20 +1,18 @@ /* - * Twilio - Serverless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // ServerlessV1ServiceAsset struct for ServerlessV1ServiceAsset type ServerlessV1ServiceAsset struct { // The SID of the Account that created the Asset resource diff --git a/twilio/rest/serverless/v1/model_serverless_v1_service_asset_asset_version.go b/twilio/rest/serverless/v1/model_serverless_v1_service_asset_asset_version.go index 426d20729..11839d955 100644 --- a/twilio/rest/serverless/v1/model_serverless_v1_service_asset_asset_version.go +++ b/twilio/rest/serverless/v1/model_serverless_v1_service_asset_asset_version.go @@ -1,20 +1,18 @@ /* - * Twilio - Serverless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // ServerlessV1ServiceAssetAssetVersion struct for ServerlessV1ServiceAssetAssetVersion type ServerlessV1ServiceAssetAssetVersion struct { // The SID of the Account that created the Asset Version resource diff --git a/twilio/rest/serverless/v1/model_serverless_v1_service_build.go b/twilio/rest/serverless/v1/model_serverless_v1_service_build.go index 4d0e5569f..1840adc0d 100644 --- a/twilio/rest/serverless/v1/model_serverless_v1_service_build.go +++ b/twilio/rest/serverless/v1/model_serverless_v1_service_build.go @@ -1,20 +1,18 @@ /* - * Twilio - Serverless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // ServerlessV1ServiceBuild struct for ServerlessV1ServiceBuild type ServerlessV1ServiceBuild struct { // The SID of the Account that created the Build resource @@ -29,7 +27,7 @@ type ServerlessV1ServiceBuild struct { Dependencies *[]map[string]interface{} `json:"Dependencies,omitempty"` // The list of Function Version resource SIDs that are included in the Build FunctionVersions *[]map[string]interface{} `json:"FunctionVersions,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` + Links *map[string]interface{} `json:"Links,omitempty"` // The Runtime version that will be used to run the Build. Runtime *string `json:"Runtime,omitempty"` // The SID of the Service that the Build resource is associated with diff --git a/twilio/rest/serverless/v1/model_serverless_v1_service_build_build_status.go b/twilio/rest/serverless/v1/model_serverless_v1_service_build_build_status.go index 3d44319b2..10be53ecd 100644 --- a/twilio/rest/serverless/v1/model_serverless_v1_service_build_build_status.go +++ b/twilio/rest/serverless/v1/model_serverless_v1_service_build_build_status.go @@ -1,16 +1,15 @@ /* - * Twilio - Serverless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ServerlessV1ServiceBuildBuildStatus struct for ServerlessV1ServiceBuildBuildStatus type ServerlessV1ServiceBuildBuildStatus struct { // The SID of the Account that created the Build resource diff --git a/twilio/rest/serverless/v1/model_serverless_v1_service_environment.go b/twilio/rest/serverless/v1/model_serverless_v1_service_environment.go index de25f2828..0459e12b8 100644 --- a/twilio/rest/serverless/v1/model_serverless_v1_service_environment.go +++ b/twilio/rest/serverless/v1/model_serverless_v1_service_environment.go @@ -1,20 +1,18 @@ /* - * Twilio - Serverless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // ServerlessV1ServiceEnvironment struct for ServerlessV1ServiceEnvironment type ServerlessV1ServiceEnvironment struct { // The SID of the Account that created the Environment resource diff --git a/twilio/rest/serverless/v1/model_serverless_v1_service_environment_deployment.go b/twilio/rest/serverless/v1/model_serverless_v1_service_environment_deployment.go index d12841f3d..1fe03387d 100644 --- a/twilio/rest/serverless/v1/model_serverless_v1_service_environment_deployment.go +++ b/twilio/rest/serverless/v1/model_serverless_v1_service_environment_deployment.go @@ -1,20 +1,18 @@ /* - * Twilio - Serverless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // ServerlessV1ServiceEnvironmentDeployment struct for ServerlessV1ServiceEnvironmentDeployment type ServerlessV1ServiceEnvironmentDeployment struct { // The SID of the Account that created the Deployment resource diff --git a/twilio/rest/serverless/v1/model_serverless_v1_service_environment_log.go b/twilio/rest/serverless/v1/model_serverless_v1_service_environment_log.go index 407e22ac4..0f2253e3f 100644 --- a/twilio/rest/serverless/v1/model_serverless_v1_service_environment_log.go +++ b/twilio/rest/serverless/v1/model_serverless_v1_service_environment_log.go @@ -1,20 +1,18 @@ /* - * Twilio - Serverless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // ServerlessV1ServiceEnvironmentLog struct for ServerlessV1ServiceEnvironmentLog type ServerlessV1ServiceEnvironmentLog struct { // The SID of the Account that created the Log resource diff --git a/twilio/rest/serverless/v1/model_serverless_v1_service_environment_variable.go b/twilio/rest/serverless/v1/model_serverless_v1_service_environment_variable.go index f1f2e08a3..9132a13e6 100644 --- a/twilio/rest/serverless/v1/model_serverless_v1_service_environment_variable.go +++ b/twilio/rest/serverless/v1/model_serverless_v1_service_environment_variable.go @@ -1,20 +1,18 @@ /* - * Twilio - Serverless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // ServerlessV1ServiceEnvironmentVariable struct for ServerlessV1ServiceEnvironmentVariable type ServerlessV1ServiceEnvironmentVariable struct { // The SID of the Account that created the Variable resource diff --git a/twilio/rest/serverless/v1/model_serverless_v1_service_function.go b/twilio/rest/serverless/v1/model_serverless_v1_service_function.go index 0fb500e90..f7dbfb0ce 100644 --- a/twilio/rest/serverless/v1/model_serverless_v1_service_function.go +++ b/twilio/rest/serverless/v1/model_serverless_v1_service_function.go @@ -1,20 +1,18 @@ /* - * Twilio - Serverless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // ServerlessV1ServiceFunction struct for ServerlessV1ServiceFunction type ServerlessV1ServiceFunction struct { // The SID of the Account that created the Function resource diff --git a/twilio/rest/serverless/v1/model_serverless_v1_service_function_function_version.go b/twilio/rest/serverless/v1/model_serverless_v1_service_function_function_version.go index a541e9ff1..3e14aad5c 100644 --- a/twilio/rest/serverless/v1/model_serverless_v1_service_function_function_version.go +++ b/twilio/rest/serverless/v1/model_serverless_v1_service_function_function_version.go @@ -1,20 +1,18 @@ /* - * Twilio - Serverless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // ServerlessV1ServiceFunctionFunctionVersion struct for ServerlessV1ServiceFunctionFunctionVersion type ServerlessV1ServiceFunctionFunctionVersion struct { // The SID of the Account that created the Function Version resource @@ -22,8 +20,8 @@ type ServerlessV1ServiceFunctionFunctionVersion struct { // The ISO 8601 date and time in GMT when the Function Version resource was created DateCreated *time.Time `json:"DateCreated,omitempty"` // The SID of the Function resource that is the parent of the Function Version resource - FunctionSid *string `json:"FunctionSid,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` + FunctionSid *string `json:"FunctionSid,omitempty"` + Links *map[string]interface{} `json:"Links,omitempty"` // The URL-friendly string by which the Function Version resource can be referenced Path *string `json:"Path,omitempty"` // The SID of the Service that the Function Version resource is associated with diff --git a/twilio/rest/serverless/v1/model_serverless_v1_service_function_function_version_function_version_content.go b/twilio/rest/serverless/v1/model_serverless_v1_service_function_function_version_function_version_content.go index b1656394d..755f8f35d 100644 --- a/twilio/rest/serverless/v1/model_serverless_v1_service_function_function_version_function_version_content.go +++ b/twilio/rest/serverless/v1/model_serverless_v1_service_function_function_version_function_version_content.go @@ -1,16 +1,15 @@ /* - * Twilio - Serverless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ServerlessV1ServiceFunctionFunctionVersionFunctionVersionContent struct for ServerlessV1ServiceFunctionFunctionVersionFunctionVersionContent type ServerlessV1ServiceFunctionFunctionVersionFunctionVersionContent struct { // The SID of the Account that created the Function Version resource diff --git a/twilio/rest/studio/v1/api_default.go b/twilio/rest/studio/v1/api_default.go index a130162a4..03dfbbf4b 100644 --- a/twilio/rest/studio/v1/api_default.go +++ b/twilio/rest/studio/v1/api_default.go @@ -1,11 +1,11 @@ /* - * Twilio - Studio - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,11 +14,10 @@ package openapi import ( "encoding/json" "fmt" - "net/url" - "strings" - "time" - twilio "github.com/twilio/twilio-go/client" + "net/url" + "strings" + "time" ) type DefaultApiService struct { @@ -27,17 +26,17 @@ type DefaultApiService struct { } func NewDefaultApiService(client *twilio.Client) *DefaultApiService { - return &DefaultApiService{ - client: client, + return &DefaultApiService { + client: client, baseURL: "https://studio.twilio.com", } } // CreateEngagementParams Optional parameters for the method 'CreateEngagement' type CreateEngagementParams struct { - From *string `json:"From,omitempty"` + From *string `json:"From,omitempty"` Parameters *map[string]interface{} `json:"Parameters,omitempty"` - To *string `json:"To,omitempty"` + To *string `json:"To,omitempty"` } /* @@ -49,50 +48,50 @@ type CreateEngagementParams struct { * @param "Parameters" (map[string]interface{}) - A JSON string we will add to your flow's context and that you can access as variables inside your flow. For example, if you pass in `Parameters={'name':'Zeke'}` then inside a widget you can reference the variable `{{flow.data.name}}` which will return the string 'Zeke'. Note: the JSON value must explicitly be passed as a string, not as a hash object. Depending on your particular HTTP library, you may need to add quotes or URL encode your JSON string. * @param "To" (string) - The Contact phone number to start a Studio Flow Engagement, available as variable `{{contact.channel.address}}`. * @return StudioV1FlowEngagement - */ +*/ func (c *DefaultApiService) CreateEngagement(FlowSid string, params *CreateEngagementParams) (*StudioV1FlowEngagement, error) { - path := "/v1/Flows/{FlowSid}/Engagements" + path := "/v1/Flows/{FlowSid}/Engagements" path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + + if params != nil && params.From != nil { + data.Set("From", *params.From) +} + if params != nil && params.Parameters != nil { + v, err := json.Marshal(params.Parameters) - if params != nil && params.From != nil { - data.Set("From", *params.From) + if err != nil { + return nil, err } - if params != nil && params.Parameters != nil { - v, err := json.Marshal(params.Parameters) - if err != nil { - return nil, err - } + data.Set("Parameters", fmt.Sprint(v)) +} + if params != nil && params.To != nil { + data.Set("To", *params.To) +} - data.Set("Parameters", fmt.Sprint(v)) - } - if params != nil && params.To != nil { - data.Set("To", *params.To) - } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &StudioV1FlowEngagement{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &StudioV1FlowEngagement{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } - // CreateExecutionParams Optional parameters for the method 'CreateExecution' type CreateExecutionParams struct { - From *string `json:"From,omitempty"` + From *string `json:"From,omitempty"` Parameters *map[string]interface{} `json:"Parameters,omitempty"` - To *string `json:"To,omitempty"` + To *string `json:"To,omitempty"` } /* @@ -104,43 +103,44 @@ type CreateExecutionParams struct { * @param "Parameters" (map[string]interface{}) - JSON data that will be added to the Flow's context and that can be accessed as variables inside your Flow. For example, if you pass in `Parameters={\\\"name\\\":\\\"Zeke\\\"}`, a widget in your Flow can reference the variable `{{flow.data.name}}`, which returns \\\"Zeke\\\". Note: the JSON value must explicitly be passed as a string, not as a hash object. Depending on your particular HTTP library, you may need to add quotes or URL encode the JSON string. * @param "To" (string) - The Contact phone number to start a Studio Flow Execution, available as variable `{{contact.channel.address}}`. * @return StudioV1FlowExecution - */ +*/ func (c *DefaultApiService) CreateExecution(FlowSid string, params *CreateExecutionParams) (*StudioV1FlowExecution, error) { - path := "/v1/Flows/{FlowSid}/Executions" + path := "/v1/Flows/{FlowSid}/Executions" path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + + if params != nil && params.From != nil { + data.Set("From", *params.From) +} + if params != nil && params.Parameters != nil { + v, err := json.Marshal(params.Parameters) - if params != nil && params.From != nil { - data.Set("From", *params.From) + if err != nil { + return nil, err } - if params != nil && params.Parameters != nil { - v, err := json.Marshal(params.Parameters) - if err != nil { - return nil, err - } + data.Set("Parameters", fmt.Sprint(v)) +} + if params != nil && params.To != nil { + data.Set("To", *params.To) +} - data.Set("Parameters", fmt.Sprint(v)) - } - if params != nil && params.To != nil { - data.Set("To", *params.To) - } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &StudioV1FlowExecution{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &StudioV1FlowExecution{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -148,23 +148,25 @@ func (c *DefaultApiService) CreateExecution(FlowSid string, params *CreateExecut * Delete this Engagement and all Steps relating to it. * @param FlowSid The SID of the Flow to delete Engagements from. * @param Sid The SID of the Engagement resource to delete. - */ -func (c *DefaultApiService) DeleteEngagement(FlowSid string, Sid string) error { - path := "/v1/Flows/{FlowSid}/Engagements/{Sid}" +*/ +func (c *DefaultApiService) DeleteEngagement(FlowSid string, Sid string, ) (error) { + path := "/v1/Flows/{FlowSid}/Engagements/{Sid}" path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* @@ -172,45 +174,49 @@ func (c *DefaultApiService) DeleteEngagement(FlowSid string, Sid string) error { * Delete the Execution and all Steps relating to it. * @param FlowSid The SID of the Flow with the Execution resources to delete. * @param Sid The SID of the Execution resource to delete. - */ -func (c *DefaultApiService) DeleteExecution(FlowSid string, Sid string) error { - path := "/v1/Flows/{FlowSid}/Executions/{Sid}" +*/ +func (c *DefaultApiService) DeleteExecution(FlowSid string, Sid string, ) (error) { + path := "/v1/Flows/{FlowSid}/Executions/{Sid}" path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* * DeleteFlow Method for DeleteFlow * Delete a specific Flow. * @param Sid The SID of the Flow resource to delete. - */ -func (c *DefaultApiService) DeleteFlow(Sid string) error { - path := "/v1/Flows/{Sid}" +*/ +func (c *DefaultApiService) DeleteFlow(Sid string, ) (error) { + path := "/v1/Flows/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* @@ -219,28 +225,30 @@ func (c *DefaultApiService) DeleteFlow(Sid string) error { * @param FlowSid The SID of the Flow. * @param Sid The SID of the Engagement resource to fetch. * @return StudioV1FlowEngagement - */ -func (c *DefaultApiService) FetchEngagement(FlowSid string, Sid string) (*StudioV1FlowEngagement, error) { - path := "/v1/Flows/{FlowSid}/Engagements/{Sid}" +*/ +func (c *DefaultApiService) FetchEngagement(FlowSid string, Sid string, ) (*StudioV1FlowEngagement, error) { + path := "/v1/Flows/{FlowSid}/Engagements/{Sid}" path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &StudioV1FlowEngagement{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &StudioV1FlowEngagement{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -249,28 +257,30 @@ func (c *DefaultApiService) FetchEngagement(FlowSid string, Sid string) (*Studio * @param FlowSid The SID of the Flow. * @param EngagementSid The SID of the Engagement. * @return StudioV1FlowEngagementEngagementContext - */ -func (c *DefaultApiService) FetchEngagementContext(FlowSid string, EngagementSid string) (*StudioV1FlowEngagementEngagementContext, error) { - path := "/v1/Flows/{FlowSid}/Engagements/{EngagementSid}/Context" +*/ +func (c *DefaultApiService) FetchEngagementContext(FlowSid string, EngagementSid string, ) (*StudioV1FlowEngagementEngagementContext, error) { + path := "/v1/Flows/{FlowSid}/Engagements/{EngagementSid}/Context" path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) path = strings.Replace(path, "{"+"EngagementSid"+"}", EngagementSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &StudioV1FlowEngagementEngagementContext{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err + defer resp.Body.Close() + + ps := &StudioV1FlowEngagementEngagementContext{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -279,28 +289,30 @@ func (c *DefaultApiService) FetchEngagementContext(FlowSid string, EngagementSid * @param FlowSid The SID of the Flow with the Execution resource to fetch * @param Sid The SID of the Execution resource to fetch. * @return StudioV1FlowExecution - */ -func (c *DefaultApiService) FetchExecution(FlowSid string, Sid string) (*StudioV1FlowExecution, error) { - path := "/v1/Flows/{FlowSid}/Executions/{Sid}" +*/ +func (c *DefaultApiService) FetchExecution(FlowSid string, Sid string, ) (*StudioV1FlowExecution, error) { + path := "/v1/Flows/{FlowSid}/Executions/{Sid}" path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &StudioV1FlowExecution{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &StudioV1FlowExecution{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -309,28 +321,30 @@ func (c *DefaultApiService) FetchExecution(FlowSid string, Sid string) (*StudioV * @param FlowSid The SID of the Flow with the Execution context to fetch. * @param ExecutionSid The SID of the Execution context to fetch. * @return StudioV1FlowExecutionExecutionContext - */ -func (c *DefaultApiService) FetchExecutionContext(FlowSid string, ExecutionSid string) (*StudioV1FlowExecutionExecutionContext, error) { - path := "/v1/Flows/{FlowSid}/Executions/{ExecutionSid}/Context" +*/ +func (c *DefaultApiService) FetchExecutionContext(FlowSid string, ExecutionSid string, ) (*StudioV1FlowExecutionExecutionContext, error) { + path := "/v1/Flows/{FlowSid}/Executions/{ExecutionSid}/Context" path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) path = strings.Replace(path, "{"+"ExecutionSid"+"}", ExecutionSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &StudioV1FlowExecutionExecutionContext{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &StudioV1FlowExecutionExecutionContext{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -340,29 +354,31 @@ func (c *DefaultApiService) FetchExecutionContext(FlowSid string, ExecutionSid s * @param ExecutionSid The SID of the Execution resource with the Step to fetch. * @param Sid The SID of the ExecutionStep resource to fetch. * @return StudioV1FlowExecutionExecutionStep - */ -func (c *DefaultApiService) FetchExecutionStep(FlowSid string, ExecutionSid string, Sid string) (*StudioV1FlowExecutionExecutionStep, error) { - path := "/v1/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps/{Sid}" +*/ +func (c *DefaultApiService) FetchExecutionStep(FlowSid string, ExecutionSid string, Sid string, ) (*StudioV1FlowExecutionExecutionStep, error) { + path := "/v1/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps/{Sid}" path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) path = strings.Replace(path, "{"+"ExecutionSid"+"}", ExecutionSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &StudioV1FlowExecutionExecutionStep{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &StudioV1FlowExecutionExecutionStep{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -372,29 +388,31 @@ func (c *DefaultApiService) FetchExecutionStep(FlowSid string, ExecutionSid stri * @param ExecutionSid The SID of the Execution resource with the Step to fetch. * @param StepSid The SID of the Step to fetch. * @return StudioV1FlowExecutionExecutionStepExecutionStepContext - */ -func (c *DefaultApiService) FetchExecutionStepContext(FlowSid string, ExecutionSid string, StepSid string) (*StudioV1FlowExecutionExecutionStepExecutionStepContext, error) { - path := "/v1/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps/{StepSid}/Context" +*/ +func (c *DefaultApiService) FetchExecutionStepContext(FlowSid string, ExecutionSid string, StepSid string, ) (*StudioV1FlowExecutionExecutionStepExecutionStepContext, error) { + path := "/v1/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps/{StepSid}/Context" path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) path = strings.Replace(path, "{"+"ExecutionSid"+"}", ExecutionSid, -1) path = strings.Replace(path, "{"+"StepSid"+"}", StepSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &StudioV1FlowExecutionExecutionStepExecutionStepContext{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err + defer resp.Body.Close() + + ps := &StudioV1FlowExecutionExecutionStepExecutionStepContext{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -402,27 +420,29 @@ func (c *DefaultApiService) FetchExecutionStepContext(FlowSid string, ExecutionS * Retrieve a specific Flow. * @param Sid The SID of the Flow resource to fetch. * @return StudioV1Flow - */ -func (c *DefaultApiService) FetchFlow(Sid string) (*StudioV1Flow, error) { - path := "/v1/Flows/{Sid}" +*/ +func (c *DefaultApiService) FetchFlow(Sid string, ) (*StudioV1Flow, error) { + path := "/v1/Flows/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &StudioV1Flow{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &StudioV1Flow{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -432,29 +452,31 @@ func (c *DefaultApiService) FetchFlow(Sid string) (*StudioV1Flow, error) { * @param EngagementSid The SID of the Engagement with the Step to fetch. * @param Sid The SID of the Step resource to fetch. * @return StudioV1FlowEngagementStep - */ -func (c *DefaultApiService) FetchStep(FlowSid string, EngagementSid string, Sid string) (*StudioV1FlowEngagementStep, error) { - path := "/v1/Flows/{FlowSid}/Engagements/{EngagementSid}/Steps/{Sid}" +*/ +func (c *DefaultApiService) FetchStep(FlowSid string, EngagementSid string, Sid string, ) (*StudioV1FlowEngagementStep, error) { + path := "/v1/Flows/{FlowSid}/Engagements/{EngagementSid}/Steps/{Sid}" path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) path = strings.Replace(path, "{"+"EngagementSid"+"}", EngagementSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &StudioV1FlowEngagementStep{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &StudioV1FlowEngagementStep{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -464,31 +486,32 @@ func (c *DefaultApiService) FetchStep(FlowSid string, EngagementSid string, Sid * @param EngagementSid The SID of the Engagement with the Step to fetch. * @param StepSid The SID of the Step to fetch * @return StudioV1FlowEngagementStepStepContext - */ -func (c *DefaultApiService) FetchStepContext(FlowSid string, EngagementSid string, StepSid string) (*StudioV1FlowEngagementStepStepContext, error) { - path := "/v1/Flows/{FlowSid}/Engagements/{EngagementSid}/Steps/{StepSid}/Context" +*/ +func (c *DefaultApiService) FetchStepContext(FlowSid string, EngagementSid string, StepSid string, ) (*StudioV1FlowEngagementStepStepContext, error) { + path := "/v1/Flows/{FlowSid}/Engagements/{EngagementSid}/Steps/{StepSid}/Context" path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) path = strings.Replace(path, "{"+"EngagementSid"+"}", EngagementSid, -1) path = strings.Replace(path, "{"+"StepSid"+"}", StepSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &StudioV1FlowEngagementStepStepContext{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err -} + defer resp.Body.Close() + ps := &StudioV1FlowEngagementStepStepContext{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} // ListEngagementParams Optional parameters for the method 'ListEngagement' type ListEngagementParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -501,38 +524,38 @@ type ListEngagementParams struct { * @param optional nil or *ListEngagementParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListEngagementResponse - */ +*/ func (c *DefaultApiService) ListEngagement(FlowSid string, params *ListEngagementParams) (*ListEngagementResponse, error) { - path := "/v1/Flows/{FlowSid}/Engagements" + path := "/v1/Flows/{FlowSid}/Engagements" path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListEngagementResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListEngagementResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListExecutionParams Optional parameters for the method 'ListExecution' type ListExecutionParams struct { DateCreatedFrom *time.Time `json:"DateCreatedFrom,omitempty"` - DateCreatedTo *time.Time `json:"DateCreatedTo,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + DateCreatedTo *time.Time `json:"DateCreatedTo,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -544,39 +567,39 @@ type ListExecutionParams struct { * @param "DateCreatedTo" (time.Time) - Only show Execution resources starting before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time, given as `YYYY-MM-DDThh:mm:ss-hh:mm`. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListExecutionResponse - */ +*/ func (c *DefaultApiService) ListExecution(FlowSid string, params *ListExecutionParams) (*ListExecutionResponse, error) { - path := "/v1/Flows/{FlowSid}/Executions" + path := "/v1/Flows/{FlowSid}/Executions" path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.DateCreatedFrom != nil { - data.Set("DateCreatedFrom", fmt.Sprint(*params.DateCreatedFrom)) - } - if params != nil && params.DateCreatedTo != nil { - data.Set("DateCreatedTo", fmt.Sprint(*params.DateCreatedTo)) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.DateCreatedFrom != nil { + data.Set("DateCreatedFrom", fmt.Sprint(*params.DateCreatedFrom)) +} + if params != nil && params.DateCreatedTo != nil { + data.Set("DateCreatedTo", fmt.Sprint(*params.DateCreatedTo)) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListExecutionResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListExecutionResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListExecutionStepParams Optional parameters for the method 'ListExecutionStep' type ListExecutionStepParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -590,34 +613,34 @@ type ListExecutionStepParams struct { * @param optional nil or *ListExecutionStepParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListExecutionStepResponse - */ +*/ func (c *DefaultApiService) ListExecutionStep(FlowSid string, ExecutionSid string, params *ListExecutionStepParams) (*ListExecutionStepResponse, error) { - path := "/v1/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps" + path := "/v1/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps" path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) path = strings.Replace(path, "{"+"ExecutionSid"+"}", ExecutionSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListExecutionStepResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListExecutionStepResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListFlowParams Optional parameters for the method 'ListFlow' type ListFlowParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -629,32 +652,32 @@ type ListFlowParams struct { * @param optional nil or *ListFlowParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListFlowResponse - */ +*/ func (c *DefaultApiService) ListFlow(params *ListFlowParams) (*ListFlowResponse, error) { - path := "/v1/Flows" + path := "/v1/Flows" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListFlowResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListFlowResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListStepParams Optional parameters for the method 'ListStep' type ListStepParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -668,34 +691,34 @@ type ListStepParams struct { * @param optional nil or *ListStepParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListStepResponse - */ +*/ func (c *DefaultApiService) ListStep(FlowSid string, EngagementSid string, params *ListStepParams) (*ListStepResponse, error) { - path := "/v1/Flows/{FlowSid}/Engagements/{EngagementSid}/Steps" + path := "/v1/Flows/{FlowSid}/Engagements/{EngagementSid}/Steps" path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) path = strings.Replace(path, "{"+"EngagementSid"+"}", EngagementSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListStepResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListStepResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateExecutionParams Optional parameters for the method 'UpdateExecution' type UpdateExecutionParams struct { Status *string `json:"Status,omitempty"` @@ -709,30 +732,31 @@ type UpdateExecutionParams struct { * @param optional nil or *UpdateExecutionParams - Optional Parameters: * @param "Status" (string) - The status of the Execution. Can only be `ended`. * @return StudioV1FlowExecution - */ +*/ func (c *DefaultApiService) UpdateExecution(FlowSid string, Sid string, params *UpdateExecutionParams) (*StudioV1FlowExecution, error) { - path := "/v1/Flows/{FlowSid}/Executions/{Sid}" + path := "/v1/Flows/{FlowSid}/Executions/{Sid}" path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) - } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &StudioV1FlowExecution{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() + + ps := &StudioV1FlowExecution{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } diff --git a/twilio/rest/studio/v1/model_list_engagement_response.go b/twilio/rest/studio/v1/model_list_engagement_response.go index 13cd983dc..e0c39a157 100644 --- a/twilio/rest/studio/v1/model_list_engagement_response.go +++ b/twilio/rest/studio/v1/model_list_engagement_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Studio - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListEngagementResponse struct for ListEngagementResponse type ListEngagementResponse struct { Engagements []StudioV1FlowEngagement `json:"Engagements,omitempty"` - Meta ListFlowResponseMeta `json:"Meta,omitempty"` + Meta ListFlowResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/studio/v1/model_list_execution_response.go b/twilio/rest/studio/v1/model_list_execution_response.go index f2745c552..79f8fca8f 100644 --- a/twilio/rest/studio/v1/model_list_execution_response.go +++ b/twilio/rest/studio/v1/model_list_execution_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Studio - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListExecutionResponse struct for ListExecutionResponse type ListExecutionResponse struct { Executions []StudioV1FlowExecution `json:"Executions,omitempty"` - Meta ListFlowResponseMeta `json:"Meta,omitempty"` + Meta ListFlowResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/studio/v1/model_list_execution_step_response.go b/twilio/rest/studio/v1/model_list_execution_step_response.go index 33fdd1d18..bb61fc348 100644 --- a/twilio/rest/studio/v1/model_list_execution_step_response.go +++ b/twilio/rest/studio/v1/model_list_execution_step_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Studio - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListExecutionStepResponse struct for ListExecutionStepResponse type ListExecutionStepResponse struct { - Meta ListFlowResponseMeta `json:"Meta,omitempty"` + Meta ListFlowResponseMeta `json:"Meta,omitempty"` Steps []StudioV1FlowExecutionExecutionStep `json:"Steps,omitempty"` } diff --git a/twilio/rest/studio/v1/model_list_flow_response.go b/twilio/rest/studio/v1/model_list_flow_response.go index da7c22848..ff61e78a1 100644 --- a/twilio/rest/studio/v1/model_list_flow_response.go +++ b/twilio/rest/studio/v1/model_list_flow_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Studio - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListFlowResponse struct for ListFlowResponse type ListFlowResponse struct { - Flows []StudioV1Flow `json:"Flows,omitempty"` - Meta ListFlowResponseMeta `json:"Meta,omitempty"` + Flows []StudioV1Flow `json:"Flows,omitempty"` + Meta ListFlowResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/studio/v1/model_list_flow_response_meta.go b/twilio/rest/studio/v1/model_list_flow_response_meta.go index 17cc8ee47..5a4c17878 100644 --- a/twilio/rest/studio/v1/model_list_flow_response_meta.go +++ b/twilio/rest/studio/v1/model_list_flow_response_meta.go @@ -1,23 +1,22 @@ /* - * Twilio - Studio - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListFlowResponseMeta struct for ListFlowResponseMeta type ListFlowResponseMeta struct { - FirstPageUrl string `json:"FirstPageUrl,omitempty"` - Key string `json:"Key,omitempty"` - NextPageUrl string `json:"NextPageUrl,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` - Url string `json:"Url,omitempty"` + Url string `json:"Url,omitempty"` } diff --git a/twilio/rest/studio/v1/model_list_step_response.go b/twilio/rest/studio/v1/model_list_step_response.go index 214e7413e..e8b43fbf7 100644 --- a/twilio/rest/studio/v1/model_list_step_response.go +++ b/twilio/rest/studio/v1/model_list_step_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Studio - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListStepResponse struct for ListStepResponse type ListStepResponse struct { - Meta ListFlowResponseMeta `json:"Meta,omitempty"` + Meta ListFlowResponseMeta `json:"Meta,omitempty"` Steps []StudioV1FlowEngagementStep `json:"Steps,omitempty"` } diff --git a/twilio/rest/studio/v1/model_studio_v1_flow.go b/twilio/rest/studio/v1/model_studio_v1_flow.go index 49599f861..a7269aac0 100644 --- a/twilio/rest/studio/v1/model_studio_v1_flow.go +++ b/twilio/rest/studio/v1/model_studio_v1_flow.go @@ -1,20 +1,18 @@ /* - * Twilio - Studio - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // StudioV1Flow struct for StudioV1Flow type StudioV1Flow struct { // The SID of the Account that created the resource diff --git a/twilio/rest/studio/v1/model_studio_v1_flow_engagement.go b/twilio/rest/studio/v1/model_studio_v1_flow_engagement.go index 3353f429e..d8572315e 100644 --- a/twilio/rest/studio/v1/model_studio_v1_flow_engagement.go +++ b/twilio/rest/studio/v1/model_studio_v1_flow_engagement.go @@ -1,20 +1,18 @@ /* - * Twilio - Studio - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // StudioV1FlowEngagement struct for StudioV1FlowEngagement type StudioV1FlowEngagement struct { // The SID of the Account that created the resource diff --git a/twilio/rest/studio/v1/model_studio_v1_flow_engagement_engagement_context.go b/twilio/rest/studio/v1/model_studio_v1_flow_engagement_engagement_context.go index 535f5b93f..6b43fb43d 100644 --- a/twilio/rest/studio/v1/model_studio_v1_flow_engagement_engagement_context.go +++ b/twilio/rest/studio/v1/model_studio_v1_flow_engagement_engagement_context.go @@ -1,16 +1,15 @@ /* - * Twilio - Studio - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // StudioV1FlowEngagementEngagementContext struct for StudioV1FlowEngagementEngagementContext type StudioV1FlowEngagementEngagementContext struct { // Account SID diff --git a/twilio/rest/studio/v1/model_studio_v1_flow_engagement_step.go b/twilio/rest/studio/v1/model_studio_v1_flow_engagement_step.go index 960e75c2f..8b0f2cff2 100644 --- a/twilio/rest/studio/v1/model_studio_v1_flow_engagement_step.go +++ b/twilio/rest/studio/v1/model_studio_v1_flow_engagement_step.go @@ -1,20 +1,18 @@ /* - * Twilio - Studio - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // StudioV1FlowEngagementStep struct for StudioV1FlowEngagementStep type StudioV1FlowEngagementStep struct { // The SID of the Account that created the resource diff --git a/twilio/rest/studio/v1/model_studio_v1_flow_engagement_step_step_context.go b/twilio/rest/studio/v1/model_studio_v1_flow_engagement_step_step_context.go index 4b27cb7d6..fd1077309 100644 --- a/twilio/rest/studio/v1/model_studio_v1_flow_engagement_step_step_context.go +++ b/twilio/rest/studio/v1/model_studio_v1_flow_engagement_step_step_context.go @@ -1,16 +1,15 @@ /* - * Twilio - Studio - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // StudioV1FlowEngagementStepStepContext struct for StudioV1FlowEngagementStepStepContext type StudioV1FlowEngagementStepStepContext struct { // The SID of the Account that created the resource diff --git a/twilio/rest/studio/v1/model_studio_v1_flow_execution.go b/twilio/rest/studio/v1/model_studio_v1_flow_execution.go index f2015cb47..0d1a7d500 100644 --- a/twilio/rest/studio/v1/model_studio_v1_flow_execution.go +++ b/twilio/rest/studio/v1/model_studio_v1_flow_execution.go @@ -1,20 +1,18 @@ /* - * Twilio - Studio - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // StudioV1FlowExecution struct for StudioV1FlowExecution type StudioV1FlowExecution struct { // The SID of the Account that created the resource diff --git a/twilio/rest/studio/v1/model_studio_v1_flow_execution_execution_context.go b/twilio/rest/studio/v1/model_studio_v1_flow_execution_execution_context.go index 266978753..7a8e05abe 100644 --- a/twilio/rest/studio/v1/model_studio_v1_flow_execution_execution_context.go +++ b/twilio/rest/studio/v1/model_studio_v1_flow_execution_execution_context.go @@ -1,16 +1,15 @@ /* - * Twilio - Studio - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // StudioV1FlowExecutionExecutionContext struct for StudioV1FlowExecutionExecutionContext type StudioV1FlowExecutionExecutionContext struct { // The SID of the Account that created the resource diff --git a/twilio/rest/studio/v1/model_studio_v1_flow_execution_execution_step.go b/twilio/rest/studio/v1/model_studio_v1_flow_execution_execution_step.go index 517cb9454..946ad9057 100644 --- a/twilio/rest/studio/v1/model_studio_v1_flow_execution_execution_step.go +++ b/twilio/rest/studio/v1/model_studio_v1_flow_execution_execution_step.go @@ -1,20 +1,18 @@ /* - * Twilio - Studio - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // StudioV1FlowExecutionExecutionStep struct for StudioV1FlowExecutionExecutionStep type StudioV1FlowExecutionExecutionStep struct { // The SID of the Account that created the resource diff --git a/twilio/rest/studio/v1/model_studio_v1_flow_execution_execution_step_execution_step_context.go b/twilio/rest/studio/v1/model_studio_v1_flow_execution_execution_step_execution_step_context.go index e5fceb9ef..a5990e7f6 100644 --- a/twilio/rest/studio/v1/model_studio_v1_flow_execution_execution_step_execution_step_context.go +++ b/twilio/rest/studio/v1/model_studio_v1_flow_execution_execution_step_execution_step_context.go @@ -1,16 +1,15 @@ /* - * Twilio - Studio - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // StudioV1FlowExecutionExecutionStepExecutionStepContext struct for StudioV1FlowExecutionExecutionStepExecutionStepContext type StudioV1FlowExecutionExecutionStepExecutionStepContext struct { // The SID of the Account that created the resource diff --git a/twilio/rest/studio/v2/api_default.go b/twilio/rest/studio/v2/api_default.go index f2533dd5c..297925091 100644 --- a/twilio/rest/studio/v2/api_default.go +++ b/twilio/rest/studio/v2/api_default.go @@ -1,11 +1,11 @@ /* - * Twilio - Studio - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,11 +14,10 @@ package openapi import ( "encoding/json" "fmt" - "net/url" - "strings" - "time" - twilio "github.com/twilio/twilio-go/client" + "net/url" + "strings" + "time" ) type DefaultApiService struct { @@ -27,17 +26,17 @@ type DefaultApiService struct { } func NewDefaultApiService(client *twilio.Client) *DefaultApiService { - return &DefaultApiService{ - client: client, + return &DefaultApiService { + client: client, baseURL: "https://studio.twilio.com", } } // CreateExecutionParams Optional parameters for the method 'CreateExecution' type CreateExecutionParams struct { - From *string `json:"From,omitempty"` + From *string `json:"From,omitempty"` Parameters *map[string]interface{} `json:"Parameters,omitempty"` - To *string `json:"To,omitempty"` + To *string `json:"To,omitempty"` } /* @@ -49,51 +48,51 @@ type CreateExecutionParams struct { * @param "Parameters" (map[string]interface{}) - JSON data that will be added to the Flow's context and that can be accessed as variables inside your Flow. For example, if you pass in `Parameters={\\\"name\\\":\\\"Zeke\\\"}`, a widget in your Flow can reference the variable `{{flow.data.name}}`, which returns \\\"Zeke\\\". Note: the JSON value must explicitly be passed as a string, not as a hash object. Depending on your particular HTTP library, you may need to add quotes or URL encode the JSON string. * @param "To" (string) - The Contact phone number to start a Studio Flow Execution, available as variable `{{contact.channel.address}}`. * @return StudioV2FlowExecution - */ +*/ func (c *DefaultApiService) CreateExecution(FlowSid string, params *CreateExecutionParams) (*StudioV2FlowExecution, error) { - path := "/v2/Flows/{FlowSid}/Executions" + path := "/v2/Flows/{FlowSid}/Executions" path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + + if params != nil && params.From != nil { + data.Set("From", *params.From) +} + if params != nil && params.Parameters != nil { + v, err := json.Marshal(params.Parameters) - if params != nil && params.From != nil { - data.Set("From", *params.From) + if err != nil { + return nil, err } - if params != nil && params.Parameters != nil { - v, err := json.Marshal(params.Parameters) - if err != nil { - return nil, err - } + data.Set("Parameters", fmt.Sprint(v)) +} + if params != nil && params.To != nil { + data.Set("To", *params.To) +} - data.Set("Parameters", fmt.Sprint(v)) - } - if params != nil && params.To != nil { - data.Set("To", *params.To) - } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &StudioV2FlowExecution{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &StudioV2FlowExecution{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } - // CreateFlowParams Optional parameters for the method 'CreateFlow' type CreateFlowParams struct { - CommitMessage *string `json:"CommitMessage,omitempty"` - Definition *map[string]interface{} `json:"Definition,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Status *string `json:"Status,omitempty"` + CommitMessage *string `json:"CommitMessage,omitempty"` + Definition *map[string]interface{} `json:"Definition,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Status *string `json:"Status,omitempty"` } /* @@ -105,45 +104,46 @@ type CreateFlowParams struct { * @param "FriendlyName" (string) - The string that you assigned to describe the Flow. * @param "Status" (string) - The status of the Flow. Can be: `draft` or `published`. * @return StudioV2Flow - */ +*/ func (c *DefaultApiService) CreateFlow(params *CreateFlowParams) (*StudioV2Flow, error) { - path := "/v2/Flows" + path := "/v2/Flows" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.CommitMessage != nil { - data.Set("CommitMessage", *params.CommitMessage) + if params != nil && params.CommitMessage != nil { + data.Set("CommitMessage", *params.CommitMessage) +} + if params != nil && params.Definition != nil { + v, err := json.Marshal(params.Definition) + + if err != nil { + return nil, err } - if params != nil && params.Definition != nil { - v, err := json.Marshal(params.Definition) - if err != nil { - return nil, err - } + data.Set("Definition", fmt.Sprint(v)) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) +} - data.Set("Definition", fmt.Sprint(v)) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) - } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &StudioV2Flow{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &StudioV2Flow{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -151,45 +151,49 @@ func (c *DefaultApiService) CreateFlow(params *CreateFlowParams) (*StudioV2Flow, * Delete the Execution and all Steps relating to it. * @param FlowSid The SID of the Flow with the Execution resources to delete. * @param Sid The SID of the Execution resource to delete. - */ -func (c *DefaultApiService) DeleteExecution(FlowSid string, Sid string) error { - path := "/v2/Flows/{FlowSid}/Executions/{Sid}" +*/ +func (c *DefaultApiService) DeleteExecution(FlowSid string, Sid string, ) (error) { + path := "/v2/Flows/{FlowSid}/Executions/{Sid}" path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* * DeleteFlow Method for DeleteFlow * Delete a specific Flow. * @param Sid The SID of the Flow resource to delete. - */ -func (c *DefaultApiService) DeleteFlow(Sid string) error { - path := "/v2/Flows/{Sid}" +*/ +func (c *DefaultApiService) DeleteFlow(Sid string, ) (error) { + path := "/v2/Flows/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* @@ -198,28 +202,30 @@ func (c *DefaultApiService) DeleteFlow(Sid string) error { * @param FlowSid The SID of the Flow with the Execution resource to fetch * @param Sid The SID of the Execution resource to fetch. * @return StudioV2FlowExecution - */ -func (c *DefaultApiService) FetchExecution(FlowSid string, Sid string) (*StudioV2FlowExecution, error) { - path := "/v2/Flows/{FlowSid}/Executions/{Sid}" +*/ +func (c *DefaultApiService) FetchExecution(FlowSid string, Sid string, ) (*StudioV2FlowExecution, error) { + path := "/v2/Flows/{FlowSid}/Executions/{Sid}" path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &StudioV2FlowExecution{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &StudioV2FlowExecution{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -228,28 +234,30 @@ func (c *DefaultApiService) FetchExecution(FlowSid string, Sid string) (*StudioV * @param FlowSid The SID of the Flow with the Execution context to fetch. * @param ExecutionSid The SID of the Execution context to fetch. * @return StudioV2FlowExecutionExecutionContext - */ -func (c *DefaultApiService) FetchExecutionContext(FlowSid string, ExecutionSid string) (*StudioV2FlowExecutionExecutionContext, error) { - path := "/v2/Flows/{FlowSid}/Executions/{ExecutionSid}/Context" +*/ +func (c *DefaultApiService) FetchExecutionContext(FlowSid string, ExecutionSid string, ) (*StudioV2FlowExecutionExecutionContext, error) { + path := "/v2/Flows/{FlowSid}/Executions/{ExecutionSid}/Context" path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) path = strings.Replace(path, "{"+"ExecutionSid"+"}", ExecutionSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &StudioV2FlowExecutionExecutionContext{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &StudioV2FlowExecutionExecutionContext{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -259,29 +267,31 @@ func (c *DefaultApiService) FetchExecutionContext(FlowSid string, ExecutionSid s * @param ExecutionSid The SID of the Execution resource with the Step to fetch. * @param Sid The SID of the ExecutionStep resource to fetch. * @return StudioV2FlowExecutionExecutionStep - */ -func (c *DefaultApiService) FetchExecutionStep(FlowSid string, ExecutionSid string, Sid string) (*StudioV2FlowExecutionExecutionStep, error) { - path := "/v2/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps/{Sid}" +*/ +func (c *DefaultApiService) FetchExecutionStep(FlowSid string, ExecutionSid string, Sid string, ) (*StudioV2FlowExecutionExecutionStep, error) { + path := "/v2/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps/{Sid}" path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) path = strings.Replace(path, "{"+"ExecutionSid"+"}", ExecutionSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &StudioV2FlowExecutionExecutionStep{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &StudioV2FlowExecutionExecutionStep{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -291,29 +301,31 @@ func (c *DefaultApiService) FetchExecutionStep(FlowSid string, ExecutionSid stri * @param ExecutionSid The SID of the Execution resource with the Step to fetch. * @param StepSid The SID of the Step to fetch. * @return StudioV2FlowExecutionExecutionStepExecutionStepContext - */ -func (c *DefaultApiService) FetchExecutionStepContext(FlowSid string, ExecutionSid string, StepSid string) (*StudioV2FlowExecutionExecutionStepExecutionStepContext, error) { - path := "/v2/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps/{StepSid}/Context" +*/ +func (c *DefaultApiService) FetchExecutionStepContext(FlowSid string, ExecutionSid string, StepSid string, ) (*StudioV2FlowExecutionExecutionStepExecutionStepContext, error) { + path := "/v2/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps/{StepSid}/Context" path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) path = strings.Replace(path, "{"+"ExecutionSid"+"}", ExecutionSid, -1) path = strings.Replace(path, "{"+"StepSid"+"}", StepSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &StudioV2FlowExecutionExecutionStepExecutionStepContext{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &StudioV2FlowExecutionExecutionStepExecutionStepContext{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -321,27 +333,29 @@ func (c *DefaultApiService) FetchExecutionStepContext(FlowSid string, ExecutionS * Retrieve a specific Flow. * @param Sid The SID of the Flow resource to fetch. * @return StudioV2Flow - */ -func (c *DefaultApiService) FetchFlow(Sid string) (*StudioV2Flow, error) { - path := "/v2/Flows/{Sid}" +*/ +func (c *DefaultApiService) FetchFlow(Sid string, ) (*StudioV2Flow, error) { + path := "/v2/Flows/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &StudioV2Flow{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &StudioV2Flow{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -350,28 +364,30 @@ func (c *DefaultApiService) FetchFlow(Sid string) (*StudioV2Flow, error) { * @param Sid The SID of the Flow resource to fetch. * @param Revision Specific Revision number or can be `LatestPublished` and `LatestRevision`. * @return StudioV2FlowFlowRevision - */ -func (c *DefaultApiService) FetchFlowRevision(Sid string, Revision string) (*StudioV2FlowFlowRevision, error) { - path := "/v2/Flows/{Sid}/Revisions/{Revision}" +*/ +func (c *DefaultApiService) FetchFlowRevision(Sid string, Revision string, ) (*StudioV2FlowFlowRevision, error) { + path := "/v2/Flows/{Sid}/Revisions/{Revision}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) path = strings.Replace(path, "{"+"Revision"+"}", Revision, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &StudioV2FlowFlowRevision{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &StudioV2FlowFlowRevision{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -379,34 +395,35 @@ func (c *DefaultApiService) FetchFlowRevision(Sid string, Revision string) (*Stu * Fetch flow test users * @param Sid Unique identifier of the flow. * @return StudioV2FlowTestUser - */ -func (c *DefaultApiService) FetchTestUser(Sid string) (*StudioV2FlowTestUser, error) { - path := "/v2/Flows/{Sid}/TestUsers" +*/ +func (c *DefaultApiService) FetchTestUser(Sid string, ) (*StudioV2FlowTestUser, error) { + path := "/v2/Flows/{Sid}/TestUsers" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &StudioV2FlowTestUser{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err -} + defer resp.Body.Close() + ps := &StudioV2FlowTestUser{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} // ListExecutionParams Optional parameters for the method 'ListExecution' type ListExecutionParams struct { DateCreatedFrom *time.Time `json:"DateCreatedFrom,omitempty"` - DateCreatedTo *time.Time `json:"DateCreatedTo,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + DateCreatedTo *time.Time `json:"DateCreatedTo,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -418,39 +435,39 @@ type ListExecutionParams struct { * @param "DateCreatedTo" (time.Time) - Only show Execution resources starting before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time, given as `YYYY-MM-DDThh:mm:ss-hh:mm`. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListExecutionResponse - */ +*/ func (c *DefaultApiService) ListExecution(FlowSid string, params *ListExecutionParams) (*ListExecutionResponse, error) { - path := "/v2/Flows/{FlowSid}/Executions" + path := "/v2/Flows/{FlowSid}/Executions" path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.DateCreatedFrom != nil { - data.Set("DateCreatedFrom", fmt.Sprint(*params.DateCreatedFrom)) - } - if params != nil && params.DateCreatedTo != nil { - data.Set("DateCreatedTo", fmt.Sprint(*params.DateCreatedTo)) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.DateCreatedFrom != nil { + data.Set("DateCreatedFrom", fmt.Sprint(*params.DateCreatedFrom)) +} + if params != nil && params.DateCreatedTo != nil { + data.Set("DateCreatedTo", fmt.Sprint(*params.DateCreatedTo)) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListExecutionResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListExecutionResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListExecutionStepParams Optional parameters for the method 'ListExecutionStep' type ListExecutionStepParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -464,34 +481,34 @@ type ListExecutionStepParams struct { * @param optional nil or *ListExecutionStepParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListExecutionStepResponse - */ +*/ func (c *DefaultApiService) ListExecutionStep(FlowSid string, ExecutionSid string, params *ListExecutionStepParams) (*ListExecutionStepResponse, error) { - path := "/v2/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps" + path := "/v2/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps" path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) path = strings.Replace(path, "{"+"ExecutionSid"+"}", ExecutionSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListExecutionStepResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListExecutionStepResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListFlowParams Optional parameters for the method 'ListFlow' type ListFlowParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -503,32 +520,32 @@ type ListFlowParams struct { * @param optional nil or *ListFlowParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListFlowResponse - */ +*/ func (c *DefaultApiService) ListFlow(params *ListFlowParams) (*ListFlowResponse, error) { - path := "/v2/Flows" + path := "/v2/Flows" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListFlowResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListFlowResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListFlowRevisionParams Optional parameters for the method 'ListFlowRevision' type ListFlowRevisionParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -541,33 +558,33 @@ type ListFlowRevisionParams struct { * @param optional nil or *ListFlowRevisionParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListFlowRevisionResponse - */ +*/ func (c *DefaultApiService) ListFlowRevision(Sid string, params *ListFlowRevisionParams) (*ListFlowRevisionResponse, error) { - path := "/v2/Flows/{Sid}/Revisions" + path := "/v2/Flows/{Sid}/Revisions" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListFlowRevisionResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListFlowRevisionResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateExecutionParams Optional parameters for the method 'UpdateExecution' type UpdateExecutionParams struct { Status *string `json:"Status,omitempty"` @@ -581,40 +598,40 @@ type UpdateExecutionParams struct { * @param optional nil or *UpdateExecutionParams - Optional Parameters: * @param "Status" (string) - The status of the Execution. Can only be `ended`. * @return StudioV2FlowExecution - */ +*/ func (c *DefaultApiService) UpdateExecution(FlowSid string, Sid string, params *UpdateExecutionParams) (*StudioV2FlowExecution, error) { - path := "/v2/Flows/{FlowSid}/Executions/{Sid}" + path := "/v2/Flows/{FlowSid}/Executions/{Sid}" path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) - } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &StudioV2FlowExecution{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &StudioV2FlowExecution{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateFlowParams Optional parameters for the method 'UpdateFlow' type UpdateFlowParams struct { - CommitMessage *string `json:"CommitMessage,omitempty"` - Definition *map[string]interface{} `json:"Definition,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Status *string `json:"Status,omitempty"` + CommitMessage *string `json:"CommitMessage,omitempty"` + Definition *map[string]interface{} `json:"Definition,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Status *string `json:"Status,omitempty"` } /* @@ -627,54 +644,54 @@ type UpdateFlowParams struct { * @param "FriendlyName" (string) - The string that you assigned to describe the Flow. * @param "Status" (string) - The status of the Flow. Can be: `draft` or `published`. * @return StudioV2Flow - */ +*/ func (c *DefaultApiService) UpdateFlow(Sid string, params *UpdateFlowParams) (*StudioV2Flow, error) { - path := "/v2/Flows/{Sid}" + path := "/v2/Flows/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + + if params != nil && params.CommitMessage != nil { + data.Set("CommitMessage", *params.CommitMessage) +} + if params != nil && params.Definition != nil { + v, err := json.Marshal(params.Definition) - if params != nil && params.CommitMessage != nil { - data.Set("CommitMessage", *params.CommitMessage) + if err != nil { + return nil, err } - if params != nil && params.Definition != nil { - v, err := json.Marshal(params.Definition) - if err != nil { - return nil, err - } + data.Set("Definition", fmt.Sprint(v)) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) +} - data.Set("Definition", fmt.Sprint(v)) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) - } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &StudioV2Flow{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &StudioV2Flow{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } - // UpdateFlowValidateParams Optional parameters for the method 'UpdateFlowValidate' type UpdateFlowValidateParams struct { - CommitMessage *string `json:"CommitMessage,omitempty"` - Definition *map[string]interface{} `json:"Definition,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Status *string `json:"Status,omitempty"` + CommitMessage *string `json:"CommitMessage,omitempty"` + Definition *map[string]interface{} `json:"Definition,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Status *string `json:"Status,omitempty"` } /* @@ -686,47 +703,47 @@ type UpdateFlowValidateParams struct { * @param "FriendlyName" (string) - The string that you assigned to describe the Flow. * @param "Status" (string) - The status of the Flow. Can be: `draft` or `published`. * @return StudioV2FlowValidate - */ +*/ func (c *DefaultApiService) UpdateFlowValidate(params *UpdateFlowValidateParams) (*StudioV2FlowValidate, error) { - path := "/v2/Flows/Validate" + path := "/v2/Flows/Validate" + + data := url.Values{} + headers := 0 - data := url.Values{} - headers := 0 + if params != nil && params.CommitMessage != nil { + data.Set("CommitMessage", *params.CommitMessage) +} + if params != nil && params.Definition != nil { + v, err := json.Marshal(params.Definition) - if params != nil && params.CommitMessage != nil { - data.Set("CommitMessage", *params.CommitMessage) + if err != nil { + return nil, err } - if params != nil && params.Definition != nil { - v, err := json.Marshal(params.Definition) - if err != nil { - return nil, err - } + data.Set("Definition", fmt.Sprint(v)) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) +} - data.Set("Definition", fmt.Sprint(v)) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) - } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &StudioV2FlowValidate{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &StudioV2FlowValidate{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } - // UpdateTestUserParams Optional parameters for the method 'UpdateTestUser' type UpdateTestUserParams struct { TestUsers *[]string `json:"TestUsers,omitempty"` @@ -739,29 +756,30 @@ type UpdateTestUserParams struct { * @param optional nil or *UpdateTestUserParams - Optional Parameters: * @param "TestUsers" ([]string) - List of test user identities that can test draft versions of the flow. * @return StudioV2FlowTestUser - */ +*/ func (c *DefaultApiService) UpdateTestUser(Sid string, params *UpdateTestUserParams) (*StudioV2FlowTestUser, error) { - path := "/v2/Flows/{Sid}/TestUsers" + path := "/v2/Flows/{Sid}/TestUsers" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.TestUsers != nil { - data.Set("TestUsers", strings.Join(*params.TestUsers, ",")) - } + if params != nil && params.TestUsers != nil { + data.Set("TestUsers", strings.Join(*params.TestUsers, ",")) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &StudioV2FlowTestUser{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() + + ps := &StudioV2FlowTestUser{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } diff --git a/twilio/rest/studio/v2/model_list_execution_response.go b/twilio/rest/studio/v2/model_list_execution_response.go index 61126ffa8..f361ba428 100644 --- a/twilio/rest/studio/v2/model_list_execution_response.go +++ b/twilio/rest/studio/v2/model_list_execution_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Studio - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListExecutionResponse struct for ListExecutionResponse type ListExecutionResponse struct { Executions []StudioV2FlowExecution `json:"Executions,omitempty"` - Meta ListFlowResponseMeta `json:"Meta,omitempty"` + Meta ListFlowResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/studio/v2/model_list_execution_step_response.go b/twilio/rest/studio/v2/model_list_execution_step_response.go index 72b346f2e..4cccb2756 100644 --- a/twilio/rest/studio/v2/model_list_execution_step_response.go +++ b/twilio/rest/studio/v2/model_list_execution_step_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Studio - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListExecutionStepResponse struct for ListExecutionStepResponse type ListExecutionStepResponse struct { - Meta ListFlowResponseMeta `json:"Meta,omitempty"` + Meta ListFlowResponseMeta `json:"Meta,omitempty"` Steps []StudioV2FlowExecutionExecutionStep `json:"Steps,omitempty"` } diff --git a/twilio/rest/studio/v2/model_list_flow_response.go b/twilio/rest/studio/v2/model_list_flow_response.go index 5f92f613c..f4831fe0e 100644 --- a/twilio/rest/studio/v2/model_list_flow_response.go +++ b/twilio/rest/studio/v2/model_list_flow_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Studio - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListFlowResponse struct for ListFlowResponse type ListFlowResponse struct { - Flows []StudioV2Flow `json:"Flows,omitempty"` - Meta ListFlowResponseMeta `json:"Meta,omitempty"` + Flows []StudioV2Flow `json:"Flows,omitempty"` + Meta ListFlowResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/studio/v2/model_list_flow_response_meta.go b/twilio/rest/studio/v2/model_list_flow_response_meta.go index 17cc8ee47..5a4c17878 100644 --- a/twilio/rest/studio/v2/model_list_flow_response_meta.go +++ b/twilio/rest/studio/v2/model_list_flow_response_meta.go @@ -1,23 +1,22 @@ /* - * Twilio - Studio - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListFlowResponseMeta struct for ListFlowResponseMeta type ListFlowResponseMeta struct { - FirstPageUrl string `json:"FirstPageUrl,omitempty"` - Key string `json:"Key,omitempty"` - NextPageUrl string `json:"NextPageUrl,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` - Url string `json:"Url,omitempty"` + Url string `json:"Url,omitempty"` } diff --git a/twilio/rest/studio/v2/model_list_flow_revision_response.go b/twilio/rest/studio/v2/model_list_flow_revision_response.go index f1916fd6e..890432a56 100644 --- a/twilio/rest/studio/v2/model_list_flow_revision_response.go +++ b/twilio/rest/studio/v2/model_list_flow_revision_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Studio - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListFlowRevisionResponse struct for ListFlowRevisionResponse type ListFlowRevisionResponse struct { - Meta ListFlowResponseMeta `json:"Meta,omitempty"` + Meta ListFlowResponseMeta `json:"Meta,omitempty"` Revisions []StudioV2FlowFlowRevision `json:"Revisions,omitempty"` } diff --git a/twilio/rest/studio/v2/model_studio_v2_flow.go b/twilio/rest/studio/v2/model_studio_v2_flow.go index b5a82970b..69dee9783 100644 --- a/twilio/rest/studio/v2/model_studio_v2_flow.go +++ b/twilio/rest/studio/v2/model_studio_v2_flow.go @@ -1,20 +1,18 @@ /* - * Twilio - Studio - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // StudioV2Flow struct for StudioV2Flow type StudioV2Flow struct { // The SID of the Account that created the resource @@ -44,6 +42,6 @@ type StudioV2Flow struct { // Boolean if the flow definition is valid Valid *bool `json:"Valid,omitempty"` // List of warnings in the flow definition - Warnings *[]map[string]interface{} `json:"Warnings,omitempty"` - WebhookUrl *string `json:"WebhookUrl,omitempty"` + Warnings *[]map[string]interface{} `json:"Warnings,omitempty"` + WebhookUrl *string `json:"WebhookUrl,omitempty"` } diff --git a/twilio/rest/studio/v2/model_studio_v2_flow_execution.go b/twilio/rest/studio/v2/model_studio_v2_flow_execution.go index 894df521b..4320c6f4d 100644 --- a/twilio/rest/studio/v2/model_studio_v2_flow_execution.go +++ b/twilio/rest/studio/v2/model_studio_v2_flow_execution.go @@ -1,20 +1,18 @@ /* - * Twilio - Studio - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // StudioV2FlowExecution struct for StudioV2FlowExecution type StudioV2FlowExecution struct { // The SID of the Account that created the resource diff --git a/twilio/rest/studio/v2/model_studio_v2_flow_execution_execution_context.go b/twilio/rest/studio/v2/model_studio_v2_flow_execution_execution_context.go index 3d74c5537..de3a4a1a2 100644 --- a/twilio/rest/studio/v2/model_studio_v2_flow_execution_execution_context.go +++ b/twilio/rest/studio/v2/model_studio_v2_flow_execution_execution_context.go @@ -1,16 +1,15 @@ /* - * Twilio - Studio - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // StudioV2FlowExecutionExecutionContext struct for StudioV2FlowExecutionExecutionContext type StudioV2FlowExecutionExecutionContext struct { // The SID of the Account that created the resource diff --git a/twilio/rest/studio/v2/model_studio_v2_flow_execution_execution_step.go b/twilio/rest/studio/v2/model_studio_v2_flow_execution_execution_step.go index 307f7c077..a8596816f 100644 --- a/twilio/rest/studio/v2/model_studio_v2_flow_execution_execution_step.go +++ b/twilio/rest/studio/v2/model_studio_v2_flow_execution_execution_step.go @@ -1,20 +1,18 @@ /* - * Twilio - Studio - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // StudioV2FlowExecutionExecutionStep struct for StudioV2FlowExecutionExecutionStep type StudioV2FlowExecutionExecutionStep struct { // The SID of the Account that created the resource diff --git a/twilio/rest/studio/v2/model_studio_v2_flow_execution_execution_step_execution_step_context.go b/twilio/rest/studio/v2/model_studio_v2_flow_execution_execution_step_execution_step_context.go index bc4aff514..350509f77 100644 --- a/twilio/rest/studio/v2/model_studio_v2_flow_execution_execution_step_execution_step_context.go +++ b/twilio/rest/studio/v2/model_studio_v2_flow_execution_execution_step_execution_step_context.go @@ -1,16 +1,15 @@ /* - * Twilio - Studio - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // StudioV2FlowExecutionExecutionStepExecutionStepContext struct for StudioV2FlowExecutionExecutionStepExecutionStepContext type StudioV2FlowExecutionExecutionStepExecutionStepContext struct { // The SID of the Account that created the resource diff --git a/twilio/rest/studio/v2/model_studio_v2_flow_flow_revision.go b/twilio/rest/studio/v2/model_studio_v2_flow_flow_revision.go index 3a5d305de..1b07169e3 100644 --- a/twilio/rest/studio/v2/model_studio_v2_flow_flow_revision.go +++ b/twilio/rest/studio/v2/model_studio_v2_flow_flow_revision.go @@ -1,20 +1,18 @@ /* - * Twilio - Studio - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // StudioV2FlowFlowRevision struct for StudioV2FlowFlowRevision type StudioV2FlowFlowRevision struct { // The SID of the Account that created the resource diff --git a/twilio/rest/studio/v2/model_studio_v2_flow_test_user.go b/twilio/rest/studio/v2/model_studio_v2_flow_test_user.go index efa0a555a..bd5f6e85f 100644 --- a/twilio/rest/studio/v2/model_studio_v2_flow_test_user.go +++ b/twilio/rest/studio/v2/model_studio_v2_flow_test_user.go @@ -1,16 +1,15 @@ /* - * Twilio - Studio - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // StudioV2FlowTestUser struct for StudioV2FlowTestUser type StudioV2FlowTestUser struct { // Unique identifier of the flow. diff --git a/twilio/rest/studio/v2/model_studio_v2_flow_validate.go b/twilio/rest/studio/v2/model_studio_v2_flow_validate.go index efad64eb0..739df7c72 100644 --- a/twilio/rest/studio/v2/model_studio_v2_flow_validate.go +++ b/twilio/rest/studio/v2/model_studio_v2_flow_validate.go @@ -1,16 +1,15 @@ /* - * Twilio - Studio - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // StudioV2FlowValidate struct for StudioV2FlowValidate type StudioV2FlowValidate struct { // Boolean if the flow definition is valid diff --git a/twilio/rest/supersim/v1/api_default.go b/twilio/rest/supersim/v1/api_default.go index 9f9038e53..0e67e011c 100644 --- a/twilio/rest/supersim/v1/api_default.go +++ b/twilio/rest/supersim/v1/api_default.go @@ -1,11 +1,11 @@ /* - * Twilio - Supersim - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Supersim + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,11 +14,10 @@ package openapi import ( "encoding/json" "fmt" - "net/url" - "strings" - "time" - twilio "github.com/twilio/twilio-go/client" + "net/url" + "strings" + "time" ) type DefaultApiService struct { @@ -27,8 +26,8 @@ type DefaultApiService struct { } func NewDefaultApiService(client *twilio.Client) *DefaultApiService { - return &DefaultApiService{ - client: client, + return &DefaultApiService { + client: client, baseURL: "https://supersim.twilio.com", } } @@ -36,9 +35,9 @@ func NewDefaultApiService(client *twilio.Client) *DefaultApiService { // CreateCommandParams Optional parameters for the method 'CreateCommand' type CreateCommandParams struct { CallbackMethod *string `json:"CallbackMethod,omitempty"` - CallbackUrl *string `json:"CallbackUrl,omitempty"` - Command *string `json:"Command,omitempty"` - Sim *string `json:"Sim,omitempty"` + CallbackUrl *string `json:"CallbackUrl,omitempty"` + Command *string `json:"Command,omitempty"` + Sim *string `json:"Sim,omitempty"` } /* @@ -50,50 +49,50 @@ type CreateCommandParams struct { * @param "Command" (string) - The message body of the command. * @param "Sim" (string) - The `sid` or `unique_name` of the [SIM](https://www.twilio.com/docs/wireless/api/sim-resource) to send the Command to. * @return SupersimV1Command - */ +*/ func (c *DefaultApiService) CreateCommand(params *CreateCommandParams) (*SupersimV1Command, error) { - path := "/v1/Commands" + path := "/v1/Commands" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.CallbackMethod != nil { - data.Set("CallbackMethod", *params.CallbackMethod) - } - if params != nil && params.CallbackUrl != nil { - data.Set("CallbackUrl", *params.CallbackUrl) - } - if params != nil && params.Command != nil { - data.Set("Command", *params.Command) - } - if params != nil && params.Sim != nil { - data.Set("Sim", *params.Sim) - } + if params != nil && params.CallbackMethod != nil { + data.Set("CallbackMethod", *params.CallbackMethod) +} + if params != nil && params.CallbackUrl != nil { + data.Set("CallbackUrl", *params.CallbackUrl) +} + if params != nil && params.Command != nil { + data.Set("Command", *params.Command) +} + if params != nil && params.Sim != nil { + data.Set("Sim", *params.Sim) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &SupersimV1Command{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &SupersimV1Command{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateFleetParams Optional parameters for the method 'CreateFleet' type CreateFleetParams struct { - CommandsEnabled *bool `json:"CommandsEnabled,omitempty"` - CommandsMethod *string `json:"CommandsMethod,omitempty"` - CommandsUrl *string `json:"CommandsUrl,omitempty"` - DataEnabled *bool `json:"DataEnabled,omitempty"` - DataLimit *int32 `json:"DataLimit,omitempty"` + CommandsEnabled *bool `json:"CommandsEnabled,omitempty"` + CommandsMethod *string `json:"CommandsMethod,omitempty"` + CommandsUrl *string `json:"CommandsUrl,omitempty"` + DataEnabled *bool `json:"DataEnabled,omitempty"` + DataLimit *int32 `json:"DataLimit,omitempty"` NetworkAccessProfile *string `json:"NetworkAccessProfile,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` } /* @@ -108,54 +107,54 @@ type CreateFleetParams struct { * @param "NetworkAccessProfile" (string) - The SID or unique name of the Network Access Profile that will control which cellular networks the Fleet's SIMs can connect to. * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. It can be used in place of the resource's `sid` in the URL to address the resource. * @return SupersimV1Fleet - */ +*/ func (c *DefaultApiService) CreateFleet(params *CreateFleetParams) (*SupersimV1Fleet, error) { - path := "/v1/Fleets" + path := "/v1/Fleets" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.CommandsEnabled != nil { - data.Set("CommandsEnabled", fmt.Sprint(*params.CommandsEnabled)) - } - if params != nil && params.CommandsMethod != nil { - data.Set("CommandsMethod", *params.CommandsMethod) - } - if params != nil && params.CommandsUrl != nil { - data.Set("CommandsUrl", *params.CommandsUrl) - } - if params != nil && params.DataEnabled != nil { - data.Set("DataEnabled", fmt.Sprint(*params.DataEnabled)) - } - if params != nil && params.DataLimit != nil { - data.Set("DataLimit", fmt.Sprint(*params.DataLimit)) - } - if params != nil && params.NetworkAccessProfile != nil { - data.Set("NetworkAccessProfile", *params.NetworkAccessProfile) - } - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) - } + if params != nil && params.CommandsEnabled != nil { + data.Set("CommandsEnabled", fmt.Sprint(*params.CommandsEnabled)) +} + if params != nil && params.CommandsMethod != nil { + data.Set("CommandsMethod", *params.CommandsMethod) +} + if params != nil && params.CommandsUrl != nil { + data.Set("CommandsUrl", *params.CommandsUrl) +} + if params != nil && params.DataEnabled != nil { + data.Set("DataEnabled", fmt.Sprint(*params.DataEnabled)) +} + if params != nil && params.DataLimit != nil { + data.Set("DataLimit", fmt.Sprint(*params.DataLimit)) +} + if params != nil && params.NetworkAccessProfile != nil { + data.Set("NetworkAccessProfile", *params.NetworkAccessProfile) +} + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &SupersimV1Fleet{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &SupersimV1Fleet{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateNetworkAccessProfileParams Optional parameters for the method 'CreateNetworkAccessProfile' type CreateNetworkAccessProfileParams struct { - Networks *[]string `json:"Networks,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + Networks *[]string `json:"Networks,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` } /* @@ -165,35 +164,35 @@ type CreateNetworkAccessProfileParams struct { * @param "Networks" ([]string) - List of Network SIDs that this Network Access Profile will allow connections to. * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. It can be used in place of the resource's `sid` in the URL to address the resource. * @return SupersimV1NetworkAccessProfile - */ +*/ func (c *DefaultApiService) CreateNetworkAccessProfile(params *CreateNetworkAccessProfileParams) (*SupersimV1NetworkAccessProfile, error) { - path := "/v1/NetworkAccessProfiles" + path := "/v1/NetworkAccessProfiles" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Networks != nil { - data.Set("Networks", strings.Join(*params.Networks, ",")) - } - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) - } + if params != nil && params.Networks != nil { + data.Set("Networks", strings.Join(*params.Networks, ",")) +} + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &SupersimV1NetworkAccessProfile{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &SupersimV1NetworkAccessProfile{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateNetworkAccessProfileNetworkParams Optional parameters for the method 'CreateNetworkAccessProfileNetwork' type CreateNetworkAccessProfileNetworkParams struct { Network *string `json:"Network,omitempty"` @@ -206,31 +205,32 @@ type CreateNetworkAccessProfileNetworkParams struct { * @param optional nil or *CreateNetworkAccessProfileNetworkParams - Optional Parameters: * @param "Network" (string) - The SID of the Network resource to be added to the Network Access Profile resource. * @return SupersimV1NetworkAccessProfileNetworkAccessProfileNetwork - */ +*/ func (c *DefaultApiService) CreateNetworkAccessProfileNetwork(NetworkAccessProfileSid string, params *CreateNetworkAccessProfileNetworkParams) (*SupersimV1NetworkAccessProfileNetworkAccessProfileNetwork, error) { - path := "/v1/NetworkAccessProfiles/{NetworkAccessProfileSid}/Networks" + path := "/v1/NetworkAccessProfiles/{NetworkAccessProfileSid}/Networks" path = strings.Replace(path, "{"+"NetworkAccessProfileSid"+"}", NetworkAccessProfileSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Network != nil { - data.Set("Network", *params.Network) - } + if params != nil && params.Network != nil { + data.Set("Network", *params.Network) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &SupersimV1NetworkAccessProfileNetworkAccessProfileNetwork{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() + + ps := &SupersimV1NetworkAccessProfileNetworkAccessProfileNetwork{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -238,23 +238,25 @@ func (c *DefaultApiService) CreateNetworkAccessProfileNetwork(NetworkAccessProfi * Remove a Network resource from the Network Access Profile resource's. * @param NetworkAccessProfileSid The unique string that identifies the Network Access Profile resource. * @param Sid The SID of the Network resource to be removed from the Network Access Profile resource. - */ -func (c *DefaultApiService) DeleteNetworkAccessProfileNetwork(NetworkAccessProfileSid string, Sid string) error { - path := "/v1/NetworkAccessProfiles/{NetworkAccessProfileSid}/Networks/{Sid}" +*/ +func (c *DefaultApiService) DeleteNetworkAccessProfileNetwork(NetworkAccessProfileSid string, Sid string, ) (error) { + path := "/v1/NetworkAccessProfiles/{NetworkAccessProfileSid}/Networks/{Sid}" path = strings.Replace(path, "{"+"NetworkAccessProfileSid"+"}", NetworkAccessProfileSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* @@ -262,27 +264,29 @@ func (c *DefaultApiService) DeleteNetworkAccessProfileNetwork(NetworkAccessProfi * Fetch a Command instance from your account. * @param Sid The SID of the Command resource to fetch. * @return SupersimV1Command - */ -func (c *DefaultApiService) FetchCommand(Sid string) (*SupersimV1Command, error) { - path := "/v1/Commands/{Sid}" +*/ +func (c *DefaultApiService) FetchCommand(Sid string, ) (*SupersimV1Command, error) { + path := "/v1/Commands/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &SupersimV1Command{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err + defer resp.Body.Close() + + ps := &SupersimV1Command{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -290,27 +294,29 @@ func (c *DefaultApiService) FetchCommand(Sid string) (*SupersimV1Command, error) * Fetch a Fleet instance from your account. * @param Sid The SID of the Fleet resource to fetch. * @return SupersimV1Fleet - */ -func (c *DefaultApiService) FetchFleet(Sid string) (*SupersimV1Fleet, error) { - path := "/v1/Fleets/{Sid}" +*/ +func (c *DefaultApiService) FetchFleet(Sid string, ) (*SupersimV1Fleet, error) { + path := "/v1/Fleets/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &SupersimV1Fleet{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &SupersimV1Fleet{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -318,27 +324,29 @@ func (c *DefaultApiService) FetchFleet(Sid string) (*SupersimV1Fleet, error) { * Fetch a Network resource. * @param Sid The SID of the Network resource to fetch. * @return SupersimV1Network - */ -func (c *DefaultApiService) FetchNetwork(Sid string) (*SupersimV1Network, error) { - path := "/v1/Networks/{Sid}" +*/ +func (c *DefaultApiService) FetchNetwork(Sid string, ) (*SupersimV1Network, error) { + path := "/v1/Networks/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &SupersimV1Network{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &SupersimV1Network{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -346,27 +354,29 @@ func (c *DefaultApiService) FetchNetwork(Sid string) (*SupersimV1Network, error) * Fetch a Network Access Profile instance from your account. * @param Sid The SID of the Network Access Profile resource to fetch. * @return SupersimV1NetworkAccessProfile - */ -func (c *DefaultApiService) FetchNetworkAccessProfile(Sid string) (*SupersimV1NetworkAccessProfile, error) { - path := "/v1/NetworkAccessProfiles/{Sid}" +*/ +func (c *DefaultApiService) FetchNetworkAccessProfile(Sid string, ) (*SupersimV1NetworkAccessProfile, error) { + path := "/v1/NetworkAccessProfiles/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &SupersimV1NetworkAccessProfile{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err + defer resp.Body.Close() + + ps := &SupersimV1NetworkAccessProfile{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -375,28 +385,30 @@ func (c *DefaultApiService) FetchNetworkAccessProfile(Sid string) (*SupersimV1Ne * @param NetworkAccessProfileSid The unique string that identifies the Network Access Profile resource. * @param Sid The SID of the Network resource to fetch. * @return SupersimV1NetworkAccessProfileNetworkAccessProfileNetwork - */ -func (c *DefaultApiService) FetchNetworkAccessProfileNetwork(NetworkAccessProfileSid string, Sid string) (*SupersimV1NetworkAccessProfileNetworkAccessProfileNetwork, error) { - path := "/v1/NetworkAccessProfiles/{NetworkAccessProfileSid}/Networks/{Sid}" +*/ +func (c *DefaultApiService) FetchNetworkAccessProfileNetwork(NetworkAccessProfileSid string, Sid string, ) (*SupersimV1NetworkAccessProfileNetworkAccessProfileNetwork, error) { + path := "/v1/NetworkAccessProfiles/{NetworkAccessProfileSid}/Networks/{Sid}" path = strings.Replace(path, "{"+"NetworkAccessProfileSid"+"}", NetworkAccessProfileSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &SupersimV1NetworkAccessProfileNetworkAccessProfileNetwork{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &SupersimV1NetworkAccessProfileNetworkAccessProfileNetwork{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -404,35 +416,36 @@ func (c *DefaultApiService) FetchNetworkAccessProfileNetwork(NetworkAccessProfil * Fetch a Super SIM instance from your account. * @param Sid The SID of the Sim resource to fetch. * @return SupersimV1Sim - */ -func (c *DefaultApiService) FetchSim(Sid string) (*SupersimV1Sim, error) { - path := "/v1/Sims/{Sid}" +*/ +func (c *DefaultApiService) FetchSim(Sid string, ) (*SupersimV1Sim, error) { + path := "/v1/Sims/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &SupersimV1Sim{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err -} + defer resp.Body.Close() + ps := &SupersimV1Sim{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} // ListCommandParams Optional parameters for the method 'ListCommand' type ListCommandParams struct { - Sim *string `json:"Sim,omitempty"` - Status *string `json:"Status,omitempty"` + Sim *string `json:"Sim,omitempty"` + Status *string `json:"Status,omitempty"` Direction *string `json:"Direction,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -444,45 +457,45 @@ type ListCommandParams struct { * @param "Direction" (string) - The direction of the Command. Can be `to_sim` or `from_sim`. The value of `to_sim` is synonymous with the term `mobile terminated`, and `from_sim` is synonymous with the term `mobile originated`. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListCommandResponse - */ +*/ func (c *DefaultApiService) ListCommand(params *ListCommandParams) (*ListCommandResponse, error) { - path := "/v1/Commands" + path := "/v1/Commands" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Sim != nil { - data.Set("Sim", *params.Sim) - } - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) - } - if params != nil && params.Direction != nil { - data.Set("Direction", *params.Direction) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.Sim != nil { + data.Set("Sim", *params.Sim) +} + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) +} + if params != nil && params.Direction != nil { + data.Set("Direction", *params.Direction) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListCommandResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListCommandResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListFleetParams Optional parameters for the method 'ListFleet' type ListFleetParams struct { NetworkAccessProfile *string `json:"NetworkAccessProfile,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -492,41 +505,41 @@ type ListFleetParams struct { * @param "NetworkAccessProfile" (string) - The SID or unique name of the Network Access Profile that controls which cellular networks the Fleet's SIMs can connect to. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListFleetResponse - */ +*/ func (c *DefaultApiService) ListFleet(params *ListFleetParams) (*ListFleetResponse, error) { - path := "/v1/Fleets" + path := "/v1/Fleets" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.NetworkAccessProfile != nil { - data.Set("NetworkAccessProfile", *params.NetworkAccessProfile) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.NetworkAccessProfile != nil { + data.Set("NetworkAccessProfile", *params.NetworkAccessProfile) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListFleetResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListFleetResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListNetworkParams Optional parameters for the method 'ListNetwork' type ListNetworkParams struct { IsoCountry *string `json:"IsoCountry,omitempty"` - Mcc *string `json:"Mcc,omitempty"` - Mnc *string `json:"Mnc,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + Mcc *string `json:"Mcc,omitempty"` + Mnc *string `json:"Mnc,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -538,41 +551,41 @@ type ListNetworkParams struct { * @param "Mnc" (string) - The 'mobile network code' of a mobile operator network. Network resources with this `mnc` in their `identifiers` will be read. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListNetworkResponse - */ +*/ func (c *DefaultApiService) ListNetwork(params *ListNetworkParams) (*ListNetworkResponse, error) { - path := "/v1/Networks" + path := "/v1/Networks" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.IsoCountry != nil { - data.Set("IsoCountry", *params.IsoCountry) - } - if params != nil && params.Mcc != nil { - data.Set("Mcc", *params.Mcc) - } - if params != nil && params.Mnc != nil { - data.Set("Mnc", *params.Mnc) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.IsoCountry != nil { + data.Set("IsoCountry", *params.IsoCountry) +} + if params != nil && params.Mcc != nil { + data.Set("Mcc", *params.Mcc) +} + if params != nil && params.Mnc != nil { + data.Set("Mnc", *params.Mnc) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListNetworkResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListNetworkResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListNetworkAccessProfileParams Optional parameters for the method 'ListNetworkAccessProfile' type ListNetworkAccessProfileParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -584,32 +597,32 @@ type ListNetworkAccessProfileParams struct { * @param optional nil or *ListNetworkAccessProfileParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListNetworkAccessProfileResponse - */ +*/ func (c *DefaultApiService) ListNetworkAccessProfile(params *ListNetworkAccessProfileParams) (*ListNetworkAccessProfileResponse, error) { - path := "/v1/NetworkAccessProfiles" + path := "/v1/NetworkAccessProfiles" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListNetworkAccessProfileResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListNetworkAccessProfileResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListNetworkAccessProfileNetworkParams Optional parameters for the method 'ListNetworkAccessProfileNetwork' type ListNetworkAccessProfileNetworkParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -622,39 +635,39 @@ type ListNetworkAccessProfileNetworkParams struct { * @param optional nil or *ListNetworkAccessProfileNetworkParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListNetworkAccessProfileNetworkResponse - */ +*/ func (c *DefaultApiService) ListNetworkAccessProfileNetwork(NetworkAccessProfileSid string, params *ListNetworkAccessProfileNetworkParams) (*ListNetworkAccessProfileNetworkResponse, error) { - path := "/v1/NetworkAccessProfiles/{NetworkAccessProfileSid}/Networks" + path := "/v1/NetworkAccessProfiles/{NetworkAccessProfileSid}/Networks" path = strings.Replace(path, "{"+"NetworkAccessProfileSid"+"}", NetworkAccessProfileSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListNetworkAccessProfileNetworkResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListNetworkAccessProfileNetworkResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListSimParams Optional parameters for the method 'ListSim' type ListSimParams struct { - Status *string `json:"Status,omitempty"` - Fleet *string `json:"Fleet,omitempty"` - Iccid *string `json:"Iccid,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + Status *string `json:"Status,omitempty"` + Fleet *string `json:"Fleet,omitempty"` + Iccid *string `json:"Iccid,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -666,52 +679,52 @@ type ListSimParams struct { * @param "Iccid" (string) - The [ICCID](https://en.wikipedia.org/wiki/Subscriber_identity_module#ICCID) associated with a Super SIM to filter the list by. Passing this parameter will always return a list containing zero or one SIMs. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListSimResponse - */ +*/ func (c *DefaultApiService) ListSim(params *ListSimParams) (*ListSimResponse, error) { - path := "/v1/Sims" + path := "/v1/Sims" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) - } - if params != nil && params.Fleet != nil { - data.Set("Fleet", *params.Fleet) - } - if params != nil && params.Iccid != nil { - data.Set("Iccid", *params.Iccid) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) +} + if params != nil && params.Fleet != nil { + data.Set("Fleet", *params.Fleet) +} + if params != nil && params.Iccid != nil { + data.Set("Iccid", *params.Iccid) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListSimResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListSimResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListUsageRecordParams Optional parameters for the method 'ListUsageRecord' type ListUsageRecordParams struct { - Sim *string `json:"Sim,omitempty"` - Fleet *string `json:"Fleet,omitempty"` - Network *string `json:"Network,omitempty"` - IsoCountry *string `json:"IsoCountry,omitempty"` - Group *string `json:"Group,omitempty"` - Granularity *string `json:"Granularity,omitempty"` - StartTime *time.Time `json:"StartTime,omitempty"` - EndTime *time.Time `json:"EndTime,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + Sim *string `json:"Sim,omitempty"` + Fleet *string `json:"Fleet,omitempty"` + Network *string `json:"Network,omitempty"` + IsoCountry *string `json:"IsoCountry,omitempty"` + Group *string `json:"Group,omitempty"` + Granularity *string `json:"Granularity,omitempty"` + StartTime *time.Time `json:"StartTime,omitempty"` + EndTime *time.Time `json:"EndTime,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -728,62 +741,62 @@ type ListUsageRecordParams struct { * @param "EndTime" (time.Time) - Only include usage that occurred before this time, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. Default is the current time. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListUsageRecordResponse - */ +*/ func (c *DefaultApiService) ListUsageRecord(params *ListUsageRecordParams) (*ListUsageRecordResponse, error) { - path := "/v1/UsageRecords" + path := "/v1/UsageRecords" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Sim != nil { - data.Set("Sim", *params.Sim) - } - if params != nil && params.Fleet != nil { - data.Set("Fleet", *params.Fleet) - } - if params != nil && params.Network != nil { - data.Set("Network", *params.Network) - } - if params != nil && params.IsoCountry != nil { - data.Set("IsoCountry", *params.IsoCountry) - } - if params != nil && params.Group != nil { - data.Set("Group", *params.Group) - } - if params != nil && params.Granularity != nil { - data.Set("Granularity", *params.Granularity) - } - if params != nil && params.StartTime != nil { - data.Set("StartTime", fmt.Sprint(*params.StartTime)) - } - if params != nil && params.EndTime != nil { - data.Set("EndTime", fmt.Sprint(*params.EndTime)) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.Sim != nil { + data.Set("Sim", *params.Sim) +} + if params != nil && params.Fleet != nil { + data.Set("Fleet", *params.Fleet) +} + if params != nil && params.Network != nil { + data.Set("Network", *params.Network) +} + if params != nil && params.IsoCountry != nil { + data.Set("IsoCountry", *params.IsoCountry) +} + if params != nil && params.Group != nil { + data.Set("Group", *params.Group) +} + if params != nil && params.Granularity != nil { + data.Set("Granularity", *params.Granularity) +} + if params != nil && params.StartTime != nil { + data.Set("StartTime", fmt.Sprint(*params.StartTime)) +} + if params != nil && params.EndTime != nil { + data.Set("EndTime", fmt.Sprint(*params.EndTime)) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListUsageRecordResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListUsageRecordResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateFleetParams Optional parameters for the method 'UpdateFleet' type UpdateFleetParams struct { - CommandsMethod *string `json:"CommandsMethod,omitempty"` - CommandsUrl *string `json:"CommandsUrl,omitempty"` + CommandsMethod *string `json:"CommandsMethod,omitempty"` + CommandsUrl *string `json:"CommandsUrl,omitempty"` NetworkAccessProfile *string `json:"NetworkAccessProfile,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` } /* @@ -796,42 +809,42 @@ type UpdateFleetParams struct { * @param "NetworkAccessProfile" (string) - The SID or unique name of the Network Access Profile that will control which cellular networks the Fleet's SIMs can connect to. * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. It can be used in place of the resource's `sid` in the URL to address the resource. * @return SupersimV1Fleet - */ +*/ func (c *DefaultApiService) UpdateFleet(Sid string, params *UpdateFleetParams) (*SupersimV1Fleet, error) { - path := "/v1/Fleets/{Sid}" + path := "/v1/Fleets/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.CommandsMethod != nil { - data.Set("CommandsMethod", *params.CommandsMethod) - } - if params != nil && params.CommandsUrl != nil { - data.Set("CommandsUrl", *params.CommandsUrl) - } - if params != nil && params.NetworkAccessProfile != nil { - data.Set("NetworkAccessProfile", *params.NetworkAccessProfile) - } - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) - } + if params != nil && params.CommandsMethod != nil { + data.Set("CommandsMethod", *params.CommandsMethod) +} + if params != nil && params.CommandsUrl != nil { + data.Set("CommandsUrl", *params.CommandsUrl) +} + if params != nil && params.NetworkAccessProfile != nil { + data.Set("NetworkAccessProfile", *params.NetworkAccessProfile) +} + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &SupersimV1Fleet{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &SupersimV1Fleet{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateNetworkAccessProfileParams Optional parameters for the method 'UpdateNetworkAccessProfile' type UpdateNetworkAccessProfileParams struct { UniqueName *string `json:"UniqueName,omitempty"` @@ -844,41 +857,41 @@ type UpdateNetworkAccessProfileParams struct { * @param optional nil or *UpdateNetworkAccessProfileParams - Optional Parameters: * @param "UniqueName" (string) - The new unique name of the Network Access Profile. * @return SupersimV1NetworkAccessProfile - */ +*/ func (c *DefaultApiService) UpdateNetworkAccessProfile(Sid string, params *UpdateNetworkAccessProfileParams) (*SupersimV1NetworkAccessProfile, error) { - path := "/v1/NetworkAccessProfiles/{Sid}" + path := "/v1/NetworkAccessProfiles/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) - } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &SupersimV1NetworkAccessProfile{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &SupersimV1NetworkAccessProfile{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateSimParams Optional parameters for the method 'UpdateSim' type UpdateSimParams struct { - AccountSid *string `json:"AccountSid,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` CallbackMethod *string `json:"CallbackMethod,omitempty"` - CallbackUrl *string `json:"CallbackUrl,omitempty"` - Fleet *string `json:"Fleet,omitempty"` - Status *string `json:"Status,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + CallbackUrl *string `json:"CallbackUrl,omitempty"` + Fleet *string `json:"Fleet,omitempty"` + Status *string `json:"Status,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` } /* @@ -893,44 +906,45 @@ type UpdateSimParams struct { * @param "Status" (string) - The new status of the resource. Can be: `ready`, `active`, or `inactive`. See the [Super SIM Status Values](https://www.twilio.com/docs/iot/supersim/api/sim-resource#status-values) for more info. * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. It can be used in place of the resource's `sid` in the URL to address the resource. * @return SupersimV1Sim - */ +*/ func (c *DefaultApiService) UpdateSim(Sid string, params *UpdateSimParams) (*SupersimV1Sim, error) { - path := "/v1/Sims/{Sid}" + path := "/v1/Sims/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.AccountSid != nil { - data.Set("AccountSid", *params.AccountSid) - } - if params != nil && params.CallbackMethod != nil { - data.Set("CallbackMethod", *params.CallbackMethod) - } - if params != nil && params.CallbackUrl != nil { - data.Set("CallbackUrl", *params.CallbackUrl) - } - if params != nil && params.Fleet != nil { - data.Set("Fleet", *params.Fleet) - } - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) - } - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) - } + if params != nil && params.AccountSid != nil { + data.Set("AccountSid", *params.AccountSid) +} + if params != nil && params.CallbackMethod != nil { + data.Set("CallbackMethod", *params.CallbackMethod) +} + if params != nil && params.CallbackUrl != nil { + data.Set("CallbackUrl", *params.CallbackUrl) +} + if params != nil && params.Fleet != nil { + data.Set("Fleet", *params.Fleet) +} + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) +} + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &SupersimV1Sim{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() + + ps := &SupersimV1Sim{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } diff --git a/twilio/rest/supersim/v1/model_list_command_response.go b/twilio/rest/supersim/v1/model_list_command_response.go index 90ca50390..e20f1ecc0 100644 --- a/twilio/rest/supersim/v1/model_list_command_response.go +++ b/twilio/rest/supersim/v1/model_list_command_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Supersim - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Supersim + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListCommandResponse struct for ListCommandResponse type ListCommandResponse struct { - Commands []SupersimV1Command `json:"Commands,omitempty"` - Meta ListCommandResponseMeta `json:"Meta,omitempty"` + Commands []SupersimV1Command `json:"Commands,omitempty"` + Meta ListCommandResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/supersim/v1/model_list_command_response_meta.go b/twilio/rest/supersim/v1/model_list_command_response_meta.go index 95f5c0556..9e8bace93 100644 --- a/twilio/rest/supersim/v1/model_list_command_response_meta.go +++ b/twilio/rest/supersim/v1/model_list_command_response_meta.go @@ -1,23 +1,22 @@ /* - * Twilio - Supersim - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Supersim + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListCommandResponseMeta struct for ListCommandResponseMeta type ListCommandResponseMeta struct { - FirstPageUrl string `json:"FirstPageUrl,omitempty"` - Key string `json:"Key,omitempty"` - NextPageUrl string `json:"NextPageUrl,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` - Url string `json:"Url,omitempty"` + Url string `json:"Url,omitempty"` } diff --git a/twilio/rest/supersim/v1/model_list_fleet_response.go b/twilio/rest/supersim/v1/model_list_fleet_response.go index f6407a327..23ea363be 100644 --- a/twilio/rest/supersim/v1/model_list_fleet_response.go +++ b/twilio/rest/supersim/v1/model_list_fleet_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Supersim - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Supersim + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListFleetResponse struct for ListFleetResponse type ListFleetResponse struct { - Fleets []SupersimV1Fleet `json:"Fleets,omitempty"` - Meta ListCommandResponseMeta `json:"Meta,omitempty"` + Fleets []SupersimV1Fleet `json:"Fleets,omitempty"` + Meta ListCommandResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/supersim/v1/model_list_network_access_profile_network_response.go b/twilio/rest/supersim/v1/model_list_network_access_profile_network_response.go index 4a79343d5..397a93c2b 100644 --- a/twilio/rest/supersim/v1/model_list_network_access_profile_network_response.go +++ b/twilio/rest/supersim/v1/model_list_network_access_profile_network_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Supersim - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Supersim + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListNetworkAccessProfileNetworkResponse struct for ListNetworkAccessProfileNetworkResponse type ListNetworkAccessProfileNetworkResponse struct { - Meta ListCommandResponseMeta `json:"Meta,omitempty"` + Meta ListCommandResponseMeta `json:"Meta,omitempty"` Networks []SupersimV1NetworkAccessProfileNetworkAccessProfileNetwork `json:"Networks,omitempty"` } diff --git a/twilio/rest/supersim/v1/model_list_network_access_profile_response.go b/twilio/rest/supersim/v1/model_list_network_access_profile_response.go index 002122a4b..60622fdc2 100644 --- a/twilio/rest/supersim/v1/model_list_network_access_profile_response.go +++ b/twilio/rest/supersim/v1/model_list_network_access_profile_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Supersim - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Supersim + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListNetworkAccessProfileResponse struct for ListNetworkAccessProfileResponse type ListNetworkAccessProfileResponse struct { - Meta ListCommandResponseMeta `json:"Meta,omitempty"` + Meta ListCommandResponseMeta `json:"Meta,omitempty"` NetworkAccessProfiles []SupersimV1NetworkAccessProfile `json:"NetworkAccessProfiles,omitempty"` } diff --git a/twilio/rest/supersim/v1/model_list_network_response.go b/twilio/rest/supersim/v1/model_list_network_response.go index f46f8ea55..96cac3be4 100644 --- a/twilio/rest/supersim/v1/model_list_network_response.go +++ b/twilio/rest/supersim/v1/model_list_network_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Supersim - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Supersim + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListNetworkResponse struct for ListNetworkResponse type ListNetworkResponse struct { - Meta ListCommandResponseMeta `json:"Meta,omitempty"` - Networks []SupersimV1Network `json:"Networks,omitempty"` + Meta ListCommandResponseMeta `json:"Meta,omitempty"` + Networks []SupersimV1Network `json:"Networks,omitempty"` } diff --git a/twilio/rest/supersim/v1/model_list_sim_response.go b/twilio/rest/supersim/v1/model_list_sim_response.go index 782c498aa..d0f370ac7 100644 --- a/twilio/rest/supersim/v1/model_list_sim_response.go +++ b/twilio/rest/supersim/v1/model_list_sim_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Supersim - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Supersim + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListSimResponse struct for ListSimResponse type ListSimResponse struct { Meta ListCommandResponseMeta `json:"Meta,omitempty"` - Sims []SupersimV1Sim `json:"Sims,omitempty"` + Sims []SupersimV1Sim `json:"Sims,omitempty"` } diff --git a/twilio/rest/supersim/v1/model_list_usage_record_response.go b/twilio/rest/supersim/v1/model_list_usage_record_response.go index 462991cb6..6edec2166 100644 --- a/twilio/rest/supersim/v1/model_list_usage_record_response.go +++ b/twilio/rest/supersim/v1/model_list_usage_record_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Supersim - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Supersim + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListUsageRecordResponse struct for ListUsageRecordResponse type ListUsageRecordResponse struct { - Meta ListCommandResponseMeta `json:"Meta,omitempty"` + Meta ListCommandResponseMeta `json:"Meta,omitempty"` UsageRecords []SupersimV1UsageRecord `json:"UsageRecords,omitempty"` } diff --git a/twilio/rest/supersim/v1/model_supersim_v1_command.go b/twilio/rest/supersim/v1/model_supersim_v1_command.go index 01b6fd38b..8594aeff9 100644 --- a/twilio/rest/supersim/v1/model_supersim_v1_command.go +++ b/twilio/rest/supersim/v1/model_supersim_v1_command.go @@ -1,20 +1,18 @@ /* - * Twilio - Supersim - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Supersim + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // SupersimV1Command struct for SupersimV1Command type SupersimV1Command struct { // The SID of the Account that created the resource diff --git a/twilio/rest/supersim/v1/model_supersim_v1_fleet.go b/twilio/rest/supersim/v1/model_supersim_v1_fleet.go index 5238bc900..cc4a6351c 100644 --- a/twilio/rest/supersim/v1/model_supersim_v1_fleet.go +++ b/twilio/rest/supersim/v1/model_supersim_v1_fleet.go @@ -1,20 +1,18 @@ /* - * Twilio - Supersim - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Supersim + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // SupersimV1Fleet struct for SupersimV1Fleet type SupersimV1Fleet struct { // The SID of the Account that created the resource diff --git a/twilio/rest/supersim/v1/model_supersim_v1_network.go b/twilio/rest/supersim/v1/model_supersim_v1_network.go index a1261cb2c..fc2fe01a2 100644 --- a/twilio/rest/supersim/v1/model_supersim_v1_network.go +++ b/twilio/rest/supersim/v1/model_supersim_v1_network.go @@ -1,16 +1,15 @@ /* - * Twilio - Supersim - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Supersim + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // SupersimV1Network struct for SupersimV1Network type SupersimV1Network struct { // A human readable identifier of this resource diff --git a/twilio/rest/supersim/v1/model_supersim_v1_network_access_profile.go b/twilio/rest/supersim/v1/model_supersim_v1_network_access_profile.go index d10d9d6f0..97b1383cd 100644 --- a/twilio/rest/supersim/v1/model_supersim_v1_network_access_profile.go +++ b/twilio/rest/supersim/v1/model_supersim_v1_network_access_profile.go @@ -1,20 +1,18 @@ /* - * Twilio - Supersim - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Supersim + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // SupersimV1NetworkAccessProfile struct for SupersimV1NetworkAccessProfile type SupersimV1NetworkAccessProfile struct { // The SID of the Account that the Network Access Profile belongs to @@ -22,8 +20,8 @@ type SupersimV1NetworkAccessProfile struct { // The ISO 8601 date and time in GMT when the resource was created DateCreated *time.Time `json:"DateCreated,omitempty"` // The ISO 8601 date and time in GMT when the resource was last updated - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + Links *map[string]interface{} `json:"Links,omitempty"` // The unique string that identifies the resource Sid *string `json:"Sid,omitempty"` // An application-defined string that uniquely identifies the resource diff --git a/twilio/rest/supersim/v1/model_supersim_v1_network_access_profile_network_access_profile_network.go b/twilio/rest/supersim/v1/model_supersim_v1_network_access_profile_network_access_profile_network.go index 475a10894..224e6f7a1 100644 --- a/twilio/rest/supersim/v1/model_supersim_v1_network_access_profile_network_access_profile_network.go +++ b/twilio/rest/supersim/v1/model_supersim_v1_network_access_profile_network_access_profile_network.go @@ -1,16 +1,15 @@ /* - * Twilio - Supersim - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Supersim + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // SupersimV1NetworkAccessProfileNetworkAccessProfileNetwork struct for SupersimV1NetworkAccessProfileNetworkAccessProfileNetwork type SupersimV1NetworkAccessProfileNetworkAccessProfileNetwork struct { // A human readable identifier of this resource diff --git a/twilio/rest/supersim/v1/model_supersim_v1_sim.go b/twilio/rest/supersim/v1/model_supersim_v1_sim.go index bc437849f..61a6e653c 100644 --- a/twilio/rest/supersim/v1/model_supersim_v1_sim.go +++ b/twilio/rest/supersim/v1/model_supersim_v1_sim.go @@ -1,20 +1,18 @@ /* - * Twilio - Supersim - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Supersim + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // SupersimV1Sim struct for SupersimV1Sim type SupersimV1Sim struct { // The SID of the Account that the Super SIM belongs to diff --git a/twilio/rest/supersim/v1/model_supersim_v1_usage_record.go b/twilio/rest/supersim/v1/model_supersim_v1_usage_record.go index 354d67e99..bb7e53146 100644 --- a/twilio/rest/supersim/v1/model_supersim_v1_usage_record.go +++ b/twilio/rest/supersim/v1/model_supersim_v1_usage_record.go @@ -1,16 +1,15 @@ /* - * Twilio - Supersim - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Supersim + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // SupersimV1UsageRecord struct for SupersimV1UsageRecord type SupersimV1UsageRecord struct { // The SID of the Account that incurred the usage. diff --git a/twilio/rest/sync/v1/api_default.go b/twilio/rest/sync/v1/api_default.go index f62448643..66c83a7d0 100644 --- a/twilio/rest/sync/v1/api_default.go +++ b/twilio/rest/sync/v1/api_default.go @@ -1,11 +1,11 @@ /* - * Twilio - Sync - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,10 +14,9 @@ package openapi import ( "encoding/json" "fmt" - "net/url" - "strings" - twilio "github.com/twilio/twilio-go/client" + "net/url" + "strings" ) type DefaultApiService struct { @@ -26,17 +25,17 @@ type DefaultApiService struct { } func NewDefaultApiService(client *twilio.Client) *DefaultApiService { - return &DefaultApiService{ - client: client, + return &DefaultApiService { + client: client, baseURL: "https://sync.twilio.com", } } // CreateDocumentParams Optional parameters for the method 'CreateDocument' type CreateDocumentParams struct { - Data *map[string]interface{} `json:"Data,omitempty"` - Ttl *int32 `json:"Ttl,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + Data *map[string]interface{} `json:"Data,omitempty"` + Ttl *int32 `json:"Ttl,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` } /* @@ -47,54 +46,54 @@ type CreateDocumentParams struct { * @param "Ttl" (int32) - How long, in seconds, before the Sync Document expires and is deleted (the Sync Document's time-to-live). Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the Sync Document does not expire. The Sync Document will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. * @param "UniqueName" (string) - An application-defined string that uniquely identifies the Sync Document * @return SyncV1ServiceDocument - */ +*/ func (c *DefaultApiService) CreateDocument(ServiceSid string, params *CreateDocumentParams) (*SyncV1ServiceDocument, error) { - path := "/v1/Services/{ServiceSid}/Documents" + path := "/v1/Services/{ServiceSid}/Documents" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Data != nil { - v, err := json.Marshal(params.Data) + data := url.Values{} + headers := 0 - if err != nil { - return nil, err - } + if params != nil && params.Data != nil { + v, err := json.Marshal(params.Data) - data.Set("Data", fmt.Sprint(v)) - } - if params != nil && params.Ttl != nil { - data.Set("Ttl", fmt.Sprint(*params.Ttl)) - } - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) - } - - resp, err := c.client.Post(c.baseURL+path, data, headers) if err != nil { - return nil, err + return nil, err } - defer resp.Body.Close() + data.Set("Data", fmt.Sprint(v)) +} + if params != nil && params.Ttl != nil { + data.Set("Ttl", fmt.Sprint(*params.Ttl)) +} + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) +} - ps := &SyncV1ServiceDocument{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - return ps, err -} + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &SyncV1ServiceDocument{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateServiceParams Optional parameters for the method 'CreateService' type CreateServiceParams struct { - AclEnabled *bool `json:"AclEnabled,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - ReachabilityDebouncingEnabled *bool `json:"ReachabilityDebouncingEnabled,omitempty"` - ReachabilityDebouncingWindow *int32 `json:"ReachabilityDebouncingWindow,omitempty"` - ReachabilityWebhooksEnabled *bool `json:"ReachabilityWebhooksEnabled,omitempty"` - WebhookUrl *string `json:"WebhookUrl,omitempty"` - WebhooksFromRestEnabled *bool `json:"WebhooksFromRestEnabled,omitempty"` + AclEnabled *bool `json:"AclEnabled,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + ReachabilityDebouncingEnabled *bool `json:"ReachabilityDebouncingEnabled,omitempty"` + ReachabilityDebouncingWindow *int32 `json:"ReachabilityDebouncingWindow,omitempty"` + ReachabilityWebhooksEnabled *bool `json:"ReachabilityWebhooksEnabled,omitempty"` + WebhookUrl *string `json:"WebhookUrl,omitempty"` + WebhooksFromRestEnabled *bool `json:"WebhooksFromRestEnabled,omitempty"` } /* @@ -108,50 +107,50 @@ type CreateServiceParams struct { * @param "WebhookUrl" (string) - The URL we should call when Sync objects are manipulated. * @param "WebhooksFromRestEnabled" (bool) - Whether the Service instance should call `webhook_url` when the REST API is used to update Sync objects. The default is `false`. * @return SyncV1Service - */ +*/ func (c *DefaultApiService) CreateService(params *CreateServiceParams) (*SyncV1Service, error) { - path := "/v1/Services" + path := "/v1/Services" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.AclEnabled != nil { - data.Set("AclEnabled", fmt.Sprint(*params.AclEnabled)) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.ReachabilityDebouncingEnabled != nil { - data.Set("ReachabilityDebouncingEnabled", fmt.Sprint(*params.ReachabilityDebouncingEnabled)) - } - if params != nil && params.ReachabilityDebouncingWindow != nil { - data.Set("ReachabilityDebouncingWindow", fmt.Sprint(*params.ReachabilityDebouncingWindow)) - } - if params != nil && params.ReachabilityWebhooksEnabled != nil { - data.Set("ReachabilityWebhooksEnabled", fmt.Sprint(*params.ReachabilityWebhooksEnabled)) - } - if params != nil && params.WebhookUrl != nil { - data.Set("WebhookUrl", *params.WebhookUrl) - } - if params != nil && params.WebhooksFromRestEnabled != nil { - data.Set("WebhooksFromRestEnabled", fmt.Sprint(*params.WebhooksFromRestEnabled)) - } + if params != nil && params.AclEnabled != nil { + data.Set("AclEnabled", fmt.Sprint(*params.AclEnabled)) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.ReachabilityDebouncingEnabled != nil { + data.Set("ReachabilityDebouncingEnabled", fmt.Sprint(*params.ReachabilityDebouncingEnabled)) +} + if params != nil && params.ReachabilityDebouncingWindow != nil { + data.Set("ReachabilityDebouncingWindow", fmt.Sprint(*params.ReachabilityDebouncingWindow)) +} + if params != nil && params.ReachabilityWebhooksEnabled != nil { + data.Set("ReachabilityWebhooksEnabled", fmt.Sprint(*params.ReachabilityWebhooksEnabled)) +} + if params != nil && params.WebhookUrl != nil { + data.Set("WebhookUrl", *params.WebhookUrl) +} + if params != nil && params.WebhooksFromRestEnabled != nil { + data.Set("WebhooksFromRestEnabled", fmt.Sprint(*params.WebhooksFromRestEnabled)) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &SyncV1Service{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &SyncV1Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateStreamMessageParams Optional parameters for the method 'CreateStreamMessage' type CreateStreamMessageParams struct { Data *map[string]interface{} `json:"Data,omitempty"` @@ -165,45 +164,45 @@ type CreateStreamMessageParams struct { * @param optional nil or *CreateStreamMessageParams - Optional Parameters: * @param "Data" (map[string]interface{}) - A JSON string that represents an arbitrary, schema-less object that makes up the Stream Message body. Can be up to 4 KiB in length. * @return SyncV1ServiceSyncStreamStreamMessage - */ +*/ func (c *DefaultApiService) CreateStreamMessage(ServiceSid string, StreamSid string, params *CreateStreamMessageParams) (*SyncV1ServiceSyncStreamStreamMessage, error) { - path := "/v1/Services/{ServiceSid}/Streams/{StreamSid}/Messages" + path := "/v1/Services/{ServiceSid}/Streams/{StreamSid}/Messages" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"StreamSid"+"}", StreamSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Data != nil { - v, err := json.Marshal(params.Data) - - if err != nil { - return nil, err - } + data := url.Values{} + headers := 0 - data.Set("Data", fmt.Sprint(v)) - } + if params != nil && params.Data != nil { + v, err := json.Marshal(params.Data) - resp, err := c.client.Post(c.baseURL+path, data, headers) if err != nil { - return nil, err + return nil, err } - defer resp.Body.Close() + data.Set("Data", fmt.Sprint(v)) +} - ps := &SyncV1ServiceSyncStreamStreamMessage{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - return ps, err -} + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() + + ps := &SyncV1ServiceSyncStreamStreamMessage{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} // CreateSyncListParams Optional parameters for the method 'CreateSyncList' type CreateSyncListParams struct { - CollectionTtl *int32 `json:"CollectionTtl,omitempty"` - Ttl *int32 `json:"Ttl,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + CollectionTtl *int32 `json:"CollectionTtl,omitempty"` + Ttl *int32 `json:"Ttl,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` } /* @@ -214,45 +213,45 @@ type CreateSyncListParams struct { * @param "Ttl" (int32) - Alias for collection_ttl. If both are provided, this value is ignored. * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. This value must be unique within its Service and it can be up to 320 characters long. The `unique_name` value can be used as an alternative to the `sid` in the URL path to address the resource. * @return SyncV1ServiceSyncList - */ +*/ func (c *DefaultApiService) CreateSyncList(ServiceSid string, params *CreateSyncListParams) (*SyncV1ServiceSyncList, error) { - path := "/v1/Services/{ServiceSid}/Lists" + path := "/v1/Services/{ServiceSid}/Lists" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.CollectionTtl != nil { - data.Set("CollectionTtl", fmt.Sprint(*params.CollectionTtl)) - } - if params != nil && params.Ttl != nil { - data.Set("Ttl", fmt.Sprint(*params.Ttl)) - } - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) - } + if params != nil && params.CollectionTtl != nil { + data.Set("CollectionTtl", fmt.Sprint(*params.CollectionTtl)) +} + if params != nil && params.Ttl != nil { + data.Set("Ttl", fmt.Sprint(*params.Ttl)) +} + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &SyncV1ServiceSyncList{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &SyncV1ServiceSyncList{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateSyncListItemParams Optional parameters for the method 'CreateSyncListItem' type CreateSyncListItemParams struct { - CollectionTtl *int32 `json:"CollectionTtl,omitempty"` - Data *map[string]interface{} `json:"Data,omitempty"` - ItemTtl *int32 `json:"ItemTtl,omitempty"` - Ttl *int32 `json:"Ttl,omitempty"` + CollectionTtl *int32 `json:"CollectionTtl,omitempty"` + Data *map[string]interface{} `json:"Data,omitempty"` + ItemTtl *int32 `json:"ItemTtl,omitempty"` + Ttl *int32 `json:"Ttl,omitempty"` } /* @@ -265,54 +264,54 @@ type CreateSyncListItemParams struct { * @param "ItemTtl" (int32) - How long, in seconds, before the List Item expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the List Item does not expire. The List Item will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. * @param "Ttl" (int32) - An alias for `item_ttl`. If both parameters are provided, this value is ignored. * @return SyncV1ServiceSyncListSyncListItem - */ +*/ func (c *DefaultApiService) CreateSyncListItem(ServiceSid string, ListSid string, params *CreateSyncListItemParams) (*SyncV1ServiceSyncListSyncListItem, error) { - path := "/v1/Services/{ServiceSid}/Lists/{ListSid}/Items" + path := "/v1/Services/{ServiceSid}/Lists/{ListSid}/Items" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ListSid"+"}", ListSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + + if params != nil && params.CollectionTtl != nil { + data.Set("CollectionTtl", fmt.Sprint(*params.CollectionTtl)) +} + if params != nil && params.Data != nil { + v, err := json.Marshal(params.Data) - if params != nil && params.CollectionTtl != nil { - data.Set("CollectionTtl", fmt.Sprint(*params.CollectionTtl)) + if err != nil { + return nil, err } - if params != nil && params.Data != nil { - v, err := json.Marshal(params.Data) - if err != nil { - return nil, err - } + data.Set("Data", fmt.Sprint(v)) +} + if params != nil && params.ItemTtl != nil { + data.Set("ItemTtl", fmt.Sprint(*params.ItemTtl)) +} + if params != nil && params.Ttl != nil { + data.Set("Ttl", fmt.Sprint(*params.Ttl)) +} - data.Set("Data", fmt.Sprint(v)) - } - if params != nil && params.ItemTtl != nil { - data.Set("ItemTtl", fmt.Sprint(*params.ItemTtl)) - } - if params != nil && params.Ttl != nil { - data.Set("Ttl", fmt.Sprint(*params.Ttl)) - } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &SyncV1ServiceSyncListSyncListItem{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &SyncV1ServiceSyncListSyncListItem{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } - // CreateSyncMapParams Optional parameters for the method 'CreateSyncMap' type CreateSyncMapParams struct { - CollectionTtl *int32 `json:"CollectionTtl,omitempty"` - Ttl *int32 `json:"Ttl,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + CollectionTtl *int32 `json:"CollectionTtl,omitempty"` + Ttl *int32 `json:"Ttl,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` } /* @@ -323,46 +322,46 @@ type CreateSyncMapParams struct { * @param "Ttl" (int32) - An alias for `collection_ttl`. If both parameters are provided, this value is ignored. * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. It can be used as an alternative to the `sid` in the URL path to address the resource. * @return SyncV1ServiceSyncMap - */ +*/ func (c *DefaultApiService) CreateSyncMap(ServiceSid string, params *CreateSyncMapParams) (*SyncV1ServiceSyncMap, error) { - path := "/v1/Services/{ServiceSid}/Maps" + path := "/v1/Services/{ServiceSid}/Maps" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.CollectionTtl != nil { - data.Set("CollectionTtl", fmt.Sprint(*params.CollectionTtl)) - } - if params != nil && params.Ttl != nil { - data.Set("Ttl", fmt.Sprint(*params.Ttl)) - } - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) - } + if params != nil && params.CollectionTtl != nil { + data.Set("CollectionTtl", fmt.Sprint(*params.CollectionTtl)) +} + if params != nil && params.Ttl != nil { + data.Set("Ttl", fmt.Sprint(*params.Ttl)) +} + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &SyncV1ServiceSyncMap{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &SyncV1ServiceSyncMap{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateSyncMapItemParams Optional parameters for the method 'CreateSyncMapItem' type CreateSyncMapItemParams struct { - CollectionTtl *int32 `json:"CollectionTtl,omitempty"` - Data *map[string]interface{} `json:"Data,omitempty"` - ItemTtl *int32 `json:"ItemTtl,omitempty"` - Key *string `json:"Key,omitempty"` - Ttl *int32 `json:"Ttl,omitempty"` + CollectionTtl *int32 `json:"CollectionTtl,omitempty"` + Data *map[string]interface{} `json:"Data,omitempty"` + ItemTtl *int32 `json:"ItemTtl,omitempty"` + Key *string `json:"Key,omitempty"` + Ttl *int32 `json:"Ttl,omitempty"` } /* @@ -376,55 +375,55 @@ type CreateSyncMapItemParams struct { * @param "Key" (string) - The unique, user-defined key for the Map Item. Can be up to 320 characters long. * @param "Ttl" (int32) - An alias for `item_ttl`. If both parameters are provided, this value is ignored. * @return SyncV1ServiceSyncMapSyncMapItem - */ +*/ func (c *DefaultApiService) CreateSyncMapItem(ServiceSid string, MapSid string, params *CreateSyncMapItemParams) (*SyncV1ServiceSyncMapSyncMapItem, error) { - path := "/v1/Services/{ServiceSid}/Maps/{MapSid}/Items" + path := "/v1/Services/{ServiceSid}/Maps/{MapSid}/Items" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"MapSid"+"}", MapSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + + if params != nil && params.CollectionTtl != nil { + data.Set("CollectionTtl", fmt.Sprint(*params.CollectionTtl)) +} + if params != nil && params.Data != nil { + v, err := json.Marshal(params.Data) - if params != nil && params.CollectionTtl != nil { - data.Set("CollectionTtl", fmt.Sprint(*params.CollectionTtl)) + if err != nil { + return nil, err } - if params != nil && params.Data != nil { - v, err := json.Marshal(params.Data) - if err != nil { - return nil, err - } + data.Set("Data", fmt.Sprint(v)) +} + if params != nil && params.ItemTtl != nil { + data.Set("ItemTtl", fmt.Sprint(*params.ItemTtl)) +} + if params != nil && params.Key != nil { + data.Set("Key", *params.Key) +} + if params != nil && params.Ttl != nil { + data.Set("Ttl", fmt.Sprint(*params.Ttl)) +} - data.Set("Data", fmt.Sprint(v)) - } - if params != nil && params.ItemTtl != nil { - data.Set("ItemTtl", fmt.Sprint(*params.ItemTtl)) - } - if params != nil && params.Key != nil { - data.Set("Key", *params.Key) - } - if params != nil && params.Ttl != nil { - data.Set("Ttl", fmt.Sprint(*params.Ttl)) - } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &SyncV1ServiceSyncMapSyncMapItem{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &SyncV1ServiceSyncMapSyncMapItem{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } - // CreateSyncStreamParams Optional parameters for the method 'CreateSyncStream' type CreateSyncStreamParams struct { - Ttl *int32 `json:"Ttl,omitempty"` + Ttl *int32 `json:"Ttl,omitempty"` UniqueName *string `json:"UniqueName,omitempty"` } @@ -436,57 +435,60 @@ type CreateSyncStreamParams struct { * @param "Ttl" (int32) - How long, in seconds, before the Stream expires and is deleted (time-to-live). Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the Stream does not expire. The Stream will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. This value must be unique within its Service and it can be up to 320 characters long. The `unique_name` value can be used as an alternative to the `sid` in the URL path to address the resource. * @return SyncV1ServiceSyncStream - */ +*/ func (c *DefaultApiService) CreateSyncStream(ServiceSid string, params *CreateSyncStreamParams) (*SyncV1ServiceSyncStream, error) { - path := "/v1/Services/{ServiceSid}/Streams" + path := "/v1/Services/{ServiceSid}/Streams" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Ttl != nil { - data.Set("Ttl", fmt.Sprint(*params.Ttl)) - } - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) - } + if params != nil && params.Ttl != nil { + data.Set("Ttl", fmt.Sprint(*params.Ttl)) +} + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &SyncV1ServiceSyncStream{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() + + ps := &SyncV1ServiceSyncStream{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * DeleteDocument Method for DeleteDocument * @param ServiceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Document resource to delete. * @param Sid The SID of the Document resource to delete. Can be the Document resource's `sid` or its `unique_name`. - */ -func (c *DefaultApiService) DeleteDocument(ServiceSid string, Sid string) error { - path := "/v1/Services/{ServiceSid}/Documents/{Sid}" +*/ +func (c *DefaultApiService) DeleteDocument(ServiceSid string, Sid string, ) (error) { + path := "/v1/Services/{ServiceSid}/Documents/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - return nil + defer resp.Body.Close() + + return nil } /* @@ -495,70 +497,75 @@ func (c *DefaultApiService) DeleteDocument(ServiceSid string, Sid string) error * @param ServiceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Document Permission resource to delete. * @param DocumentSid The SID of the Sync Document with the Document Permission resource to delete. Can be the Document resource's `sid` or its `unique_name`. * @param Identity The application-defined string that uniquely identifies the User's Document Permission resource to delete. - */ -func (c *DefaultApiService) DeleteDocumentPermission(ServiceSid string, DocumentSid string, Identity string) error { - path := "/v1/Services/{ServiceSid}/Documents/{DocumentSid}/Permissions/{Identity}" +*/ +func (c *DefaultApiService) DeleteDocumentPermission(ServiceSid string, DocumentSid string, Identity string, ) (error) { + path := "/v1/Services/{ServiceSid}/Documents/{DocumentSid}/Permissions/{Identity}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"DocumentSid"+"}", DocumentSid, -1) path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* * DeleteService Method for DeleteService * @param Sid The SID of the Service resource to delete. - */ -func (c *DefaultApiService) DeleteService(Sid string) error { - path := "/v1/Services/{Sid}" +*/ +func (c *DefaultApiService) DeleteService(Sid string, ) (error) { + path := "/v1/Services/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - return nil + defer resp.Body.Close() + + return nil } /* * DeleteSyncList Method for DeleteSyncList * @param ServiceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync List resource to delete. * @param Sid The SID of the Sync List resource to delete. Can be the Sync List resource's `sid` or its `unique_name`. - */ -func (c *DefaultApiService) DeleteSyncList(ServiceSid string, Sid string) error { - path := "/v1/Services/{ServiceSid}/Lists/{Sid}" +*/ +func (c *DefaultApiService) DeleteSyncList(ServiceSid string, Sid string, ) (error) { + path := "/v1/Services/{ServiceSid}/Lists/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil -} + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + return nil +} // DeleteSyncListItemParams Optional parameters for the method 'DeleteSyncListItem' type DeleteSyncListItemParams struct { IfMatch *string `json:"If-Match,omitempty"` @@ -571,28 +578,29 @@ type DeleteSyncListItemParams struct { * @param Index The index of the Sync List Item resource to delete. * @param optional nil or *DeleteSyncListItemParams - Optional Parameters: * @param "IfMatch" (string) - If provided, applies this mutation if (and only if) the “revision” field of this [map item] matches the provided value. This matches the semantics of (and is implemented with) the HTTP [If-Match header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Match). - */ -func (c *DefaultApiService) DeleteSyncListItem(ServiceSid string, ListSid string, Index int32, params *DeleteSyncListItemParams) error { - path := "/v1/Services/{ServiceSid}/Lists/{ListSid}/Items/{Index}" +*/ +func (c *DefaultApiService) DeleteSyncListItem(ServiceSid string, ListSid string, Index int32, params *DeleteSyncListItemParams) (error) { + path := "/v1/Services/{ServiceSid}/Lists/{ListSid}/Items/{Index}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ListSid"+"}", ListSid, -1) path = strings.Replace(path, "{"+"Index"+"}", fmt.Sprint(Index), -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) + if params != nil && params.IfMatch != nil { headers["IfMatch"] = *params.IfMatch } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -601,49 +609,52 @@ func (c *DefaultApiService) DeleteSyncListItem(ServiceSid string, ListSid string * @param ServiceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync List Permission resource to delete. * @param ListSid The SID of the Sync List with the Sync List Permission resource to delete. Can be the Sync List resource's `sid` or its `unique_name`. * @param Identity The application-defined string that uniquely identifies the User's Sync List Permission resource to delete. - */ -func (c *DefaultApiService) DeleteSyncListPermission(ServiceSid string, ListSid string, Identity string) error { - path := "/v1/Services/{ServiceSid}/Lists/{ListSid}/Permissions/{Identity}" +*/ +func (c *DefaultApiService) DeleteSyncListPermission(ServiceSid string, ListSid string, Identity string, ) (error) { + path := "/v1/Services/{ServiceSid}/Lists/{ListSid}/Permissions/{Identity}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ListSid"+"}", ListSid, -1) path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* * DeleteSyncMap Method for DeleteSyncMap * @param ServiceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync Map resource to delete. * @param Sid The SID of the Sync Map resource to delete. Can be the Sync Map's `sid` or its `unique_name`. - */ -func (c *DefaultApiService) DeleteSyncMap(ServiceSid string, Sid string) error { - path := "/v1/Services/{ServiceSid}/Maps/{Sid}" +*/ +func (c *DefaultApiService) DeleteSyncMap(ServiceSid string, Sid string, ) (error) { + path := "/v1/Services/{ServiceSid}/Maps/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil -} + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + defer resp.Body.Close() + + return nil +} // DeleteSyncMapItemParams Optional parameters for the method 'DeleteSyncMapItem' type DeleteSyncMapItemParams struct { IfMatch *string `json:"If-Match,omitempty"` @@ -656,28 +667,29 @@ type DeleteSyncMapItemParams struct { * @param Key The `key` value of the Sync Map Item resource to delete. * @param optional nil or *DeleteSyncMapItemParams - Optional Parameters: * @param "IfMatch" (string) - If provided, applies this mutation if (and only if) the “revision” field of this [map item] matches the provided value. This matches the semantics of (and is implemented with) the HTTP [If-Match header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Match). - */ -func (c *DefaultApiService) DeleteSyncMapItem(ServiceSid string, MapSid string, Key string, params *DeleteSyncMapItemParams) error { - path := "/v1/Services/{ServiceSid}/Maps/{MapSid}/Items/{Key}" +*/ +func (c *DefaultApiService) DeleteSyncMapItem(ServiceSid string, MapSid string, Key string, params *DeleteSyncMapItemParams) (error) { + path := "/v1/Services/{ServiceSid}/Maps/{MapSid}/Items/{Key}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"MapSid"+"}", MapSid, -1) path = strings.Replace(path, "{"+"Key"+"}", Key, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) + if params != nil && params.IfMatch != nil { headers["IfMatch"] = *params.IfMatch } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -686,24 +698,26 @@ func (c *DefaultApiService) DeleteSyncMapItem(ServiceSid string, MapSid string, * @param ServiceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync Map Permission resource to delete. Can be the Service's `sid` value or `default`. * @param MapSid The SID of the Sync Map with the Sync Map Permission resource to delete. Can be the Sync Map resource's `sid` or its `unique_name`. * @param Identity The application-defined string that uniquely identifies the User's Sync Map Permission resource to delete. - */ -func (c *DefaultApiService) DeleteSyncMapPermission(ServiceSid string, MapSid string, Identity string) error { - path := "/v1/Services/{ServiceSid}/Maps/{MapSid}/Permissions/{Identity}" +*/ +func (c *DefaultApiService) DeleteSyncMapPermission(ServiceSid string, MapSid string, Identity string, ) (error) { + path := "/v1/Services/{ServiceSid}/Maps/{MapSid}/Permissions/{Identity}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"MapSid"+"}", MapSid, -1) path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* @@ -711,23 +725,25 @@ func (c *DefaultApiService) DeleteSyncMapPermission(ServiceSid string, MapSid st * Delete a specific Stream. * @param ServiceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync Stream resource to delete. * @param Sid The SID of the Stream resource to delete. - */ -func (c *DefaultApiService) DeleteSyncStream(ServiceSid string, Sid string) error { - path := "/v1/Services/{ServiceSid}/Streams/{Sid}" +*/ +func (c *DefaultApiService) DeleteSyncStream(ServiceSid string, Sid string, ) (error) { + path := "/v1/Services/{ServiceSid}/Streams/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* @@ -735,28 +751,30 @@ func (c *DefaultApiService) DeleteSyncStream(ServiceSid string, Sid string) erro * @param ServiceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Document resource to fetch. * @param Sid The SID of the Document resource to fetch. Can be the Document resource's `sid` or its `unique_name`. * @return SyncV1ServiceDocument - */ -func (c *DefaultApiService) FetchDocument(ServiceSid string, Sid string) (*SyncV1ServiceDocument, error) { - path := "/v1/Services/{ServiceSid}/Documents/{Sid}" +*/ +func (c *DefaultApiService) FetchDocument(ServiceSid string, Sid string, ) (*SyncV1ServiceDocument, error) { + path := "/v1/Services/{ServiceSid}/Documents/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &SyncV1ServiceDocument{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &SyncV1ServiceDocument{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -766,56 +784,60 @@ func (c *DefaultApiService) FetchDocument(ServiceSid string, Sid string) (*SyncV * @param DocumentSid The SID of the Sync Document with the Document Permission resource to fetch. Can be the Document resource's `sid` or its `unique_name`. * @param Identity The application-defined string that uniquely identifies the User's Document Permission resource to fetch. * @return SyncV1ServiceDocumentDocumentPermission - */ -func (c *DefaultApiService) FetchDocumentPermission(ServiceSid string, DocumentSid string, Identity string) (*SyncV1ServiceDocumentDocumentPermission, error) { - path := "/v1/Services/{ServiceSid}/Documents/{DocumentSid}/Permissions/{Identity}" +*/ +func (c *DefaultApiService) FetchDocumentPermission(ServiceSid string, DocumentSid string, Identity string, ) (*SyncV1ServiceDocumentDocumentPermission, error) { + path := "/v1/Services/{ServiceSid}/Documents/{DocumentSid}/Permissions/{Identity}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"DocumentSid"+"}", DocumentSid, -1) path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &SyncV1ServiceDocumentDocumentPermission{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &SyncV1ServiceDocumentDocumentPermission{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * FetchService Method for FetchService * @param Sid The SID of the Service resource to fetch. * @return SyncV1Service - */ -func (c *DefaultApiService) FetchService(Sid string) (*SyncV1Service, error) { - path := "/v1/Services/{Sid}" +*/ +func (c *DefaultApiService) FetchService(Sid string, ) (*SyncV1Service, error) { + path := "/v1/Services/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &SyncV1Service{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err + defer resp.Body.Close() + + ps := &SyncV1Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -823,28 +845,30 @@ func (c *DefaultApiService) FetchService(Sid string) (*SyncV1Service, error) { * @param ServiceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync List resource to fetch. * @param Sid The SID of the Sync List resource to fetch. Can be the Sync List resource's `sid` or its `unique_name`. * @return SyncV1ServiceSyncList - */ -func (c *DefaultApiService) FetchSyncList(ServiceSid string, Sid string) (*SyncV1ServiceSyncList, error) { - path := "/v1/Services/{ServiceSid}/Lists/{Sid}" +*/ +func (c *DefaultApiService) FetchSyncList(ServiceSid string, Sid string, ) (*SyncV1ServiceSyncList, error) { + path := "/v1/Services/{ServiceSid}/Lists/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &SyncV1ServiceSyncList{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &SyncV1ServiceSyncList{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -853,29 +877,31 @@ func (c *DefaultApiService) FetchSyncList(ServiceSid string, Sid string) (*SyncV * @param ListSid The SID of the Sync List with the Sync List Item resource to fetch. Can be the Sync List resource's `sid` or its `unique_name`. * @param Index The index of the Sync List Item resource to fetch. * @return SyncV1ServiceSyncListSyncListItem - */ -func (c *DefaultApiService) FetchSyncListItem(ServiceSid string, ListSid string, Index int32) (*SyncV1ServiceSyncListSyncListItem, error) { - path := "/v1/Services/{ServiceSid}/Lists/{ListSid}/Items/{Index}" +*/ +func (c *DefaultApiService) FetchSyncListItem(ServiceSid string, ListSid string, Index int32, ) (*SyncV1ServiceSyncListSyncListItem, error) { + path := "/v1/Services/{ServiceSid}/Lists/{ListSid}/Items/{Index}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ListSid"+"}", ListSid, -1) path = strings.Replace(path, "{"+"Index"+"}", fmt.Sprint(Index), -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &SyncV1ServiceSyncListSyncListItem{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err + defer resp.Body.Close() + + ps := &SyncV1ServiceSyncListSyncListItem{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -885,29 +911,31 @@ func (c *DefaultApiService) FetchSyncListItem(ServiceSid string, ListSid string, * @param ListSid The SID of the Sync List with the Sync List Permission resource to fetch. Can be the Sync List resource's `sid` or its `unique_name`. * @param Identity The application-defined string that uniquely identifies the User's Sync List Permission resource to fetch. * @return SyncV1ServiceSyncListSyncListPermission - */ -func (c *DefaultApiService) FetchSyncListPermission(ServiceSid string, ListSid string, Identity string) (*SyncV1ServiceSyncListSyncListPermission, error) { - path := "/v1/Services/{ServiceSid}/Lists/{ListSid}/Permissions/{Identity}" +*/ +func (c *DefaultApiService) FetchSyncListPermission(ServiceSid string, ListSid string, Identity string, ) (*SyncV1ServiceSyncListSyncListPermission, error) { + path := "/v1/Services/{ServiceSid}/Lists/{ListSid}/Permissions/{Identity}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ListSid"+"}", ListSid, -1) path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &SyncV1ServiceSyncListSyncListPermission{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &SyncV1ServiceSyncListSyncListPermission{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -915,28 +943,30 @@ func (c *DefaultApiService) FetchSyncListPermission(ServiceSid string, ListSid s * @param ServiceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync Map resource to fetch. * @param Sid The SID of the Sync Map resource to fetch. Can be the Sync Map's `sid` or its `unique_name`. * @return SyncV1ServiceSyncMap - */ -func (c *DefaultApiService) FetchSyncMap(ServiceSid string, Sid string) (*SyncV1ServiceSyncMap, error) { - path := "/v1/Services/{ServiceSid}/Maps/{Sid}" +*/ +func (c *DefaultApiService) FetchSyncMap(ServiceSid string, Sid string, ) (*SyncV1ServiceSyncMap, error) { + path := "/v1/Services/{ServiceSid}/Maps/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &SyncV1ServiceSyncMap{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err + defer resp.Body.Close() + + ps := &SyncV1ServiceSyncMap{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -945,29 +975,31 @@ func (c *DefaultApiService) FetchSyncMap(ServiceSid string, Sid string) (*SyncV1 * @param MapSid The SID of the Sync Map with the Sync Map Item resource to fetch. Can be the Sync Map resource's `sid` or its `unique_name`. * @param Key The `key` value of the Sync Map Item resource to fetch. * @return SyncV1ServiceSyncMapSyncMapItem - */ -func (c *DefaultApiService) FetchSyncMapItem(ServiceSid string, MapSid string, Key string) (*SyncV1ServiceSyncMapSyncMapItem, error) { - path := "/v1/Services/{ServiceSid}/Maps/{MapSid}/Items/{Key}" +*/ +func (c *DefaultApiService) FetchSyncMapItem(ServiceSid string, MapSid string, Key string, ) (*SyncV1ServiceSyncMapSyncMapItem, error) { + path := "/v1/Services/{ServiceSid}/Maps/{MapSid}/Items/{Key}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"MapSid"+"}", MapSid, -1) path = strings.Replace(path, "{"+"Key"+"}", Key, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &SyncV1ServiceSyncMapSyncMapItem{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &SyncV1ServiceSyncMapSyncMapItem{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -977,29 +1009,31 @@ func (c *DefaultApiService) FetchSyncMapItem(ServiceSid string, MapSid string, K * @param MapSid The SID of the Sync Map with the Sync Map Permission resource to fetch. Can be the Sync Map resource's `sid` or its `unique_name`. * @param Identity The application-defined string that uniquely identifies the User's Sync Map Permission resource to fetch. * @return SyncV1ServiceSyncMapSyncMapPermission - */ -func (c *DefaultApiService) FetchSyncMapPermission(ServiceSid string, MapSid string, Identity string) (*SyncV1ServiceSyncMapSyncMapPermission, error) { - path := "/v1/Services/{ServiceSid}/Maps/{MapSid}/Permissions/{Identity}" +*/ +func (c *DefaultApiService) FetchSyncMapPermission(ServiceSid string, MapSid string, Identity string, ) (*SyncV1ServiceSyncMapSyncMapPermission, error) { + path := "/v1/Services/{ServiceSid}/Maps/{MapSid}/Permissions/{Identity}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"MapSid"+"}", MapSid, -1) path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &SyncV1ServiceSyncMapSyncMapPermission{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err + defer resp.Body.Close() + + ps := &SyncV1ServiceSyncMapSyncMapPermission{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -1008,30 +1042,31 @@ func (c *DefaultApiService) FetchSyncMapPermission(ServiceSid string, MapSid str * @param ServiceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync Stream resource to fetch. * @param Sid The SID of the Stream resource to fetch. * @return SyncV1ServiceSyncStream - */ -func (c *DefaultApiService) FetchSyncStream(ServiceSid string, Sid string) (*SyncV1ServiceSyncStream, error) { - path := "/v1/Services/{ServiceSid}/Streams/{Sid}" +*/ +func (c *DefaultApiService) FetchSyncStream(ServiceSid string, Sid string, ) (*SyncV1ServiceSyncStream, error) { + path := "/v1/Services/{ServiceSid}/Streams/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &SyncV1ServiceSyncStream{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err -} + defer resp.Body.Close() + ps := &SyncV1ServiceSyncStream{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} // ListDocumentParams Optional parameters for the method 'ListDocument' type ListDocumentParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1043,33 +1078,33 @@ type ListDocumentParams struct { * @param optional nil or *ListDocumentParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListDocumentResponse - */ +*/ func (c *DefaultApiService) ListDocument(ServiceSid string, params *ListDocumentParams) (*ListDocumentResponse, error) { - path := "/v1/Services/{ServiceSid}/Documents" + path := "/v1/Services/{ServiceSid}/Documents" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListDocumentResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListDocumentResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListDocumentPermissionParams Optional parameters for the method 'ListDocumentPermission' type ListDocumentPermissionParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1083,34 +1118,34 @@ type ListDocumentPermissionParams struct { * @param optional nil or *ListDocumentPermissionParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListDocumentPermissionResponse - */ +*/ func (c *DefaultApiService) ListDocumentPermission(ServiceSid string, DocumentSid string, params *ListDocumentPermissionParams) (*ListDocumentPermissionResponse, error) { - path := "/v1/Services/{ServiceSid}/Documents/{DocumentSid}/Permissions" + path := "/v1/Services/{ServiceSid}/Documents/{DocumentSid}/Permissions" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"DocumentSid"+"}", DocumentSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListDocumentPermissionResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListDocumentPermissionResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListServiceParams Optional parameters for the method 'ListService' type ListServiceParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1121,32 +1156,32 @@ type ListServiceParams struct { * @param optional nil or *ListServiceParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListServiceResponse - */ +*/ func (c *DefaultApiService) ListService(params *ListServiceParams) (*ListServiceResponse, error) { - path := "/v1/Services" + path := "/v1/Services" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListServiceResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListServiceResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListSyncListParams Optional parameters for the method 'ListSyncList' type ListSyncListParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1158,39 +1193,39 @@ type ListSyncListParams struct { * @param optional nil or *ListSyncListParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListSyncListResponse - */ +*/ func (c *DefaultApiService) ListSyncList(ServiceSid string, params *ListSyncListParams) (*ListSyncListResponse, error) { - path := "/v1/Services/{ServiceSid}/Lists" + path := "/v1/Services/{ServiceSid}/Lists" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListSyncListResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListSyncListResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListSyncListItemParams Optional parameters for the method 'ListSyncListItem' type ListSyncListItemParams struct { - Order *string `json:"Order,omitempty"` - From *string `json:"From,omitempty"` - Bounds *string `json:"Bounds,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + Order *string `json:"Order,omitempty"` + From *string `json:"From,omitempty"` + Bounds *string `json:"Bounds,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -1203,43 +1238,43 @@ type ListSyncListItemParams struct { * @param "Bounds" (string) - Whether to include the List Item referenced by the `from` parameter. Can be: `inclusive` to include the List Item referenced by the `from` parameter or `exclusive` to start with the next List Item. The default value is `inclusive`. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListSyncListItemResponse - */ +*/ func (c *DefaultApiService) ListSyncListItem(ServiceSid string, ListSid string, params *ListSyncListItemParams) (*ListSyncListItemResponse, error) { - path := "/v1/Services/{ServiceSid}/Lists/{ListSid}/Items" + path := "/v1/Services/{ServiceSid}/Lists/{ListSid}/Items" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ListSid"+"}", ListSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Order != nil { - data.Set("Order", *params.Order) - } - if params != nil && params.From != nil { - data.Set("From", *params.From) - } - if params != nil && params.Bounds != nil { - data.Set("Bounds", *params.Bounds) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.Order != nil { + data.Set("Order", *params.Order) +} + if params != nil && params.From != nil { + data.Set("From", *params.From) +} + if params != nil && params.Bounds != nil { + data.Set("Bounds", *params.Bounds) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListSyncListItemResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListSyncListItemResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListSyncListPermissionParams Optional parameters for the method 'ListSyncListPermission' type ListSyncListPermissionParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1253,34 +1288,34 @@ type ListSyncListPermissionParams struct { * @param optional nil or *ListSyncListPermissionParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListSyncListPermissionResponse - */ +*/ func (c *DefaultApiService) ListSyncListPermission(ServiceSid string, ListSid string, params *ListSyncListPermissionParams) (*ListSyncListPermissionResponse, error) { - path := "/v1/Services/{ServiceSid}/Lists/{ListSid}/Permissions" + path := "/v1/Services/{ServiceSid}/Lists/{ListSid}/Permissions" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ListSid"+"}", ListSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListSyncListPermissionResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListSyncListPermissionResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListSyncMapParams Optional parameters for the method 'ListSyncMap' type ListSyncMapParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1292,39 +1327,39 @@ type ListSyncMapParams struct { * @param optional nil or *ListSyncMapParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListSyncMapResponse - */ +*/ func (c *DefaultApiService) ListSyncMap(ServiceSid string, params *ListSyncMapParams) (*ListSyncMapResponse, error) { - path := "/v1/Services/{ServiceSid}/Maps" + path := "/v1/Services/{ServiceSid}/Maps" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListSyncMapResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListSyncMapResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListSyncMapItemParams Optional parameters for the method 'ListSyncMapItem' type ListSyncMapItemParams struct { - Order *string `json:"Order,omitempty"` - From *string `json:"From,omitempty"` - Bounds *string `json:"Bounds,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + Order *string `json:"Order,omitempty"` + From *string `json:"From,omitempty"` + Bounds *string `json:"Bounds,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -1337,43 +1372,43 @@ type ListSyncMapItemParams struct { * @param "Bounds" (string) - Whether to include the Map Item referenced by the `from` parameter. Can be: `inclusive` to include the Map Item referenced by the `from` parameter or `exclusive` to start with the next Map Item. The default value is `inclusive`. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListSyncMapItemResponse - */ +*/ func (c *DefaultApiService) ListSyncMapItem(ServiceSid string, MapSid string, params *ListSyncMapItemParams) (*ListSyncMapItemResponse, error) { - path := "/v1/Services/{ServiceSid}/Maps/{MapSid}/Items" + path := "/v1/Services/{ServiceSid}/Maps/{MapSid}/Items" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"MapSid"+"}", MapSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Order != nil { - data.Set("Order", *params.Order) - } - if params != nil && params.From != nil { - data.Set("From", *params.From) - } - if params != nil && params.Bounds != nil { - data.Set("Bounds", *params.Bounds) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.Order != nil { + data.Set("Order", *params.Order) +} + if params != nil && params.From != nil { + data.Set("From", *params.From) +} + if params != nil && params.Bounds != nil { + data.Set("Bounds", *params.Bounds) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListSyncMapItemResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListSyncMapItemResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListSyncMapPermissionParams Optional parameters for the method 'ListSyncMapPermission' type ListSyncMapPermissionParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1387,34 +1422,34 @@ type ListSyncMapPermissionParams struct { * @param optional nil or *ListSyncMapPermissionParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListSyncMapPermissionResponse - */ +*/ func (c *DefaultApiService) ListSyncMapPermission(ServiceSid string, MapSid string, params *ListSyncMapPermissionParams) (*ListSyncMapPermissionResponse, error) { - path := "/v1/Services/{ServiceSid}/Maps/{MapSid}/Permissions" + path := "/v1/Services/{ServiceSid}/Maps/{MapSid}/Permissions" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"MapSid"+"}", MapSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListSyncMapPermissionResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListSyncMapPermissionResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListSyncStreamParams Optional parameters for the method 'ListSyncStream' type ListSyncStreamParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1427,38 +1462,38 @@ type ListSyncStreamParams struct { * @param optional nil or *ListSyncStreamParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListSyncStreamResponse - */ +*/ func (c *DefaultApiService) ListSyncStream(ServiceSid string, params *ListSyncStreamParams) (*ListSyncStreamResponse, error) { - path := "/v1/Services/{ServiceSid}/Streams" + path := "/v1/Services/{ServiceSid}/Streams" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListSyncStreamResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListSyncStreamResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateDocumentParams Optional parameters for the method 'UpdateDocument' type UpdateDocumentParams struct { - IfMatch *string `json:"If-Match,omitempty"` - Data *map[string]interface{} `json:"Data,omitempty"` - Ttl *int32 `json:"Ttl,omitempty"` + IfMatch *string `json:"If-Match,omitempty"` + Data *map[string]interface{} `json:"Data,omitempty"` + Ttl *int32 `json:"Ttl,omitempty"` } /* @@ -1470,52 +1505,51 @@ type UpdateDocumentParams struct { * @param "Data" (map[string]interface{}) - A JSON string that represents an arbitrary, schema-less object that the Sync Document stores. Can be up to 16 KiB in length. * @param "Ttl" (int32) - How long, in seconds, before the Sync Document expires and is deleted (time-to-live). Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the Document resource does not expire. The Document resource will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. * @return SyncV1ServiceDocument - */ +*/ func (c *DefaultApiService) UpdateDocument(ServiceSid string, Sid string, params *UpdateDocumentParams) (*SyncV1ServiceDocument, error) { - path := "/v1/Services/{ServiceSid}/Documents/{Sid}" + path := "/v1/Services/{ServiceSid}/Documents/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) - if params != nil && params.Data != nil { - v, err := json.Marshal(params.Data) + if params != nil && params.Data != nil { + v, err := json.Marshal(params.Data) - if err != nil { - return nil, err - } - - data.Set("Data", fmt.Sprint(v)) - } - if params != nil && params.Ttl != nil { - data.Set("Ttl", fmt.Sprint(*params.Ttl)) + if err != nil { + return nil, err } + data.Set("Data", fmt.Sprint(v)) +} + if params != nil && params.Ttl != nil { + data.Set("Ttl", fmt.Sprint(*params.Ttl)) +} + if params != nil && params.IfMatch != nil { headers["IfMatch"] = *params.IfMatch } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &SyncV1ServiceDocument{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &SyncV1ServiceDocument{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } - // UpdateDocumentPermissionParams Optional parameters for the method 'UpdateDocumentPermission' type UpdateDocumentPermissionParams struct { Manage *bool `json:"Manage,omitempty"` - Read *bool `json:"Read,omitempty"` - Write *bool `json:"Write,omitempty"` + Read *bool `json:"Read,omitempty"` + Write *bool `json:"Write,omitempty"` } /* @@ -1529,50 +1563,50 @@ type UpdateDocumentPermissionParams struct { * @param "Read" (bool) - Whether the identity can read the Sync Document. Default value is `false`. * @param "Write" (bool) - Whether the identity can update the Sync Document. Default value is `false`. * @return SyncV1ServiceDocumentDocumentPermission - */ +*/ func (c *DefaultApiService) UpdateDocumentPermission(ServiceSid string, DocumentSid string, Identity string, params *UpdateDocumentPermissionParams) (*SyncV1ServiceDocumentDocumentPermission, error) { - path := "/v1/Services/{ServiceSid}/Documents/{DocumentSid}/Permissions/{Identity}" + path := "/v1/Services/{ServiceSid}/Documents/{DocumentSid}/Permissions/{Identity}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"DocumentSid"+"}", DocumentSid, -1) path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Manage != nil { - data.Set("Manage", fmt.Sprint(*params.Manage)) - } - if params != nil && params.Read != nil { - data.Set("Read", fmt.Sprint(*params.Read)) - } - if params != nil && params.Write != nil { - data.Set("Write", fmt.Sprint(*params.Write)) - } + if params != nil && params.Manage != nil { + data.Set("Manage", fmt.Sprint(*params.Manage)) +} + if params != nil && params.Read != nil { + data.Set("Read", fmt.Sprint(*params.Read)) +} + if params != nil && params.Write != nil { + data.Set("Write", fmt.Sprint(*params.Write)) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &SyncV1ServiceDocumentDocumentPermission{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &SyncV1ServiceDocumentDocumentPermission{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateServiceParams Optional parameters for the method 'UpdateService' type UpdateServiceParams struct { - AclEnabled *bool `json:"AclEnabled,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - ReachabilityDebouncingEnabled *bool `json:"ReachabilityDebouncingEnabled,omitempty"` - ReachabilityDebouncingWindow *int32 `json:"ReachabilityDebouncingWindow,omitempty"` - ReachabilityWebhooksEnabled *bool `json:"ReachabilityWebhooksEnabled,omitempty"` - WebhookUrl *string `json:"WebhookUrl,omitempty"` - WebhooksFromRestEnabled *bool `json:"WebhooksFromRestEnabled,omitempty"` + AclEnabled *bool `json:"AclEnabled,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + ReachabilityDebouncingEnabled *bool `json:"ReachabilityDebouncingEnabled,omitempty"` + ReachabilityDebouncingWindow *int32 `json:"ReachabilityDebouncingWindow,omitempty"` + ReachabilityWebhooksEnabled *bool `json:"ReachabilityWebhooksEnabled,omitempty"` + WebhookUrl *string `json:"WebhookUrl,omitempty"` + WebhooksFromRestEnabled *bool `json:"WebhooksFromRestEnabled,omitempty"` } /* @@ -1587,55 +1621,55 @@ type UpdateServiceParams struct { * @param "WebhookUrl" (string) - The URL we should call when Sync objects are manipulated. * @param "WebhooksFromRestEnabled" (bool) - Whether the Service instance should call `webhook_url` when the REST API is used to update Sync objects. The default is `false`. * @return SyncV1Service - */ +*/ func (c *DefaultApiService) UpdateService(Sid string, params *UpdateServiceParams) (*SyncV1Service, error) { - path := "/v1/Services/{Sid}" + path := "/v1/Services/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.AclEnabled != nil { - data.Set("AclEnabled", fmt.Sprint(*params.AclEnabled)) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.ReachabilityDebouncingEnabled != nil { - data.Set("ReachabilityDebouncingEnabled", fmt.Sprint(*params.ReachabilityDebouncingEnabled)) - } - if params != nil && params.ReachabilityDebouncingWindow != nil { - data.Set("ReachabilityDebouncingWindow", fmt.Sprint(*params.ReachabilityDebouncingWindow)) - } - if params != nil && params.ReachabilityWebhooksEnabled != nil { - data.Set("ReachabilityWebhooksEnabled", fmt.Sprint(*params.ReachabilityWebhooksEnabled)) - } - if params != nil && params.WebhookUrl != nil { - data.Set("WebhookUrl", *params.WebhookUrl) - } - if params != nil && params.WebhooksFromRestEnabled != nil { - data.Set("WebhooksFromRestEnabled", fmt.Sprint(*params.WebhooksFromRestEnabled)) - } + if params != nil && params.AclEnabled != nil { + data.Set("AclEnabled", fmt.Sprint(*params.AclEnabled)) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.ReachabilityDebouncingEnabled != nil { + data.Set("ReachabilityDebouncingEnabled", fmt.Sprint(*params.ReachabilityDebouncingEnabled)) +} + if params != nil && params.ReachabilityDebouncingWindow != nil { + data.Set("ReachabilityDebouncingWindow", fmt.Sprint(*params.ReachabilityDebouncingWindow)) +} + if params != nil && params.ReachabilityWebhooksEnabled != nil { + data.Set("ReachabilityWebhooksEnabled", fmt.Sprint(*params.ReachabilityWebhooksEnabled)) +} + if params != nil && params.WebhookUrl != nil { + data.Set("WebhookUrl", *params.WebhookUrl) +} + if params != nil && params.WebhooksFromRestEnabled != nil { + data.Set("WebhooksFromRestEnabled", fmt.Sprint(*params.WebhooksFromRestEnabled)) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &SyncV1Service{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &SyncV1Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateSyncListParams Optional parameters for the method 'UpdateSyncList' type UpdateSyncListParams struct { CollectionTtl *int32 `json:"CollectionTtl,omitempty"` - Ttl *int32 `json:"Ttl,omitempty"` + Ttl *int32 `json:"Ttl,omitempty"` } /* @@ -1646,44 +1680,44 @@ type UpdateSyncListParams struct { * @param "CollectionTtl" (int32) - How long, in seconds, before the Sync List expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the Sync List does not expire. The Sync List will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. * @param "Ttl" (int32) - An alias for `collection_ttl`. If both are provided, this value is ignored. * @return SyncV1ServiceSyncList - */ +*/ func (c *DefaultApiService) UpdateSyncList(ServiceSid string, Sid string, params *UpdateSyncListParams) (*SyncV1ServiceSyncList, error) { - path := "/v1/Services/{ServiceSid}/Lists/{Sid}" + path := "/v1/Services/{ServiceSid}/Lists/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.CollectionTtl != nil { - data.Set("CollectionTtl", fmt.Sprint(*params.CollectionTtl)) - } - if params != nil && params.Ttl != nil { - data.Set("Ttl", fmt.Sprint(*params.Ttl)) - } + if params != nil && params.CollectionTtl != nil { + data.Set("CollectionTtl", fmt.Sprint(*params.CollectionTtl)) +} + if params != nil && params.Ttl != nil { + data.Set("Ttl", fmt.Sprint(*params.Ttl)) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &SyncV1ServiceSyncList{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &SyncV1ServiceSyncList{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateSyncListItemParams Optional parameters for the method 'UpdateSyncListItem' type UpdateSyncListItemParams struct { - IfMatch *string `json:"If-Match,omitempty"` - CollectionTtl *int32 `json:"CollectionTtl,omitempty"` - Data *map[string]interface{} `json:"Data,omitempty"` - ItemTtl *int32 `json:"ItemTtl,omitempty"` - Ttl *int32 `json:"Ttl,omitempty"` + IfMatch *string `json:"If-Match,omitempty"` + CollectionTtl *int32 `json:"CollectionTtl,omitempty"` + Data *map[string]interface{} `json:"Data,omitempty"` + ItemTtl *int32 `json:"ItemTtl,omitempty"` + Ttl *int32 `json:"Ttl,omitempty"` } /* @@ -1698,59 +1732,58 @@ type UpdateSyncListItemParams struct { * @param "ItemTtl" (int32) - How long, in seconds, before the List Item expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the List Item does not expire. The List Item will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. * @param "Ttl" (int32) - An alias for `item_ttl`. If both parameters are provided, this value is ignored. * @return SyncV1ServiceSyncListSyncListItem - */ +*/ func (c *DefaultApiService) UpdateSyncListItem(ServiceSid string, ListSid string, Index int32, params *UpdateSyncListItemParams) (*SyncV1ServiceSyncListSyncListItem, error) { - path := "/v1/Services/{ServiceSid}/Lists/{ListSid}/Items/{Index}" + path := "/v1/Services/{ServiceSid}/Lists/{ListSid}/Items/{Index}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ListSid"+"}", ListSid, -1) path = strings.Replace(path, "{"+"Index"+"}", fmt.Sprint(Index), -1) - data := url.Values{} - headers := make(map[string]interface{}) - - if params != nil && params.CollectionTtl != nil { - data.Set("CollectionTtl", fmt.Sprint(*params.CollectionTtl)) - } - if params != nil && params.Data != nil { - v, err := json.Marshal(params.Data) + data := url.Values{} + headers := make(map[string]interface{}) - if err != nil { - return nil, err - } + if params != nil && params.CollectionTtl != nil { + data.Set("CollectionTtl", fmt.Sprint(*params.CollectionTtl)) +} + if params != nil && params.Data != nil { + v, err := json.Marshal(params.Data) - data.Set("Data", fmt.Sprint(v)) - } - if params != nil && params.ItemTtl != nil { - data.Set("ItemTtl", fmt.Sprint(*params.ItemTtl)) - } - if params != nil && params.Ttl != nil { - data.Set("Ttl", fmt.Sprint(*params.Ttl)) + if err != nil { + return nil, err } + data.Set("Data", fmt.Sprint(v)) +} + if params != nil && params.ItemTtl != nil { + data.Set("ItemTtl", fmt.Sprint(*params.ItemTtl)) +} + if params != nil && params.Ttl != nil { + data.Set("Ttl", fmt.Sprint(*params.Ttl)) +} + if params != nil && params.IfMatch != nil { headers["IfMatch"] = *params.IfMatch } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &SyncV1ServiceSyncListSyncListItem{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &SyncV1ServiceSyncListSyncListItem{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } - // UpdateSyncListPermissionParams Optional parameters for the method 'UpdateSyncListPermission' type UpdateSyncListPermissionParams struct { Manage *bool `json:"Manage,omitempty"` - Read *bool `json:"Read,omitempty"` - Write *bool `json:"Write,omitempty"` + Read *bool `json:"Read,omitempty"` + Write *bool `json:"Write,omitempty"` } /* @@ -1764,45 +1797,45 @@ type UpdateSyncListPermissionParams struct { * @param "Read" (bool) - Whether the identity can read the Sync List and its Items. Default value is `false`. * @param "Write" (bool) - Whether the identity can create, update, and delete Items in the Sync List. Default value is `false`. * @return SyncV1ServiceSyncListSyncListPermission - */ +*/ func (c *DefaultApiService) UpdateSyncListPermission(ServiceSid string, ListSid string, Identity string, params *UpdateSyncListPermissionParams) (*SyncV1ServiceSyncListSyncListPermission, error) { - path := "/v1/Services/{ServiceSid}/Lists/{ListSid}/Permissions/{Identity}" + path := "/v1/Services/{ServiceSid}/Lists/{ListSid}/Permissions/{Identity}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ListSid"+"}", ListSid, -1) path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Manage != nil { - data.Set("Manage", fmt.Sprint(*params.Manage)) - } - if params != nil && params.Read != nil { - data.Set("Read", fmt.Sprint(*params.Read)) - } - if params != nil && params.Write != nil { - data.Set("Write", fmt.Sprint(*params.Write)) - } + if params != nil && params.Manage != nil { + data.Set("Manage", fmt.Sprint(*params.Manage)) +} + if params != nil && params.Read != nil { + data.Set("Read", fmt.Sprint(*params.Read)) +} + if params != nil && params.Write != nil { + data.Set("Write", fmt.Sprint(*params.Write)) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &SyncV1ServiceSyncListSyncListPermission{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &SyncV1ServiceSyncListSyncListPermission{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateSyncMapParams Optional parameters for the method 'UpdateSyncMap' type UpdateSyncMapParams struct { CollectionTtl *int32 `json:"CollectionTtl,omitempty"` - Ttl *int32 `json:"Ttl,omitempty"` + Ttl *int32 `json:"Ttl,omitempty"` } /* @@ -1813,51 +1846,51 @@ type UpdateSyncMapParams struct { * @param "CollectionTtl" (int32) - How long, in seconds, before the Sync Map expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the Sync Map does not expire. The Sync Map will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. * @param "Ttl" (int32) - An alias for `collection_ttl`. If both parameters are provided, this value is ignored. * @return SyncV1ServiceSyncMap - */ +*/ func (c *DefaultApiService) UpdateSyncMap(ServiceSid string, Sid string, params *UpdateSyncMapParams) (*SyncV1ServiceSyncMap, error) { - path := "/v1/Services/{ServiceSid}/Maps/{Sid}" + path := "/v1/Services/{ServiceSid}/Maps/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.CollectionTtl != nil { - data.Set("CollectionTtl", fmt.Sprint(*params.CollectionTtl)) - } - if params != nil && params.Ttl != nil { - data.Set("Ttl", fmt.Sprint(*params.Ttl)) - } + if params != nil && params.CollectionTtl != nil { + data.Set("CollectionTtl", fmt.Sprint(*params.CollectionTtl)) +} + if params != nil && params.Ttl != nil { + data.Set("Ttl", fmt.Sprint(*params.Ttl)) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &SyncV1ServiceSyncMap{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &SyncV1ServiceSyncMap{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateSyncMapItemParams Optional parameters for the method 'UpdateSyncMapItem' type UpdateSyncMapItemParams struct { - IfMatch *string `json:"If-Match,omitempty"` - CollectionTtl *int32 `json:"CollectionTtl,omitempty"` - Data *map[string]interface{} `json:"Data,omitempty"` - ItemTtl *int32 `json:"ItemTtl,omitempty"` - Ttl *int32 `json:"Ttl,omitempty"` + IfMatch *string `json:"If-Match,omitempty"` + CollectionTtl *int32 `json:"CollectionTtl,omitempty"` + Data *map[string]interface{} `json:"Data,omitempty"` + ItemTtl *int32 `json:"ItemTtl,omitempty"` + Ttl *int32 `json:"Ttl,omitempty"` } /* * UpdateSyncMapItem Method for UpdateSyncMapItem * @param ServiceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync Map Item resource to update. * @param MapSid The SID of the Sync Map with the Sync Map Item resource to update. Can be the Sync Map resource's `sid` or its `unique_name`. -* @param Key The `key` value of the Sync Map Item resource to update. +* @param Key The `key` value of the Sync Map Item resource to update. * @param optional nil or *UpdateSyncMapItemParams - Optional Parameters: * @param "IfMatch" (string) - If provided, applies this mutation if (and only if) the “revision” field of this [map item] matches the provided value. This matches the semantics of (and is implemented with) the HTTP [If-Match header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Match). * @param "CollectionTtl" (int32) - How long, in seconds, before the Map Item's parent Sync Map expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the parent Sync Map does not expire. This parameter can only be used when the Map Item's `data` or `ttl` is updated in the same request. The Sync Map will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. @@ -1865,59 +1898,58 @@ type UpdateSyncMapItemParams struct { * @param "ItemTtl" (int32) - How long, in seconds, before the Map Item expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the Map Item does not expire. The Map Item will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. * @param "Ttl" (int32) - An alias for `item_ttl`. If both parameters are provided, this value is ignored. * @return SyncV1ServiceSyncMapSyncMapItem - */ +*/ func (c *DefaultApiService) UpdateSyncMapItem(ServiceSid string, MapSid string, Key string, params *UpdateSyncMapItemParams) (*SyncV1ServiceSyncMapSyncMapItem, error) { - path := "/v1/Services/{ServiceSid}/Maps/{MapSid}/Items/{Key}" + path := "/v1/Services/{ServiceSid}/Maps/{MapSid}/Items/{Key}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"MapSid"+"}", MapSid, -1) path = strings.Replace(path, "{"+"Key"+"}", Key, -1) - data := url.Values{} - headers := make(map[string]interface{}) - - if params != nil && params.CollectionTtl != nil { - data.Set("CollectionTtl", fmt.Sprint(*params.CollectionTtl)) - } - if params != nil && params.Data != nil { - v, err := json.Marshal(params.Data) + data := url.Values{} + headers := make(map[string]interface{}) - if err != nil { - return nil, err - } + if params != nil && params.CollectionTtl != nil { + data.Set("CollectionTtl", fmt.Sprint(*params.CollectionTtl)) +} + if params != nil && params.Data != nil { + v, err := json.Marshal(params.Data) - data.Set("Data", fmt.Sprint(v)) - } - if params != nil && params.ItemTtl != nil { - data.Set("ItemTtl", fmt.Sprint(*params.ItemTtl)) - } - if params != nil && params.Ttl != nil { - data.Set("Ttl", fmt.Sprint(*params.Ttl)) + if err != nil { + return nil, err } + data.Set("Data", fmt.Sprint(v)) +} + if params != nil && params.ItemTtl != nil { + data.Set("ItemTtl", fmt.Sprint(*params.ItemTtl)) +} + if params != nil && params.Ttl != nil { + data.Set("Ttl", fmt.Sprint(*params.Ttl)) +} + if params != nil && params.IfMatch != nil { headers["IfMatch"] = *params.IfMatch } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &SyncV1ServiceSyncMapSyncMapItem{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &SyncV1ServiceSyncMapSyncMapItem{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } - // UpdateSyncMapPermissionParams Optional parameters for the method 'UpdateSyncMapPermission' type UpdateSyncMapPermissionParams struct { Manage *bool `json:"Manage,omitempty"` - Read *bool `json:"Read,omitempty"` - Write *bool `json:"Write,omitempty"` + Read *bool `json:"Read,omitempty"` + Write *bool `json:"Write,omitempty"` } /* @@ -1931,41 +1963,41 @@ type UpdateSyncMapPermissionParams struct { * @param "Read" (bool) - Whether the identity can read the Sync Map and its Items. Default value is `false`. * @param "Write" (bool) - Whether the identity can create, update, and delete Items in the Sync Map. Default value is `false`. * @return SyncV1ServiceSyncMapSyncMapPermission - */ +*/ func (c *DefaultApiService) UpdateSyncMapPermission(ServiceSid string, MapSid string, Identity string, params *UpdateSyncMapPermissionParams) (*SyncV1ServiceSyncMapSyncMapPermission, error) { - path := "/v1/Services/{ServiceSid}/Maps/{MapSid}/Permissions/{Identity}" + path := "/v1/Services/{ServiceSid}/Maps/{MapSid}/Permissions/{Identity}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"MapSid"+"}", MapSid, -1) path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Manage != nil { - data.Set("Manage", fmt.Sprint(*params.Manage)) - } - if params != nil && params.Read != nil { - data.Set("Read", fmt.Sprint(*params.Read)) - } - if params != nil && params.Write != nil { - data.Set("Write", fmt.Sprint(*params.Write)) - } + if params != nil && params.Manage != nil { + data.Set("Manage", fmt.Sprint(*params.Manage)) +} + if params != nil && params.Read != nil { + data.Set("Read", fmt.Sprint(*params.Read)) +} + if params != nil && params.Write != nil { + data.Set("Write", fmt.Sprint(*params.Write)) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &SyncV1ServiceSyncMapSyncMapPermission{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &SyncV1ServiceSyncMapSyncMapPermission{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateSyncStreamParams Optional parameters for the method 'UpdateSyncStream' type UpdateSyncStreamParams struct { Ttl *int32 `json:"Ttl,omitempty"` @@ -1979,30 +2011,31 @@ type UpdateSyncStreamParams struct { * @param optional nil or *UpdateSyncStreamParams - Optional Parameters: * @param "Ttl" (int32) - How long, in seconds, before the Stream expires and is deleted (time-to-live). Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the Stream does not expire. The Stream will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. * @return SyncV1ServiceSyncStream - */ +*/ func (c *DefaultApiService) UpdateSyncStream(ServiceSid string, Sid string, params *UpdateSyncStreamParams) (*SyncV1ServiceSyncStream, error) { - path := "/v1/Services/{ServiceSid}/Streams/{Sid}" + path := "/v1/Services/{ServiceSid}/Streams/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Ttl != nil { - data.Set("Ttl", fmt.Sprint(*params.Ttl)) - } + if params != nil && params.Ttl != nil { + data.Set("Ttl", fmt.Sprint(*params.Ttl)) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &SyncV1ServiceSyncStream{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() + + ps := &SyncV1ServiceSyncStream{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } diff --git a/twilio/rest/sync/v1/model_list_document_permission_response.go b/twilio/rest/sync/v1/model_list_document_permission_response.go index 71029f1b1..558eababc 100644 --- a/twilio/rest/sync/v1/model_list_document_permission_response.go +++ b/twilio/rest/sync/v1/model_list_document_permission_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Sync - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListDocumentPermissionResponse struct for ListDocumentPermissionResponse type ListDocumentPermissionResponse struct { - Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` Permissions []SyncV1ServiceDocumentDocumentPermission `json:"Permissions,omitempty"` } diff --git a/twilio/rest/sync/v1/model_list_document_response.go b/twilio/rest/sync/v1/model_list_document_response.go index 41036b37a..152bfce47 100644 --- a/twilio/rest/sync/v1/model_list_document_response.go +++ b/twilio/rest/sync/v1/model_list_document_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Sync - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListDocumentResponse struct for ListDocumentResponse type ListDocumentResponse struct { Documents []SyncV1ServiceDocument `json:"Documents,omitempty"` - Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/sync/v1/model_list_service_response.go b/twilio/rest/sync/v1/model_list_service_response.go index 591f94445..07d586f2d 100644 --- a/twilio/rest/sync/v1/model_list_service_response.go +++ b/twilio/rest/sync/v1/model_list_service_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Sync - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListServiceResponse struct for ListServiceResponse type ListServiceResponse struct { - Meta ListServiceResponseMeta `json:"Meta,omitempty"` - Services []SyncV1Service `json:"Services,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Services []SyncV1Service `json:"Services,omitempty"` } diff --git a/twilio/rest/sync/v1/model_list_service_response_meta.go b/twilio/rest/sync/v1/model_list_service_response_meta.go index 243647d27..b37848e94 100644 --- a/twilio/rest/sync/v1/model_list_service_response_meta.go +++ b/twilio/rest/sync/v1/model_list_service_response_meta.go @@ -1,23 +1,22 @@ /* - * Twilio - Sync - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListServiceResponseMeta struct for ListServiceResponseMeta type ListServiceResponseMeta struct { - FirstPageUrl string `json:"FirstPageUrl,omitempty"` - Key string `json:"Key,omitempty"` - NextPageUrl string `json:"NextPageUrl,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` - Url string `json:"Url,omitempty"` + Url string `json:"Url,omitempty"` } diff --git a/twilio/rest/sync/v1/model_list_sync_list_item_response.go b/twilio/rest/sync/v1/model_list_sync_list_item_response.go index fb81bfc83..cfc97e182 100644 --- a/twilio/rest/sync/v1/model_list_sync_list_item_response.go +++ b/twilio/rest/sync/v1/model_list_sync_list_item_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Sync - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListSyncListItemResponse struct for ListSyncListItemResponse type ListSyncListItemResponse struct { Items []SyncV1ServiceSyncListSyncListItem `json:"Items,omitempty"` - Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/sync/v1/model_list_sync_list_permission_response.go b/twilio/rest/sync/v1/model_list_sync_list_permission_response.go index 028cfcd5f..d7aebadae 100644 --- a/twilio/rest/sync/v1/model_list_sync_list_permission_response.go +++ b/twilio/rest/sync/v1/model_list_sync_list_permission_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Sync - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListSyncListPermissionResponse struct for ListSyncListPermissionResponse type ListSyncListPermissionResponse struct { - Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` Permissions []SyncV1ServiceSyncListSyncListPermission `json:"Permissions,omitempty"` } diff --git a/twilio/rest/sync/v1/model_list_sync_list_response.go b/twilio/rest/sync/v1/model_list_sync_list_response.go index 359c4c291..8de938d66 100644 --- a/twilio/rest/sync/v1/model_list_sync_list_response.go +++ b/twilio/rest/sync/v1/model_list_sync_list_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Sync - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListSyncListResponse struct for ListSyncListResponse type ListSyncListResponse struct { Lists []SyncV1ServiceSyncList `json:"Lists,omitempty"` - Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/sync/v1/model_list_sync_map_item_response.go b/twilio/rest/sync/v1/model_list_sync_map_item_response.go index 446a3020f..4b1da7c17 100644 --- a/twilio/rest/sync/v1/model_list_sync_map_item_response.go +++ b/twilio/rest/sync/v1/model_list_sync_map_item_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Sync - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListSyncMapItemResponse struct for ListSyncMapItemResponse type ListSyncMapItemResponse struct { Items []SyncV1ServiceSyncMapSyncMapItem `json:"Items,omitempty"` - Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/sync/v1/model_list_sync_map_permission_response.go b/twilio/rest/sync/v1/model_list_sync_map_permission_response.go index c725a2e85..4aa5f1e77 100644 --- a/twilio/rest/sync/v1/model_list_sync_map_permission_response.go +++ b/twilio/rest/sync/v1/model_list_sync_map_permission_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Sync - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListSyncMapPermissionResponse struct for ListSyncMapPermissionResponse type ListSyncMapPermissionResponse struct { - Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` Permissions []SyncV1ServiceSyncMapSyncMapPermission `json:"Permissions,omitempty"` } diff --git a/twilio/rest/sync/v1/model_list_sync_map_response.go b/twilio/rest/sync/v1/model_list_sync_map_response.go index 34ddfbdbf..9d6e83b58 100644 --- a/twilio/rest/sync/v1/model_list_sync_map_response.go +++ b/twilio/rest/sync/v1/model_list_sync_map_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Sync - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListSyncMapResponse struct for ListSyncMapResponse type ListSyncMapResponse struct { - Maps []SyncV1ServiceSyncMap `json:"Maps,omitempty"` + Maps []SyncV1ServiceSyncMap `json:"Maps,omitempty"` Meta ListServiceResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/sync/v1/model_list_sync_stream_response.go b/twilio/rest/sync/v1/model_list_sync_stream_response.go index ec341052f..294413210 100644 --- a/twilio/rest/sync/v1/model_list_sync_stream_response.go +++ b/twilio/rest/sync/v1/model_list_sync_stream_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Sync - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListSyncStreamResponse struct for ListSyncStreamResponse type ListSyncStreamResponse struct { - Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` Streams []SyncV1ServiceSyncStream `json:"Streams,omitempty"` } diff --git a/twilio/rest/sync/v1/model_sync_v1_service.go b/twilio/rest/sync/v1/model_sync_v1_service.go index 3a1566374..345f36c70 100644 --- a/twilio/rest/sync/v1/model_sync_v1_service.go +++ b/twilio/rest/sync/v1/model_sync_v1_service.go @@ -1,20 +1,18 @@ /* - * Twilio - Sync - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // SyncV1Service struct for SyncV1Service type SyncV1Service struct { // The SID of the Account that created the resource diff --git a/twilio/rest/sync/v1/model_sync_v1_service_document.go b/twilio/rest/sync/v1/model_sync_v1_service_document.go index 5bcbf4f73..1a73ef5de 100644 --- a/twilio/rest/sync/v1/model_sync_v1_service_document.go +++ b/twilio/rest/sync/v1/model_sync_v1_service_document.go @@ -1,20 +1,18 @@ /* - * Twilio - Sync - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // SyncV1ServiceDocument struct for SyncV1ServiceDocument type SyncV1ServiceDocument struct { // The SID of the Account that created the resource diff --git a/twilio/rest/sync/v1/model_sync_v1_service_document_document_permission.go b/twilio/rest/sync/v1/model_sync_v1_service_document_document_permission.go index 16bc4177a..a989c0b8c 100644 --- a/twilio/rest/sync/v1/model_sync_v1_service_document_document_permission.go +++ b/twilio/rest/sync/v1/model_sync_v1_service_document_document_permission.go @@ -1,16 +1,15 @@ /* - * Twilio - Sync - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // SyncV1ServiceDocumentDocumentPermission struct for SyncV1ServiceDocumentDocumentPermission type SyncV1ServiceDocumentDocumentPermission struct { // The SID of the Account that created the resource diff --git a/twilio/rest/sync/v1/model_sync_v1_service_sync_list.go b/twilio/rest/sync/v1/model_sync_v1_service_sync_list.go index 804206a5f..7117557bc 100644 --- a/twilio/rest/sync/v1/model_sync_v1_service_sync_list.go +++ b/twilio/rest/sync/v1/model_sync_v1_service_sync_list.go @@ -1,20 +1,18 @@ /* - * Twilio - Sync - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // SyncV1ServiceSyncList struct for SyncV1ServiceSyncList type SyncV1ServiceSyncList struct { // The SID of the Account that created the resource diff --git a/twilio/rest/sync/v1/model_sync_v1_service_sync_list_sync_list_item.go b/twilio/rest/sync/v1/model_sync_v1_service_sync_list_sync_list_item.go index f48dc36ac..f6b3a67dc 100644 --- a/twilio/rest/sync/v1/model_sync_v1_service_sync_list_sync_list_item.go +++ b/twilio/rest/sync/v1/model_sync_v1_service_sync_list_sync_list_item.go @@ -1,20 +1,18 @@ /* - * Twilio - Sync - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // SyncV1ServiceSyncListSyncListItem struct for SyncV1ServiceSyncListSyncListItem type SyncV1ServiceSyncListSyncListItem struct { // The SID of the Account that created the resource diff --git a/twilio/rest/sync/v1/model_sync_v1_service_sync_list_sync_list_permission.go b/twilio/rest/sync/v1/model_sync_v1_service_sync_list_sync_list_permission.go index 0c932f3a7..71a8a8aa2 100644 --- a/twilio/rest/sync/v1/model_sync_v1_service_sync_list_sync_list_permission.go +++ b/twilio/rest/sync/v1/model_sync_v1_service_sync_list_sync_list_permission.go @@ -1,16 +1,15 @@ /* - * Twilio - Sync - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // SyncV1ServiceSyncListSyncListPermission struct for SyncV1ServiceSyncListSyncListPermission type SyncV1ServiceSyncListSyncListPermission struct { // The SID of the Account that created the resource diff --git a/twilio/rest/sync/v1/model_sync_v1_service_sync_map.go b/twilio/rest/sync/v1/model_sync_v1_service_sync_map.go index 66877b36a..1d7b301a6 100644 --- a/twilio/rest/sync/v1/model_sync_v1_service_sync_map.go +++ b/twilio/rest/sync/v1/model_sync_v1_service_sync_map.go @@ -1,20 +1,18 @@ /* - * Twilio - Sync - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // SyncV1ServiceSyncMap struct for SyncV1ServiceSyncMap type SyncV1ServiceSyncMap struct { // The SID of the Account that created the resource diff --git a/twilio/rest/sync/v1/model_sync_v1_service_sync_map_sync_map_item.go b/twilio/rest/sync/v1/model_sync_v1_service_sync_map_sync_map_item.go index 707181731..6a3638121 100644 --- a/twilio/rest/sync/v1/model_sync_v1_service_sync_map_sync_map_item.go +++ b/twilio/rest/sync/v1/model_sync_v1_service_sync_map_sync_map_item.go @@ -1,20 +1,18 @@ /* - * Twilio - Sync - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // SyncV1ServiceSyncMapSyncMapItem struct for SyncV1ServiceSyncMapSyncMapItem type SyncV1ServiceSyncMapSyncMapItem struct { // The SID of the Account that created the resource diff --git a/twilio/rest/sync/v1/model_sync_v1_service_sync_map_sync_map_permission.go b/twilio/rest/sync/v1/model_sync_v1_service_sync_map_sync_map_permission.go index 284c6bda4..1e288c3e1 100644 --- a/twilio/rest/sync/v1/model_sync_v1_service_sync_map_sync_map_permission.go +++ b/twilio/rest/sync/v1/model_sync_v1_service_sync_map_sync_map_permission.go @@ -1,16 +1,15 @@ /* - * Twilio - Sync - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // SyncV1ServiceSyncMapSyncMapPermission struct for SyncV1ServiceSyncMapSyncMapPermission type SyncV1ServiceSyncMapSyncMapPermission struct { // The SID of the Account that created the resource diff --git a/twilio/rest/sync/v1/model_sync_v1_service_sync_stream.go b/twilio/rest/sync/v1/model_sync_v1_service_sync_stream.go index b0e1c66f0..bacaffb6f 100644 --- a/twilio/rest/sync/v1/model_sync_v1_service_sync_stream.go +++ b/twilio/rest/sync/v1/model_sync_v1_service_sync_stream.go @@ -1,20 +1,18 @@ /* - * Twilio - Sync - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // SyncV1ServiceSyncStream struct for SyncV1ServiceSyncStream type SyncV1ServiceSyncStream struct { // The SID of the Account that created the resource diff --git a/twilio/rest/sync/v1/model_sync_v1_service_sync_stream_stream_message.go b/twilio/rest/sync/v1/model_sync_v1_service_sync_stream_stream_message.go index f4df9f1ed..96f215401 100644 --- a/twilio/rest/sync/v1/model_sync_v1_service_sync_stream_stream_message.go +++ b/twilio/rest/sync/v1/model_sync_v1_service_sync_stream_stream_message.go @@ -1,16 +1,15 @@ /* - * Twilio - Sync - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // SyncV1ServiceSyncStreamStreamMessage struct for SyncV1ServiceSyncStreamStreamMessage type SyncV1ServiceSyncStreamStreamMessage struct { // Stream Message body diff --git a/twilio/rest/taskrouter/v1/api_default.go b/twilio/rest/taskrouter/v1/api_default.go index 21542a99b..98a96facb 100644 --- a/twilio/rest/taskrouter/v1/api_default.go +++ b/twilio/rest/taskrouter/v1/api_default.go @@ -1,11 +1,11 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,11 +14,11 @@ package openapi import ( "encoding/json" "fmt" - "net/url" - "strings" - "time" - twilio "github.com/twilio/twilio-go/client" + "net/url" + "strings" + "time" + "reflect" ) type DefaultApiService struct { @@ -27,15 +27,15 @@ type DefaultApiService struct { } func NewDefaultApiService(client *twilio.Client) *DefaultApiService { - return &DefaultApiService{ - client: client, + return &DefaultApiService { + client: client, baseURL: "https://taskrouter.twilio.com", } } // CreateActivityParams Optional parameters for the method 'CreateActivity' type CreateActivityParams struct { - Available *bool `json:"Available,omitempty"` + Available *bool `json:"Available,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` } @@ -46,42 +46,42 @@ type CreateActivityParams struct { * @param "Available" (bool) - Whether the Worker should be eligible to receive a Task when it occupies the Activity. A value of `true`, `1`, or `yes` specifies the Activity is available. All other values specify that it is not. The value cannot be changed after the Activity is created. * @param "FriendlyName" (string) - A descriptive string that you create to describe the Activity resource. It can be up to 64 characters long. These names are used to calculate and expose statistics about Workers, and provide visibility into the state of each Worker. Examples of friendly names include: `on-call`, `break`, and `email`. * @return TaskrouterV1WorkspaceActivity - */ +*/ func (c *DefaultApiService) CreateActivity(WorkspaceSid string, params *CreateActivityParams) (*TaskrouterV1WorkspaceActivity, error) { - path := "/v1/Workspaces/{WorkspaceSid}/Activities" + path := "/v1/Workspaces/{WorkspaceSid}/Activities" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Available != nil { - data.Set("Available", fmt.Sprint(*params.Available)) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } + if params != nil && params.Available != nil { + data.Set("Available", fmt.Sprint(*params.Available)) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &TaskrouterV1WorkspaceActivity{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &TaskrouterV1WorkspaceActivity{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateTaskParams Optional parameters for the method 'CreateTask' type CreateTaskParams struct { - Attributes *string `json:"Attributes,omitempty"` - Priority *int32 `json:"Priority,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + Priority *int32 `json:"Priority,omitempty"` TaskChannel *string `json:"TaskChannel,omitempty"` - Timeout *int32 `json:"Timeout,omitempty"` + Timeout *int32 `json:"Timeout,omitempty"` WorkflowSid *string `json:"WorkflowSid,omitempty"` } @@ -95,50 +95,50 @@ type CreateTaskParams struct { * @param "Timeout" (int32) - The amount of time in seconds the new task can live before being assigned. Can be up to a maximum of 2 weeks (1,209,600 seconds). The default value is 24 hours (86,400 seconds). On timeout, the `task.canceled` event will fire with description `Task TTL Exceeded`. * @param "WorkflowSid" (string) - The SID of the Workflow that you would like to handle routing for the new Task. If there is only one Workflow defined for the Workspace that you are posting the new task to, this parameter is optional. * @return TaskrouterV1WorkspaceTask - */ +*/ func (c *DefaultApiService) CreateTask(WorkspaceSid string, params *CreateTaskParams) (*TaskrouterV1WorkspaceTask, error) { - path := "/v1/Workspaces/{WorkspaceSid}/Tasks" + path := "/v1/Workspaces/{WorkspaceSid}/Tasks" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) - } - if params != nil && params.Priority != nil { - data.Set("Priority", fmt.Sprint(*params.Priority)) - } - if params != nil && params.TaskChannel != nil { - data.Set("TaskChannel", *params.TaskChannel) - } - if params != nil && params.Timeout != nil { - data.Set("Timeout", fmt.Sprint(*params.Timeout)) - } - if params != nil && params.WorkflowSid != nil { - data.Set("WorkflowSid", *params.WorkflowSid) - } + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) +} + if params != nil && params.Priority != nil { + data.Set("Priority", fmt.Sprint(*params.Priority)) +} + if params != nil && params.TaskChannel != nil { + data.Set("TaskChannel", *params.TaskChannel) +} + if params != nil && params.Timeout != nil { + data.Set("Timeout", fmt.Sprint(*params.Timeout)) +} + if params != nil && params.WorkflowSid != nil { + data.Set("WorkflowSid", *params.WorkflowSid) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &TaskrouterV1WorkspaceTask{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &TaskrouterV1WorkspaceTask{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateTaskChannelParams Optional parameters for the method 'CreateTaskChannel' type CreateTaskChannelParams struct { - ChannelOptimizedRouting *bool `json:"ChannelOptimizedRouting,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + ChannelOptimizedRouting *bool `json:"ChannelOptimizedRouting,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` } /* @@ -149,47 +149,47 @@ type CreateTaskChannelParams struct { * @param "FriendlyName" (string) - A descriptive string that you create to describe the Task Channel. It can be up to 64 characters long. * @param "UniqueName" (string) - An application-defined string that uniquely identifies the Task Channel, such as `voice` or `sms`. * @return TaskrouterV1WorkspaceTaskChannel - */ +*/ func (c *DefaultApiService) CreateTaskChannel(WorkspaceSid string, params *CreateTaskChannelParams) (*TaskrouterV1WorkspaceTaskChannel, error) { - path := "/v1/Workspaces/{WorkspaceSid}/TaskChannels" + path := "/v1/Workspaces/{WorkspaceSid}/TaskChannels" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.ChannelOptimizedRouting != nil { - data.Set("ChannelOptimizedRouting", fmt.Sprint(*params.ChannelOptimizedRouting)) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) - } + if params != nil && params.ChannelOptimizedRouting != nil { + data.Set("ChannelOptimizedRouting", fmt.Sprint(*params.ChannelOptimizedRouting)) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &TaskrouterV1WorkspaceTaskChannel{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &TaskrouterV1WorkspaceTaskChannel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateTaskQueueParams Optional parameters for the method 'CreateTaskQueue' type CreateTaskQueueParams struct { - AssignmentActivitySid *string `json:"AssignmentActivitySid,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - MaxReservedWorkers *int32 `json:"MaxReservedWorkers,omitempty"` + AssignmentActivitySid *string `json:"AssignmentActivitySid,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + MaxReservedWorkers *int32 `json:"MaxReservedWorkers,omitempty"` ReservationActivitySid *string `json:"ReservationActivitySid,omitempty"` - TargetWorkers *string `json:"TargetWorkers,omitempty"` - TaskOrder *string `json:"TaskOrder,omitempty"` + TargetWorkers *string `json:"TargetWorkers,omitempty"` + TaskOrder *string `json:"TaskOrder,omitempty"` } /* @@ -203,52 +203,52 @@ type CreateTaskQueueParams struct { * @param "TargetWorkers" (string) - A string that describes the Worker selection criteria for any Tasks that enter the TaskQueue. For example, `'\\\"language\\\" == \\\"spanish\\\"'`. The default value is `1==1`. If this value is empty, Tasks will wait in the TaskQueue until they are deleted or moved to another TaskQueue. For more information about Worker selection, see [Describing Worker selection criteria](https://www.twilio.com/docs/taskrouter/api/taskqueues#target-workers). * @param "TaskOrder" (string) - How Tasks will be assigned to Workers. Set this parameter to `LIFO` to assign most recently created Task first or FIFO to assign the oldest Task first. Default is `FIFO`. [Click here](https://www.twilio.com/docs/taskrouter/queue-ordering-last-first-out-lifo) to learn more. * @return TaskrouterV1WorkspaceTaskQueue - */ +*/ func (c *DefaultApiService) CreateTaskQueue(WorkspaceSid string, params *CreateTaskQueueParams) (*TaskrouterV1WorkspaceTaskQueue, error) { - path := "/v1/Workspaces/{WorkspaceSid}/TaskQueues" + path := "/v1/Workspaces/{WorkspaceSid}/TaskQueues" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.AssignmentActivitySid != nil { - data.Set("AssignmentActivitySid", *params.AssignmentActivitySid) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.MaxReservedWorkers != nil { - data.Set("MaxReservedWorkers", fmt.Sprint(*params.MaxReservedWorkers)) - } - if params != nil && params.ReservationActivitySid != nil { - data.Set("ReservationActivitySid", *params.ReservationActivitySid) - } - if params != nil && params.TargetWorkers != nil { - data.Set("TargetWorkers", *params.TargetWorkers) - } - if params != nil && params.TaskOrder != nil { - data.Set("TaskOrder", *params.TaskOrder) - } + if params != nil && params.AssignmentActivitySid != nil { + data.Set("AssignmentActivitySid", *params.AssignmentActivitySid) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.MaxReservedWorkers != nil { + data.Set("MaxReservedWorkers", fmt.Sprint(*params.MaxReservedWorkers)) +} + if params != nil && params.ReservationActivitySid != nil { + data.Set("ReservationActivitySid", *params.ReservationActivitySid) +} + if params != nil && params.TargetWorkers != nil { + data.Set("TargetWorkers", *params.TargetWorkers) +} + if params != nil && params.TaskOrder != nil { + data.Set("TaskOrder", *params.TaskOrder) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &TaskrouterV1WorkspaceTaskQueue{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &TaskrouterV1WorkspaceTaskQueue{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateWorkerParams Optional parameters for the method 'CreateWorker' type CreateWorkerParams struct { - ActivitySid *string `json:"ActivitySid,omitempty"` - Attributes *string `json:"Attributes,omitempty"` + ActivitySid *string `json:"ActivitySid,omitempty"` + Attributes *string `json:"Attributes,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` } @@ -260,46 +260,46 @@ type CreateWorkerParams struct { * @param "Attributes" (string) - A valid JSON string that describes the new Worker. For example: `{ \\\"email\\\": \\\"Bob@example.com\\\", \\\"phone\\\": \\\"+5095551234\\\" }`. This data is passed to the `assignment_callback_url` when TaskRouter assigns a Task to the Worker. Defaults to {}. * @param "FriendlyName" (string) - A descriptive string that you create to describe the new Worker. It can be up to 64 characters long. * @return TaskrouterV1WorkspaceWorker - */ +*/ func (c *DefaultApiService) CreateWorker(WorkspaceSid string, params *CreateWorkerParams) (*TaskrouterV1WorkspaceWorker, error) { - path := "/v1/Workspaces/{WorkspaceSid}/Workers" + path := "/v1/Workspaces/{WorkspaceSid}/Workers" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.ActivitySid != nil { - data.Set("ActivitySid", *params.ActivitySid) - } - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } + if params != nil && params.ActivitySid != nil { + data.Set("ActivitySid", *params.ActivitySid) +} + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &TaskrouterV1WorkspaceWorker{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &TaskrouterV1WorkspaceWorker{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateWorkflowParams Optional parameters for the method 'CreateWorkflow' type CreateWorkflowParams struct { - AssignmentCallbackUrl *string `json:"AssignmentCallbackUrl,omitempty"` - Configuration *string `json:"Configuration,omitempty"` + AssignmentCallbackUrl *string `json:"AssignmentCallbackUrl,omitempty"` + Configuration *string `json:"Configuration,omitempty"` FallbackAssignmentCallbackUrl *string `json:"FallbackAssignmentCallbackUrl,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - TaskReservationTimeout *int32 `json:"TaskReservationTimeout,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + TaskReservationTimeout *int32 `json:"TaskReservationTimeout,omitempty"` } /* @@ -312,53 +312,53 @@ type CreateWorkflowParams struct { * @param "FriendlyName" (string) - A descriptive string that you create to describe the Workflow resource. For example, `Inbound Call Workflow` or `2014 Outbound Campaign`. * @param "TaskReservationTimeout" (int32) - How long TaskRouter will wait for a confirmation response from your application after it assigns a Task to a Worker. Can be up to `86,400` (24 hours) and the default is `120`. * @return TaskrouterV1WorkspaceWorkflow - */ +*/ func (c *DefaultApiService) CreateWorkflow(WorkspaceSid string, params *CreateWorkflowParams) (*TaskrouterV1WorkspaceWorkflow, error) { - path := "/v1/Workspaces/{WorkspaceSid}/Workflows" + path := "/v1/Workspaces/{WorkspaceSid}/Workflows" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.AssignmentCallbackUrl != nil { - data.Set("AssignmentCallbackUrl", *params.AssignmentCallbackUrl) - } - if params != nil && params.Configuration != nil { - data.Set("Configuration", *params.Configuration) - } - if params != nil && params.FallbackAssignmentCallbackUrl != nil { - data.Set("FallbackAssignmentCallbackUrl", *params.FallbackAssignmentCallbackUrl) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.TaskReservationTimeout != nil { - data.Set("TaskReservationTimeout", fmt.Sprint(*params.TaskReservationTimeout)) - } + if params != nil && params.AssignmentCallbackUrl != nil { + data.Set("AssignmentCallbackUrl", *params.AssignmentCallbackUrl) +} + if params != nil && params.Configuration != nil { + data.Set("Configuration", *params.Configuration) +} + if params != nil && params.FallbackAssignmentCallbackUrl != nil { + data.Set("FallbackAssignmentCallbackUrl", *params.FallbackAssignmentCallbackUrl) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.TaskReservationTimeout != nil { + data.Set("TaskReservationTimeout", fmt.Sprint(*params.TaskReservationTimeout)) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &TaskrouterV1WorkspaceWorkflow{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &TaskrouterV1WorkspaceWorkflow{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateWorkspaceParams Optional parameters for the method 'CreateWorkspace' type CreateWorkspaceParams struct { - EventCallbackUrl *string `json:"EventCallbackUrl,omitempty"` - EventsFilter *string `json:"EventsFilter,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - MultiTaskEnabled *bool `json:"MultiTaskEnabled,omitempty"` + EventCallbackUrl *string `json:"EventCallbackUrl,omitempty"` + EventsFilter *string `json:"EventsFilter,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + MultiTaskEnabled *bool `json:"MultiTaskEnabled,omitempty"` PrioritizeQueueOrder *string `json:"PrioritizeQueueOrder,omitempty"` - Template *string `json:"Template,omitempty"` + Template *string `json:"Template,omitempty"` } /* @@ -371,204 +371,219 @@ type CreateWorkspaceParams struct { * @param "PrioritizeQueueOrder" (string) - The type of TaskQueue to prioritize when Workers are receiving Tasks from both types of TaskQueues. Can be: `LIFO` or `FIFO` and the default is `FIFO`. For more information, see [Queue Ordering][https://www.twilio.com/docs/taskrouter/queue-ordering-last-first-out-lifo]. * @param "Template" (string) - An available template name. Can be: `NONE` or `FIFO` and the default is `NONE`. Pre-configures the Workspace with the Workflow and Activities specified in the template. `NONE` will create a Workspace with only a set of default activities. `FIFO` will configure TaskRouter with a set of default activities and a single TaskQueue for first-in, first-out distribution, which can be useful when you are getting started with TaskRouter. * @return TaskrouterV1Workspace - */ +*/ func (c *DefaultApiService) CreateWorkspace(params *CreateWorkspaceParams) (*TaskrouterV1Workspace, error) { - path := "/v1/Workspaces" + path := "/v1/Workspaces" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.EventCallbackUrl != nil { - data.Set("EventCallbackUrl", *params.EventCallbackUrl) - } - if params != nil && params.EventsFilter != nil { - data.Set("EventsFilter", *params.EventsFilter) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.MultiTaskEnabled != nil { - data.Set("MultiTaskEnabled", fmt.Sprint(*params.MultiTaskEnabled)) - } - if params != nil && params.PrioritizeQueueOrder != nil { - data.Set("PrioritizeQueueOrder", *params.PrioritizeQueueOrder) - } - if params != nil && params.Template != nil { - data.Set("Template", *params.Template) - } + if params != nil && params.EventCallbackUrl != nil { + data.Set("EventCallbackUrl", *params.EventCallbackUrl) +} + if params != nil && params.EventsFilter != nil { + data.Set("EventsFilter", *params.EventsFilter) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.MultiTaskEnabled != nil { + data.Set("MultiTaskEnabled", fmt.Sprint(*params.MultiTaskEnabled)) +} + if params != nil && params.PrioritizeQueueOrder != nil { + data.Set("PrioritizeQueueOrder", *params.PrioritizeQueueOrder) +} + if params != nil && params.Template != nil { + data.Set("Template", *params.Template) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &TaskrouterV1Workspace{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() + + ps := &TaskrouterV1Workspace{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * DeleteActivity Method for DeleteActivity * @param WorkspaceSid The SID of the Workspace with the Activity resources to delete. * @param Sid The SID of the Activity resource to delete. - */ -func (c *DefaultApiService) DeleteActivity(WorkspaceSid string, Sid string) error { - path := "/v1/Workspaces/{WorkspaceSid}/Activities/{Sid}" +*/ +func (c *DefaultApiService) DeleteActivity(WorkspaceSid string, Sid string, ) (error) { + path := "/v1/Workspaces/{WorkspaceSid}/Activities/{Sid}" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - return nil + defer resp.Body.Close() + + return nil } /* * DeleteTask Method for DeleteTask * @param WorkspaceSid The SID of the Workspace with the Task to delete. * @param Sid The SID of the Task resource to delete. - */ -func (c *DefaultApiService) DeleteTask(WorkspaceSid string, Sid string) error { - path := "/v1/Workspaces/{WorkspaceSid}/Tasks/{Sid}" +*/ +func (c *DefaultApiService) DeleteTask(WorkspaceSid string, Sid string, ) (error) { + path := "/v1/Workspaces/{WorkspaceSid}/Tasks/{Sid}" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* * DeleteTaskChannel Method for DeleteTaskChannel * @param WorkspaceSid The SID of the Workspace with the Task Channel to delete. * @param Sid The SID of the Task Channel resource to delete. - */ -func (c *DefaultApiService) DeleteTaskChannel(WorkspaceSid string, Sid string) error { - path := "/v1/Workspaces/{WorkspaceSid}/TaskChannels/{Sid}" +*/ +func (c *DefaultApiService) DeleteTaskChannel(WorkspaceSid string, Sid string, ) (error) { + path := "/v1/Workspaces/{WorkspaceSid}/TaskChannels/{Sid}" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - return nil + defer resp.Body.Close() + + return nil } /* * DeleteTaskQueue Method for DeleteTaskQueue * @param WorkspaceSid The SID of the Workspace with the TaskQueue to delete. * @param Sid The SID of the TaskQueue resource to delete. - */ -func (c *DefaultApiService) DeleteTaskQueue(WorkspaceSid string, Sid string) error { - path := "/v1/Workspaces/{WorkspaceSid}/TaskQueues/{Sid}" +*/ +func (c *DefaultApiService) DeleteTaskQueue(WorkspaceSid string, Sid string, ) (error) { + path := "/v1/Workspaces/{WorkspaceSid}/TaskQueues/{Sid}" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* * DeleteWorker Method for DeleteWorker * @param WorkspaceSid The SID of the Workspace with the Worker to delete. * @param Sid The SID of the Worker resource to delete. - */ -func (c *DefaultApiService) DeleteWorker(WorkspaceSid string, Sid string) error { - path := "/v1/Workspaces/{WorkspaceSid}/Workers/{Sid}" +*/ +func (c *DefaultApiService) DeleteWorker(WorkspaceSid string, Sid string, ) (error) { + path := "/v1/Workspaces/{WorkspaceSid}/Workers/{Sid}" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - return nil + defer resp.Body.Close() + + return nil } /* * DeleteWorkflow Method for DeleteWorkflow * @param WorkspaceSid The SID of the Workspace with the Workflow to delete. * @param Sid The SID of the Workflow resource to delete. - */ -func (c *DefaultApiService) DeleteWorkflow(WorkspaceSid string, Sid string) error { - path := "/v1/Workspaces/{WorkspaceSid}/Workflows/{Sid}" +*/ +func (c *DefaultApiService) DeleteWorkflow(WorkspaceSid string, Sid string, ) (error) { + path := "/v1/Workspaces/{WorkspaceSid}/Workflows/{Sid}" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* * DeleteWorkspace Method for DeleteWorkspace * @param Sid The SID of the Workspace resource to delete. - */ -func (c *DefaultApiService) DeleteWorkspace(Sid string) error { - path := "/v1/Workspaces/{Sid}" +*/ +func (c *DefaultApiService) DeleteWorkspace(Sid string, ) (error) { + path := "/v1/Workspaces/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - return nil + defer resp.Body.Close() + + return nil } /* @@ -576,28 +591,30 @@ func (c *DefaultApiService) DeleteWorkspace(Sid string) error { * @param WorkspaceSid The SID of the Workspace with the Activity resources to fetch. * @param Sid The SID of the Activity resource to fetch. * @return TaskrouterV1WorkspaceActivity - */ -func (c *DefaultApiService) FetchActivity(WorkspaceSid string, Sid string) (*TaskrouterV1WorkspaceActivity, error) { - path := "/v1/Workspaces/{WorkspaceSid}/Activities/{Sid}" +*/ +func (c *DefaultApiService) FetchActivity(WorkspaceSid string, Sid string, ) (*TaskrouterV1WorkspaceActivity, error) { + path := "/v1/Workspaces/{WorkspaceSid}/Activities/{Sid}" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &TaskrouterV1WorkspaceActivity{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &TaskrouterV1WorkspaceActivity{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -605,28 +622,30 @@ func (c *DefaultApiService) FetchActivity(WorkspaceSid string, Sid string) (*Tas * @param WorkspaceSid The SID of the Workspace with the Event to fetch. * @param Sid The SID of the Event resource to fetch. * @return TaskrouterV1WorkspaceEvent - */ -func (c *DefaultApiService) FetchEvent(WorkspaceSid string, Sid string) (*TaskrouterV1WorkspaceEvent, error) { - path := "/v1/Workspaces/{WorkspaceSid}/Events/{Sid}" +*/ +func (c *DefaultApiService) FetchEvent(WorkspaceSid string, Sid string, ) (*TaskrouterV1WorkspaceEvent, error) { + path := "/v1/Workspaces/{WorkspaceSid}/Events/{Sid}" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &TaskrouterV1WorkspaceEvent{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &TaskrouterV1WorkspaceEvent{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -634,28 +653,30 @@ func (c *DefaultApiService) FetchEvent(WorkspaceSid string, Sid string) (*Taskro * @param WorkspaceSid The SID of the Workspace with the Task to fetch. * @param Sid The SID of the Task resource to fetch. * @return TaskrouterV1WorkspaceTask - */ -func (c *DefaultApiService) FetchTask(WorkspaceSid string, Sid string) (*TaskrouterV1WorkspaceTask, error) { - path := "/v1/Workspaces/{WorkspaceSid}/Tasks/{Sid}" +*/ +func (c *DefaultApiService) FetchTask(WorkspaceSid string, Sid string, ) (*TaskrouterV1WorkspaceTask, error) { + path := "/v1/Workspaces/{WorkspaceSid}/Tasks/{Sid}" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &TaskrouterV1WorkspaceTask{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &TaskrouterV1WorkspaceTask{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -663,28 +684,30 @@ func (c *DefaultApiService) FetchTask(WorkspaceSid string, Sid string) (*Taskrou * @param WorkspaceSid The SID of the Workspace with the Task Channel to fetch. * @param Sid The SID of the Task Channel resource to fetch. * @return TaskrouterV1WorkspaceTaskChannel - */ -func (c *DefaultApiService) FetchTaskChannel(WorkspaceSid string, Sid string) (*TaskrouterV1WorkspaceTaskChannel, error) { - path := "/v1/Workspaces/{WorkspaceSid}/TaskChannels/{Sid}" +*/ +func (c *DefaultApiService) FetchTaskChannel(WorkspaceSid string, Sid string, ) (*TaskrouterV1WorkspaceTaskChannel, error) { + path := "/v1/Workspaces/{WorkspaceSid}/TaskChannels/{Sid}" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &TaskrouterV1WorkspaceTaskChannel{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &TaskrouterV1WorkspaceTaskChannel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -692,37 +715,38 @@ func (c *DefaultApiService) FetchTaskChannel(WorkspaceSid string, Sid string) (* * @param WorkspaceSid The SID of the Workspace with the TaskQueue to fetch. * @param Sid The SID of the TaskQueue resource to fetch. * @return TaskrouterV1WorkspaceTaskQueue - */ -func (c *DefaultApiService) FetchTaskQueue(WorkspaceSid string, Sid string) (*TaskrouterV1WorkspaceTaskQueue, error) { - path := "/v1/Workspaces/{WorkspaceSid}/TaskQueues/{Sid}" +*/ +func (c *DefaultApiService) FetchTaskQueue(WorkspaceSid string, Sid string, ) (*TaskrouterV1WorkspaceTaskQueue, error) { + path := "/v1/Workspaces/{WorkspaceSid}/TaskQueues/{Sid}" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &TaskrouterV1WorkspaceTaskQueue{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err -} + defer resp.Body.Close() + ps := &TaskrouterV1WorkspaceTaskQueue{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} // FetchTaskQueueCumulativeStatisticsParams Optional parameters for the method 'FetchTaskQueueCumulativeStatistics' type FetchTaskQueueCumulativeStatisticsParams struct { - EndDate *time.Time `json:"EndDate,omitempty"` - Minutes *int32 `json:"Minutes,omitempty"` - StartDate *time.Time `json:"StartDate,omitempty"` - TaskChannel *string `json:"TaskChannel,omitempty"` - SplitByWaitTime *string `json:"SplitByWaitTime,omitempty"` + EndDate *time.Time `json:"EndDate,omitempty"` + Minutes *int32 `json:"Minutes,omitempty"` + StartDate *time.Time `json:"StartDate,omitempty"` + TaskChannel *string `json:"TaskChannel,omitempty"` + SplitByWaitTime *string `json:"SplitByWaitTime,omitempty"` } /* @@ -736,46 +760,46 @@ type FetchTaskQueueCumulativeStatisticsParams struct { * @param "TaskChannel" (string) - Only calculate cumulative statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. * @param "SplitByWaitTime" (string) - A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on. For each threshold specified, the number of Tasks canceled and reservations accepted above and below the specified thresholds in seconds are computed. * @return TaskrouterV1WorkspaceTaskQueueTaskQueueCumulativeStatistics - */ +*/ func (c *DefaultApiService) FetchTaskQueueCumulativeStatistics(WorkspaceSid string, TaskQueueSid string, params *FetchTaskQueueCumulativeStatisticsParams) (*TaskrouterV1WorkspaceTaskQueueTaskQueueCumulativeStatistics, error) { - path := "/v1/Workspaces/{WorkspaceSid}/TaskQueues/{TaskQueueSid}/CumulativeStatistics" + path := "/v1/Workspaces/{WorkspaceSid}/TaskQueues/{TaskQueueSid}/CumulativeStatistics" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) path = strings.Replace(path, "{"+"TaskQueueSid"+"}", TaskQueueSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.EndDate != nil { - data.Set("EndDate", fmt.Sprint(*params.EndDate)) - } - if params != nil && params.Minutes != nil { - data.Set("Minutes", fmt.Sprint(*params.Minutes)) - } - if params != nil && params.StartDate != nil { - data.Set("StartDate", fmt.Sprint(*params.StartDate)) - } - if params != nil && params.TaskChannel != nil { - data.Set("TaskChannel", *params.TaskChannel) - } - if params != nil && params.SplitByWaitTime != nil { - data.Set("SplitByWaitTime", *params.SplitByWaitTime) - } + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) +} + if params != nil && params.Minutes != nil { + data.Set("Minutes", fmt.Sprint(*params.Minutes)) +} + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) +} + if params != nil && params.TaskChannel != nil { + data.Set("TaskChannel", *params.TaskChannel) +} + if params != nil && params.SplitByWaitTime != nil { + data.Set("SplitByWaitTime", *params.SplitByWaitTime) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &TaskrouterV1WorkspaceTaskQueueTaskQueueCumulativeStatistics{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &TaskrouterV1WorkspaceTaskQueueTaskQueueCumulativeStatistics{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // FetchTaskQueueRealTimeStatisticsParams Optional parameters for the method 'FetchTaskQueueRealTimeStatistics' type FetchTaskQueueRealTimeStatisticsParams struct { TaskChannel *string `json:"TaskChannel,omitempty"` @@ -788,41 +812,41 @@ type FetchTaskQueueRealTimeStatisticsParams struct { * @param optional nil or *FetchTaskQueueRealTimeStatisticsParams - Optional Parameters: * @param "TaskChannel" (string) - The TaskChannel for which to fetch statistics. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. * @return TaskrouterV1WorkspaceTaskQueueTaskQueueRealTimeStatistics - */ +*/ func (c *DefaultApiService) FetchTaskQueueRealTimeStatistics(WorkspaceSid string, TaskQueueSid string, params *FetchTaskQueueRealTimeStatisticsParams) (*TaskrouterV1WorkspaceTaskQueueTaskQueueRealTimeStatistics, error) { - path := "/v1/Workspaces/{WorkspaceSid}/TaskQueues/{TaskQueueSid}/RealTimeStatistics" + path := "/v1/Workspaces/{WorkspaceSid}/TaskQueues/{TaskQueueSid}/RealTimeStatistics" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) path = strings.Replace(path, "{"+"TaskQueueSid"+"}", TaskQueueSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.TaskChannel != nil { - data.Set("TaskChannel", *params.TaskChannel) - } + if params != nil && params.TaskChannel != nil { + data.Set("TaskChannel", *params.TaskChannel) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &TaskrouterV1WorkspaceTaskQueueTaskQueueRealTimeStatistics{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &TaskrouterV1WorkspaceTaskQueueTaskQueueRealTimeStatistics{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // FetchTaskQueueStatisticsParams Optional parameters for the method 'FetchTaskQueueStatistics' type FetchTaskQueueStatisticsParams struct { - EndDate *time.Time `json:"EndDate,omitempty"` - Minutes *int32 `json:"Minutes,omitempty"` - StartDate *time.Time `json:"StartDate,omitempty"` - TaskChannel *string `json:"TaskChannel,omitempty"` - SplitByWaitTime *string `json:"SplitByWaitTime,omitempty"` + EndDate *time.Time `json:"EndDate,omitempty"` + Minutes *int32 `json:"Minutes,omitempty"` + StartDate *time.Time `json:"StartDate,omitempty"` + TaskChannel *string `json:"TaskChannel,omitempty"` + SplitByWaitTime *string `json:"SplitByWaitTime,omitempty"` } /* @@ -836,44 +860,45 @@ type FetchTaskQueueStatisticsParams struct { * @param "TaskChannel" (string) - Only calculate real-time and cumulative statistics for the specified TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. * @param "SplitByWaitTime" (string) - A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on. For each threshold specified, the number of Tasks canceled and reservations accepted above and below the specified thresholds in seconds are computed. * @return TaskrouterV1WorkspaceTaskQueueTaskQueueStatistics - */ +*/ func (c *DefaultApiService) FetchTaskQueueStatistics(WorkspaceSid string, TaskQueueSid string, params *FetchTaskQueueStatisticsParams) (*TaskrouterV1WorkspaceTaskQueueTaskQueueStatistics, error) { - path := "/v1/Workspaces/{WorkspaceSid}/TaskQueues/{TaskQueueSid}/Statistics" + path := "/v1/Workspaces/{WorkspaceSid}/TaskQueues/{TaskQueueSid}/Statistics" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) path = strings.Replace(path, "{"+"TaskQueueSid"+"}", TaskQueueSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.EndDate != nil { - data.Set("EndDate", fmt.Sprint(*params.EndDate)) - } - if params != nil && params.Minutes != nil { - data.Set("Minutes", fmt.Sprint(*params.Minutes)) - } - if params != nil && params.StartDate != nil { - data.Set("StartDate", fmt.Sprint(*params.StartDate)) - } - if params != nil && params.TaskChannel != nil { - data.Set("TaskChannel", *params.TaskChannel) - } - if params != nil && params.SplitByWaitTime != nil { - data.Set("SplitByWaitTime", *params.SplitByWaitTime) - } + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) +} + if params != nil && params.Minutes != nil { + data.Set("Minutes", fmt.Sprint(*params.Minutes)) +} + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) +} + if params != nil && params.TaskChannel != nil { + data.Set("TaskChannel", *params.TaskChannel) +} + if params != nil && params.SplitByWaitTime != nil { + data.Set("SplitByWaitTime", *params.SplitByWaitTime) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &TaskrouterV1WorkspaceTaskQueueTaskQueueStatistics{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err + ps := &TaskrouterV1WorkspaceTaskQueueTaskQueueStatistics{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -882,29 +907,31 @@ func (c *DefaultApiService) FetchTaskQueueStatistics(WorkspaceSid string, TaskQu * @param TaskSid The SID of the reserved Task resource with the TaskReservation resource to fetch. * @param Sid The SID of the TaskReservation resource to fetch. * @return TaskrouterV1WorkspaceTaskTaskReservation - */ -func (c *DefaultApiService) FetchTaskReservation(WorkspaceSid string, TaskSid string, Sid string) (*TaskrouterV1WorkspaceTaskTaskReservation, error) { - path := "/v1/Workspaces/{WorkspaceSid}/Tasks/{TaskSid}/Reservations/{Sid}" +*/ +func (c *DefaultApiService) FetchTaskReservation(WorkspaceSid string, TaskSid string, Sid string, ) (*TaskrouterV1WorkspaceTaskTaskReservation, error) { + path := "/v1/Workspaces/{WorkspaceSid}/Tasks/{TaskSid}/Reservations/{Sid}" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) path = strings.Replace(path, "{"+"TaskSid"+"}", TaskSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &TaskrouterV1WorkspaceTaskTaskReservation{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &TaskrouterV1WorkspaceTaskTaskReservation{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -912,28 +939,30 @@ func (c *DefaultApiService) FetchTaskReservation(WorkspaceSid string, TaskSid st * @param WorkspaceSid The SID of the Workspace with the Worker to fetch. * @param Sid The SID of the Worker resource to fetch. * @return TaskrouterV1WorkspaceWorker - */ -func (c *DefaultApiService) FetchWorker(WorkspaceSid string, Sid string) (*TaskrouterV1WorkspaceWorker, error) { - path := "/v1/Workspaces/{WorkspaceSid}/Workers/{Sid}" +*/ +func (c *DefaultApiService) FetchWorker(WorkspaceSid string, Sid string, ) (*TaskrouterV1WorkspaceWorker, error) { + path := "/v1/Workspaces/{WorkspaceSid}/Workers/{Sid}" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &TaskrouterV1WorkspaceWorker{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &TaskrouterV1WorkspaceWorker{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -942,37 +971,38 @@ func (c *DefaultApiService) FetchWorker(WorkspaceSid string, Sid string) (*Taskr * @param WorkerSid The SID of the Worker with the WorkerChannel to fetch. * @param Sid The SID of the WorkerChannel to fetch. * @return TaskrouterV1WorkspaceWorkerWorkerChannel - */ -func (c *DefaultApiService) FetchWorkerChannel(WorkspaceSid string, WorkerSid string, Sid string) (*TaskrouterV1WorkspaceWorkerWorkerChannel, error) { - path := "/v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Channels/{Sid}" +*/ +func (c *DefaultApiService) FetchWorkerChannel(WorkspaceSid string, WorkerSid string, Sid string, ) (*TaskrouterV1WorkspaceWorkerWorkerChannel, error) { + path := "/v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Channels/{Sid}" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) path = strings.Replace(path, "{"+"WorkerSid"+"}", WorkerSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &TaskrouterV1WorkspaceWorkerWorkerChannel{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err -} + defer resp.Body.Close() + ps := &TaskrouterV1WorkspaceWorkerWorkerChannel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} // FetchWorkerInstanceStatisticsParams Optional parameters for the method 'FetchWorkerInstanceStatistics' type FetchWorkerInstanceStatisticsParams struct { - Minutes *int32 `json:"Minutes,omitempty"` - StartDate *time.Time `json:"StartDate,omitempty"` - EndDate *time.Time `json:"EndDate,omitempty"` - TaskChannel *string `json:"TaskChannel,omitempty"` + Minutes *int32 `json:"Minutes,omitempty"` + StartDate *time.Time `json:"StartDate,omitempty"` + EndDate *time.Time `json:"EndDate,omitempty"` + TaskChannel *string `json:"TaskChannel,omitempty"` } /* @@ -985,41 +1015,42 @@ type FetchWorkerInstanceStatisticsParams struct { * @param "EndDate" (time.Time) - Only include usage that occurred on or before this date, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time. * @param "TaskChannel" (string) - Only calculate statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. * @return TaskrouterV1WorkspaceWorkerWorkerInstanceStatistics - */ +*/ func (c *DefaultApiService) FetchWorkerInstanceStatistics(WorkspaceSid string, WorkerSid string, params *FetchWorkerInstanceStatisticsParams) (*TaskrouterV1WorkspaceWorkerWorkerInstanceStatistics, error) { - path := "/v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Statistics" + path := "/v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Statistics" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) path = strings.Replace(path, "{"+"WorkerSid"+"}", WorkerSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Minutes != nil { - data.Set("Minutes", fmt.Sprint(*params.Minutes)) - } - if params != nil && params.StartDate != nil { - data.Set("StartDate", fmt.Sprint(*params.StartDate)) - } - if params != nil && params.EndDate != nil { - data.Set("EndDate", fmt.Sprint(*params.EndDate)) - } - if params != nil && params.TaskChannel != nil { - data.Set("TaskChannel", *params.TaskChannel) - } + if params != nil && params.Minutes != nil { + data.Set("Minutes", fmt.Sprint(*params.Minutes)) +} + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) +} + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) +} + if params != nil && params.TaskChannel != nil { + data.Set("TaskChannel", *params.TaskChannel) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &TaskrouterV1WorkspaceWorkerWorkerInstanceStatistics{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() + + ps := &TaskrouterV1WorkspaceWorkerWorkerInstanceStatistics{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -1028,40 +1059,41 @@ func (c *DefaultApiService) FetchWorkerInstanceStatistics(WorkspaceSid string, W * @param WorkerSid The SID of the reserved Worker resource with the WorkerReservation resource to fetch. * @param Sid The SID of the WorkerReservation resource to fetch. * @return TaskrouterV1WorkspaceWorkerWorkerReservation - */ -func (c *DefaultApiService) FetchWorkerReservation(WorkspaceSid string, WorkerSid string, Sid string) (*TaskrouterV1WorkspaceWorkerWorkerReservation, error) { - path := "/v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Reservations/{Sid}" +*/ +func (c *DefaultApiService) FetchWorkerReservation(WorkspaceSid string, WorkerSid string, Sid string, ) (*TaskrouterV1WorkspaceWorkerWorkerReservation, error) { + path := "/v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Reservations/{Sid}" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) path = strings.Replace(path, "{"+"WorkerSid"+"}", WorkerSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &TaskrouterV1WorkspaceWorkerWorkerReservation{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err -} + defer resp.Body.Close() + + ps := &TaskrouterV1WorkspaceWorkerWorkerReservation{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // FetchWorkerStatisticsParams Optional parameters for the method 'FetchWorkerStatistics' type FetchWorkerStatisticsParams struct { - Minutes *int32 `json:"Minutes,omitempty"` - StartDate *time.Time `json:"StartDate,omitempty"` - EndDate *time.Time `json:"EndDate,omitempty"` - TaskQueueSid *string `json:"TaskQueueSid,omitempty"` - TaskQueueName *string `json:"TaskQueueName,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - TaskChannel *string `json:"TaskChannel,omitempty"` + Minutes *int32 `json:"Minutes,omitempty"` + StartDate *time.Time `json:"StartDate,omitempty"` + EndDate *time.Time `json:"EndDate,omitempty"` + TaskQueueSid *string `json:"TaskQueueSid,omitempty"` + TaskQueueName *string `json:"TaskQueueName,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + TaskChannel *string `json:"TaskChannel,omitempty"` } /* @@ -1076,57 +1108,57 @@ type FetchWorkerStatisticsParams struct { * @param "FriendlyName" (string) - Only include Workers with `friendly_name` values that match this parameter. * @param "TaskChannel" (string) - Only calculate statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. * @return TaskrouterV1WorkspaceWorkerWorkerStatistics - */ +*/ func (c *DefaultApiService) FetchWorkerStatistics(WorkspaceSid string, params *FetchWorkerStatisticsParams) (*TaskrouterV1WorkspaceWorkerWorkerStatistics, error) { - path := "/v1/Workspaces/{WorkspaceSid}/Workers/Statistics" + path := "/v1/Workspaces/{WorkspaceSid}/Workers/Statistics" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Minutes != nil { - data.Set("Minutes", fmt.Sprint(*params.Minutes)) - } - if params != nil && params.StartDate != nil { - data.Set("StartDate", fmt.Sprint(*params.StartDate)) - } - if params != nil && params.EndDate != nil { - data.Set("EndDate", fmt.Sprint(*params.EndDate)) - } - if params != nil && params.TaskQueueSid != nil { - data.Set("TaskQueueSid", *params.TaskQueueSid) - } - if params != nil && params.TaskQueueName != nil { - data.Set("TaskQueueName", *params.TaskQueueName) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.TaskChannel != nil { - data.Set("TaskChannel", *params.TaskChannel) - } + if params != nil && params.Minutes != nil { + data.Set("Minutes", fmt.Sprint(*params.Minutes)) +} + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) +} + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) +} + if params != nil && params.TaskQueueSid != nil { + data.Set("TaskQueueSid", *params.TaskQueueSid) +} + if params != nil && params.TaskQueueName != nil { + data.Set("TaskQueueName", *params.TaskQueueName) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.TaskChannel != nil { + data.Set("TaskChannel", *params.TaskChannel) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &TaskrouterV1WorkspaceWorkerWorkerStatistics{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &TaskrouterV1WorkspaceWorkerWorkerStatistics{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // FetchWorkersCumulativeStatisticsParams Optional parameters for the method 'FetchWorkersCumulativeStatistics' type FetchWorkersCumulativeStatisticsParams struct { - EndDate *time.Time `json:"EndDate,omitempty"` - Minutes *int32 `json:"Minutes,omitempty"` - StartDate *time.Time `json:"StartDate,omitempty"` - TaskChannel *string `json:"TaskChannel,omitempty"` + EndDate *time.Time `json:"EndDate,omitempty"` + Minutes *int32 `json:"Minutes,omitempty"` + StartDate *time.Time `json:"StartDate,omitempty"` + TaskChannel *string `json:"TaskChannel,omitempty"` } /* @@ -1138,42 +1170,42 @@ type FetchWorkersCumulativeStatisticsParams struct { * @param "StartDate" (time.Time) - Only calculate statistics from this date and time and later, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. * @param "TaskChannel" (string) - Only calculate cumulative statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. * @return TaskrouterV1WorkspaceWorkerWorkersCumulativeStatistics - */ +*/ func (c *DefaultApiService) FetchWorkersCumulativeStatistics(WorkspaceSid string, params *FetchWorkersCumulativeStatisticsParams) (*TaskrouterV1WorkspaceWorkerWorkersCumulativeStatistics, error) { - path := "/v1/Workspaces/{WorkspaceSid}/Workers/CumulativeStatistics" + path := "/v1/Workspaces/{WorkspaceSid}/Workers/CumulativeStatistics" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.EndDate != nil { - data.Set("EndDate", fmt.Sprint(*params.EndDate)) - } - if params != nil && params.Minutes != nil { - data.Set("Minutes", fmt.Sprint(*params.Minutes)) - } - if params != nil && params.StartDate != nil { - data.Set("StartDate", fmt.Sprint(*params.StartDate)) - } - if params != nil && params.TaskChannel != nil { - data.Set("TaskChannel", *params.TaskChannel) - } + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) +} + if params != nil && params.Minutes != nil { + data.Set("Minutes", fmt.Sprint(*params.Minutes)) +} + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) +} + if params != nil && params.TaskChannel != nil { + data.Set("TaskChannel", *params.TaskChannel) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &TaskrouterV1WorkspaceWorkerWorkersCumulativeStatistics{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &TaskrouterV1WorkspaceWorkerWorkersCumulativeStatistics{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // FetchWorkersRealTimeStatisticsParams Optional parameters for the method 'FetchWorkersRealTimeStatistics' type FetchWorkersRealTimeStatisticsParams struct { TaskChannel *string `json:"TaskChannel,omitempty"` @@ -1185,31 +1217,32 @@ type FetchWorkersRealTimeStatisticsParams struct { * @param optional nil or *FetchWorkersRealTimeStatisticsParams - Optional Parameters: * @param "TaskChannel" (string) - Only calculate real-time statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. * @return TaskrouterV1WorkspaceWorkerWorkersRealTimeStatistics - */ +*/ func (c *DefaultApiService) FetchWorkersRealTimeStatistics(WorkspaceSid string, params *FetchWorkersRealTimeStatisticsParams) (*TaskrouterV1WorkspaceWorkerWorkersRealTimeStatistics, error) { - path := "/v1/Workspaces/{WorkspaceSid}/Workers/RealTimeStatistics" + path := "/v1/Workspaces/{WorkspaceSid}/Workers/RealTimeStatistics" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.TaskChannel != nil { - data.Set("TaskChannel", *params.TaskChannel) - } + if params != nil && params.TaskChannel != nil { + data.Set("TaskChannel", *params.TaskChannel) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &TaskrouterV1WorkspaceWorkerWorkersRealTimeStatistics{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err + ps := &TaskrouterV1WorkspaceWorkerWorkersRealTimeStatistics{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -1217,37 +1250,38 @@ func (c *DefaultApiService) FetchWorkersRealTimeStatistics(WorkspaceSid string, * @param WorkspaceSid The SID of the Workspace with the Workflow to fetch. * @param Sid The SID of the Workflow resource to fetch. * @return TaskrouterV1WorkspaceWorkflow - */ -func (c *DefaultApiService) FetchWorkflow(WorkspaceSid string, Sid string) (*TaskrouterV1WorkspaceWorkflow, error) { - path := "/v1/Workspaces/{WorkspaceSid}/Workflows/{Sid}" +*/ +func (c *DefaultApiService) FetchWorkflow(WorkspaceSid string, Sid string, ) (*TaskrouterV1WorkspaceWorkflow, error) { + path := "/v1/Workspaces/{WorkspaceSid}/Workflows/{Sid}" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &TaskrouterV1WorkspaceWorkflow{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err -} + defer resp.Body.Close() + ps := &TaskrouterV1WorkspaceWorkflow{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} // FetchWorkflowCumulativeStatisticsParams Optional parameters for the method 'FetchWorkflowCumulativeStatistics' type FetchWorkflowCumulativeStatisticsParams struct { - EndDate *time.Time `json:"EndDate,omitempty"` - Minutes *int32 `json:"Minutes,omitempty"` - StartDate *time.Time `json:"StartDate,omitempty"` - TaskChannel *string `json:"TaskChannel,omitempty"` - SplitByWaitTime *string `json:"SplitByWaitTime,omitempty"` + EndDate *time.Time `json:"EndDate,omitempty"` + Minutes *int32 `json:"Minutes,omitempty"` + StartDate *time.Time `json:"StartDate,omitempty"` + TaskChannel *string `json:"TaskChannel,omitempty"` + SplitByWaitTime *string `json:"SplitByWaitTime,omitempty"` } /* @@ -1261,46 +1295,46 @@ type FetchWorkflowCumulativeStatisticsParams struct { * @param "TaskChannel" (string) - Only calculate cumulative statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. * @param "SplitByWaitTime" (string) - A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on. For each threshold specified, the number of Tasks canceled and reservations accepted above and below the specified thresholds in seconds are computed. For example, `5,30` would show splits of Tasks that were canceled or accepted before and after 5 seconds and before and after 30 seconds. This can be used to show short abandoned Tasks or Tasks that failed to meet an SLA. * @return TaskrouterV1WorkspaceWorkflowWorkflowCumulativeStatistics - */ +*/ func (c *DefaultApiService) FetchWorkflowCumulativeStatistics(WorkspaceSid string, WorkflowSid string, params *FetchWorkflowCumulativeStatisticsParams) (*TaskrouterV1WorkspaceWorkflowWorkflowCumulativeStatistics, error) { - path := "/v1/Workspaces/{WorkspaceSid}/Workflows/{WorkflowSid}/CumulativeStatistics" + path := "/v1/Workspaces/{WorkspaceSid}/Workflows/{WorkflowSid}/CumulativeStatistics" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) path = strings.Replace(path, "{"+"WorkflowSid"+"}", WorkflowSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.EndDate != nil { - data.Set("EndDate", fmt.Sprint(*params.EndDate)) - } - if params != nil && params.Minutes != nil { - data.Set("Minutes", fmt.Sprint(*params.Minutes)) - } - if params != nil && params.StartDate != nil { - data.Set("StartDate", fmt.Sprint(*params.StartDate)) - } - if params != nil && params.TaskChannel != nil { - data.Set("TaskChannel", *params.TaskChannel) - } - if params != nil && params.SplitByWaitTime != nil { - data.Set("SplitByWaitTime", *params.SplitByWaitTime) - } + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) +} + if params != nil && params.Minutes != nil { + data.Set("Minutes", fmt.Sprint(*params.Minutes)) +} + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) +} + if params != nil && params.TaskChannel != nil { + data.Set("TaskChannel", *params.TaskChannel) +} + if params != nil && params.SplitByWaitTime != nil { + data.Set("SplitByWaitTime", *params.SplitByWaitTime) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &TaskrouterV1WorkspaceWorkflowWorkflowCumulativeStatistics{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &TaskrouterV1WorkspaceWorkflowWorkflowCumulativeStatistics{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // FetchWorkflowRealTimeStatisticsParams Optional parameters for the method 'FetchWorkflowRealTimeStatistics' type FetchWorkflowRealTimeStatisticsParams struct { TaskChannel *string `json:"TaskChannel,omitempty"` @@ -1313,41 +1347,41 @@ type FetchWorkflowRealTimeStatisticsParams struct { * @param optional nil or *FetchWorkflowRealTimeStatisticsParams - Optional Parameters: * @param "TaskChannel" (string) - Only calculate real-time statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. * @return TaskrouterV1WorkspaceWorkflowWorkflowRealTimeStatistics - */ +*/ func (c *DefaultApiService) FetchWorkflowRealTimeStatistics(WorkspaceSid string, WorkflowSid string, params *FetchWorkflowRealTimeStatisticsParams) (*TaskrouterV1WorkspaceWorkflowWorkflowRealTimeStatistics, error) { - path := "/v1/Workspaces/{WorkspaceSid}/Workflows/{WorkflowSid}/RealTimeStatistics" + path := "/v1/Workspaces/{WorkspaceSid}/Workflows/{WorkflowSid}/RealTimeStatistics" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) path = strings.Replace(path, "{"+"WorkflowSid"+"}", WorkflowSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.TaskChannel != nil { - data.Set("TaskChannel", *params.TaskChannel) - } + if params != nil && params.TaskChannel != nil { + data.Set("TaskChannel", *params.TaskChannel) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &TaskrouterV1WorkspaceWorkflowWorkflowRealTimeStatistics{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &TaskrouterV1WorkspaceWorkflowWorkflowRealTimeStatistics{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // FetchWorkflowStatisticsParams Optional parameters for the method 'FetchWorkflowStatistics' type FetchWorkflowStatisticsParams struct { - Minutes *int32 `json:"Minutes,omitempty"` - StartDate *time.Time `json:"StartDate,omitempty"` - EndDate *time.Time `json:"EndDate,omitempty"` - TaskChannel *string `json:"TaskChannel,omitempty"` - SplitByWaitTime *string `json:"SplitByWaitTime,omitempty"` + Minutes *int32 `json:"Minutes,omitempty"` + StartDate *time.Time `json:"StartDate,omitempty"` + EndDate *time.Time `json:"EndDate,omitempty"` + TaskChannel *string `json:"TaskChannel,omitempty"` + SplitByWaitTime *string `json:"SplitByWaitTime,omitempty"` } /* @@ -1361,80 +1395,82 @@ type FetchWorkflowStatisticsParams struct { * @param "TaskChannel" (string) - Only calculate real-time statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. * @param "SplitByWaitTime" (string) - A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on. For each threshold specified, the number of Tasks canceled and reservations accepted above and below the specified thresholds in seconds are computed. For example, `5,30` would show splits of Tasks that were canceled or accepted before and after 5 seconds and before and after 30 seconds. This can be used to show short abandoned Tasks or Tasks that failed to meet an SLA. * @return TaskrouterV1WorkspaceWorkflowWorkflowStatistics - */ +*/ func (c *DefaultApiService) FetchWorkflowStatistics(WorkspaceSid string, WorkflowSid string, params *FetchWorkflowStatisticsParams) (*TaskrouterV1WorkspaceWorkflowWorkflowStatistics, error) { - path := "/v1/Workspaces/{WorkspaceSid}/Workflows/{WorkflowSid}/Statistics" + path := "/v1/Workspaces/{WorkspaceSid}/Workflows/{WorkflowSid}/Statistics" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) path = strings.Replace(path, "{"+"WorkflowSid"+"}", WorkflowSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Minutes != nil { - data.Set("Minutes", fmt.Sprint(*params.Minutes)) - } - if params != nil && params.StartDate != nil { - data.Set("StartDate", fmt.Sprint(*params.StartDate)) - } - if params != nil && params.EndDate != nil { - data.Set("EndDate", fmt.Sprint(*params.EndDate)) - } - if params != nil && params.TaskChannel != nil { - data.Set("TaskChannel", *params.TaskChannel) - } - if params != nil && params.SplitByWaitTime != nil { - data.Set("SplitByWaitTime", *params.SplitByWaitTime) - } + if params != nil && params.Minutes != nil { + data.Set("Minutes", fmt.Sprint(*params.Minutes)) +} + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) +} + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) +} + if params != nil && params.TaskChannel != nil { + data.Set("TaskChannel", *params.TaskChannel) +} + if params != nil && params.SplitByWaitTime != nil { + data.Set("SplitByWaitTime", *params.SplitByWaitTime) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &TaskrouterV1WorkspaceWorkflowWorkflowStatistics{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err + ps := &TaskrouterV1WorkspaceWorkflowWorkflowStatistics{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* * FetchWorkspace Method for FetchWorkspace * @param Sid The SID of the Workspace resource to fetch. * @return TaskrouterV1Workspace - */ -func (c *DefaultApiService) FetchWorkspace(Sid string) (*TaskrouterV1Workspace, error) { - path := "/v1/Workspaces/{Sid}" +*/ +func (c *DefaultApiService) FetchWorkspace(Sid string, ) (*TaskrouterV1Workspace, error) { + path := "/v1/Workspaces/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &TaskrouterV1Workspace{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err -} + defer resp.Body.Close() + ps := &TaskrouterV1Workspace{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} // FetchWorkspaceCumulativeStatisticsParams Optional parameters for the method 'FetchWorkspaceCumulativeStatistics' type FetchWorkspaceCumulativeStatisticsParams struct { - EndDate *time.Time `json:"EndDate,omitempty"` - Minutes *int32 `json:"Minutes,omitempty"` - StartDate *time.Time `json:"StartDate,omitempty"` - TaskChannel *string `json:"TaskChannel,omitempty"` - SplitByWaitTime *string `json:"SplitByWaitTime,omitempty"` + EndDate *time.Time `json:"EndDate,omitempty"` + Minutes *int32 `json:"Minutes,omitempty"` + StartDate *time.Time `json:"StartDate,omitempty"` + TaskChannel *string `json:"TaskChannel,omitempty"` + SplitByWaitTime *string `json:"SplitByWaitTime,omitempty"` } /* @@ -1447,45 +1483,45 @@ type FetchWorkspaceCumulativeStatisticsParams struct { * @param "TaskChannel" (string) - Only calculate cumulative statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. * @param "SplitByWaitTime" (string) - A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on. For each threshold specified, the number of Tasks canceled and reservations accepted above and below the specified thresholds in seconds are computed. For example, `5,30` would show splits of Tasks that were canceled or accepted before and after 5 seconds and before and after 30 seconds. This can be used to show short abandoned Tasks or Tasks that failed to meet an SLA. * @return TaskrouterV1WorkspaceWorkspaceCumulativeStatistics - */ +*/ func (c *DefaultApiService) FetchWorkspaceCumulativeStatistics(WorkspaceSid string, params *FetchWorkspaceCumulativeStatisticsParams) (*TaskrouterV1WorkspaceWorkspaceCumulativeStatistics, error) { - path := "/v1/Workspaces/{WorkspaceSid}/CumulativeStatistics" + path := "/v1/Workspaces/{WorkspaceSid}/CumulativeStatistics" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.EndDate != nil { - data.Set("EndDate", fmt.Sprint(*params.EndDate)) - } - if params != nil && params.Minutes != nil { - data.Set("Minutes", fmt.Sprint(*params.Minutes)) - } - if params != nil && params.StartDate != nil { - data.Set("StartDate", fmt.Sprint(*params.StartDate)) - } - if params != nil && params.TaskChannel != nil { - data.Set("TaskChannel", *params.TaskChannel) - } - if params != nil && params.SplitByWaitTime != nil { - data.Set("SplitByWaitTime", *params.SplitByWaitTime) - } + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) +} + if params != nil && params.Minutes != nil { + data.Set("Minutes", fmt.Sprint(*params.Minutes)) +} + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) +} + if params != nil && params.TaskChannel != nil { + data.Set("TaskChannel", *params.TaskChannel) +} + if params != nil && params.SplitByWaitTime != nil { + data.Set("SplitByWaitTime", *params.SplitByWaitTime) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &TaskrouterV1WorkspaceWorkspaceCumulativeStatistics{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &TaskrouterV1WorkspaceWorkspaceCumulativeStatistics{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // FetchWorkspaceRealTimeStatisticsParams Optional parameters for the method 'FetchWorkspaceRealTimeStatistics' type FetchWorkspaceRealTimeStatisticsParams struct { TaskChannel *string `json:"TaskChannel,omitempty"` @@ -1497,40 +1533,40 @@ type FetchWorkspaceRealTimeStatisticsParams struct { * @param optional nil or *FetchWorkspaceRealTimeStatisticsParams - Optional Parameters: * @param "TaskChannel" (string) - Only calculate real-time statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. * @return TaskrouterV1WorkspaceWorkspaceRealTimeStatistics - */ +*/ func (c *DefaultApiService) FetchWorkspaceRealTimeStatistics(WorkspaceSid string, params *FetchWorkspaceRealTimeStatisticsParams) (*TaskrouterV1WorkspaceWorkspaceRealTimeStatistics, error) { - path := "/v1/Workspaces/{WorkspaceSid}/RealTimeStatistics" + path := "/v1/Workspaces/{WorkspaceSid}/RealTimeStatistics" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.TaskChannel != nil { - data.Set("TaskChannel", *params.TaskChannel) - } + if params != nil && params.TaskChannel != nil { + data.Set("TaskChannel", *params.TaskChannel) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &TaskrouterV1WorkspaceWorkspaceRealTimeStatistics{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &TaskrouterV1WorkspaceWorkspaceRealTimeStatistics{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // FetchWorkspaceStatisticsParams Optional parameters for the method 'FetchWorkspaceStatistics' type FetchWorkspaceStatisticsParams struct { - Minutes *int32 `json:"Minutes,omitempty"` - StartDate *time.Time `json:"StartDate,omitempty"` - EndDate *time.Time `json:"EndDate,omitempty"` - TaskChannel *string `json:"TaskChannel,omitempty"` - SplitByWaitTime *string `json:"SplitByWaitTime,omitempty"` + Minutes *int32 `json:"Minutes,omitempty"` + StartDate *time.Time `json:"StartDate,omitempty"` + EndDate *time.Time `json:"EndDate,omitempty"` + TaskChannel *string `json:"TaskChannel,omitempty"` + SplitByWaitTime *string `json:"SplitByWaitTime,omitempty"` } /* @@ -1543,50 +1579,50 @@ type FetchWorkspaceStatisticsParams struct { * @param "TaskChannel" (string) - Only calculate statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. * @param "SplitByWaitTime" (string) - A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on. For each threshold specified, the number of Tasks canceled and reservations accepted above and below the specified thresholds in seconds are computed. For example, `5,30` would show splits of Tasks that were canceled or accepted before and after 5 seconds and before and after 30 seconds. This can be used to show short abandoned Tasks or Tasks that failed to meet an SLA. * @return TaskrouterV1WorkspaceWorkspaceStatistics - */ +*/ func (c *DefaultApiService) FetchWorkspaceStatistics(WorkspaceSid string, params *FetchWorkspaceStatisticsParams) (*TaskrouterV1WorkspaceWorkspaceStatistics, error) { - path := "/v1/Workspaces/{WorkspaceSid}/Statistics" + path := "/v1/Workspaces/{WorkspaceSid}/Statistics" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Minutes != nil { - data.Set("Minutes", fmt.Sprint(*params.Minutes)) - } - if params != nil && params.StartDate != nil { - data.Set("StartDate", fmt.Sprint(*params.StartDate)) - } - if params != nil && params.EndDate != nil { - data.Set("EndDate", fmt.Sprint(*params.EndDate)) - } - if params != nil && params.TaskChannel != nil { - data.Set("TaskChannel", *params.TaskChannel) - } - if params != nil && params.SplitByWaitTime != nil { - data.Set("SplitByWaitTime", *params.SplitByWaitTime) - } + if params != nil && params.Minutes != nil { + data.Set("Minutes", fmt.Sprint(*params.Minutes)) +} + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) +} + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) +} + if params != nil && params.TaskChannel != nil { + data.Set("TaskChannel", *params.TaskChannel) +} + if params != nil && params.SplitByWaitTime != nil { + data.Set("SplitByWaitTime", *params.SplitByWaitTime) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &TaskrouterV1WorkspaceWorkspaceStatistics{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &TaskrouterV1WorkspaceWorkspaceStatistics{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListActivityParams Optional parameters for the method 'ListActivity' type ListActivityParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` - Available *string `json:"Available,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + Available *string `json:"Available,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -1597,53 +1633,53 @@ type ListActivityParams struct { * @param "Available" (string) - Whether return only Activity resources that are available or unavailable. A value of `true` returns only available activities. Values of '1' or `yes` also indicate `true`. All other values represent `false` and return activities that are unavailable. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListActivityResponse - */ +*/ func (c *DefaultApiService) ListActivity(WorkspaceSid string, params *ListActivityParams) (*ListActivityResponse, error) { - path := "/v1/Workspaces/{WorkspaceSid}/Activities" + path := "/v1/Workspaces/{WorkspaceSid}/Activities" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.Available != nil { - data.Set("Available", *params.Available) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.Available != nil { + data.Set("Available", *params.Available) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListActivityResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListActivityResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListEventParams Optional parameters for the method 'ListEvent' type ListEventParams struct { - EndDate *time.Time `json:"EndDate,omitempty"` - EventType *string `json:"EventType,omitempty"` - Minutes *int32 `json:"Minutes,omitempty"` - ReservationSid *string `json:"ReservationSid,omitempty"` - StartDate *time.Time `json:"StartDate,omitempty"` - TaskQueueSid *string `json:"TaskQueueSid,omitempty"` - TaskSid *string `json:"TaskSid,omitempty"` - WorkerSid *string `json:"WorkerSid,omitempty"` - WorkflowSid *string `json:"WorkflowSid,omitempty"` - TaskChannel *string `json:"TaskChannel,omitempty"` - Sid *string `json:"Sid,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + EndDate *time.Time `json:"EndDate,omitempty"` + EventType *string `json:"EventType,omitempty"` + Minutes *int32 `json:"Minutes,omitempty"` + ReservationSid *string `json:"ReservationSid,omitempty"` + StartDate *time.Time `json:"StartDate,omitempty"` + TaskQueueSid *string `json:"TaskQueueSid,omitempty"` + TaskSid *string `json:"TaskSid,omitempty"` + WorkerSid *string `json:"WorkerSid,omitempty"` + WorkflowSid *string `json:"WorkflowSid,omitempty"` + TaskChannel *string `json:"TaskChannel,omitempty"` + Sid *string `json:"Sid,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -1663,78 +1699,78 @@ type ListEventParams struct { * @param "Sid" (string) - The SID of the Event resource to read. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListEventResponse - */ +*/ func (c *DefaultApiService) ListEvent(WorkspaceSid string, params *ListEventParams) (*ListEventResponse, error) { - path := "/v1/Workspaces/{WorkspaceSid}/Events" + path := "/v1/Workspaces/{WorkspaceSid}/Events" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.EndDate != nil { - data.Set("EndDate", fmt.Sprint(*params.EndDate)) - } - if params != nil && params.EventType != nil { - data.Set("EventType", *params.EventType) - } - if params != nil && params.Minutes != nil { - data.Set("Minutes", fmt.Sprint(*params.Minutes)) - } - if params != nil && params.ReservationSid != nil { - data.Set("ReservationSid", *params.ReservationSid) - } - if params != nil && params.StartDate != nil { - data.Set("StartDate", fmt.Sprint(*params.StartDate)) - } - if params != nil && params.TaskQueueSid != nil { - data.Set("TaskQueueSid", *params.TaskQueueSid) - } - if params != nil && params.TaskSid != nil { - data.Set("TaskSid", *params.TaskSid) - } - if params != nil && params.WorkerSid != nil { - data.Set("WorkerSid", *params.WorkerSid) - } - if params != nil && params.WorkflowSid != nil { - data.Set("WorkflowSid", *params.WorkflowSid) - } - if params != nil && params.TaskChannel != nil { - data.Set("TaskChannel", *params.TaskChannel) - } - if params != nil && params.Sid != nil { - data.Set("Sid", *params.Sid) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) +} + if params != nil && params.EventType != nil { + data.Set("EventType", *params.EventType) +} + if params != nil && params.Minutes != nil { + data.Set("Minutes", fmt.Sprint(*params.Minutes)) +} + if params != nil && params.ReservationSid != nil { + data.Set("ReservationSid", *params.ReservationSid) +} + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) +} + if params != nil && params.TaskQueueSid != nil { + data.Set("TaskQueueSid", *params.TaskQueueSid) +} + if params != nil && params.TaskSid != nil { + data.Set("TaskSid", *params.TaskSid) +} + if params != nil && params.WorkerSid != nil { + data.Set("WorkerSid", *params.WorkerSid) +} + if params != nil && params.WorkflowSid != nil { + data.Set("WorkflowSid", *params.WorkflowSid) +} + if params != nil && params.TaskChannel != nil { + data.Set("TaskChannel", *params.TaskChannel) +} + if params != nil && params.Sid != nil { + data.Set("Sid", *params.Sid) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListEventResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListEventResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListTaskParams Optional parameters for the method 'ListTask' type ListTaskParams struct { - Priority *int32 `json:"Priority,omitempty"` - AssignmentStatus *[]string `json:"AssignmentStatus,omitempty"` - WorkflowSid *string `json:"WorkflowSid,omitempty"` - WorkflowName *string `json:"WorkflowName,omitempty"` - TaskQueueSid *string `json:"TaskQueueSid,omitempty"` - TaskQueueName *string `json:"TaskQueueName,omitempty"` - EvaluateTaskAttributes *string `json:"EvaluateTaskAttributes,omitempty"` - Ordering *string `json:"Ordering,omitempty"` - HasAddons *bool `json:"HasAddons,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + Priority *int32 `json:"Priority,omitempty"` + AssignmentStatus *[]string `json:"AssignmentStatus,omitempty"` + WorkflowSid *string `json:"WorkflowSid,omitempty"` + WorkflowName *string `json:"WorkflowName,omitempty"` + TaskQueueSid *string `json:"TaskQueueSid,omitempty"` + TaskQueueName *string `json:"TaskQueueName,omitempty"` + EvaluateTaskAttributes *string `json:"EvaluateTaskAttributes,omitempty"` + Ordering *string `json:"Ordering,omitempty"` + HasAddons *bool `json:"HasAddons,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -1752,60 +1788,60 @@ type ListTaskParams struct { * @param "HasAddons" (bool) - Whether to read Tasks with addons. If `true`, returns only Tasks with addons. If `false`, returns only Tasks without addons. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListTaskResponse - */ +*/ func (c *DefaultApiService) ListTask(WorkspaceSid string, params *ListTaskParams) (*ListTaskResponse, error) { - path := "/v1/Workspaces/{WorkspaceSid}/Tasks" + path := "/v1/Workspaces/{WorkspaceSid}/Tasks" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Priority != nil { - data.Set("Priority", fmt.Sprint(*params.Priority)) - } - if params != nil && params.AssignmentStatus != nil { - data.Set("AssignmentStatus", strings.Join(*params.AssignmentStatus, ",")) - } - if params != nil && params.WorkflowSid != nil { - data.Set("WorkflowSid", *params.WorkflowSid) - } - if params != nil && params.WorkflowName != nil { - data.Set("WorkflowName", *params.WorkflowName) - } - if params != nil && params.TaskQueueSid != nil { - data.Set("TaskQueueSid", *params.TaskQueueSid) - } - if params != nil && params.TaskQueueName != nil { - data.Set("TaskQueueName", *params.TaskQueueName) - } - if params != nil && params.EvaluateTaskAttributes != nil { - data.Set("EvaluateTaskAttributes", *params.EvaluateTaskAttributes) - } - if params != nil && params.Ordering != nil { - data.Set("Ordering", *params.Ordering) - } - if params != nil && params.HasAddons != nil { - data.Set("HasAddons", fmt.Sprint(*params.HasAddons)) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.Priority != nil { + data.Set("Priority", fmt.Sprint(*params.Priority)) +} + if params != nil && params.AssignmentStatus != nil { + data.Set("AssignmentStatus", strings.Join(*params.AssignmentStatus, ",")) +} + if params != nil && params.WorkflowSid != nil { + data.Set("WorkflowSid", *params.WorkflowSid) +} + if params != nil && params.WorkflowName != nil { + data.Set("WorkflowName", *params.WorkflowName) +} + if params != nil && params.TaskQueueSid != nil { + data.Set("TaskQueueSid", *params.TaskQueueSid) +} + if params != nil && params.TaskQueueName != nil { + data.Set("TaskQueueName", *params.TaskQueueName) +} + if params != nil && params.EvaluateTaskAttributes != nil { + data.Set("EvaluateTaskAttributes", *params.EvaluateTaskAttributes) +} + if params != nil && params.Ordering != nil { + data.Set("Ordering", *params.Ordering) +} + if params != nil && params.HasAddons != nil { + data.Set("HasAddons", fmt.Sprint(*params.HasAddons)) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListTaskResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListTaskResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListTaskChannelParams Optional parameters for the method 'ListTaskChannel' type ListTaskChannelParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1817,39 +1853,39 @@ type ListTaskChannelParams struct { * @param optional nil or *ListTaskChannelParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListTaskChannelResponse - */ +*/ func (c *DefaultApiService) ListTaskChannel(WorkspaceSid string, params *ListTaskChannelParams) (*ListTaskChannelResponse, error) { - path := "/v1/Workspaces/{WorkspaceSid}/TaskChannels" + path := "/v1/Workspaces/{WorkspaceSid}/TaskChannels" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListTaskChannelResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListTaskChannelResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListTaskQueueParams Optional parameters for the method 'ListTaskQueue' type ListTaskQueueParams struct { - FriendlyName *string `json:"FriendlyName,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` EvaluateWorkerAttributes *string `json:"EvaluateWorkerAttributes,omitempty"` - WorkerSid *string `json:"WorkerSid,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + WorkerSid *string `json:"WorkerSid,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -1861,51 +1897,51 @@ type ListTaskQueueParams struct { * @param "WorkerSid" (string) - The SID of the Worker with the TaskQueue resources to read. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListTaskQueueResponse - */ +*/ func (c *DefaultApiService) ListTaskQueue(WorkspaceSid string, params *ListTaskQueueParams) (*ListTaskQueueResponse, error) { - path := "/v1/Workspaces/{WorkspaceSid}/TaskQueues" + path := "/v1/Workspaces/{WorkspaceSid}/TaskQueues" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.EvaluateWorkerAttributes != nil { - data.Set("EvaluateWorkerAttributes", *params.EvaluateWorkerAttributes) - } - if params != nil && params.WorkerSid != nil { - data.Set("WorkerSid", *params.WorkerSid) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.EvaluateWorkerAttributes != nil { + data.Set("EvaluateWorkerAttributes", *params.EvaluateWorkerAttributes) +} + if params != nil && params.WorkerSid != nil { + data.Set("WorkerSid", *params.WorkerSid) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListTaskQueueResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListTaskQueueResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListTaskQueuesStatisticsParams Optional parameters for the method 'ListTaskQueuesStatistics' type ListTaskQueuesStatisticsParams struct { - EndDate *time.Time `json:"EndDate,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Minutes *int32 `json:"Minutes,omitempty"` - StartDate *time.Time `json:"StartDate,omitempty"` - TaskChannel *string `json:"TaskChannel,omitempty"` - SplitByWaitTime *string `json:"SplitByWaitTime,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + EndDate *time.Time `json:"EndDate,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Minutes *int32 `json:"Minutes,omitempty"` + StartDate *time.Time `json:"StartDate,omitempty"` + TaskChannel *string `json:"TaskChannel,omitempty"` + SplitByWaitTime *string `json:"SplitByWaitTime,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -1920,55 +1956,55 @@ type ListTaskQueuesStatisticsParams struct { * @param "SplitByWaitTime" (string) - A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on. For each threshold specified, the number of Tasks canceled and reservations accepted above and below the specified thresholds in seconds are computed. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListTaskQueuesStatisticsResponse - */ +*/ func (c *DefaultApiService) ListTaskQueuesStatistics(WorkspaceSid string, params *ListTaskQueuesStatisticsParams) (*ListTaskQueuesStatisticsResponse, error) { - path := "/v1/Workspaces/{WorkspaceSid}/TaskQueues/Statistics" + path := "/v1/Workspaces/{WorkspaceSid}/TaskQueues/Statistics" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.EndDate != nil { - data.Set("EndDate", fmt.Sprint(*params.EndDate)) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.Minutes != nil { - data.Set("Minutes", fmt.Sprint(*params.Minutes)) - } - if params != nil && params.StartDate != nil { - data.Set("StartDate", fmt.Sprint(*params.StartDate)) - } - if params != nil && params.TaskChannel != nil { - data.Set("TaskChannel", *params.TaskChannel) - } - if params != nil && params.SplitByWaitTime != nil { - data.Set("SplitByWaitTime", *params.SplitByWaitTime) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.Minutes != nil { + data.Set("Minutes", fmt.Sprint(*params.Minutes)) +} + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) +} + if params != nil && params.TaskChannel != nil { + data.Set("TaskChannel", *params.TaskChannel) +} + if params != nil && params.SplitByWaitTime != nil { + data.Set("SplitByWaitTime", *params.SplitByWaitTime) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListTaskQueuesStatisticsResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListTaskQueuesStatisticsResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListTaskReservationParams Optional parameters for the method 'ListTaskReservation' type ListTaskReservationParams struct { ReservationStatus *string `json:"ReservationStatus,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -1979,47 +2015,47 @@ type ListTaskReservationParams struct { * @param "ReservationStatus" (string) - Returns the list of reservations for a task with a specified ReservationStatus. Can be: `pending`, `accepted`, `rejected`, or `timeout`. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListTaskReservationResponse - */ +*/ func (c *DefaultApiService) ListTaskReservation(WorkspaceSid string, TaskSid string, params *ListTaskReservationParams) (*ListTaskReservationResponse, error) { - path := "/v1/Workspaces/{WorkspaceSid}/Tasks/{TaskSid}/Reservations" + path := "/v1/Workspaces/{WorkspaceSid}/Tasks/{TaskSid}/Reservations" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) path = strings.Replace(path, "{"+"TaskSid"+"}", TaskSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.ReservationStatus != nil { - data.Set("ReservationStatus", *params.ReservationStatus) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.ReservationStatus != nil { + data.Set("ReservationStatus", *params.ReservationStatus) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListTaskReservationResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListTaskReservationResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListWorkerParams Optional parameters for the method 'ListWorker' type ListWorkerParams struct { - ActivityName *string `json:"ActivityName,omitempty"` - ActivitySid *string `json:"ActivitySid,omitempty"` - Available *string `json:"Available,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` + ActivityName *string `json:"ActivityName,omitempty"` + ActivitySid *string `json:"ActivitySid,omitempty"` + Available *string `json:"Available,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` TargetWorkersExpression *string `json:"TargetWorkersExpression,omitempty"` - TaskQueueName *string `json:"TaskQueueName,omitempty"` - TaskQueueSid *string `json:"TaskQueueSid,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + TaskQueueName *string `json:"TaskQueueName,omitempty"` + TaskQueueSid *string `json:"TaskQueueSid,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -2035,54 +2071,54 @@ type ListWorkerParams struct { * @param "TaskQueueSid" (string) - The SID of the TaskQueue that the Workers to read are eligible for. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListWorkerResponse - */ +*/ func (c *DefaultApiService) ListWorker(WorkspaceSid string, params *ListWorkerParams) (*ListWorkerResponse, error) { - path := "/v1/Workspaces/{WorkspaceSid}/Workers" + path := "/v1/Workspaces/{WorkspaceSid}/Workers" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.ActivityName != nil { - data.Set("ActivityName", *params.ActivityName) - } - if params != nil && params.ActivitySid != nil { - data.Set("ActivitySid", *params.ActivitySid) - } - if params != nil && params.Available != nil { - data.Set("Available", *params.Available) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.TargetWorkersExpression != nil { - data.Set("TargetWorkersExpression", *params.TargetWorkersExpression) - } - if params != nil && params.TaskQueueName != nil { - data.Set("TaskQueueName", *params.TaskQueueName) - } - if params != nil && params.TaskQueueSid != nil { - data.Set("TaskQueueSid", *params.TaskQueueSid) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.ActivityName != nil { + data.Set("ActivityName", *params.ActivityName) +} + if params != nil && params.ActivitySid != nil { + data.Set("ActivitySid", *params.ActivitySid) +} + if params != nil && params.Available != nil { + data.Set("Available", *params.Available) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.TargetWorkersExpression != nil { + data.Set("TargetWorkersExpression", *params.TargetWorkersExpression) +} + if params != nil && params.TaskQueueName != nil { + data.Set("TaskQueueName", *params.TaskQueueName) +} + if params != nil && params.TaskQueueSid != nil { + data.Set("TaskQueueSid", *params.TaskQueueSid) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListWorkerResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListWorkerResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListWorkerChannelParams Optional parameters for the method 'ListWorkerChannel' type ListWorkerChannelParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -2095,38 +2131,38 @@ type ListWorkerChannelParams struct { * @param optional nil or *ListWorkerChannelParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListWorkerChannelResponse - */ +*/ func (c *DefaultApiService) ListWorkerChannel(WorkspaceSid string, WorkerSid string, params *ListWorkerChannelParams) (*ListWorkerChannelResponse, error) { - path := "/v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Channels" + path := "/v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Channels" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) path = strings.Replace(path, "{"+"WorkerSid"+"}", WorkerSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListWorkerChannelResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListWorkerChannelResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListWorkerReservationParams Optional parameters for the method 'ListWorkerReservation' type ListWorkerReservationParams struct { ReservationStatus *string `json:"ReservationStatus,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -2137,41 +2173,41 @@ type ListWorkerReservationParams struct { * @param "ReservationStatus" (string) - Returns the list of reservations for a worker with a specified ReservationStatus. Can be: `pending`, `accepted`, `rejected`, `timeout`, `canceled`, or `rescinded`. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListWorkerReservationResponse - */ +*/ func (c *DefaultApiService) ListWorkerReservation(WorkspaceSid string, WorkerSid string, params *ListWorkerReservationParams) (*ListWorkerReservationResponse, error) { - path := "/v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Reservations" + path := "/v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Reservations" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) path = strings.Replace(path, "{"+"WorkerSid"+"}", WorkerSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.ReservationStatus != nil { - data.Set("ReservationStatus", *params.ReservationStatus) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.ReservationStatus != nil { + data.Set("ReservationStatus", *params.ReservationStatus) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListWorkerReservationResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListWorkerReservationResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListWorkflowParams Optional parameters for the method 'ListWorkflow' type ListWorkflowParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -2181,40 +2217,40 @@ type ListWorkflowParams struct { * @param "FriendlyName" (string) - The `friendly_name` of the Workflow resources to read. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListWorkflowResponse - */ +*/ func (c *DefaultApiService) ListWorkflow(WorkspaceSid string, params *ListWorkflowParams) (*ListWorkflowResponse, error) { - path := "/v1/Workspaces/{WorkspaceSid}/Workflows" + path := "/v1/Workspaces/{WorkspaceSid}/Workflows" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListWorkflowResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListWorkflowResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListWorkspaceParams Optional parameters for the method 'ListWorkspace' type ListWorkspaceParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -2223,35 +2259,35 @@ type ListWorkspaceParams struct { * @param "FriendlyName" (string) - The `friendly_name` of the Workspace resources to read. For example `Customer Support` or `2014 Election Campaign`. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListWorkspaceResponse - */ +*/ func (c *DefaultApiService) ListWorkspace(params *ListWorkspaceParams) (*ListWorkspaceResponse, error) { - path := "/v1/Workspaces" + path := "/v1/Workspaces" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListWorkspaceResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListWorkspaceResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateActivityParams Optional parameters for the method 'UpdateActivity' type UpdateActivityParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` @@ -2264,41 +2300,41 @@ type UpdateActivityParams struct { * @param optional nil or *UpdateActivityParams - Optional Parameters: * @param "FriendlyName" (string) - A descriptive string that you create to describe the Activity resource. It can be up to 64 characters long. These names are used to calculate and expose statistics about Workers, and provide visibility into the state of each Worker. Examples of friendly names include: `on-call`, `break`, and `email`. * @return TaskrouterV1WorkspaceActivity - */ +*/ func (c *DefaultApiService) UpdateActivity(WorkspaceSid string, Sid string, params *UpdateActivityParams) (*TaskrouterV1WorkspaceActivity, error) { - path := "/v1/Workspaces/{WorkspaceSid}/Activities/{Sid}" + path := "/v1/Workspaces/{WorkspaceSid}/Activities/{Sid}" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &TaskrouterV1WorkspaceActivity{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &TaskrouterV1WorkspaceActivity{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateTaskParams Optional parameters for the method 'UpdateTask' type UpdateTaskParams struct { AssignmentStatus *string `json:"AssignmentStatus,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - Priority *int32 `json:"Priority,omitempty"` - Reason *string `json:"Reason,omitempty"` - TaskChannel *string `json:"TaskChannel,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + Priority *int32 `json:"Priority,omitempty"` + Reason *string `json:"Reason,omitempty"` + TaskChannel *string `json:"TaskChannel,omitempty"` } /* @@ -2312,50 +2348,50 @@ type UpdateTaskParams struct { * @param "Reason" (string) - The reason that the Task was canceled or completed. This parameter is required only if the Task is canceled or completed. Setting this value queues the task for deletion and logs the reason. * @param "TaskChannel" (string) - When MultiTasking is enabled, specify the TaskChannel with the task to update. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. * @return TaskrouterV1WorkspaceTask - */ +*/ func (c *DefaultApiService) UpdateTask(WorkspaceSid string, Sid string, params *UpdateTaskParams) (*TaskrouterV1WorkspaceTask, error) { - path := "/v1/Workspaces/{WorkspaceSid}/Tasks/{Sid}" + path := "/v1/Workspaces/{WorkspaceSid}/Tasks/{Sid}" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.AssignmentStatus != nil { - data.Set("AssignmentStatus", *params.AssignmentStatus) - } - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) - } - if params != nil && params.Priority != nil { - data.Set("Priority", fmt.Sprint(*params.Priority)) - } - if params != nil && params.Reason != nil { - data.Set("Reason", *params.Reason) - } - if params != nil && params.TaskChannel != nil { - data.Set("TaskChannel", *params.TaskChannel) - } + if params != nil && params.AssignmentStatus != nil { + data.Set("AssignmentStatus", *params.AssignmentStatus) +} + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) +} + if params != nil && params.Priority != nil { + data.Set("Priority", fmt.Sprint(*params.Priority)) +} + if params != nil && params.Reason != nil { + data.Set("Reason", *params.Reason) +} + if params != nil && params.TaskChannel != nil { + data.Set("TaskChannel", *params.TaskChannel) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &TaskrouterV1WorkspaceTask{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &TaskrouterV1WorkspaceTask{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateTaskChannelParams Optional parameters for the method 'UpdateTaskChannel' type UpdateTaskChannelParams struct { - ChannelOptimizedRouting *bool `json:"ChannelOptimizedRouting,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` + ChannelOptimizedRouting *bool `json:"ChannelOptimizedRouting,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` } /* @@ -2366,45 +2402,45 @@ type UpdateTaskChannelParams struct { * @param "ChannelOptimizedRouting" (bool) - Whether the TaskChannel should prioritize Workers that have been idle. If `true`, Workers that have been idle the longest are prioritized. * @param "FriendlyName" (string) - A descriptive string that you create to describe the Task Channel. It can be up to 64 characters long. * @return TaskrouterV1WorkspaceTaskChannel - */ +*/ func (c *DefaultApiService) UpdateTaskChannel(WorkspaceSid string, Sid string, params *UpdateTaskChannelParams) (*TaskrouterV1WorkspaceTaskChannel, error) { - path := "/v1/Workspaces/{WorkspaceSid}/TaskChannels/{Sid}" + path := "/v1/Workspaces/{WorkspaceSid}/TaskChannels/{Sid}" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.ChannelOptimizedRouting != nil { - data.Set("ChannelOptimizedRouting", fmt.Sprint(*params.ChannelOptimizedRouting)) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } + if params != nil && params.ChannelOptimizedRouting != nil { + data.Set("ChannelOptimizedRouting", fmt.Sprint(*params.ChannelOptimizedRouting)) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &TaskrouterV1WorkspaceTaskChannel{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &TaskrouterV1WorkspaceTaskChannel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateTaskQueueParams Optional parameters for the method 'UpdateTaskQueue' type UpdateTaskQueueParams struct { - AssignmentActivitySid *string `json:"AssignmentActivitySid,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - MaxReservedWorkers *int32 `json:"MaxReservedWorkers,omitempty"` + AssignmentActivitySid *string `json:"AssignmentActivitySid,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + MaxReservedWorkers *int32 `json:"MaxReservedWorkers,omitempty"` ReservationActivitySid *string `json:"ReservationActivitySid,omitempty"` - TargetWorkers *string `json:"TargetWorkers,omitempty"` - TaskOrder *string `json:"TaskOrder,omitempty"` + TargetWorkers *string `json:"TargetWorkers,omitempty"` + TaskOrder *string `json:"TaskOrder,omitempty"` } /* @@ -2419,104 +2455,104 @@ type UpdateTaskQueueParams struct { * @param "TargetWorkers" (string) - A string describing the Worker selection criteria for any Tasks that enter the TaskQueue. For example '\\\"language\\\" == \\\"spanish\\\"' If no TargetWorkers parameter is provided, Tasks will wait in the queue until they are either deleted or moved to another queue. Additional examples on how to describing Worker selection criteria below. * @param "TaskOrder" (string) - How Tasks will be assigned to Workers. Can be: `FIFO` or `LIFO` and the default is `FIFO`. Use `FIFO` to assign the oldest task first and `LIFO` to assign the most recent task first. For more information, see [Queue Ordering](https://www.twilio.com/docs/taskrouter/queue-ordering-last-first-out-lifo). * @return TaskrouterV1WorkspaceTaskQueue - */ +*/ func (c *DefaultApiService) UpdateTaskQueue(WorkspaceSid string, Sid string, params *UpdateTaskQueueParams) (*TaskrouterV1WorkspaceTaskQueue, error) { - path := "/v1/Workspaces/{WorkspaceSid}/TaskQueues/{Sid}" + path := "/v1/Workspaces/{WorkspaceSid}/TaskQueues/{Sid}" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.AssignmentActivitySid != nil { - data.Set("AssignmentActivitySid", *params.AssignmentActivitySid) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.MaxReservedWorkers != nil { - data.Set("MaxReservedWorkers", fmt.Sprint(*params.MaxReservedWorkers)) - } - if params != nil && params.ReservationActivitySid != nil { - data.Set("ReservationActivitySid", *params.ReservationActivitySid) - } - if params != nil && params.TargetWorkers != nil { - data.Set("TargetWorkers", *params.TargetWorkers) - } - if params != nil && params.TaskOrder != nil { - data.Set("TaskOrder", *params.TaskOrder) - } + if params != nil && params.AssignmentActivitySid != nil { + data.Set("AssignmentActivitySid", *params.AssignmentActivitySid) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.MaxReservedWorkers != nil { + data.Set("MaxReservedWorkers", fmt.Sprint(*params.MaxReservedWorkers)) +} + if params != nil && params.ReservationActivitySid != nil { + data.Set("ReservationActivitySid", *params.ReservationActivitySid) +} + if params != nil && params.TargetWorkers != nil { + data.Set("TargetWorkers", *params.TargetWorkers) +} + if params != nil && params.TaskOrder != nil { + data.Set("TaskOrder", *params.TaskOrder) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &TaskrouterV1WorkspaceTaskQueue{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &TaskrouterV1WorkspaceTaskQueue{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateTaskReservationParams Optional parameters for the method 'UpdateTaskReservation' type UpdateTaskReservationParams struct { - Beep *string `json:"Beep,omitempty"` - BeepOnCustomerEntrance *bool `json:"BeepOnCustomerEntrance,omitempty"` - CallAccept *bool `json:"CallAccept,omitempty"` - CallFrom *string `json:"CallFrom,omitempty"` - CallRecord *string `json:"CallRecord,omitempty"` - CallStatusCallbackUrl *string `json:"CallStatusCallbackUrl,omitempty"` - CallTimeout *int32 `json:"CallTimeout,omitempty"` - CallTo *string `json:"CallTo,omitempty"` - CallUrl *string `json:"CallUrl,omitempty"` - ConferenceRecord *string `json:"ConferenceRecord,omitempty"` - ConferenceRecordingStatusCallback *string `json:"ConferenceRecordingStatusCallback,omitempty"` - ConferenceRecordingStatusCallbackMethod *string `json:"ConferenceRecordingStatusCallbackMethod,omitempty"` - ConferenceStatusCallback *string `json:"ConferenceStatusCallback,omitempty"` - ConferenceStatusCallbackEvent *[]string `json:"ConferenceStatusCallbackEvent,omitempty"` - ConferenceStatusCallbackMethod *string `json:"ConferenceStatusCallbackMethod,omitempty"` - ConferenceTrim *string `json:"ConferenceTrim,omitempty"` - DequeueFrom *string `json:"DequeueFrom,omitempty"` - DequeuePostWorkActivitySid *string `json:"DequeuePostWorkActivitySid,omitempty"` - DequeueRecord *string `json:"DequeueRecord,omitempty"` - DequeueStatusCallbackEvent *[]string `json:"DequeueStatusCallbackEvent,omitempty"` - DequeueStatusCallbackUrl *string `json:"DequeueStatusCallbackUrl,omitempty"` - DequeueTimeout *int32 `json:"DequeueTimeout,omitempty"` - DequeueTo *string `json:"DequeueTo,omitempty"` - EarlyMedia *bool `json:"EarlyMedia,omitempty"` - EndConferenceOnCustomerExit *bool `json:"EndConferenceOnCustomerExit,omitempty"` - EndConferenceOnExit *bool `json:"EndConferenceOnExit,omitempty"` - From *string `json:"From,omitempty"` - Instruction *string `json:"Instruction,omitempty"` - MaxParticipants *int32 `json:"MaxParticipants,omitempty"` - Muted *bool `json:"Muted,omitempty"` - PostWorkActivitySid *string `json:"PostWorkActivitySid,omitempty"` - Record *bool `json:"Record,omitempty"` - RecordingChannels *string `json:"RecordingChannels,omitempty"` - RecordingStatusCallback *string `json:"RecordingStatusCallback,omitempty"` - RecordingStatusCallbackMethod *string `json:"RecordingStatusCallbackMethod,omitempty"` - RedirectAccept *bool `json:"RedirectAccept,omitempty"` - RedirectCallSid *string `json:"RedirectCallSid,omitempty"` - RedirectUrl *string `json:"RedirectUrl,omitempty"` - Region *string `json:"Region,omitempty"` - ReservationStatus *string `json:"ReservationStatus,omitempty"` - SipAuthPassword *string `json:"SipAuthPassword,omitempty"` - SipAuthUsername *string `json:"SipAuthUsername,omitempty"` - StartConferenceOnEnter *bool `json:"StartConferenceOnEnter,omitempty"` - StatusCallback *string `json:"StatusCallback,omitempty"` - StatusCallbackEvent *[]string `json:"StatusCallbackEvent,omitempty"` - StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` - Supervisor *string `json:"Supervisor,omitempty"` - SupervisorMode *string `json:"SupervisorMode,omitempty"` - Timeout *int32 `json:"Timeout,omitempty"` - To *string `json:"To,omitempty"` - WaitMethod *string `json:"WaitMethod,omitempty"` - WaitUrl *string `json:"WaitUrl,omitempty"` - WorkerActivitySid *string `json:"WorkerActivitySid,omitempty"` + Beep *string `json:"Beep,omitempty"` + BeepOnCustomerEntrance *bool `json:"BeepOnCustomerEntrance,omitempty"` + CallAccept *bool `json:"CallAccept,omitempty"` + CallFrom *string `json:"CallFrom,omitempty"` + CallRecord *string `json:"CallRecord,omitempty"` + CallStatusCallbackUrl *string `json:"CallStatusCallbackUrl,omitempty"` + CallTimeout *int32 `json:"CallTimeout,omitempty"` + CallTo *string `json:"CallTo,omitempty"` + CallUrl *string `json:"CallUrl,omitempty"` + ConferenceRecord *string `json:"ConferenceRecord,omitempty"` + ConferenceRecordingStatusCallback *string `json:"ConferenceRecordingStatusCallback,omitempty"` + ConferenceRecordingStatusCallbackMethod *string `json:"ConferenceRecordingStatusCallbackMethod,omitempty"` + ConferenceStatusCallback *string `json:"ConferenceStatusCallback,omitempty"` + ConferenceStatusCallbackEvent *[]string `json:"ConferenceStatusCallbackEvent,omitempty"` + ConferenceStatusCallbackMethod *string `json:"ConferenceStatusCallbackMethod,omitempty"` + ConferenceTrim *string `json:"ConferenceTrim,omitempty"` + DequeueFrom *string `json:"DequeueFrom,omitempty"` + DequeuePostWorkActivitySid *string `json:"DequeuePostWorkActivitySid,omitempty"` + DequeueRecord *string `json:"DequeueRecord,omitempty"` + DequeueStatusCallbackEvent *[]string `json:"DequeueStatusCallbackEvent,omitempty"` + DequeueStatusCallbackUrl *string `json:"DequeueStatusCallbackUrl,omitempty"` + DequeueTimeout *int32 `json:"DequeueTimeout,omitempty"` + DequeueTo *string `json:"DequeueTo,omitempty"` + EarlyMedia *bool `json:"EarlyMedia,omitempty"` + EndConferenceOnCustomerExit *bool `json:"EndConferenceOnCustomerExit,omitempty"` + EndConferenceOnExit *bool `json:"EndConferenceOnExit,omitempty"` + From *string `json:"From,omitempty"` + Instruction *string `json:"Instruction,omitempty"` + MaxParticipants *int32 `json:"MaxParticipants,omitempty"` + Muted *bool `json:"Muted,omitempty"` + PostWorkActivitySid *string `json:"PostWorkActivitySid,omitempty"` + Record *bool `json:"Record,omitempty"` + RecordingChannels *string `json:"RecordingChannels,omitempty"` + RecordingStatusCallback *string `json:"RecordingStatusCallback,omitempty"` + RecordingStatusCallbackMethod *string `json:"RecordingStatusCallbackMethod,omitempty"` + RedirectAccept *bool `json:"RedirectAccept,omitempty"` + RedirectCallSid *string `json:"RedirectCallSid,omitempty"` + RedirectUrl *string `json:"RedirectUrl,omitempty"` + Region *string `json:"Region,omitempty"` + ReservationStatus *string `json:"ReservationStatus,omitempty"` + SipAuthPassword *string `json:"SipAuthPassword,omitempty"` + SipAuthUsername *string `json:"SipAuthUsername,omitempty"` + StartConferenceOnEnter *bool `json:"StartConferenceOnEnter,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` + StatusCallbackEvent *[]string `json:"StatusCallbackEvent,omitempty"` + StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` + Supervisor *string `json:"Supervisor,omitempty"` + SupervisorMode *string `json:"SupervisorMode,omitempty"` + Timeout *int32 `json:"Timeout,omitempty"` + To *string `json:"To,omitempty"` + WaitMethod *string `json:"WaitMethod,omitempty"` + WaitUrl *string `json:"WaitUrl,omitempty"` + WorkerActivitySid *string `json:"WorkerActivitySid,omitempty"` } /* @@ -2579,197 +2615,197 @@ type UpdateTaskReservationParams struct { * @param "WaitUrl" (string) - The URL we should call using the `wait_method` for the music to play while participants are waiting for the conference to start. The default value is the URL of our standard hold music. [Learn more about hold music](https://www.twilio.com/labs/twimlets/holdmusic). * @param "WorkerActivitySid" (string) - The new worker activity SID if rejecting a reservation. * @return TaskrouterV1WorkspaceTaskTaskReservation - */ +*/ func (c *DefaultApiService) UpdateTaskReservation(WorkspaceSid string, TaskSid string, Sid string, params *UpdateTaskReservationParams) (*TaskrouterV1WorkspaceTaskTaskReservation, error) { - path := "/v1/Workspaces/{WorkspaceSid}/Tasks/{TaskSid}/Reservations/{Sid}" + path := "/v1/Workspaces/{WorkspaceSid}/Tasks/{TaskSid}/Reservations/{Sid}" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) path = strings.Replace(path, "{"+"TaskSid"+"}", TaskSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Beep != nil { - data.Set("Beep", *params.Beep) - } - if params != nil && params.BeepOnCustomerEntrance != nil { - data.Set("BeepOnCustomerEntrance", fmt.Sprint(*params.BeepOnCustomerEntrance)) - } - if params != nil && params.CallAccept != nil { - data.Set("CallAccept", fmt.Sprint(*params.CallAccept)) - } - if params != nil && params.CallFrom != nil { - data.Set("CallFrom", *params.CallFrom) - } - if params != nil && params.CallRecord != nil { - data.Set("CallRecord", *params.CallRecord) - } - if params != nil && params.CallStatusCallbackUrl != nil { - data.Set("CallStatusCallbackUrl", *params.CallStatusCallbackUrl) - } - if params != nil && params.CallTimeout != nil { - data.Set("CallTimeout", fmt.Sprint(*params.CallTimeout)) - } - if params != nil && params.CallTo != nil { - data.Set("CallTo", *params.CallTo) - } - if params != nil && params.CallUrl != nil { - data.Set("CallUrl", *params.CallUrl) - } - if params != nil && params.ConferenceRecord != nil { - data.Set("ConferenceRecord", *params.ConferenceRecord) - } - if params != nil && params.ConferenceRecordingStatusCallback != nil { - data.Set("ConferenceRecordingStatusCallback", *params.ConferenceRecordingStatusCallback) - } - if params != nil && params.ConferenceRecordingStatusCallbackMethod != nil { - data.Set("ConferenceRecordingStatusCallbackMethod", *params.ConferenceRecordingStatusCallbackMethod) - } - if params != nil && params.ConferenceStatusCallback != nil { - data.Set("ConferenceStatusCallback", *params.ConferenceStatusCallback) - } - if params != nil && params.ConferenceStatusCallbackEvent != nil { - data.Set("ConferenceStatusCallbackEvent", strings.Join(*params.ConferenceStatusCallbackEvent, ",")) - } - if params != nil && params.ConferenceStatusCallbackMethod != nil { - data.Set("ConferenceStatusCallbackMethod", *params.ConferenceStatusCallbackMethod) - } - if params != nil && params.ConferenceTrim != nil { - data.Set("ConferenceTrim", *params.ConferenceTrim) - } - if params != nil && params.DequeueFrom != nil { - data.Set("DequeueFrom", *params.DequeueFrom) - } - if params != nil && params.DequeuePostWorkActivitySid != nil { - data.Set("DequeuePostWorkActivitySid", *params.DequeuePostWorkActivitySid) - } - if params != nil && params.DequeueRecord != nil { - data.Set("DequeueRecord", *params.DequeueRecord) - } - if params != nil && params.DequeueStatusCallbackEvent != nil { - data.Set("DequeueStatusCallbackEvent", strings.Join(*params.DequeueStatusCallbackEvent, ",")) - } - if params != nil && params.DequeueStatusCallbackUrl != nil { - data.Set("DequeueStatusCallbackUrl", *params.DequeueStatusCallbackUrl) - } - if params != nil && params.DequeueTimeout != nil { - data.Set("DequeueTimeout", fmt.Sprint(*params.DequeueTimeout)) - } - if params != nil && params.DequeueTo != nil { - data.Set("DequeueTo", *params.DequeueTo) - } - if params != nil && params.EarlyMedia != nil { - data.Set("EarlyMedia", fmt.Sprint(*params.EarlyMedia)) - } - if params != nil && params.EndConferenceOnCustomerExit != nil { - data.Set("EndConferenceOnCustomerExit", fmt.Sprint(*params.EndConferenceOnCustomerExit)) - } - if params != nil && params.EndConferenceOnExit != nil { - data.Set("EndConferenceOnExit", fmt.Sprint(*params.EndConferenceOnExit)) - } - if params != nil && params.From != nil { - data.Set("From", *params.From) - } - if params != nil && params.Instruction != nil { - data.Set("Instruction", *params.Instruction) - } - if params != nil && params.MaxParticipants != nil { - data.Set("MaxParticipants", fmt.Sprint(*params.MaxParticipants)) - } - if params != nil && params.Muted != nil { - data.Set("Muted", fmt.Sprint(*params.Muted)) - } - if params != nil && params.PostWorkActivitySid != nil { - data.Set("PostWorkActivitySid", *params.PostWorkActivitySid) - } - if params != nil && params.Record != nil { - data.Set("Record", fmt.Sprint(*params.Record)) - } - if params != nil && params.RecordingChannels != nil { - data.Set("RecordingChannels", *params.RecordingChannels) - } - if params != nil && params.RecordingStatusCallback != nil { - data.Set("RecordingStatusCallback", *params.RecordingStatusCallback) - } - if params != nil && params.RecordingStatusCallbackMethod != nil { - data.Set("RecordingStatusCallbackMethod", *params.RecordingStatusCallbackMethod) - } - if params != nil && params.RedirectAccept != nil { - data.Set("RedirectAccept", fmt.Sprint(*params.RedirectAccept)) - } - if params != nil && params.RedirectCallSid != nil { - data.Set("RedirectCallSid", *params.RedirectCallSid) - } - if params != nil && params.RedirectUrl != nil { - data.Set("RedirectUrl", *params.RedirectUrl) - } - if params != nil && params.Region != nil { - data.Set("Region", *params.Region) - } - if params != nil && params.ReservationStatus != nil { - data.Set("ReservationStatus", *params.ReservationStatus) - } - if params != nil && params.SipAuthPassword != nil { - data.Set("SipAuthPassword", *params.SipAuthPassword) - } - if params != nil && params.SipAuthUsername != nil { - data.Set("SipAuthUsername", *params.SipAuthUsername) - } - if params != nil && params.StartConferenceOnEnter != nil { - data.Set("StartConferenceOnEnter", fmt.Sprint(*params.StartConferenceOnEnter)) - } - if params != nil && params.StatusCallback != nil { - data.Set("StatusCallback", *params.StatusCallback) - } - if params != nil && params.StatusCallbackEvent != nil { - data.Set("StatusCallbackEvent", strings.Join(*params.StatusCallbackEvent, ",")) - } - if params != nil && params.StatusCallbackMethod != nil { - data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) - } - if params != nil && params.Supervisor != nil { - data.Set("Supervisor", *params.Supervisor) - } - if params != nil && params.SupervisorMode != nil { - data.Set("SupervisorMode", *params.SupervisorMode) - } - if params != nil && params.Timeout != nil { - data.Set("Timeout", fmt.Sprint(*params.Timeout)) - } - if params != nil && params.To != nil { - data.Set("To", *params.To) - } - if params != nil && params.WaitMethod != nil { - data.Set("WaitMethod", *params.WaitMethod) - } - if params != nil && params.WaitUrl != nil { - data.Set("WaitUrl", *params.WaitUrl) - } - if params != nil && params.WorkerActivitySid != nil { - data.Set("WorkerActivitySid", *params.WorkerActivitySid) - } + if params != nil && params.Beep != nil { + data.Set("Beep", *params.Beep) +} + if params != nil && params.BeepOnCustomerEntrance != nil { + data.Set("BeepOnCustomerEntrance", fmt.Sprint(*params.BeepOnCustomerEntrance)) +} + if params != nil && params.CallAccept != nil { + data.Set("CallAccept", fmt.Sprint(*params.CallAccept)) +} + if params != nil && params.CallFrom != nil { + data.Set("CallFrom", *params.CallFrom) +} + if params != nil && params.CallRecord != nil { + data.Set("CallRecord", *params.CallRecord) +} + if params != nil && params.CallStatusCallbackUrl != nil { + data.Set("CallStatusCallbackUrl", *params.CallStatusCallbackUrl) +} + if params != nil && params.CallTimeout != nil { + data.Set("CallTimeout", fmt.Sprint(*params.CallTimeout)) +} + if params != nil && params.CallTo != nil { + data.Set("CallTo", *params.CallTo) +} + if params != nil && params.CallUrl != nil { + data.Set("CallUrl", *params.CallUrl) +} + if params != nil && params.ConferenceRecord != nil { + data.Set("ConferenceRecord", *params.ConferenceRecord) +} + if params != nil && params.ConferenceRecordingStatusCallback != nil { + data.Set("ConferenceRecordingStatusCallback", *params.ConferenceRecordingStatusCallback) +} + if params != nil && params.ConferenceRecordingStatusCallbackMethod != nil { + data.Set("ConferenceRecordingStatusCallbackMethod", *params.ConferenceRecordingStatusCallbackMethod) +} + if params != nil && params.ConferenceStatusCallback != nil { + data.Set("ConferenceStatusCallback", *params.ConferenceStatusCallback) +} + if params != nil && params.ConferenceStatusCallbackEvent != nil { + data.Set("ConferenceStatusCallbackEvent", strings.Join(*params.ConferenceStatusCallbackEvent, ",")) +} + if params != nil && params.ConferenceStatusCallbackMethod != nil { + data.Set("ConferenceStatusCallbackMethod", *params.ConferenceStatusCallbackMethod) +} + if params != nil && params.ConferenceTrim != nil { + data.Set("ConferenceTrim", *params.ConferenceTrim) +} + if params != nil && params.DequeueFrom != nil { + data.Set("DequeueFrom", *params.DequeueFrom) +} + if params != nil && params.DequeuePostWorkActivitySid != nil { + data.Set("DequeuePostWorkActivitySid", *params.DequeuePostWorkActivitySid) +} + if params != nil && params.DequeueRecord != nil { + data.Set("DequeueRecord", *params.DequeueRecord) +} + if params != nil && params.DequeueStatusCallbackEvent != nil { + data.Set("DequeueStatusCallbackEvent", strings.Join(*params.DequeueStatusCallbackEvent, ",")) +} + if params != nil && params.DequeueStatusCallbackUrl != nil { + data.Set("DequeueStatusCallbackUrl", *params.DequeueStatusCallbackUrl) +} + if params != nil && params.DequeueTimeout != nil { + data.Set("DequeueTimeout", fmt.Sprint(*params.DequeueTimeout)) +} + if params != nil && params.DequeueTo != nil { + data.Set("DequeueTo", *params.DequeueTo) +} + if params != nil && params.EarlyMedia != nil { + data.Set("EarlyMedia", fmt.Sprint(*params.EarlyMedia)) +} + if params != nil && params.EndConferenceOnCustomerExit != nil { + data.Set("EndConferenceOnCustomerExit", fmt.Sprint(*params.EndConferenceOnCustomerExit)) +} + if params != nil && params.EndConferenceOnExit != nil { + data.Set("EndConferenceOnExit", fmt.Sprint(*params.EndConferenceOnExit)) +} + if params != nil && params.From != nil { + data.Set("From", *params.From) +} + if params != nil && params.Instruction != nil { + data.Set("Instruction", *params.Instruction) +} + if params != nil && params.MaxParticipants != nil { + data.Set("MaxParticipants", fmt.Sprint(*params.MaxParticipants)) +} + if params != nil && params.Muted != nil { + data.Set("Muted", fmt.Sprint(*params.Muted)) +} + if params != nil && params.PostWorkActivitySid != nil { + data.Set("PostWorkActivitySid", *params.PostWorkActivitySid) +} + if params != nil && params.Record != nil { + data.Set("Record", fmt.Sprint(*params.Record)) +} + if params != nil && params.RecordingChannels != nil { + data.Set("RecordingChannels", *params.RecordingChannels) +} + if params != nil && params.RecordingStatusCallback != nil { + data.Set("RecordingStatusCallback", *params.RecordingStatusCallback) +} + if params != nil && params.RecordingStatusCallbackMethod != nil { + data.Set("RecordingStatusCallbackMethod", *params.RecordingStatusCallbackMethod) +} + if params != nil && params.RedirectAccept != nil { + data.Set("RedirectAccept", fmt.Sprint(*params.RedirectAccept)) +} + if params != nil && params.RedirectCallSid != nil { + data.Set("RedirectCallSid", *params.RedirectCallSid) +} + if params != nil && params.RedirectUrl != nil { + data.Set("RedirectUrl", *params.RedirectUrl) +} + if params != nil && params.Region != nil { + data.Set("Region", *params.Region) +} + if params != nil && params.ReservationStatus != nil { + data.Set("ReservationStatus", *params.ReservationStatus) +} + if params != nil && params.SipAuthPassword != nil { + data.Set("SipAuthPassword", *params.SipAuthPassword) +} + if params != nil && params.SipAuthUsername != nil { + data.Set("SipAuthUsername", *params.SipAuthUsername) +} + if params != nil && params.StartConferenceOnEnter != nil { + data.Set("StartConferenceOnEnter", fmt.Sprint(*params.StartConferenceOnEnter)) +} + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) +} + if params != nil && params.StatusCallbackEvent != nil { + data.Set("StatusCallbackEvent", strings.Join(*params.StatusCallbackEvent, ",")) +} + if params != nil && params.StatusCallbackMethod != nil { + data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) +} + if params != nil && params.Supervisor != nil { + data.Set("Supervisor", *params.Supervisor) +} + if params != nil && params.SupervisorMode != nil { + data.Set("SupervisorMode", *params.SupervisorMode) +} + if params != nil && params.Timeout != nil { + data.Set("Timeout", fmt.Sprint(*params.Timeout)) +} + if params != nil && params.To != nil { + data.Set("To", *params.To) +} + if params != nil && params.WaitMethod != nil { + data.Set("WaitMethod", *params.WaitMethod) +} + if params != nil && params.WaitUrl != nil { + data.Set("WaitUrl", *params.WaitUrl) +} + if params != nil && params.WorkerActivitySid != nil { + data.Set("WorkerActivitySid", *params.WorkerActivitySid) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &TaskrouterV1WorkspaceTaskTaskReservation{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &TaskrouterV1WorkspaceTaskTaskReservation{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateWorkerParams Optional parameters for the method 'UpdateWorker' type UpdateWorkerParams struct { - ActivitySid *string `json:"ActivitySid,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - RejectPendingReservations *bool `json:"RejectPendingReservations,omitempty"` + ActivitySid *string `json:"ActivitySid,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + RejectPendingReservations *bool `json:"RejectPendingReservations,omitempty"` } /* @@ -2782,47 +2818,47 @@ type UpdateWorkerParams struct { * @param "FriendlyName" (string) - A descriptive string that you create to describe the Worker. It can be up to 64 characters long. * @param "RejectPendingReservations" (bool) - Whether to reject pending reservations. * @return TaskrouterV1WorkspaceWorker - */ +*/ func (c *DefaultApiService) UpdateWorker(WorkspaceSid string, Sid string, params *UpdateWorkerParams) (*TaskrouterV1WorkspaceWorker, error) { - path := "/v1/Workspaces/{WorkspaceSid}/Workers/{Sid}" + path := "/v1/Workspaces/{WorkspaceSid}/Workers/{Sid}" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.ActivitySid != nil { - data.Set("ActivitySid", *params.ActivitySid) - } - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.RejectPendingReservations != nil { - data.Set("RejectPendingReservations", fmt.Sprint(*params.RejectPendingReservations)) - } + if params != nil && params.ActivitySid != nil { + data.Set("ActivitySid", *params.ActivitySid) +} + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.RejectPendingReservations != nil { + data.Set("RejectPendingReservations", fmt.Sprint(*params.RejectPendingReservations)) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &TaskrouterV1WorkspaceWorker{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &TaskrouterV1WorkspaceWorker{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateWorkerChannelParams Optional parameters for the method 'UpdateWorkerChannel' type UpdateWorkerChannelParams struct { - Available *bool `json:"Available,omitempty"` - Capacity *int32 `json:"Capacity,omitempty"` + Available *bool `json:"Available,omitempty"` + Capacity *int32 `json:"Capacity,omitempty"` } /* @@ -2834,91 +2870,91 @@ type UpdateWorkerChannelParams struct { * @param "Available" (bool) - Whether the WorkerChannel is available. Set to `false` to prevent the Worker from receiving any new Tasks of this TaskChannel type. * @param "Capacity" (int32) - The total number of Tasks that the Worker should handle for the TaskChannel type. TaskRouter creates reservations for Tasks of this TaskChannel type up to the specified capacity. If the capacity is 0, no new reservations will be created. * @return TaskrouterV1WorkspaceWorkerWorkerChannel - */ +*/ func (c *DefaultApiService) UpdateWorkerChannel(WorkspaceSid string, WorkerSid string, Sid string, params *UpdateWorkerChannelParams) (*TaskrouterV1WorkspaceWorkerWorkerChannel, error) { - path := "/v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Channels/{Sid}" + path := "/v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Channels/{Sid}" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) path = strings.Replace(path, "{"+"WorkerSid"+"}", WorkerSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Available != nil { - data.Set("Available", fmt.Sprint(*params.Available)) - } - if params != nil && params.Capacity != nil { - data.Set("Capacity", fmt.Sprint(*params.Capacity)) - } + if params != nil && params.Available != nil { + data.Set("Available", fmt.Sprint(*params.Available)) +} + if params != nil && params.Capacity != nil { + data.Set("Capacity", fmt.Sprint(*params.Capacity)) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &TaskrouterV1WorkspaceWorkerWorkerChannel{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &TaskrouterV1WorkspaceWorkerWorkerChannel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateWorkerReservationParams Optional parameters for the method 'UpdateWorkerReservation' type UpdateWorkerReservationParams struct { - Beep *string `json:"Beep,omitempty"` - BeepOnCustomerEntrance *bool `json:"BeepOnCustomerEntrance,omitempty"` - CallAccept *bool `json:"CallAccept,omitempty"` - CallFrom *string `json:"CallFrom,omitempty"` - CallRecord *string `json:"CallRecord,omitempty"` - CallStatusCallbackUrl *string `json:"CallStatusCallbackUrl,omitempty"` - CallTimeout *int32 `json:"CallTimeout,omitempty"` - CallTo *string `json:"CallTo,omitempty"` - CallUrl *string `json:"CallUrl,omitempty"` - ConferenceRecord *string `json:"ConferenceRecord,omitempty"` - ConferenceRecordingStatusCallback *string `json:"ConferenceRecordingStatusCallback,omitempty"` - ConferenceRecordingStatusCallbackMethod *string `json:"ConferenceRecordingStatusCallbackMethod,omitempty"` - ConferenceStatusCallback *string `json:"ConferenceStatusCallback,omitempty"` - ConferenceStatusCallbackEvent *[]string `json:"ConferenceStatusCallbackEvent,omitempty"` - ConferenceStatusCallbackMethod *string `json:"ConferenceStatusCallbackMethod,omitempty"` - ConferenceTrim *string `json:"ConferenceTrim,omitempty"` - DequeueFrom *string `json:"DequeueFrom,omitempty"` - DequeuePostWorkActivitySid *string `json:"DequeuePostWorkActivitySid,omitempty"` - DequeueRecord *string `json:"DequeueRecord,omitempty"` - DequeueStatusCallbackEvent *[]string `json:"DequeueStatusCallbackEvent,omitempty"` - DequeueStatusCallbackUrl *string `json:"DequeueStatusCallbackUrl,omitempty"` - DequeueTimeout *int32 `json:"DequeueTimeout,omitempty"` - DequeueTo *string `json:"DequeueTo,omitempty"` - EarlyMedia *bool `json:"EarlyMedia,omitempty"` - EndConferenceOnCustomerExit *bool `json:"EndConferenceOnCustomerExit,omitempty"` - EndConferenceOnExit *bool `json:"EndConferenceOnExit,omitempty"` - From *string `json:"From,omitempty"` - Instruction *string `json:"Instruction,omitempty"` - MaxParticipants *int32 `json:"MaxParticipants,omitempty"` - Muted *bool `json:"Muted,omitempty"` - PostWorkActivitySid *string `json:"PostWorkActivitySid,omitempty"` - Record *bool `json:"Record,omitempty"` - RecordingChannels *string `json:"RecordingChannels,omitempty"` - RecordingStatusCallback *string `json:"RecordingStatusCallback,omitempty"` - RecordingStatusCallbackMethod *string `json:"RecordingStatusCallbackMethod,omitempty"` - RedirectAccept *bool `json:"RedirectAccept,omitempty"` - RedirectCallSid *string `json:"RedirectCallSid,omitempty"` - RedirectUrl *string `json:"RedirectUrl,omitempty"` - Region *string `json:"Region,omitempty"` - ReservationStatus *string `json:"ReservationStatus,omitempty"` - SipAuthPassword *string `json:"SipAuthPassword,omitempty"` - SipAuthUsername *string `json:"SipAuthUsername,omitempty"` - StartConferenceOnEnter *bool `json:"StartConferenceOnEnter,omitempty"` - StatusCallback *string `json:"StatusCallback,omitempty"` - StatusCallbackEvent *[]string `json:"StatusCallbackEvent,omitempty"` - StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` - Timeout *int32 `json:"Timeout,omitempty"` - To *string `json:"To,omitempty"` - WaitMethod *string `json:"WaitMethod,omitempty"` - WaitUrl *string `json:"WaitUrl,omitempty"` - WorkerActivitySid *string `json:"WorkerActivitySid,omitempty"` + Beep *string `json:"Beep,omitempty"` + BeepOnCustomerEntrance *bool `json:"BeepOnCustomerEntrance,omitempty"` + CallAccept *bool `json:"CallAccept,omitempty"` + CallFrom *string `json:"CallFrom,omitempty"` + CallRecord *string `json:"CallRecord,omitempty"` + CallStatusCallbackUrl *string `json:"CallStatusCallbackUrl,omitempty"` + CallTimeout *int32 `json:"CallTimeout,omitempty"` + CallTo *string `json:"CallTo,omitempty"` + CallUrl *string `json:"CallUrl,omitempty"` + ConferenceRecord *string `json:"ConferenceRecord,omitempty"` + ConferenceRecordingStatusCallback *string `json:"ConferenceRecordingStatusCallback,omitempty"` + ConferenceRecordingStatusCallbackMethod *string `json:"ConferenceRecordingStatusCallbackMethod,omitempty"` + ConferenceStatusCallback *string `json:"ConferenceStatusCallback,omitempty"` + ConferenceStatusCallbackEvent *[]string `json:"ConferenceStatusCallbackEvent,omitempty"` + ConferenceStatusCallbackMethod *string `json:"ConferenceStatusCallbackMethod,omitempty"` + ConferenceTrim *string `json:"ConferenceTrim,omitempty"` + DequeueFrom *string `json:"DequeueFrom,omitempty"` + DequeuePostWorkActivitySid *string `json:"DequeuePostWorkActivitySid,omitempty"` + DequeueRecord *string `json:"DequeueRecord,omitempty"` + DequeueStatusCallbackEvent *[]string `json:"DequeueStatusCallbackEvent,omitempty"` + DequeueStatusCallbackUrl *string `json:"DequeueStatusCallbackUrl,omitempty"` + DequeueTimeout *int32 `json:"DequeueTimeout,omitempty"` + DequeueTo *string `json:"DequeueTo,omitempty"` + EarlyMedia *bool `json:"EarlyMedia,omitempty"` + EndConferenceOnCustomerExit *bool `json:"EndConferenceOnCustomerExit,omitempty"` + EndConferenceOnExit *bool `json:"EndConferenceOnExit,omitempty"` + From *string `json:"From,omitempty"` + Instruction *string `json:"Instruction,omitempty"` + MaxParticipants *int32 `json:"MaxParticipants,omitempty"` + Muted *bool `json:"Muted,omitempty"` + PostWorkActivitySid *string `json:"PostWorkActivitySid,omitempty"` + Record *bool `json:"Record,omitempty"` + RecordingChannels *string `json:"RecordingChannels,omitempty"` + RecordingStatusCallback *string `json:"RecordingStatusCallback,omitempty"` + RecordingStatusCallbackMethod *string `json:"RecordingStatusCallbackMethod,omitempty"` + RedirectAccept *bool `json:"RedirectAccept,omitempty"` + RedirectCallSid *string `json:"RedirectCallSid,omitempty"` + RedirectUrl *string `json:"RedirectUrl,omitempty"` + Region *string `json:"Region,omitempty"` + ReservationStatus *string `json:"ReservationStatus,omitempty"` + SipAuthPassword *string `json:"SipAuthPassword,omitempty"` + SipAuthUsername *string `json:"SipAuthUsername,omitempty"` + StartConferenceOnEnter *bool `json:"StartConferenceOnEnter,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` + StatusCallbackEvent *[]string `json:"StatusCallbackEvent,omitempty"` + StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` + Timeout *int32 `json:"Timeout,omitempty"` + To *string `json:"To,omitempty"` + WaitMethod *string `json:"WaitMethod,omitempty"` + WaitUrl *string `json:"WaitUrl,omitempty"` + WorkerActivitySid *string `json:"WorkerActivitySid,omitempty"` } /* @@ -2979,193 +3015,193 @@ type UpdateWorkerReservationParams struct { * @param "WaitUrl" (string) - The URL we should call using the `wait_method` for the music to play while participants are waiting for the conference to start. The default value is the URL of our standard hold music. [Learn more about hold music](https://www.twilio.com/labs/twimlets/holdmusic). * @param "WorkerActivitySid" (string) - The new worker activity SID if rejecting a reservation. * @return TaskrouterV1WorkspaceWorkerWorkerReservation - */ +*/ func (c *DefaultApiService) UpdateWorkerReservation(WorkspaceSid string, WorkerSid string, Sid string, params *UpdateWorkerReservationParams) (*TaskrouterV1WorkspaceWorkerWorkerReservation, error) { - path := "/v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Reservations/{Sid}" + path := "/v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Reservations/{Sid}" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) path = strings.Replace(path, "{"+"WorkerSid"+"}", WorkerSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Beep != nil { - data.Set("Beep", *params.Beep) - } - if params != nil && params.BeepOnCustomerEntrance != nil { - data.Set("BeepOnCustomerEntrance", fmt.Sprint(*params.BeepOnCustomerEntrance)) - } - if params != nil && params.CallAccept != nil { - data.Set("CallAccept", fmt.Sprint(*params.CallAccept)) - } - if params != nil && params.CallFrom != nil { - data.Set("CallFrom", *params.CallFrom) - } - if params != nil && params.CallRecord != nil { - data.Set("CallRecord", *params.CallRecord) - } - if params != nil && params.CallStatusCallbackUrl != nil { - data.Set("CallStatusCallbackUrl", *params.CallStatusCallbackUrl) - } - if params != nil && params.CallTimeout != nil { - data.Set("CallTimeout", fmt.Sprint(*params.CallTimeout)) - } - if params != nil && params.CallTo != nil { - data.Set("CallTo", *params.CallTo) - } - if params != nil && params.CallUrl != nil { - data.Set("CallUrl", *params.CallUrl) - } - if params != nil && params.ConferenceRecord != nil { - data.Set("ConferenceRecord", *params.ConferenceRecord) - } - if params != nil && params.ConferenceRecordingStatusCallback != nil { - data.Set("ConferenceRecordingStatusCallback", *params.ConferenceRecordingStatusCallback) - } - if params != nil && params.ConferenceRecordingStatusCallbackMethod != nil { - data.Set("ConferenceRecordingStatusCallbackMethod", *params.ConferenceRecordingStatusCallbackMethod) - } - if params != nil && params.ConferenceStatusCallback != nil { - data.Set("ConferenceStatusCallback", *params.ConferenceStatusCallback) - } - if params != nil && params.ConferenceStatusCallbackEvent != nil { - data.Set("ConferenceStatusCallbackEvent", strings.Join(*params.ConferenceStatusCallbackEvent, ",")) - } - if params != nil && params.ConferenceStatusCallbackMethod != nil { - data.Set("ConferenceStatusCallbackMethod", *params.ConferenceStatusCallbackMethod) - } - if params != nil && params.ConferenceTrim != nil { - data.Set("ConferenceTrim", *params.ConferenceTrim) - } - if params != nil && params.DequeueFrom != nil { - data.Set("DequeueFrom", *params.DequeueFrom) - } - if params != nil && params.DequeuePostWorkActivitySid != nil { - data.Set("DequeuePostWorkActivitySid", *params.DequeuePostWorkActivitySid) - } - if params != nil && params.DequeueRecord != nil { - data.Set("DequeueRecord", *params.DequeueRecord) - } - if params != nil && params.DequeueStatusCallbackEvent != nil { - data.Set("DequeueStatusCallbackEvent", strings.Join(*params.DequeueStatusCallbackEvent, ",")) - } - if params != nil && params.DequeueStatusCallbackUrl != nil { - data.Set("DequeueStatusCallbackUrl", *params.DequeueStatusCallbackUrl) - } - if params != nil && params.DequeueTimeout != nil { - data.Set("DequeueTimeout", fmt.Sprint(*params.DequeueTimeout)) - } - if params != nil && params.DequeueTo != nil { - data.Set("DequeueTo", *params.DequeueTo) - } - if params != nil && params.EarlyMedia != nil { - data.Set("EarlyMedia", fmt.Sprint(*params.EarlyMedia)) - } - if params != nil && params.EndConferenceOnCustomerExit != nil { - data.Set("EndConferenceOnCustomerExit", fmt.Sprint(*params.EndConferenceOnCustomerExit)) - } - if params != nil && params.EndConferenceOnExit != nil { - data.Set("EndConferenceOnExit", fmt.Sprint(*params.EndConferenceOnExit)) - } - if params != nil && params.From != nil { - data.Set("From", *params.From) - } - if params != nil && params.Instruction != nil { - data.Set("Instruction", *params.Instruction) - } - if params != nil && params.MaxParticipants != nil { - data.Set("MaxParticipants", fmt.Sprint(*params.MaxParticipants)) - } - if params != nil && params.Muted != nil { - data.Set("Muted", fmt.Sprint(*params.Muted)) - } - if params != nil && params.PostWorkActivitySid != nil { - data.Set("PostWorkActivitySid", *params.PostWorkActivitySid) - } - if params != nil && params.Record != nil { - data.Set("Record", fmt.Sprint(*params.Record)) - } - if params != nil && params.RecordingChannels != nil { - data.Set("RecordingChannels", *params.RecordingChannels) - } - if params != nil && params.RecordingStatusCallback != nil { - data.Set("RecordingStatusCallback", *params.RecordingStatusCallback) - } - if params != nil && params.RecordingStatusCallbackMethod != nil { - data.Set("RecordingStatusCallbackMethod", *params.RecordingStatusCallbackMethod) - } - if params != nil && params.RedirectAccept != nil { - data.Set("RedirectAccept", fmt.Sprint(*params.RedirectAccept)) - } - if params != nil && params.RedirectCallSid != nil { - data.Set("RedirectCallSid", *params.RedirectCallSid) - } - if params != nil && params.RedirectUrl != nil { - data.Set("RedirectUrl", *params.RedirectUrl) - } - if params != nil && params.Region != nil { - data.Set("Region", *params.Region) - } - if params != nil && params.ReservationStatus != nil { - data.Set("ReservationStatus", *params.ReservationStatus) - } - if params != nil && params.SipAuthPassword != nil { - data.Set("SipAuthPassword", *params.SipAuthPassword) - } - if params != nil && params.SipAuthUsername != nil { - data.Set("SipAuthUsername", *params.SipAuthUsername) - } - if params != nil && params.StartConferenceOnEnter != nil { - data.Set("StartConferenceOnEnter", fmt.Sprint(*params.StartConferenceOnEnter)) - } - if params != nil && params.StatusCallback != nil { - data.Set("StatusCallback", *params.StatusCallback) - } - if params != nil && params.StatusCallbackEvent != nil { - data.Set("StatusCallbackEvent", strings.Join(*params.StatusCallbackEvent, ",")) - } - if params != nil && params.StatusCallbackMethod != nil { - data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) - } - if params != nil && params.Timeout != nil { - data.Set("Timeout", fmt.Sprint(*params.Timeout)) - } - if params != nil && params.To != nil { - data.Set("To", *params.To) - } - if params != nil && params.WaitMethod != nil { - data.Set("WaitMethod", *params.WaitMethod) - } - if params != nil && params.WaitUrl != nil { - data.Set("WaitUrl", *params.WaitUrl) - } - if params != nil && params.WorkerActivitySid != nil { - data.Set("WorkerActivitySid", *params.WorkerActivitySid) - } + if params != nil && params.Beep != nil { + data.Set("Beep", *params.Beep) +} + if params != nil && params.BeepOnCustomerEntrance != nil { + data.Set("BeepOnCustomerEntrance", fmt.Sprint(*params.BeepOnCustomerEntrance)) +} + if params != nil && params.CallAccept != nil { + data.Set("CallAccept", fmt.Sprint(*params.CallAccept)) +} + if params != nil && params.CallFrom != nil { + data.Set("CallFrom", *params.CallFrom) +} + if params != nil && params.CallRecord != nil { + data.Set("CallRecord", *params.CallRecord) +} + if params != nil && params.CallStatusCallbackUrl != nil { + data.Set("CallStatusCallbackUrl", *params.CallStatusCallbackUrl) +} + if params != nil && params.CallTimeout != nil { + data.Set("CallTimeout", fmt.Sprint(*params.CallTimeout)) +} + if params != nil && params.CallTo != nil { + data.Set("CallTo", *params.CallTo) +} + if params != nil && params.CallUrl != nil { + data.Set("CallUrl", *params.CallUrl) +} + if params != nil && params.ConferenceRecord != nil { + data.Set("ConferenceRecord", *params.ConferenceRecord) +} + if params != nil && params.ConferenceRecordingStatusCallback != nil { + data.Set("ConferenceRecordingStatusCallback", *params.ConferenceRecordingStatusCallback) +} + if params != nil && params.ConferenceRecordingStatusCallbackMethod != nil { + data.Set("ConferenceRecordingStatusCallbackMethod", *params.ConferenceRecordingStatusCallbackMethod) +} + if params != nil && params.ConferenceStatusCallback != nil { + data.Set("ConferenceStatusCallback", *params.ConferenceStatusCallback) +} + if params != nil && params.ConferenceStatusCallbackEvent != nil { + data.Set("ConferenceStatusCallbackEvent", strings.Join(*params.ConferenceStatusCallbackEvent, ",")) +} + if params != nil && params.ConferenceStatusCallbackMethod != nil { + data.Set("ConferenceStatusCallbackMethod", *params.ConferenceStatusCallbackMethod) +} + if params != nil && params.ConferenceTrim != nil { + data.Set("ConferenceTrim", *params.ConferenceTrim) +} + if params != nil && params.DequeueFrom != nil { + data.Set("DequeueFrom", *params.DequeueFrom) +} + if params != nil && params.DequeuePostWorkActivitySid != nil { + data.Set("DequeuePostWorkActivitySid", *params.DequeuePostWorkActivitySid) +} + if params != nil && params.DequeueRecord != nil { + data.Set("DequeueRecord", *params.DequeueRecord) +} + if params != nil && params.DequeueStatusCallbackEvent != nil { + data.Set("DequeueStatusCallbackEvent", strings.Join(*params.DequeueStatusCallbackEvent, ",")) +} + if params != nil && params.DequeueStatusCallbackUrl != nil { + data.Set("DequeueStatusCallbackUrl", *params.DequeueStatusCallbackUrl) +} + if params != nil && params.DequeueTimeout != nil { + data.Set("DequeueTimeout", fmt.Sprint(*params.DequeueTimeout)) +} + if params != nil && params.DequeueTo != nil { + data.Set("DequeueTo", *params.DequeueTo) +} + if params != nil && params.EarlyMedia != nil { + data.Set("EarlyMedia", fmt.Sprint(*params.EarlyMedia)) +} + if params != nil && params.EndConferenceOnCustomerExit != nil { + data.Set("EndConferenceOnCustomerExit", fmt.Sprint(*params.EndConferenceOnCustomerExit)) +} + if params != nil && params.EndConferenceOnExit != nil { + data.Set("EndConferenceOnExit", fmt.Sprint(*params.EndConferenceOnExit)) +} + if params != nil && params.From != nil { + data.Set("From", *params.From) +} + if params != nil && params.Instruction != nil { + data.Set("Instruction", *params.Instruction) +} + if params != nil && params.MaxParticipants != nil { + data.Set("MaxParticipants", fmt.Sprint(*params.MaxParticipants)) +} + if params != nil && params.Muted != nil { + data.Set("Muted", fmt.Sprint(*params.Muted)) +} + if params != nil && params.PostWorkActivitySid != nil { + data.Set("PostWorkActivitySid", *params.PostWorkActivitySid) +} + if params != nil && params.Record != nil { + data.Set("Record", fmt.Sprint(*params.Record)) +} + if params != nil && params.RecordingChannels != nil { + data.Set("RecordingChannels", *params.RecordingChannels) +} + if params != nil && params.RecordingStatusCallback != nil { + data.Set("RecordingStatusCallback", *params.RecordingStatusCallback) +} + if params != nil && params.RecordingStatusCallbackMethod != nil { + data.Set("RecordingStatusCallbackMethod", *params.RecordingStatusCallbackMethod) +} + if params != nil && params.RedirectAccept != nil { + data.Set("RedirectAccept", fmt.Sprint(*params.RedirectAccept)) +} + if params != nil && params.RedirectCallSid != nil { + data.Set("RedirectCallSid", *params.RedirectCallSid) +} + if params != nil && params.RedirectUrl != nil { + data.Set("RedirectUrl", *params.RedirectUrl) +} + if params != nil && params.Region != nil { + data.Set("Region", *params.Region) +} + if params != nil && params.ReservationStatus != nil { + data.Set("ReservationStatus", *params.ReservationStatus) +} + if params != nil && params.SipAuthPassword != nil { + data.Set("SipAuthPassword", *params.SipAuthPassword) +} + if params != nil && params.SipAuthUsername != nil { + data.Set("SipAuthUsername", *params.SipAuthUsername) +} + if params != nil && params.StartConferenceOnEnter != nil { + data.Set("StartConferenceOnEnter", fmt.Sprint(*params.StartConferenceOnEnter)) +} + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) +} + if params != nil && params.StatusCallbackEvent != nil { + data.Set("StatusCallbackEvent", strings.Join(*params.StatusCallbackEvent, ",")) +} + if params != nil && params.StatusCallbackMethod != nil { + data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) +} + if params != nil && params.Timeout != nil { + data.Set("Timeout", fmt.Sprint(*params.Timeout)) +} + if params != nil && params.To != nil { + data.Set("To", *params.To) +} + if params != nil && params.WaitMethod != nil { + data.Set("WaitMethod", *params.WaitMethod) +} + if params != nil && params.WaitUrl != nil { + data.Set("WaitUrl", *params.WaitUrl) +} + if params != nil && params.WorkerActivitySid != nil { + data.Set("WorkerActivitySid", *params.WorkerActivitySid) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &TaskrouterV1WorkspaceWorkerWorkerReservation{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &TaskrouterV1WorkspaceWorkerWorkerReservation{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateWorkflowParams Optional parameters for the method 'UpdateWorkflow' type UpdateWorkflowParams struct { - AssignmentCallbackUrl *string `json:"AssignmentCallbackUrl,omitempty"` - Configuration *string `json:"Configuration,omitempty"` + AssignmentCallbackUrl *string `json:"AssignmentCallbackUrl,omitempty"` + Configuration *string `json:"Configuration,omitempty"` FallbackAssignmentCallbackUrl *string `json:"FallbackAssignmentCallbackUrl,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - ReEvaluateTasks *string `json:"ReEvaluateTasks,omitempty"` - TaskReservationTimeout *int32 `json:"TaskReservationTimeout,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + ReEvaluateTasks *string `json:"ReEvaluateTasks,omitempty"` + TaskReservationTimeout *int32 `json:"TaskReservationTimeout,omitempty"` } /* @@ -3180,58 +3216,58 @@ type UpdateWorkflowParams struct { * @param "ReEvaluateTasks" (string) - Whether or not to re-evaluate Tasks. The default is `false`, which means Tasks in the Workflow will not be processed through the assignment loop again. * @param "TaskReservationTimeout" (int32) - How long TaskRouter will wait for a confirmation response from your application after it assigns a Task to a Worker. Can be up to `86,400` (24 hours) and the default is `120`. * @return TaskrouterV1WorkspaceWorkflow - */ +*/ func (c *DefaultApiService) UpdateWorkflow(WorkspaceSid string, Sid string, params *UpdateWorkflowParams) (*TaskrouterV1WorkspaceWorkflow, error) { - path := "/v1/Workspaces/{WorkspaceSid}/Workflows/{Sid}" + path := "/v1/Workspaces/{WorkspaceSid}/Workflows/{Sid}" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.AssignmentCallbackUrl != nil { - data.Set("AssignmentCallbackUrl", *params.AssignmentCallbackUrl) - } - if params != nil && params.Configuration != nil { - data.Set("Configuration", *params.Configuration) - } - if params != nil && params.FallbackAssignmentCallbackUrl != nil { - data.Set("FallbackAssignmentCallbackUrl", *params.FallbackAssignmentCallbackUrl) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.ReEvaluateTasks != nil { - data.Set("ReEvaluateTasks", *params.ReEvaluateTasks) - } - if params != nil && params.TaskReservationTimeout != nil { - data.Set("TaskReservationTimeout", fmt.Sprint(*params.TaskReservationTimeout)) - } + if params != nil && params.AssignmentCallbackUrl != nil { + data.Set("AssignmentCallbackUrl", *params.AssignmentCallbackUrl) +} + if params != nil && params.Configuration != nil { + data.Set("Configuration", *params.Configuration) +} + if params != nil && params.FallbackAssignmentCallbackUrl != nil { + data.Set("FallbackAssignmentCallbackUrl", *params.FallbackAssignmentCallbackUrl) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.ReEvaluateTasks != nil { + data.Set("ReEvaluateTasks", *params.ReEvaluateTasks) +} + if params != nil && params.TaskReservationTimeout != nil { + data.Set("TaskReservationTimeout", fmt.Sprint(*params.TaskReservationTimeout)) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &TaskrouterV1WorkspaceWorkflow{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &TaskrouterV1WorkspaceWorkflow{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateWorkspaceParams Optional parameters for the method 'UpdateWorkspace' type UpdateWorkspaceParams struct { - DefaultActivitySid *string `json:"DefaultActivitySid,omitempty"` - EventCallbackUrl *string `json:"EventCallbackUrl,omitempty"` - EventsFilter *string `json:"EventsFilter,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - MultiTaskEnabled *bool `json:"MultiTaskEnabled,omitempty"` + DefaultActivitySid *string `json:"DefaultActivitySid,omitempty"` + EventCallbackUrl *string `json:"EventCallbackUrl,omitempty"` + EventsFilter *string `json:"EventsFilter,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + MultiTaskEnabled *bool `json:"MultiTaskEnabled,omitempty"` PrioritizeQueueOrder *string `json:"PrioritizeQueueOrder,omitempty"` - TimeoutActivitySid *string `json:"TimeoutActivitySid,omitempty"` + TimeoutActivitySid *string `json:"TimeoutActivitySid,omitempty"` } /* @@ -3246,47 +3282,48 @@ type UpdateWorkspaceParams struct { * @param "PrioritizeQueueOrder" (string) - The type of TaskQueue to prioritize when Workers are receiving Tasks from both types of TaskQueues. Can be: `LIFO` or `FIFO` and the default is `FIFO`. For more information, see [Queue Ordering][https://www.twilio.com/docs/taskrouter/queue-ordering-last-first-out-lifo]. * @param "TimeoutActivitySid" (string) - The SID of the Activity that will be assigned to a Worker when a Task reservation times out without a response. * @return TaskrouterV1Workspace - */ +*/ func (c *DefaultApiService) UpdateWorkspace(Sid string, params *UpdateWorkspaceParams) (*TaskrouterV1Workspace, error) { - path := "/v1/Workspaces/{Sid}" + path := "/v1/Workspaces/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.DefaultActivitySid != nil { - data.Set("DefaultActivitySid", *params.DefaultActivitySid) - } - if params != nil && params.EventCallbackUrl != nil { - data.Set("EventCallbackUrl", *params.EventCallbackUrl) - } - if params != nil && params.EventsFilter != nil { - data.Set("EventsFilter", *params.EventsFilter) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.MultiTaskEnabled != nil { - data.Set("MultiTaskEnabled", fmt.Sprint(*params.MultiTaskEnabled)) - } - if params != nil && params.PrioritizeQueueOrder != nil { - data.Set("PrioritizeQueueOrder", *params.PrioritizeQueueOrder) - } - if params != nil && params.TimeoutActivitySid != nil { - data.Set("TimeoutActivitySid", *params.TimeoutActivitySid) - } + if params != nil && params.DefaultActivitySid != nil { + data.Set("DefaultActivitySid", *params.DefaultActivitySid) +} + if params != nil && params.EventCallbackUrl != nil { + data.Set("EventCallbackUrl", *params.EventCallbackUrl) +} + if params != nil && params.EventsFilter != nil { + data.Set("EventsFilter", *params.EventsFilter) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.MultiTaskEnabled != nil { + data.Set("MultiTaskEnabled", fmt.Sprint(*params.MultiTaskEnabled)) +} + if params != nil && params.PrioritizeQueueOrder != nil { + data.Set("PrioritizeQueueOrder", *params.PrioritizeQueueOrder) +} + if params != nil && params.TimeoutActivitySid != nil { + data.Set("TimeoutActivitySid", *params.TimeoutActivitySid) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &TaskrouterV1Workspace{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() + + ps := &TaskrouterV1Workspace{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } diff --git a/twilio/rest/taskrouter/v1/model_list_activity_response.go b/twilio/rest/taskrouter/v1/model_list_activity_response.go index 9d785e5e3..691cb4b99 100644 --- a/twilio/rest/taskrouter/v1/model_list_activity_response.go +++ b/twilio/rest/taskrouter/v1/model_list_activity_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListActivityResponse struct for ListActivityResponse type ListActivityResponse struct { Activities []TaskrouterV1WorkspaceActivity `json:"Activities,omitempty"` - Meta ListWorkspaceResponseMeta `json:"Meta,omitempty"` + Meta ListWorkspaceResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/taskrouter/v1/model_list_event_response.go b/twilio/rest/taskrouter/v1/model_list_event_response.go index 69625f1af..a499198a0 100644 --- a/twilio/rest/taskrouter/v1/model_list_event_response.go +++ b/twilio/rest/taskrouter/v1/model_list_event_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListEventResponse struct for ListEventResponse type ListEventResponse struct { Events []TaskrouterV1WorkspaceEvent `json:"Events,omitempty"` - Meta ListWorkspaceResponseMeta `json:"Meta,omitempty"` + Meta ListWorkspaceResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/taskrouter/v1/model_list_task_channel_response.go b/twilio/rest/taskrouter/v1/model_list_task_channel_response.go index c7889118a..b33f6e4ac 100644 --- a/twilio/rest/taskrouter/v1/model_list_task_channel_response.go +++ b/twilio/rest/taskrouter/v1/model_list_task_channel_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListTaskChannelResponse struct for ListTaskChannelResponse type ListTaskChannelResponse struct { Channels []TaskrouterV1WorkspaceTaskChannel `json:"Channels,omitempty"` - Meta ListWorkspaceResponseMeta `json:"Meta,omitempty"` + Meta ListWorkspaceResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/taskrouter/v1/model_list_task_queue_response.go b/twilio/rest/taskrouter/v1/model_list_task_queue_response.go index 466cb91bd..fd4c6e42d 100644 --- a/twilio/rest/taskrouter/v1/model_list_task_queue_response.go +++ b/twilio/rest/taskrouter/v1/model_list_task_queue_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListTaskQueueResponse struct for ListTaskQueueResponse type ListTaskQueueResponse struct { - Meta ListWorkspaceResponseMeta `json:"Meta,omitempty"` + Meta ListWorkspaceResponseMeta `json:"Meta,omitempty"` TaskQueues []TaskrouterV1WorkspaceTaskQueue `json:"TaskQueues,omitempty"` } diff --git a/twilio/rest/taskrouter/v1/model_list_task_queues_statistics_response.go b/twilio/rest/taskrouter/v1/model_list_task_queues_statistics_response.go index 367a90a1b..270e3fc0f 100644 --- a/twilio/rest/taskrouter/v1/model_list_task_queues_statistics_response.go +++ b/twilio/rest/taskrouter/v1/model_list_task_queues_statistics_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListTaskQueuesStatisticsResponse struct for ListTaskQueuesStatisticsResponse type ListTaskQueuesStatisticsResponse struct { - Meta ListWorkspaceResponseMeta `json:"Meta,omitempty"` + Meta ListWorkspaceResponseMeta `json:"Meta,omitempty"` TaskQueuesStatistics []TaskrouterV1WorkspaceTaskQueueTaskQueuesStatistics `json:"TaskQueuesStatistics,omitempty"` } diff --git a/twilio/rest/taskrouter/v1/model_list_task_reservation_response.go b/twilio/rest/taskrouter/v1/model_list_task_reservation_response.go index ac7a7b6da..6c4c855ad 100644 --- a/twilio/rest/taskrouter/v1/model_list_task_reservation_response.go +++ b/twilio/rest/taskrouter/v1/model_list_task_reservation_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListTaskReservationResponse struct for ListTaskReservationResponse type ListTaskReservationResponse struct { - Meta ListWorkspaceResponseMeta `json:"Meta,omitempty"` + Meta ListWorkspaceResponseMeta `json:"Meta,omitempty"` Reservations []TaskrouterV1WorkspaceTaskTaskReservation `json:"Reservations,omitempty"` } diff --git a/twilio/rest/taskrouter/v1/model_list_task_response.go b/twilio/rest/taskrouter/v1/model_list_task_response.go index 0a9d39b1b..4c0f2a280 100644 --- a/twilio/rest/taskrouter/v1/model_list_task_response.go +++ b/twilio/rest/taskrouter/v1/model_list_task_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListTaskResponse struct for ListTaskResponse type ListTaskResponse struct { - Meta ListWorkspaceResponseMeta `json:"Meta,omitempty"` + Meta ListWorkspaceResponseMeta `json:"Meta,omitempty"` Tasks []TaskrouterV1WorkspaceTask `json:"Tasks,omitempty"` } diff --git a/twilio/rest/taskrouter/v1/model_list_worker_channel_response.go b/twilio/rest/taskrouter/v1/model_list_worker_channel_response.go index fec175d5c..eb8cb79aa 100644 --- a/twilio/rest/taskrouter/v1/model_list_worker_channel_response.go +++ b/twilio/rest/taskrouter/v1/model_list_worker_channel_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListWorkerChannelResponse struct for ListWorkerChannelResponse type ListWorkerChannelResponse struct { Channels []TaskrouterV1WorkspaceWorkerWorkerChannel `json:"Channels,omitempty"` - Meta ListWorkspaceResponseMeta `json:"Meta,omitempty"` + Meta ListWorkspaceResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/taskrouter/v1/model_list_worker_reservation_response.go b/twilio/rest/taskrouter/v1/model_list_worker_reservation_response.go index 7550734bc..08000835a 100644 --- a/twilio/rest/taskrouter/v1/model_list_worker_reservation_response.go +++ b/twilio/rest/taskrouter/v1/model_list_worker_reservation_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListWorkerReservationResponse struct for ListWorkerReservationResponse type ListWorkerReservationResponse struct { - Meta ListWorkspaceResponseMeta `json:"Meta,omitempty"` + Meta ListWorkspaceResponseMeta `json:"Meta,omitempty"` Reservations []TaskrouterV1WorkspaceWorkerWorkerReservation `json:"Reservations,omitempty"` } diff --git a/twilio/rest/taskrouter/v1/model_list_worker_response.go b/twilio/rest/taskrouter/v1/model_list_worker_response.go index 570ad78cb..9d2b0fc44 100644 --- a/twilio/rest/taskrouter/v1/model_list_worker_response.go +++ b/twilio/rest/taskrouter/v1/model_list_worker_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListWorkerResponse struct for ListWorkerResponse type ListWorkerResponse struct { - Meta ListWorkspaceResponseMeta `json:"Meta,omitempty"` + Meta ListWorkspaceResponseMeta `json:"Meta,omitempty"` Workers []TaskrouterV1WorkspaceWorker `json:"Workers,omitempty"` } diff --git a/twilio/rest/taskrouter/v1/model_list_workflow_response.go b/twilio/rest/taskrouter/v1/model_list_workflow_response.go index 5a853f50f..f9179a938 100644 --- a/twilio/rest/taskrouter/v1/model_list_workflow_response.go +++ b/twilio/rest/taskrouter/v1/model_list_workflow_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListWorkflowResponse struct for ListWorkflowResponse type ListWorkflowResponse struct { - Meta ListWorkspaceResponseMeta `json:"Meta,omitempty"` + Meta ListWorkspaceResponseMeta `json:"Meta,omitempty"` Workflows []TaskrouterV1WorkspaceWorkflow `json:"Workflows,omitempty"` } diff --git a/twilio/rest/taskrouter/v1/model_list_workspace_response.go b/twilio/rest/taskrouter/v1/model_list_workspace_response.go index b5c6ec1b1..2a43888f5 100644 --- a/twilio/rest/taskrouter/v1/model_list_workspace_response.go +++ b/twilio/rest/taskrouter/v1/model_list_workspace_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListWorkspaceResponse struct for ListWorkspaceResponse type ListWorkspaceResponse struct { - Meta ListWorkspaceResponseMeta `json:"Meta,omitempty"` - Workspaces []TaskrouterV1Workspace `json:"Workspaces,omitempty"` + Meta ListWorkspaceResponseMeta `json:"Meta,omitempty"` + Workspaces []TaskrouterV1Workspace `json:"Workspaces,omitempty"` } diff --git a/twilio/rest/taskrouter/v1/model_list_workspace_response_meta.go b/twilio/rest/taskrouter/v1/model_list_workspace_response_meta.go index f868cd1c0..e3bc8861a 100644 --- a/twilio/rest/taskrouter/v1/model_list_workspace_response_meta.go +++ b/twilio/rest/taskrouter/v1/model_list_workspace_response_meta.go @@ -1,23 +1,22 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListWorkspaceResponseMeta struct for ListWorkspaceResponseMeta type ListWorkspaceResponseMeta struct { - FirstPageUrl string `json:"FirstPageUrl,omitempty"` - Key string `json:"Key,omitempty"` - NextPageUrl string `json:"NextPageUrl,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` - Url string `json:"Url,omitempty"` + Url string `json:"Url,omitempty"` } diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace.go index fb28b9c14..6b29ea1bc 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace.go @@ -1,20 +1,18 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // TaskrouterV1Workspace struct for TaskrouterV1Workspace type TaskrouterV1Workspace struct { // The SID of the Account that created the resource diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_activity.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_activity.go index 77a9d0b66..d4e193f3a 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_activity.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_activity.go @@ -1,20 +1,18 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // TaskrouterV1WorkspaceActivity struct for TaskrouterV1WorkspaceActivity type TaskrouterV1WorkspaceActivity struct { // The SID of the Account that created the resource diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_event.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_event.go index 4e62f7713..9f72612e5 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_event.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_event.go @@ -1,20 +1,18 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // TaskrouterV1WorkspaceEvent struct for TaskrouterV1WorkspaceEvent type TaskrouterV1WorkspaceEvent struct { // The SID of the Account that created the resource diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task.go index 2ebb1eb23..b32a07261 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task.go @@ -1,20 +1,18 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // TaskrouterV1WorkspaceTask struct for TaskrouterV1WorkspaceTask type TaskrouterV1WorkspaceTask struct { // The SID of the Account that created the resource diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_channel.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_channel.go index a2af030b3..d62552eb6 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_channel.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_channel.go @@ -1,20 +1,18 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // TaskrouterV1WorkspaceTaskChannel struct for TaskrouterV1WorkspaceTaskChannel type TaskrouterV1WorkspaceTaskChannel struct { // The SID of the Account that created the resource diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue.go index a3bea67ab..336f25990 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue.go @@ -1,20 +1,18 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // TaskrouterV1WorkspaceTaskQueue struct for TaskrouterV1WorkspaceTaskQueue type TaskrouterV1WorkspaceTaskQueue struct { // The SID of the Account that created the resource diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue_task_queue_cumulative_statistics.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue_task_queue_cumulative_statistics.go index 5dec663eb..c1e05c17b 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue_task_queue_cumulative_statistics.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue_task_queue_cumulative_statistics.go @@ -1,20 +1,18 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // TaskrouterV1WorkspaceTaskQueueTaskQueueCumulativeStatistics struct for TaskrouterV1WorkspaceTaskQueueTaskQueueCumulativeStatistics type TaskrouterV1WorkspaceTaskQueueTaskQueueCumulativeStatistics struct { // The SID of the Account that created the resource diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue_task_queue_real_time_statistics.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue_task_queue_real_time_statistics.go index 2c1824292..e1e80a784 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue_task_queue_real_time_statistics.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue_task_queue_real_time_statistics.go @@ -1,16 +1,15 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // TaskrouterV1WorkspaceTaskQueueTaskQueueRealTimeStatistics struct for TaskrouterV1WorkspaceTaskQueueTaskQueueRealTimeStatistics type TaskrouterV1WorkspaceTaskQueueTaskQueueRealTimeStatistics struct { // The SID of the Account that created the resource diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue_task_queue_statistics.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue_task_queue_statistics.go index ae92903a2..d6bd3b5cb 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue_task_queue_statistics.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue_task_queue_statistics.go @@ -1,16 +1,15 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // TaskrouterV1WorkspaceTaskQueueTaskQueueStatistics struct for TaskrouterV1WorkspaceTaskQueueTaskQueueStatistics type TaskrouterV1WorkspaceTaskQueueTaskQueueStatistics struct { // The SID of the Account that created the resource diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue_task_queues_statistics.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue_task_queues_statistics.go index cb658e252..a9454e08b 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue_task_queues_statistics.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue_task_queues_statistics.go @@ -1,16 +1,15 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // TaskrouterV1WorkspaceTaskQueueTaskQueuesStatistics struct for TaskrouterV1WorkspaceTaskQueueTaskQueuesStatistics type TaskrouterV1WorkspaceTaskQueueTaskQueuesStatistics struct { // The SID of the Account that created the resource diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_task_reservation.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_task_reservation.go index 00f342de2..f65ddbe6e 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_task_reservation.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_task_reservation.go @@ -1,20 +1,18 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // TaskrouterV1WorkspaceTaskTaskReservation struct for TaskrouterV1WorkspaceTaskTaskReservation type TaskrouterV1WorkspaceTaskTaskReservation struct { // The SID of the Account that created the resource diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker.go index 9a1c4d5af..85ea5b707 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker.go @@ -1,20 +1,18 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // TaskrouterV1WorkspaceWorker struct for TaskrouterV1WorkspaceWorker type TaskrouterV1WorkspaceWorker struct { // The SID of the Account that created the resource diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_worker_channel.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_worker_channel.go index fd969ad35..20b8c2d6e 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_worker_channel.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_worker_channel.go @@ -1,20 +1,18 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // TaskrouterV1WorkspaceWorkerWorkerChannel struct for TaskrouterV1WorkspaceWorkerWorkerChannel type TaskrouterV1WorkspaceWorkerWorkerChannel struct { // The SID of the Account that created the resource diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_worker_instance_statistics.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_worker_instance_statistics.go index 86875ae7a..87746460d 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_worker_instance_statistics.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_worker_instance_statistics.go @@ -1,16 +1,15 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // TaskrouterV1WorkspaceWorkerWorkerInstanceStatistics struct for TaskrouterV1WorkspaceWorkerWorkerInstanceStatistics type TaskrouterV1WorkspaceWorkerWorkerInstanceStatistics struct { // The SID of the Account that created the resource diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_worker_reservation.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_worker_reservation.go index 6edfb2192..0e44364c8 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_worker_reservation.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_worker_reservation.go @@ -1,20 +1,18 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // TaskrouterV1WorkspaceWorkerWorkerReservation struct for TaskrouterV1WorkspaceWorkerWorkerReservation type TaskrouterV1WorkspaceWorkerWorkerReservation struct { // The SID of the Account that created the resource diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_worker_statistics.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_worker_statistics.go index 510eaa0cd..c0ac082b5 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_worker_statistics.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_worker_statistics.go @@ -1,16 +1,15 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // TaskrouterV1WorkspaceWorkerWorkerStatistics struct for TaskrouterV1WorkspaceWorkerWorkerStatistics type TaskrouterV1WorkspaceWorkerWorkerStatistics struct { // The SID of the Account that created the resource diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_workers_cumulative_statistics.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_workers_cumulative_statistics.go index 7e16eb857..cba3eb335 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_workers_cumulative_statistics.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_workers_cumulative_statistics.go @@ -1,20 +1,18 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // TaskrouterV1WorkspaceWorkerWorkersCumulativeStatistics struct for TaskrouterV1WorkspaceWorkerWorkersCumulativeStatistics type TaskrouterV1WorkspaceWorkerWorkersCumulativeStatistics struct { // The SID of the Account that created the resource diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_workers_real_time_statistics.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_workers_real_time_statistics.go index 08f02c990..652b78023 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_workers_real_time_statistics.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_workers_real_time_statistics.go @@ -1,16 +1,15 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // TaskrouterV1WorkspaceWorkerWorkersRealTimeStatistics struct for TaskrouterV1WorkspaceWorkerWorkersRealTimeStatistics type TaskrouterV1WorkspaceWorkerWorkersRealTimeStatistics struct { // The SID of the Account that created the resource diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workflow.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workflow.go index 5416a696c..7079931bf 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workflow.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workflow.go @@ -1,20 +1,18 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // TaskrouterV1WorkspaceWorkflow struct for TaskrouterV1WorkspaceWorkflow type TaskrouterV1WorkspaceWorkflow struct { // The SID of the Account that created the resource diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workflow_workflow_cumulative_statistics.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workflow_workflow_cumulative_statistics.go index 176f5cc56..ce14d864d 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workflow_workflow_cumulative_statistics.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workflow_workflow_cumulative_statistics.go @@ -1,20 +1,18 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // TaskrouterV1WorkspaceWorkflowWorkflowCumulativeStatistics struct for TaskrouterV1WorkspaceWorkflowWorkflowCumulativeStatistics type TaskrouterV1WorkspaceWorkflowWorkflowCumulativeStatistics struct { // The SID of the Account that created the resource diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workflow_workflow_real_time_statistics.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workflow_workflow_real_time_statistics.go index 31c58f35f..30696af9e 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workflow_workflow_real_time_statistics.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workflow_workflow_real_time_statistics.go @@ -1,16 +1,15 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // TaskrouterV1WorkspaceWorkflowWorkflowRealTimeStatistics struct for TaskrouterV1WorkspaceWorkflowWorkflowRealTimeStatistics type TaskrouterV1WorkspaceWorkflowWorkflowRealTimeStatistics struct { // The SID of the Account that created the resource diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workflow_workflow_statistics.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workflow_workflow_statistics.go index 04a5acabc..2f5c0a83b 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workflow_workflow_statistics.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workflow_workflow_statistics.go @@ -1,16 +1,15 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // TaskrouterV1WorkspaceWorkflowWorkflowStatistics struct for TaskrouterV1WorkspaceWorkflowWorkflowStatistics type TaskrouterV1WorkspaceWorkflowWorkflowStatistics struct { // The SID of the Account that created the resource diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workspace_cumulative_statistics.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workspace_cumulative_statistics.go index fad6ca928..1985050f9 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workspace_cumulative_statistics.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workspace_cumulative_statistics.go @@ -1,20 +1,18 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // TaskrouterV1WorkspaceWorkspaceCumulativeStatistics struct for TaskrouterV1WorkspaceWorkspaceCumulativeStatistics type TaskrouterV1WorkspaceWorkspaceCumulativeStatistics struct { // The SID of the Account that created the resource diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workspace_real_time_statistics.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workspace_real_time_statistics.go index b5414c357..f90831cc0 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workspace_real_time_statistics.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workspace_real_time_statistics.go @@ -1,16 +1,15 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // TaskrouterV1WorkspaceWorkspaceRealTimeStatistics struct for TaskrouterV1WorkspaceWorkspaceRealTimeStatistics type TaskrouterV1WorkspaceWorkspaceRealTimeStatistics struct { // The SID of the Account that created the resource diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workspace_statistics.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workspace_statistics.go index 3423ac0b9..ac308f56c 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workspace_statistics.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workspace_statistics.go @@ -1,16 +1,15 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // TaskrouterV1WorkspaceWorkspaceStatistics struct for TaskrouterV1WorkspaceWorkspaceStatistics type TaskrouterV1WorkspaceWorkspaceStatistics struct { // The SID of the Account that created the resource diff --git a/twilio/rest/trunking/v1/api_default.go b/twilio/rest/trunking/v1/api_default.go index e33af5d93..ca589eb90 100644 --- a/twilio/rest/trunking/v1/api_default.go +++ b/twilio/rest/trunking/v1/api_default.go @@ -1,11 +1,11 @@ /* - * Twilio - Trunking - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Trunking + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,10 +14,9 @@ package openapi import ( "encoding/json" "fmt" - "net/url" - "strings" - twilio "github.com/twilio/twilio-go/client" + "net/url" + "strings" ) type DefaultApiService struct { @@ -26,8 +25,8 @@ type DefaultApiService struct { } func NewDefaultApiService(client *twilio.Client) *DefaultApiService { - return &DefaultApiService{ - client: client, + return &DefaultApiService { + client: client, baseURL: "https://trunking.twilio.com", } } @@ -43,33 +42,33 @@ type CreateCredentialListParams struct { * @param optional nil or *CreateCredentialListParams - Optional Parameters: * @param "CredentialListSid" (string) - The SID of the [Credential List](https://www.twilio.com/docs/voice/sip/api/sip-credentiallist-resource) that you want to associate with the trunk. Once associated, we will authenticate access to the trunk against this list. * @return TrunkingV1TrunkCredentialList - */ +*/ func (c *DefaultApiService) CreateCredentialList(TrunkSid string, params *CreateCredentialListParams) (*TrunkingV1TrunkCredentialList, error) { - path := "/v1/Trunks/{TrunkSid}/CredentialLists" + path := "/v1/Trunks/{TrunkSid}/CredentialLists" path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.CredentialListSid != nil { - data.Set("CredentialListSid", *params.CredentialListSid) - } + if params != nil && params.CredentialListSid != nil { + data.Set("CredentialListSid", *params.CredentialListSid) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &TrunkingV1TrunkCredentialList{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &TrunkingV1TrunkCredentialList{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateIpAccessControlListParams Optional parameters for the method 'CreateIpAccessControlList' type CreateIpAccessControlListParams struct { IpAccessControlListSid *string `json:"IpAccessControlListSid,omitempty"` @@ -82,40 +81,40 @@ type CreateIpAccessControlListParams struct { * @param optional nil or *CreateIpAccessControlListParams - Optional Parameters: * @param "IpAccessControlListSid" (string) - The SID of the [IP Access Control List](https://www.twilio.com/docs/voice/sip/api/sip-ipaccesscontrollist-resource) that you want to associate with the trunk. * @return TrunkingV1TrunkIpAccessControlList - */ +*/ func (c *DefaultApiService) CreateIpAccessControlList(TrunkSid string, params *CreateIpAccessControlListParams) (*TrunkingV1TrunkIpAccessControlList, error) { - path := "/v1/Trunks/{TrunkSid}/IpAccessControlLists" + path := "/v1/Trunks/{TrunkSid}/IpAccessControlLists" path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.IpAccessControlListSid != nil { - data.Set("IpAccessControlListSid", *params.IpAccessControlListSid) - } + if params != nil && params.IpAccessControlListSid != nil { + data.Set("IpAccessControlListSid", *params.IpAccessControlListSid) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &TrunkingV1TrunkIpAccessControlList{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &TrunkingV1TrunkIpAccessControlList{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateOriginationUrlParams Optional parameters for the method 'CreateOriginationUrl' type CreateOriginationUrlParams struct { - Enabled *bool `json:"Enabled,omitempty"` + Enabled *bool `json:"Enabled,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` - Priority *int32 `json:"Priority,omitempty"` - SipUrl *string `json:"SipUrl,omitempty"` - Weight *int32 `json:"Weight,omitempty"` + Priority *int32 `json:"Priority,omitempty"` + SipUrl *string `json:"SipUrl,omitempty"` + Weight *int32 `json:"Weight,omitempty"` } /* @@ -128,45 +127,45 @@ type CreateOriginationUrlParams struct { * @param "SipUrl" (string) - The SIP address you want Twilio to route your Origination calls to. This must be a `sip:` schema. * @param "Weight" (int32) - The value that determines the relative share of the load the URI should receive compared to other URIs with the same priority. Can be an integer from 1 to 65535, inclusive, and the default is 10. URLs with higher values receive more load than those with lower ones with the same priority. * @return TrunkingV1TrunkOriginationUrl - */ +*/ func (c *DefaultApiService) CreateOriginationUrl(TrunkSid string, params *CreateOriginationUrlParams) (*TrunkingV1TrunkOriginationUrl, error) { - path := "/v1/Trunks/{TrunkSid}/OriginationUrls" + path := "/v1/Trunks/{TrunkSid}/OriginationUrls" path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Enabled != nil { - data.Set("Enabled", fmt.Sprint(*params.Enabled)) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.Priority != nil { - data.Set("Priority", fmt.Sprint(*params.Priority)) - } - if params != nil && params.SipUrl != nil { - data.Set("SipUrl", *params.SipUrl) - } - if params != nil && params.Weight != nil { - data.Set("Weight", fmt.Sprint(*params.Weight)) - } + if params != nil && params.Enabled != nil { + data.Set("Enabled", fmt.Sprint(*params.Enabled)) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.Priority != nil { + data.Set("Priority", fmt.Sprint(*params.Priority)) +} + if params != nil && params.SipUrl != nil { + data.Set("SipUrl", *params.SipUrl) +} + if params != nil && params.Weight != nil { + data.Set("Weight", fmt.Sprint(*params.Weight)) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &TrunkingV1TrunkOriginationUrl{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &TrunkingV1TrunkOriginationUrl{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreatePhoneNumberParams Optional parameters for the method 'CreatePhoneNumber' type CreatePhoneNumberParams struct { PhoneNumberSid *string `json:"PhoneNumberSid,omitempty"` @@ -178,42 +177,42 @@ type CreatePhoneNumberParams struct { * @param optional nil or *CreatePhoneNumberParams - Optional Parameters: * @param "PhoneNumberSid" (string) - The SID of the [Incoming Phone Number](https://www.twilio.com/docs/phone-numbers/api/incomingphonenumber-resource) that you want to associate with the trunk. * @return TrunkingV1TrunkPhoneNumber - */ +*/ func (c *DefaultApiService) CreatePhoneNumber(TrunkSid string, params *CreatePhoneNumberParams) (*TrunkingV1TrunkPhoneNumber, error) { - path := "/v1/Trunks/{TrunkSid}/PhoneNumbers" + path := "/v1/Trunks/{TrunkSid}/PhoneNumbers" path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PhoneNumberSid != nil { - data.Set("PhoneNumberSid", *params.PhoneNumberSid) - } + if params != nil && params.PhoneNumberSid != nil { + data.Set("PhoneNumberSid", *params.PhoneNumberSid) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &TrunkingV1TrunkPhoneNumber{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &TrunkingV1TrunkPhoneNumber{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateTrunkParams Optional parameters for the method 'CreateTrunk' type CreateTrunkParams struct { - CnamLookupEnabled *bool `json:"CnamLookupEnabled,omitempty"` + CnamLookupEnabled *bool `json:"CnamLookupEnabled,omitempty"` DisasterRecoveryMethod *string `json:"DisasterRecoveryMethod,omitempty"` - DisasterRecoveryUrl *string `json:"DisasterRecoveryUrl,omitempty"` - DomainName *string `json:"DomainName,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Secure *bool `json:"Secure,omitempty"` - TransferMode *string `json:"TransferMode,omitempty"` + DisasterRecoveryUrl *string `json:"DisasterRecoveryUrl,omitempty"` + DomainName *string `json:"DomainName,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Secure *bool `json:"Secure,omitempty"` + TransferMode *string `json:"TransferMode,omitempty"` } /* @@ -227,71 +226,74 @@ type CreateTrunkParams struct { * @param "Secure" (bool) - Whether Secure Trunking is enabled for the trunk. If enabled, all calls going through the trunk will be secure using SRTP for media and TLS for signaling. If disabled, then RTP will be used for media. See [Secure Trunking](https://www.twilio.com/docs/sip-trunking#securetrunking) for more information. * @param "TransferMode" (string) - The call transfer settings for the trunk. Can be: `enable-all`, `sip-only` and `disable-all`. See [Transfer](https://www.twilio.com/docs/sip-trunking/call-transfer) for more information. * @return TrunkingV1Trunk - */ +*/ func (c *DefaultApiService) CreateTrunk(params *CreateTrunkParams) (*TrunkingV1Trunk, error) { - path := "/v1/Trunks" + path := "/v1/Trunks" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.CnamLookupEnabled != nil { - data.Set("CnamLookupEnabled", fmt.Sprint(*params.CnamLookupEnabled)) - } - if params != nil && params.DisasterRecoveryMethod != nil { - data.Set("DisasterRecoveryMethod", *params.DisasterRecoveryMethod) - } - if params != nil && params.DisasterRecoveryUrl != nil { - data.Set("DisasterRecoveryUrl", *params.DisasterRecoveryUrl) - } - if params != nil && params.DomainName != nil { - data.Set("DomainName", *params.DomainName) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.Secure != nil { - data.Set("Secure", fmt.Sprint(*params.Secure)) - } - if params != nil && params.TransferMode != nil { - data.Set("TransferMode", *params.TransferMode) - } + if params != nil && params.CnamLookupEnabled != nil { + data.Set("CnamLookupEnabled", fmt.Sprint(*params.CnamLookupEnabled)) +} + if params != nil && params.DisasterRecoveryMethod != nil { + data.Set("DisasterRecoveryMethod", *params.DisasterRecoveryMethod) +} + if params != nil && params.DisasterRecoveryUrl != nil { + data.Set("DisasterRecoveryUrl", *params.DisasterRecoveryUrl) +} + if params != nil && params.DomainName != nil { + data.Set("DomainName", *params.DomainName) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.Secure != nil { + data.Set("Secure", fmt.Sprint(*params.Secure)) +} + if params != nil && params.TransferMode != nil { + data.Set("TransferMode", *params.TransferMode) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &TrunkingV1Trunk{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err + ps := &TrunkingV1Trunk{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* * DeleteCredentialList Method for DeleteCredentialList * @param TrunkSid The SID of the Trunk from which to delete the credential list. * @param Sid The unique string that we created to identify the CredentialList resource to delete. - */ -func (c *DefaultApiService) DeleteCredentialList(TrunkSid string, Sid string) error { - path := "/v1/Trunks/{TrunkSid}/CredentialLists/{Sid}" +*/ +func (c *DefaultApiService) DeleteCredentialList(TrunkSid string, Sid string, ) (error) { + path := "/v1/Trunks/{TrunkSid}/CredentialLists/{Sid}" path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - return nil + defer resp.Body.Close() + + return nil } /* @@ -299,90 +301,98 @@ func (c *DefaultApiService) DeleteCredentialList(TrunkSid string, Sid string) er * Remove an associated IP Access Control List from a Trunk * @param TrunkSid The SID of the Trunk from which to delete the IP Access Control List. * @param Sid The unique string that we created to identify the IpAccessControlList resource to delete. - */ -func (c *DefaultApiService) DeleteIpAccessControlList(TrunkSid string, Sid string) error { - path := "/v1/Trunks/{TrunkSid}/IpAccessControlLists/{Sid}" +*/ +func (c *DefaultApiService) DeleteIpAccessControlList(TrunkSid string, Sid string, ) (error) { + path := "/v1/Trunks/{TrunkSid}/IpAccessControlLists/{Sid}" path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* * DeleteOriginationUrl Method for DeleteOriginationUrl * @param TrunkSid The SID of the Trunk from which to delete the OriginationUrl. * @param Sid The unique string that we created to identify the OriginationUrl resource to delete. - */ -func (c *DefaultApiService) DeleteOriginationUrl(TrunkSid string, Sid string) error { - path := "/v1/Trunks/{TrunkSid}/OriginationUrls/{Sid}" +*/ +func (c *DefaultApiService) DeleteOriginationUrl(TrunkSid string, Sid string, ) (error) { + path := "/v1/Trunks/{TrunkSid}/OriginationUrls/{Sid}" path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* * DeletePhoneNumber Method for DeletePhoneNumber * @param TrunkSid The SID of the Trunk from which to delete the PhoneNumber resource. * @param Sid The unique string that we created to identify the PhoneNumber resource to delete. - */ -func (c *DefaultApiService) DeletePhoneNumber(TrunkSid string, Sid string) error { - path := "/v1/Trunks/{TrunkSid}/PhoneNumbers/{Sid}" +*/ +func (c *DefaultApiService) DeletePhoneNumber(TrunkSid string, Sid string, ) (error) { + path := "/v1/Trunks/{TrunkSid}/PhoneNumbers/{Sid}" path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* * DeleteTrunk Method for DeleteTrunk * @param Sid The unique string that we created to identify the Trunk resource to delete. - */ -func (c *DefaultApiService) DeleteTrunk(Sid string) error { - path := "/v1/Trunks/{Sid}" +*/ +func (c *DefaultApiService) DeleteTrunk(Sid string, ) (error) { + path := "/v1/Trunks/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - return nil + defer resp.Body.Close() + + return nil } /* @@ -390,28 +400,30 @@ func (c *DefaultApiService) DeleteTrunk(Sid string) error { * @param TrunkSid The SID of the Trunk from which to fetch the credential list. * @param Sid The unique string that we created to identify the CredentialList resource to fetch. * @return TrunkingV1TrunkCredentialList - */ -func (c *DefaultApiService) FetchCredentialList(TrunkSid string, Sid string) (*TrunkingV1TrunkCredentialList, error) { - path := "/v1/Trunks/{TrunkSid}/CredentialLists/{Sid}" +*/ +func (c *DefaultApiService) FetchCredentialList(TrunkSid string, Sid string, ) (*TrunkingV1TrunkCredentialList, error) { + path := "/v1/Trunks/{TrunkSid}/CredentialLists/{Sid}" path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &TrunkingV1TrunkCredentialList{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &TrunkingV1TrunkCredentialList{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -419,28 +431,30 @@ func (c *DefaultApiService) FetchCredentialList(TrunkSid string, Sid string) (*T * @param TrunkSid The SID of the Trunk from which to fetch the IP Access Control List. * @param Sid The unique string that we created to identify the IpAccessControlList resource to fetch. * @return TrunkingV1TrunkIpAccessControlList - */ -func (c *DefaultApiService) FetchIpAccessControlList(TrunkSid string, Sid string) (*TrunkingV1TrunkIpAccessControlList, error) { - path := "/v1/Trunks/{TrunkSid}/IpAccessControlLists/{Sid}" +*/ +func (c *DefaultApiService) FetchIpAccessControlList(TrunkSid string, Sid string, ) (*TrunkingV1TrunkIpAccessControlList, error) { + path := "/v1/Trunks/{TrunkSid}/IpAccessControlLists/{Sid}" path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &TrunkingV1TrunkIpAccessControlList{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &TrunkingV1TrunkIpAccessControlList{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -448,28 +462,30 @@ func (c *DefaultApiService) FetchIpAccessControlList(TrunkSid string, Sid string * @param TrunkSid The SID of the Trunk from which to fetch the OriginationUrl. * @param Sid The unique string that we created to identify the OriginationUrl resource to fetch. * @return TrunkingV1TrunkOriginationUrl - */ -func (c *DefaultApiService) FetchOriginationUrl(TrunkSid string, Sid string) (*TrunkingV1TrunkOriginationUrl, error) { - path := "/v1/Trunks/{TrunkSid}/OriginationUrls/{Sid}" +*/ +func (c *DefaultApiService) FetchOriginationUrl(TrunkSid string, Sid string, ) (*TrunkingV1TrunkOriginationUrl, error) { + path := "/v1/Trunks/{TrunkSid}/OriginationUrls/{Sid}" path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &TrunkingV1TrunkOriginationUrl{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &TrunkingV1TrunkOriginationUrl{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -477,84 +493,89 @@ func (c *DefaultApiService) FetchOriginationUrl(TrunkSid string, Sid string) (*T * @param TrunkSid The SID of the Trunk from which to fetch the PhoneNumber resource. * @param Sid The unique string that we created to identify the PhoneNumber resource to fetch. * @return TrunkingV1TrunkPhoneNumber - */ -func (c *DefaultApiService) FetchPhoneNumber(TrunkSid string, Sid string) (*TrunkingV1TrunkPhoneNumber, error) { - path := "/v1/Trunks/{TrunkSid}/PhoneNumbers/{Sid}" +*/ +func (c *DefaultApiService) FetchPhoneNumber(TrunkSid string, Sid string, ) (*TrunkingV1TrunkPhoneNumber, error) { + path := "/v1/Trunks/{TrunkSid}/PhoneNumbers/{Sid}" path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &TrunkingV1TrunkPhoneNumber{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err + defer resp.Body.Close() + + ps := &TrunkingV1TrunkPhoneNumber{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* * FetchRecording Method for FetchRecording * @param TrunkSid The SID of the Trunk from which to fetch the recording settings. * @return TrunkingV1TrunkRecording - */ -func (c *DefaultApiService) FetchRecording(TrunkSid string) (*TrunkingV1TrunkRecording, error) { - path := "/v1/Trunks/{TrunkSid}/Recording" +*/ +func (c *DefaultApiService) FetchRecording(TrunkSid string, ) (*TrunkingV1TrunkRecording, error) { + path := "/v1/Trunks/{TrunkSid}/Recording" path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &TrunkingV1TrunkRecording{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &TrunkingV1TrunkRecording{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * FetchTrunk Method for FetchTrunk * @param Sid The unique string that we created to identify the Trunk resource to fetch. * @return TrunkingV1Trunk - */ -func (c *DefaultApiService) FetchTrunk(Sid string) (*TrunkingV1Trunk, error) { - path := "/v1/Trunks/{Sid}" +*/ +func (c *DefaultApiService) FetchTrunk(Sid string, ) (*TrunkingV1Trunk, error) { + path := "/v1/Trunks/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &TrunkingV1Trunk{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err -} + defer resp.Body.Close() + ps := &TrunkingV1Trunk{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} // ListCredentialListParams Optional parameters for the method 'ListCredentialList' type ListCredentialListParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -566,33 +587,33 @@ type ListCredentialListParams struct { * @param optional nil or *ListCredentialListParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListCredentialListResponse - */ +*/ func (c *DefaultApiService) ListCredentialList(TrunkSid string, params *ListCredentialListParams) (*ListCredentialListResponse, error) { - path := "/v1/Trunks/{TrunkSid}/CredentialLists" + path := "/v1/Trunks/{TrunkSid}/CredentialLists" path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListCredentialListResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListCredentialListResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListIpAccessControlListParams Optional parameters for the method 'ListIpAccessControlList' type ListIpAccessControlListParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -605,33 +626,33 @@ type ListIpAccessControlListParams struct { * @param optional nil or *ListIpAccessControlListParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListIpAccessControlListResponse - */ +*/ func (c *DefaultApiService) ListIpAccessControlList(TrunkSid string, params *ListIpAccessControlListParams) (*ListIpAccessControlListResponse, error) { - path := "/v1/Trunks/{TrunkSid}/IpAccessControlLists" + path := "/v1/Trunks/{TrunkSid}/IpAccessControlLists" path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListIpAccessControlListResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListIpAccessControlListResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListOriginationUrlParams Optional parameters for the method 'ListOriginationUrl' type ListOriginationUrlParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -643,33 +664,33 @@ type ListOriginationUrlParams struct { * @param optional nil or *ListOriginationUrlParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListOriginationUrlResponse - */ +*/ func (c *DefaultApiService) ListOriginationUrl(TrunkSid string, params *ListOriginationUrlParams) (*ListOriginationUrlResponse, error) { - path := "/v1/Trunks/{TrunkSid}/OriginationUrls" + path := "/v1/Trunks/{TrunkSid}/OriginationUrls" path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListOriginationUrlResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListOriginationUrlResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListPhoneNumberParams Optional parameters for the method 'ListPhoneNumber' type ListPhoneNumberParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -681,33 +702,33 @@ type ListPhoneNumberParams struct { * @param optional nil or *ListPhoneNumberParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListPhoneNumberResponse - */ +*/ func (c *DefaultApiService) ListPhoneNumber(TrunkSid string, params *ListPhoneNumberParams) (*ListPhoneNumberResponse, error) { - path := "/v1/Trunks/{TrunkSid}/PhoneNumbers" + path := "/v1/Trunks/{TrunkSid}/PhoneNumbers" path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListPhoneNumberResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListPhoneNumberResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListTrunkParams Optional parameters for the method 'ListTrunk' type ListTrunkParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -718,39 +739,39 @@ type ListTrunkParams struct { * @param optional nil or *ListTrunkParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListTrunkResponse - */ +*/ func (c *DefaultApiService) ListTrunk(params *ListTrunkParams) (*ListTrunkResponse, error) { - path := "/v1/Trunks" + path := "/v1/Trunks" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListTrunkResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListTrunkResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateOriginationUrlParams Optional parameters for the method 'UpdateOriginationUrl' type UpdateOriginationUrlParams struct { - Enabled *bool `json:"Enabled,omitempty"` + Enabled *bool `json:"Enabled,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` - Priority *int32 `json:"Priority,omitempty"` - SipUrl *string `json:"SipUrl,omitempty"` - Weight *int32 `json:"Weight,omitempty"` + Priority *int32 `json:"Priority,omitempty"` + SipUrl *string `json:"SipUrl,omitempty"` + Weight *int32 `json:"Weight,omitempty"` } /* @@ -764,46 +785,46 @@ type UpdateOriginationUrlParams struct { * @param "SipUrl" (string) - The SIP address you want Twilio to route your Origination calls to. This must be a `sip:` schema. `sips` is NOT supported. * @param "Weight" (int32) - The value that determines the relative share of the load the URI should receive compared to other URIs with the same priority. Can be an integer from 1 to 65535, inclusive, and the default is 10. URLs with higher values receive more load than those with lower ones with the same priority. * @return TrunkingV1TrunkOriginationUrl - */ +*/ func (c *DefaultApiService) UpdateOriginationUrl(TrunkSid string, Sid string, params *UpdateOriginationUrlParams) (*TrunkingV1TrunkOriginationUrl, error) { - path := "/v1/Trunks/{TrunkSid}/OriginationUrls/{Sid}" + path := "/v1/Trunks/{TrunkSid}/OriginationUrls/{Sid}" path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Enabled != nil { - data.Set("Enabled", fmt.Sprint(*params.Enabled)) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.Priority != nil { - data.Set("Priority", fmt.Sprint(*params.Priority)) - } - if params != nil && params.SipUrl != nil { - data.Set("SipUrl", *params.SipUrl) - } - if params != nil && params.Weight != nil { - data.Set("Weight", fmt.Sprint(*params.Weight)) - } + if params != nil && params.Enabled != nil { + data.Set("Enabled", fmt.Sprint(*params.Enabled)) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.Priority != nil { + data.Set("Priority", fmt.Sprint(*params.Priority)) +} + if params != nil && params.SipUrl != nil { + data.Set("SipUrl", *params.SipUrl) +} + if params != nil && params.Weight != nil { + data.Set("Weight", fmt.Sprint(*params.Weight)) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &TrunkingV1TrunkOriginationUrl{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &TrunkingV1TrunkOriginationUrl{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateRecordingParams Optional parameters for the method 'UpdateRecording' type UpdateRecordingParams struct { Mode *string `json:"Mode,omitempty"` @@ -817,45 +838,45 @@ type UpdateRecordingParams struct { * @param "Mode" (string) - The recording mode for the trunk. Can be do-not-record (default), record-from-ringing, record-from-answer, record-from-ringing-dual, or record-from-answer-dual. * @param "Trim" (string) - The recording trim setting for the trunk. Can be do-not-trim (default) or trim-silence. * @return TrunkingV1TrunkRecording - */ +*/ func (c *DefaultApiService) UpdateRecording(TrunkSid string, params *UpdateRecordingParams) (*TrunkingV1TrunkRecording, error) { - path := "/v1/Trunks/{TrunkSid}/Recording" + path := "/v1/Trunks/{TrunkSid}/Recording" path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Mode != nil { - data.Set("Mode", *params.Mode) - } - if params != nil && params.Trim != nil { - data.Set("Trim", *params.Trim) - } + if params != nil && params.Mode != nil { + data.Set("Mode", *params.Mode) +} + if params != nil && params.Trim != nil { + data.Set("Trim", *params.Trim) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &TrunkingV1TrunkRecording{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &TrunkingV1TrunkRecording{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateTrunkParams Optional parameters for the method 'UpdateTrunk' type UpdateTrunkParams struct { - CnamLookupEnabled *bool `json:"CnamLookupEnabled,omitempty"` + CnamLookupEnabled *bool `json:"CnamLookupEnabled,omitempty"` DisasterRecoveryMethod *string `json:"DisasterRecoveryMethod,omitempty"` - DisasterRecoveryUrl *string `json:"DisasterRecoveryUrl,omitempty"` - DomainName *string `json:"DomainName,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Secure *bool `json:"Secure,omitempty"` - TransferMode *string `json:"TransferMode,omitempty"` + DisasterRecoveryUrl *string `json:"DisasterRecoveryUrl,omitempty"` + DomainName *string `json:"DomainName,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Secure *bool `json:"Secure,omitempty"` + TransferMode *string `json:"TransferMode,omitempty"` } /* @@ -870,47 +891,48 @@ type UpdateTrunkParams struct { * @param "Secure" (bool) - Whether Secure Trunking is enabled for the trunk. If enabled, all calls going through the trunk will be secure using SRTP for media and TLS for signaling. If disabled, then RTP will be used for media. See [Secure Trunking](https://www.twilio.com/docs/sip-trunking#securetrunking) for more information. * @param "TransferMode" (string) - The call transfer settings for the trunk. Can be: `enable-all`, `sip-only` and `disable-all`. See [Transfer](https://www.twilio.com/docs/sip-trunking/call-transfer) for more information. * @return TrunkingV1Trunk - */ +*/ func (c *DefaultApiService) UpdateTrunk(Sid string, params *UpdateTrunkParams) (*TrunkingV1Trunk, error) { - path := "/v1/Trunks/{Sid}" + path := "/v1/Trunks/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.CnamLookupEnabled != nil { - data.Set("CnamLookupEnabled", fmt.Sprint(*params.CnamLookupEnabled)) - } - if params != nil && params.DisasterRecoveryMethod != nil { - data.Set("DisasterRecoveryMethod", *params.DisasterRecoveryMethod) - } - if params != nil && params.DisasterRecoveryUrl != nil { - data.Set("DisasterRecoveryUrl", *params.DisasterRecoveryUrl) - } - if params != nil && params.DomainName != nil { - data.Set("DomainName", *params.DomainName) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.Secure != nil { - data.Set("Secure", fmt.Sprint(*params.Secure)) - } - if params != nil && params.TransferMode != nil { - data.Set("TransferMode", *params.TransferMode) - } + if params != nil && params.CnamLookupEnabled != nil { + data.Set("CnamLookupEnabled", fmt.Sprint(*params.CnamLookupEnabled)) +} + if params != nil && params.DisasterRecoveryMethod != nil { + data.Set("DisasterRecoveryMethod", *params.DisasterRecoveryMethod) +} + if params != nil && params.DisasterRecoveryUrl != nil { + data.Set("DisasterRecoveryUrl", *params.DisasterRecoveryUrl) +} + if params != nil && params.DomainName != nil { + data.Set("DomainName", *params.DomainName) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.Secure != nil { + data.Set("Secure", fmt.Sprint(*params.Secure)) +} + if params != nil && params.TransferMode != nil { + data.Set("TransferMode", *params.TransferMode) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &TrunkingV1Trunk{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() + + ps := &TrunkingV1Trunk{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } diff --git a/twilio/rest/trunking/v1/model_list_credential_list_response.go b/twilio/rest/trunking/v1/model_list_credential_list_response.go index e82aa3ff2..329ca0092 100644 --- a/twilio/rest/trunking/v1/model_list_credential_list_response.go +++ b/twilio/rest/trunking/v1/model_list_credential_list_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Trunking - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Trunking + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListCredentialListResponse struct for ListCredentialListResponse type ListCredentialListResponse struct { CredentialLists []TrunkingV1TrunkCredentialList `json:"CredentialLists,omitempty"` - Meta ListTrunkResponseMeta `json:"Meta,omitempty"` + Meta ListTrunkResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/trunking/v1/model_list_ip_access_control_list_response.go b/twilio/rest/trunking/v1/model_list_ip_access_control_list_response.go index 1d80af5c2..50a9c5289 100644 --- a/twilio/rest/trunking/v1/model_list_ip_access_control_list_response.go +++ b/twilio/rest/trunking/v1/model_list_ip_access_control_list_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Trunking - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Trunking + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListIpAccessControlListResponse struct for ListIpAccessControlListResponse type ListIpAccessControlListResponse struct { IpAccessControlLists []TrunkingV1TrunkIpAccessControlList `json:"IpAccessControlLists,omitempty"` - Meta ListTrunkResponseMeta `json:"Meta,omitempty"` + Meta ListTrunkResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/trunking/v1/model_list_origination_url_response.go b/twilio/rest/trunking/v1/model_list_origination_url_response.go index 0260aa0d9..885fd360b 100644 --- a/twilio/rest/trunking/v1/model_list_origination_url_response.go +++ b/twilio/rest/trunking/v1/model_list_origination_url_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Trunking - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Trunking + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListOriginationUrlResponse struct for ListOriginationUrlResponse type ListOriginationUrlResponse struct { - Meta ListTrunkResponseMeta `json:"Meta,omitempty"` + Meta ListTrunkResponseMeta `json:"Meta,omitempty"` OriginationUrls []TrunkingV1TrunkOriginationUrl `json:"OriginationUrls,omitempty"` } diff --git a/twilio/rest/trunking/v1/model_list_phone_number_response.go b/twilio/rest/trunking/v1/model_list_phone_number_response.go index 3a2849738..58688d506 100644 --- a/twilio/rest/trunking/v1/model_list_phone_number_response.go +++ b/twilio/rest/trunking/v1/model_list_phone_number_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Trunking - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Trunking + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListPhoneNumberResponse struct for ListPhoneNumberResponse type ListPhoneNumberResponse struct { - Meta ListTrunkResponseMeta `json:"Meta,omitempty"` + Meta ListTrunkResponseMeta `json:"Meta,omitempty"` PhoneNumbers []TrunkingV1TrunkPhoneNumber `json:"PhoneNumbers,omitempty"` } diff --git a/twilio/rest/trunking/v1/model_list_trunk_response.go b/twilio/rest/trunking/v1/model_list_trunk_response.go index d9e215baa..628d228fe 100644 --- a/twilio/rest/trunking/v1/model_list_trunk_response.go +++ b/twilio/rest/trunking/v1/model_list_trunk_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Trunking - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Trunking + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListTrunkResponse struct for ListTrunkResponse type ListTrunkResponse struct { - Meta ListTrunkResponseMeta `json:"Meta,omitempty"` - Trunks []TrunkingV1Trunk `json:"Trunks,omitempty"` + Meta ListTrunkResponseMeta `json:"Meta,omitempty"` + Trunks []TrunkingV1Trunk `json:"Trunks,omitempty"` } diff --git a/twilio/rest/trunking/v1/model_list_trunk_response_meta.go b/twilio/rest/trunking/v1/model_list_trunk_response_meta.go index fa10945ed..da3f4cda3 100644 --- a/twilio/rest/trunking/v1/model_list_trunk_response_meta.go +++ b/twilio/rest/trunking/v1/model_list_trunk_response_meta.go @@ -1,23 +1,22 @@ /* - * Twilio - Trunking - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Trunking + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListTrunkResponseMeta struct for ListTrunkResponseMeta type ListTrunkResponseMeta struct { - FirstPageUrl string `json:"FirstPageUrl,omitempty"` - Key string `json:"Key,omitempty"` - NextPageUrl string `json:"NextPageUrl,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` - Url string `json:"Url,omitempty"` + Url string `json:"Url,omitempty"` } diff --git a/twilio/rest/trunking/v1/model_trunking_v1_trunk.go b/twilio/rest/trunking/v1/model_trunking_v1_trunk.go index 120618ec5..676038f7b 100644 --- a/twilio/rest/trunking/v1/model_trunking_v1_trunk.go +++ b/twilio/rest/trunking/v1/model_trunking_v1_trunk.go @@ -1,20 +1,18 @@ /* - * Twilio - Trunking - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Trunking + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // TrunkingV1Trunk struct for TrunkingV1Trunk type TrunkingV1Trunk struct { // The SID of the Account that created the resource diff --git a/twilio/rest/trunking/v1/model_trunking_v1_trunk_credential_list.go b/twilio/rest/trunking/v1/model_trunking_v1_trunk_credential_list.go index a1ab61abe..de98afec6 100644 --- a/twilio/rest/trunking/v1/model_trunking_v1_trunk_credential_list.go +++ b/twilio/rest/trunking/v1/model_trunking_v1_trunk_credential_list.go @@ -1,20 +1,18 @@ /* - * Twilio - Trunking - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Trunking + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // TrunkingV1TrunkCredentialList struct for TrunkingV1TrunkCredentialList type TrunkingV1TrunkCredentialList struct { // The SID of the Account that created the resource diff --git a/twilio/rest/trunking/v1/model_trunking_v1_trunk_ip_access_control_list.go b/twilio/rest/trunking/v1/model_trunking_v1_trunk_ip_access_control_list.go index ed2a45a52..fc9d89c53 100644 --- a/twilio/rest/trunking/v1/model_trunking_v1_trunk_ip_access_control_list.go +++ b/twilio/rest/trunking/v1/model_trunking_v1_trunk_ip_access_control_list.go @@ -1,20 +1,18 @@ /* - * Twilio - Trunking - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Trunking + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // TrunkingV1TrunkIpAccessControlList struct for TrunkingV1TrunkIpAccessControlList type TrunkingV1TrunkIpAccessControlList struct { // The SID of the Account that created the resource diff --git a/twilio/rest/trunking/v1/model_trunking_v1_trunk_origination_url.go b/twilio/rest/trunking/v1/model_trunking_v1_trunk_origination_url.go index 96ec4a900..dba0dc9f0 100644 --- a/twilio/rest/trunking/v1/model_trunking_v1_trunk_origination_url.go +++ b/twilio/rest/trunking/v1/model_trunking_v1_trunk_origination_url.go @@ -1,20 +1,18 @@ /* - * Twilio - Trunking - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Trunking + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // TrunkingV1TrunkOriginationUrl struct for TrunkingV1TrunkOriginationUrl type TrunkingV1TrunkOriginationUrl struct { // The SID of the Account that created the resource diff --git a/twilio/rest/trunking/v1/model_trunking_v1_trunk_phone_number.go b/twilio/rest/trunking/v1/model_trunking_v1_trunk_phone_number.go index 1a55e7b21..db6bda425 100644 --- a/twilio/rest/trunking/v1/model_trunking_v1_trunk_phone_number.go +++ b/twilio/rest/trunking/v1/model_trunking_v1_trunk_phone_number.go @@ -1,20 +1,18 @@ /* - * Twilio - Trunking - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Trunking + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // TrunkingV1TrunkPhoneNumber struct for TrunkingV1TrunkPhoneNumber type TrunkingV1TrunkPhoneNumber struct { // The SID of the Account that created the resource diff --git a/twilio/rest/trunking/v1/model_trunking_v1_trunk_recording.go b/twilio/rest/trunking/v1/model_trunking_v1_trunk_recording.go index 1e9b2d51f..4291a092e 100644 --- a/twilio/rest/trunking/v1/model_trunking_v1_trunk_recording.go +++ b/twilio/rest/trunking/v1/model_trunking_v1_trunk_recording.go @@ -1,16 +1,15 @@ /* - * Twilio - Trunking - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Trunking + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // TrunkingV1TrunkRecording struct for TrunkingV1TrunkRecording type TrunkingV1TrunkRecording struct { // The recording mode for the trunk. diff --git a/twilio/rest/trusthub/v1/api_default.go b/twilio/rest/trusthub/v1/api_default.go index b241a13ea..bffc75576 100644 --- a/twilio/rest/trusthub/v1/api_default.go +++ b/twilio/rest/trusthub/v1/api_default.go @@ -1,11 +1,11 @@ /* - * Twilio - Trusthub - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Trusthub + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,10 +14,9 @@ package openapi import ( "encoding/json" "fmt" - "net/url" - "strings" - twilio "github.com/twilio/twilio-go/client" + "net/url" + "strings" ) type DefaultApiService struct { @@ -26,17 +25,17 @@ type DefaultApiService struct { } func NewDefaultApiService(client *twilio.Client) *DefaultApiService { - return &DefaultApiService{ - client: client, + return &DefaultApiService { + client: client, baseURL: "https://trusthub.twilio.com", } } // CreateCustomerProfileParams Optional parameters for the method 'CreateCustomerProfile' type CreateCustomerProfileParams struct { - Email *string `json:"Email,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - PolicySid *string `json:"PolicySid,omitempty"` + Email *string `json:"Email,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + PolicySid *string `json:"PolicySid,omitempty"` StatusCallback *string `json:"StatusCallback,omitempty"` } @@ -49,44 +48,44 @@ type CreateCustomerProfileParams struct { * @param "PolicySid" (string) - The unique string of a policy that is associated to the Customer-Profile resource. * @param "StatusCallback" (string) - The URL we call to inform your application of status changes. * @return TrusthubV1CustomerProfile - */ +*/ func (c *DefaultApiService) CreateCustomerProfile(params *CreateCustomerProfileParams) (*TrusthubV1CustomerProfile, error) { - path := "/v1/CustomerProfiles" + path := "/v1/CustomerProfiles" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Email != nil { - data.Set("Email", *params.Email) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.PolicySid != nil { - data.Set("PolicySid", *params.PolicySid) - } - if params != nil && params.StatusCallback != nil { - data.Set("StatusCallback", *params.StatusCallback) - } + if params != nil && params.Email != nil { + data.Set("Email", *params.Email) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.PolicySid != nil { + data.Set("PolicySid", *params.PolicySid) +} + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &TrusthubV1CustomerProfile{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &TrusthubV1CustomerProfile{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateCustomerProfileChannelEndpointAssignmentParams Optional parameters for the method 'CreateCustomerProfileChannelEndpointAssignment' type CreateCustomerProfileChannelEndpointAssignmentParams struct { - ChannelEndpointSid *string `json:"ChannelEndpointSid,omitempty"` + ChannelEndpointSid *string `json:"ChannelEndpointSid,omitempty"` ChannelEndpointType *string `json:"ChannelEndpointType,omitempty"` } @@ -98,36 +97,36 @@ type CreateCustomerProfileChannelEndpointAssignmentParams struct { * @param "ChannelEndpointSid" (string) - The SID of an channel endpoint * @param "ChannelEndpointType" (string) - The type of channel endpoint. eg: phone-number * @return TrusthubV1CustomerProfileCustomerProfileChannelEndpointAssignment - */ +*/ func (c *DefaultApiService) CreateCustomerProfileChannelEndpointAssignment(CustomerProfileSid string, params *CreateCustomerProfileChannelEndpointAssignmentParams) (*TrusthubV1CustomerProfileCustomerProfileChannelEndpointAssignment, error) { - path := "/v1/CustomerProfiles/{CustomerProfileSid}/ChannelEndpointAssignments" + path := "/v1/CustomerProfiles/{CustomerProfileSid}/ChannelEndpointAssignments" path = strings.Replace(path, "{"+"CustomerProfileSid"+"}", CustomerProfileSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.ChannelEndpointSid != nil { - data.Set("ChannelEndpointSid", *params.ChannelEndpointSid) - } - if params != nil && params.ChannelEndpointType != nil { - data.Set("ChannelEndpointType", *params.ChannelEndpointType) - } + if params != nil && params.ChannelEndpointSid != nil { + data.Set("ChannelEndpointSid", *params.ChannelEndpointSid) +} + if params != nil && params.ChannelEndpointType != nil { + data.Set("ChannelEndpointType", *params.ChannelEndpointType) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &TrusthubV1CustomerProfileCustomerProfileChannelEndpointAssignment{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &TrusthubV1CustomerProfileCustomerProfileChannelEndpointAssignment{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateCustomerProfileEntityAssignmentParams Optional parameters for the method 'CreateCustomerProfileEntityAssignment' type CreateCustomerProfileEntityAssignmentParams struct { ObjectSid *string `json:"ObjectSid,omitempty"` @@ -140,33 +139,33 @@ type CreateCustomerProfileEntityAssignmentParams struct { * @param optional nil or *CreateCustomerProfileEntityAssignmentParams - Optional Parameters: * @param "ObjectSid" (string) - The SID of an object bag that holds information of the different items. * @return TrusthubV1CustomerProfileCustomerProfileEntityAssignment - */ +*/ func (c *DefaultApiService) CreateCustomerProfileEntityAssignment(CustomerProfileSid string, params *CreateCustomerProfileEntityAssignmentParams) (*TrusthubV1CustomerProfileCustomerProfileEntityAssignment, error) { - path := "/v1/CustomerProfiles/{CustomerProfileSid}/EntityAssignments" + path := "/v1/CustomerProfiles/{CustomerProfileSid}/EntityAssignments" path = strings.Replace(path, "{"+"CustomerProfileSid"+"}", CustomerProfileSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.ObjectSid != nil { - data.Set("ObjectSid", *params.ObjectSid) - } + if params != nil && params.ObjectSid != nil { + data.Set("ObjectSid", *params.ObjectSid) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &TrusthubV1CustomerProfileCustomerProfileEntityAssignment{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &TrusthubV1CustomerProfileCustomerProfileEntityAssignment{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateCustomerProfileEvaluationParams Optional parameters for the method 'CreateCustomerProfileEvaluation' type CreateCustomerProfileEvaluationParams struct { PolicySid *string `json:"PolicySid,omitempty"` @@ -179,38 +178,38 @@ type CreateCustomerProfileEvaluationParams struct { * @param optional nil or *CreateCustomerProfileEvaluationParams - Optional Parameters: * @param "PolicySid" (string) - The unique string of a policy that is associated to the customer_profile resource. * @return TrusthubV1CustomerProfileCustomerProfileEvaluation - */ +*/ func (c *DefaultApiService) CreateCustomerProfileEvaluation(CustomerProfileSid string, params *CreateCustomerProfileEvaluationParams) (*TrusthubV1CustomerProfileCustomerProfileEvaluation, error) { - path := "/v1/CustomerProfiles/{CustomerProfileSid}/Evaluations" + path := "/v1/CustomerProfiles/{CustomerProfileSid}/Evaluations" path = strings.Replace(path, "{"+"CustomerProfileSid"+"}", CustomerProfileSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PolicySid != nil { - data.Set("PolicySid", *params.PolicySid) - } + if params != nil && params.PolicySid != nil { + data.Set("PolicySid", *params.PolicySid) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &TrusthubV1CustomerProfileCustomerProfileEvaluation{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &TrusthubV1CustomerProfileCustomerProfileEvaluation{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateEndUserParams Optional parameters for the method 'CreateEndUser' type CreateEndUserParams struct { - Attributes *map[string]interface{} `json:"Attributes,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Type *string `json:"Type,omitempty"` + Attributes *map[string]interface{} `json:"Attributes,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Type *string `json:"Type,omitempty"` } /* @@ -221,49 +220,49 @@ type CreateEndUserParams struct { * @param "FriendlyName" (string) - The string that you assigned to describe the resource. * @param "Type" (string) - The type of end user of the Bundle resource - can be `individual` or `business`. * @return TrusthubV1EndUser - */ +*/ func (c *DefaultApiService) CreateEndUser(params *CreateEndUserParams) (*TrusthubV1EndUser, error) { - path := "/v1/EndUsers" + path := "/v1/EndUsers" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Attributes != nil { - v, err := json.Marshal(params.Attributes) - - if err != nil { - return nil, err - } - - data.Set("Attributes", fmt.Sprint(v)) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.Type != nil { - data.Set("Type", *params.Type) - } + if params != nil && params.Attributes != nil { + v, err := json.Marshal(params.Attributes) - resp, err := c.client.Post(c.baseURL+path, data, headers) if err != nil { - return nil, err + return nil, err } - defer resp.Body.Close() + data.Set("Attributes", fmt.Sprint(v)) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.Type != nil { + data.Set("Type", *params.Type) +} - ps := &TrusthubV1EndUser{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - return ps, err -} + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + ps := &TrusthubV1EndUser{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} // CreateSupportingDocumentParams Optional parameters for the method 'CreateSupportingDocument' type CreateSupportingDocumentParams struct { - Attributes *map[string]interface{} `json:"Attributes,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Type *string `json:"Type,omitempty"` + Attributes *map[string]interface{} `json:"Attributes,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Type *string `json:"Type,omitempty"` } /* @@ -274,49 +273,49 @@ type CreateSupportingDocumentParams struct { * @param "FriendlyName" (string) - The string that you assigned to describe the resource. * @param "Type" (string) - The type of the Supporting Document. * @return TrusthubV1SupportingDocument - */ +*/ func (c *DefaultApiService) CreateSupportingDocument(params *CreateSupportingDocumentParams) (*TrusthubV1SupportingDocument, error) { - path := "/v1/SupportingDocuments" + path := "/v1/SupportingDocuments" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Attributes != nil { - v, err := json.Marshal(params.Attributes) + if params != nil && params.Attributes != nil { + v, err := json.Marshal(params.Attributes) - if err != nil { - return nil, err - } - - data.Set("Attributes", fmt.Sprint(v)) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.Type != nil { - data.Set("Type", *params.Type) - } - - resp, err := c.client.Post(c.baseURL+path, data, headers) if err != nil { - return nil, err + return nil, err } - defer resp.Body.Close() + data.Set("Attributes", fmt.Sprint(v)) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.Type != nil { + data.Set("Type", *params.Type) +} - ps := &TrusthubV1SupportingDocument{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - return ps, err -} + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &TrusthubV1SupportingDocument{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateTrustProductParams Optional parameters for the method 'CreateTrustProduct' type CreateTrustProductParams struct { - Email *string `json:"Email,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - PolicySid *string `json:"PolicySid,omitempty"` + Email *string `json:"Email,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + PolicySid *string `json:"PolicySid,omitempty"` StatusCallback *string `json:"StatusCallback,omitempty"` } @@ -329,44 +328,44 @@ type CreateTrustProductParams struct { * @param "PolicySid" (string) - The unique string of a policy that is associated to the Customer-Profile resource. * @param "StatusCallback" (string) - The URL we call to inform your application of status changes. * @return TrusthubV1TrustProduct - */ +*/ func (c *DefaultApiService) CreateTrustProduct(params *CreateTrustProductParams) (*TrusthubV1TrustProduct, error) { - path := "/v1/TrustProducts" + path := "/v1/TrustProducts" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Email != nil { - data.Set("Email", *params.Email) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.PolicySid != nil { - data.Set("PolicySid", *params.PolicySid) - } - if params != nil && params.StatusCallback != nil { - data.Set("StatusCallback", *params.StatusCallback) - } + if params != nil && params.Email != nil { + data.Set("Email", *params.Email) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.PolicySid != nil { + data.Set("PolicySid", *params.PolicySid) +} + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &TrusthubV1TrustProduct{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &TrusthubV1TrustProduct{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateTrustProductChannelEndpointAssignmentParams Optional parameters for the method 'CreateTrustProductChannelEndpointAssignment' type CreateTrustProductChannelEndpointAssignmentParams struct { - ChannelEndpointSid *string `json:"ChannelEndpointSid,omitempty"` + ChannelEndpointSid *string `json:"ChannelEndpointSid,omitempty"` ChannelEndpointType *string `json:"ChannelEndpointType,omitempty"` } @@ -378,36 +377,36 @@ type CreateTrustProductChannelEndpointAssignmentParams struct { * @param "ChannelEndpointSid" (string) - The SID of an channel endpoint * @param "ChannelEndpointType" (string) - The type of channel endpoint. eg: phone-number * @return TrusthubV1TrustProductTrustProductChannelEndpointAssignment - */ +*/ func (c *DefaultApiService) CreateTrustProductChannelEndpointAssignment(TrustProductSid string, params *CreateTrustProductChannelEndpointAssignmentParams) (*TrusthubV1TrustProductTrustProductChannelEndpointAssignment, error) { - path := "/v1/TrustProducts/{TrustProductSid}/ChannelEndpointAssignments" + path := "/v1/TrustProducts/{TrustProductSid}/ChannelEndpointAssignments" path = strings.Replace(path, "{"+"TrustProductSid"+"}", TrustProductSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.ChannelEndpointSid != nil { - data.Set("ChannelEndpointSid", *params.ChannelEndpointSid) - } - if params != nil && params.ChannelEndpointType != nil { - data.Set("ChannelEndpointType", *params.ChannelEndpointType) - } + if params != nil && params.ChannelEndpointSid != nil { + data.Set("ChannelEndpointSid", *params.ChannelEndpointSid) +} + if params != nil && params.ChannelEndpointType != nil { + data.Set("ChannelEndpointType", *params.ChannelEndpointType) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &TrusthubV1TrustProductTrustProductChannelEndpointAssignment{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &TrusthubV1TrustProductTrustProductChannelEndpointAssignment{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateTrustProductEntityAssignmentParams Optional parameters for the method 'CreateTrustProductEntityAssignment' type CreateTrustProductEntityAssignmentParams struct { ObjectSid *string `json:"ObjectSid,omitempty"` @@ -420,33 +419,33 @@ type CreateTrustProductEntityAssignmentParams struct { * @param optional nil or *CreateTrustProductEntityAssignmentParams - Optional Parameters: * @param "ObjectSid" (string) - The SID of an object bag that holds information of the different items. * @return TrusthubV1TrustProductTrustProductEntityAssignment - */ +*/ func (c *DefaultApiService) CreateTrustProductEntityAssignment(TrustProductSid string, params *CreateTrustProductEntityAssignmentParams) (*TrusthubV1TrustProductTrustProductEntityAssignment, error) { - path := "/v1/TrustProducts/{TrustProductSid}/EntityAssignments" + path := "/v1/TrustProducts/{TrustProductSid}/EntityAssignments" path = strings.Replace(path, "{"+"TrustProductSid"+"}", TrustProductSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.ObjectSid != nil { - data.Set("ObjectSid", *params.ObjectSid) - } + if params != nil && params.ObjectSid != nil { + data.Set("ObjectSid", *params.ObjectSid) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &TrusthubV1TrustProductTrustProductEntityAssignment{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &TrusthubV1TrustProductTrustProductEntityAssignment{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateTrustProductEvaluationParams Optional parameters for the method 'CreateTrustProductEvaluation' type CreateTrustProductEvaluationParams struct { PolicySid *string `json:"PolicySid,omitempty"` @@ -459,53 +458,56 @@ type CreateTrustProductEvaluationParams struct { * @param optional nil or *CreateTrustProductEvaluationParams - Optional Parameters: * @param "PolicySid" (string) - The unique string of a policy that is associated to the customer_profile resource. * @return TrusthubV1TrustProductTrustProductEvaluation - */ +*/ func (c *DefaultApiService) CreateTrustProductEvaluation(TrustProductSid string, params *CreateTrustProductEvaluationParams) (*TrusthubV1TrustProductTrustProductEvaluation, error) { - path := "/v1/TrustProducts/{TrustProductSid}/Evaluations" + path := "/v1/TrustProducts/{TrustProductSid}/Evaluations" path = strings.Replace(path, "{"+"TrustProductSid"+"}", TrustProductSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PolicySid != nil { - data.Set("PolicySid", *params.PolicySid) - } + if params != nil && params.PolicySid != nil { + data.Set("PolicySid", *params.PolicySid) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &TrusthubV1TrustProductTrustProductEvaluation{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err + ps := &TrusthubV1TrustProductTrustProductEvaluation{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* * DeleteCustomerProfile Method for DeleteCustomerProfile * Delete a specific Customer-Profile. * @param Sid The unique string that we created to identify the Customer-Profile resource. - */ -func (c *DefaultApiService) DeleteCustomerProfile(Sid string) error { - path := "/v1/CustomerProfiles/{Sid}" +*/ +func (c *DefaultApiService) DeleteCustomerProfile(Sid string, ) (error) { + path := "/v1/CustomerProfiles/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* @@ -513,23 +515,25 @@ func (c *DefaultApiService) DeleteCustomerProfile(Sid string) error { * Remove an Assignment Item Instance. * @param CustomerProfileSid The unique string that we created to identify the CustomerProfile resource. * @param Sid The unique string that we created to identify the resource. - */ -func (c *DefaultApiService) DeleteCustomerProfileChannelEndpointAssignment(CustomerProfileSid string, Sid string) error { - path := "/v1/CustomerProfiles/{CustomerProfileSid}/ChannelEndpointAssignments/{Sid}" +*/ +func (c *DefaultApiService) DeleteCustomerProfileChannelEndpointAssignment(CustomerProfileSid string, Sid string, ) (error) { + path := "/v1/CustomerProfiles/{CustomerProfileSid}/ChannelEndpointAssignments/{Sid}" path = strings.Replace(path, "{"+"CustomerProfileSid"+"}", CustomerProfileSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* @@ -537,89 +541,97 @@ func (c *DefaultApiService) DeleteCustomerProfileChannelEndpointAssignment(Custo * Remove an Assignment Item Instance. * @param CustomerProfileSid The unique string that we created to identify the CustomerProfile resource. * @param Sid The unique string that we created to identify the Identity resource. - */ -func (c *DefaultApiService) DeleteCustomerProfileEntityAssignment(CustomerProfileSid string, Sid string) error { - path := "/v1/CustomerProfiles/{CustomerProfileSid}/EntityAssignments/{Sid}" +*/ +func (c *DefaultApiService) DeleteCustomerProfileEntityAssignment(CustomerProfileSid string, Sid string, ) (error) { + path := "/v1/CustomerProfiles/{CustomerProfileSid}/EntityAssignments/{Sid}" path = strings.Replace(path, "{"+"CustomerProfileSid"+"}", CustomerProfileSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - return nil + defer resp.Body.Close() + + return nil } /* * DeleteEndUser Method for DeleteEndUser * Delete a specific End User. * @param Sid The unique string created by Twilio to identify the End User resource. - */ -func (c *DefaultApiService) DeleteEndUser(Sid string) error { - path := "/v1/EndUsers/{Sid}" +*/ +func (c *DefaultApiService) DeleteEndUser(Sid string, ) (error) { + path := "/v1/EndUsers/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* * DeleteSupportingDocument Method for DeleteSupportingDocument * Delete a specific Supporting Document. * @param Sid The unique string created by Twilio to identify the Supporting Document resource. - */ -func (c *DefaultApiService) DeleteSupportingDocument(Sid string) error { - path := "/v1/SupportingDocuments/{Sid}" +*/ +func (c *DefaultApiService) DeleteSupportingDocument(Sid string, ) (error) { + path := "/v1/SupportingDocuments/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* * DeleteTrustProduct Method for DeleteTrustProduct * Delete a specific Customer-Profile. * @param Sid The unique string that we created to identify the Customer-Profile resource. - */ -func (c *DefaultApiService) DeleteTrustProduct(Sid string) error { - path := "/v1/TrustProducts/{Sid}" +*/ +func (c *DefaultApiService) DeleteTrustProduct(Sid string, ) (error) { + path := "/v1/TrustProducts/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - return nil + defer resp.Body.Close() + + return nil } /* @@ -627,23 +639,25 @@ func (c *DefaultApiService) DeleteTrustProduct(Sid string) error { * Remove an Assignment Item Instance. * @param TrustProductSid The unique string that we created to identify the CustomerProfile resource. * @param Sid The unique string that we created to identify the resource. - */ -func (c *DefaultApiService) DeleteTrustProductChannelEndpointAssignment(TrustProductSid string, Sid string) error { - path := "/v1/TrustProducts/{TrustProductSid}/ChannelEndpointAssignments/{Sid}" +*/ +func (c *DefaultApiService) DeleteTrustProductChannelEndpointAssignment(TrustProductSid string, Sid string, ) (error) { + path := "/v1/TrustProducts/{TrustProductSid}/ChannelEndpointAssignments/{Sid}" path = strings.Replace(path, "{"+"TrustProductSid"+"}", TrustProductSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* @@ -651,23 +665,25 @@ func (c *DefaultApiService) DeleteTrustProductChannelEndpointAssignment(TrustPro * Remove an Assignment Item Instance. * @param TrustProductSid The unique string that we created to identify the TrustProduct resource. * @param Sid The unique string that we created to identify the Identity resource. - */ -func (c *DefaultApiService) DeleteTrustProductEntityAssignment(TrustProductSid string, Sid string) error { - path := "/v1/TrustProducts/{TrustProductSid}/EntityAssignments/{Sid}" +*/ +func (c *DefaultApiService) DeleteTrustProductEntityAssignment(TrustProductSid string, Sid string, ) (error) { + path := "/v1/TrustProducts/{TrustProductSid}/EntityAssignments/{Sid}" path = strings.Replace(path, "{"+"TrustProductSid"+"}", TrustProductSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* @@ -675,27 +691,29 @@ func (c *DefaultApiService) DeleteTrustProductEntityAssignment(TrustProductSid s * Fetch a specific Customer-Profile instance. * @param Sid The unique string that we created to identify the Customer-Profile resource. * @return TrusthubV1CustomerProfile - */ -func (c *DefaultApiService) FetchCustomerProfile(Sid string) (*TrusthubV1CustomerProfile, error) { - path := "/v1/CustomerProfiles/{Sid}" +*/ +func (c *DefaultApiService) FetchCustomerProfile(Sid string, ) (*TrusthubV1CustomerProfile, error) { + path := "/v1/CustomerProfiles/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &TrusthubV1CustomerProfile{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &TrusthubV1CustomerProfile{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -704,28 +722,30 @@ func (c *DefaultApiService) FetchCustomerProfile(Sid string) (*TrusthubV1Custome * @param CustomerProfileSid The unique string that we created to identify the CustomerProfile resource. * @param Sid The unique string that we created to identify the resource. * @return TrusthubV1CustomerProfileCustomerProfileChannelEndpointAssignment - */ -func (c *DefaultApiService) FetchCustomerProfileChannelEndpointAssignment(CustomerProfileSid string, Sid string) (*TrusthubV1CustomerProfileCustomerProfileChannelEndpointAssignment, error) { - path := "/v1/CustomerProfiles/{CustomerProfileSid}/ChannelEndpointAssignments/{Sid}" +*/ +func (c *DefaultApiService) FetchCustomerProfileChannelEndpointAssignment(CustomerProfileSid string, Sid string, ) (*TrusthubV1CustomerProfileCustomerProfileChannelEndpointAssignment, error) { + path := "/v1/CustomerProfiles/{CustomerProfileSid}/ChannelEndpointAssignments/{Sid}" path = strings.Replace(path, "{"+"CustomerProfileSid"+"}", CustomerProfileSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &TrusthubV1CustomerProfileCustomerProfileChannelEndpointAssignment{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err + defer resp.Body.Close() + + ps := &TrusthubV1CustomerProfileCustomerProfileChannelEndpointAssignment{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -734,28 +754,30 @@ func (c *DefaultApiService) FetchCustomerProfileChannelEndpointAssignment(Custom * @param CustomerProfileSid The unique string that we created to identify the CustomerProfile resource. * @param Sid The unique string that we created to identify the Identity resource. * @return TrusthubV1CustomerProfileCustomerProfileEntityAssignment - */ -func (c *DefaultApiService) FetchCustomerProfileEntityAssignment(CustomerProfileSid string, Sid string) (*TrusthubV1CustomerProfileCustomerProfileEntityAssignment, error) { - path := "/v1/CustomerProfiles/{CustomerProfileSid}/EntityAssignments/{Sid}" +*/ +func (c *DefaultApiService) FetchCustomerProfileEntityAssignment(CustomerProfileSid string, Sid string, ) (*TrusthubV1CustomerProfileCustomerProfileEntityAssignment, error) { + path := "/v1/CustomerProfiles/{CustomerProfileSid}/EntityAssignments/{Sid}" path = strings.Replace(path, "{"+"CustomerProfileSid"+"}", CustomerProfileSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &TrusthubV1CustomerProfileCustomerProfileEntityAssignment{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &TrusthubV1CustomerProfileCustomerProfileEntityAssignment{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -764,28 +786,30 @@ func (c *DefaultApiService) FetchCustomerProfileEntityAssignment(CustomerProfile * @param CustomerProfileSid The unique string that we created to identify the customer_profile resource. * @param Sid The unique string that identifies the Evaluation resource. * @return TrusthubV1CustomerProfileCustomerProfileEvaluation - */ -func (c *DefaultApiService) FetchCustomerProfileEvaluation(CustomerProfileSid string, Sid string) (*TrusthubV1CustomerProfileCustomerProfileEvaluation, error) { - path := "/v1/CustomerProfiles/{CustomerProfileSid}/Evaluations/{Sid}" +*/ +func (c *DefaultApiService) FetchCustomerProfileEvaluation(CustomerProfileSid string, Sid string, ) (*TrusthubV1CustomerProfileCustomerProfileEvaluation, error) { + path := "/v1/CustomerProfiles/{CustomerProfileSid}/Evaluations/{Sid}" path = strings.Replace(path, "{"+"CustomerProfileSid"+"}", CustomerProfileSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &TrusthubV1CustomerProfileCustomerProfileEvaluation{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &TrusthubV1CustomerProfileCustomerProfileEvaluation{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -793,27 +817,29 @@ func (c *DefaultApiService) FetchCustomerProfileEvaluation(CustomerProfileSid st * Fetch specific End User Instance. * @param Sid The unique string created by Twilio to identify the End User resource. * @return TrusthubV1EndUser - */ -func (c *DefaultApiService) FetchEndUser(Sid string) (*TrusthubV1EndUser, error) { - path := "/v1/EndUsers/{Sid}" +*/ +func (c *DefaultApiService) FetchEndUser(Sid string, ) (*TrusthubV1EndUser, error) { + path := "/v1/EndUsers/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &TrusthubV1EndUser{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &TrusthubV1EndUser{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -821,27 +847,29 @@ func (c *DefaultApiService) FetchEndUser(Sid string) (*TrusthubV1EndUser, error) * Fetch a specific End-User Type Instance. * @param Sid The unique string that identifies the End-User Type resource. * @return TrusthubV1EndUserType - */ -func (c *DefaultApiService) FetchEndUserType(Sid string) (*TrusthubV1EndUserType, error) { - path := "/v1/EndUserTypes/{Sid}" +*/ +func (c *DefaultApiService) FetchEndUserType(Sid string, ) (*TrusthubV1EndUserType, error) { + path := "/v1/EndUserTypes/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &TrusthubV1EndUserType{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err + defer resp.Body.Close() + + ps := &TrusthubV1EndUserType{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -849,27 +877,29 @@ func (c *DefaultApiService) FetchEndUserType(Sid string) (*TrusthubV1EndUserType * Fetch specific Policy Instance. * @param Sid The unique string that identifies the Policy resource. * @return TrusthubV1Policies - */ -func (c *DefaultApiService) FetchPolicies(Sid string) (*TrusthubV1Policies, error) { - path := "/v1/Policies/{Sid}" +*/ +func (c *DefaultApiService) FetchPolicies(Sid string, ) (*TrusthubV1Policies, error) { + path := "/v1/Policies/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &TrusthubV1Policies{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &TrusthubV1Policies{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -877,27 +907,29 @@ func (c *DefaultApiService) FetchPolicies(Sid string) (*TrusthubV1Policies, erro * Fetch specific Supporting Document Instance. * @param Sid The unique string created by Twilio to identify the Supporting Document resource. * @return TrusthubV1SupportingDocument - */ -func (c *DefaultApiService) FetchSupportingDocument(Sid string) (*TrusthubV1SupportingDocument, error) { - path := "/v1/SupportingDocuments/{Sid}" +*/ +func (c *DefaultApiService) FetchSupportingDocument(Sid string, ) (*TrusthubV1SupportingDocument, error) { + path := "/v1/SupportingDocuments/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &TrusthubV1SupportingDocument{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &TrusthubV1SupportingDocument{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -905,27 +937,29 @@ func (c *DefaultApiService) FetchSupportingDocument(Sid string) (*TrusthubV1Supp * Fetch a specific Supporting Document Type Instance. * @param Sid The unique string that identifies the Supporting Document Type resource. * @return TrusthubV1SupportingDocumentType - */ -func (c *DefaultApiService) FetchSupportingDocumentType(Sid string) (*TrusthubV1SupportingDocumentType, error) { - path := "/v1/SupportingDocumentTypes/{Sid}" +*/ +func (c *DefaultApiService) FetchSupportingDocumentType(Sid string, ) (*TrusthubV1SupportingDocumentType, error) { + path := "/v1/SupportingDocumentTypes/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &TrusthubV1SupportingDocumentType{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err + defer resp.Body.Close() + + ps := &TrusthubV1SupportingDocumentType{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -933,27 +967,29 @@ func (c *DefaultApiService) FetchSupportingDocumentType(Sid string) (*TrusthubV1 * Fetch a specific Customer-Profile instance. * @param Sid The unique string that we created to identify the Customer-Profile resource. * @return TrusthubV1TrustProduct - */ -func (c *DefaultApiService) FetchTrustProduct(Sid string) (*TrusthubV1TrustProduct, error) { - path := "/v1/TrustProducts/{Sid}" +*/ +func (c *DefaultApiService) FetchTrustProduct(Sid string, ) (*TrusthubV1TrustProduct, error) { + path := "/v1/TrustProducts/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &TrusthubV1TrustProduct{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err + defer resp.Body.Close() + + ps := &TrusthubV1TrustProduct{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -962,28 +998,30 @@ func (c *DefaultApiService) FetchTrustProduct(Sid string) (*TrusthubV1TrustProdu * @param TrustProductSid The unique string that we created to identify the CustomerProfile resource. * @param Sid The unique string that we created to identify the resource. * @return TrusthubV1TrustProductTrustProductChannelEndpointAssignment - */ -func (c *DefaultApiService) FetchTrustProductChannelEndpointAssignment(TrustProductSid string, Sid string) (*TrusthubV1TrustProductTrustProductChannelEndpointAssignment, error) { - path := "/v1/TrustProducts/{TrustProductSid}/ChannelEndpointAssignments/{Sid}" +*/ +func (c *DefaultApiService) FetchTrustProductChannelEndpointAssignment(TrustProductSid string, Sid string, ) (*TrusthubV1TrustProductTrustProductChannelEndpointAssignment, error) { + path := "/v1/TrustProducts/{TrustProductSid}/ChannelEndpointAssignments/{Sid}" path = strings.Replace(path, "{"+"TrustProductSid"+"}", TrustProductSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &TrusthubV1TrustProductTrustProductChannelEndpointAssignment{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &TrusthubV1TrustProductTrustProductChannelEndpointAssignment{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -992,28 +1030,30 @@ func (c *DefaultApiService) FetchTrustProductChannelEndpointAssignment(TrustProd * @param TrustProductSid The unique string that we created to identify the TrustProduct resource. * @param Sid The unique string that we created to identify the Identity resource. * @return TrusthubV1TrustProductTrustProductEntityAssignment - */ -func (c *DefaultApiService) FetchTrustProductEntityAssignment(TrustProductSid string, Sid string) (*TrusthubV1TrustProductTrustProductEntityAssignment, error) { - path := "/v1/TrustProducts/{TrustProductSid}/EntityAssignments/{Sid}" +*/ +func (c *DefaultApiService) FetchTrustProductEntityAssignment(TrustProductSid string, Sid string, ) (*TrusthubV1TrustProductTrustProductEntityAssignment, error) { + path := "/v1/TrustProducts/{TrustProductSid}/EntityAssignments/{Sid}" path = strings.Replace(path, "{"+"TrustProductSid"+"}", TrustProductSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &TrusthubV1TrustProductTrustProductEntityAssignment{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &TrusthubV1TrustProductTrustProductEntityAssignment{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -1022,36 +1062,37 @@ func (c *DefaultApiService) FetchTrustProductEntityAssignment(TrustProductSid st * @param TrustProductSid The unique string that we created to identify the trust_product resource. * @param Sid The unique string that identifies the Evaluation resource. * @return TrusthubV1TrustProductTrustProductEvaluation - */ -func (c *DefaultApiService) FetchTrustProductEvaluation(TrustProductSid string, Sid string) (*TrusthubV1TrustProductTrustProductEvaluation, error) { - path := "/v1/TrustProducts/{TrustProductSid}/Evaluations/{Sid}" +*/ +func (c *DefaultApiService) FetchTrustProductEvaluation(TrustProductSid string, Sid string, ) (*TrusthubV1TrustProductTrustProductEvaluation, error) { + path := "/v1/TrustProducts/{TrustProductSid}/Evaluations/{Sid}" path = strings.Replace(path, "{"+"TrustProductSid"+"}", TrustProductSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &TrusthubV1TrustProductTrustProductEvaluation{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err -} + defer resp.Body.Close() + + ps := &TrusthubV1TrustProductTrustProductEvaluation{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListCustomerProfileParams Optional parameters for the method 'ListCustomerProfile' type ListCustomerProfileParams struct { - Status *string `json:"Status,omitempty"` + Status *string `json:"Status,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` - PolicySid *string `json:"PolicySid,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PolicySid *string `json:"PolicySid,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -1063,46 +1104,46 @@ type ListCustomerProfileParams struct { * @param "PolicySid" (string) - The unique string of a policy that is associated to the Customer-Profile resource. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListCustomerProfileResponse - */ +*/ func (c *DefaultApiService) ListCustomerProfile(params *ListCustomerProfileParams) (*ListCustomerProfileResponse, error) { - path := "/v1/CustomerProfiles" + path := "/v1/CustomerProfiles" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.PolicySid != nil { - data.Set("PolicySid", *params.PolicySid) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.PolicySid != nil { + data.Set("PolicySid", *params.PolicySid) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListCustomerProfileResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListCustomerProfileResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListCustomerProfileChannelEndpointAssignmentParams Optional parameters for the method 'ListCustomerProfileChannelEndpointAssignment' type ListCustomerProfileChannelEndpointAssignmentParams struct { - ChannelEndpointSid *string `json:"ChannelEndpointSid,omitempty"` + ChannelEndpointSid *string `json:"ChannelEndpointSid,omitempty"` ChannelEndpointSids *string `json:"ChannelEndpointSids,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -1114,39 +1155,39 @@ type ListCustomerProfileChannelEndpointAssignmentParams struct { * @param "ChannelEndpointSids" (string) - comma separated list of channel endpoint sids * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListCustomerProfileChannelEndpointAssignmentResponse - */ +*/ func (c *DefaultApiService) ListCustomerProfileChannelEndpointAssignment(CustomerProfileSid string, params *ListCustomerProfileChannelEndpointAssignmentParams) (*ListCustomerProfileChannelEndpointAssignmentResponse, error) { - path := "/v1/CustomerProfiles/{CustomerProfileSid}/ChannelEndpointAssignments" + path := "/v1/CustomerProfiles/{CustomerProfileSid}/ChannelEndpointAssignments" path = strings.Replace(path, "{"+"CustomerProfileSid"+"}", CustomerProfileSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.ChannelEndpointSid != nil { - data.Set("ChannelEndpointSid", *params.ChannelEndpointSid) - } - if params != nil && params.ChannelEndpointSids != nil { - data.Set("ChannelEndpointSids", *params.ChannelEndpointSids) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.ChannelEndpointSid != nil { + data.Set("ChannelEndpointSid", *params.ChannelEndpointSid) +} + if params != nil && params.ChannelEndpointSids != nil { + data.Set("ChannelEndpointSids", *params.ChannelEndpointSids) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListCustomerProfileChannelEndpointAssignmentResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListCustomerProfileChannelEndpointAssignmentResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListCustomerProfileEntityAssignmentParams Optional parameters for the method 'ListCustomerProfileEntityAssignment' type ListCustomerProfileEntityAssignmentParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1159,33 +1200,33 @@ type ListCustomerProfileEntityAssignmentParams struct { * @param optional nil or *ListCustomerProfileEntityAssignmentParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListCustomerProfileEntityAssignmentResponse - */ +*/ func (c *DefaultApiService) ListCustomerProfileEntityAssignment(CustomerProfileSid string, params *ListCustomerProfileEntityAssignmentParams) (*ListCustomerProfileEntityAssignmentResponse, error) { - path := "/v1/CustomerProfiles/{CustomerProfileSid}/EntityAssignments" + path := "/v1/CustomerProfiles/{CustomerProfileSid}/EntityAssignments" path = strings.Replace(path, "{"+"CustomerProfileSid"+"}", CustomerProfileSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListCustomerProfileEntityAssignmentResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListCustomerProfileEntityAssignmentResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListCustomerProfileEvaluationParams Optional parameters for the method 'ListCustomerProfileEvaluation' type ListCustomerProfileEvaluationParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1198,33 +1239,33 @@ type ListCustomerProfileEvaluationParams struct { * @param optional nil or *ListCustomerProfileEvaluationParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListCustomerProfileEvaluationResponse - */ +*/ func (c *DefaultApiService) ListCustomerProfileEvaluation(CustomerProfileSid string, params *ListCustomerProfileEvaluationParams) (*ListCustomerProfileEvaluationResponse, error) { - path := "/v1/CustomerProfiles/{CustomerProfileSid}/Evaluations" + path := "/v1/CustomerProfiles/{CustomerProfileSid}/Evaluations" path = strings.Replace(path, "{"+"CustomerProfileSid"+"}", CustomerProfileSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListCustomerProfileEvaluationResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListCustomerProfileEvaluationResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListEndUserParams Optional parameters for the method 'ListEndUser' type ListEndUserParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1236,32 +1277,32 @@ type ListEndUserParams struct { * @param optional nil or *ListEndUserParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListEndUserResponse - */ +*/ func (c *DefaultApiService) ListEndUser(params *ListEndUserParams) (*ListEndUserResponse, error) { - path := "/v1/EndUsers" + path := "/v1/EndUsers" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListEndUserResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListEndUserResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListEndUserTypeParams Optional parameters for the method 'ListEndUserType' type ListEndUserTypeParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1273,32 +1314,32 @@ type ListEndUserTypeParams struct { * @param optional nil or *ListEndUserTypeParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListEndUserTypeResponse - */ +*/ func (c *DefaultApiService) ListEndUserType(params *ListEndUserTypeParams) (*ListEndUserTypeResponse, error) { - path := "/v1/EndUserTypes" + path := "/v1/EndUserTypes" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListEndUserTypeResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListEndUserTypeResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListPoliciesParams Optional parameters for the method 'ListPolicies' type ListPoliciesParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1310,32 +1351,32 @@ type ListPoliciesParams struct { * @param optional nil or *ListPoliciesParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListPoliciesResponse - */ +*/ func (c *DefaultApiService) ListPolicies(params *ListPoliciesParams) (*ListPoliciesResponse, error) { - path := "/v1/Policies" + path := "/v1/Policies" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListPoliciesResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListPoliciesResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListSupportingDocumentParams Optional parameters for the method 'ListSupportingDocument' type ListSupportingDocumentParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1347,32 +1388,32 @@ type ListSupportingDocumentParams struct { * @param optional nil or *ListSupportingDocumentParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListSupportingDocumentResponse - */ +*/ func (c *DefaultApiService) ListSupportingDocument(params *ListSupportingDocumentParams) (*ListSupportingDocumentResponse, error) { - path := "/v1/SupportingDocuments" + path := "/v1/SupportingDocuments" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListSupportingDocumentResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListSupportingDocumentResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListSupportingDocumentTypeParams Optional parameters for the method 'ListSupportingDocumentType' type ListSupportingDocumentTypeParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1384,38 +1425,38 @@ type ListSupportingDocumentTypeParams struct { * @param optional nil or *ListSupportingDocumentTypeParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListSupportingDocumentTypeResponse - */ +*/ func (c *DefaultApiService) ListSupportingDocumentType(params *ListSupportingDocumentTypeParams) (*ListSupportingDocumentTypeResponse, error) { - path := "/v1/SupportingDocumentTypes" + path := "/v1/SupportingDocumentTypes" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListSupportingDocumentTypeResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListSupportingDocumentTypeResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListTrustProductParams Optional parameters for the method 'ListTrustProduct' type ListTrustProductParams struct { - Status *string `json:"Status,omitempty"` + Status *string `json:"Status,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` - PolicySid *string `json:"PolicySid,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PolicySid *string `json:"PolicySid,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -1427,46 +1468,46 @@ type ListTrustProductParams struct { * @param "PolicySid" (string) - The unique string of a policy that is associated to the Customer-Profile resource. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListTrustProductResponse - */ +*/ func (c *DefaultApiService) ListTrustProduct(params *ListTrustProductParams) (*ListTrustProductResponse, error) { - path := "/v1/TrustProducts" + path := "/v1/TrustProducts" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.PolicySid != nil { - data.Set("PolicySid", *params.PolicySid) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.PolicySid != nil { + data.Set("PolicySid", *params.PolicySid) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListTrustProductResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListTrustProductResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListTrustProductChannelEndpointAssignmentParams Optional parameters for the method 'ListTrustProductChannelEndpointAssignment' type ListTrustProductChannelEndpointAssignmentParams struct { - ChannelEndpointSid *string `json:"ChannelEndpointSid,omitempty"` + ChannelEndpointSid *string `json:"ChannelEndpointSid,omitempty"` ChannelEndpointSids *string `json:"ChannelEndpointSids,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -1478,39 +1519,39 @@ type ListTrustProductChannelEndpointAssignmentParams struct { * @param "ChannelEndpointSids" (string) - comma separated list of channel endpoint sids * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListTrustProductChannelEndpointAssignmentResponse - */ +*/ func (c *DefaultApiService) ListTrustProductChannelEndpointAssignment(TrustProductSid string, params *ListTrustProductChannelEndpointAssignmentParams) (*ListTrustProductChannelEndpointAssignmentResponse, error) { - path := "/v1/TrustProducts/{TrustProductSid}/ChannelEndpointAssignments" + path := "/v1/TrustProducts/{TrustProductSid}/ChannelEndpointAssignments" path = strings.Replace(path, "{"+"TrustProductSid"+"}", TrustProductSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.ChannelEndpointSid != nil { - data.Set("ChannelEndpointSid", *params.ChannelEndpointSid) - } - if params != nil && params.ChannelEndpointSids != nil { - data.Set("ChannelEndpointSids", *params.ChannelEndpointSids) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.ChannelEndpointSid != nil { + data.Set("ChannelEndpointSid", *params.ChannelEndpointSid) +} + if params != nil && params.ChannelEndpointSids != nil { + data.Set("ChannelEndpointSids", *params.ChannelEndpointSids) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListTrustProductChannelEndpointAssignmentResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListTrustProductChannelEndpointAssignmentResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListTrustProductEntityAssignmentParams Optional parameters for the method 'ListTrustProductEntityAssignment' type ListTrustProductEntityAssignmentParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1523,33 +1564,33 @@ type ListTrustProductEntityAssignmentParams struct { * @param optional nil or *ListTrustProductEntityAssignmentParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListTrustProductEntityAssignmentResponse - */ +*/ func (c *DefaultApiService) ListTrustProductEntityAssignment(TrustProductSid string, params *ListTrustProductEntityAssignmentParams) (*ListTrustProductEntityAssignmentResponse, error) { - path := "/v1/TrustProducts/{TrustProductSid}/EntityAssignments" + path := "/v1/TrustProducts/{TrustProductSid}/EntityAssignments" path = strings.Replace(path, "{"+"TrustProductSid"+"}", TrustProductSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListTrustProductEntityAssignmentResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListTrustProductEntityAssignmentResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListTrustProductEvaluationParams Optional parameters for the method 'ListTrustProductEvaluation' type ListTrustProductEvaluationParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1562,38 +1603,38 @@ type ListTrustProductEvaluationParams struct { * @param optional nil or *ListTrustProductEvaluationParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListTrustProductEvaluationResponse - */ +*/ func (c *DefaultApiService) ListTrustProductEvaluation(TrustProductSid string, params *ListTrustProductEvaluationParams) (*ListTrustProductEvaluationResponse, error) { - path := "/v1/TrustProducts/{TrustProductSid}/Evaluations" + path := "/v1/TrustProducts/{TrustProductSid}/Evaluations" path = strings.Replace(path, "{"+"TrustProductSid"+"}", TrustProductSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListTrustProductEvaluationResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListTrustProductEvaluationResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateCustomerProfileParams Optional parameters for the method 'UpdateCustomerProfile' type UpdateCustomerProfileParams struct { - Email *string `json:"Email,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Status *string `json:"Status,omitempty"` + Email *string `json:"Email,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Status *string `json:"Status,omitempty"` StatusCallback *string `json:"StatusCallback,omitempty"` } @@ -1607,46 +1648,46 @@ type UpdateCustomerProfileParams struct { * @param "Status" (string) - The verification status of the Customer-Profile resource. * @param "StatusCallback" (string) - The URL we call to inform your application of status changes. * @return TrusthubV1CustomerProfile - */ +*/ func (c *DefaultApiService) UpdateCustomerProfile(Sid string, params *UpdateCustomerProfileParams) (*TrusthubV1CustomerProfile, error) { - path := "/v1/CustomerProfiles/{Sid}" + path := "/v1/CustomerProfiles/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Email != nil { - data.Set("Email", *params.Email) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) - } - if params != nil && params.StatusCallback != nil { - data.Set("StatusCallback", *params.StatusCallback) - } + if params != nil && params.Email != nil { + data.Set("Email", *params.Email) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) +} + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &TrusthubV1CustomerProfile{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &TrusthubV1CustomerProfile{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateEndUserParams Optional parameters for the method 'UpdateEndUser' type UpdateEndUserParams struct { - Attributes *map[string]interface{} `json:"Attributes,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` + Attributes *map[string]interface{} `json:"Attributes,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` } /* @@ -1657,46 +1698,46 @@ type UpdateEndUserParams struct { * @param "Attributes" (map[string]interface{}) - The set of parameters that are the attributes of the End User resource which are derived End User Types. * @param "FriendlyName" (string) - The string that you assigned to describe the resource. * @return TrusthubV1EndUser - */ +*/ func (c *DefaultApiService) UpdateEndUser(Sid string, params *UpdateEndUserParams) (*TrusthubV1EndUser, error) { - path := "/v1/EndUsers/{Sid}" + path := "/v1/EndUsers/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Attributes != nil { - v, err := json.Marshal(params.Attributes) + data := url.Values{} + headers := 0 - if err != nil { - return nil, err - } + if params != nil && params.Attributes != nil { + v, err := json.Marshal(params.Attributes) - data.Set("Attributes", fmt.Sprint(v)) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - - resp, err := c.client.Post(c.baseURL+path, data, headers) if err != nil { - return nil, err + return nil, err } - defer resp.Body.Close() + data.Set("Attributes", fmt.Sprint(v)) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} - ps := &TrusthubV1EndUser{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - return ps, err -} + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() + + ps := &TrusthubV1EndUser{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} // UpdateSupportingDocumentParams Optional parameters for the method 'UpdateSupportingDocument' type UpdateSupportingDocumentParams struct { - Attributes *map[string]interface{} `json:"Attributes,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` + Attributes *map[string]interface{} `json:"Attributes,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` } /* @@ -1707,47 +1748,47 @@ type UpdateSupportingDocumentParams struct { * @param "Attributes" (map[string]interface{}) - The set of parameters that are the attributes of the Supporting Document resource which are derived Supporting Document Types. * @param "FriendlyName" (string) - The string that you assigned to describe the resource. * @return TrusthubV1SupportingDocument - */ +*/ func (c *DefaultApiService) UpdateSupportingDocument(Sid string, params *UpdateSupportingDocumentParams) (*TrusthubV1SupportingDocument, error) { - path := "/v1/SupportingDocuments/{Sid}" + path := "/v1/SupportingDocuments/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Attributes != nil { - v, err := json.Marshal(params.Attributes) + data := url.Values{} + headers := 0 - if err != nil { - return nil, err - } + if params != nil && params.Attributes != nil { + v, err := json.Marshal(params.Attributes) - data.Set("Attributes", fmt.Sprint(v)) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - - resp, err := c.client.Post(c.baseURL+path, data, headers) if err != nil { - return nil, err + return nil, err } - defer resp.Body.Close() + data.Set("Attributes", fmt.Sprint(v)) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} - ps := &TrusthubV1SupportingDocument{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - return ps, err -} + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &TrusthubV1SupportingDocument{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateTrustProductParams Optional parameters for the method 'UpdateTrustProduct' type UpdateTrustProductParams struct { - Email *string `json:"Email,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Status *string `json:"Status,omitempty"` + Email *string `json:"Email,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Status *string `json:"Status,omitempty"` StatusCallback *string `json:"StatusCallback,omitempty"` } @@ -1761,38 +1802,39 @@ type UpdateTrustProductParams struct { * @param "Status" (string) - The verification status of the Customer-Profile resource. * @param "StatusCallback" (string) - The URL we call to inform your application of status changes. * @return TrusthubV1TrustProduct - */ +*/ func (c *DefaultApiService) UpdateTrustProduct(Sid string, params *UpdateTrustProductParams) (*TrusthubV1TrustProduct, error) { - path := "/v1/TrustProducts/{Sid}" + path := "/v1/TrustProducts/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Email != nil { - data.Set("Email", *params.Email) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) - } - if params != nil && params.StatusCallback != nil { - data.Set("StatusCallback", *params.StatusCallback) - } + if params != nil && params.Email != nil { + data.Set("Email", *params.Email) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) +} + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &TrusthubV1TrustProduct{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() + + ps := &TrusthubV1TrustProduct{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } diff --git a/twilio/rest/trusthub/v1/model_list_customer_profile_channel_endpoint_assignment_response.go b/twilio/rest/trusthub/v1/model_list_customer_profile_channel_endpoint_assignment_response.go index 9edda7d84..e62ab1f69 100644 --- a/twilio/rest/trusthub/v1/model_list_customer_profile_channel_endpoint_assignment_response.go +++ b/twilio/rest/trusthub/v1/model_list_customer_profile_channel_endpoint_assignment_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Trusthub - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Trusthub + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListCustomerProfileChannelEndpointAssignmentResponse struct for ListCustomerProfileChannelEndpointAssignmentResponse type ListCustomerProfileChannelEndpointAssignmentResponse struct { - Meta ListCustomerProfileResponseMeta `json:"Meta,omitempty"` + Meta ListCustomerProfileResponseMeta `json:"Meta,omitempty"` Results []TrusthubV1CustomerProfileCustomerProfileChannelEndpointAssignment `json:"Results,omitempty"` } diff --git a/twilio/rest/trusthub/v1/model_list_customer_profile_entity_assignment_response.go b/twilio/rest/trusthub/v1/model_list_customer_profile_entity_assignment_response.go index 9eed5779b..fb0d866b5 100644 --- a/twilio/rest/trusthub/v1/model_list_customer_profile_entity_assignment_response.go +++ b/twilio/rest/trusthub/v1/model_list_customer_profile_entity_assignment_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Trusthub - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Trusthub + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListCustomerProfileEntityAssignmentResponse struct for ListCustomerProfileEntityAssignmentResponse type ListCustomerProfileEntityAssignmentResponse struct { - Meta ListCustomerProfileResponseMeta `json:"Meta,omitempty"` + Meta ListCustomerProfileResponseMeta `json:"Meta,omitempty"` Results []TrusthubV1CustomerProfileCustomerProfileEntityAssignment `json:"Results,omitempty"` } diff --git a/twilio/rest/trusthub/v1/model_list_customer_profile_evaluation_response.go b/twilio/rest/trusthub/v1/model_list_customer_profile_evaluation_response.go index 614a3e73f..3e97b1d2e 100644 --- a/twilio/rest/trusthub/v1/model_list_customer_profile_evaluation_response.go +++ b/twilio/rest/trusthub/v1/model_list_customer_profile_evaluation_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Trusthub - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Trusthub + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListCustomerProfileEvaluationResponse struct for ListCustomerProfileEvaluationResponse type ListCustomerProfileEvaluationResponse struct { - Meta ListCustomerProfileResponseMeta `json:"Meta,omitempty"` + Meta ListCustomerProfileResponseMeta `json:"Meta,omitempty"` Results []TrusthubV1CustomerProfileCustomerProfileEvaluation `json:"Results,omitempty"` } diff --git a/twilio/rest/trusthub/v1/model_list_customer_profile_response.go b/twilio/rest/trusthub/v1/model_list_customer_profile_response.go index 4352b8bd4..b22812708 100644 --- a/twilio/rest/trusthub/v1/model_list_customer_profile_response.go +++ b/twilio/rest/trusthub/v1/model_list_customer_profile_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Trusthub - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Trusthub + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListCustomerProfileResponse struct for ListCustomerProfileResponse type ListCustomerProfileResponse struct { - Meta ListCustomerProfileResponseMeta `json:"Meta,omitempty"` - Results []TrusthubV1CustomerProfile `json:"Results,omitempty"` + Meta ListCustomerProfileResponseMeta `json:"Meta,omitempty"` + Results []TrusthubV1CustomerProfile `json:"Results,omitempty"` } diff --git a/twilio/rest/trusthub/v1/model_list_customer_profile_response_meta.go b/twilio/rest/trusthub/v1/model_list_customer_profile_response_meta.go index 038faca18..cef58ba5d 100644 --- a/twilio/rest/trusthub/v1/model_list_customer_profile_response_meta.go +++ b/twilio/rest/trusthub/v1/model_list_customer_profile_response_meta.go @@ -1,23 +1,22 @@ /* - * Twilio - Trusthub - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Trusthub + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListCustomerProfileResponseMeta struct for ListCustomerProfileResponseMeta type ListCustomerProfileResponseMeta struct { - FirstPageUrl string `json:"FirstPageUrl,omitempty"` - Key string `json:"Key,omitempty"` - NextPageUrl string `json:"NextPageUrl,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` - Url string `json:"Url,omitempty"` + Url string `json:"Url,omitempty"` } diff --git a/twilio/rest/trusthub/v1/model_list_end_user_response.go b/twilio/rest/trusthub/v1/model_list_end_user_response.go index 44aae522d..203972588 100644 --- a/twilio/rest/trusthub/v1/model_list_end_user_response.go +++ b/twilio/rest/trusthub/v1/model_list_end_user_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Trusthub - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Trusthub + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListEndUserResponse struct for ListEndUserResponse type ListEndUserResponse struct { - Meta ListCustomerProfileResponseMeta `json:"Meta,omitempty"` - Results []TrusthubV1EndUser `json:"Results,omitempty"` + Meta ListCustomerProfileResponseMeta `json:"Meta,omitempty"` + Results []TrusthubV1EndUser `json:"Results,omitempty"` } diff --git a/twilio/rest/trusthub/v1/model_list_end_user_type_response.go b/twilio/rest/trusthub/v1/model_list_end_user_type_response.go index 66fecba23..070272117 100644 --- a/twilio/rest/trusthub/v1/model_list_end_user_type_response.go +++ b/twilio/rest/trusthub/v1/model_list_end_user_type_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Trusthub - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Trusthub + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListEndUserTypeResponse struct for ListEndUserTypeResponse type ListEndUserTypeResponse struct { - EndUserTypes []TrusthubV1EndUserType `json:"EndUserTypes,omitempty"` - Meta ListCustomerProfileResponseMeta `json:"Meta,omitempty"` + EndUserTypes []TrusthubV1EndUserType `json:"EndUserTypes,omitempty"` + Meta ListCustomerProfileResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/trusthub/v1/model_list_policies_response.go b/twilio/rest/trusthub/v1/model_list_policies_response.go index be514d219..cad89617a 100644 --- a/twilio/rest/trusthub/v1/model_list_policies_response.go +++ b/twilio/rest/trusthub/v1/model_list_policies_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Trusthub - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Trusthub + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListPoliciesResponse struct for ListPoliciesResponse type ListPoliciesResponse struct { - Meta ListCustomerProfileResponseMeta `json:"Meta,omitempty"` - Results []TrusthubV1Policies `json:"Results,omitempty"` + Meta ListCustomerProfileResponseMeta `json:"Meta,omitempty"` + Results []TrusthubV1Policies `json:"Results,omitempty"` } diff --git a/twilio/rest/trusthub/v1/model_list_supporting_document_response.go b/twilio/rest/trusthub/v1/model_list_supporting_document_response.go index 9476b4673..6323f9c61 100644 --- a/twilio/rest/trusthub/v1/model_list_supporting_document_response.go +++ b/twilio/rest/trusthub/v1/model_list_supporting_document_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Trusthub - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Trusthub + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListSupportingDocumentResponse struct for ListSupportingDocumentResponse type ListSupportingDocumentResponse struct { - Meta ListCustomerProfileResponseMeta `json:"Meta,omitempty"` - Results []TrusthubV1SupportingDocument `json:"Results,omitempty"` + Meta ListCustomerProfileResponseMeta `json:"Meta,omitempty"` + Results []TrusthubV1SupportingDocument `json:"Results,omitempty"` } diff --git a/twilio/rest/trusthub/v1/model_list_supporting_document_type_response.go b/twilio/rest/trusthub/v1/model_list_supporting_document_type_response.go index 6c7757374..fc23f67e5 100644 --- a/twilio/rest/trusthub/v1/model_list_supporting_document_type_response.go +++ b/twilio/rest/trusthub/v1/model_list_supporting_document_type_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Trusthub - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Trusthub + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListSupportingDocumentTypeResponse struct for ListSupportingDocumentTypeResponse type ListSupportingDocumentTypeResponse struct { - Meta ListCustomerProfileResponseMeta `json:"Meta,omitempty"` + Meta ListCustomerProfileResponseMeta `json:"Meta,omitempty"` SupportingDocumentTypes []TrusthubV1SupportingDocumentType `json:"SupportingDocumentTypes,omitempty"` } diff --git a/twilio/rest/trusthub/v1/model_list_trust_product_channel_endpoint_assignment_response.go b/twilio/rest/trusthub/v1/model_list_trust_product_channel_endpoint_assignment_response.go index 080968489..f4c9b0848 100644 --- a/twilio/rest/trusthub/v1/model_list_trust_product_channel_endpoint_assignment_response.go +++ b/twilio/rest/trusthub/v1/model_list_trust_product_channel_endpoint_assignment_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Trusthub - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Trusthub + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListTrustProductChannelEndpointAssignmentResponse struct for ListTrustProductChannelEndpointAssignmentResponse type ListTrustProductChannelEndpointAssignmentResponse struct { - Meta ListCustomerProfileResponseMeta `json:"Meta,omitempty"` + Meta ListCustomerProfileResponseMeta `json:"Meta,omitempty"` Results []TrusthubV1TrustProductTrustProductChannelEndpointAssignment `json:"Results,omitempty"` } diff --git a/twilio/rest/trusthub/v1/model_list_trust_product_entity_assignment_response.go b/twilio/rest/trusthub/v1/model_list_trust_product_entity_assignment_response.go index a96fcee54..fe636a423 100644 --- a/twilio/rest/trusthub/v1/model_list_trust_product_entity_assignment_response.go +++ b/twilio/rest/trusthub/v1/model_list_trust_product_entity_assignment_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Trusthub - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Trusthub + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListTrustProductEntityAssignmentResponse struct for ListTrustProductEntityAssignmentResponse type ListTrustProductEntityAssignmentResponse struct { - Meta ListCustomerProfileResponseMeta `json:"Meta,omitempty"` + Meta ListCustomerProfileResponseMeta `json:"Meta,omitempty"` Results []TrusthubV1TrustProductTrustProductEntityAssignment `json:"Results,omitempty"` } diff --git a/twilio/rest/trusthub/v1/model_list_trust_product_evaluation_response.go b/twilio/rest/trusthub/v1/model_list_trust_product_evaluation_response.go index 75d97b930..544d6fa93 100644 --- a/twilio/rest/trusthub/v1/model_list_trust_product_evaluation_response.go +++ b/twilio/rest/trusthub/v1/model_list_trust_product_evaluation_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Trusthub - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Trusthub + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListTrustProductEvaluationResponse struct for ListTrustProductEvaluationResponse type ListTrustProductEvaluationResponse struct { - Meta ListCustomerProfileResponseMeta `json:"Meta,omitempty"` + Meta ListCustomerProfileResponseMeta `json:"Meta,omitempty"` Results []TrusthubV1TrustProductTrustProductEvaluation `json:"Results,omitempty"` } diff --git a/twilio/rest/trusthub/v1/model_list_trust_product_response.go b/twilio/rest/trusthub/v1/model_list_trust_product_response.go index f30946612..925c968da 100644 --- a/twilio/rest/trusthub/v1/model_list_trust_product_response.go +++ b/twilio/rest/trusthub/v1/model_list_trust_product_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Trusthub - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Trusthub + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListTrustProductResponse struct for ListTrustProductResponse type ListTrustProductResponse struct { - Meta ListCustomerProfileResponseMeta `json:"Meta,omitempty"` - Results []TrusthubV1TrustProduct `json:"Results,omitempty"` + Meta ListCustomerProfileResponseMeta `json:"Meta,omitempty"` + Results []TrusthubV1TrustProduct `json:"Results,omitempty"` } diff --git a/twilio/rest/trusthub/v1/model_trusthub_v1_customer_profile.go b/twilio/rest/trusthub/v1/model_trusthub_v1_customer_profile.go index 5f0da972d..f4db96c85 100644 --- a/twilio/rest/trusthub/v1/model_trusthub_v1_customer_profile.go +++ b/twilio/rest/trusthub/v1/model_trusthub_v1_customer_profile.go @@ -1,20 +1,18 @@ /* - * Twilio - Trusthub - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Trusthub + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // TrusthubV1CustomerProfile struct for TrusthubV1CustomerProfile type TrusthubV1CustomerProfile struct { // The SID of the Account that created the resource diff --git a/twilio/rest/trusthub/v1/model_trusthub_v1_customer_profile_customer_profile_channel_endpoint_assignment.go b/twilio/rest/trusthub/v1/model_trusthub_v1_customer_profile_customer_profile_channel_endpoint_assignment.go index 849e4b9d2..6a4d3eb47 100644 --- a/twilio/rest/trusthub/v1/model_trusthub_v1_customer_profile_customer_profile_channel_endpoint_assignment.go +++ b/twilio/rest/trusthub/v1/model_trusthub_v1_customer_profile_customer_profile_channel_endpoint_assignment.go @@ -1,20 +1,18 @@ /* - * Twilio - Trusthub - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Trusthub + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // TrusthubV1CustomerProfileCustomerProfileChannelEndpointAssignment struct for TrusthubV1CustomerProfileCustomerProfileChannelEndpointAssignment type TrusthubV1CustomerProfileCustomerProfileChannelEndpointAssignment struct { // The SID of the Account that created the resource diff --git a/twilio/rest/trusthub/v1/model_trusthub_v1_customer_profile_customer_profile_entity_assignment.go b/twilio/rest/trusthub/v1/model_trusthub_v1_customer_profile_customer_profile_entity_assignment.go index efdee8f59..70264ad0a 100644 --- a/twilio/rest/trusthub/v1/model_trusthub_v1_customer_profile_customer_profile_entity_assignment.go +++ b/twilio/rest/trusthub/v1/model_trusthub_v1_customer_profile_customer_profile_entity_assignment.go @@ -1,20 +1,18 @@ /* - * Twilio - Trusthub - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Trusthub + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // TrusthubV1CustomerProfileCustomerProfileEntityAssignment struct for TrusthubV1CustomerProfileCustomerProfileEntityAssignment type TrusthubV1CustomerProfileCustomerProfileEntityAssignment struct { // The SID of the Account that created the resource diff --git a/twilio/rest/trusthub/v1/model_trusthub_v1_customer_profile_customer_profile_evaluation.go b/twilio/rest/trusthub/v1/model_trusthub_v1_customer_profile_customer_profile_evaluation.go index 89f015fbf..0b7ea6a7e 100644 --- a/twilio/rest/trusthub/v1/model_trusthub_v1_customer_profile_customer_profile_evaluation.go +++ b/twilio/rest/trusthub/v1/model_trusthub_v1_customer_profile_customer_profile_evaluation.go @@ -1,27 +1,25 @@ /* - * Twilio - Trusthub - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Trusthub + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // TrusthubV1CustomerProfileCustomerProfileEvaluation struct for TrusthubV1CustomerProfileCustomerProfileEvaluation type TrusthubV1CustomerProfileCustomerProfileEvaluation struct { // The SID of the Account that created the resource AccountSid *string `json:"AccountSid,omitempty"` // The unique string that identifies the resource - CustomerProfileSid *string `json:"CustomerProfileSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` + CustomerProfileSid *string `json:"CustomerProfileSid,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` // The unique string of a policy PolicySid *string `json:"PolicySid,omitempty"` // The results of the Evaluation resource @@ -30,5 +28,5 @@ type TrusthubV1CustomerProfileCustomerProfileEvaluation struct { Sid *string `json:"Sid,omitempty"` // The compliance status of the Evaluation resource Status *string `json:"Status,omitempty"` - Url *string `json:"Url,omitempty"` + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/trusthub/v1/model_trusthub_v1_end_user.go b/twilio/rest/trusthub/v1/model_trusthub_v1_end_user.go index 0f7d6e7c3..6a6bb00af 100644 --- a/twilio/rest/trusthub/v1/model_trusthub_v1_end_user.go +++ b/twilio/rest/trusthub/v1/model_trusthub_v1_end_user.go @@ -1,20 +1,18 @@ /* - * Twilio - Trusthub - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Trusthub + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // TrusthubV1EndUser struct for TrusthubV1EndUser type TrusthubV1EndUser struct { // The SID of the Account that created the resource diff --git a/twilio/rest/trusthub/v1/model_trusthub_v1_end_user_type.go b/twilio/rest/trusthub/v1/model_trusthub_v1_end_user_type.go index f48d49e5e..1084b0122 100644 --- a/twilio/rest/trusthub/v1/model_trusthub_v1_end_user_type.go +++ b/twilio/rest/trusthub/v1/model_trusthub_v1_end_user_type.go @@ -1,16 +1,15 @@ /* - * Twilio - Trusthub - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Trusthub + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // TrusthubV1EndUserType struct for TrusthubV1EndUserType type TrusthubV1EndUserType struct { // The required information for creating an End-User. diff --git a/twilio/rest/trusthub/v1/model_trusthub_v1_policies.go b/twilio/rest/trusthub/v1/model_trusthub_v1_policies.go index 055f57d84..2487f87e1 100644 --- a/twilio/rest/trusthub/v1/model_trusthub_v1_policies.go +++ b/twilio/rest/trusthub/v1/model_trusthub_v1_policies.go @@ -1,16 +1,15 @@ /* - * Twilio - Trusthub - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Trusthub + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // TrusthubV1Policies struct for TrusthubV1Policies type TrusthubV1Policies struct { // A human-readable description of the Policy resource diff --git a/twilio/rest/trusthub/v1/model_trusthub_v1_supporting_document.go b/twilio/rest/trusthub/v1/model_trusthub_v1_supporting_document.go index d690c23bb..e0f9d6e7e 100644 --- a/twilio/rest/trusthub/v1/model_trusthub_v1_supporting_document.go +++ b/twilio/rest/trusthub/v1/model_trusthub_v1_supporting_document.go @@ -1,20 +1,18 @@ /* - * Twilio - Trusthub - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Trusthub + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // TrusthubV1SupportingDocument struct for TrusthubV1SupportingDocument type TrusthubV1SupportingDocument struct { // The SID of the Account that created the resource diff --git a/twilio/rest/trusthub/v1/model_trusthub_v1_supporting_document_type.go b/twilio/rest/trusthub/v1/model_trusthub_v1_supporting_document_type.go index 353ffa97f..5044aa7f2 100644 --- a/twilio/rest/trusthub/v1/model_trusthub_v1_supporting_document_type.go +++ b/twilio/rest/trusthub/v1/model_trusthub_v1_supporting_document_type.go @@ -1,16 +1,15 @@ /* - * Twilio - Trusthub - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Trusthub + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // TrusthubV1SupportingDocumentType struct for TrusthubV1SupportingDocumentType type TrusthubV1SupportingDocumentType struct { // The required information for creating a Supporting Document diff --git a/twilio/rest/trusthub/v1/model_trusthub_v1_trust_product.go b/twilio/rest/trusthub/v1/model_trusthub_v1_trust_product.go index c54c6547a..44967c41b 100644 --- a/twilio/rest/trusthub/v1/model_trusthub_v1_trust_product.go +++ b/twilio/rest/trusthub/v1/model_trusthub_v1_trust_product.go @@ -1,20 +1,18 @@ /* - * Twilio - Trusthub - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Trusthub + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // TrusthubV1TrustProduct struct for TrusthubV1TrustProduct type TrusthubV1TrustProduct struct { // The SID of the Account that created the resource diff --git a/twilio/rest/trusthub/v1/model_trusthub_v1_trust_product_trust_product_channel_endpoint_assignment.go b/twilio/rest/trusthub/v1/model_trusthub_v1_trust_product_trust_product_channel_endpoint_assignment.go index 49692db28..d3c97ba5e 100644 --- a/twilio/rest/trusthub/v1/model_trusthub_v1_trust_product_trust_product_channel_endpoint_assignment.go +++ b/twilio/rest/trusthub/v1/model_trusthub_v1_trust_product_trust_product_channel_endpoint_assignment.go @@ -1,20 +1,18 @@ /* - * Twilio - Trusthub - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Trusthub + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // TrusthubV1TrustProductTrustProductChannelEndpointAssignment struct for TrusthubV1TrustProductTrustProductChannelEndpointAssignment type TrusthubV1TrustProductTrustProductChannelEndpointAssignment struct { // The SID of the Account that created the resource diff --git a/twilio/rest/trusthub/v1/model_trusthub_v1_trust_product_trust_product_entity_assignment.go b/twilio/rest/trusthub/v1/model_trusthub_v1_trust_product_trust_product_entity_assignment.go index 183da6793..a52df4cce 100644 --- a/twilio/rest/trusthub/v1/model_trusthub_v1_trust_product_trust_product_entity_assignment.go +++ b/twilio/rest/trusthub/v1/model_trusthub_v1_trust_product_trust_product_entity_assignment.go @@ -1,20 +1,18 @@ /* - * Twilio - Trusthub - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Trusthub + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // TrusthubV1TrustProductTrustProductEntityAssignment struct for TrusthubV1TrustProductTrustProductEntityAssignment type TrusthubV1TrustProductTrustProductEntityAssignment struct { // The SID of the Account that created the resource diff --git a/twilio/rest/trusthub/v1/model_trusthub_v1_trust_product_trust_product_evaluation.go b/twilio/rest/trusthub/v1/model_trusthub_v1_trust_product_trust_product_evaluation.go index f6b6269c3..a11c07404 100644 --- a/twilio/rest/trusthub/v1/model_trusthub_v1_trust_product_trust_product_evaluation.go +++ b/twilio/rest/trusthub/v1/model_trusthub_v1_trust_product_trust_product_evaluation.go @@ -1,24 +1,22 @@ /* - * Twilio - Trusthub - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Trusthub + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // TrusthubV1TrustProductTrustProductEvaluation struct for TrusthubV1TrustProductTrustProductEvaluation type TrusthubV1TrustProductTrustProductEvaluation struct { // The SID of the Account that created the resource - AccountSid *string `json:"AccountSid,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` DateCreated *time.Time `json:"DateCreated,omitempty"` // The unique string of a policy PolicySid *string `json:"PolicySid,omitempty"` @@ -30,5 +28,5 @@ type TrusthubV1TrustProductTrustProductEvaluation struct { Status *string `json:"Status,omitempty"` // The unique string that identifies the resource TrustProductSid *string `json:"TrustProductSid,omitempty"` - Url *string `json:"Url,omitempty"` + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/verify/v2/api_default.go b/twilio/rest/verify/v2/api_default.go index 589c303c8..e991614bc 100644 --- a/twilio/rest/verify/v2/api_default.go +++ b/twilio/rest/verify/v2/api_default.go @@ -1,11 +1,11 @@ /* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,11 +14,10 @@ package openapi import ( "encoding/json" "fmt" - "net/url" - "strings" - "time" - twilio "github.com/twilio/twilio-go/client" + "net/url" + "strings" + "time" ) type DefaultApiService struct { @@ -27,8 +26,8 @@ type DefaultApiService struct { } func NewDefaultApiService(client *twilio.Client) *DefaultApiService { - return &DefaultApiService{ - client: client, + return &DefaultApiService { + client: client, baseURL: "https://verify.twilio.com", } } @@ -36,7 +35,7 @@ func NewDefaultApiService(client *twilio.Client) *DefaultApiService { // CreateAccessTokenParams Optional parameters for the method 'CreateAccessToken' type CreateAccessTokenParams struct { FactorType *string `json:"FactorType,omitempty"` - Identity *string `json:"Identity,omitempty"` + Identity *string `json:"Identity,omitempty"` } /* @@ -47,40 +46,40 @@ type CreateAccessTokenParams struct { * @param "FactorType" (string) - The Type of this Factor. Eg. `push` * @param "Identity" (string) - The unique external identifier for the Entity of the Service. This identifier should be immutable, not PII, and generated by your external system, such as your user's UUID, GUID, or SID. * @return VerifyV2ServiceAccessToken - */ +*/ func (c *DefaultApiService) CreateAccessToken(ServiceSid string, params *CreateAccessTokenParams) (*VerifyV2ServiceAccessToken, error) { - path := "/v2/Services/{ServiceSid}/AccessTokens" + path := "/v2/Services/{ServiceSid}/AccessTokens" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.FactorType != nil { - data.Set("FactorType", *params.FactorType) - } - if params != nil && params.Identity != nil { - data.Set("Identity", *params.Identity) - } + if params != nil && params.FactorType != nil { + data.Set("FactorType", *params.FactorType) +} + if params != nil && params.Identity != nil { + data.Set("Identity", *params.Identity) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &VerifyV2ServiceAccessToken{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &VerifyV2ServiceAccessToken{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateBucketParams Optional parameters for the method 'CreateBucket' type CreateBucketParams struct { Interval *int32 `json:"Interval,omitempty"` - Max *int32 `json:"Max,omitempty"` + Max *int32 `json:"Max,omitempty"` } /* @@ -92,44 +91,44 @@ type CreateBucketParams struct { * @param "Interval" (int32) - Number of seconds that the rate limit will be enforced over. * @param "Max" (int32) - Maximum number of requests permitted in during the interval. * @return VerifyV2ServiceRateLimitBucket - */ +*/ func (c *DefaultApiService) CreateBucket(ServiceSid string, RateLimitSid string, params *CreateBucketParams) (*VerifyV2ServiceRateLimitBucket, error) { - path := "/v2/Services/{ServiceSid}/RateLimits/{RateLimitSid}/Buckets" + path := "/v2/Services/{ServiceSid}/RateLimits/{RateLimitSid}/Buckets" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"RateLimitSid"+"}", RateLimitSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Interval != nil { - data.Set("Interval", fmt.Sprint(*params.Interval)) - } - if params != nil && params.Max != nil { - data.Set("Max", fmt.Sprint(*params.Max)) - } + if params != nil && params.Interval != nil { + data.Set("Interval", fmt.Sprint(*params.Interval)) +} + if params != nil && params.Max != nil { + data.Set("Max", fmt.Sprint(*params.Max)) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &VerifyV2ServiceRateLimitBucket{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &VerifyV2ServiceRateLimitBucket{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateChallengeParams Optional parameters for the method 'CreateChallenge' type CreateChallengeParams struct { - DetailsFields *[]map[string]interface{} `json:"Details.Fields,omitempty"` - DetailsMessage *string `json:"Details.Message,omitempty"` - ExpirationDate *time.Time `json:"ExpirationDate,omitempty"` - FactorSid *string `json:"FactorSid,omitempty"` - HiddenDetails *map[string]interface{} `json:"HiddenDetails,omitempty"` + DetailsFields *[]map[string]interface{} `json:"Details.Fields,omitempty"` + DetailsMessage *string `json:"Details.Message,omitempty"` + ExpirationDate *time.Time `json:"ExpirationDate,omitempty"` + FactorSid *string `json:"FactorSid,omitempty"` + HiddenDetails *map[string]interface{} `json:"HiddenDetails,omitempty"` } /* @@ -144,58 +143,58 @@ type CreateChallengeParams struct { * @param "FactorSid" (string) - The unique SID identifier of the Factor. * @param "HiddenDetails" (map[string]interface{}) - Details provided to give context about the Challenge. Not shown to the end user. It must be a stringified JSON with only strings values eg. `{\\\"ip\\\": \\\"172.168.1.234\\\"}` * @return VerifyV2ServiceEntityChallenge - */ +*/ func (c *DefaultApiService) CreateChallenge(ServiceSid string, Identity string, params *CreateChallengeParams) (*VerifyV2ServiceEntityChallenge, error) { - path := "/v2/Services/{ServiceSid}/Entities/{Identity}/Challenges" + path := "/v2/Services/{ServiceSid}/Entities/{Identity}/Challenges" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.DetailsFields != nil { - v, err := json.Marshal(params.DetailsFields) + data := url.Values{} + headers := 0 - if err != nil { - return nil, err - } + if params != nil && params.DetailsFields != nil { + v, err := json.Marshal(params.DetailsFields) - data.Set("DetailsFields", fmt.Sprint(v)) - } - if params != nil && params.DetailsMessage != nil { - data.Set("DetailsMessage", *params.DetailsMessage) - } - if params != nil && params.ExpirationDate != nil { - data.Set("ExpirationDate", fmt.Sprint(*params.ExpirationDate)) - } - if params != nil && params.FactorSid != nil { - data.Set("FactorSid", *params.FactorSid) + if err != nil { + return nil, err } - if params != nil && params.HiddenDetails != nil { - v, err := json.Marshal(params.HiddenDetails) - - if err != nil { - return nil, err - } - data.Set("HiddenDetails", fmt.Sprint(v)) - } + data.Set("DetailsFields", fmt.Sprint(v)) +} + if params != nil && params.DetailsMessage != nil { + data.Set("DetailsMessage", *params.DetailsMessage) +} + if params != nil && params.ExpirationDate != nil { + data.Set("ExpirationDate", fmt.Sprint(*params.ExpirationDate)) +} + if params != nil && params.FactorSid != nil { + data.Set("FactorSid", *params.FactorSid) +} + if params != nil && params.HiddenDetails != nil { + v, err := json.Marshal(params.HiddenDetails) - resp, err := c.client.Post(c.baseURL+path, data, headers) if err != nil { - return nil, err + return nil, err } - defer resp.Body.Close() + data.Set("HiddenDetails", fmt.Sprint(v)) +} - ps := &VerifyV2ServiceEntityChallenge{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - return ps, err -} + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + ps := &VerifyV2ServiceEntityChallenge{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} // CreateEntityParams Optional parameters for the method 'CreateEntity' type CreateEntityParams struct { Identity *string `json:"Identity,omitempty"` @@ -208,43 +207,43 @@ type CreateEntityParams struct { * @param optional nil or *CreateEntityParams - Optional Parameters: * @param "Identity" (string) - The unique external identifier for the Entity of the Service. This identifier should be immutable, not PII, length between 8 and 64 characters, and generated by your external system, such as your user's UUID, GUID, or SID. * @return VerifyV2ServiceEntity - */ +*/ func (c *DefaultApiService) CreateEntity(ServiceSid string, params *CreateEntityParams) (*VerifyV2ServiceEntity, error) { - path := "/v2/Services/{ServiceSid}/Entities" + path := "/v2/Services/{ServiceSid}/Entities" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Identity != nil { - data.Set("Identity", *params.Identity) - } + if params != nil && params.Identity != nil { + data.Set("Identity", *params.Identity) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &VerifyV2ServiceEntity{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &VerifyV2ServiceEntity{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateFactorParams Optional parameters for the method 'CreateFactor' type CreateFactorParams struct { - BindingAlg *string `json:"Binding.Alg,omitempty"` - BindingPublicKey *string `json:"Binding.PublicKey,omitempty"` - ConfigAppId *string `json:"Config.AppId,omitempty"` + BindingAlg *string `json:"Binding.Alg,omitempty"` + BindingPublicKey *string `json:"Binding.PublicKey,omitempty"` + ConfigAppId *string `json:"Config.AppId,omitempty"` ConfigNotificationPlatform *string `json:"Config.NotificationPlatform,omitempty"` - ConfigNotificationToken *string `json:"Config.NotificationToken,omitempty"` - ConfigSdkVersion *string `json:"Config.SdkVersion,omitempty"` - FactorType *string `json:"FactorType,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` + ConfigNotificationToken *string `json:"Config.NotificationToken,omitempty"` + ConfigSdkVersion *string `json:"Config.SdkVersion,omitempty"` + FactorType *string `json:"FactorType,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` } /* @@ -262,58 +261,58 @@ type CreateFactorParams struct { * @param "FactorType" (string) - The Type of this Factor. Currently only `push` is supported * @param "FriendlyName" (string) - The friendly name of this Factor * @return VerifyV2ServiceEntityFactor - */ +*/ func (c *DefaultApiService) CreateFactor(ServiceSid string, Identity string, params *CreateFactorParams) (*VerifyV2ServiceEntityFactor, error) { - path := "/v2/Services/{ServiceSid}/Entities/{Identity}/Factors" + path := "/v2/Services/{ServiceSid}/Entities/{Identity}/Factors" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.BindingAlg != nil { - data.Set("BindingAlg", *params.BindingAlg) - } - if params != nil && params.BindingPublicKey != nil { - data.Set("BindingPublicKey", *params.BindingPublicKey) - } - if params != nil && params.ConfigAppId != nil { - data.Set("ConfigAppId", *params.ConfigAppId) - } - if params != nil && params.ConfigNotificationPlatform != nil { - data.Set("ConfigNotificationPlatform", *params.ConfigNotificationPlatform) - } - if params != nil && params.ConfigNotificationToken != nil { - data.Set("ConfigNotificationToken", *params.ConfigNotificationToken) - } - if params != nil && params.ConfigSdkVersion != nil { - data.Set("ConfigSdkVersion", *params.ConfigSdkVersion) - } - if params != nil && params.FactorType != nil { - data.Set("FactorType", *params.FactorType) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } + if params != nil && params.BindingAlg != nil { + data.Set("BindingAlg", *params.BindingAlg) +} + if params != nil && params.BindingPublicKey != nil { + data.Set("BindingPublicKey", *params.BindingPublicKey) +} + if params != nil && params.ConfigAppId != nil { + data.Set("ConfigAppId", *params.ConfigAppId) +} + if params != nil && params.ConfigNotificationPlatform != nil { + data.Set("ConfigNotificationPlatform", *params.ConfigNotificationPlatform) +} + if params != nil && params.ConfigNotificationToken != nil { + data.Set("ConfigNotificationToken", *params.ConfigNotificationToken) +} + if params != nil && params.ConfigSdkVersion != nil { + data.Set("ConfigSdkVersion", *params.ConfigSdkVersion) +} + if params != nil && params.FactorType != nil { + data.Set("FactorType", *params.FactorType) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &VerifyV2ServiceEntityFactor{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &VerifyV2ServiceEntityFactor{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateMessagingConfigurationParams Optional parameters for the method 'CreateMessagingConfiguration' type CreateMessagingConfigurationParams struct { - Country *string `json:"Country,omitempty"` + Country *string `json:"Country,omitempty"` MessagingServiceSid *string `json:"MessagingServiceSid,omitempty"` } @@ -325,40 +324,40 @@ type CreateMessagingConfigurationParams struct { * @param "Country" (string) - The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country this configuration will be applied to. If this is a global configuration, Country will take the value `all`. * @param "MessagingServiceSid" (string) - The SID of the [Messaging Service](https://www.twilio.com/docs/sms/services/api) to be used to send SMS to the country of this configuration. * @return VerifyV2ServiceMessagingConfiguration - */ +*/ func (c *DefaultApiService) CreateMessagingConfiguration(ServiceSid string, params *CreateMessagingConfigurationParams) (*VerifyV2ServiceMessagingConfiguration, error) { - path := "/v2/Services/{ServiceSid}/MessagingConfigurations" + path := "/v2/Services/{ServiceSid}/MessagingConfigurations" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Country != nil { - data.Set("Country", *params.Country) - } - if params != nil && params.MessagingServiceSid != nil { - data.Set("MessagingServiceSid", *params.MessagingServiceSid) - } + if params != nil && params.Country != nil { + data.Set("Country", *params.Country) +} + if params != nil && params.MessagingServiceSid != nil { + data.Set("MessagingServiceSid", *params.MessagingServiceSid) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &VerifyV2ServiceMessagingConfiguration{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &VerifyV2ServiceMessagingConfiguration{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateRateLimitParams Optional parameters for the method 'CreateRateLimit' type CreateRateLimitParams struct { Description *string `json:"Description,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` } /* @@ -369,50 +368,50 @@ type CreateRateLimitParams struct { * @param "Description" (string) - Description of this Rate Limit * @param "UniqueName" (string) - Provides a unique and addressable name to be assigned to this Rate Limit, assigned by the developer, to be optionally used in addition to SID. **This value should not contain PII.** * @return VerifyV2ServiceRateLimit - */ +*/ func (c *DefaultApiService) CreateRateLimit(ServiceSid string, params *CreateRateLimitParams) (*VerifyV2ServiceRateLimit, error) { - path := "/v2/Services/{ServiceSid}/RateLimits" + path := "/v2/Services/{ServiceSid}/RateLimits" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Description != nil { - data.Set("Description", *params.Description) - } - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) - } + if params != nil && params.Description != nil { + data.Set("Description", *params.Description) +} + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &VerifyV2ServiceRateLimit{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &VerifyV2ServiceRateLimit{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateServiceParams Optional parameters for the method 'CreateService' type CreateServiceParams struct { - CodeLength *int32 `json:"CodeLength,omitempty"` - CustomCodeEnabled *bool `json:"CustomCodeEnabled,omitempty"` - DoNotShareWarningEnabled *bool `json:"DoNotShareWarningEnabled,omitempty"` - DtmfInputRequired *bool `json:"DtmfInputRequired,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - LookupEnabled *bool `json:"LookupEnabled,omitempty"` - Psd2Enabled *bool `json:"Psd2Enabled,omitempty"` - PushApnCredentialSid *string `json:"Push.ApnCredentialSid,omitempty"` - PushFcmCredentialSid *string `json:"Push.FcmCredentialSid,omitempty"` - PushIncludeDate *bool `json:"Push.IncludeDate,omitempty"` - SkipSmsToLandlines *bool `json:"SkipSmsToLandlines,omitempty"` - TtsName *string `json:"TtsName,omitempty"` + CodeLength *int32 `json:"CodeLength,omitempty"` + CustomCodeEnabled *bool `json:"CustomCodeEnabled,omitempty"` + DoNotShareWarningEnabled *bool `json:"DoNotShareWarningEnabled,omitempty"` + DtmfInputRequired *bool `json:"DtmfInputRequired,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + LookupEnabled *bool `json:"LookupEnabled,omitempty"` + Psd2Enabled *bool `json:"Psd2Enabled,omitempty"` + PushApnCredentialSid *string `json:"Push.ApnCredentialSid,omitempty"` + PushFcmCredentialSid *string `json:"Push.FcmCredentialSid,omitempty"` + PushIncludeDate *bool `json:"Push.IncludeDate,omitempty"` + SkipSmsToLandlines *bool `json:"SkipSmsToLandlines,omitempty"` + TtsName *string `json:"TtsName,omitempty"` } /* @@ -432,79 +431,79 @@ type CreateServiceParams struct { * @param "SkipSmsToLandlines" (bool) - Whether to skip sending SMS verifications to landlines. Requires `lookup_enabled`. * @param "TtsName" (string) - The name of an alternative text-to-speech service to use in phone calls. Applies only to TTS languages. * @return VerifyV2Service - */ +*/ func (c *DefaultApiService) CreateService(params *CreateServiceParams) (*VerifyV2Service, error) { - path := "/v2/Services" + path := "/v2/Services" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.CodeLength != nil { - data.Set("CodeLength", fmt.Sprint(*params.CodeLength)) - } - if params != nil && params.CustomCodeEnabled != nil { - data.Set("CustomCodeEnabled", fmt.Sprint(*params.CustomCodeEnabled)) - } - if params != nil && params.DoNotShareWarningEnabled != nil { - data.Set("DoNotShareWarningEnabled", fmt.Sprint(*params.DoNotShareWarningEnabled)) - } - if params != nil && params.DtmfInputRequired != nil { - data.Set("DtmfInputRequired", fmt.Sprint(*params.DtmfInputRequired)) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.LookupEnabled != nil { - data.Set("LookupEnabled", fmt.Sprint(*params.LookupEnabled)) - } - if params != nil && params.Psd2Enabled != nil { - data.Set("Psd2Enabled", fmt.Sprint(*params.Psd2Enabled)) - } - if params != nil && params.PushApnCredentialSid != nil { - data.Set("PushApnCredentialSid", *params.PushApnCredentialSid) - } - if params != nil && params.PushFcmCredentialSid != nil { - data.Set("PushFcmCredentialSid", *params.PushFcmCredentialSid) - } - if params != nil && params.PushIncludeDate != nil { - data.Set("PushIncludeDate", fmt.Sprint(*params.PushIncludeDate)) - } - if params != nil && params.SkipSmsToLandlines != nil { - data.Set("SkipSmsToLandlines", fmt.Sprint(*params.SkipSmsToLandlines)) - } - if params != nil && params.TtsName != nil { - data.Set("TtsName", *params.TtsName) - } + if params != nil && params.CodeLength != nil { + data.Set("CodeLength", fmt.Sprint(*params.CodeLength)) +} + if params != nil && params.CustomCodeEnabled != nil { + data.Set("CustomCodeEnabled", fmt.Sprint(*params.CustomCodeEnabled)) +} + if params != nil && params.DoNotShareWarningEnabled != nil { + data.Set("DoNotShareWarningEnabled", fmt.Sprint(*params.DoNotShareWarningEnabled)) +} + if params != nil && params.DtmfInputRequired != nil { + data.Set("DtmfInputRequired", fmt.Sprint(*params.DtmfInputRequired)) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.LookupEnabled != nil { + data.Set("LookupEnabled", fmt.Sprint(*params.LookupEnabled)) +} + if params != nil && params.Psd2Enabled != nil { + data.Set("Psd2Enabled", fmt.Sprint(*params.Psd2Enabled)) +} + if params != nil && params.PushApnCredentialSid != nil { + data.Set("PushApnCredentialSid", *params.PushApnCredentialSid) +} + if params != nil && params.PushFcmCredentialSid != nil { + data.Set("PushFcmCredentialSid", *params.PushFcmCredentialSid) +} + if params != nil && params.PushIncludeDate != nil { + data.Set("PushIncludeDate", fmt.Sprint(*params.PushIncludeDate)) +} + if params != nil && params.SkipSmsToLandlines != nil { + data.Set("SkipSmsToLandlines", fmt.Sprint(*params.SkipSmsToLandlines)) +} + if params != nil && params.TtsName != nil { + data.Set("TtsName", *params.TtsName) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &VerifyV2Service{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &VerifyV2Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateVerificationParams Optional parameters for the method 'CreateVerification' type CreateVerificationParams struct { - Amount *string `json:"Amount,omitempty"` - AppHash *string `json:"AppHash,omitempty"` - Channel *string `json:"Channel,omitempty"` + Amount *string `json:"Amount,omitempty"` + AppHash *string `json:"AppHash,omitempty"` + Channel *string `json:"Channel,omitempty"` ChannelConfiguration *map[string]interface{} `json:"ChannelConfiguration,omitempty"` - CustomCode *string `json:"CustomCode,omitempty"` - CustomFriendlyName *string `json:"CustomFriendlyName,omitempty"` - CustomMessage *string `json:"CustomMessage,omitempty"` - Locale *string `json:"Locale,omitempty"` - Payee *string `json:"Payee,omitempty"` - RateLimits *map[string]interface{} `json:"RateLimits,omitempty"` - SendDigits *string `json:"SendDigits,omitempty"` - To *string `json:"To,omitempty"` + CustomCode *string `json:"CustomCode,omitempty"` + CustomFriendlyName *string `json:"CustomFriendlyName,omitempty"` + CustomMessage *string `json:"CustomMessage,omitempty"` + Locale *string `json:"Locale,omitempty"` + Payee *string `json:"Payee,omitempty"` + RateLimits *map[string]interface{} `json:"RateLimits,omitempty"` + SendDigits *string `json:"SendDigits,omitempty"` + To *string `json:"To,omitempty"` } /* @@ -525,84 +524,84 @@ type CreateVerificationParams struct { * @param "SendDigits" (string) - The digits to send after a phone call is answered, for example, to dial an extension. For more information, see the Programmable Voice documentation of [sendDigits](https://www.twilio.com/docs/voice/twiml/number#attributes-sendDigits). * @param "To" (string) - The phone number or [email](https://www.twilio.com/docs/verify/email) to verify. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164). * @return VerifyV2ServiceVerification - */ +*/ func (c *DefaultApiService) CreateVerification(ServiceSid string, params *CreateVerificationParams) (*VerifyV2ServiceVerification, error) { - path := "/v2/Services/{ServiceSid}/Verifications" + path := "/v2/Services/{ServiceSid}/Verifications" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Amount != nil { - data.Set("Amount", *params.Amount) - } - if params != nil && params.AppHash != nil { - data.Set("AppHash", *params.AppHash) - } - if params != nil && params.Channel != nil { - data.Set("Channel", *params.Channel) + if params != nil && params.Amount != nil { + data.Set("Amount", *params.Amount) +} + if params != nil && params.AppHash != nil { + data.Set("AppHash", *params.AppHash) +} + if params != nil && params.Channel != nil { + data.Set("Channel", *params.Channel) +} + if params != nil && params.ChannelConfiguration != nil { + v, err := json.Marshal(params.ChannelConfiguration) + + if err != nil { + return nil, err } - if params != nil && params.ChannelConfiguration != nil { - v, err := json.Marshal(params.ChannelConfiguration) - if err != nil { - return nil, err - } + data.Set("ChannelConfiguration", fmt.Sprint(v)) +} + if params != nil && params.CustomCode != nil { + data.Set("CustomCode", *params.CustomCode) +} + if params != nil && params.CustomFriendlyName != nil { + data.Set("CustomFriendlyName", *params.CustomFriendlyName) +} + if params != nil && params.CustomMessage != nil { + data.Set("CustomMessage", *params.CustomMessage) +} + if params != nil && params.Locale != nil { + data.Set("Locale", *params.Locale) +} + if params != nil && params.Payee != nil { + data.Set("Payee", *params.Payee) +} + if params != nil && params.RateLimits != nil { + v, err := json.Marshal(params.RateLimits) - data.Set("ChannelConfiguration", fmt.Sprint(v)) - } - if params != nil && params.CustomCode != nil { - data.Set("CustomCode", *params.CustomCode) - } - if params != nil && params.CustomFriendlyName != nil { - data.Set("CustomFriendlyName", *params.CustomFriendlyName) - } - if params != nil && params.CustomMessage != nil { - data.Set("CustomMessage", *params.CustomMessage) - } - if params != nil && params.Locale != nil { - data.Set("Locale", *params.Locale) - } - if params != nil && params.Payee != nil { - data.Set("Payee", *params.Payee) + if err != nil { + return nil, err } - if params != nil && params.RateLimits != nil { - v, err := json.Marshal(params.RateLimits) - if err != nil { - return nil, err - } + data.Set("RateLimits", fmt.Sprint(v)) +} + if params != nil && params.SendDigits != nil { + data.Set("SendDigits", *params.SendDigits) +} + if params != nil && params.To != nil { + data.Set("To", *params.To) +} - data.Set("RateLimits", fmt.Sprint(v)) - } - if params != nil && params.SendDigits != nil { - data.Set("SendDigits", *params.SendDigits) - } - if params != nil && params.To != nil { - data.Set("To", *params.To) - } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &VerifyV2ServiceVerification{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VerifyV2ServiceVerification{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } - // CreateVerificationCheckParams Optional parameters for the method 'CreateVerificationCheck' type CreateVerificationCheckParams struct { - Amount *string `json:"Amount,omitempty"` - Code *string `json:"Code,omitempty"` - Payee *string `json:"Payee,omitempty"` - To *string `json:"To,omitempty"` + Amount *string `json:"Amount,omitempty"` + Code *string `json:"Code,omitempty"` + Payee *string `json:"Payee,omitempty"` + To *string `json:"To,omitempty"` VerificationSid *string `json:"VerificationSid,omitempty"` } @@ -617,51 +616,51 @@ type CreateVerificationCheckParams struct { * @param "To" (string) - The phone number or [email](https://www.twilio.com/docs/verify/email) to verify. Either this parameter or the `verification_sid` must be specified. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164). * @param "VerificationSid" (string) - A SID that uniquely identifies the Verification Check. Either this parameter or the `to` phone number/[email](https://www.twilio.com/docs/verify/email) must be specified. * @return VerifyV2ServiceVerificationCheck - */ +*/ func (c *DefaultApiService) CreateVerificationCheck(ServiceSid string, params *CreateVerificationCheckParams) (*VerifyV2ServiceVerificationCheck, error) { - path := "/v2/Services/{ServiceSid}/VerificationCheck" + path := "/v2/Services/{ServiceSid}/VerificationCheck" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Amount != nil { - data.Set("Amount", *params.Amount) - } - if params != nil && params.Code != nil { - data.Set("Code", *params.Code) - } - if params != nil && params.Payee != nil { - data.Set("Payee", *params.Payee) - } - if params != nil && params.To != nil { - data.Set("To", *params.To) - } - if params != nil && params.VerificationSid != nil { - data.Set("VerificationSid", *params.VerificationSid) - } + if params != nil && params.Amount != nil { + data.Set("Amount", *params.Amount) +} + if params != nil && params.Code != nil { + data.Set("Code", *params.Code) +} + if params != nil && params.Payee != nil { + data.Set("Payee", *params.Payee) +} + if params != nil && params.To != nil { + data.Set("To", *params.To) +} + if params != nil && params.VerificationSid != nil { + data.Set("VerificationSid", *params.VerificationSid) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &VerifyV2ServiceVerificationCheck{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &VerifyV2ServiceVerificationCheck{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateWebhookParams Optional parameters for the method 'CreateWebhook' type CreateWebhookParams struct { - EventTypes *[]string `json:"EventTypes,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Status *string `json:"Status,omitempty"` - WebhookUrl *string `json:"WebhookUrl,omitempty"` + EventTypes *[]string `json:"EventTypes,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Status *string `json:"Status,omitempty"` + WebhookUrl *string `json:"WebhookUrl,omitempty"` } /* @@ -674,40 +673,41 @@ type CreateWebhookParams struct { * @param "Status" (string) - The webhook status. Default value is `enabled`. One of: `enabled` or `disabled` * @param "WebhookUrl" (string) - The URL associated with this Webhook. * @return VerifyV2ServiceWebhook - */ +*/ func (c *DefaultApiService) CreateWebhook(ServiceSid string, params *CreateWebhookParams) (*VerifyV2ServiceWebhook, error) { - path := "/v2/Services/{ServiceSid}/Webhooks" + path := "/v2/Services/{ServiceSid}/Webhooks" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.EventTypes != nil { - data.Set("EventTypes", strings.Join(*params.EventTypes, ",")) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) - } - if params != nil && params.WebhookUrl != nil { - data.Set("WebhookUrl", *params.WebhookUrl) - } + if params != nil && params.EventTypes != nil { + data.Set("EventTypes", strings.Join(*params.EventTypes, ",")) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) +} + if params != nil && params.WebhookUrl != nil { + data.Set("WebhookUrl", *params.WebhookUrl) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &VerifyV2ServiceWebhook{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() + + ps := &VerifyV2ServiceWebhook{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -716,24 +716,26 @@ func (c *DefaultApiService) CreateWebhook(ServiceSid string, params *CreateWebho * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/verify/api/service) the resource is associated with. * @param RateLimitSid The Twilio-provided string that uniquely identifies the Rate Limit resource. * @param Sid A 34 character string that uniquely identifies this Bucket. - */ -func (c *DefaultApiService) DeleteBucket(ServiceSid string, RateLimitSid string, Sid string) error { - path := "/v2/Services/{ServiceSid}/RateLimits/{RateLimitSid}/Buckets/{Sid}" +*/ +func (c *DefaultApiService) DeleteBucket(ServiceSid string, RateLimitSid string, Sid string, ) (error) { + path := "/v2/Services/{ServiceSid}/RateLimits/{RateLimitSid}/Buckets/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"RateLimitSid"+"}", RateLimitSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - return nil + defer resp.Body.Close() + + return nil } /* @@ -741,23 +743,25 @@ func (c *DefaultApiService) DeleteBucket(ServiceSid string, RateLimitSid string, * Delete a specific Entity. * @param ServiceSid The unique SID identifier of the Service. * @param Identity The unique external identifier for the Entity of the Service - */ -func (c *DefaultApiService) DeleteEntity(ServiceSid string, Identity string) error { - path := "/v2/Services/{ServiceSid}/Entities/{Identity}" +*/ +func (c *DefaultApiService) DeleteEntity(ServiceSid string, Identity string, ) (error) { + path := "/v2/Services/{ServiceSid}/Entities/{Identity}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* @@ -766,24 +770,26 @@ func (c *DefaultApiService) DeleteEntity(ServiceSid string, Identity string) err * @param ServiceSid The unique SID identifier of the Service. * @param Identity Customer unique identity for the Entity owner of the Factor * @param Sid A 34 character string that uniquely identifies this Factor. - */ -func (c *DefaultApiService) DeleteFactor(ServiceSid string, Identity string, Sid string) error { - path := "/v2/Services/{ServiceSid}/Entities/{Identity}/Factors/{Sid}" +*/ +func (c *DefaultApiService) DeleteFactor(ServiceSid string, Identity string, Sid string, ) (error) { + path := "/v2/Services/{ServiceSid}/Entities/{Identity}/Factors/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - return nil + defer resp.Body.Close() + + return nil } /* @@ -791,23 +797,25 @@ func (c *DefaultApiService) DeleteFactor(ServiceSid string, Identity string, Sid * Delete a specific MessagingConfiguration. * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/verify/api/service) that the resource is associated with. * @param Country The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country this configuration will be applied to. If this is a global configuration, Country will take the value `all`. - */ -func (c *DefaultApiService) DeleteMessagingConfiguration(ServiceSid string, Country string) error { - path := "/v2/Services/{ServiceSid}/MessagingConfigurations/{Country}" +*/ +func (c *DefaultApiService) DeleteMessagingConfiguration(ServiceSid string, Country string, ) (error) { + path := "/v2/Services/{ServiceSid}/MessagingConfigurations/{Country}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Country"+"}", Country, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* @@ -815,45 +823,49 @@ func (c *DefaultApiService) DeleteMessagingConfiguration(ServiceSid string, Coun * Delete a specific Rate Limit. * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/verify/api/service) the resource is associated with. * @param Sid The Twilio-provided string that uniquely identifies the Rate Limit resource to fetch. - */ -func (c *DefaultApiService) DeleteRateLimit(ServiceSid string, Sid string) error { - path := "/v2/Services/{ServiceSid}/RateLimits/{Sid}" +*/ +func (c *DefaultApiService) DeleteRateLimit(ServiceSid string, Sid string, ) (error) { + path := "/v2/Services/{ServiceSid}/RateLimits/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* * DeleteService Method for DeleteService * Delete a specific Verification Service Instance. * @param Sid The Twilio-provided string that uniquely identifies the Verification Service resource to delete. - */ -func (c *DefaultApiService) DeleteService(Sid string) error { - path := "/v2/Services/{Sid}" +*/ +func (c *DefaultApiService) DeleteService(Sid string, ) (error) { + path := "/v2/Services/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* @@ -861,23 +873,25 @@ func (c *DefaultApiService) DeleteService(Sid string) error { * Delete a specific Webhook. * @param ServiceSid The unique SID identifier of the Service. * @param Sid The Twilio-provided string that uniquely identifies the Webhook resource to delete. - */ -func (c *DefaultApiService) DeleteWebhook(ServiceSid string, Sid string) error { - path := "/v2/Services/{ServiceSid}/Webhooks/{Sid}" +*/ +func (c *DefaultApiService) DeleteWebhook(ServiceSid string, Sid string, ) (error) { + path := "/v2/Services/{ServiceSid}/Webhooks/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - return nil + defer resp.Body.Close() + + return nil } /* @@ -887,29 +901,31 @@ func (c *DefaultApiService) DeleteWebhook(ServiceSid string, Sid string) error { * @param RateLimitSid The Twilio-provided string that uniquely identifies the Rate Limit resource. * @param Sid A 34 character string that uniquely identifies this Bucket. * @return VerifyV2ServiceRateLimitBucket - */ -func (c *DefaultApiService) FetchBucket(ServiceSid string, RateLimitSid string, Sid string) (*VerifyV2ServiceRateLimitBucket, error) { - path := "/v2/Services/{ServiceSid}/RateLimits/{RateLimitSid}/Buckets/{Sid}" +*/ +func (c *DefaultApiService) FetchBucket(ServiceSid string, RateLimitSid string, Sid string, ) (*VerifyV2ServiceRateLimitBucket, error) { + path := "/v2/Services/{ServiceSid}/RateLimits/{RateLimitSid}/Buckets/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"RateLimitSid"+"}", RateLimitSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &VerifyV2ServiceRateLimitBucket{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err + defer resp.Body.Close() + + ps := &VerifyV2ServiceRateLimitBucket{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -919,29 +935,31 @@ func (c *DefaultApiService) FetchBucket(ServiceSid string, RateLimitSid string, * @param Identity The unique external identifier for the Entity of the Service. This identifier should be immutable, not PII, and generated by your external system, such as your user's UUID, GUID, or SID. * @param Sid A 34 character string that uniquely identifies this Challenge. * @return VerifyV2ServiceEntityChallenge - */ -func (c *DefaultApiService) FetchChallenge(ServiceSid string, Identity string, Sid string) (*VerifyV2ServiceEntityChallenge, error) { - path := "/v2/Services/{ServiceSid}/Entities/{Identity}/Challenges/{Sid}" +*/ +func (c *DefaultApiService) FetchChallenge(ServiceSid string, Identity string, Sid string, ) (*VerifyV2ServiceEntityChallenge, error) { + path := "/v2/Services/{ServiceSid}/Entities/{Identity}/Challenges/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &VerifyV2ServiceEntityChallenge{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &VerifyV2ServiceEntityChallenge{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -950,28 +968,30 @@ func (c *DefaultApiService) FetchChallenge(ServiceSid string, Identity string, S * @param ServiceSid The unique SID identifier of the Service. * @param Identity The unique external identifier for the Entity of the Service * @return VerifyV2ServiceEntity - */ -func (c *DefaultApiService) FetchEntity(ServiceSid string, Identity string) (*VerifyV2ServiceEntity, error) { - path := "/v2/Services/{ServiceSid}/Entities/{Identity}" +*/ +func (c *DefaultApiService) FetchEntity(ServiceSid string, Identity string, ) (*VerifyV2ServiceEntity, error) { + path := "/v2/Services/{ServiceSid}/Entities/{Identity}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &VerifyV2ServiceEntity{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &VerifyV2ServiceEntity{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -981,29 +1001,31 @@ func (c *DefaultApiService) FetchEntity(ServiceSid string, Identity string) (*Ve * @param Identity Customer unique identity for the Entity owner of the Factor * @param Sid A 34 character string that uniquely identifies this Factor. * @return VerifyV2ServiceEntityFactor - */ -func (c *DefaultApiService) FetchFactor(ServiceSid string, Identity string, Sid string) (*VerifyV2ServiceEntityFactor, error) { - path := "/v2/Services/{ServiceSid}/Entities/{Identity}/Factors/{Sid}" +*/ +func (c *DefaultApiService) FetchFactor(ServiceSid string, Identity string, Sid string, ) (*VerifyV2ServiceEntityFactor, error) { + path := "/v2/Services/{ServiceSid}/Entities/{Identity}/Factors/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &VerifyV2ServiceEntityFactor{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &VerifyV2ServiceEntityFactor{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -1011,27 +1033,29 @@ func (c *DefaultApiService) FetchFactor(ServiceSid string, Identity string, Sid * Fetch the forms for a specific Form Type. * @param FormType The Type of this Form. Currently only `form-push` is supported. * @return VerifyV2Form - */ -func (c *DefaultApiService) FetchForm(FormType string) (*VerifyV2Form, error) { - path := "/v2/Forms/{FormType}" +*/ +func (c *DefaultApiService) FetchForm(FormType string, ) (*VerifyV2Form, error) { + path := "/v2/Forms/{FormType}" path = strings.Replace(path, "{"+"FormType"+"}", FormType, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &VerifyV2Form{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err + defer resp.Body.Close() + + ps := &VerifyV2Form{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -1040,28 +1064,30 @@ func (c *DefaultApiService) FetchForm(FormType string) (*VerifyV2Form, error) { * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/verify/api/service) that the resource is associated with. * @param Country The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country this configuration will be applied to. If this is a global configuration, Country will take the value `all`. * @return VerifyV2ServiceMessagingConfiguration - */ -func (c *DefaultApiService) FetchMessagingConfiguration(ServiceSid string, Country string) (*VerifyV2ServiceMessagingConfiguration, error) { - path := "/v2/Services/{ServiceSid}/MessagingConfigurations/{Country}" +*/ +func (c *DefaultApiService) FetchMessagingConfiguration(ServiceSid string, Country string, ) (*VerifyV2ServiceMessagingConfiguration, error) { + path := "/v2/Services/{ServiceSid}/MessagingConfigurations/{Country}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Country"+"}", Country, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &VerifyV2ServiceMessagingConfiguration{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VerifyV2ServiceMessagingConfiguration{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -1070,28 +1096,30 @@ func (c *DefaultApiService) FetchMessagingConfiguration(ServiceSid string, Count * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/verify/api/service) the resource is associated with. * @param Sid The Twilio-provided string that uniquely identifies the Rate Limit resource to fetch. * @return VerifyV2ServiceRateLimit - */ -func (c *DefaultApiService) FetchRateLimit(ServiceSid string, Sid string) (*VerifyV2ServiceRateLimit, error) { - path := "/v2/Services/{ServiceSid}/RateLimits/{Sid}" +*/ +func (c *DefaultApiService) FetchRateLimit(ServiceSid string, Sid string, ) (*VerifyV2ServiceRateLimit, error) { + path := "/v2/Services/{ServiceSid}/RateLimits/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &VerifyV2ServiceRateLimit{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err + defer resp.Body.Close() + + ps := &VerifyV2ServiceRateLimit{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -1099,27 +1127,29 @@ func (c *DefaultApiService) FetchRateLimit(ServiceSid string, Sid string) (*Veri * Fetch specific Verification Service Instance. * @param Sid The Twilio-provided string that uniquely identifies the Verification Service resource to fetch. * @return VerifyV2Service - */ -func (c *DefaultApiService) FetchService(Sid string) (*VerifyV2Service, error) { - path := "/v2/Services/{Sid}" +*/ +func (c *DefaultApiService) FetchService(Sid string, ) (*VerifyV2Service, error) { + path := "/v2/Services/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &VerifyV2Service{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &VerifyV2Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -1128,28 +1158,30 @@ func (c *DefaultApiService) FetchService(Sid string) (*VerifyV2Service, error) { * @param ServiceSid The SID of the verification [Service](https://www.twilio.com/docs/verify/api/service) to fetch the resource from. * @param Sid The Twilio-provided string that uniquely identifies the Verification resource to fetch. * @return VerifyV2ServiceVerification - */ -func (c *DefaultApiService) FetchVerification(ServiceSid string, Sid string) (*VerifyV2ServiceVerification, error) { - path := "/v2/Services/{ServiceSid}/Verifications/{Sid}" +*/ +func (c *DefaultApiService) FetchVerification(ServiceSid string, Sid string, ) (*VerifyV2ServiceVerification, error) { + path := "/v2/Services/{ServiceSid}/Verifications/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &VerifyV2ServiceVerification{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err + defer resp.Body.Close() + + ps := &VerifyV2ServiceVerification{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -1157,27 +1189,29 @@ func (c *DefaultApiService) FetchVerification(ServiceSid string, Sid string) (*V * Fetch a specific verification attempt. * @param Sid The unique SID identifier of a Verification Attempt * @return VerifyV2VerificationAttempt - */ -func (c *DefaultApiService) FetchVerificationAttempt(Sid string) (*VerifyV2VerificationAttempt, error) { - path := "/v2/Attempts/{Sid}" +*/ +func (c *DefaultApiService) FetchVerificationAttempt(Sid string, ) (*VerifyV2VerificationAttempt, error) { + path := "/v2/Attempts/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &VerifyV2VerificationAttempt{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VerifyV2VerificationAttempt{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -1186,30 +1220,31 @@ func (c *DefaultApiService) FetchVerificationAttempt(Sid string) (*VerifyV2Verif * @param ServiceSid The unique SID identifier of the Service. * @param Sid The Twilio-provided string that uniquely identifies the Webhook resource to fetch. * @return VerifyV2ServiceWebhook - */ -func (c *DefaultApiService) FetchWebhook(ServiceSid string, Sid string) (*VerifyV2ServiceWebhook, error) { - path := "/v2/Services/{ServiceSid}/Webhooks/{Sid}" +*/ +func (c *DefaultApiService) FetchWebhook(ServiceSid string, Sid string, ) (*VerifyV2ServiceWebhook, error) { + path := "/v2/Services/{ServiceSid}/Webhooks/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &VerifyV2ServiceWebhook{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err -} + defer resp.Body.Close() + + ps := &VerifyV2ServiceWebhook{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListBucketParams Optional parameters for the method 'ListBucket' type ListBucketParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1223,39 +1258,39 @@ type ListBucketParams struct { * @param optional nil or *ListBucketParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListBucketResponse - */ +*/ func (c *DefaultApiService) ListBucket(ServiceSid string, RateLimitSid string, params *ListBucketParams) (*ListBucketResponse, error) { - path := "/v2/Services/{ServiceSid}/RateLimits/{RateLimitSid}/Buckets" + path := "/v2/Services/{ServiceSid}/RateLimits/{RateLimitSid}/Buckets" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"RateLimitSid"+"}", RateLimitSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListBucketResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListBucketResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListChallengeParams Optional parameters for the method 'ListChallenge' type ListChallengeParams struct { FactorSid *string `json:"FactorSid,omitempty"` - Status *string `json:"Status,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + Status *string `json:"Status,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -1268,40 +1303,40 @@ type ListChallengeParams struct { * @param "Status" (string) - The Status of the Challenges to fetch. One of `pending`, `expired`, `approved` or `denied`. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListChallengeResponse - */ +*/ func (c *DefaultApiService) ListChallenge(ServiceSid string, Identity string, params *ListChallengeParams) (*ListChallengeResponse, error) { - path := "/v2/Services/{ServiceSid}/Entities/{Identity}/Challenges" + path := "/v2/Services/{ServiceSid}/Entities/{Identity}/Challenges" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.FactorSid != nil { - data.Set("FactorSid", *params.FactorSid) - } - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.FactorSid != nil { + data.Set("FactorSid", *params.FactorSid) +} + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListChallengeResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListChallengeResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListEntityParams Optional parameters for the method 'ListEntity' type ListEntityParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1314,33 +1349,33 @@ type ListEntityParams struct { * @param optional nil or *ListEntityParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListEntityResponse - */ +*/ func (c *DefaultApiService) ListEntity(ServiceSid string, params *ListEntityParams) (*ListEntityResponse, error) { - path := "/v2/Services/{ServiceSid}/Entities" + path := "/v2/Services/{ServiceSid}/Entities" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListEntityResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListEntityResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListFactorParams Optional parameters for the method 'ListFactor' type ListFactorParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1354,34 +1389,34 @@ type ListFactorParams struct { * @param optional nil or *ListFactorParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListFactorResponse - */ +*/ func (c *DefaultApiService) ListFactor(ServiceSid string, Identity string, params *ListFactorParams) (*ListFactorResponse, error) { - path := "/v2/Services/{ServiceSid}/Entities/{Identity}/Factors" + path := "/v2/Services/{ServiceSid}/Entities/{Identity}/Factors" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListFactorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListFactorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListMessagingConfigurationParams Optional parameters for the method 'ListMessagingConfiguration' type ListMessagingConfigurationParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1394,33 +1429,33 @@ type ListMessagingConfigurationParams struct { * @param optional nil or *ListMessagingConfigurationParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListMessagingConfigurationResponse - */ +*/ func (c *DefaultApiService) ListMessagingConfiguration(ServiceSid string, params *ListMessagingConfigurationParams) (*ListMessagingConfigurationResponse, error) { - path := "/v2/Services/{ServiceSid}/MessagingConfigurations" + path := "/v2/Services/{ServiceSid}/MessagingConfigurations" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListMessagingConfigurationResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListMessagingConfigurationResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListRateLimitParams Optional parameters for the method 'ListRateLimit' type ListRateLimitParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1433,33 +1468,33 @@ type ListRateLimitParams struct { * @param optional nil or *ListRateLimitParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListRateLimitResponse - */ +*/ func (c *DefaultApiService) ListRateLimit(ServiceSid string, params *ListRateLimitParams) (*ListRateLimitResponse, error) { - path := "/v2/Services/{ServiceSid}/RateLimits" + path := "/v2/Services/{ServiceSid}/RateLimits" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListRateLimitResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListRateLimitResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListServiceParams Optional parameters for the method 'ListService' type ListServiceParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1471,38 +1506,38 @@ type ListServiceParams struct { * @param optional nil or *ListServiceParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListServiceResponse - */ +*/ func (c *DefaultApiService) ListService(params *ListServiceParams) (*ListServiceResponse, error) { - path := "/v2/Services" + path := "/v2/Services" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListServiceResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListServiceResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListVerificationAttemptParams Optional parameters for the method 'ListVerificationAttempt' type ListVerificationAttemptParams struct { - DateCreatedAfter *time.Time `json:"DateCreatedAfter,omitempty"` + DateCreatedAfter *time.Time `json:"DateCreatedAfter,omitempty"` DateCreatedBefore *time.Time `json:"DateCreatedBefore,omitempty"` - ChannelDataTo *string `json:"ChannelData.To,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + ChannelDataTo *string `json:"ChannelData.To,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -1514,41 +1549,41 @@ type ListVerificationAttemptParams struct { * @param "ChannelDataTo" (string) - Destination of a verification. Depending on the type of channel, it could be a phone number in E.164 format or an email address. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListVerificationAttemptResponse - */ +*/ func (c *DefaultApiService) ListVerificationAttempt(params *ListVerificationAttemptParams) (*ListVerificationAttemptResponse, error) { - path := "/v2/Attempts" + path := "/v2/Attempts" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.DateCreatedAfter != nil { - data.Set("DateCreatedAfter", fmt.Sprint(*params.DateCreatedAfter)) - } - if params != nil && params.DateCreatedBefore != nil { - data.Set("DateCreatedBefore", fmt.Sprint(*params.DateCreatedBefore)) - } - if params != nil && params.ChannelDataTo != nil { - data.Set("ChannelDataTo", *params.ChannelDataTo) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.DateCreatedAfter != nil { + data.Set("DateCreatedAfter", fmt.Sprint(*params.DateCreatedAfter)) +} + if params != nil && params.DateCreatedBefore != nil { + data.Set("DateCreatedBefore", fmt.Sprint(*params.DateCreatedBefore)) +} + if params != nil && params.ChannelDataTo != nil { + data.Set("ChannelDataTo", *params.ChannelDataTo) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListVerificationAttemptResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListVerificationAttemptResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListWebhookParams Optional parameters for the method 'ListWebhook' type ListWebhookParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1561,37 +1596,37 @@ type ListWebhookParams struct { * @param optional nil or *ListWebhookParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListWebhookResponse - */ +*/ func (c *DefaultApiService) ListWebhook(ServiceSid string, params *ListWebhookParams) (*ListWebhookResponse, error) { - path := "/v2/Services/{ServiceSid}/Webhooks" + path := "/v2/Services/{ServiceSid}/Webhooks" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListWebhookResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListWebhookResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateBucketParams Optional parameters for the method 'UpdateBucket' type UpdateBucketParams struct { Interval *int32 `json:"Interval,omitempty"` - Max *int32 `json:"Max,omitempty"` + Max *int32 `json:"Max,omitempty"` } /* @@ -1604,38 +1639,38 @@ type UpdateBucketParams struct { * @param "Interval" (int32) - Number of seconds that the rate limit will be enforced over. * @param "Max" (int32) - Maximum number of requests permitted in during the interval. * @return VerifyV2ServiceRateLimitBucket - */ +*/ func (c *DefaultApiService) UpdateBucket(ServiceSid string, RateLimitSid string, Sid string, params *UpdateBucketParams) (*VerifyV2ServiceRateLimitBucket, error) { - path := "/v2/Services/{ServiceSid}/RateLimits/{RateLimitSid}/Buckets/{Sid}" + path := "/v2/Services/{ServiceSid}/RateLimits/{RateLimitSid}/Buckets/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"RateLimitSid"+"}", RateLimitSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Interval != nil { - data.Set("Interval", fmt.Sprint(*params.Interval)) - } - if params != nil && params.Max != nil { - data.Set("Max", fmt.Sprint(*params.Max)) - } + if params != nil && params.Interval != nil { + data.Set("Interval", fmt.Sprint(*params.Interval)) +} + if params != nil && params.Max != nil { + data.Set("Max", fmt.Sprint(*params.Max)) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &VerifyV2ServiceRateLimitBucket{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &VerifyV2ServiceRateLimitBucket{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateChallengeParams Optional parameters for the method 'UpdateChallenge' type UpdateChallengeParams struct { AuthPayload *string `json:"AuthPayload,omitempty"` @@ -1650,41 +1685,41 @@ type UpdateChallengeParams struct { * @param optional nil or *UpdateChallengeParams - Optional Parameters: * @param "AuthPayload" (string) - The optional payload needed to verify the Challenge. E.g., a TOTP would use the numeric code. * @return VerifyV2ServiceEntityChallenge - */ +*/ func (c *DefaultApiService) UpdateChallenge(ServiceSid string, Identity string, Sid string, params *UpdateChallengeParams) (*VerifyV2ServiceEntityChallenge, error) { - path := "/v2/Services/{ServiceSid}/Entities/{Identity}/Challenges/{Sid}" + path := "/v2/Services/{ServiceSid}/Entities/{Identity}/Challenges/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.AuthPayload != nil { - data.Set("AuthPayload", *params.AuthPayload) - } + if params != nil && params.AuthPayload != nil { + data.Set("AuthPayload", *params.AuthPayload) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &VerifyV2ServiceEntityChallenge{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &VerifyV2ServiceEntityChallenge{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateFactorParams Optional parameters for the method 'UpdateFactor' type UpdateFactorParams struct { - AuthPayload *string `json:"AuthPayload,omitempty"` + AuthPayload *string `json:"AuthPayload,omitempty"` ConfigNotificationToken *string `json:"Config.NotificationToken,omitempty"` - ConfigSdkVersion *string `json:"Config.SdkVersion,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` + ConfigSdkVersion *string `json:"Config.SdkVersion,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` } /* @@ -1699,44 +1734,44 @@ type UpdateFactorParams struct { * @param "ConfigSdkVersion" (string) - The Verify Push SDK version used to configure the factor * @param "FriendlyName" (string) - The new friendly name of this Factor * @return VerifyV2ServiceEntityFactor - */ +*/ func (c *DefaultApiService) UpdateFactor(ServiceSid string, Identity string, Sid string, params *UpdateFactorParams) (*VerifyV2ServiceEntityFactor, error) { - path := "/v2/Services/{ServiceSid}/Entities/{Identity}/Factors/{Sid}" + path := "/v2/Services/{ServiceSid}/Entities/{Identity}/Factors/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.AuthPayload != nil { - data.Set("AuthPayload", *params.AuthPayload) - } - if params != nil && params.ConfigNotificationToken != nil { - data.Set("ConfigNotificationToken", *params.ConfigNotificationToken) - } - if params != nil && params.ConfigSdkVersion != nil { - data.Set("ConfigSdkVersion", *params.ConfigSdkVersion) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } + if params != nil && params.AuthPayload != nil { + data.Set("AuthPayload", *params.AuthPayload) +} + if params != nil && params.ConfigNotificationToken != nil { + data.Set("ConfigNotificationToken", *params.ConfigNotificationToken) +} + if params != nil && params.ConfigSdkVersion != nil { + data.Set("ConfigSdkVersion", *params.ConfigSdkVersion) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &VerifyV2ServiceEntityFactor{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &VerifyV2ServiceEntityFactor{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateMessagingConfigurationParams Optional parameters for the method 'UpdateMessagingConfiguration' type UpdateMessagingConfigurationParams struct { MessagingServiceSid *string `json:"MessagingServiceSid,omitempty"` @@ -1750,34 +1785,34 @@ type UpdateMessagingConfigurationParams struct { * @param optional nil or *UpdateMessagingConfigurationParams - Optional Parameters: * @param "MessagingServiceSid" (string) - The SID of the [Messaging Service](https://www.twilio.com/docs/sms/services/api) to be used to send SMS to the country of this configuration. * @return VerifyV2ServiceMessagingConfiguration - */ +*/ func (c *DefaultApiService) UpdateMessagingConfiguration(ServiceSid string, Country string, params *UpdateMessagingConfigurationParams) (*VerifyV2ServiceMessagingConfiguration, error) { - path := "/v2/Services/{ServiceSid}/MessagingConfigurations/{Country}" + path := "/v2/Services/{ServiceSid}/MessagingConfigurations/{Country}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Country"+"}", Country, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.MessagingServiceSid != nil { - data.Set("MessagingServiceSid", *params.MessagingServiceSid) - } + if params != nil && params.MessagingServiceSid != nil { + data.Set("MessagingServiceSid", *params.MessagingServiceSid) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &VerifyV2ServiceMessagingConfiguration{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &VerifyV2ServiceMessagingConfiguration{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateRateLimitParams Optional parameters for the method 'UpdateRateLimit' type UpdateRateLimitParams struct { Description *string `json:"Description,omitempty"` @@ -1791,48 +1826,48 @@ type UpdateRateLimitParams struct { * @param optional nil or *UpdateRateLimitParams - Optional Parameters: * @param "Description" (string) - Description of this Rate Limit * @return VerifyV2ServiceRateLimit - */ +*/ func (c *DefaultApiService) UpdateRateLimit(ServiceSid string, Sid string, params *UpdateRateLimitParams) (*VerifyV2ServiceRateLimit, error) { - path := "/v2/Services/{ServiceSid}/RateLimits/{Sid}" + path := "/v2/Services/{ServiceSid}/RateLimits/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Description != nil { - data.Set("Description", *params.Description) - } + if params != nil && params.Description != nil { + data.Set("Description", *params.Description) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &VerifyV2ServiceRateLimit{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &VerifyV2ServiceRateLimit{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateServiceParams Optional parameters for the method 'UpdateService' type UpdateServiceParams struct { - CodeLength *int32 `json:"CodeLength,omitempty"` - CustomCodeEnabled *bool `json:"CustomCodeEnabled,omitempty"` - DoNotShareWarningEnabled *bool `json:"DoNotShareWarningEnabled,omitempty"` - DtmfInputRequired *bool `json:"DtmfInputRequired,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - LookupEnabled *bool `json:"LookupEnabled,omitempty"` - Psd2Enabled *bool `json:"Psd2Enabled,omitempty"` - PushApnCredentialSid *string `json:"Push.ApnCredentialSid,omitempty"` - PushFcmCredentialSid *string `json:"Push.FcmCredentialSid,omitempty"` - PushIncludeDate *bool `json:"Push.IncludeDate,omitempty"` - SkipSmsToLandlines *bool `json:"SkipSmsToLandlines,omitempty"` - TtsName *string `json:"TtsName,omitempty"` + CodeLength *int32 `json:"CodeLength,omitempty"` + CustomCodeEnabled *bool `json:"CustomCodeEnabled,omitempty"` + DoNotShareWarningEnabled *bool `json:"DoNotShareWarningEnabled,omitempty"` + DtmfInputRequired *bool `json:"DtmfInputRequired,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + LookupEnabled *bool `json:"LookupEnabled,omitempty"` + Psd2Enabled *bool `json:"Psd2Enabled,omitempty"` + PushApnCredentialSid *string `json:"Push.ApnCredentialSid,omitempty"` + PushFcmCredentialSid *string `json:"Push.FcmCredentialSid,omitempty"` + PushIncludeDate *bool `json:"Push.IncludeDate,omitempty"` + SkipSmsToLandlines *bool `json:"SkipSmsToLandlines,omitempty"` + TtsName *string `json:"TtsName,omitempty"` } /* @@ -1853,66 +1888,66 @@ type UpdateServiceParams struct { * @param "SkipSmsToLandlines" (bool) - Whether to skip sending SMS verifications to landlines. Requires `lookup_enabled`. * @param "TtsName" (string) - The name of an alternative text-to-speech service to use in phone calls. Applies only to TTS languages. * @return VerifyV2Service - */ +*/ func (c *DefaultApiService) UpdateService(Sid string, params *UpdateServiceParams) (*VerifyV2Service, error) { - path := "/v2/Services/{Sid}" + path := "/v2/Services/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.CodeLength != nil { - data.Set("CodeLength", fmt.Sprint(*params.CodeLength)) - } - if params != nil && params.CustomCodeEnabled != nil { - data.Set("CustomCodeEnabled", fmt.Sprint(*params.CustomCodeEnabled)) - } - if params != nil && params.DoNotShareWarningEnabled != nil { - data.Set("DoNotShareWarningEnabled", fmt.Sprint(*params.DoNotShareWarningEnabled)) - } - if params != nil && params.DtmfInputRequired != nil { - data.Set("DtmfInputRequired", fmt.Sprint(*params.DtmfInputRequired)) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.LookupEnabled != nil { - data.Set("LookupEnabled", fmt.Sprint(*params.LookupEnabled)) - } - if params != nil && params.Psd2Enabled != nil { - data.Set("Psd2Enabled", fmt.Sprint(*params.Psd2Enabled)) - } - if params != nil && params.PushApnCredentialSid != nil { - data.Set("PushApnCredentialSid", *params.PushApnCredentialSid) - } - if params != nil && params.PushFcmCredentialSid != nil { - data.Set("PushFcmCredentialSid", *params.PushFcmCredentialSid) - } - if params != nil && params.PushIncludeDate != nil { - data.Set("PushIncludeDate", fmt.Sprint(*params.PushIncludeDate)) - } - if params != nil && params.SkipSmsToLandlines != nil { - data.Set("SkipSmsToLandlines", fmt.Sprint(*params.SkipSmsToLandlines)) - } - if params != nil && params.TtsName != nil { - data.Set("TtsName", *params.TtsName) - } + if params != nil && params.CodeLength != nil { + data.Set("CodeLength", fmt.Sprint(*params.CodeLength)) +} + if params != nil && params.CustomCodeEnabled != nil { + data.Set("CustomCodeEnabled", fmt.Sprint(*params.CustomCodeEnabled)) +} + if params != nil && params.DoNotShareWarningEnabled != nil { + data.Set("DoNotShareWarningEnabled", fmt.Sprint(*params.DoNotShareWarningEnabled)) +} + if params != nil && params.DtmfInputRequired != nil { + data.Set("DtmfInputRequired", fmt.Sprint(*params.DtmfInputRequired)) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.LookupEnabled != nil { + data.Set("LookupEnabled", fmt.Sprint(*params.LookupEnabled)) +} + if params != nil && params.Psd2Enabled != nil { + data.Set("Psd2Enabled", fmt.Sprint(*params.Psd2Enabled)) +} + if params != nil && params.PushApnCredentialSid != nil { + data.Set("PushApnCredentialSid", *params.PushApnCredentialSid) +} + if params != nil && params.PushFcmCredentialSid != nil { + data.Set("PushFcmCredentialSid", *params.PushFcmCredentialSid) +} + if params != nil && params.PushIncludeDate != nil { + data.Set("PushIncludeDate", fmt.Sprint(*params.PushIncludeDate)) +} + if params != nil && params.SkipSmsToLandlines != nil { + data.Set("SkipSmsToLandlines", fmt.Sprint(*params.SkipSmsToLandlines)) +} + if params != nil && params.TtsName != nil { + data.Set("TtsName", *params.TtsName) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &VerifyV2Service{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &VerifyV2Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateVerificationParams Optional parameters for the method 'UpdateVerification' type UpdateVerificationParams struct { Status *string `json:"Status,omitempty"` @@ -1926,40 +1961,40 @@ type UpdateVerificationParams struct { * @param optional nil or *UpdateVerificationParams - Optional Parameters: * @param "Status" (string) - The new status of the resource. Can be: `canceled` or `approved`. * @return VerifyV2ServiceVerification - */ +*/ func (c *DefaultApiService) UpdateVerification(ServiceSid string, Sid string, params *UpdateVerificationParams) (*VerifyV2ServiceVerification, error) { - path := "/v2/Services/{ServiceSid}/Verifications/{Sid}" + path := "/v2/Services/{ServiceSid}/Verifications/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) - } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &VerifyV2ServiceVerification{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &VerifyV2ServiceVerification{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateWebhookParams Optional parameters for the method 'UpdateWebhook' type UpdateWebhookParams struct { - EventTypes *[]string `json:"EventTypes,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Status *string `json:"Status,omitempty"` - WebhookUrl *string `json:"WebhookUrl,omitempty"` + EventTypes *[]string `json:"EventTypes,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Status *string `json:"Status,omitempty"` + WebhookUrl *string `json:"WebhookUrl,omitempty"` } /* @@ -1972,39 +2007,40 @@ type UpdateWebhookParams struct { * @param "Status" (string) - The webhook status. Default value is `enabled`. One of: `enabled` or `disabled` * @param "WebhookUrl" (string) - The URL associated with this Webhook. * @return VerifyV2ServiceWebhook - */ +*/ func (c *DefaultApiService) UpdateWebhook(ServiceSid string, Sid string, params *UpdateWebhookParams) (*VerifyV2ServiceWebhook, error) { - path := "/v2/Services/{ServiceSid}/Webhooks/{Sid}" + path := "/v2/Services/{ServiceSid}/Webhooks/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.EventTypes != nil { - data.Set("EventTypes", strings.Join(*params.EventTypes, ",")) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) - } - if params != nil && params.WebhookUrl != nil { - data.Set("WebhookUrl", *params.WebhookUrl) - } + if params != nil && params.EventTypes != nil { + data.Set("EventTypes", strings.Join(*params.EventTypes, ",")) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) +} + if params != nil && params.WebhookUrl != nil { + data.Set("WebhookUrl", *params.WebhookUrl) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &VerifyV2ServiceWebhook{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() + + ps := &VerifyV2ServiceWebhook{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } diff --git a/twilio/rest/verify/v2/model_list_bucket_response.go b/twilio/rest/verify/v2/model_list_bucket_response.go index b04cee545..ea8d22d8c 100644 --- a/twilio/rest/verify/v2/model_list_bucket_response.go +++ b/twilio/rest/verify/v2/model_list_bucket_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListBucketResponse struct for ListBucketResponse type ListBucketResponse struct { - Buckets []VerifyV2ServiceRateLimitBucket `json:"Buckets,omitempty"` - Meta ListVerificationAttemptResponseMeta `json:"Meta,omitempty"` + Buckets []VerifyV2ServiceRateLimitBucket `json:"Buckets,omitempty"` + Meta ListVerificationAttemptResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/verify/v2/model_list_challenge_response.go b/twilio/rest/verify/v2/model_list_challenge_response.go index 2060b8516..99b3bab55 100644 --- a/twilio/rest/verify/v2/model_list_challenge_response.go +++ b/twilio/rest/verify/v2/model_list_challenge_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListChallengeResponse struct for ListChallengeResponse type ListChallengeResponse struct { - Challenges []VerifyV2ServiceEntityChallenge `json:"Challenges,omitempty"` - Meta ListVerificationAttemptResponseMeta `json:"Meta,omitempty"` + Challenges []VerifyV2ServiceEntityChallenge `json:"Challenges,omitempty"` + Meta ListVerificationAttemptResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/verify/v2/model_list_entity_response.go b/twilio/rest/verify/v2/model_list_entity_response.go index 7cf480939..0863dd6b4 100644 --- a/twilio/rest/verify/v2/model_list_entity_response.go +++ b/twilio/rest/verify/v2/model_list_entity_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListEntityResponse struct for ListEntityResponse type ListEntityResponse struct { - Entities []VerifyV2ServiceEntity `json:"Entities,omitempty"` - Meta ListVerificationAttemptResponseMeta `json:"Meta,omitempty"` + Entities []VerifyV2ServiceEntity `json:"Entities,omitempty"` + Meta ListVerificationAttemptResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/verify/v2/model_list_factor_response.go b/twilio/rest/verify/v2/model_list_factor_response.go index 5021b034c..37ac28ff5 100644 --- a/twilio/rest/verify/v2/model_list_factor_response.go +++ b/twilio/rest/verify/v2/model_list_factor_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListFactorResponse struct for ListFactorResponse type ListFactorResponse struct { - Factors []VerifyV2ServiceEntityFactor `json:"Factors,omitempty"` - Meta ListVerificationAttemptResponseMeta `json:"Meta,omitempty"` + Factors []VerifyV2ServiceEntityFactor `json:"Factors,omitempty"` + Meta ListVerificationAttemptResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/verify/v2/model_list_messaging_configuration_response.go b/twilio/rest/verify/v2/model_list_messaging_configuration_response.go index f0f427a0d..ebcffd965 100644 --- a/twilio/rest/verify/v2/model_list_messaging_configuration_response.go +++ b/twilio/rest/verify/v2/model_list_messaging_configuration_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListMessagingConfigurationResponse struct for ListMessagingConfigurationResponse type ListMessagingConfigurationResponse struct { MessagingConfigurations []VerifyV2ServiceMessagingConfiguration `json:"MessagingConfigurations,omitempty"` - Meta ListVerificationAttemptResponseMeta `json:"Meta,omitempty"` + Meta ListVerificationAttemptResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/verify/v2/model_list_rate_limit_response.go b/twilio/rest/verify/v2/model_list_rate_limit_response.go index b008eed26..75e62eb7f 100644 --- a/twilio/rest/verify/v2/model_list_rate_limit_response.go +++ b/twilio/rest/verify/v2/model_list_rate_limit_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListRateLimitResponse struct for ListRateLimitResponse type ListRateLimitResponse struct { - Meta ListVerificationAttemptResponseMeta `json:"Meta,omitempty"` - RateLimits []VerifyV2ServiceRateLimit `json:"RateLimits,omitempty"` + Meta ListVerificationAttemptResponseMeta `json:"Meta,omitempty"` + RateLimits []VerifyV2ServiceRateLimit `json:"RateLimits,omitempty"` } diff --git a/twilio/rest/verify/v2/model_list_service_response.go b/twilio/rest/verify/v2/model_list_service_response.go index 37a9c820a..d215eb384 100644 --- a/twilio/rest/verify/v2/model_list_service_response.go +++ b/twilio/rest/verify/v2/model_list_service_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListServiceResponse struct for ListServiceResponse type ListServiceResponse struct { - Meta ListVerificationAttemptResponseMeta `json:"Meta,omitempty"` - Services []VerifyV2Service `json:"Services,omitempty"` + Meta ListVerificationAttemptResponseMeta `json:"Meta,omitempty"` + Services []VerifyV2Service `json:"Services,omitempty"` } diff --git a/twilio/rest/verify/v2/model_list_verification_attempt_response.go b/twilio/rest/verify/v2/model_list_verification_attempt_response.go index 3a40d88bc..d7b3dff79 100644 --- a/twilio/rest/verify/v2/model_list_verification_attempt_response.go +++ b/twilio/rest/verify/v2/model_list_verification_attempt_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListVerificationAttemptResponse struct for ListVerificationAttemptResponse type ListVerificationAttemptResponse struct { - Attempts []VerifyV2VerificationAttempt `json:"Attempts,omitempty"` - Meta ListVerificationAttemptResponseMeta `json:"Meta,omitempty"` + Attempts []VerifyV2VerificationAttempt `json:"Attempts,omitempty"` + Meta ListVerificationAttemptResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/verify/v2/model_list_verification_attempt_response_meta.go b/twilio/rest/verify/v2/model_list_verification_attempt_response_meta.go index e38ec6d98..64463ee7e 100644 --- a/twilio/rest/verify/v2/model_list_verification_attempt_response_meta.go +++ b/twilio/rest/verify/v2/model_list_verification_attempt_response_meta.go @@ -1,23 +1,22 @@ /* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListVerificationAttemptResponseMeta struct for ListVerificationAttemptResponseMeta type ListVerificationAttemptResponseMeta struct { - FirstPageUrl string `json:"FirstPageUrl,omitempty"` - Key string `json:"Key,omitempty"` - NextPageUrl string `json:"NextPageUrl,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` - Url string `json:"Url,omitempty"` + Url string `json:"Url,omitempty"` } diff --git a/twilio/rest/verify/v2/model_list_webhook_response.go b/twilio/rest/verify/v2/model_list_webhook_response.go index 0032ed708..b22e7d742 100644 --- a/twilio/rest/verify/v2/model_list_webhook_response.go +++ b/twilio/rest/verify/v2/model_list_webhook_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListWebhookResponse struct for ListWebhookResponse type ListWebhookResponse struct { - Meta ListVerificationAttemptResponseMeta `json:"Meta,omitempty"` - Webhooks []VerifyV2ServiceWebhook `json:"Webhooks,omitempty"` + Meta ListVerificationAttemptResponseMeta `json:"Meta,omitempty"` + Webhooks []VerifyV2ServiceWebhook `json:"Webhooks,omitempty"` } diff --git a/twilio/rest/verify/v2/model_verify_v2_form.go b/twilio/rest/verify/v2/model_verify_v2_form.go index 15b4185c1..9655c780f 100644 --- a/twilio/rest/verify/v2/model_verify_v2_form.go +++ b/twilio/rest/verify/v2/model_verify_v2_form.go @@ -1,16 +1,15 @@ /* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // VerifyV2Form struct for VerifyV2Form type VerifyV2Form struct { // Additional information for the available forms for this type. diff --git a/twilio/rest/verify/v2/model_verify_v2_service.go b/twilio/rest/verify/v2/model_verify_v2_service.go index 615a3098a..42867593d 100644 --- a/twilio/rest/verify/v2/model_verify_v2_service.go +++ b/twilio/rest/verify/v2/model_verify_v2_service.go @@ -1,20 +1,18 @@ /* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // VerifyV2Service struct for VerifyV2Service type VerifyV2Service struct { // The SID of the Account that created the resource diff --git a/twilio/rest/verify/v2/model_verify_v2_service_access_token.go b/twilio/rest/verify/v2/model_verify_v2_service_access_token.go index d9ac6a72d..cad5988a6 100644 --- a/twilio/rest/verify/v2/model_verify_v2_service_access_token.go +++ b/twilio/rest/verify/v2/model_verify_v2_service_access_token.go @@ -1,16 +1,15 @@ /* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // VerifyV2ServiceAccessToken struct for VerifyV2ServiceAccessToken type VerifyV2ServiceAccessToken struct { // Generated access token. diff --git a/twilio/rest/verify/v2/model_verify_v2_service_entity.go b/twilio/rest/verify/v2/model_verify_v2_service_entity.go index bbba7c3ac..d2bcae1c7 100644 --- a/twilio/rest/verify/v2/model_verify_v2_service_entity.go +++ b/twilio/rest/verify/v2/model_verify_v2_service_entity.go @@ -1,20 +1,18 @@ /* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // VerifyV2ServiceEntity struct for VerifyV2ServiceEntity type VerifyV2ServiceEntity struct { // Account Sid. diff --git a/twilio/rest/verify/v2/model_verify_v2_service_entity_challenge.go b/twilio/rest/verify/v2/model_verify_v2_service_entity_challenge.go index f61392beb..cdd0043fe 100644 --- a/twilio/rest/verify/v2/model_verify_v2_service_entity_challenge.go +++ b/twilio/rest/verify/v2/model_verify_v2_service_entity_challenge.go @@ -1,20 +1,18 @@ /* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // VerifyV2ServiceEntityChallenge struct for VerifyV2ServiceEntityChallenge type VerifyV2ServiceEntityChallenge struct { // Account Sid. diff --git a/twilio/rest/verify/v2/model_verify_v2_service_entity_factor.go b/twilio/rest/verify/v2/model_verify_v2_service_entity_factor.go index 6ffc37406..eed01fa40 100644 --- a/twilio/rest/verify/v2/model_verify_v2_service_entity_factor.go +++ b/twilio/rest/verify/v2/model_verify_v2_service_entity_factor.go @@ -1,20 +1,18 @@ /* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // VerifyV2ServiceEntityFactor struct for VerifyV2ServiceEntityFactor type VerifyV2ServiceEntityFactor struct { // Account Sid. diff --git a/twilio/rest/verify/v2/model_verify_v2_service_messaging_configuration.go b/twilio/rest/verify/v2/model_verify_v2_service_messaging_configuration.go index f9ab31337..074a66c84 100644 --- a/twilio/rest/verify/v2/model_verify_v2_service_messaging_configuration.go +++ b/twilio/rest/verify/v2/model_verify_v2_service_messaging_configuration.go @@ -1,20 +1,18 @@ /* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // VerifyV2ServiceMessagingConfiguration struct for VerifyV2ServiceMessagingConfiguration type VerifyV2ServiceMessagingConfiguration struct { // The SID of the Account that created the resource diff --git a/twilio/rest/verify/v2/model_verify_v2_service_rate_limit.go b/twilio/rest/verify/v2/model_verify_v2_service_rate_limit.go index d81665816..14a6b1c2b 100644 --- a/twilio/rest/verify/v2/model_verify_v2_service_rate_limit.go +++ b/twilio/rest/verify/v2/model_verify_v2_service_rate_limit.go @@ -1,20 +1,18 @@ /* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // VerifyV2ServiceRateLimit struct for VerifyV2ServiceRateLimit type VerifyV2ServiceRateLimit struct { // The SID of the Account that created the resource diff --git a/twilio/rest/verify/v2/model_verify_v2_service_rate_limit_bucket.go b/twilio/rest/verify/v2/model_verify_v2_service_rate_limit_bucket.go index 8c1e7cd2a..9372309ed 100644 --- a/twilio/rest/verify/v2/model_verify_v2_service_rate_limit_bucket.go +++ b/twilio/rest/verify/v2/model_verify_v2_service_rate_limit_bucket.go @@ -1,20 +1,18 @@ /* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // VerifyV2ServiceRateLimitBucket struct for VerifyV2ServiceRateLimitBucket type VerifyV2ServiceRateLimitBucket struct { // The SID of the Account that created the resource diff --git a/twilio/rest/verify/v2/model_verify_v2_service_verification.go b/twilio/rest/verify/v2/model_verify_v2_service_verification.go index 5c95ac235..9bb2a4ecd 100644 --- a/twilio/rest/verify/v2/model_verify_v2_service_verification.go +++ b/twilio/rest/verify/v2/model_verify_v2_service_verification.go @@ -1,20 +1,18 @@ /* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // VerifyV2ServiceVerification struct for VerifyV2ServiceVerification type VerifyV2ServiceVerification struct { // The SID of the Account that created the resource diff --git a/twilio/rest/verify/v2/model_verify_v2_service_verification_check.go b/twilio/rest/verify/v2/model_verify_v2_service_verification_check.go index 3b12c77cb..7a8887128 100644 --- a/twilio/rest/verify/v2/model_verify_v2_service_verification_check.go +++ b/twilio/rest/verify/v2/model_verify_v2_service_verification_check.go @@ -1,20 +1,18 @@ /* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // VerifyV2ServiceVerificationCheck struct for VerifyV2ServiceVerificationCheck type VerifyV2ServiceVerificationCheck struct { // The SID of the Account that created the resource diff --git a/twilio/rest/verify/v2/model_verify_v2_service_webhook.go b/twilio/rest/verify/v2/model_verify_v2_service_webhook.go index 851842c79..6a7e323e3 100644 --- a/twilio/rest/verify/v2/model_verify_v2_service_webhook.go +++ b/twilio/rest/verify/v2/model_verify_v2_service_webhook.go @@ -1,20 +1,18 @@ /* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // VerifyV2ServiceWebhook struct for VerifyV2ServiceWebhook type VerifyV2ServiceWebhook struct { // The SID of the Account that created the resource diff --git a/twilio/rest/verify/v2/model_verify_v2_verification_attempt.go b/twilio/rest/verify/v2/model_verify_v2_verification_attempt.go index 5c0d53a10..31877f78f 100644 --- a/twilio/rest/verify/v2/model_verify_v2_verification_attempt.go +++ b/twilio/rest/verify/v2/model_verify_v2_verification_attempt.go @@ -1,20 +1,18 @@ /* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // VerifyV2VerificationAttempt struct for VerifyV2VerificationAttempt type VerifyV2VerificationAttempt struct { // Account Sid @@ -29,7 +27,7 @@ type VerifyV2VerificationAttempt struct { DateCreated *time.Time `json:"DateCreated,omitempty"` // The date this Attempt was updated DateUpdated *time.Time `json:"DateUpdated,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` + ServiceSid *string `json:"ServiceSid,omitempty"` // A string that uniquely identifies this Verification Attempt Sid *string `json:"Sid,omitempty"` Url *string `json:"Url,omitempty"` diff --git a/twilio/rest/video/v1/api_default.go b/twilio/rest/video/v1/api_default.go index edab3fec7..d44c8fd45 100644 --- a/twilio/rest/video/v1/api_default.go +++ b/twilio/rest/video/v1/api_default.go @@ -1,11 +1,11 @@ /* - * Twilio - Video - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,11 +14,11 @@ package openapi import ( "encoding/json" "fmt" - "net/url" - "strings" - "time" - twilio "github.com/twilio/twilio-go/client" + "net/url" + "strings" + "time" + "reflect" ) type DefaultApiService struct { @@ -27,23 +27,23 @@ type DefaultApiService struct { } func NewDefaultApiService(client *twilio.Client) *DefaultApiService { - return &DefaultApiService{ - client: client, + return &DefaultApiService { + client: client, baseURL: "https://video.twilio.com", } } // CreateCompositionParams Optional parameters for the method 'CreateComposition' type CreateCompositionParams struct { - AudioSources *[]string `json:"AudioSources,omitempty"` - AudioSourcesExcluded *[]string `json:"AudioSourcesExcluded,omitempty"` - Format *string `json:"Format,omitempty"` - Resolution *string `json:"Resolution,omitempty"` - RoomSid *string `json:"RoomSid,omitempty"` - StatusCallback *string `json:"StatusCallback,omitempty"` - StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` - Trim *bool `json:"Trim,omitempty"` - VideoLayout *map[string]interface{} `json:"VideoLayout,omitempty"` + AudioSources *[]string `json:"AudioSources,omitempty"` + AudioSourcesExcluded *[]string `json:"AudioSourcesExcluded,omitempty"` + Format *string `json:"Format,omitempty"` + Resolution *string `json:"Resolution,omitempty"` + RoomSid *string `json:"RoomSid,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` + StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` + Trim *bool `json:"Trim,omitempty"` + VideoLayout *map[string]interface{} `json:"VideoLayout,omitempty"` } /* @@ -59,74 +59,74 @@ type CreateCompositionParams struct { * @param "Trim" (bool) - Whether to clip the intervals where there is no active media in the composition. The default is `true`. Compositions with `trim` enabled are shorter when the Room is created and no Participant joins for a while as well as if all the Participants leave the room and join later, because those gaps will be removed. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info. * @param "VideoLayout" (map[string]interface{}) - An object that describes the video layout of the composition in terms of regions. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info. Please, be aware that either video_layout or audio_sources have to be provided to get a valid creation request * @return VideoV1Composition - */ +*/ func (c *DefaultApiService) CreateComposition(params *CreateCompositionParams) (*VideoV1Composition, error) { - path := "/v1/Compositions" + path := "/v1/Compositions" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.AudioSources != nil { - data.Set("AudioSources", strings.Join(*params.AudioSources, ",")) - } - if params != nil && params.AudioSourcesExcluded != nil { - data.Set("AudioSourcesExcluded", strings.Join(*params.AudioSourcesExcluded, ",")) - } - if params != nil && params.Format != nil { - data.Set("Format", *params.Format) - } - if params != nil && params.Resolution != nil { - data.Set("Resolution", *params.Resolution) - } - if params != nil && params.RoomSid != nil { - data.Set("RoomSid", *params.RoomSid) - } - if params != nil && params.StatusCallback != nil { - data.Set("StatusCallback", *params.StatusCallback) - } - if params != nil && params.StatusCallbackMethod != nil { - data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) - } - if params != nil && params.Trim != nil { - data.Set("Trim", fmt.Sprint(*params.Trim)) + if params != nil && params.AudioSources != nil { + data.Set("AudioSources", strings.Join(*params.AudioSources, ",")) +} + if params != nil && params.AudioSourcesExcluded != nil { + data.Set("AudioSourcesExcluded", strings.Join(*params.AudioSourcesExcluded, ",")) +} + if params != nil && params.Format != nil { + data.Set("Format", *params.Format) +} + if params != nil && params.Resolution != nil { + data.Set("Resolution", *params.Resolution) +} + if params != nil && params.RoomSid != nil { + data.Set("RoomSid", *params.RoomSid) +} + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) +} + if params != nil && params.StatusCallbackMethod != nil { + data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) +} + if params != nil && params.Trim != nil { + data.Set("Trim", fmt.Sprint(*params.Trim)) +} + if params != nil && params.VideoLayout != nil { + v, err := json.Marshal(params.VideoLayout) + + if err != nil { + return nil, err } - if params != nil && params.VideoLayout != nil { - v, err := json.Marshal(params.VideoLayout) - if err != nil { - return nil, err - } + data.Set("VideoLayout", fmt.Sprint(v)) +} - data.Set("VideoLayout", fmt.Sprint(v)) - } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &VideoV1Composition{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VideoV1Composition{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } - // CreateCompositionHookParams Optional parameters for the method 'CreateCompositionHook' type CreateCompositionHookParams struct { - AudioSources *[]string `json:"AudioSources,omitempty"` - AudioSourcesExcluded *[]string `json:"AudioSourcesExcluded,omitempty"` - Enabled *bool `json:"Enabled,omitempty"` - Format *string `json:"Format,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Resolution *string `json:"Resolution,omitempty"` - StatusCallback *string `json:"StatusCallback,omitempty"` - StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` - Trim *bool `json:"Trim,omitempty"` - VideoLayout *map[string]interface{} `json:"VideoLayout,omitempty"` + AudioSources *[]string `json:"AudioSources,omitempty"` + AudioSourcesExcluded *[]string `json:"AudioSourcesExcluded,omitempty"` + Enabled *bool `json:"Enabled,omitempty"` + Format *string `json:"Format,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Resolution *string `json:"Resolution,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` + StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` + Trim *bool `json:"Trim,omitempty"` + VideoLayout *map[string]interface{} `json:"VideoLayout,omitempty"` } /* @@ -143,73 +143,73 @@ type CreateCompositionHookParams struct { * @param "Trim" (bool) - Whether to clip the intervals where there is no active media in the Compositions triggered by the composition hook. The default is `true`. Compositions with `trim` enabled are shorter when the Room is created and no Participant joins for a while as well as if all the Participants leave the room and join later, because those gaps will be removed. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info. * @param "VideoLayout" (map[string]interface{}) - An object that describes the video layout of the composition hook in terms of regions. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info. * @return VideoV1CompositionHook - */ +*/ func (c *DefaultApiService) CreateCompositionHook(params *CreateCompositionHookParams) (*VideoV1CompositionHook, error) { - path := "/v1/CompositionHooks" + path := "/v1/CompositionHooks" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.AudioSources != nil { - data.Set("AudioSources", strings.Join(*params.AudioSources, ",")) - } - if params != nil && params.AudioSourcesExcluded != nil { - data.Set("AudioSourcesExcluded", strings.Join(*params.AudioSourcesExcluded, ",")) - } - if params != nil && params.Enabled != nil { - data.Set("Enabled", fmt.Sprint(*params.Enabled)) - } - if params != nil && params.Format != nil { - data.Set("Format", *params.Format) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.Resolution != nil { - data.Set("Resolution", *params.Resolution) - } - if params != nil && params.StatusCallback != nil { - data.Set("StatusCallback", *params.StatusCallback) - } - if params != nil && params.StatusCallbackMethod != nil { - data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) - } - if params != nil && params.Trim != nil { - data.Set("Trim", fmt.Sprint(*params.Trim)) + if params != nil && params.AudioSources != nil { + data.Set("AudioSources", strings.Join(*params.AudioSources, ",")) +} + if params != nil && params.AudioSourcesExcluded != nil { + data.Set("AudioSourcesExcluded", strings.Join(*params.AudioSourcesExcluded, ",")) +} + if params != nil && params.Enabled != nil { + data.Set("Enabled", fmt.Sprint(*params.Enabled)) +} + if params != nil && params.Format != nil { + data.Set("Format", *params.Format) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.Resolution != nil { + data.Set("Resolution", *params.Resolution) +} + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) +} + if params != nil && params.StatusCallbackMethod != nil { + data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) +} + if params != nil && params.Trim != nil { + data.Set("Trim", fmt.Sprint(*params.Trim)) +} + if params != nil && params.VideoLayout != nil { + v, err := json.Marshal(params.VideoLayout) + + if err != nil { + return nil, err } - if params != nil && params.VideoLayout != nil { - v, err := json.Marshal(params.VideoLayout) - if err != nil { - return nil, err - } + data.Set("VideoLayout", fmt.Sprint(v)) +} - data.Set("VideoLayout", fmt.Sprint(v)) - } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &VideoV1CompositionHook{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VideoV1CompositionHook{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } - // CreateCompositionSettingsParams Optional parameters for the method 'CreateCompositionSettings' type CreateCompositionSettingsParams struct { AwsCredentialsSid *string `json:"AwsCredentialsSid,omitempty"` - AwsS3Url *string `json:"AwsS3Url,omitempty"` - AwsStorageEnabled *bool `json:"AwsStorageEnabled,omitempty"` - EncryptionEnabled *bool `json:"EncryptionEnabled,omitempty"` - EncryptionKeySid *string `json:"EncryptionKeySid,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` + AwsS3Url *string `json:"AwsS3Url,omitempty"` + AwsStorageEnabled *bool `json:"AwsStorageEnabled,omitempty"` + EncryptionEnabled *bool `json:"EncryptionEnabled,omitempty"` + EncryptionKeySid *string `json:"EncryptionKeySid,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` } /* @@ -222,55 +222,55 @@ type CreateCompositionSettingsParams struct { * @param "EncryptionKeySid" (string) - The SID of the Public Key resource to use for encryption. * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource and show to the user in the console * @return VideoV1CompositionSettings - */ +*/ func (c *DefaultApiService) CreateCompositionSettings(params *CreateCompositionSettingsParams) (*VideoV1CompositionSettings, error) { - path := "/v1/CompositionSettings/Default" + path := "/v1/CompositionSettings/Default" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.AwsCredentialsSid != nil { - data.Set("AwsCredentialsSid", *params.AwsCredentialsSid) - } - if params != nil && params.AwsS3Url != nil { - data.Set("AwsS3Url", *params.AwsS3Url) - } - if params != nil && params.AwsStorageEnabled != nil { - data.Set("AwsStorageEnabled", fmt.Sprint(*params.AwsStorageEnabled)) - } - if params != nil && params.EncryptionEnabled != nil { - data.Set("EncryptionEnabled", fmt.Sprint(*params.EncryptionEnabled)) - } - if params != nil && params.EncryptionKeySid != nil { - data.Set("EncryptionKeySid", *params.EncryptionKeySid) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } + if params != nil && params.AwsCredentialsSid != nil { + data.Set("AwsCredentialsSid", *params.AwsCredentialsSid) +} + if params != nil && params.AwsS3Url != nil { + data.Set("AwsS3Url", *params.AwsS3Url) +} + if params != nil && params.AwsStorageEnabled != nil { + data.Set("AwsStorageEnabled", fmt.Sprint(*params.AwsStorageEnabled)) +} + if params != nil && params.EncryptionEnabled != nil { + data.Set("EncryptionEnabled", fmt.Sprint(*params.EncryptionEnabled)) +} + if params != nil && params.EncryptionKeySid != nil { + data.Set("EncryptionKeySid", *params.EncryptionKeySid) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &VideoV1CompositionSettings{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &VideoV1CompositionSettings{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateRecordingSettingsParams Optional parameters for the method 'CreateRecordingSettings' type CreateRecordingSettingsParams struct { AwsCredentialsSid *string `json:"AwsCredentialsSid,omitempty"` - AwsS3Url *string `json:"AwsS3Url,omitempty"` - AwsStorageEnabled *bool `json:"AwsStorageEnabled,omitempty"` - EncryptionEnabled *bool `json:"EncryptionEnabled,omitempty"` - EncryptionKeySid *string `json:"EncryptionKeySid,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` + AwsS3Url *string `json:"AwsS3Url,omitempty"` + AwsStorageEnabled *bool `json:"AwsStorageEnabled,omitempty"` + EncryptionEnabled *bool `json:"EncryptionEnabled,omitempty"` + EncryptionKeySid *string `json:"EncryptionKeySid,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` } /* @@ -283,58 +283,58 @@ type CreateRecordingSettingsParams struct { * @param "EncryptionKeySid" (string) - The SID of the Public Key resource to use for encryption. * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource and be shown to users in the console * @return VideoV1RecordingSettings - */ +*/ func (c *DefaultApiService) CreateRecordingSettings(params *CreateRecordingSettingsParams) (*VideoV1RecordingSettings, error) { - path := "/v1/RecordingSettings/Default" + path := "/v1/RecordingSettings/Default" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.AwsCredentialsSid != nil { - data.Set("AwsCredentialsSid", *params.AwsCredentialsSid) - } - if params != nil && params.AwsS3Url != nil { - data.Set("AwsS3Url", *params.AwsS3Url) - } - if params != nil && params.AwsStorageEnabled != nil { - data.Set("AwsStorageEnabled", fmt.Sprint(*params.AwsStorageEnabled)) - } - if params != nil && params.EncryptionEnabled != nil { - data.Set("EncryptionEnabled", fmt.Sprint(*params.EncryptionEnabled)) - } - if params != nil && params.EncryptionKeySid != nil { - data.Set("EncryptionKeySid", *params.EncryptionKeySid) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } + if params != nil && params.AwsCredentialsSid != nil { + data.Set("AwsCredentialsSid", *params.AwsCredentialsSid) +} + if params != nil && params.AwsS3Url != nil { + data.Set("AwsS3Url", *params.AwsS3Url) +} + if params != nil && params.AwsStorageEnabled != nil { + data.Set("AwsStorageEnabled", fmt.Sprint(*params.AwsStorageEnabled)) +} + if params != nil && params.EncryptionEnabled != nil { + data.Set("EncryptionEnabled", fmt.Sprint(*params.EncryptionEnabled)) +} + if params != nil && params.EncryptionKeySid != nil { + data.Set("EncryptionKeySid", *params.EncryptionKeySid) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &VideoV1RecordingSettings{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &VideoV1RecordingSettings{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateRoomParams Optional parameters for the method 'CreateRoom' type CreateRoomParams struct { - EnableTurn *bool `json:"EnableTurn,omitempty"` - MaxParticipants *int32 `json:"MaxParticipants,omitempty"` - MediaRegion *string `json:"MediaRegion,omitempty"` - RecordParticipantsOnConnect *bool `json:"RecordParticipantsOnConnect,omitempty"` - StatusCallback *string `json:"StatusCallback,omitempty"` - StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` - Type *string `json:"Type,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` - VideoCodecs *[]string `json:"VideoCodecs,omitempty"` + EnableTurn *bool `json:"EnableTurn,omitempty"` + MaxParticipants *int32 `json:"MaxParticipants,omitempty"` + MediaRegion *string `json:"MediaRegion,omitempty"` + RecordParticipantsOnConnect *bool `json:"RecordParticipantsOnConnect,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` + StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` + Type *string `json:"Type,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` + VideoCodecs *[]string `json:"VideoCodecs,omitempty"` } /* @@ -350,143 +350,152 @@ type CreateRoomParams struct { * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. It can be used as a `room_sid` in place of the resource's `sid` in the URL to address the resource. This value is unique for `in-progress` rooms. SDK clients can use this name to connect to the room. REST API clients can use this name in place of the Room SID to interact with the room as long as the room is `in-progress`. * @param "VideoCodecs" ([]string) - An array of the video codecs that are supported when publishing a track in the room. Can be: `VP8` and `H264`. ***This feature is not available in `peer-to-peer` rooms*** * @return VideoV1Room - */ +*/ func (c *DefaultApiService) CreateRoom(params *CreateRoomParams) (*VideoV1Room, error) { - path := "/v1/Rooms" + path := "/v1/Rooms" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.EnableTurn != nil { - data.Set("EnableTurn", fmt.Sprint(*params.EnableTurn)) - } - if params != nil && params.MaxParticipants != nil { - data.Set("MaxParticipants", fmt.Sprint(*params.MaxParticipants)) - } - if params != nil && params.MediaRegion != nil { - data.Set("MediaRegion", *params.MediaRegion) - } - if params != nil && params.RecordParticipantsOnConnect != nil { - data.Set("RecordParticipantsOnConnect", fmt.Sprint(*params.RecordParticipantsOnConnect)) - } - if params != nil && params.StatusCallback != nil { - data.Set("StatusCallback", *params.StatusCallback) - } - if params != nil && params.StatusCallbackMethod != nil { - data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) - } - if params != nil && params.Type != nil { - data.Set("Type", *params.Type) - } - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) - } - if params != nil && params.VideoCodecs != nil { - data.Set("VideoCodecs", strings.Join(*params.VideoCodecs, ",")) - } + if params != nil && params.EnableTurn != nil { + data.Set("EnableTurn", fmt.Sprint(*params.EnableTurn)) +} + if params != nil && params.MaxParticipants != nil { + data.Set("MaxParticipants", fmt.Sprint(*params.MaxParticipants)) +} + if params != nil && params.MediaRegion != nil { + data.Set("MediaRegion", *params.MediaRegion) +} + if params != nil && params.RecordParticipantsOnConnect != nil { + data.Set("RecordParticipantsOnConnect", fmt.Sprint(*params.RecordParticipantsOnConnect)) +} + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) +} + if params != nil && params.StatusCallbackMethod != nil { + data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) +} + if params != nil && params.Type != nil { + data.Set("Type", *params.Type) +} + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) +} + if params != nil && params.VideoCodecs != nil { + data.Set("VideoCodecs", strings.Join(*params.VideoCodecs, ",")) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &VideoV1Room{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() + + ps := &VideoV1Room{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * DeleteComposition Method for DeleteComposition * Delete a Recording Composition resource identified by a Composition SID. * @param Sid The SID of the Composition resource to delete. - */ -func (c *DefaultApiService) DeleteComposition(Sid string) error { - path := "/v1/Compositions/{Sid}" +*/ +func (c *DefaultApiService) DeleteComposition(Sid string, ) (error) { + path := "/v1/Compositions/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* * DeleteCompositionHook Method for DeleteCompositionHook * Delete a Recording CompositionHook resource identified by a `CompositionHook SID`. * @param Sid The SID of the CompositionHook resource to delete. - */ -func (c *DefaultApiService) DeleteCompositionHook(Sid string) error { - path := "/v1/CompositionHooks/{Sid}" +*/ +func (c *DefaultApiService) DeleteCompositionHook(Sid string, ) (error) { + path := "/v1/CompositionHooks/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* * DeleteRecording Method for DeleteRecording * Delete a Recording resource identified by a Recording SID. * @param Sid The SID of the Recording resource to delete. - */ -func (c *DefaultApiService) DeleteRecording(Sid string) error { - path := "/v1/Recordings/{Sid}" +*/ +func (c *DefaultApiService) DeleteRecording(Sid string, ) (error) { + path := "/v1/Recordings/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* * DeleteRoomRecording Method for DeleteRoomRecording * @param RoomSid The SID of the room with the RoomRecording resource to delete. * @param Sid The SID of the RoomRecording resource to delete. - */ -func (c *DefaultApiService) DeleteRoomRecording(RoomSid string, Sid string) error { - path := "/v1/Rooms/{RoomSid}/Recordings/{Sid}" +*/ +func (c *DefaultApiService) DeleteRoomRecording(RoomSid string, Sid string, ) (error) { + path := "/v1/Rooms/{RoomSid}/Recordings/{Sid}" path = strings.Replace(path, "{"+"RoomSid"+"}", RoomSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - return nil + defer resp.Body.Close() + + return nil } /* @@ -494,27 +503,29 @@ func (c *DefaultApiService) DeleteRoomRecording(RoomSid string, Sid string) erro * Returns a single Composition resource identified by a Composition SID. * @param Sid The SID of the Composition resource to fetch. * @return VideoV1Composition - */ -func (c *DefaultApiService) FetchComposition(Sid string) (*VideoV1Composition, error) { - path := "/v1/Compositions/{Sid}" +*/ +func (c *DefaultApiService) FetchComposition(Sid string, ) (*VideoV1Composition, error) { + path := "/v1/Compositions/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &VideoV1Composition{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &VideoV1Composition{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -522,52 +533,56 @@ func (c *DefaultApiService) FetchComposition(Sid string) (*VideoV1Composition, e * Returns a single CompositionHook resource identified by a CompositionHook SID. * @param Sid The SID of the CompositionHook resource to fetch. * @return VideoV1CompositionHook - */ -func (c *DefaultApiService) FetchCompositionHook(Sid string) (*VideoV1CompositionHook, error) { - path := "/v1/CompositionHooks/{Sid}" +*/ +func (c *DefaultApiService) FetchCompositionHook(Sid string, ) (*VideoV1CompositionHook, error) { + path := "/v1/CompositionHooks/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &VideoV1CompositionHook{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VideoV1CompositionHook{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * FetchCompositionSettings Method for FetchCompositionSettings * @return VideoV1CompositionSettings - */ +*/ func (c *DefaultApiService) FetchCompositionSettings() (*VideoV1CompositionSettings, error) { - path := "/v1/CompositionSettings/Default" + path := "/v1/CompositionSettings/Default" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &VideoV1CompositionSettings{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VideoV1CompositionSettings{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -575,79 +590,85 @@ func (c *DefaultApiService) FetchCompositionSettings() (*VideoV1CompositionSetti * Returns a single Recording resource identified by a Recording SID. * @param Sid The SID of the Recording resource to fetch. * @return VideoV1Recording - */ -func (c *DefaultApiService) FetchRecording(Sid string) (*VideoV1Recording, error) { - path := "/v1/Recordings/{Sid}" +*/ +func (c *DefaultApiService) FetchRecording(Sid string, ) (*VideoV1Recording, error) { + path := "/v1/Recordings/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &VideoV1Recording{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err + defer resp.Body.Close() + + ps := &VideoV1Recording{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* * FetchRecordingSettings Method for FetchRecordingSettings * @return VideoV1RecordingSettings - */ +*/ func (c *DefaultApiService) FetchRecordingSettings() (*VideoV1RecordingSettings, error) { - path := "/v1/RecordingSettings/Default" + path := "/v1/RecordingSettings/Default" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &VideoV1RecordingSettings{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &VideoV1RecordingSettings{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* * FetchRoom Method for FetchRoom * @param Sid The SID of the Room resource to fetch. * @return VideoV1Room - */ -func (c *DefaultApiService) FetchRoom(Sid string) (*VideoV1Room, error) { - path := "/v1/Rooms/{Sid}" +*/ +func (c *DefaultApiService) FetchRoom(Sid string, ) (*VideoV1Room, error) { + path := "/v1/Rooms/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &VideoV1Room{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VideoV1Room{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -655,28 +676,30 @@ func (c *DefaultApiService) FetchRoom(Sid string) (*VideoV1Room, error) { * @param RoomSid The SID of the room with the Participant resource to fetch. * @param Sid The SID of the RoomParticipant resource to fetch. * @return VideoV1RoomRoomParticipant - */ -func (c *DefaultApiService) FetchRoomParticipant(RoomSid string, Sid string) (*VideoV1RoomRoomParticipant, error) { - path := "/v1/Rooms/{RoomSid}/Participants/{Sid}" +*/ +func (c *DefaultApiService) FetchRoomParticipant(RoomSid string, Sid string, ) (*VideoV1RoomRoomParticipant, error) { + path := "/v1/Rooms/{RoomSid}/Participants/{Sid}" path = strings.Replace(path, "{"+"RoomSid"+"}", RoomSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &VideoV1RoomRoomParticipant{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VideoV1RoomRoomParticipant{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -686,29 +709,31 @@ func (c *DefaultApiService) FetchRoomParticipant(RoomSid string, Sid string) (*V * @param ParticipantSid The SID of the Participant resource with the published track to fetch. * @param Sid The SID of the RoomParticipantPublishedTrack resource to fetch. * @return VideoV1RoomRoomParticipantRoomParticipantPublishedTrack - */ -func (c *DefaultApiService) FetchRoomParticipantPublishedTrack(RoomSid string, ParticipantSid string, Sid string) (*VideoV1RoomRoomParticipantRoomParticipantPublishedTrack, error) { - path := "/v1/Rooms/{RoomSid}/Participants/{ParticipantSid}/PublishedTracks/{Sid}" +*/ +func (c *DefaultApiService) FetchRoomParticipantPublishedTrack(RoomSid string, ParticipantSid string, Sid string, ) (*VideoV1RoomRoomParticipantRoomParticipantPublishedTrack, error) { + path := "/v1/Rooms/{RoomSid}/Participants/{ParticipantSid}/PublishedTracks/{Sid}" path = strings.Replace(path, "{"+"RoomSid"+"}", RoomSid, -1) path = strings.Replace(path, "{"+"ParticipantSid"+"}", ParticipantSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &VideoV1RoomRoomParticipantRoomParticipantPublishedTrack{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err + defer resp.Body.Close() + + ps := &VideoV1RoomRoomParticipantRoomParticipantPublishedTrack{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -717,28 +742,30 @@ func (c *DefaultApiService) FetchRoomParticipantPublishedTrack(RoomSid string, P * @param RoomSid The SID of the Room resource where the subscribe rules to fetch apply. * @param ParticipantSid The SID of the Participant resource with the subscribe rules to fetch. * @return VideoV1RoomRoomParticipantRoomParticipantSubscribeRule - */ -func (c *DefaultApiService) FetchRoomParticipantSubscribeRule(RoomSid string, ParticipantSid string) (*VideoV1RoomRoomParticipantRoomParticipantSubscribeRule, error) { - path := "/v1/Rooms/{RoomSid}/Participants/{ParticipantSid}/SubscribeRules" +*/ +func (c *DefaultApiService) FetchRoomParticipantSubscribeRule(RoomSid string, ParticipantSid string, ) (*VideoV1RoomRoomParticipantRoomParticipantSubscribeRule, error) { + path := "/v1/Rooms/{RoomSid}/Participants/{ParticipantSid}/SubscribeRules" path = strings.Replace(path, "{"+"RoomSid"+"}", RoomSid, -1) path = strings.Replace(path, "{"+"ParticipantSid"+"}", ParticipantSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &VideoV1RoomRoomParticipantRoomParticipantSubscribeRule{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &VideoV1RoomRoomParticipantRoomParticipantSubscribeRule{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -748,29 +775,31 @@ func (c *DefaultApiService) FetchRoomParticipantSubscribeRule(RoomSid string, Pa * @param ParticipantSid The SID of the participant that subscribes to the Track resource to fetch. * @param Sid The SID of the RoomParticipantSubscribedTrack resource to fetch. * @return VideoV1RoomRoomParticipantRoomParticipantSubscribedTrack - */ -func (c *DefaultApiService) FetchRoomParticipantSubscribedTrack(RoomSid string, ParticipantSid string, Sid string) (*VideoV1RoomRoomParticipantRoomParticipantSubscribedTrack, error) { - path := "/v1/Rooms/{RoomSid}/Participants/{ParticipantSid}/SubscribedTracks/{Sid}" +*/ +func (c *DefaultApiService) FetchRoomParticipantSubscribedTrack(RoomSid string, ParticipantSid string, Sid string, ) (*VideoV1RoomRoomParticipantRoomParticipantSubscribedTrack, error) { + path := "/v1/Rooms/{RoomSid}/Participants/{ParticipantSid}/SubscribedTracks/{Sid}" path = strings.Replace(path, "{"+"RoomSid"+"}", RoomSid, -1) path = strings.Replace(path, "{"+"ParticipantSid"+"}", ParticipantSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &VideoV1RoomRoomParticipantRoomParticipantSubscribedTrack{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &VideoV1RoomRoomParticipantRoomParticipantSubscribedTrack{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -778,28 +807,30 @@ func (c *DefaultApiService) FetchRoomParticipantSubscribedTrack(RoomSid string, * @param RoomSid The SID of the Room resource with the recording to fetch. * @param Sid The SID of the RoomRecording resource to fetch. * @return VideoV1RoomRoomRecording - */ -func (c *DefaultApiService) FetchRoomRecording(RoomSid string, Sid string) (*VideoV1RoomRoomRecording, error) { - path := "/v1/Rooms/{RoomSid}/Recordings/{Sid}" +*/ +func (c *DefaultApiService) FetchRoomRecording(RoomSid string, Sid string, ) (*VideoV1RoomRoomRecording, error) { + path := "/v1/Rooms/{RoomSid}/Recordings/{Sid}" path = strings.Replace(path, "{"+"RoomSid"+"}", RoomSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &VideoV1RoomRoomRecording{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VideoV1RoomRoomRecording{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -807,36 +838,37 @@ func (c *DefaultApiService) FetchRoomRecording(RoomSid string, Sid string) (*Vid * Returns a list of Recording Rules for the Room. * @param RoomSid The SID of the Room resource where the recording rules to fetch apply. * @return VideoV1RoomRoomRecordingRule - */ -func (c *DefaultApiService) FetchRoomRecordingRule(RoomSid string) (*VideoV1RoomRoomRecordingRule, error) { - path := "/v1/Rooms/{RoomSid}/RecordingRules" +*/ +func (c *DefaultApiService) FetchRoomRecordingRule(RoomSid string, ) (*VideoV1RoomRoomRecordingRule, error) { + path := "/v1/Rooms/{RoomSid}/RecordingRules" path = strings.Replace(path, "{"+"RoomSid"+"}", RoomSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &VideoV1RoomRoomRecordingRule{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err -} + defer resp.Body.Close() + + ps := &VideoV1RoomRoomRecordingRule{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListCompositionParams Optional parameters for the method 'ListComposition' type ListCompositionParams struct { - Status *string `json:"Status,omitempty"` - DateCreatedAfter *time.Time `json:"DateCreatedAfter,omitempty"` + Status *string `json:"Status,omitempty"` + DateCreatedAfter *time.Time `json:"DateCreatedAfter,omitempty"` DateCreatedBefore *time.Time `json:"DateCreatedBefore,omitempty"` - RoomSid *string `json:"RoomSid,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + RoomSid *string `json:"RoomSid,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -849,51 +881,51 @@ type ListCompositionParams struct { * @param "RoomSid" (string) - Read only Composition resources with this Room SID. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListCompositionResponse - */ +*/ func (c *DefaultApiService) ListComposition(params *ListCompositionParams) (*ListCompositionResponse, error) { - path := "/v1/Compositions" + path := "/v1/Compositions" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) - } - if params != nil && params.DateCreatedAfter != nil { - data.Set("DateCreatedAfter", fmt.Sprint(*params.DateCreatedAfter)) - } - if params != nil && params.DateCreatedBefore != nil { - data.Set("DateCreatedBefore", fmt.Sprint(*params.DateCreatedBefore)) - } - if params != nil && params.RoomSid != nil { - data.Set("RoomSid", *params.RoomSid) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) +} + if params != nil && params.DateCreatedAfter != nil { + data.Set("DateCreatedAfter", fmt.Sprint(*params.DateCreatedAfter)) +} + if params != nil && params.DateCreatedBefore != nil { + data.Set("DateCreatedBefore", fmt.Sprint(*params.DateCreatedBefore)) +} + if params != nil && params.RoomSid != nil { + data.Set("RoomSid", *params.RoomSid) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListCompositionResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListCompositionResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListCompositionHookParams Optional parameters for the method 'ListCompositionHook' type ListCompositionHookParams struct { - Enabled *bool `json:"Enabled,omitempty"` - DateCreatedAfter *time.Time `json:"DateCreatedAfter,omitempty"` + Enabled *bool `json:"Enabled,omitempty"` + DateCreatedAfter *time.Time `json:"DateCreatedAfter,omitempty"` DateCreatedBefore *time.Time `json:"DateCreatedBefore,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -906,53 +938,53 @@ type ListCompositionHookParams struct { * @param "FriendlyName" (string) - Read only CompositionHook resources with friendly names that match this string. The match is not case sensitive and can include asterisk `*` characters as wildcard match. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListCompositionHookResponse - */ +*/ func (c *DefaultApiService) ListCompositionHook(params *ListCompositionHookParams) (*ListCompositionHookResponse, error) { - path := "/v1/CompositionHooks" + path := "/v1/CompositionHooks" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Enabled != nil { - data.Set("Enabled", fmt.Sprint(*params.Enabled)) - } - if params != nil && params.DateCreatedAfter != nil { - data.Set("DateCreatedAfter", fmt.Sprint(*params.DateCreatedAfter)) - } - if params != nil && params.DateCreatedBefore != nil { - data.Set("DateCreatedBefore", fmt.Sprint(*params.DateCreatedBefore)) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.Enabled != nil { + data.Set("Enabled", fmt.Sprint(*params.Enabled)) +} + if params != nil && params.DateCreatedAfter != nil { + data.Set("DateCreatedAfter", fmt.Sprint(*params.DateCreatedAfter)) +} + if params != nil && params.DateCreatedBefore != nil { + data.Set("DateCreatedBefore", fmt.Sprint(*params.DateCreatedBefore)) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListCompositionHookResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListCompositionHookResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListRecordingParams Optional parameters for the method 'ListRecording' type ListRecordingParams struct { - Status *string `json:"Status,omitempty"` - SourceSid *string `json:"SourceSid,omitempty"` - GroupingSid *[]string `json:"GroupingSid,omitempty"` - DateCreatedAfter *time.Time `json:"DateCreatedAfter,omitempty"` + Status *string `json:"Status,omitempty"` + SourceSid *string `json:"SourceSid,omitempty"` + GroupingSid *[]string `json:"GroupingSid,omitempty"` + DateCreatedAfter *time.Time `json:"DateCreatedAfter,omitempty"` DateCreatedBefore *time.Time `json:"DateCreatedBefore,omitempty"` - MediaType *string `json:"MediaType,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + MediaType *string `json:"MediaType,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -967,57 +999,57 @@ type ListRecordingParams struct { * @param "MediaType" (string) - Read only recordings that have this media type. Can be either `audio` or `video`. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListRecordingResponse - */ +*/ func (c *DefaultApiService) ListRecording(params *ListRecordingParams) (*ListRecordingResponse, error) { - path := "/v1/Recordings" + path := "/v1/Recordings" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) - } - if params != nil && params.SourceSid != nil { - data.Set("SourceSid", *params.SourceSid) - } - if params != nil && params.GroupingSid != nil { - data.Set("GroupingSid", strings.Join(*params.GroupingSid, ",")) - } - if params != nil && params.DateCreatedAfter != nil { - data.Set("DateCreatedAfter", fmt.Sprint(*params.DateCreatedAfter)) - } - if params != nil && params.DateCreatedBefore != nil { - data.Set("DateCreatedBefore", fmt.Sprint(*params.DateCreatedBefore)) - } - if params != nil && params.MediaType != nil { - data.Set("MediaType", *params.MediaType) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) +} + if params != nil && params.SourceSid != nil { + data.Set("SourceSid", *params.SourceSid) +} + if params != nil && params.GroupingSid != nil { + data.Set("GroupingSid", strings.Join(*params.GroupingSid, ",")) +} + if params != nil && params.DateCreatedAfter != nil { + data.Set("DateCreatedAfter", fmt.Sprint(*params.DateCreatedAfter)) +} + if params != nil && params.DateCreatedBefore != nil { + data.Set("DateCreatedBefore", fmt.Sprint(*params.DateCreatedBefore)) +} + if params != nil && params.MediaType != nil { + data.Set("MediaType", *params.MediaType) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListRecordingResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListRecordingResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListRoomParams Optional parameters for the method 'ListRoom' type ListRoomParams struct { - Status *string `json:"Status,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` - DateCreatedAfter *time.Time `json:"DateCreatedAfter,omitempty"` + Status *string `json:"Status,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` + DateCreatedAfter *time.Time `json:"DateCreatedAfter,omitempty"` DateCreatedBefore *time.Time `json:"DateCreatedBefore,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -1029,51 +1061,51 @@ type ListRoomParams struct { * @param "DateCreatedBefore" (time.Time) - Read only rooms that started before this date, given as `YYYY-MM-DD`. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListRoomResponse - */ +*/ func (c *DefaultApiService) ListRoom(params *ListRoomParams) (*ListRoomResponse, error) { - path := "/v1/Rooms" + path := "/v1/Rooms" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) - } - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) - } - if params != nil && params.DateCreatedAfter != nil { - data.Set("DateCreatedAfter", fmt.Sprint(*params.DateCreatedAfter)) - } - if params != nil && params.DateCreatedBefore != nil { - data.Set("DateCreatedBefore", fmt.Sprint(*params.DateCreatedBefore)) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) +} + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) +} + if params != nil && params.DateCreatedAfter != nil { + data.Set("DateCreatedAfter", fmt.Sprint(*params.DateCreatedAfter)) +} + if params != nil && params.DateCreatedBefore != nil { + data.Set("DateCreatedBefore", fmt.Sprint(*params.DateCreatedBefore)) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListRoomResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListRoomResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListRoomParticipantParams Optional parameters for the method 'ListRoomParticipant' type ListRoomParticipantParams struct { - Status *string `json:"Status,omitempty"` - Identity *string `json:"Identity,omitempty"` - DateCreatedAfter *time.Time `json:"DateCreatedAfter,omitempty"` + Status *string `json:"Status,omitempty"` + Identity *string `json:"Identity,omitempty"` + DateCreatedAfter *time.Time `json:"DateCreatedAfter,omitempty"` DateCreatedBefore *time.Time `json:"DateCreatedBefore,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -1086,45 +1118,45 @@ type ListRoomParticipantParams struct { * @param "DateCreatedBefore" (time.Time) - Read only Participants that started before this date in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601#UTC) format. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListRoomParticipantResponse - */ +*/ func (c *DefaultApiService) ListRoomParticipant(RoomSid string, params *ListRoomParticipantParams) (*ListRoomParticipantResponse, error) { - path := "/v1/Rooms/{RoomSid}/Participants" + path := "/v1/Rooms/{RoomSid}/Participants" path = strings.Replace(path, "{"+"RoomSid"+"}", RoomSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) - } - if params != nil && params.Identity != nil { - data.Set("Identity", *params.Identity) - } - if params != nil && params.DateCreatedAfter != nil { - data.Set("DateCreatedAfter", fmt.Sprint(*params.DateCreatedAfter)) - } - if params != nil && params.DateCreatedBefore != nil { - data.Set("DateCreatedBefore", fmt.Sprint(*params.DateCreatedBefore)) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) +} + if params != nil && params.Identity != nil { + data.Set("Identity", *params.Identity) +} + if params != nil && params.DateCreatedAfter != nil { + data.Set("DateCreatedAfter", fmt.Sprint(*params.DateCreatedAfter)) +} + if params != nil && params.DateCreatedBefore != nil { + data.Set("DateCreatedBefore", fmt.Sprint(*params.DateCreatedBefore)) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListRoomParticipantResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListRoomParticipantResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListRoomParticipantPublishedTrackParams Optional parameters for the method 'ListRoomParticipantPublishedTrack' type ListRoomParticipantPublishedTrackParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1138,34 +1170,34 @@ type ListRoomParticipantPublishedTrackParams struct { * @param optional nil or *ListRoomParticipantPublishedTrackParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListRoomParticipantPublishedTrackResponse - */ +*/ func (c *DefaultApiService) ListRoomParticipantPublishedTrack(RoomSid string, ParticipantSid string, params *ListRoomParticipantPublishedTrackParams) (*ListRoomParticipantPublishedTrackResponse, error) { - path := "/v1/Rooms/{RoomSid}/Participants/{ParticipantSid}/PublishedTracks" + path := "/v1/Rooms/{RoomSid}/Participants/{ParticipantSid}/PublishedTracks" path = strings.Replace(path, "{"+"RoomSid"+"}", RoomSid, -1) path = strings.Replace(path, "{"+"ParticipantSid"+"}", ParticipantSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListRoomParticipantPublishedTrackResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListRoomParticipantPublishedTrackResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListRoomParticipantSubscribedTrackParams Optional parameters for the method 'ListRoomParticipantSubscribedTrack' type ListRoomParticipantSubscribedTrackParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1179,41 +1211,41 @@ type ListRoomParticipantSubscribedTrackParams struct { * @param optional nil or *ListRoomParticipantSubscribedTrackParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListRoomParticipantSubscribedTrackResponse - */ +*/ func (c *DefaultApiService) ListRoomParticipantSubscribedTrack(RoomSid string, ParticipantSid string, params *ListRoomParticipantSubscribedTrackParams) (*ListRoomParticipantSubscribedTrackResponse, error) { - path := "/v1/Rooms/{RoomSid}/Participants/{ParticipantSid}/SubscribedTracks" + path := "/v1/Rooms/{RoomSid}/Participants/{ParticipantSid}/SubscribedTracks" path = strings.Replace(path, "{"+"RoomSid"+"}", RoomSid, -1) path = strings.Replace(path, "{"+"ParticipantSid"+"}", ParticipantSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListRoomParticipantSubscribedTrackResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListRoomParticipantSubscribedTrackResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListRoomRecordingParams Optional parameters for the method 'ListRoomRecording' type ListRoomRecordingParams struct { - Status *string `json:"Status,omitempty"` - SourceSid *string `json:"SourceSid,omitempty"` - DateCreatedAfter *time.Time `json:"DateCreatedAfter,omitempty"` + Status *string `json:"Status,omitempty"` + SourceSid *string `json:"SourceSid,omitempty"` + DateCreatedAfter *time.Time `json:"DateCreatedAfter,omitempty"` DateCreatedBefore *time.Time `json:"DateCreatedBefore,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -1226,57 +1258,57 @@ type ListRoomRecordingParams struct { * @param "DateCreatedBefore" (time.Time) - Read only Recordings that started before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime with time zone. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListRoomRecordingResponse - */ +*/ func (c *DefaultApiService) ListRoomRecording(RoomSid string, params *ListRoomRecordingParams) (*ListRoomRecordingResponse, error) { - path := "/v1/Rooms/{RoomSid}/Recordings" + path := "/v1/Rooms/{RoomSid}/Recordings" path = strings.Replace(path, "{"+"RoomSid"+"}", RoomSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) - } - if params != nil && params.SourceSid != nil { - data.Set("SourceSid", *params.SourceSid) - } - if params != nil && params.DateCreatedAfter != nil { - data.Set("DateCreatedAfter", fmt.Sprint(*params.DateCreatedAfter)) - } - if params != nil && params.DateCreatedBefore != nil { - data.Set("DateCreatedBefore", fmt.Sprint(*params.DateCreatedBefore)) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) +} + if params != nil && params.SourceSid != nil { + data.Set("SourceSid", *params.SourceSid) +} + if params != nil && params.DateCreatedAfter != nil { + data.Set("DateCreatedAfter", fmt.Sprint(*params.DateCreatedAfter)) +} + if params != nil && params.DateCreatedBefore != nil { + data.Set("DateCreatedBefore", fmt.Sprint(*params.DateCreatedBefore)) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListRoomRecordingResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListRoomRecordingResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateCompositionHookParams Optional parameters for the method 'UpdateCompositionHook' type UpdateCompositionHookParams struct { - AudioSources *[]string `json:"AudioSources,omitempty"` - AudioSourcesExcluded *[]string `json:"AudioSourcesExcluded,omitempty"` - Enabled *bool `json:"Enabled,omitempty"` - Format *string `json:"Format,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Resolution *string `json:"Resolution,omitempty"` - StatusCallback *string `json:"StatusCallback,omitempty"` - StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` - Trim *bool `json:"Trim,omitempty"` - VideoLayout *map[string]interface{} `json:"VideoLayout,omitempty"` + AudioSources *[]string `json:"AudioSources,omitempty"` + AudioSourcesExcluded *[]string `json:"AudioSourcesExcluded,omitempty"` + Enabled *bool `json:"Enabled,omitempty"` + Format *string `json:"Format,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Resolution *string `json:"Resolution,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` + StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` + Trim *bool `json:"Trim,omitempty"` + VideoLayout *map[string]interface{} `json:"VideoLayout,omitempty"` } /* @@ -1294,66 +1326,66 @@ type UpdateCompositionHookParams struct { * @param "Trim" (bool) - Whether to clip the intervals where there is no active media in the compositions triggered by the composition hook. The default is `true`. Compositions with `trim` enabled are shorter when the Room is created and no Participant joins for a while as well as if all the Participants leave the room and join later, because those gaps will be removed. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info. * @param "VideoLayout" (map[string]interface{}) - A JSON object that describes the video layout of the composition hook in terms of regions. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info. * @return VideoV1CompositionHook - */ +*/ func (c *DefaultApiService) UpdateCompositionHook(Sid string, params *UpdateCompositionHookParams) (*VideoV1CompositionHook, error) { - path := "/v1/CompositionHooks/{Sid}" + path := "/v1/CompositionHooks/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.AudioSources != nil { - data.Set("AudioSources", strings.Join(*params.AudioSources, ",")) - } - if params != nil && params.AudioSourcesExcluded != nil { - data.Set("AudioSourcesExcluded", strings.Join(*params.AudioSourcesExcluded, ",")) - } - if params != nil && params.Enabled != nil { - data.Set("Enabled", fmt.Sprint(*params.Enabled)) - } - if params != nil && params.Format != nil { - data.Set("Format", *params.Format) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.Resolution != nil { - data.Set("Resolution", *params.Resolution) - } - if params != nil && params.StatusCallback != nil { - data.Set("StatusCallback", *params.StatusCallback) - } - if params != nil && params.StatusCallbackMethod != nil { - data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) - } - if params != nil && params.Trim != nil { - data.Set("Trim", fmt.Sprint(*params.Trim)) + if params != nil && params.AudioSources != nil { + data.Set("AudioSources", strings.Join(*params.AudioSources, ",")) +} + if params != nil && params.AudioSourcesExcluded != nil { + data.Set("AudioSourcesExcluded", strings.Join(*params.AudioSourcesExcluded, ",")) +} + if params != nil && params.Enabled != nil { + data.Set("Enabled", fmt.Sprint(*params.Enabled)) +} + if params != nil && params.Format != nil { + data.Set("Format", *params.Format) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.Resolution != nil { + data.Set("Resolution", *params.Resolution) +} + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) +} + if params != nil && params.StatusCallbackMethod != nil { + data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) +} + if params != nil && params.Trim != nil { + data.Set("Trim", fmt.Sprint(*params.Trim)) +} + if params != nil && params.VideoLayout != nil { + v, err := json.Marshal(params.VideoLayout) + + if err != nil { + return nil, err } - if params != nil && params.VideoLayout != nil { - v, err := json.Marshal(params.VideoLayout) - if err != nil { - return nil, err - } + data.Set("VideoLayout", fmt.Sprint(v)) +} - data.Set("VideoLayout", fmt.Sprint(v)) - } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &VideoV1CompositionHook{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VideoV1CompositionHook{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } - // UpdateRoomParams Optional parameters for the method 'UpdateRoom' type UpdateRoomParams struct { Status *string `json:"Status,omitempty"` @@ -1365,33 +1397,33 @@ type UpdateRoomParams struct { * @param optional nil or *UpdateRoomParams - Optional Parameters: * @param "Status" (string) - The new status of the resource. Set to `completed` to end the room. * @return VideoV1Room - */ +*/ func (c *DefaultApiService) UpdateRoom(Sid string, params *UpdateRoomParams) (*VideoV1Room, error) { - path := "/v1/Rooms/{Sid}" + path := "/v1/Rooms/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) - } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &VideoV1Room{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &VideoV1Room{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateRoomParticipantParams Optional parameters for the method 'UpdateRoomParticipant' type UpdateRoomParticipantParams struct { Status *string `json:"Status,omitempty"` @@ -1404,34 +1436,34 @@ type UpdateRoomParticipantParams struct { * @param optional nil or *UpdateRoomParticipantParams - Optional Parameters: * @param "Status" (string) - The new status of the resource. Can be: `connected` or `disconnected`. For `in-progress` Rooms the default Status is `connected`, for `completed` Rooms only `disconnected` Participants are returned. * @return VideoV1RoomRoomParticipant - */ +*/ func (c *DefaultApiService) UpdateRoomParticipant(RoomSid string, Sid string, params *UpdateRoomParticipantParams) (*VideoV1RoomRoomParticipant, error) { - path := "/v1/Rooms/{RoomSid}/Participants/{Sid}" + path := "/v1/Rooms/{RoomSid}/Participants/{Sid}" path = strings.Replace(path, "{"+"RoomSid"+"}", RoomSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) - } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &VideoV1RoomRoomParticipant{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &VideoV1RoomRoomParticipant{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateRoomParticipantSubscribeRuleParams Optional parameters for the method 'UpdateRoomParticipantSubscribeRule' type UpdateRoomParticipantSubscribeRuleParams struct { Rules *map[string]interface{} `json:"Rules,omitempty"` @@ -1445,40 +1477,40 @@ type UpdateRoomParticipantSubscribeRuleParams struct { * @param optional nil or *UpdateRoomParticipantSubscribeRuleParams - Optional Parameters: * @param "Rules" (map[string]interface{}) - A JSON-encoded array of subscribe rules. See the [Specifying Subscribe Rules](https://www.twilio.com/docs/video/api/track-subscriptions#specifying-sr) section for further information. * @return VideoV1RoomRoomParticipantRoomParticipantSubscribeRule - */ +*/ func (c *DefaultApiService) UpdateRoomParticipantSubscribeRule(RoomSid string, ParticipantSid string, params *UpdateRoomParticipantSubscribeRuleParams) (*VideoV1RoomRoomParticipantRoomParticipantSubscribeRule, error) { - path := "/v1/Rooms/{RoomSid}/Participants/{ParticipantSid}/SubscribeRules" + path := "/v1/Rooms/{RoomSid}/Participants/{ParticipantSid}/SubscribeRules" path = strings.Replace(path, "{"+"RoomSid"+"}", RoomSid, -1) path = strings.Replace(path, "{"+"ParticipantSid"+"}", ParticipantSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Rules != nil { - v, err := json.Marshal(params.Rules) + data := url.Values{} + headers := 0 - if err != nil { - return nil, err - } + if params != nil && params.Rules != nil { + v, err := json.Marshal(params.Rules) - data.Set("Rules", fmt.Sprint(v)) - } - - resp, err := c.client.Post(c.baseURL+path, data, headers) if err != nil { - return nil, err + return nil, err } - defer resp.Body.Close() + data.Set("Rules", fmt.Sprint(v)) +} - ps := &VideoV1RoomRoomParticipantRoomParticipantSubscribeRule{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - return ps, err -} + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() + + ps := &VideoV1RoomRoomParticipantRoomParticipantSubscribeRule{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} // UpdateRoomRecordingRuleParams Optional parameters for the method 'UpdateRoomRecordingRule' type UpdateRoomRecordingRuleParams struct { Rules *map[string]interface{} `json:"Rules,omitempty"` @@ -1491,35 +1523,36 @@ type UpdateRoomRecordingRuleParams struct { * @param optional nil or *UpdateRoomRecordingRuleParams - Optional Parameters: * @param "Rules" (map[string]interface{}) - A JSON-encoded array of recording rules. * @return VideoV1RoomRoomRecordingRule - */ +*/ func (c *DefaultApiService) UpdateRoomRecordingRule(RoomSid string, params *UpdateRoomRecordingRuleParams) (*VideoV1RoomRoomRecordingRule, error) { - path := "/v1/Rooms/{RoomSid}/RecordingRules" + path := "/v1/Rooms/{RoomSid}/RecordingRules" path = strings.Replace(path, "{"+"RoomSid"+"}", RoomSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Rules != nil { - v, err := json.Marshal(params.Rules) - - if err != nil { - return nil, err - } - - data.Set("Rules", fmt.Sprint(v)) - } + if params != nil && params.Rules != nil { + v, err := json.Marshal(params.Rules) - resp, err := c.client.Post(c.baseURL+path, data, headers) if err != nil { - return nil, err + return nil, err } - defer resp.Body.Close() + data.Set("Rules", fmt.Sprint(v)) +} - ps := &VideoV1RoomRoomRecordingRule{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - return ps, err + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VideoV1RoomRoomRecordingRule{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } diff --git a/twilio/rest/video/v1/model_list_composition_hook_response.go b/twilio/rest/video/v1/model_list_composition_hook_response.go index 30f0f62d7..87f2f97ba 100644 --- a/twilio/rest/video/v1/model_list_composition_hook_response.go +++ b/twilio/rest/video/v1/model_list_composition_hook_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Video - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListCompositionHookResponse struct for ListCompositionHookResponse type ListCompositionHookResponse struct { - CompositionHooks []VideoV1CompositionHook `json:"CompositionHooks,omitempty"` - Meta ListCompositionHookResponseMeta `json:"Meta,omitempty"` + CompositionHooks []VideoV1CompositionHook `json:"CompositionHooks,omitempty"` + Meta ListCompositionHookResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/video/v1/model_list_composition_hook_response_meta.go b/twilio/rest/video/v1/model_list_composition_hook_response_meta.go index 112ef51ac..88921ef38 100644 --- a/twilio/rest/video/v1/model_list_composition_hook_response_meta.go +++ b/twilio/rest/video/v1/model_list_composition_hook_response_meta.go @@ -1,23 +1,22 @@ /* - * Twilio - Video - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListCompositionHookResponseMeta struct for ListCompositionHookResponseMeta type ListCompositionHookResponseMeta struct { - FirstPageUrl string `json:"FirstPageUrl,omitempty"` - Key string `json:"Key,omitempty"` - NextPageUrl string `json:"NextPageUrl,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` - Url string `json:"Url,omitempty"` + Url string `json:"Url,omitempty"` } diff --git a/twilio/rest/video/v1/model_list_composition_response.go b/twilio/rest/video/v1/model_list_composition_response.go index eea3f2942..3c9705043 100644 --- a/twilio/rest/video/v1/model_list_composition_response.go +++ b/twilio/rest/video/v1/model_list_composition_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Video - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListCompositionResponse struct for ListCompositionResponse type ListCompositionResponse struct { - Compositions []VideoV1Composition `json:"Compositions,omitempty"` - Meta ListCompositionHookResponseMeta `json:"Meta,omitempty"` + Compositions []VideoV1Composition `json:"Compositions,omitempty"` + Meta ListCompositionHookResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/video/v1/model_list_recording_response.go b/twilio/rest/video/v1/model_list_recording_response.go index 151a061fd..476b3418b 100644 --- a/twilio/rest/video/v1/model_list_recording_response.go +++ b/twilio/rest/video/v1/model_list_recording_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Video - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListRecordingResponse struct for ListRecordingResponse type ListRecordingResponse struct { - Meta ListCompositionHookResponseMeta `json:"Meta,omitempty"` - Recordings []VideoV1Recording `json:"Recordings,omitempty"` + Meta ListCompositionHookResponseMeta `json:"Meta,omitempty"` + Recordings []VideoV1Recording `json:"Recordings,omitempty"` } diff --git a/twilio/rest/video/v1/model_list_room_participant_published_track_response.go b/twilio/rest/video/v1/model_list_room_participant_published_track_response.go index 5437014ad..3e8ef4fd9 100644 --- a/twilio/rest/video/v1/model_list_room_participant_published_track_response.go +++ b/twilio/rest/video/v1/model_list_room_participant_published_track_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Video - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListRoomParticipantPublishedTrackResponse struct for ListRoomParticipantPublishedTrackResponse type ListRoomParticipantPublishedTrackResponse struct { - Meta ListCompositionHookResponseMeta `json:"Meta,omitempty"` + Meta ListCompositionHookResponseMeta `json:"Meta,omitempty"` PublishedTracks []VideoV1RoomRoomParticipantRoomParticipantPublishedTrack `json:"PublishedTracks,omitempty"` } diff --git a/twilio/rest/video/v1/model_list_room_participant_response.go b/twilio/rest/video/v1/model_list_room_participant_response.go index 6d15feb66..e47331ee7 100644 --- a/twilio/rest/video/v1/model_list_room_participant_response.go +++ b/twilio/rest/video/v1/model_list_room_participant_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Video - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListRoomParticipantResponse struct for ListRoomParticipantResponse type ListRoomParticipantResponse struct { - Meta ListCompositionHookResponseMeta `json:"Meta,omitempty"` - Participants []VideoV1RoomRoomParticipant `json:"Participants,omitempty"` + Meta ListCompositionHookResponseMeta `json:"Meta,omitempty"` + Participants []VideoV1RoomRoomParticipant `json:"Participants,omitempty"` } diff --git a/twilio/rest/video/v1/model_list_room_participant_subscribed_track_response.go b/twilio/rest/video/v1/model_list_room_participant_subscribed_track_response.go index a01cad8ff..e4c1f199c 100644 --- a/twilio/rest/video/v1/model_list_room_participant_subscribed_track_response.go +++ b/twilio/rest/video/v1/model_list_room_participant_subscribed_track_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Video - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListRoomParticipantSubscribedTrackResponse struct for ListRoomParticipantSubscribedTrackResponse type ListRoomParticipantSubscribedTrackResponse struct { - Meta ListCompositionHookResponseMeta `json:"Meta,omitempty"` + Meta ListCompositionHookResponseMeta `json:"Meta,omitempty"` SubscribedTracks []VideoV1RoomRoomParticipantRoomParticipantSubscribedTrack `json:"SubscribedTracks,omitempty"` } diff --git a/twilio/rest/video/v1/model_list_room_recording_response.go b/twilio/rest/video/v1/model_list_room_recording_response.go index 59b426b94..a3919efda 100644 --- a/twilio/rest/video/v1/model_list_room_recording_response.go +++ b/twilio/rest/video/v1/model_list_room_recording_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Video - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListRoomRecordingResponse struct for ListRoomRecordingResponse type ListRoomRecordingResponse struct { - Meta ListCompositionHookResponseMeta `json:"Meta,omitempty"` - Recordings []VideoV1RoomRoomRecording `json:"Recordings,omitempty"` + Meta ListCompositionHookResponseMeta `json:"Meta,omitempty"` + Recordings []VideoV1RoomRoomRecording `json:"Recordings,omitempty"` } diff --git a/twilio/rest/video/v1/model_list_room_response.go b/twilio/rest/video/v1/model_list_room_response.go index 2f0f3445c..572db5f05 100644 --- a/twilio/rest/video/v1/model_list_room_response.go +++ b/twilio/rest/video/v1/model_list_room_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Video - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListRoomResponse struct for ListRoomResponse type ListRoomResponse struct { - Meta ListCompositionHookResponseMeta `json:"Meta,omitempty"` - Rooms []VideoV1Room `json:"Rooms,omitempty"` + Meta ListCompositionHookResponseMeta `json:"Meta,omitempty"` + Rooms []VideoV1Room `json:"Rooms,omitempty"` } diff --git a/twilio/rest/video/v1/model_video_v1_composition.go b/twilio/rest/video/v1/model_video_v1_composition.go index f96603bcb..9d3377191 100644 --- a/twilio/rest/video/v1/model_video_v1_composition.go +++ b/twilio/rest/video/v1/model_video_v1_composition.go @@ -1,20 +1,18 @@ /* - * Twilio - Video - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // VideoV1Composition struct for VideoV1Composition type VideoV1Composition struct { // The SID of the Account that created the resource diff --git a/twilio/rest/video/v1/model_video_v1_composition_hook.go b/twilio/rest/video/v1/model_video_v1_composition_hook.go index a531e9087..5902d9519 100644 --- a/twilio/rest/video/v1/model_video_v1_composition_hook.go +++ b/twilio/rest/video/v1/model_video_v1_composition_hook.go @@ -1,20 +1,18 @@ /* - * Twilio - Video - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // VideoV1CompositionHook struct for VideoV1CompositionHook type VideoV1CompositionHook struct { // The SID of the Account that created the resource diff --git a/twilio/rest/video/v1/model_video_v1_composition_settings.go b/twilio/rest/video/v1/model_video_v1_composition_settings.go index c1dfbdb26..ff534f580 100644 --- a/twilio/rest/video/v1/model_video_v1_composition_settings.go +++ b/twilio/rest/video/v1/model_video_v1_composition_settings.go @@ -1,16 +1,15 @@ /* - * Twilio - Video - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // VideoV1CompositionSettings struct for VideoV1CompositionSettings type VideoV1CompositionSettings struct { // The SID of the Account that created the resource diff --git a/twilio/rest/video/v1/model_video_v1_recording.go b/twilio/rest/video/v1/model_video_v1_recording.go index e7a69695f..9e1bbf535 100644 --- a/twilio/rest/video/v1/model_video_v1_recording.go +++ b/twilio/rest/video/v1/model_video_v1_recording.go @@ -1,20 +1,18 @@ /* - * Twilio - Video - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // VideoV1Recording struct for VideoV1Recording type VideoV1Recording struct { // The SID of the Account that created the resource diff --git a/twilio/rest/video/v1/model_video_v1_recording_settings.go b/twilio/rest/video/v1/model_video_v1_recording_settings.go index b2b309779..64f0ac180 100644 --- a/twilio/rest/video/v1/model_video_v1_recording_settings.go +++ b/twilio/rest/video/v1/model_video_v1_recording_settings.go @@ -1,16 +1,15 @@ /* - * Twilio - Video - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // VideoV1RecordingSettings struct for VideoV1RecordingSettings type VideoV1RecordingSettings struct { // The SID of the Account that created the resource diff --git a/twilio/rest/video/v1/model_video_v1_room.go b/twilio/rest/video/v1/model_video_v1_room.go index 4cbd6421c..a5c01e6d3 100644 --- a/twilio/rest/video/v1/model_video_v1_room.go +++ b/twilio/rest/video/v1/model_video_v1_room.go @@ -1,20 +1,18 @@ /* - * Twilio - Video - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // VideoV1Room struct for VideoV1Room type VideoV1Room struct { // The SID of the Account that created the resource diff --git a/twilio/rest/video/v1/model_video_v1_room_room_participant.go b/twilio/rest/video/v1/model_video_v1_room_room_participant.go index 0a052e2cb..d1ec743c3 100644 --- a/twilio/rest/video/v1/model_video_v1_room_room_participant.go +++ b/twilio/rest/video/v1/model_video_v1_room_room_participant.go @@ -1,20 +1,18 @@ /* - * Twilio - Video - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // VideoV1RoomRoomParticipant struct for VideoV1RoomRoomParticipant type VideoV1RoomRoomParticipant struct { // The SID of the Account that created the resource diff --git a/twilio/rest/video/v1/model_video_v1_room_room_participant_room_participant_published_track.go b/twilio/rest/video/v1/model_video_v1_room_room_participant_room_participant_published_track.go index 31354dec0..141c65629 100644 --- a/twilio/rest/video/v1/model_video_v1_room_room_participant_room_participant_published_track.go +++ b/twilio/rest/video/v1/model_video_v1_room_room_participant_room_participant_published_track.go @@ -1,20 +1,18 @@ /* - * Twilio - Video - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // VideoV1RoomRoomParticipantRoomParticipantPublishedTrack struct for VideoV1RoomRoomParticipantRoomParticipantPublishedTrack type VideoV1RoomRoomParticipantRoomParticipantPublishedTrack struct { // The ISO 8601 date and time in GMT when the resource was created diff --git a/twilio/rest/video/v1/model_video_v1_room_room_participant_room_participant_subscribe_rule.go b/twilio/rest/video/v1/model_video_v1_room_room_participant_room_participant_subscribe_rule.go index 5da5b600b..8ccf5bb79 100644 --- a/twilio/rest/video/v1/model_video_v1_room_room_participant_room_participant_subscribe_rule.go +++ b/twilio/rest/video/v1/model_video_v1_room_room_participant_room_participant_subscribe_rule.go @@ -1,20 +1,18 @@ /* - * Twilio - Video - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // VideoV1RoomRoomParticipantRoomParticipantSubscribeRule struct for VideoV1RoomRoomParticipantRoomParticipantSubscribeRule type VideoV1RoomRoomParticipantRoomParticipantSubscribeRule struct { // The ISO 8601 date and time in GMT when the resource was created diff --git a/twilio/rest/video/v1/model_video_v1_room_room_participant_room_participant_subscribed_track.go b/twilio/rest/video/v1/model_video_v1_room_room_participant_room_participant_subscribed_track.go index 0d94d3f9e..280efd7ab 100644 --- a/twilio/rest/video/v1/model_video_v1_room_room_participant_room_participant_subscribed_track.go +++ b/twilio/rest/video/v1/model_video_v1_room_room_participant_room_participant_subscribed_track.go @@ -1,20 +1,18 @@ /* - * Twilio - Video - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // VideoV1RoomRoomParticipantRoomParticipantSubscribedTrack struct for VideoV1RoomRoomParticipantRoomParticipantSubscribedTrack type VideoV1RoomRoomParticipantRoomParticipantSubscribedTrack struct { // The ISO 8601 date and time in GMT when the resource was created diff --git a/twilio/rest/video/v1/model_video_v1_room_room_recording.go b/twilio/rest/video/v1/model_video_v1_room_room_recording.go index a2d33ecc1..06d2fad94 100644 --- a/twilio/rest/video/v1/model_video_v1_room_room_recording.go +++ b/twilio/rest/video/v1/model_video_v1_room_room_recording.go @@ -1,20 +1,18 @@ /* - * Twilio - Video - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // VideoV1RoomRoomRecording struct for VideoV1RoomRoomRecording type VideoV1RoomRoomRecording struct { // The SID of the Account that created the resource diff --git a/twilio/rest/video/v1/model_video_v1_room_room_recording_rule.go b/twilio/rest/video/v1/model_video_v1_room_room_recording_rule.go index 6df7ada4d..86f27c705 100644 --- a/twilio/rest/video/v1/model_video_v1_room_room_recording_rule.go +++ b/twilio/rest/video/v1/model_video_v1_room_room_recording_rule.go @@ -1,20 +1,18 @@ /* - * Twilio - Video - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // VideoV1RoomRoomRecordingRule struct for VideoV1RoomRoomRecordingRule type VideoV1RoomRoomRecordingRule struct { // The ISO 8601 date and time in GMT when the resource was created diff --git a/twilio/rest/video/v1/model_video_v1_room_room_recording_rule_rules.go b/twilio/rest/video/v1/model_video_v1_room_room_recording_rule_rules.go index b5f57ac20..e613787e3 100644 --- a/twilio/rest/video/v1/model_video_v1_room_room_recording_rule_rules.go +++ b/twilio/rest/video/v1/model_video_v1_room_room_recording_rule_rules.go @@ -1,21 +1,20 @@ /* - * Twilio - Video - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // VideoV1RoomRoomRecordingRuleRules struct for VideoV1RoomRoomRecordingRuleRules type VideoV1RoomRoomRecordingRuleRules struct { - All bool `json:"All,omitempty"` - Kind string `json:"Kind,omitempty"` + All bool `json:"All,omitempty"` + Kind string `json:"Kind,omitempty"` Publisher string `json:"Publisher,omitempty"` - Track string `json:"Track,omitempty"` - Type string `json:"Type,omitempty"` + Track string `json:"Track,omitempty"` + Type string `json:"Type,omitempty"` } diff --git a/twilio/rest/voice/v1/api_default.go b/twilio/rest/voice/v1/api_default.go index 1acfe99ae..fd2aff0aa 100644 --- a/twilio/rest/voice/v1/api_default.go +++ b/twilio/rest/voice/v1/api_default.go @@ -1,11 +1,11 @@ /* - * Twilio - Voice - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Voice + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,10 +14,9 @@ package openapi import ( "encoding/json" "fmt" - "net/url" - "strings" - twilio "github.com/twilio/twilio-go/client" + "net/url" + "strings" ) type DefaultApiService struct { @@ -26,24 +25,24 @@ type DefaultApiService struct { } func NewDefaultApiService(client *twilio.Client) *DefaultApiService { - return &DefaultApiService{ - client: client, + return &DefaultApiService { + client: client, baseURL: "https://voice.twilio.com", } } // CreateByocTrunkParams Optional parameters for the method 'CreateByocTrunk' type CreateByocTrunkParams struct { - CnamLookupEnabled *bool `json:"CnamLookupEnabled,omitempty"` - ConnectionPolicySid *string `json:"ConnectionPolicySid,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - FromDomainSid *string `json:"FromDomainSid,omitempty"` + CnamLookupEnabled *bool `json:"CnamLookupEnabled,omitempty"` + ConnectionPolicySid *string `json:"ConnectionPolicySid,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + FromDomainSid *string `json:"FromDomainSid,omitempty"` StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` - StatusCallbackUrl *string `json:"StatusCallbackUrl,omitempty"` - VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"` - VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` - VoiceMethod *string `json:"VoiceMethod,omitempty"` - VoiceUrl *string `json:"VoiceUrl,omitempty"` + StatusCallbackUrl *string `json:"StatusCallbackUrl,omitempty"` + VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"` + VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` + VoiceMethod *string `json:"VoiceMethod,omitempty"` + VoiceUrl *string `json:"VoiceUrl,omitempty"` } /* @@ -60,59 +59,59 @@ type CreateByocTrunkParams struct { * @param "VoiceMethod" (string) - The HTTP method we should use to call `voice_url`. Can be: `GET` or `POST`. * @param "VoiceUrl" (string) - The URL we should call when the BYOC Trunk receives a call. * @return VoiceV1ByocTrunk - */ +*/ func (c *DefaultApiService) CreateByocTrunk(params *CreateByocTrunkParams) (*VoiceV1ByocTrunk, error) { - path := "/v1/ByocTrunks" + path := "/v1/ByocTrunks" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.CnamLookupEnabled != nil { - data.Set("CnamLookupEnabled", fmt.Sprint(*params.CnamLookupEnabled)) - } - if params != nil && params.ConnectionPolicySid != nil { - data.Set("ConnectionPolicySid", *params.ConnectionPolicySid) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.FromDomainSid != nil { - data.Set("FromDomainSid", *params.FromDomainSid) - } - if params != nil && params.StatusCallbackMethod != nil { - data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) - } - if params != nil && params.StatusCallbackUrl != nil { - data.Set("StatusCallbackUrl", *params.StatusCallbackUrl) - } - if params != nil && params.VoiceFallbackMethod != nil { - data.Set("VoiceFallbackMethod", *params.VoiceFallbackMethod) - } - if params != nil && params.VoiceFallbackUrl != nil { - data.Set("VoiceFallbackUrl", *params.VoiceFallbackUrl) - } - if params != nil && params.VoiceMethod != nil { - data.Set("VoiceMethod", *params.VoiceMethod) - } - if params != nil && params.VoiceUrl != nil { - data.Set("VoiceUrl", *params.VoiceUrl) - } + if params != nil && params.CnamLookupEnabled != nil { + data.Set("CnamLookupEnabled", fmt.Sprint(*params.CnamLookupEnabled)) +} + if params != nil && params.ConnectionPolicySid != nil { + data.Set("ConnectionPolicySid", *params.ConnectionPolicySid) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.FromDomainSid != nil { + data.Set("FromDomainSid", *params.FromDomainSid) +} + if params != nil && params.StatusCallbackMethod != nil { + data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) +} + if params != nil && params.StatusCallbackUrl != nil { + data.Set("StatusCallbackUrl", *params.StatusCallbackUrl) +} + if params != nil && params.VoiceFallbackMethod != nil { + data.Set("VoiceFallbackMethod", *params.VoiceFallbackMethod) +} + if params != nil && params.VoiceFallbackUrl != nil { + data.Set("VoiceFallbackUrl", *params.VoiceFallbackUrl) +} + if params != nil && params.VoiceMethod != nil { + data.Set("VoiceMethod", *params.VoiceMethod) +} + if params != nil && params.VoiceUrl != nil { + data.Set("VoiceUrl", *params.VoiceUrl) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &VoiceV1ByocTrunk{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &VoiceV1ByocTrunk{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateConnectionPolicyParams Optional parameters for the method 'CreateConnectionPolicy' type CreateConnectionPolicyParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` @@ -123,39 +122,39 @@ type CreateConnectionPolicyParams struct { * @param optional nil or *CreateConnectionPolicyParams - Optional Parameters: * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. * @return VoiceV1ConnectionPolicy - */ +*/ func (c *DefaultApiService) CreateConnectionPolicy(params *CreateConnectionPolicyParams) (*VoiceV1ConnectionPolicy, error) { - path := "/v1/ConnectionPolicies" + path := "/v1/ConnectionPolicies" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &VoiceV1ConnectionPolicy{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &VoiceV1ConnectionPolicy{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateConnectionPolicyTargetParams Optional parameters for the method 'CreateConnectionPolicyTarget' type CreateConnectionPolicyTargetParams struct { - Enabled *bool `json:"Enabled,omitempty"` + Enabled *bool `json:"Enabled,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` - Priority *int32 `json:"Priority,omitempty"` - Target *string `json:"Target,omitempty"` - Weight *int32 `json:"Weight,omitempty"` + Priority *int32 `json:"Priority,omitempty"` + Target *string `json:"Target,omitempty"` + Weight *int32 `json:"Weight,omitempty"` } /* @@ -168,45 +167,45 @@ type CreateConnectionPolicyTargetParams struct { * @param "Target" (string) - The SIP address you want Twilio to route your calls to. This must be a `sip:` schema. `sips` is NOT supported. * @param "Weight" (int32) - The value that determines the relative share of the load the Target should receive compared to other Targets with the same priority. Can be an integer from 1 to 65535, inclusive, and the default is 10. Targets with higher values receive more load than those with lower ones with the same priority. * @return VoiceV1ConnectionPolicyConnectionPolicyTarget - */ +*/ func (c *DefaultApiService) CreateConnectionPolicyTarget(ConnectionPolicySid string, params *CreateConnectionPolicyTargetParams) (*VoiceV1ConnectionPolicyConnectionPolicyTarget, error) { - path := "/v1/ConnectionPolicies/{ConnectionPolicySid}/Targets" + path := "/v1/ConnectionPolicies/{ConnectionPolicySid}/Targets" path = strings.Replace(path, "{"+"ConnectionPolicySid"+"}", ConnectionPolicySid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Enabled != nil { - data.Set("Enabled", fmt.Sprint(*params.Enabled)) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.Priority != nil { - data.Set("Priority", fmt.Sprint(*params.Priority)) - } - if params != nil && params.Target != nil { - data.Set("Target", *params.Target) - } - if params != nil && params.Weight != nil { - data.Set("Weight", fmt.Sprint(*params.Weight)) - } + if params != nil && params.Enabled != nil { + data.Set("Enabled", fmt.Sprint(*params.Enabled)) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.Priority != nil { + data.Set("Priority", fmt.Sprint(*params.Priority)) +} + if params != nil && params.Target != nil { + data.Set("Target", *params.Target) +} + if params != nil && params.Weight != nil { + data.Set("Weight", fmt.Sprint(*params.Weight)) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &VoiceV1ConnectionPolicyConnectionPolicyTarget{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &VoiceV1ConnectionPolicyConnectionPolicyTarget{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateDialingPermissionsCountryBulkUpdateParams Optional parameters for the method 'CreateDialingPermissionsCountryBulkUpdate' type CreateDialingPermissionsCountryBulkUpdateParams struct { UpdateRequest *string `json:"UpdateRequest,omitempty"` @@ -218,37 +217,37 @@ type CreateDialingPermissionsCountryBulkUpdateParams struct { * @param optional nil or *CreateDialingPermissionsCountryBulkUpdateParams - Optional Parameters: * @param "UpdateRequest" (string) - URL encoded JSON array of update objects. example : `[ { \\\"iso_code\\\": \\\"GB\\\", \\\"low_risk_numbers_enabled\\\": \\\"true\\\", \\\"high_risk_special_numbers_enabled\\\":\\\"true\\\", \\\"high_risk_tollfraud_numbers_enabled\\\": \\\"false\\\" } ]` * @return VoiceV1DialingPermissionsDialingPermissionsCountryBulkUpdate - */ +*/ func (c *DefaultApiService) CreateDialingPermissionsCountryBulkUpdate(params *CreateDialingPermissionsCountryBulkUpdateParams) (*VoiceV1DialingPermissionsDialingPermissionsCountryBulkUpdate, error) { - path := "/v1/DialingPermissions/BulkCountryUpdates" + path := "/v1/DialingPermissions/BulkCountryUpdates" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.UpdateRequest != nil { - data.Set("UpdateRequest", *params.UpdateRequest) - } + if params != nil && params.UpdateRequest != nil { + data.Set("UpdateRequest", *params.UpdateRequest) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &VoiceV1DialingPermissionsDialingPermissionsCountryBulkUpdate{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &VoiceV1DialingPermissionsDialingPermissionsCountryBulkUpdate{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateIpRecordParams Optional parameters for the method 'CreateIpRecord' type CreateIpRecordParams struct { - CidrPrefixLength *int32 `json:"CidrPrefixLength,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - IpAddress *string `json:"IpAddress,omitempty"` + CidrPrefixLength *int32 `json:"CidrPrefixLength,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + IpAddress *string `json:"IpAddress,omitempty"` } /* @@ -258,41 +257,41 @@ type CreateIpRecordParams struct { * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. * @param "IpAddress" (string) - An IP address in dotted decimal notation, IPv4 only. * @return VoiceV1IpRecord - */ +*/ func (c *DefaultApiService) CreateIpRecord(params *CreateIpRecordParams) (*VoiceV1IpRecord, error) { - path := "/v1/IpRecords" + path := "/v1/IpRecords" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.CidrPrefixLength != nil { - data.Set("CidrPrefixLength", fmt.Sprint(*params.CidrPrefixLength)) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.IpAddress != nil { - data.Set("IpAddress", *params.IpAddress) - } + if params != nil && params.CidrPrefixLength != nil { + data.Set("CidrPrefixLength", fmt.Sprint(*params.CidrPrefixLength)) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.IpAddress != nil { + data.Set("IpAddress", *params.IpAddress) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &VoiceV1IpRecord{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &VoiceV1IpRecord{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateSourceIpMappingParams Optional parameters for the method 'CreateSourceIpMapping' type CreateSourceIpMappingParams struct { - IpRecordSid *string `json:"IpRecordSid,omitempty"` + IpRecordSid *string `json:"IpRecordSid,omitempty"` SipDomainSid *string `json:"SipDomainSid,omitempty"` } @@ -302,194 +301,209 @@ type CreateSourceIpMappingParams struct { * @param "IpRecordSid" (string) - The Twilio-provided string that uniquely identifies the IP Record resource to map from. * @param "SipDomainSid" (string) - The SID of the SIP Domain that the IP Record should be mapped to. * @return VoiceV1SourceIpMapping - */ +*/ func (c *DefaultApiService) CreateSourceIpMapping(params *CreateSourceIpMappingParams) (*VoiceV1SourceIpMapping, error) { - path := "/v1/SourceIpMappings" + path := "/v1/SourceIpMappings" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.IpRecordSid != nil { - data.Set("IpRecordSid", *params.IpRecordSid) - } - if params != nil && params.SipDomainSid != nil { - data.Set("SipDomainSid", *params.SipDomainSid) - } + if params != nil && params.IpRecordSid != nil { + data.Set("IpRecordSid", *params.IpRecordSid) +} + if params != nil && params.SipDomainSid != nil { + data.Set("SipDomainSid", *params.SipDomainSid) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &VoiceV1SourceIpMapping{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err + ps := &VoiceV1SourceIpMapping{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* * DeleteByocTrunk Method for DeleteByocTrunk * @param Sid The Twilio-provided string that uniquely identifies the BYOC Trunk resource to delete. - */ -func (c *DefaultApiService) DeleteByocTrunk(Sid string) error { - path := "/v1/ByocTrunks/{Sid}" +*/ +func (c *DefaultApiService) DeleteByocTrunk(Sid string, ) (error) { + path := "/v1/ByocTrunks/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - return nil + defer resp.Body.Close() + + return nil } /* * DeleteConnectionPolicy Method for DeleteConnectionPolicy * @param Sid The unique string that we created to identify the Connection Policy resource to delete. - */ -func (c *DefaultApiService) DeleteConnectionPolicy(Sid string) error { - path := "/v1/ConnectionPolicies/{Sid}" +*/ +func (c *DefaultApiService) DeleteConnectionPolicy(Sid string, ) (error) { + path := "/v1/ConnectionPolicies/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* * DeleteConnectionPolicyTarget Method for DeleteConnectionPolicyTarget * @param ConnectionPolicySid The SID of the Connection Policy that owns the Target. * @param Sid The unique string that we created to identify the Target resource to delete. - */ -func (c *DefaultApiService) DeleteConnectionPolicyTarget(ConnectionPolicySid string, Sid string) error { - path := "/v1/ConnectionPolicies/{ConnectionPolicySid}/Targets/{Sid}" +*/ +func (c *DefaultApiService) DeleteConnectionPolicyTarget(ConnectionPolicySid string, Sid string, ) (error) { + path := "/v1/ConnectionPolicies/{ConnectionPolicySid}/Targets/{Sid}" path = strings.Replace(path, "{"+"ConnectionPolicySid"+"}", ConnectionPolicySid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* * DeleteIpRecord Method for DeleteIpRecord * @param Sid The Twilio-provided string that uniquely identifies the IP Record resource to delete. - */ -func (c *DefaultApiService) DeleteIpRecord(Sid string) error { - path := "/v1/IpRecords/{Sid}" +*/ +func (c *DefaultApiService) DeleteIpRecord(Sid string, ) (error) { + path := "/v1/IpRecords/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - return nil + defer resp.Body.Close() + + return nil } /* * DeleteSourceIpMapping Method for DeleteSourceIpMapping * @param Sid The Twilio-provided string that uniquely identifies the IP Record resource to delete. - */ -func (c *DefaultApiService) DeleteSourceIpMapping(Sid string) error { - path := "/v1/SourceIpMappings/{Sid}" +*/ +func (c *DefaultApiService) DeleteSourceIpMapping(Sid string, ) (error) { + path := "/v1/SourceIpMappings/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* * FetchByocTrunk Method for FetchByocTrunk * @param Sid The Twilio-provided string that uniquely identifies the BYOC Trunk resource to fetch. * @return VoiceV1ByocTrunk - */ -func (c *DefaultApiService) FetchByocTrunk(Sid string) (*VoiceV1ByocTrunk, error) { - path := "/v1/ByocTrunks/{Sid}" +*/ +func (c *DefaultApiService) FetchByocTrunk(Sid string, ) (*VoiceV1ByocTrunk, error) { + path := "/v1/ByocTrunks/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &VoiceV1ByocTrunk{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &VoiceV1ByocTrunk{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* * FetchConnectionPolicy Method for FetchConnectionPolicy * @param Sid The unique string that we created to identify the Connection Policy resource to fetch. * @return VoiceV1ConnectionPolicy - */ -func (c *DefaultApiService) FetchConnectionPolicy(Sid string) (*VoiceV1ConnectionPolicy, error) { - path := "/v1/ConnectionPolicies/{Sid}" +*/ +func (c *DefaultApiService) FetchConnectionPolicy(Sid string, ) (*VoiceV1ConnectionPolicy, error) { + path := "/v1/ConnectionPolicies/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &VoiceV1ConnectionPolicy{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &VoiceV1ConnectionPolicy{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -497,28 +511,30 @@ func (c *DefaultApiService) FetchConnectionPolicy(Sid string) (*VoiceV1Connectio * @param ConnectionPolicySid The SID of the Connection Policy that owns the Target. * @param Sid The unique string that we created to identify the Target resource to fetch. * @return VoiceV1ConnectionPolicyConnectionPolicyTarget - */ -func (c *DefaultApiService) FetchConnectionPolicyTarget(ConnectionPolicySid string, Sid string) (*VoiceV1ConnectionPolicyConnectionPolicyTarget, error) { - path := "/v1/ConnectionPolicies/{ConnectionPolicySid}/Targets/{Sid}" +*/ +func (c *DefaultApiService) FetchConnectionPolicyTarget(ConnectionPolicySid string, Sid string, ) (*VoiceV1ConnectionPolicyConnectionPolicyTarget, error) { + path := "/v1/ConnectionPolicies/{ConnectionPolicySid}/Targets/{Sid}" path = strings.Replace(path, "{"+"ConnectionPolicySid"+"}", ConnectionPolicySid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &VoiceV1ConnectionPolicyConnectionPolicyTarget{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &VoiceV1ConnectionPolicyConnectionPolicyTarget{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -526,109 +542,116 @@ func (c *DefaultApiService) FetchConnectionPolicyTarget(ConnectionPolicySid stri * Retrieve voice dialing country permissions identified by the given ISO country code * @param IsoCode The [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the DialingPermissions Country resource to fetch * @return VoiceV1DialingPermissionsDialingPermissionsCountryInstance - */ -func (c *DefaultApiService) FetchDialingPermissionsCountry(IsoCode string) (*VoiceV1DialingPermissionsDialingPermissionsCountryInstance, error) { - path := "/v1/DialingPermissions/Countries/{IsoCode}" +*/ +func (c *DefaultApiService) FetchDialingPermissionsCountry(IsoCode string, ) (*VoiceV1DialingPermissionsDialingPermissionsCountryInstance, error) { + path := "/v1/DialingPermissions/Countries/{IsoCode}" path = strings.Replace(path, "{"+"IsoCode"+"}", IsoCode, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &VoiceV1DialingPermissionsDialingPermissionsCountryInstance{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VoiceV1DialingPermissionsDialingPermissionsCountryInstance{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * FetchDialingPermissionsSettings Method for FetchDialingPermissionsSettings * Retrieve voice dialing permissions inheritance for the sub-account * @return VoiceV1DialingPermissionsDialingPermissionsSettings - */ +*/ func (c *DefaultApiService) FetchDialingPermissionsSettings() (*VoiceV1DialingPermissionsDialingPermissionsSettings, error) { - path := "/v1/Settings" + path := "/v1/Settings" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &VoiceV1DialingPermissionsDialingPermissionsSettings{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VoiceV1DialingPermissionsDialingPermissionsSettings{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * FetchIpRecord Method for FetchIpRecord * @param Sid The Twilio-provided string that uniquely identifies the IP Record resource to fetch. * @return VoiceV1IpRecord - */ -func (c *DefaultApiService) FetchIpRecord(Sid string) (*VoiceV1IpRecord, error) { - path := "/v1/IpRecords/{Sid}" +*/ +func (c *DefaultApiService) FetchIpRecord(Sid string, ) (*VoiceV1IpRecord, error) { + path := "/v1/IpRecords/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &VoiceV1IpRecord{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &VoiceV1IpRecord{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* * FetchSourceIpMapping Method for FetchSourceIpMapping * @param Sid The Twilio-provided string that uniquely identifies the IP Record resource to fetch. * @return VoiceV1SourceIpMapping - */ -func (c *DefaultApiService) FetchSourceIpMapping(Sid string) (*VoiceV1SourceIpMapping, error) { - path := "/v1/SourceIpMappings/{Sid}" +*/ +func (c *DefaultApiService) FetchSourceIpMapping(Sid string, ) (*VoiceV1SourceIpMapping, error) { + path := "/v1/SourceIpMappings/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &VoiceV1SourceIpMapping{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err -} + defer resp.Body.Close() + ps := &VoiceV1SourceIpMapping{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} // ListByocTrunkParams Optional parameters for the method 'ListByocTrunk' type ListByocTrunkParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -639,32 +662,32 @@ type ListByocTrunkParams struct { * @param optional nil or *ListByocTrunkParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListByocTrunkResponse - */ +*/ func (c *DefaultApiService) ListByocTrunk(params *ListByocTrunkParams) (*ListByocTrunkResponse, error) { - path := "/v1/ByocTrunks" + path := "/v1/ByocTrunks" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListByocTrunkResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListByocTrunkResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListConnectionPolicyParams Optional parameters for the method 'ListConnectionPolicy' type ListConnectionPolicyParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -675,32 +698,32 @@ type ListConnectionPolicyParams struct { * @param optional nil or *ListConnectionPolicyParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListConnectionPolicyResponse - */ +*/ func (c *DefaultApiService) ListConnectionPolicy(params *ListConnectionPolicyParams) (*ListConnectionPolicyResponse, error) { - path := "/v1/ConnectionPolicies" + path := "/v1/ConnectionPolicies" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListConnectionPolicyResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListConnectionPolicyResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListConnectionPolicyTargetParams Optional parameters for the method 'ListConnectionPolicyTarget' type ListConnectionPolicyTargetParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -712,42 +735,42 @@ type ListConnectionPolicyTargetParams struct { * @param optional nil or *ListConnectionPolicyTargetParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListConnectionPolicyTargetResponse - */ +*/ func (c *DefaultApiService) ListConnectionPolicyTarget(ConnectionPolicySid string, params *ListConnectionPolicyTargetParams) (*ListConnectionPolicyTargetResponse, error) { - path := "/v1/ConnectionPolicies/{ConnectionPolicySid}/Targets" + path := "/v1/ConnectionPolicies/{ConnectionPolicySid}/Targets" path = strings.Replace(path, "{"+"ConnectionPolicySid"+"}", ConnectionPolicySid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListConnectionPolicyTargetResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListConnectionPolicyTargetResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListDialingPermissionsCountryParams Optional parameters for the method 'ListDialingPermissionsCountry' type ListDialingPermissionsCountryParams struct { - IsoCode *string `json:"IsoCode,omitempty"` - Continent *string `json:"Continent,omitempty"` - CountryCode *string `json:"CountryCode,omitempty"` - LowRiskNumbersEnabled *bool `json:"LowRiskNumbersEnabled,omitempty"` - HighRiskSpecialNumbersEnabled *bool `json:"HighRiskSpecialNumbersEnabled,omitempty"` - HighRiskTollfraudNumbersEnabled *bool `json:"HighRiskTollfraudNumbersEnabled,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + IsoCode *string `json:"IsoCode,omitempty"` + Continent *string `json:"Continent,omitempty"` + CountryCode *string `json:"CountryCode,omitempty"` + LowRiskNumbersEnabled *bool `json:"LowRiskNumbersEnabled,omitempty"` + HighRiskSpecialNumbersEnabled *bool `json:"HighRiskSpecialNumbersEnabled,omitempty"` + HighRiskTollfraudNumbersEnabled *bool `json:"HighRiskTollfraudNumbersEnabled,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -762,50 +785,50 @@ type ListDialingPermissionsCountryParams struct { * @param "HighRiskTollfraudNumbersEnabled" (bool) - Filter to retrieve the country permissions with dialing to high-risk [toll fraud](https://www.twilio.com/learn/voice-and-video/toll-fraud) numbers enabled. Can be: `true` or `false`. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListDialingPermissionsCountryResponse - */ +*/ func (c *DefaultApiService) ListDialingPermissionsCountry(params *ListDialingPermissionsCountryParams) (*ListDialingPermissionsCountryResponse, error) { - path := "/v1/DialingPermissions/Countries" + path := "/v1/DialingPermissions/Countries" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.IsoCode != nil { - data.Set("IsoCode", *params.IsoCode) - } - if params != nil && params.Continent != nil { - data.Set("Continent", *params.Continent) - } - if params != nil && params.CountryCode != nil { - data.Set("CountryCode", *params.CountryCode) - } - if params != nil && params.LowRiskNumbersEnabled != nil { - data.Set("LowRiskNumbersEnabled", fmt.Sprint(*params.LowRiskNumbersEnabled)) - } - if params != nil && params.HighRiskSpecialNumbersEnabled != nil { - data.Set("HighRiskSpecialNumbersEnabled", fmt.Sprint(*params.HighRiskSpecialNumbersEnabled)) - } - if params != nil && params.HighRiskTollfraudNumbersEnabled != nil { - data.Set("HighRiskTollfraudNumbersEnabled", fmt.Sprint(*params.HighRiskTollfraudNumbersEnabled)) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.IsoCode != nil { + data.Set("IsoCode", *params.IsoCode) +} + if params != nil && params.Continent != nil { + data.Set("Continent", *params.Continent) +} + if params != nil && params.CountryCode != nil { + data.Set("CountryCode", *params.CountryCode) +} + if params != nil && params.LowRiskNumbersEnabled != nil { + data.Set("LowRiskNumbersEnabled", fmt.Sprint(*params.LowRiskNumbersEnabled)) +} + if params != nil && params.HighRiskSpecialNumbersEnabled != nil { + data.Set("HighRiskSpecialNumbersEnabled", fmt.Sprint(*params.HighRiskSpecialNumbersEnabled)) +} + if params != nil && params.HighRiskTollfraudNumbersEnabled != nil { + data.Set("HighRiskTollfraudNumbersEnabled", fmt.Sprint(*params.HighRiskTollfraudNumbersEnabled)) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListDialingPermissionsCountryResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListDialingPermissionsCountryResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListDialingPermissionsHrsPrefixesParams Optional parameters for the method 'ListDialingPermissionsHrsPrefixes' type ListDialingPermissionsHrsPrefixesParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -818,33 +841,33 @@ type ListDialingPermissionsHrsPrefixesParams struct { * @param optional nil or *ListDialingPermissionsHrsPrefixesParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListDialingPermissionsHrsPrefixesResponse - */ +*/ func (c *DefaultApiService) ListDialingPermissionsHrsPrefixes(IsoCode string, params *ListDialingPermissionsHrsPrefixesParams) (*ListDialingPermissionsHrsPrefixesResponse, error) { - path := "/v1/DialingPermissions/Countries/{IsoCode}/HighRiskSpecialPrefixes" + path := "/v1/DialingPermissions/Countries/{IsoCode}/HighRiskSpecialPrefixes" path = strings.Replace(path, "{"+"IsoCode"+"}", IsoCode, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListDialingPermissionsHrsPrefixesResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListDialingPermissionsHrsPrefixesResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListIpRecordParams Optional parameters for the method 'ListIpRecord' type ListIpRecordParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -855,32 +878,32 @@ type ListIpRecordParams struct { * @param optional nil or *ListIpRecordParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListIpRecordResponse - */ +*/ func (c *DefaultApiService) ListIpRecord(params *ListIpRecordParams) (*ListIpRecordResponse, error) { - path := "/v1/IpRecords" + path := "/v1/IpRecords" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListIpRecordResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListIpRecordResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListSourceIpMappingParams Optional parameters for the method 'ListSourceIpMapping' type ListSourceIpMappingParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -891,44 +914,44 @@ type ListSourceIpMappingParams struct { * @param optional nil or *ListSourceIpMappingParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListSourceIpMappingResponse - */ +*/ func (c *DefaultApiService) ListSourceIpMapping(params *ListSourceIpMappingParams) (*ListSourceIpMappingResponse, error) { - path := "/v1/SourceIpMappings" + path := "/v1/SourceIpMappings" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListSourceIpMappingResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListSourceIpMappingResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateByocTrunkParams Optional parameters for the method 'UpdateByocTrunk' type UpdateByocTrunkParams struct { - CnamLookupEnabled *bool `json:"CnamLookupEnabled,omitempty"` - ConnectionPolicySid *string `json:"ConnectionPolicySid,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - FromDomainSid *string `json:"FromDomainSid,omitempty"` + CnamLookupEnabled *bool `json:"CnamLookupEnabled,omitempty"` + ConnectionPolicySid *string `json:"ConnectionPolicySid,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + FromDomainSid *string `json:"FromDomainSid,omitempty"` StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` - StatusCallbackUrl *string `json:"StatusCallbackUrl,omitempty"` - VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"` - VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` - VoiceMethod *string `json:"VoiceMethod,omitempty"` - VoiceUrl *string `json:"VoiceUrl,omitempty"` + StatusCallbackUrl *string `json:"StatusCallbackUrl,omitempty"` + VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"` + VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` + VoiceMethod *string `json:"VoiceMethod,omitempty"` + VoiceUrl *string `json:"VoiceUrl,omitempty"` } /* @@ -946,60 +969,60 @@ type UpdateByocTrunkParams struct { * @param "VoiceMethod" (string) - The HTTP method we should use to call `voice_url` * @param "VoiceUrl" (string) - The URL we should call when the BYOC Trunk receives a call. * @return VoiceV1ByocTrunk - */ +*/ func (c *DefaultApiService) UpdateByocTrunk(Sid string, params *UpdateByocTrunkParams) (*VoiceV1ByocTrunk, error) { - path := "/v1/ByocTrunks/{Sid}" + path := "/v1/ByocTrunks/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.CnamLookupEnabled != nil { - data.Set("CnamLookupEnabled", fmt.Sprint(*params.CnamLookupEnabled)) - } - if params != nil && params.ConnectionPolicySid != nil { - data.Set("ConnectionPolicySid", *params.ConnectionPolicySid) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.FromDomainSid != nil { - data.Set("FromDomainSid", *params.FromDomainSid) - } - if params != nil && params.StatusCallbackMethod != nil { - data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) - } - if params != nil && params.StatusCallbackUrl != nil { - data.Set("StatusCallbackUrl", *params.StatusCallbackUrl) - } - if params != nil && params.VoiceFallbackMethod != nil { - data.Set("VoiceFallbackMethod", *params.VoiceFallbackMethod) - } - if params != nil && params.VoiceFallbackUrl != nil { - data.Set("VoiceFallbackUrl", *params.VoiceFallbackUrl) - } - if params != nil && params.VoiceMethod != nil { - data.Set("VoiceMethod", *params.VoiceMethod) - } - if params != nil && params.VoiceUrl != nil { - data.Set("VoiceUrl", *params.VoiceUrl) - } + if params != nil && params.CnamLookupEnabled != nil { + data.Set("CnamLookupEnabled", fmt.Sprint(*params.CnamLookupEnabled)) +} + if params != nil && params.ConnectionPolicySid != nil { + data.Set("ConnectionPolicySid", *params.ConnectionPolicySid) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.FromDomainSid != nil { + data.Set("FromDomainSid", *params.FromDomainSid) +} + if params != nil && params.StatusCallbackMethod != nil { + data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) +} + if params != nil && params.StatusCallbackUrl != nil { + data.Set("StatusCallbackUrl", *params.StatusCallbackUrl) +} + if params != nil && params.VoiceFallbackMethod != nil { + data.Set("VoiceFallbackMethod", *params.VoiceFallbackMethod) +} + if params != nil && params.VoiceFallbackUrl != nil { + data.Set("VoiceFallbackUrl", *params.VoiceFallbackUrl) +} + if params != nil && params.VoiceMethod != nil { + data.Set("VoiceMethod", *params.VoiceMethod) +} + if params != nil && params.VoiceUrl != nil { + data.Set("VoiceUrl", *params.VoiceUrl) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &VoiceV1ByocTrunk{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &VoiceV1ByocTrunk{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateConnectionPolicyParams Optional parameters for the method 'UpdateConnectionPolicy' type UpdateConnectionPolicyParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` @@ -1011,40 +1034,40 @@ type UpdateConnectionPolicyParams struct { * @param optional nil or *UpdateConnectionPolicyParams - Optional Parameters: * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. * @return VoiceV1ConnectionPolicy - */ +*/ func (c *DefaultApiService) UpdateConnectionPolicy(Sid string, params *UpdateConnectionPolicyParams) (*VoiceV1ConnectionPolicy, error) { - path := "/v1/ConnectionPolicies/{Sid}" + path := "/v1/ConnectionPolicies/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &VoiceV1ConnectionPolicy{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &VoiceV1ConnectionPolicy{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateConnectionPolicyTargetParams Optional parameters for the method 'UpdateConnectionPolicyTarget' type UpdateConnectionPolicyTargetParams struct { - Enabled *bool `json:"Enabled,omitempty"` + Enabled *bool `json:"Enabled,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` - Priority *int32 `json:"Priority,omitempty"` - Target *string `json:"Target,omitempty"` - Weight *int32 `json:"Weight,omitempty"` + Priority *int32 `json:"Priority,omitempty"` + Target *string `json:"Target,omitempty"` + Weight *int32 `json:"Weight,omitempty"` } /* @@ -1058,46 +1081,46 @@ type UpdateConnectionPolicyTargetParams struct { * @param "Target" (string) - The SIP address you want Twilio to route your calls to. This must be a `sip:` schema. `sips` is NOT supported. * @param "Weight" (int32) - The value that determines the relative share of the load the Target should receive compared to other Targets with the same priority. Can be an integer from 1 to 65535, inclusive. Targets with higher values receive more load than those with lower ones with the same priority. * @return VoiceV1ConnectionPolicyConnectionPolicyTarget - */ +*/ func (c *DefaultApiService) UpdateConnectionPolicyTarget(ConnectionPolicySid string, Sid string, params *UpdateConnectionPolicyTargetParams) (*VoiceV1ConnectionPolicyConnectionPolicyTarget, error) { - path := "/v1/ConnectionPolicies/{ConnectionPolicySid}/Targets/{Sid}" + path := "/v1/ConnectionPolicies/{ConnectionPolicySid}/Targets/{Sid}" path = strings.Replace(path, "{"+"ConnectionPolicySid"+"}", ConnectionPolicySid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Enabled != nil { - data.Set("Enabled", fmt.Sprint(*params.Enabled)) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.Priority != nil { - data.Set("Priority", fmt.Sprint(*params.Priority)) - } - if params != nil && params.Target != nil { - data.Set("Target", *params.Target) - } - if params != nil && params.Weight != nil { - data.Set("Weight", fmt.Sprint(*params.Weight)) - } + if params != nil && params.Enabled != nil { + data.Set("Enabled", fmt.Sprint(*params.Enabled)) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.Priority != nil { + data.Set("Priority", fmt.Sprint(*params.Priority)) +} + if params != nil && params.Target != nil { + data.Set("Target", *params.Target) +} + if params != nil && params.Weight != nil { + data.Set("Weight", fmt.Sprint(*params.Weight)) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &VoiceV1ConnectionPolicyConnectionPolicyTarget{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &VoiceV1ConnectionPolicyConnectionPolicyTarget{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateDialingPermissionsSettingsParams Optional parameters for the method 'UpdateDialingPermissionsSettings' type UpdateDialingPermissionsSettingsParams struct { DialingPermissionsInheritance *bool `json:"DialingPermissionsInheritance,omitempty"` @@ -1109,32 +1132,32 @@ type UpdateDialingPermissionsSettingsParams struct { * @param optional nil or *UpdateDialingPermissionsSettingsParams - Optional Parameters: * @param "DialingPermissionsInheritance" (bool) - `true` for the sub-account to inherit voice dialing permissions from the Master Project; otherwise `false`. * @return VoiceV1DialingPermissionsDialingPermissionsSettings - */ +*/ func (c *DefaultApiService) UpdateDialingPermissionsSettings(params *UpdateDialingPermissionsSettingsParams) (*VoiceV1DialingPermissionsDialingPermissionsSettings, error) { - path := "/v1/Settings" + path := "/v1/Settings" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.DialingPermissionsInheritance != nil { - data.Set("DialingPermissionsInheritance", fmt.Sprint(*params.DialingPermissionsInheritance)) - } + if params != nil && params.DialingPermissionsInheritance != nil { + data.Set("DialingPermissionsInheritance", fmt.Sprint(*params.DialingPermissionsInheritance)) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &VoiceV1DialingPermissionsDialingPermissionsSettings{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &VoiceV1DialingPermissionsDialingPermissionsSettings{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateIpRecordParams Optional parameters for the method 'UpdateIpRecord' type UpdateIpRecordParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` @@ -1146,33 +1169,33 @@ type UpdateIpRecordParams struct { * @param optional nil or *UpdateIpRecordParams - Optional Parameters: * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. * @return VoiceV1IpRecord - */ +*/ func (c *DefaultApiService) UpdateIpRecord(Sid string, params *UpdateIpRecordParams) (*VoiceV1IpRecord, error) { - path := "/v1/IpRecords/{Sid}" + path := "/v1/IpRecords/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &VoiceV1IpRecord{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &VoiceV1IpRecord{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateSourceIpMappingParams Optional parameters for the method 'UpdateSourceIpMapping' type UpdateSourceIpMappingParams struct { SipDomainSid *string `json:"SipDomainSid,omitempty"` @@ -1184,29 +1207,30 @@ type UpdateSourceIpMappingParams struct { * @param optional nil or *UpdateSourceIpMappingParams - Optional Parameters: * @param "SipDomainSid" (string) - The SID of the SIP Domain that the IP Record should be mapped to. * @return VoiceV1SourceIpMapping - */ +*/ func (c *DefaultApiService) UpdateSourceIpMapping(Sid string, params *UpdateSourceIpMappingParams) (*VoiceV1SourceIpMapping, error) { - path := "/v1/SourceIpMappings/{Sid}" + path := "/v1/SourceIpMappings/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.SipDomainSid != nil { - data.Set("SipDomainSid", *params.SipDomainSid) - } + if params != nil && params.SipDomainSid != nil { + data.Set("SipDomainSid", *params.SipDomainSid) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &VoiceV1SourceIpMapping{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() + + ps := &VoiceV1SourceIpMapping{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } diff --git a/twilio/rest/voice/v1/model_list_byoc_trunk_response.go b/twilio/rest/voice/v1/model_list_byoc_trunk_response.go index 1ba87d3d0..3ec613401 100644 --- a/twilio/rest/voice/v1/model_list_byoc_trunk_response.go +++ b/twilio/rest/voice/v1/model_list_byoc_trunk_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Voice - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Voice + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListByocTrunkResponse struct for ListByocTrunkResponse type ListByocTrunkResponse struct { - ByocTrunks []VoiceV1ByocTrunk `json:"ByocTrunks,omitempty"` - Meta ListByocTrunkResponseMeta `json:"Meta,omitempty"` + ByocTrunks []VoiceV1ByocTrunk `json:"ByocTrunks,omitempty"` + Meta ListByocTrunkResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/voice/v1/model_list_byoc_trunk_response_meta.go b/twilio/rest/voice/v1/model_list_byoc_trunk_response_meta.go index da59c318a..19c6e52fb 100644 --- a/twilio/rest/voice/v1/model_list_byoc_trunk_response_meta.go +++ b/twilio/rest/voice/v1/model_list_byoc_trunk_response_meta.go @@ -1,23 +1,22 @@ /* - * Twilio - Voice - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Voice + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListByocTrunkResponseMeta struct for ListByocTrunkResponseMeta type ListByocTrunkResponseMeta struct { - FirstPageUrl string `json:"FirstPageUrl,omitempty"` - Key string `json:"Key,omitempty"` - NextPageUrl string `json:"NextPageUrl,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` - Url string `json:"Url,omitempty"` + Url string `json:"Url,omitempty"` } diff --git a/twilio/rest/voice/v1/model_list_connection_policy_response.go b/twilio/rest/voice/v1/model_list_connection_policy_response.go index 2d6974a15..24cf1caf4 100644 --- a/twilio/rest/voice/v1/model_list_connection_policy_response.go +++ b/twilio/rest/voice/v1/model_list_connection_policy_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Voice - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Voice + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListConnectionPolicyResponse struct for ListConnectionPolicyResponse type ListConnectionPolicyResponse struct { ConnectionPolicies []VoiceV1ConnectionPolicy `json:"ConnectionPolicies,omitempty"` - Meta ListByocTrunkResponseMeta `json:"Meta,omitempty"` + Meta ListByocTrunkResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/voice/v1/model_list_connection_policy_target_response.go b/twilio/rest/voice/v1/model_list_connection_policy_target_response.go index 42ebf77c7..1726cc2e5 100644 --- a/twilio/rest/voice/v1/model_list_connection_policy_target_response.go +++ b/twilio/rest/voice/v1/model_list_connection_policy_target_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Voice - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Voice + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListConnectionPolicyTargetResponse struct for ListConnectionPolicyTargetResponse type ListConnectionPolicyTargetResponse struct { - Meta ListByocTrunkResponseMeta `json:"Meta,omitempty"` + Meta ListByocTrunkResponseMeta `json:"Meta,omitempty"` Targets []VoiceV1ConnectionPolicyConnectionPolicyTarget `json:"Targets,omitempty"` } diff --git a/twilio/rest/voice/v1/model_list_dialing_permissions_country_response.go b/twilio/rest/voice/v1/model_list_dialing_permissions_country_response.go index d52acae56..10aeb5945 100644 --- a/twilio/rest/voice/v1/model_list_dialing_permissions_country_response.go +++ b/twilio/rest/voice/v1/model_list_dialing_permissions_country_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Voice - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Voice + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListDialingPermissionsCountryResponse struct for ListDialingPermissionsCountryResponse type ListDialingPermissionsCountryResponse struct { Content []VoiceV1DialingPermissionsDialingPermissionsCountry `json:"Content,omitempty"` - Meta ListByocTrunkResponseMeta `json:"Meta,omitempty"` + Meta ListByocTrunkResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/voice/v1/model_list_dialing_permissions_hrs_prefixes_response.go b/twilio/rest/voice/v1/model_list_dialing_permissions_hrs_prefixes_response.go index b10db145b..db038acf4 100644 --- a/twilio/rest/voice/v1/model_list_dialing_permissions_hrs_prefixes_response.go +++ b/twilio/rest/voice/v1/model_list_dialing_permissions_hrs_prefixes_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Voice - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Voice + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListDialingPermissionsHrsPrefixesResponse struct for ListDialingPermissionsHrsPrefixesResponse type ListDialingPermissionsHrsPrefixesResponse struct { Content []VoiceV1DialingPermissionsDialingPermissionsCountryDialingPermissionsHrsPrefixes `json:"Content,omitempty"` - Meta ListByocTrunkResponseMeta `json:"Meta,omitempty"` + Meta ListByocTrunkResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/voice/v1/model_list_ip_record_response.go b/twilio/rest/voice/v1/model_list_ip_record_response.go index a153141e8..8edf9aec8 100644 --- a/twilio/rest/voice/v1/model_list_ip_record_response.go +++ b/twilio/rest/voice/v1/model_list_ip_record_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Voice - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Voice + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListIpRecordResponse struct for ListIpRecordResponse type ListIpRecordResponse struct { - IpRecords []VoiceV1IpRecord `json:"IpRecords,omitempty"` - Meta ListByocTrunkResponseMeta `json:"Meta,omitempty"` + IpRecords []VoiceV1IpRecord `json:"IpRecords,omitempty"` + Meta ListByocTrunkResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/voice/v1/model_list_source_ip_mapping_response.go b/twilio/rest/voice/v1/model_list_source_ip_mapping_response.go index 40ff6d9c9..8e712ff34 100644 --- a/twilio/rest/voice/v1/model_list_source_ip_mapping_response.go +++ b/twilio/rest/voice/v1/model_list_source_ip_mapping_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Voice - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Voice + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListSourceIpMappingResponse struct for ListSourceIpMappingResponse type ListSourceIpMappingResponse struct { - Meta ListByocTrunkResponseMeta `json:"Meta,omitempty"` - SourceIpMappings []VoiceV1SourceIpMapping `json:"SourceIpMappings,omitempty"` + Meta ListByocTrunkResponseMeta `json:"Meta,omitempty"` + SourceIpMappings []VoiceV1SourceIpMapping `json:"SourceIpMappings,omitempty"` } diff --git a/twilio/rest/voice/v1/model_voice_v1_byoc_trunk.go b/twilio/rest/voice/v1/model_voice_v1_byoc_trunk.go index 5fe758965..786bc78e1 100644 --- a/twilio/rest/voice/v1/model_voice_v1_byoc_trunk.go +++ b/twilio/rest/voice/v1/model_voice_v1_byoc_trunk.go @@ -1,20 +1,18 @@ /* - * Twilio - Voice - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Voice + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // VoiceV1ByocTrunk struct for VoiceV1ByocTrunk type VoiceV1ByocTrunk struct { // The SID of the Account that created the resource diff --git a/twilio/rest/voice/v1/model_voice_v1_connection_policy.go b/twilio/rest/voice/v1/model_voice_v1_connection_policy.go index 33868920b..8ad95325f 100644 --- a/twilio/rest/voice/v1/model_voice_v1_connection_policy.go +++ b/twilio/rest/voice/v1/model_voice_v1_connection_policy.go @@ -1,20 +1,18 @@ /* - * Twilio - Voice - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Voice + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // VoiceV1ConnectionPolicy struct for VoiceV1ConnectionPolicy type VoiceV1ConnectionPolicy struct { // The SID of the Account that created the resource diff --git a/twilio/rest/voice/v1/model_voice_v1_connection_policy_connection_policy_target.go b/twilio/rest/voice/v1/model_voice_v1_connection_policy_connection_policy_target.go index 80316b507..08f5330b5 100644 --- a/twilio/rest/voice/v1/model_voice_v1_connection_policy_connection_policy_target.go +++ b/twilio/rest/voice/v1/model_voice_v1_connection_policy_connection_policy_target.go @@ -1,20 +1,18 @@ /* - * Twilio - Voice - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Voice + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // VoiceV1ConnectionPolicyConnectionPolicyTarget struct for VoiceV1ConnectionPolicyConnectionPolicyTarget type VoiceV1ConnectionPolicyConnectionPolicyTarget struct { // The SID of the Account that created the resource diff --git a/twilio/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_country.go b/twilio/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_country.go index 972080ae6..bf1e96264 100644 --- a/twilio/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_country.go +++ b/twilio/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_country.go @@ -1,16 +1,15 @@ /* - * Twilio - Voice - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Voice + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // VoiceV1DialingPermissionsDialingPermissionsCountry struct for VoiceV1DialingPermissionsDialingPermissionsCountry type VoiceV1DialingPermissionsDialingPermissionsCountry struct { // The name of the continent in which the country is located diff --git a/twilio/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_country_bulk_update.go b/twilio/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_country_bulk_update.go index 809f28ea4..f2a9c79b1 100644 --- a/twilio/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_country_bulk_update.go +++ b/twilio/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_country_bulk_update.go @@ -1,16 +1,15 @@ /* - * Twilio - Voice - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Voice + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // VoiceV1DialingPermissionsDialingPermissionsCountryBulkUpdate struct for VoiceV1DialingPermissionsDialingPermissionsCountryBulkUpdate type VoiceV1DialingPermissionsDialingPermissionsCountryBulkUpdate struct { // The number of countries updated diff --git a/twilio/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_country_dialing_permissions_hrs_prefixes.go b/twilio/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_country_dialing_permissions_hrs_prefixes.go index b8c566076..f120654fa 100644 --- a/twilio/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_country_dialing_permissions_hrs_prefixes.go +++ b/twilio/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_country_dialing_permissions_hrs_prefixes.go @@ -1,16 +1,15 @@ /* - * Twilio - Voice - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Voice + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // VoiceV1DialingPermissionsDialingPermissionsCountryDialingPermissionsHrsPrefixes struct for VoiceV1DialingPermissionsDialingPermissionsCountryDialingPermissionsHrsPrefixes type VoiceV1DialingPermissionsDialingPermissionsCountryDialingPermissionsHrsPrefixes struct { // A prefix that includes the E.164 assigned country code diff --git a/twilio/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_country_instance.go b/twilio/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_country_instance.go index b53aca6a6..543c137e3 100644 --- a/twilio/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_country_instance.go +++ b/twilio/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_country_instance.go @@ -1,16 +1,15 @@ /* - * Twilio - Voice - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Voice + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // VoiceV1DialingPermissionsDialingPermissionsCountryInstance struct for VoiceV1DialingPermissionsDialingPermissionsCountryInstance type VoiceV1DialingPermissionsDialingPermissionsCountryInstance struct { // The name of the continent in which the country is located diff --git a/twilio/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_settings.go b/twilio/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_settings.go index 0f13ad583..86cfe54d5 100644 --- a/twilio/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_settings.go +++ b/twilio/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_settings.go @@ -1,16 +1,15 @@ /* - * Twilio - Voice - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Voice + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // VoiceV1DialingPermissionsDialingPermissionsSettings struct for VoiceV1DialingPermissionsDialingPermissionsSettings type VoiceV1DialingPermissionsDialingPermissionsSettings struct { // `true` if the sub-account will inherit voice dialing permissions from the Master Project; otherwise `false` diff --git a/twilio/rest/voice/v1/model_voice_v1_ip_record.go b/twilio/rest/voice/v1/model_voice_v1_ip_record.go index e74167da9..e8e166562 100644 --- a/twilio/rest/voice/v1/model_voice_v1_ip_record.go +++ b/twilio/rest/voice/v1/model_voice_v1_ip_record.go @@ -1,20 +1,18 @@ /* - * Twilio - Voice - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Voice + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // VoiceV1IpRecord struct for VoiceV1IpRecord type VoiceV1IpRecord struct { // The SID of the Account that created the resource diff --git a/twilio/rest/voice/v1/model_voice_v1_source_ip_mapping.go b/twilio/rest/voice/v1/model_voice_v1_source_ip_mapping.go index 9b9399a33..87f6425c2 100644 --- a/twilio/rest/voice/v1/model_voice_v1_source_ip_mapping.go +++ b/twilio/rest/voice/v1/model_voice_v1_source_ip_mapping.go @@ -1,20 +1,18 @@ /* - * Twilio - Voice - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Voice + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // VoiceV1SourceIpMapping struct for VoiceV1SourceIpMapping type VoiceV1SourceIpMapping struct { // The RFC 2822 date and time in GMT that the resource was created diff --git a/twilio/rest/wireless/v1/api_default.go b/twilio/rest/wireless/v1/api_default.go index 06f792ad3..15e427897 100644 --- a/twilio/rest/wireless/v1/api_default.go +++ b/twilio/rest/wireless/v1/api_default.go @@ -1,11 +1,11 @@ /* - * Twilio - Wireless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Wireless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,11 +14,10 @@ package openapi import ( "encoding/json" "fmt" - "net/url" - "strings" - "time" - twilio "github.com/twilio/twilio-go/client" + "net/url" + "strings" + "time" ) type DefaultApiService struct { @@ -27,21 +26,21 @@ type DefaultApiService struct { } func NewDefaultApiService(client *twilio.Client) *DefaultApiService { - return &DefaultApiService{ - client: client, + return &DefaultApiService { + client: client, baseURL: "https://wireless.twilio.com", } } // CreateCommandParams Optional parameters for the method 'CreateCommand' type CreateCommandParams struct { - CallbackMethod *string `json:"CallbackMethod,omitempty"` - CallbackUrl *string `json:"CallbackUrl,omitempty"` - Command *string `json:"Command,omitempty"` - CommandMode *string `json:"CommandMode,omitempty"` - DeliveryReceiptRequested *bool `json:"DeliveryReceiptRequested,omitempty"` - IncludeSid *string `json:"IncludeSid,omitempty"` - Sim *string `json:"Sim,omitempty"` + CallbackMethod *string `json:"CallbackMethod,omitempty"` + CallbackUrl *string `json:"CallbackUrl,omitempty"` + Command *string `json:"Command,omitempty"` + CommandMode *string `json:"CommandMode,omitempty"` + DeliveryReceiptRequested *bool `json:"DeliveryReceiptRequested,omitempty"` + IncludeSid *string `json:"IncludeSid,omitempty"` + Sim *string `json:"Sim,omitempty"` } /* @@ -56,63 +55,63 @@ type CreateCommandParams struct { * @param "IncludeSid" (string) - Whether to include the SID of the command in the message body. Can be: `none`, `start`, or `end`, and the default behavior is `none`. When sending a Command to a SIM in text mode, we can automatically include the SID of the Command in the message body, which could be used to ensure that the device does not process the same Command more than once. A value of `start` will prepend the message with the Command SID, and `end` will append it to the end, separating the Command SID from the message body with a space. The length of the Command SID is included in the 160 character limit so the SMS body must be 128 characters or less before the Command SID is included. * @param "Sim" (string) - The `sid` or `unique_name` of the [SIM](https://www.twilio.com/docs/wireless/api/sim-resource) to send the Command to. * @return WirelessV1Command - */ +*/ func (c *DefaultApiService) CreateCommand(params *CreateCommandParams) (*WirelessV1Command, error) { - path := "/v1/Commands" + path := "/v1/Commands" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.CallbackMethod != nil { - data.Set("CallbackMethod", *params.CallbackMethod) - } - if params != nil && params.CallbackUrl != nil { - data.Set("CallbackUrl", *params.CallbackUrl) - } - if params != nil && params.Command != nil { - data.Set("Command", *params.Command) - } - if params != nil && params.CommandMode != nil { - data.Set("CommandMode", *params.CommandMode) - } - if params != nil && params.DeliveryReceiptRequested != nil { - data.Set("DeliveryReceiptRequested", fmt.Sprint(*params.DeliveryReceiptRequested)) - } - if params != nil && params.IncludeSid != nil { - data.Set("IncludeSid", *params.IncludeSid) - } - if params != nil && params.Sim != nil { - data.Set("Sim", *params.Sim) - } + if params != nil && params.CallbackMethod != nil { + data.Set("CallbackMethod", *params.CallbackMethod) +} + if params != nil && params.CallbackUrl != nil { + data.Set("CallbackUrl", *params.CallbackUrl) +} + if params != nil && params.Command != nil { + data.Set("Command", *params.Command) +} + if params != nil && params.CommandMode != nil { + data.Set("CommandMode", *params.CommandMode) +} + if params != nil && params.DeliveryReceiptRequested != nil { + data.Set("DeliveryReceiptRequested", fmt.Sprint(*params.DeliveryReceiptRequested)) +} + if params != nil && params.IncludeSid != nil { + data.Set("IncludeSid", *params.IncludeSid) +} + if params != nil && params.Sim != nil { + data.Set("Sim", *params.Sim) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &WirelessV1Command{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &WirelessV1Command{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // CreateRatePlanParams Optional parameters for the method 'CreateRatePlan' type CreateRatePlanParams struct { - DataEnabled *bool `json:"DataEnabled,omitempty"` - DataLimit *int32 `json:"DataLimit,omitempty"` - DataMetering *string `json:"DataMetering,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - InternationalRoaming *[]string `json:"InternationalRoaming,omitempty"` - InternationalRoamingDataLimit *int32 `json:"InternationalRoamingDataLimit,omitempty"` - MessagingEnabled *bool `json:"MessagingEnabled,omitempty"` - NationalRoamingDataLimit *int32 `json:"NationalRoamingDataLimit,omitempty"` - NationalRoamingEnabled *bool `json:"NationalRoamingEnabled,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` - VoiceEnabled *bool `json:"VoiceEnabled,omitempty"` + DataEnabled *bool `json:"DataEnabled,omitempty"` + DataLimit *int32 `json:"DataLimit,omitempty"` + DataMetering *string `json:"DataMetering,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + InternationalRoaming *[]string `json:"InternationalRoaming,omitempty"` + InternationalRoamingDataLimit *int32 `json:"InternationalRoamingDataLimit,omitempty"` + MessagingEnabled *bool `json:"MessagingEnabled,omitempty"` + NationalRoamingDataLimit *int32 `json:"NationalRoamingDataLimit,omitempty"` + NationalRoamingEnabled *bool `json:"NationalRoamingEnabled,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` + VoiceEnabled *bool `json:"VoiceEnabled,omitempty"` } /* @@ -130,125 +129,132 @@ type CreateRatePlanParams struct { * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. It can be used in place of the resource's `sid` in the URL to address the resource. * @param "VoiceEnabled" (bool) - Whether SIMs can make and receive voice calls. * @return WirelessV1RatePlan - */ +*/ func (c *DefaultApiService) CreateRatePlan(params *CreateRatePlanParams) (*WirelessV1RatePlan, error) { - path := "/v1/RatePlans" + path := "/v1/RatePlans" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.DataEnabled != nil { - data.Set("DataEnabled", fmt.Sprint(*params.DataEnabled)) - } - if params != nil && params.DataLimit != nil { - data.Set("DataLimit", fmt.Sprint(*params.DataLimit)) - } - if params != nil && params.DataMetering != nil { - data.Set("DataMetering", *params.DataMetering) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.InternationalRoaming != nil { - data.Set("InternationalRoaming", strings.Join(*params.InternationalRoaming, ",")) - } - if params != nil && params.InternationalRoamingDataLimit != nil { - data.Set("InternationalRoamingDataLimit", fmt.Sprint(*params.InternationalRoamingDataLimit)) - } - if params != nil && params.MessagingEnabled != nil { - data.Set("MessagingEnabled", fmt.Sprint(*params.MessagingEnabled)) - } - if params != nil && params.NationalRoamingDataLimit != nil { - data.Set("NationalRoamingDataLimit", fmt.Sprint(*params.NationalRoamingDataLimit)) - } - if params != nil && params.NationalRoamingEnabled != nil { - data.Set("NationalRoamingEnabled", fmt.Sprint(*params.NationalRoamingEnabled)) - } - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) - } - if params != nil && params.VoiceEnabled != nil { - data.Set("VoiceEnabled", fmt.Sprint(*params.VoiceEnabled)) - } + if params != nil && params.DataEnabled != nil { + data.Set("DataEnabled", fmt.Sprint(*params.DataEnabled)) +} + if params != nil && params.DataLimit != nil { + data.Set("DataLimit", fmt.Sprint(*params.DataLimit)) +} + if params != nil && params.DataMetering != nil { + data.Set("DataMetering", *params.DataMetering) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.InternationalRoaming != nil { + data.Set("InternationalRoaming", strings.Join(*params.InternationalRoaming, ",")) +} + if params != nil && params.InternationalRoamingDataLimit != nil { + data.Set("InternationalRoamingDataLimit", fmt.Sprint(*params.InternationalRoamingDataLimit)) +} + if params != nil && params.MessagingEnabled != nil { + data.Set("MessagingEnabled", fmt.Sprint(*params.MessagingEnabled)) +} + if params != nil && params.NationalRoamingDataLimit != nil { + data.Set("NationalRoamingDataLimit", fmt.Sprint(*params.NationalRoamingDataLimit)) +} + if params != nil && params.NationalRoamingEnabled != nil { + data.Set("NationalRoamingEnabled", fmt.Sprint(*params.NationalRoamingEnabled)) +} + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) +} + if params != nil && params.VoiceEnabled != nil { + data.Set("VoiceEnabled", fmt.Sprint(*params.VoiceEnabled)) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &WirelessV1RatePlan{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() + + ps := &WirelessV1RatePlan{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * DeleteCommand Method for DeleteCommand * Delete a Command instance from your account. * @param Sid The SID of the Command resource to delete. - */ -func (c *DefaultApiService) DeleteCommand(Sid string) error { - path := "/v1/Commands/{Sid}" +*/ +func (c *DefaultApiService) DeleteCommand(Sid string, ) (error) { + path := "/v1/Commands/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* * DeleteRatePlan Method for DeleteRatePlan * @param Sid The SID of the RatePlan resource to delete. - */ -func (c *DefaultApiService) DeleteRatePlan(Sid string) error { - path := "/v1/RatePlans/{Sid}" +*/ +func (c *DefaultApiService) DeleteRatePlan(Sid string, ) (error) { + path := "/v1/RatePlans/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* * DeleteSim Method for DeleteSim * Delete a Sim resource on your Account. * @param Sid The SID or the `unique_name` of the Sim resource to delete. - */ -func (c *DefaultApiService) DeleteSim(Sid string) error { - path := "/v1/Sims/{Sid}" +*/ +func (c *DefaultApiService) DeleteSim(Sid string, ) (error) { + path := "/v1/Sims/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - defer resp.Body.Close() - return nil + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil } /* @@ -256,54 +262,58 @@ func (c *DefaultApiService) DeleteSim(Sid string) error { * Fetch a Command instance from your account. * @param Sid The SID of the Command resource to fetch. * @return WirelessV1Command - */ -func (c *DefaultApiService) FetchCommand(Sid string) (*WirelessV1Command, error) { - path := "/v1/Commands/{Sid}" +*/ +func (c *DefaultApiService) FetchCommand(Sid string, ) (*WirelessV1Command, error) { + path := "/v1/Commands/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &WirelessV1Command{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() - return ps, err + ps := &WirelessV1Command{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* * FetchRatePlan Method for FetchRatePlan * @param Sid The SID of the RatePlan resource to fetch. * @return WirelessV1RatePlan - */ -func (c *DefaultApiService) FetchRatePlan(Sid string) (*WirelessV1RatePlan, error) { - path := "/v1/RatePlans/{Sid}" +*/ +func (c *DefaultApiService) FetchRatePlan(Sid string, ) (*WirelessV1RatePlan, error) { + path := "/v1/RatePlans/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &WirelessV1RatePlan{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err + defer resp.Body.Close() + + ps := &WirelessV1RatePlan{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } /* @@ -311,35 +321,36 @@ func (c *DefaultApiService) FetchRatePlan(Sid string) (*WirelessV1RatePlan, erro * Fetch a Sim resource on your Account. * @param Sid The SID or the `unique_name` of the Sim resource to fetch. * @return WirelessV1Sim - */ -func (c *DefaultApiService) FetchSim(Sid string) (*WirelessV1Sim, error) { - path := "/v1/Sims/{Sid}" +*/ +func (c *DefaultApiService) FetchSim(Sid string, ) (*WirelessV1Sim, error) { + path := "/v1/Sims/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() - ps := &WirelessV1Sim{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - return ps, err -} + defer resp.Body.Close() + + ps := &WirelessV1Sim{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListAccountUsageRecordParams Optional parameters for the method 'ListAccountUsageRecord' type ListAccountUsageRecordParams struct { - End *time.Time `json:"End,omitempty"` - Start *time.Time `json:"Start,omitempty"` - Granularity *string `json:"Granularity,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + End *time.Time `json:"End,omitempty"` + Start *time.Time `json:"Start,omitempty"` + Granularity *string `json:"Granularity,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -350,48 +361,48 @@ type ListAccountUsageRecordParams struct { * @param "Granularity" (string) - How to summarize the usage by time. Can be: `daily`, `hourly`, or `all`. A value of `all` returns one Usage Record that describes the usage for the entire period. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListAccountUsageRecordResponse - */ +*/ func (c *DefaultApiService) ListAccountUsageRecord(params *ListAccountUsageRecordParams) (*ListAccountUsageRecordResponse, error) { - path := "/v1/UsageRecords" + path := "/v1/UsageRecords" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.End != nil { - data.Set("End", fmt.Sprint(*params.End)) - } - if params != nil && params.Start != nil { - data.Set("Start", fmt.Sprint(*params.Start)) - } - if params != nil && params.Granularity != nil { - data.Set("Granularity", *params.Granularity) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.End != nil { + data.Set("End", fmt.Sprint(*params.End)) +} + if params != nil && params.Start != nil { + data.Set("Start", fmt.Sprint(*params.Start)) +} + if params != nil && params.Granularity != nil { + data.Set("Granularity", *params.Granularity) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListAccountUsageRecordResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListAccountUsageRecordResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListCommandParams Optional parameters for the method 'ListCommand' type ListCommandParams struct { - Sim *string `json:"Sim,omitempty"` - Status *string `json:"Status,omitempty"` + Sim *string `json:"Sim,omitempty"` + Status *string `json:"Status,omitempty"` Direction *string `json:"Direction,omitempty"` Transport *string `json:"Transport,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -404,44 +415,44 @@ type ListCommandParams struct { * @param "Transport" (string) - Only return Commands with this transport value. Can be: `sms` or `ip`. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListCommandResponse - */ +*/ func (c *DefaultApiService) ListCommand(params *ListCommandParams) (*ListCommandResponse, error) { - path := "/v1/Commands" + path := "/v1/Commands" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Sim != nil { - data.Set("Sim", *params.Sim) - } - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) - } - if params != nil && params.Direction != nil { - data.Set("Direction", *params.Direction) - } - if params != nil && params.Transport != nil { - data.Set("Transport", *params.Transport) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.Sim != nil { + data.Set("Sim", *params.Sim) +} + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) +} + if params != nil && params.Direction != nil { + data.Set("Direction", *params.Direction) +} + if params != nil && params.Transport != nil { + data.Set("Transport", *params.Transport) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListCommandResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListCommandResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListDataSessionParams Optional parameters for the method 'ListDataSession' type ListDataSessionParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -453,33 +464,33 @@ type ListDataSessionParams struct { * @param optional nil or *ListDataSessionParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListDataSessionResponse - */ +*/ func (c *DefaultApiService) ListDataSession(SimSid string, params *ListDataSessionParams) (*ListDataSessionResponse, error) { - path := "/v1/Sims/{SimSid}/DataSessions" + path := "/v1/Sims/{SimSid}/DataSessions" path = strings.Replace(path, "{"+"SimSid"+"}", SimSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListDataSessionResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListDataSessionResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListRatePlanParams Optional parameters for the method 'ListRatePlan' type ListRatePlanParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -490,40 +501,40 @@ type ListRatePlanParams struct { * @param optional nil or *ListRatePlanParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListRatePlanResponse - */ +*/ func (c *DefaultApiService) ListRatePlan(params *ListRatePlanParams) (*ListRatePlanResponse, error) { - path := "/v1/RatePlans" + path := "/v1/RatePlans" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListRatePlanResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListRatePlanResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListSimParams Optional parameters for the method 'ListSim' type ListSimParams struct { - Status *string `json:"Status,omitempty"` - Iccid *string `json:"Iccid,omitempty"` - RatePlan *string `json:"RatePlan,omitempty"` - EId *string `json:"EId,omitempty"` + Status *string `json:"Status,omitempty"` + Iccid *string `json:"Iccid,omitempty"` + RatePlan *string `json:"RatePlan,omitempty"` + EId *string `json:"EId,omitempty"` SimRegistrationCode *string `json:"SimRegistrationCode,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -537,53 +548,53 @@ type ListSimParams struct { * @param "SimRegistrationCode" (string) - Only return Sim resources with this registration code. This will return a list with a maximum size of 1. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListSimResponse - */ +*/ func (c *DefaultApiService) ListSim(params *ListSimParams) (*ListSimResponse, error) { - path := "/v1/Sims" + path := "/v1/Sims" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) - } - if params != nil && params.Iccid != nil { - data.Set("Iccid", *params.Iccid) - } - if params != nil && params.RatePlan != nil { - data.Set("RatePlan", *params.RatePlan) - } - if params != nil && params.EId != nil { - data.Set("EId", *params.EId) - } - if params != nil && params.SimRegistrationCode != nil { - data.Set("SimRegistrationCode", *params.SimRegistrationCode) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) +} + if params != nil && params.Iccid != nil { + data.Set("Iccid", *params.Iccid) +} + if params != nil && params.RatePlan != nil { + data.Set("RatePlan", *params.RatePlan) +} + if params != nil && params.EId != nil { + data.Set("EId", *params.EId) +} + if params != nil && params.SimRegistrationCode != nil { + data.Set("SimRegistrationCode", *params.SimRegistrationCode) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListSimResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListSimResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // ListUsageRecordParams Optional parameters for the method 'ListUsageRecord' type ListUsageRecordParams struct { - End *time.Time `json:"End,omitempty"` - Start *time.Time `json:"Start,omitempty"` - Granularity *string `json:"Granularity,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + End *time.Time `json:"End,omitempty"` + Start *time.Time `json:"Start,omitempty"` + Granularity *string `json:"Granularity,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -595,46 +606,46 @@ type ListUsageRecordParams struct { * @param "Granularity" (string) - How to summarize the usage by time. Can be: `daily`, `hourly`, or `all`. The default is `all`. A value of `all` returns one Usage Record that describes the usage for the entire period. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListUsageRecordResponse - */ +*/ func (c *DefaultApiService) ListUsageRecord(SimSid string, params *ListUsageRecordParams) (*ListUsageRecordResponse, error) { - path := "/v1/Sims/{SimSid}/UsageRecords" + path := "/v1/Sims/{SimSid}/UsageRecords" path = strings.Replace(path, "{"+"SimSid"+"}", SimSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.End != nil { - data.Set("End", fmt.Sprint(*params.End)) - } - if params != nil && params.Start != nil { - data.Set("Start", fmt.Sprint(*params.Start)) - } - if params != nil && params.Granularity != nil { - data.Set("Granularity", *params.Granularity) - } - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) - } + if params != nil && params.End != nil { + data.Set("End", fmt.Sprint(*params.End)) +} + if params != nil && params.Start != nil { + data.Set("Start", fmt.Sprint(*params.Start)) +} + if params != nil && params.Granularity != nil { + data.Set("Granularity", *params.Granularity) +} + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) +} - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &ListUsageRecordResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &ListUsageRecordResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateRatePlanParams Optional parameters for the method 'UpdateRatePlan' type UpdateRatePlanParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` } /* @@ -644,56 +655,56 @@ type UpdateRatePlanParams struct { * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It does not have to be unique. * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. It can be used in place of the resource's `sid` in the URL to address the resource. * @return WirelessV1RatePlan - */ +*/ func (c *DefaultApiService) UpdateRatePlan(Sid string, params *UpdateRatePlanParams) (*WirelessV1RatePlan, error) { - path := "/v1/RatePlans/{Sid}" + path := "/v1/RatePlans/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) - } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &WirelessV1RatePlan{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() - return ps, err -} + ps := &WirelessV1RatePlan{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + return ps, err +} // UpdateSimParams Optional parameters for the method 'UpdateSim' type UpdateSimParams struct { - AccountSid *string `json:"AccountSid,omitempty"` - CallbackMethod *string `json:"CallbackMethod,omitempty"` - CallbackUrl *string `json:"CallbackUrl,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` + CallbackMethod *string `json:"CallbackMethod,omitempty"` + CallbackUrl *string `json:"CallbackUrl,omitempty"` CommandsCallbackMethod *string `json:"CommandsCallbackMethod,omitempty"` - CommandsCallbackUrl *string `json:"CommandsCallbackUrl,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - RatePlan *string `json:"RatePlan,omitempty"` - ResetStatus *string `json:"ResetStatus,omitempty"` - SmsFallbackMethod *string `json:"SmsFallbackMethod,omitempty"` - SmsFallbackUrl *string `json:"SmsFallbackUrl,omitempty"` - SmsMethod *string `json:"SmsMethod,omitempty"` - SmsUrl *string `json:"SmsUrl,omitempty"` - Status *string `json:"Status,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` - VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"` - VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` - VoiceMethod *string `json:"VoiceMethod,omitempty"` - VoiceUrl *string `json:"VoiceUrl,omitempty"` + CommandsCallbackUrl *string `json:"CommandsCallbackUrl,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + RatePlan *string `json:"RatePlan,omitempty"` + ResetStatus *string `json:"ResetStatus,omitempty"` + SmsFallbackMethod *string `json:"SmsFallbackMethod,omitempty"` + SmsFallbackUrl *string `json:"SmsFallbackUrl,omitempty"` + SmsMethod *string `json:"SmsMethod,omitempty"` + SmsUrl *string `json:"SmsUrl,omitempty"` + Status *string `json:"Status,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` + VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"` + VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` + VoiceMethod *string `json:"VoiceMethod,omitempty"` + VoiceUrl *string `json:"VoiceUrl,omitempty"` } /* @@ -720,80 +731,81 @@ type UpdateSimParams struct { * @param "VoiceMethod" (string) - The HTTP method we should use when we call `voice_url`. Can be: `GET` or `POST`. * @param "VoiceUrl" (string) - The URL we should call using the `voice_method` when the SIM-connected device makes a voice call. * @return WirelessV1Sim - */ +*/ func (c *DefaultApiService) UpdateSim(Sid string, params *UpdateSimParams) (*WirelessV1Sim, error) { - path := "/v1/Sims/{Sid}" + path := "/v1/Sims/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.AccountSid != nil { - data.Set("AccountSid", *params.AccountSid) - } - if params != nil && params.CallbackMethod != nil { - data.Set("CallbackMethod", *params.CallbackMethod) - } - if params != nil && params.CallbackUrl != nil { - data.Set("CallbackUrl", *params.CallbackUrl) - } - if params != nil && params.CommandsCallbackMethod != nil { - data.Set("CommandsCallbackMethod", *params.CommandsCallbackMethod) - } - if params != nil && params.CommandsCallbackUrl != nil { - data.Set("CommandsCallbackUrl", *params.CommandsCallbackUrl) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.RatePlan != nil { - data.Set("RatePlan", *params.RatePlan) - } - if params != nil && params.ResetStatus != nil { - data.Set("ResetStatus", *params.ResetStatus) - } - if params != nil && params.SmsFallbackMethod != nil { - data.Set("SmsFallbackMethod", *params.SmsFallbackMethod) - } - if params != nil && params.SmsFallbackUrl != nil { - data.Set("SmsFallbackUrl", *params.SmsFallbackUrl) - } - if params != nil && params.SmsMethod != nil { - data.Set("SmsMethod", *params.SmsMethod) - } - if params != nil && params.SmsUrl != nil { - data.Set("SmsUrl", *params.SmsUrl) - } - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) - } - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) - } - if params != nil && params.VoiceFallbackMethod != nil { - data.Set("VoiceFallbackMethod", *params.VoiceFallbackMethod) - } - if params != nil && params.VoiceFallbackUrl != nil { - data.Set("VoiceFallbackUrl", *params.VoiceFallbackUrl) - } - if params != nil && params.VoiceMethod != nil { - data.Set("VoiceMethod", *params.VoiceMethod) - } - if params != nil && params.VoiceUrl != nil { - data.Set("VoiceUrl", *params.VoiceUrl) - } + if params != nil && params.AccountSid != nil { + data.Set("AccountSid", *params.AccountSid) +} + if params != nil && params.CallbackMethod != nil { + data.Set("CallbackMethod", *params.CallbackMethod) +} + if params != nil && params.CallbackUrl != nil { + data.Set("CallbackUrl", *params.CallbackUrl) +} + if params != nil && params.CommandsCallbackMethod != nil { + data.Set("CommandsCallbackMethod", *params.CommandsCallbackMethod) +} + if params != nil && params.CommandsCallbackUrl != nil { + data.Set("CommandsCallbackUrl", *params.CommandsCallbackUrl) +} + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) +} + if params != nil && params.RatePlan != nil { + data.Set("RatePlan", *params.RatePlan) +} + if params != nil && params.ResetStatus != nil { + data.Set("ResetStatus", *params.ResetStatus) +} + if params != nil && params.SmsFallbackMethod != nil { + data.Set("SmsFallbackMethod", *params.SmsFallbackMethod) +} + if params != nil && params.SmsFallbackUrl != nil { + data.Set("SmsFallbackUrl", *params.SmsFallbackUrl) +} + if params != nil && params.SmsMethod != nil { + data.Set("SmsMethod", *params.SmsMethod) +} + if params != nil && params.SmsUrl != nil { + data.Set("SmsUrl", *params.SmsUrl) +} + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) +} + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) +} + if params != nil && params.VoiceFallbackMethod != nil { + data.Set("VoiceFallbackMethod", *params.VoiceFallbackMethod) +} + if params != nil && params.VoiceFallbackUrl != nil { + data.Set("VoiceFallbackUrl", *params.VoiceFallbackUrl) +} + if params != nil && params.VoiceMethod != nil { + data.Set("VoiceMethod", *params.VoiceMethod) +} + if params != nil && params.VoiceUrl != nil { + data.Set("VoiceUrl", *params.VoiceUrl) +} - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - defer resp.Body.Close() + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - ps := &WirelessV1Sim{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + defer resp.Body.Close() + + ps := &WirelessV1Sim{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } diff --git a/twilio/rest/wireless/v1/model_list_account_usage_record_response.go b/twilio/rest/wireless/v1/model_list_account_usage_record_response.go index f5283d8ef..550c96479 100644 --- a/twilio/rest/wireless/v1/model_list_account_usage_record_response.go +++ b/twilio/rest/wireless/v1/model_list_account_usage_record_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Wireless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Wireless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListAccountUsageRecordResponse struct for ListAccountUsageRecordResponse type ListAccountUsageRecordResponse struct { - Meta ListCommandResponseMeta `json:"Meta,omitempty"` + Meta ListCommandResponseMeta `json:"Meta,omitempty"` UsageRecords []WirelessV1AccountUsageRecord `json:"UsageRecords,omitempty"` } diff --git a/twilio/rest/wireless/v1/model_list_command_response.go b/twilio/rest/wireless/v1/model_list_command_response.go index d8ddc9845..ae941718c 100644 --- a/twilio/rest/wireless/v1/model_list_command_response.go +++ b/twilio/rest/wireless/v1/model_list_command_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Wireless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Wireless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListCommandResponse struct for ListCommandResponse type ListCommandResponse struct { - Commands []WirelessV1Command `json:"Commands,omitempty"` - Meta ListCommandResponseMeta `json:"Meta,omitempty"` + Commands []WirelessV1Command `json:"Commands,omitempty"` + Meta ListCommandResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/wireless/v1/model_list_command_response_meta.go b/twilio/rest/wireless/v1/model_list_command_response_meta.go index 011765a82..ff491616d 100644 --- a/twilio/rest/wireless/v1/model_list_command_response_meta.go +++ b/twilio/rest/wireless/v1/model_list_command_response_meta.go @@ -1,23 +1,22 @@ /* - * Twilio - Wireless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Wireless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListCommandResponseMeta struct for ListCommandResponseMeta type ListCommandResponseMeta struct { - FirstPageUrl string `json:"FirstPageUrl,omitempty"` - Key string `json:"Key,omitempty"` - NextPageUrl string `json:"NextPageUrl,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` - Url string `json:"Url,omitempty"` + Url string `json:"Url,omitempty"` } diff --git a/twilio/rest/wireless/v1/model_list_data_session_response.go b/twilio/rest/wireless/v1/model_list_data_session_response.go index 58bf518ac..3e7739762 100644 --- a/twilio/rest/wireless/v1/model_list_data_session_response.go +++ b/twilio/rest/wireless/v1/model_list_data_session_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Wireless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Wireless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListDataSessionResponse struct for ListDataSessionResponse type ListDataSessionResponse struct { DataSessions []WirelessV1SimDataSession `json:"DataSessions,omitempty"` - Meta ListCommandResponseMeta `json:"Meta,omitempty"` + Meta ListCommandResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/wireless/v1/model_list_rate_plan_response.go b/twilio/rest/wireless/v1/model_list_rate_plan_response.go index 76bd96621..de1afd13a 100644 --- a/twilio/rest/wireless/v1/model_list_rate_plan_response.go +++ b/twilio/rest/wireless/v1/model_list_rate_plan_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Wireless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Wireless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListRatePlanResponse struct for ListRatePlanResponse type ListRatePlanResponse struct { - Meta ListCommandResponseMeta `json:"Meta,omitempty"` - RatePlans []WirelessV1RatePlan `json:"RatePlans,omitempty"` + Meta ListCommandResponseMeta `json:"Meta,omitempty"` + RatePlans []WirelessV1RatePlan `json:"RatePlans,omitempty"` } diff --git a/twilio/rest/wireless/v1/model_list_sim_response.go b/twilio/rest/wireless/v1/model_list_sim_response.go index 198f63469..0b22d29a5 100644 --- a/twilio/rest/wireless/v1/model_list_sim_response.go +++ b/twilio/rest/wireless/v1/model_list_sim_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Wireless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Wireless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListSimResponse struct for ListSimResponse type ListSimResponse struct { Meta ListCommandResponseMeta `json:"Meta,omitempty"` - Sims []WirelessV1Sim `json:"Sims,omitempty"` + Sims []WirelessV1Sim `json:"Sims,omitempty"` } diff --git a/twilio/rest/wireless/v1/model_list_usage_record_response.go b/twilio/rest/wireless/v1/model_list_usage_record_response.go index d61fa0f41..0bb1b1f86 100644 --- a/twilio/rest/wireless/v1/model_list_usage_record_response.go +++ b/twilio/rest/wireless/v1/model_list_usage_record_response.go @@ -1,18 +1,17 @@ /* - * Twilio - Wireless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Wireless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // ListUsageRecordResponse struct for ListUsageRecordResponse type ListUsageRecordResponse struct { - Meta ListCommandResponseMeta `json:"Meta,omitempty"` + Meta ListCommandResponseMeta `json:"Meta,omitempty"` UsageRecords []WirelessV1SimUsageRecord `json:"UsageRecords,omitempty"` } diff --git a/twilio/rest/wireless/v1/model_wireless_v1_account_usage_record.go b/twilio/rest/wireless/v1/model_wireless_v1_account_usage_record.go index f21cbbaba..b9a99abd8 100644 --- a/twilio/rest/wireless/v1/model_wireless_v1_account_usage_record.go +++ b/twilio/rest/wireless/v1/model_wireless_v1_account_usage_record.go @@ -1,16 +1,15 @@ /* - * Twilio - Wireless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Wireless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // WirelessV1AccountUsageRecord struct for WirelessV1AccountUsageRecord type WirelessV1AccountUsageRecord struct { // The SID of the Account that created the resource diff --git a/twilio/rest/wireless/v1/model_wireless_v1_command.go b/twilio/rest/wireless/v1/model_wireless_v1_command.go index 7099c10e9..0d9597768 100644 --- a/twilio/rest/wireless/v1/model_wireless_v1_command.go +++ b/twilio/rest/wireless/v1/model_wireless_v1_command.go @@ -1,20 +1,18 @@ /* - * Twilio - Wireless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Wireless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // WirelessV1Command struct for WirelessV1Command type WirelessV1Command struct { // The SID of the Account that created the resource diff --git a/twilio/rest/wireless/v1/model_wireless_v1_rate_plan.go b/twilio/rest/wireless/v1/model_wireless_v1_rate_plan.go index c987f3933..84972fa98 100644 --- a/twilio/rest/wireless/v1/model_wireless_v1_rate_plan.go +++ b/twilio/rest/wireless/v1/model_wireless_v1_rate_plan.go @@ -1,20 +1,18 @@ /* - * Twilio - Wireless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Wireless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // WirelessV1RatePlan struct for WirelessV1RatePlan type WirelessV1RatePlan struct { // The SID of the Account that created the resource diff --git a/twilio/rest/wireless/v1/model_wireless_v1_sim.go b/twilio/rest/wireless/v1/model_wireless_v1_sim.go index 74b8a206d..21e8469ab 100644 --- a/twilio/rest/wireless/v1/model_wireless_v1_sim.go +++ b/twilio/rest/wireless/v1/model_wireless_v1_sim.go @@ -1,20 +1,18 @@ /* - * Twilio - Wireless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Wireless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // WirelessV1Sim struct for WirelessV1Sim type WirelessV1Sim struct { // The SID of the Account to which the Sim resource belongs diff --git a/twilio/rest/wireless/v1/model_wireless_v1_sim_data_session.go b/twilio/rest/wireless/v1/model_wireless_v1_sim_data_session.go index 40df0f18a..631897564 100644 --- a/twilio/rest/wireless/v1/model_wireless_v1_sim_data_session.go +++ b/twilio/rest/wireless/v1/model_wireless_v1_sim_data_session.go @@ -1,20 +1,18 @@ /* - * Twilio - Wireless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Wireless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - import ( "time" ) - // WirelessV1SimDataSession struct for WirelessV1SimDataSession type WirelessV1SimDataSession struct { // The SID of the Account that created the resource diff --git a/twilio/rest/wireless/v1/model_wireless_v1_sim_usage_record.go b/twilio/rest/wireless/v1/model_wireless_v1_sim_usage_record.go index 35db06e8e..06b0e62d6 100644 --- a/twilio/rest/wireless/v1/model_wireless_v1_sim_usage_record.go +++ b/twilio/rest/wireless/v1/model_wireless_v1_sim_usage_record.go @@ -1,16 +1,15 @@ /* - * Twilio - Wireless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com - */ + * Twilio - Wireless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi - // WirelessV1SimUsageRecord struct for WirelessV1SimUsageRecord type WirelessV1SimUsageRecord struct { // The SID of the Account that created the resource From 757a60153a271f253d4eae38c57436d707da9346 Mon Sep 17 00:00:00 2001 From: Jennifer Mah Date: Thu, 11 Mar 2021 17:29:44 -0700 Subject: [PATCH 3/3] reformat --- twilio/rest/accounts/v1/api_default.go | 466 +- .../model_accounts_v1_auth_token_promotion.go | 16 +- ...l_accounts_v1_credential_credential_aws.go | 16 +- ...nts_v1_credential_credential_public_key.go | 16 +- .../model_accounts_v1_secondary_auth_token.go | 16 +- .../v1/model_list_credential_aws_response.go | 17 +- ...model_list_credential_aws_response_meta.go | 27 +- ...del_list_credential_public_key_response.go | 17 +- twilio/rest/api/v2010/api_default.go | 11156 ++++++++-------- .../rest/api/v2010/model_api_v2010_account.go | 15 +- .../v2010/model_api_v2010_account_address.go | 15 +- ..._account_address_dependent_phone_number.go | 15 +- .../model_api_v2010_account_application.go | 15 +- ...pi_v2010_account_authorized_connect_app.go | 15 +- ..._account_available_phone_number_country.go | 15 +- ...er_country_available_phone_number_local.go | 17 +- ...ailable_phone_number_local_capabilities.go | 21 +- ...ailable_phone_number_machine_to_machine.go | 17 +- ...r_country_available_phone_number_mobile.go | 17 +- ...country_available_phone_number_national.go | 17 +- ...ntry_available_phone_number_shared_cost.go | 17 +- ...ountry_available_phone_number_toll_free.go | 17 +- ...ber_country_available_phone_number_voip.go | 17 +- .../v2010/model_api_v2010_account_balance.go | 15 +- .../api/v2010/model_api_v2010_account_call.go | 15 +- ...model_api_v2010_account_call_call_event.go | 15 +- ...el_api_v2010_account_call_call_feedback.go | 15 +- ...2010_account_call_call_feedback_summary.go | 16 +- ...count_call_call_feedback_summary_issues.go | 21 +- ...pi_v2010_account_call_call_notification.go | 15 +- ...account_call_call_notification_instance.go | 15 +- ...l_api_v2010_account_call_call_recording.go | 15 +- .../model_api_v2010_account_call_payments.go | 15 +- .../model_api_v2010_account_conference.go | 15 +- ...account_conference_conference_recording.go | 15 +- ...pi_v2010_account_conference_participant.go | 15 +- .../model_api_v2010_account_connect_app.go | 15 +- ...api_v2010_account_incoming_phone_number.go | 19 +- ...ount_incoming_phone_number_capabilities.go | 21 +- ...r_incoming_phone_number_assigned_add_on.go | 15 +- ..._phone_number_assigned_add_on_extension.go | 15 +- ...hone_number_incoming_phone_number_local.go | 19 +- ...one_number_incoming_phone_number_mobile.go | 19 +- ..._number_incoming_phone_number_toll_free.go | 19 +- .../api/v2010/model_api_v2010_account_key.go | 15 +- .../v2010/model_api_v2010_account_message.go | 15 +- .../model_api_v2010_account_message_media.go | 15 +- ..._v2010_account_message_message_feedback.go | 15 +- .../v2010/model_api_v2010_account_new_key.go | 15 +- ...model_api_v2010_account_new_signing_key.go | 15 +- .../model_api_v2010_account_notification.go | 15 +- ...api_v2010_account_notification_instance.go | 15 +- ...el_api_v2010_account_outgoing_caller_id.go | 15 +- .../v2010/model_api_v2010_account_queue.go | 15 +- .../model_api_v2010_account_queue_member.go | 15 +- .../model_api_v2010_account_recording.go | 15 +- ...count_recording_recording_add_on_result.go | 15 +- ..._result_recording_add_on_result_payload.go | 15 +- ...count_recording_recording_transcription.go | 15 +- .../model_api_v2010_account_short_code.go | 15 +- .../model_api_v2010_account_signing_key.go | 21 +- ...i_v2010_account_sip_sip_credential_list.go | 15 +- ..._sip_sip_credential_list_sip_credential.go | 15 +- .../model_api_v2010_account_sip_sip_domain.go | 15 +- ..._sip_auth_calls_credential_list_mapping.go | 15 +- ...th_calls_ip_access_control_list_mapping.go | 15 +- ...h_registrations_credential_list_mapping.go | 15 +- ..._sip_domain_sip_credential_list_mapping.go | 15 +- ...main_sip_ip_access_control_list_mapping.go | 15 +- ..._account_sip_sip_ip_access_control_list.go | 15 +- ...p_ip_access_control_list_sip_ip_address.go | 15 +- .../v2010/model_api_v2010_account_token.go | 15 +- ...del_api_v2010_account_token_ice_servers.go | 21 +- .../model_api_v2010_account_transcription.go | 15 +- ...el_api_v2010_account_usage_usage_record.go | 16 +- ...sage_usage_record_usage_record_all_time.go | 16 +- ...t_usage_usage_record_usage_record_daily.go | 16 +- ...ge_usage_record_usage_record_last_month.go | 16 +- ...usage_usage_record_usage_record_monthly.go | 16 +- ...ge_usage_record_usage_record_this_month.go | 16 +- ...t_usage_usage_record_usage_record_today.go | 16 +- ..._usage_usage_record_usage_record_yearly.go | 16 +- ...age_usage_record_usage_record_yesterday.go | 16 +- ...l_api_v2010_account_usage_usage_trigger.go | 15 +- ...el_api_v2010_account_validation_request.go | 15 +- .../api/v2010/model_list_account_response.go | 33 +- .../api/v2010/model_list_address_response.go | 33 +- .../v2010/model_list_application_response.go | 33 +- ...el_list_authorized_connect_app_response.go | 31 +- ...available_phone_number_country_response.go | 33 +- ...t_available_phone_number_local_response.go | 31 +- ...hone_number_machine_to_machine_response.go | 31 +- ..._available_phone_number_mobile_response.go | 31 +- ...vailable_phone_number_national_response.go | 31 +- ...lable_phone_number_shared_cost_response.go | 31 +- ...ailable_phone_number_toll_free_response.go | 31 +- ...st_available_phone_number_voip_response.go | 31 +- .../v2010/model_list_call_event_response.go | 33 +- .../model_list_call_notification_response.go | 33 +- .../model_list_call_recording_response.go | 33 +- .../api/v2010/model_list_call_response.go | 33 +- ...odel_list_conference_recording_response.go | 33 +- .../v2010/model_list_conference_response.go | 33 +- .../v2010/model_list_connect_app_response.go | 33 +- ...el_list_dependent_phone_number_response.go | 31 +- ...mber_assigned_add_on_extension_response.go | 33 +- ...g_phone_number_assigned_add_on_response.go | 33 +- ...st_incoming_phone_number_local_response.go | 31 +- ...t_incoming_phone_number_mobile_response.go | 31 +- ...del_list_incoming_phone_number_response.go | 31 +- ...ncoming_phone_number_toll_free_response.go | 31 +- .../rest/api/v2010/model_list_key_response.go | 33 +- .../api/v2010/model_list_media_response.go | 33 +- .../api/v2010/model_list_member_response.go | 33 +- .../api/v2010/model_list_message_response.go | 33 +- .../v2010/model_list_notification_response.go | 33 +- .../model_list_outgoing_caller_id_response.go | 31 +- .../v2010/model_list_participant_response.go | 33 +- .../api/v2010/model_list_queue_response.go | 33 +- ...ecording_add_on_result_payload_response.go | 33 +- ...l_list_recording_add_on_result_response.go | 33 +- .../v2010/model_list_recording_response.go | 33 +- ...l_list_recording_transcription_response.go | 33 +- .../v2010/model_list_short_code_response.go | 33 +- .../v2010/model_list_signing_key_response.go | 33 +- ..._calls_credential_list_mapping_response.go | 33 +- ...ip_access_control_list_mapping_response.go | 33 +- ...ations_credential_list_mapping_response.go | 33 +- ...st_sip_credential_list_mapping_response.go | 31 +- ...model_list_sip_credential_list_response.go | 31 +- .../model_list_sip_credential_response.go | 33 +- .../v2010/model_list_sip_domain_response.go | 33 +- ...ip_access_control_list_mapping_response.go | 31 +- ...ist_sip_ip_access_control_list_response.go | 31 +- .../model_list_sip_ip_address_response.go | 33 +- .../model_list_transcription_response.go | 33 +- ...del_list_usage_record_all_time_response.go | 33 +- .../model_list_usage_record_daily_response.go | 33 +- ...l_list_usage_record_last_month_response.go | 33 +- ...odel_list_usage_record_monthly_response.go | 33 +- .../v2010/model_list_usage_record_response.go | 33 +- ...l_list_usage_record_this_month_response.go | 33 +- .../model_list_usage_record_today_response.go | 33 +- ...model_list_usage_record_yearly_response.go | 33 +- ...el_list_usage_record_yesterday_response.go | 33 +- .../model_list_usage_trigger_response.go | 33 +- twilio/rest/autopilot/v1/api_default.go | 2162 ++- .../v1/model_autopilot_v1_assistant.go | 16 +- .../model_autopilot_v1_assistant_defaults.go | 15 +- .../model_autopilot_v1_assistant_dialogue.go | 15 +- ...model_autopilot_v1_assistant_field_type.go | 16 +- ...lot_v1_assistant_field_type_field_value.go | 16 +- ...odel_autopilot_v1_assistant_model_build.go | 16 +- .../v1/model_autopilot_v1_assistant_query.go | 16 +- ...odel_autopilot_v1_assistant_style_sheet.go | 15 +- .../v1/model_autopilot_v1_assistant_task.go | 16 +- ...model_autopilot_v1_assistant_task_field.go | 16 +- ...odel_autopilot_v1_assistant_task_sample.go | 16 +- ...utopilot_v1_assistant_task_task_actions.go | 15 +- ...pilot_v1_assistant_task_task_statistics.go | 15 +- .../model_autopilot_v1_assistant_webhook.go | 16 +- .../model_autopilot_v1_restore_assistant.go | 16 +- .../v1/model_list_assistant_response.go | 19 +- .../v1/model_list_assistant_response_meta.go | 27 +- .../autopilot/v1/model_list_field_response.go | 17 +- .../v1/model_list_field_type_response.go | 17 +- .../v1/model_list_field_value_response.go | 17 +- .../v1/model_list_model_build_response.go | 17 +- .../autopilot/v1/model_list_query_response.go | 17 +- .../v1/model_list_sample_response.go | 17 +- .../autopilot/v1/model_list_task_response.go | 17 +- .../v1/model_list_webhook_response.go | 17 +- twilio/rest/bulkexports/v1/api_default.go | 366 +- .../v1/model_bulkexports_v1_export.go | 15 +- ...del_bulkexports_v1_export_configuration.go | 15 +- .../v1/model_bulkexports_v1_export_day.go | 15 +- ...odel_bulkexports_v1_export_day_instance.go | 15 +- ...bulkexports_v1_export_export_custom_job.go | 15 +- .../v1/model_bulkexports_v1_export_job.go | 17 +- .../bulkexports/v1/model_list_day_response.go | 17 +- .../v1/model_list_day_response_meta.go | 27 +- .../model_list_export_custom_job_response.go | 17 +- twilio/rest/chat/v1/api_default.go | 2033 ++- .../rest/chat/v1/model_chat_v1_credential.go | 16 +- twilio/rest/chat/v1/model_chat_v1_service.go | 16 +- .../chat/v1/model_chat_v1_service_channel.go | 16 +- .../model_chat_v1_service_channel_invite.go | 16 +- .../model_chat_v1_service_channel_member.go | 16 +- .../model_chat_v1_service_channel_message.go | 16 +- .../chat/v1/model_chat_v1_service_role.go | 16 +- .../chat/v1/model_chat_v1_service_user.go | 16 +- ...model_chat_v1_service_user_user_channel.go | 15 +- .../chat/v1/model_list_channel_response.go | 19 +- .../chat/v1/model_list_credential_response.go | 19 +- .../v1/model_list_credential_response_meta.go | 27 +- .../chat/v1/model_list_invite_response.go | 17 +- .../chat/v1/model_list_member_response.go | 17 +- .../chat/v1/model_list_message_response.go | 17 +- .../rest/chat/v1/model_list_role_response.go | 19 +- .../chat/v1/model_list_service_response.go | 19 +- .../v1/model_list_user_channel_response.go | 17 +- .../rest/chat/v1/model_list_user_response.go | 19 +- twilio/rest/chat/v2/api_default.go | 2621 ++-- .../rest/chat/v2/model_chat_v2_credential.go | 16 +- twilio/rest/chat/v2/model_chat_v2_service.go | 16 +- .../chat/v2/model_chat_v2_service_binding.go | 16 +- .../chat/v2/model_chat_v2_service_channel.go | 16 +- ...chat_v2_service_channel_channel_webhook.go | 16 +- .../model_chat_v2_service_channel_invite.go | 16 +- .../model_chat_v2_service_channel_member.go | 16 +- .../model_chat_v2_service_channel_message.go | 16 +- .../chat/v2/model_chat_v2_service_role.go | 16 +- .../chat/v2/model_chat_v2_service_user.go | 16 +- ...model_chat_v2_service_user_user_binding.go | 16 +- ...model_chat_v2_service_user_user_channel.go | 15 +- .../chat/v2/model_list_binding_response.go | 19 +- .../chat/v2/model_list_channel_response.go | 19 +- .../v2/model_list_channel_webhook_response.go | 17 +- .../chat/v2/model_list_credential_response.go | 19 +- .../v2/model_list_credential_response_meta.go | 27 +- .../chat/v2/model_list_invite_response.go | 17 +- .../chat/v2/model_list_member_response.go | 17 +- .../chat/v2/model_list_message_response.go | 17 +- .../rest/chat/v2/model_list_role_response.go | 19 +- .../chat/v2/model_list_service_response.go | 19 +- .../v2/model_list_user_binding_response.go | 17 +- .../v2/model_list_user_channel_response.go | 17 +- .../rest/chat/v2/model_list_user_response.go | 19 +- twilio/rest/conversations/v1/api_default.go | 4015 +++--- .../model_conversations_v1_configuration.go | 15 +- ..._v1_configuration_configuration_webhook.go | 15 +- .../v1/model_conversations_v1_conversation.go | 16 +- ...ns_v1_conversation_conversation_message.go | 16 +- ...on_message_conversation_message_receipt.go | 16 +- ...1_conversation_conversation_participant.go | 16 +- ...onversation_conversation_scoped_webhook.go | 16 +- .../v1/model_conversations_v1_credential.go | 16 +- .../v1/model_conversations_v1_role.go | 16 +- .../v1/model_conversations_v1_service.go | 16 +- ...onversations_v1_service_service_binding.go | 16 +- ...ations_v1_service_service_configuration.go | 15 +- ...vice_configuration_service_notification.go | 15 +- ...sations_v1_service_service_conversation.go | 16 +- ...nversation_service_conversation_message.go | 16 +- ...ge_service_conversation_message_receipt.go | 16 +- ...sation_service_conversation_participant.go | 16 +- ...ion_service_conversation_scoped_webhook.go | 16 +- ...l_conversations_v1_service_service_role.go | 16 +- ...l_conversations_v1_service_service_user.go | 16 +- .../v1/model_conversations_v1_user.go | 16 +- ...t_conversation_message_receipt_response.go | 17 +- ...odel_list_conversation_message_response.go | 17 +- ..._list_conversation_participant_response.go | 17 +- .../v1/model_list_conversation_response.go | 17 +- .../model_list_conversation_response_meta.go | 27 +- ...st_conversation_scoped_webhook_response.go | 17 +- .../v1/model_list_credential_response.go | 19 +- .../v1/model_list_role_response.go | 19 +- .../v1/model_list_service_binding_response.go | 17 +- ...e_conversation_message_receipt_response.go | 17 +- ...t_service_conversation_message_response.go | 17 +- ...rvice_conversation_participant_response.go | 17 +- ...odel_list_service_conversation_response.go | 17 +- ...ce_conversation_scoped_webhook_response.go | 17 +- .../v1/model_list_service_response.go | 19 +- .../v1/model_list_service_role_response.go | 17 +- .../v1/model_list_service_user_response.go | 17 +- .../v1/model_list_user_response.go | 19 +- twilio/rest/events/v1/api_default.go | 650 +- .../events/v1/model_events_v1_event_type.go | 20 +- .../rest/events/v1/model_events_v1_schema.go | 16 +- .../v1/model_events_v1_schema_version.go | 18 +- twilio/rest/events/v1/model_events_v1_sink.go | 16 +- .../v1/model_events_v1_sink_sink_test_.go | 15 +- .../v1/model_events_v1_sink_sink_validate.go | 15 +- .../events/v1/model_events_v1_subscription.go | 16 +- ...events_v1_subscription_subscribed_event.go | 15 +- .../v1/model_list_event_type_response.go | 19 +- .../events/v1/model_list_sink_response.go | 19 +- .../model_list_subscribed_event_response.go | 17 +- .../v1/model_list_subscription_response.go | 19 +- .../events/v1/model_list_version_response.go | 17 +- .../v1/model_list_version_response_meta.go | 27 +- twilio/rest/fax/v1/api_default.go | 374 +- twilio/rest/fax/v1/model_fax_v1_fax.go | 16 +- .../rest/fax/v1/model_fax_v1_fax_fax_media.go | 16 +- .../fax/v1/model_list_fax_media_response.go | 19 +- twilio/rest/fax/v1/model_list_fax_response.go | 19 +- .../fax/v1/model_list_fax_response_meta.go | 27 +- twilio/rest/flex/v1/api_default.go | 932 +- twilio/rest/flex/v1/model_flex_v1_channel.go | 16 +- .../flex/v1/model_flex_v1_configuration.go | 16 +- .../rest/flex/v1/model_flex_v1_flex_flow.go | 16 +- .../rest/flex/v1/model_flex_v1_web_channel.go | 16 +- .../flex/v1/model_list_channel_response.go | 19 +- .../v1/model_list_channel_response_meta.go | 27 +- .../flex/v1/model_list_flex_flow_response.go | 19 +- .../v1/model_list_web_channel_response.go | 19 +- twilio/rest/insights/v1/api_default.go | 387 +- .../insights/v1/model_insights_v1_call.go | 19 +- .../v1/model_insights_v1_call_event.go | 35 +- .../v1/model_insights_v1_call_metric.go | 31 +- .../v1/model_insights_v1_call_summary.go | 58 +- .../model_insights_v1_video_room_summary.go | 68 +- ..._room_summary_video_participant_summary.go | 50 +- .../insights/v1/model_list_event_response.go | 19 +- .../insights/v1/model_list_metric_response.go | 19 +- ...list_video_participant_summary_response.go | 17 +- .../model_list_video_room_summary_response.go | 19 +- ...l_list_video_room_summary_response_meta.go | 27 +- twilio/rest/ip_messaging/v1/api_default.go | 2235 ++-- .../v1/model_ip_messaging_v1_credential.go | 32 +- .../v1/model_ip_messaging_v1_service.go | 58 +- .../model_ip_messaging_v1_service_channel.go | 44 +- ..._ip_messaging_v1_service_channel_invite.go | 32 +- ..._ip_messaging_v1_service_channel_member.go | 36 +- ...ip_messaging_v1_service_channel_message.go | 38 +- .../v1/model_ip_messaging_v1_service_role.go | 34 +- .../v1/model_ip_messaging_v1_service_user.go | 44 +- ..._messaging_v1_service_user_user_channel.go | 31 +- .../v1/model_list_channel_response.go | 17 +- .../v1/model_list_credential_response.go | 19 +- .../v1/model_list_credential_response_meta.go | 27 +- .../v1/model_list_invite_response.go | 17 +- .../v1/model_list_member_response.go | 17 +- .../v1/model_list_message_response.go | 17 +- .../v1/model_list_role_response.go | 17 +- .../v1/model_list_service_response.go | 19 +- .../v1/model_list_user_channel_response.go | 17 +- .../v1/model_list_user_response.go | 17 +- twilio/rest/ip_messaging/v2/api_default.go | 2861 ++-- .../v2/model_ip_messaging_v2_credential.go | 32 +- .../v2/model_ip_messaging_v2_service.go | 62 +- .../model_ip_messaging_v2_service_binding.go | 40 +- .../model_ip_messaging_v2_service_channel.go | 44 +- ...ging_v2_service_channel_channel_webhook.go | 32 +- ..._ip_messaging_v2_service_channel_invite.go | 32 +- ..._ip_messaging_v2_service_channel_member.go | 38 +- ...ip_messaging_v2_service_channel_message.go | 48 +- .../v2/model_ip_messaging_v2_service_role.go | 34 +- .../v2/model_ip_messaging_v2_service_user.go | 44 +- ..._messaging_v2_service_user_user_binding.go | 40 +- ..._messaging_v2_service_user_user_channel.go | 37 +- .../v2/model_list_binding_response.go | 17 +- .../v2/model_list_channel_response.go | 17 +- .../v2/model_list_channel_webhook_response.go | 17 +- .../v2/model_list_credential_response.go | 19 +- .../v2/model_list_credential_response_meta.go | 27 +- .../v2/model_list_invite_response.go | 17 +- .../v2/model_list_member_response.go | 17 +- .../v2/model_list_message_response.go | 17 +- .../v2/model_list_role_response.go | 17 +- .../v2/model_list_service_response.go | 19 +- .../v2/model_list_user_binding_response.go | 17 +- .../v2/model_list_user_channel_response.go | 17 +- .../v2/model_list_user_response.go | 17 +- twilio/rest/lookups/v1/api_default.go | 91 +- .../v1/model_lookups_v1_phone_number.go | 15 +- twilio/rest/messaging/v1/api_default.go | 926 +- .../v1/model_list_alpha_sender_response.go | 17 +- ...model_list_brand_registrations_response.go | 17 +- .../v1/model_list_phone_number_response.go | 17 +- .../v1/model_list_service_response.go | 19 +- .../v1/model_list_service_response_meta.go | 27 +- .../v1/model_list_short_code_response.go | 17 +- .../model_messaging_v1_brand_registrations.go | 16 +- .../v1/model_messaging_v1_deactivation.go | 15 +- .../v1/model_messaging_v1_service.go | 16 +- ...model_messaging_v1_service_alpha_sender.go | 16 +- ...model_messaging_v1_service_phone_number.go | 16 +- .../model_messaging_v1_service_short_code.go | 16 +- twilio/rest/monitor/v1/api_default.go | 236 +- .../monitor/v1/model_list_alert_response.go | 19 +- .../v1/model_list_alert_response_meta.go | 27 +- .../monitor/v1/model_list_event_response.go | 19 +- .../rest/monitor/v1/model_monitor_v1_alert.go | 16 +- .../v1/model_monitor_v1_alert_instance.go | 16 +- .../rest/monitor/v1/model_monitor_v1_event.go | 16 +- twilio/rest/notify/v1/api_default.go | 1083 +- .../notify/v1/model_list_binding_response.go | 19 +- .../v1/model_list_credential_response.go | 19 +- .../v1/model_list_credential_response_meta.go | 27 +- .../notify/v1/model_list_service_response.go | 19 +- .../notify/v1/model_notify_v1_credential.go | 16 +- .../rest/notify/v1/model_notify_v1_service.go | 16 +- .../v1/model_notify_v1_service_binding.go | 16 +- .../model_notify_v1_service_notification.go | 16 +- twilio/rest/numbers/v2/api_default.go | 1170 +- .../numbers/v2/model_list_bundle_response.go | 17 +- .../v2/model_list_bundle_response_meta.go | 27 +- .../v2/model_list_end_user_response.go | 17 +- .../v2/model_list_end_user_type_response.go | 17 +- .../v2/model_list_evaluation_response.go | 17 +- .../v2/model_list_item_assignment_response.go | 17 +- .../v2/model_list_regulation_response.go | 17 +- ...model_list_supporting_document_response.go | 17 +- ..._list_supporting_document_type_response.go | 17 +- ...numbers_v2_regulatory_compliance_bundle.go | 16 +- ...regulatory_compliance_bundle_evaluation.go | 20 +- ...atory_compliance_bundle_item_assignment.go | 16 +- ...mbers_v2_regulatory_compliance_end_user.go | 16 +- ..._v2_regulatory_compliance_end_user_type.go | 15 +- ...ers_v2_regulatory_compliance_regulation.go | 15 +- ...gulatory_compliance_supporting_document.go | 16 +- ...ory_compliance_supporting_document_type.go | 15 +- twilio/rest/pricing/v1/api_default.go | 260 +- .../model_list_messaging_country_response.go | 17 +- ...el_list_messaging_country_response_meta.go | 27 +- ...odel_list_phone_number_country_response.go | 17 +- .../v1/model_list_voice_country_response.go | 19 +- .../pricing/v1/model_pricing_v1_messaging.go | 19 +- ..._pricing_v1_messaging_messaging_country.go | 15 +- ...v1_messaging_messaging_country_instance.go | 15 +- ...ing_country_instance_inbound_sms_prices.go | 19 +- ...ng_country_instance_outbound_sms_prices.go | 23 +- .../v1/model_pricing_v1_phone_number.go | 19 +- ...ng_v1_phone_number_phone_number_country.go | 17 +- ...ne_number_phone_number_country_instance.go | 17 +- .../rest/pricing/v1/model_pricing_v1_voice.go | 19 +- .../model_pricing_v1_voice_voice_country.go | 15 +- ...pricing_v1_voice_voice_country_instance.go | 15 +- ...country_instance_outbound_prefix_prices.go | 23 +- .../v1/model_pricing_v1_voice_voice_number.go | 19 +- ...1_voice_voice_number_inbound_call_price.go | 19 +- ..._voice_voice_number_outbound_call_price.go | 17 +- twilio/rest/pricing/v2/api_default.go | 128 +- .../v2/model_list_voice_country_response.go | 17 +- .../model_list_voice_country_response_meta.go | 27 +- .../rest/pricing/v2/model_pricing_v2_voice.go | 15 +- .../model_pricing_v2_voice_voice_country.go | 15 +- ...pricing_v2_voice_voice_country_instance.go | 15 +- ...ce_country_instance_inbound_call_prices.go | 19 +- ...country_instance_outbound_prefix_prices.go | 21 +- .../v2/model_pricing_v2_voice_voice_number.go | 19 +- ...2_voice_voice_number_inbound_call_price.go | 19 +- ...voice_voice_number_outbound_call_prices.go | 19 +- twilio/rest/proxy/v1/api_default.go | 1252 +- .../v1/model_list_interaction_response.go | 17 +- ...model_list_message_interaction_response.go | 17 +- .../v1/model_list_participant_response.go | 17 +- .../v1/model_list_phone_number_response.go | 17 +- .../proxy/v1/model_list_service_response.go | 19 +- .../v1/model_list_service_response_meta.go | 27 +- .../proxy/v1/model_list_session_response.go | 17 +- .../v1/model_list_short_code_response.go | 17 +- .../rest/proxy/v1/model_proxy_v1_service.go | 16 +- .../v1/model_proxy_v1_service_phone_number.go | 18 +- ...xy_v1_service_phone_number_capabilities.go | 21 +- .../v1/model_proxy_v1_service_session.go | 16 +- ...el_proxy_v1_service_session_interaction.go | 16 +- ...el_proxy_v1_service_session_participant.go | 16 +- ...session_participant_message_interaction.go | 16 +- .../v1/model_proxy_v1_service_short_code.go | 18 +- ...roxy_v1_service_short_code_capabilities.go | 21 +- twilio/rest/serverless/v1/api_default.go | 1426 +- .../v1/model_list_asset_response.go | 17 +- .../v1/model_list_asset_version_response.go | 17 +- .../v1/model_list_build_response.go | 17 +- .../v1/model_list_deployment_response.go | 17 +- .../v1/model_list_environment_response.go | 17 +- .../v1/model_list_function_response.go | 17 +- .../model_list_function_version_response.go | 17 +- .../serverless/v1/model_list_log_response.go | 17 +- .../v1/model_list_service_response.go | 19 +- .../v1/model_list_service_response_meta.go | 27 +- .../v1/model_list_variable_response.go | 17 +- .../v1/model_serverless_v1_service.go | 16 +- .../v1/model_serverless_v1_service_asset.go | 16 +- ...rverless_v1_service_asset_asset_version.go | 16 +- .../v1/model_serverless_v1_service_build.go | 18 +- ...erverless_v1_service_build_build_status.go | 15 +- ...model_serverless_v1_service_environment.go | 16 +- ...rless_v1_service_environment_deployment.go | 16 +- ...l_serverless_v1_service_environment_log.go | 16 +- ...verless_v1_service_environment_variable.go | 16 +- .../model_serverless_v1_service_function.go | 16 +- ...ss_v1_service_function_function_version.go | 20 +- ...nction_version_function_version_content.go | 15 +- twilio/rest/studio/v1/api_default.go | 732 +- .../v1/model_list_engagement_response.go | 17 +- .../v1/model_list_execution_response.go | 17 +- .../v1/model_list_execution_step_response.go | 17 +- .../studio/v1/model_list_flow_response.go | 19 +- .../v1/model_list_flow_response_meta.go | 27 +- .../studio/v1/model_list_step_response.go | 17 +- twilio/rest/studio/v1/model_studio_v1_flow.go | 16 +- .../v1/model_studio_v1_flow_engagement.go | 16 +- ...o_v1_flow_engagement_engagement_context.go | 15 +- .../model_studio_v1_flow_engagement_step.go | 16 +- ...io_v1_flow_engagement_step_step_context.go | 15 +- .../v1/model_studio_v1_flow_execution.go | 16 +- ...dio_v1_flow_execution_execution_context.go | 15 +- ...studio_v1_flow_execution_execution_step.go | 16 +- ...n_execution_step_execution_step_context.go | 15 +- twilio/rest/studio/v2/api_default.go | 790 +- .../v2/model_list_execution_response.go | 17 +- .../v2/model_list_execution_step_response.go | 17 +- .../studio/v2/model_list_flow_response.go | 19 +- .../v2/model_list_flow_response_meta.go | 27 +- .../v2/model_list_flow_revision_response.go | 17 +- twilio/rest/studio/v2/model_studio_v2_flow.go | 20 +- .../v2/model_studio_v2_flow_execution.go | 16 +- ...dio_v2_flow_execution_execution_context.go | 15 +- ...studio_v2_flow_execution_execution_step.go | 16 +- ...n_execution_step_execution_step_context.go | 15 +- .../v2/model_studio_v2_flow_flow_revision.go | 16 +- .../v2/model_studio_v2_flow_test_user.go | 15 +- .../v2/model_studio_v2_flow_validate.go | 15 +- twilio/rest/supersim/v1/api_default.go | 1038 +- .../v1/model_list_command_response.go | 19 +- .../v1/model_list_command_response_meta.go | 27 +- .../supersim/v1/model_list_fleet_response.go | 19 +- ...network_access_profile_network_response.go | 17 +- ...el_list_network_access_profile_response.go | 17 +- .../v1/model_list_network_response.go | 19 +- .../supersim/v1/model_list_sim_response.go | 17 +- .../v1/model_list_usage_record_response.go | 17 +- .../supersim/v1/model_supersim_v1_command.go | 16 +- .../supersim/v1/model_supersim_v1_fleet.go | 16 +- .../supersim/v1/model_supersim_v1_network.go | 15 +- ...odel_supersim_v1_network_access_profile.go | 20 +- ..._profile_network_access_profile_network.go | 15 +- .../rest/supersim/v1/model_supersim_v1_sim.go | 16 +- .../v1/model_supersim_v1_usage_record.go | 15 +- twilio/rest/sync/v1/api_default.go | 2047 ++- ...model_list_document_permission_response.go | 17 +- .../sync/v1/model_list_document_response.go | 17 +- .../sync/v1/model_list_service_response.go | 19 +- .../v1/model_list_service_response_meta.go | 27 +- .../v1/model_list_sync_list_item_response.go | 17 +- ...odel_list_sync_list_permission_response.go | 17 +- .../sync/v1/model_list_sync_list_response.go | 17 +- .../v1/model_list_sync_map_item_response.go | 17 +- ...model_list_sync_map_permission_response.go | 17 +- .../sync/v1/model_list_sync_map_response.go | 17 +- .../v1/model_list_sync_stream_response.go | 17 +- twilio/rest/sync/v1/model_sync_v1_service.go | 16 +- .../sync/v1/model_sync_v1_service_document.go | 16 +- ...v1_service_document_document_permission.go | 15 +- .../v1/model_sync_v1_service_sync_list.go | 16 +- ...ync_v1_service_sync_list_sync_list_item.go | 16 +- ..._service_sync_list_sync_list_permission.go | 15 +- .../sync/v1/model_sync_v1_service_sync_map.go | 16 +- ..._sync_v1_service_sync_map_sync_map_item.go | 16 +- ...v1_service_sync_map_sync_map_permission.go | 15 +- .../v1/model_sync_v1_service_sync_stream.go | 16 +- ...c_v1_service_sync_stream_stream_message.go | 15 +- twilio/rest/taskrouter/v1/api_default.go | 3915 +++--- .../v1/model_list_activity_response.go | 17 +- .../v1/model_list_event_response.go | 17 +- .../v1/model_list_task_channel_response.go | 17 +- .../v1/model_list_task_queue_response.go | 17 +- ...el_list_task_queues_statistics_response.go | 17 +- .../model_list_task_reservation_response.go | 17 +- .../taskrouter/v1/model_list_task_response.go | 17 +- .../v1/model_list_worker_channel_response.go | 17 +- .../model_list_worker_reservation_response.go | 17 +- .../v1/model_list_worker_response.go | 17 +- .../v1/model_list_workflow_response.go | 17 +- .../v1/model_list_workspace_response.go | 19 +- .../v1/model_list_workspace_response_meta.go | 27 +- .../v1/model_taskrouter_v1_workspace.go | 16 +- .../model_taskrouter_v1_workspace_activity.go | 16 +- .../v1/model_taskrouter_v1_workspace_event.go | 16 +- .../v1/model_taskrouter_v1_workspace_task.go | 16 +- ...el_taskrouter_v1_workspace_task_channel.go | 16 +- ...odel_taskrouter_v1_workspace_task_queue.go | 16 +- ..._queue_task_queue_cumulative_statistics.go | 16 +- ...k_queue_task_queue_real_time_statistics.go | 15 +- ...kspace_task_queue_task_queue_statistics.go | 15 +- ...space_task_queue_task_queues_statistics.go | 15 +- ...uter_v1_workspace_task_task_reservation.go | 16 +- .../model_taskrouter_v1_workspace_worker.go | 16 +- ...uter_v1_workspace_worker_worker_channel.go | 16 +- ...space_worker_worker_instance_statistics.go | 15 +- ..._v1_workspace_worker_worker_reservation.go | 16 +- ...r_v1_workspace_worker_worker_statistics.go | 15 +- ...ce_worker_workers_cumulative_statistics.go | 16 +- ...ace_worker_workers_real_time_statistics.go | 15 +- .../model_taskrouter_v1_workspace_workflow.go | 16 +- ...workflow_workflow_cumulative_statistics.go | 16 +- ..._workflow_workflow_real_time_statistics.go | 15 +- ..._workspace_workflow_workflow_statistics.go | 15 +- ...rkspace_workspace_cumulative_statistics.go | 16 +- ...orkspace_workspace_real_time_statistics.go | 15 +- ...outer_v1_workspace_workspace_statistics.go | 15 +- twilio/rest/trunking/v1/api_default.go | 968 +- .../v1/model_list_credential_list_response.go | 17 +- ...el_list_ip_access_control_list_response.go | 17 +- .../v1/model_list_origination_url_response.go | 17 +- .../v1/model_list_phone_number_response.go | 17 +- .../trunking/v1/model_list_trunk_response.go | 19 +- .../v1/model_list_trunk_response_meta.go | 27 +- .../trunking/v1/model_trunking_v1_trunk.go | 16 +- ...model_trunking_v1_trunk_credential_list.go | 16 +- ...runking_v1_trunk_ip_access_control_list.go | 16 +- ...model_trunking_v1_trunk_origination_url.go | 16 +- .../model_trunking_v1_trunk_phone_number.go | 16 +- .../v1/model_trunking_v1_trunk_recording.go | 15 +- twilio/rest/trusthub/v1/api_default.go | 1882 ++- ...le_channel_endpoint_assignment_response.go | 17 +- ...omer_profile_entity_assignment_response.go | 17 +- ...st_customer_profile_evaluation_response.go | 17 +- .../model_list_customer_profile_response.go | 19 +- ...del_list_customer_profile_response_meta.go | 27 +- .../v1/model_list_end_user_response.go | 19 +- .../v1/model_list_end_user_type_response.go | 19 +- .../v1/model_list_policies_response.go | 19 +- ...model_list_supporting_document_response.go | 19 +- ..._list_supporting_document_type_response.go | 17 +- ...ct_channel_endpoint_assignment_response.go | 17 +- ...rust_product_entity_assignment_response.go | 17 +- ..._list_trust_product_evaluation_response.go | 17 +- .../v1/model_list_trust_product_response.go | 19 +- .../v1/model_trusthub_v1_customer_profile.go | 16 +- ...mer_profile_channel_endpoint_assignment.go | 16 +- ...file_customer_profile_entity_assignment.go | 16 +- ...mer_profile_customer_profile_evaluation.go | 22 +- .../trusthub/v1/model_trusthub_v1_end_user.go | 16 +- .../v1/model_trusthub_v1_end_user_type.go | 15 +- .../trusthub/v1/model_trusthub_v1_policies.go | 15 +- .../model_trusthub_v1_supporting_document.go | 16 +- ...el_trusthub_v1_supporting_document_type.go | 15 +- .../v1/model_trusthub_v1_trust_product.go | 16 +- ...ust_product_channel_endpoint_assignment.go | 16 +- ...product_trust_product_entity_assignment.go | 16 +- ..._trust_product_trust_product_evaluation.go | 20 +- twilio/rest/verify/v2/api_default.go | 2124 ++- .../verify/v2/model_list_bucket_response.go | 19 +- .../v2/model_list_challenge_response.go | 19 +- .../verify/v2/model_list_entity_response.go | 19 +- .../verify/v2/model_list_factor_response.go | 19 +- ...l_list_messaging_configuration_response.go | 17 +- .../v2/model_list_rate_limit_response.go | 19 +- .../verify/v2/model_list_service_response.go | 19 +- ...odel_list_verification_attempt_response.go | 19 +- ...list_verification_attempt_response_meta.go | 27 +- .../verify/v2/model_list_webhook_response.go | 19 +- twilio/rest/verify/v2/model_verify_v2_form.go | 15 +- .../rest/verify/v2/model_verify_v2_service.go | 16 +- .../model_verify_v2_service_access_token.go | 15 +- .../v2/model_verify_v2_service_entity.go | 16 +- ...odel_verify_v2_service_entity_challenge.go | 16 +- .../model_verify_v2_service_entity_factor.go | 16 +- ...rify_v2_service_messaging_configuration.go | 16 +- .../v2/model_verify_v2_service_rate_limit.go | 16 +- ...del_verify_v2_service_rate_limit_bucket.go | 16 +- .../model_verify_v2_service_verification.go | 16 +- ...el_verify_v2_service_verification_check.go | 16 +- .../v2/model_verify_v2_service_webhook.go | 16 +- .../model_verify_v2_verification_attempt.go | 18 +- twilio/rest/video/v1/api_default.go | 1751 ++- .../model_list_composition_hook_response.go | 19 +- ...del_list_composition_hook_response_meta.go | 27 +- .../v1/model_list_composition_response.go | 19 +- .../video/v1/model_list_recording_response.go | 19 +- ...om_participant_published_track_response.go | 17 +- .../model_list_room_participant_response.go | 19 +- ...m_participant_subscribed_track_response.go | 17 +- .../v1/model_list_room_recording_response.go | 19 +- .../rest/video/v1/model_list_room_response.go | 19 +- .../video/v1/model_video_v1_composition.go | 16 +- .../v1/model_video_v1_composition_hook.go | 16 +- .../v1/model_video_v1_composition_settings.go | 15 +- .../rest/video/v1/model_video_v1_recording.go | 16 +- .../v1/model_video_v1_recording_settings.go | 15 +- twilio/rest/video/v1/model_video_v1_room.go | 16 +- .../model_video_v1_room_room_participant.go | 16 +- ...cipant_room_participant_published_track.go | 16 +- ...icipant_room_participant_subscribe_rule.go | 16 +- ...ipant_room_participant_subscribed_track.go | 16 +- .../v1/model_video_v1_room_room_recording.go | 16 +- ...model_video_v1_room_room_recording_rule.go | 16 +- ...video_v1_room_room_recording_rule_rules.go | 23 +- twilio/rest/voice/v1/api_default.go | 1332 +- .../v1/model_list_byoc_trunk_response.go | 19 +- .../v1/model_list_byoc_trunk_response_meta.go | 27 +- .../model_list_connection_policy_response.go | 17 +- ..._list_connection_policy_target_response.go | 17 +- ...st_dialing_permissions_country_response.go | 17 +- ...aling_permissions_hrs_prefixes_response.go | 17 +- .../voice/v1/model_list_ip_record_response.go | 19 +- .../model_list_source_ip_mapping_response.go | 19 +- .../voice/v1/model_voice_v1_byoc_trunk.go | 16 +- .../v1/model_voice_v1_connection_policy.go | 16 +- ...nection_policy_connection_policy_target.go | 16 +- ...permissions_dialing_permissions_country.go | 15 +- ...dialing_permissions_country_bulk_update.go | 15 +- ...ountry_dialing_permissions_hrs_prefixes.go | 15 +- ...ns_dialing_permissions_country_instance.go | 15 +- ...ermissions_dialing_permissions_settings.go | 15 +- .../rest/voice/v1/model_voice_v1_ip_record.go | 16 +- .../v1/model_voice_v1_source_ip_mapping.go | 16 +- twilio/rest/wireless/v1/api_default.go | 950 +- ...odel_list_account_usage_record_response.go | 17 +- .../v1/model_list_command_response.go | 19 +- .../v1/model_list_command_response_meta.go | 27 +- .../v1/model_list_data_session_response.go | 17 +- .../v1/model_list_rate_plan_response.go | 19 +- .../wireless/v1/model_list_sim_response.go | 17 +- .../v1/model_list_usage_record_response.go | 17 +- .../model_wireless_v1_account_usage_record.go | 15 +- .../wireless/v1/model_wireless_v1_command.go | 16 +- .../v1/model_wireless_v1_rate_plan.go | 16 +- .../rest/wireless/v1/model_wireless_v1_sim.go | 16 +- .../v1/model_wireless_v1_sim_data_session.go | 16 +- .../v1/model_wireless_v1_sim_usage_record.go | 15 +- 707 files changed, 33772 insertions(+), 33762 deletions(-) diff --git a/twilio/rest/accounts/v1/api_default.go b/twilio/rest/accounts/v1/api_default.go index 7efbd8810..11faf1289 100644 --- a/twilio/rest/accounts/v1/api_default.go +++ b/twilio/rest/accounts/v1/api_default.go @@ -1,11 +1,11 @@ /* - * Twilio - Accounts - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Accounts + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,9 +14,10 @@ package openapi import ( "encoding/json" "fmt" - twilio "github.com/twilio/twilio-go/client" "net/url" - "strings" + "strings" + + twilio "github.com/twilio/twilio-go/client" ) type DefaultApiService struct { @@ -25,16 +26,16 @@ type DefaultApiService struct { } func NewDefaultApiService(client *twilio.Client) *DefaultApiService { - return &DefaultApiService { - client: client, + return &DefaultApiService{ + client: client, baseURL: "https://accounts.twilio.com", } } // CreateCredentialAwsParams Optional parameters for the method 'CreateCredentialAws' type CreateCredentialAwsParams struct { - AccountSid *string `json:"AccountSid,omitempty"` - Credentials *string `json:"Credentials,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` + Credentials *string `json:"Credentials,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` } @@ -46,43 +47,43 @@ type CreateCredentialAwsParams struct { * @param "Credentials" (string) - A string that contains the AWS access credentials in the format `:`. For example, `AKIAIOSFODNN7EXAMPLE:wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY` * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It can be up to 64 characters long. * @return AccountsV1CredentialCredentialAws -*/ + */ func (c *DefaultApiService) CreateCredentialAws(params *CreateCredentialAwsParams) (*AccountsV1CredentialCredentialAws, error) { - path := "/v1/Credentials/AWS" + path := "/v1/Credentials/AWS" - data := url.Values{} - headers := 0 - - if params != nil && params.AccountSid != nil { - data.Set("AccountSid", *params.AccountSid) -} - if params != nil && params.Credentials != nil { - data.Set("Credentials", *params.Credentials) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} + data := url.Values{} + headers := 0 + if params != nil && params.AccountSid != nil { + data.Set("AccountSid", *params.AccountSid) + } + if params != nil && params.Credentials != nil { + data.Set("Credentials", *params.Credentials) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &AccountsV1CredentialCredentialAws{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &AccountsV1CredentialCredentialAws{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateCredentialPublicKeyParams Optional parameters for the method 'CreateCredentialPublicKey' type CreateCredentialPublicKeyParams struct { - AccountSid *string `json:"AccountSid,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` - PublicKey *string `json:"PublicKey,omitempty"` + PublicKey *string `json:"PublicKey,omitempty"` } /* @@ -93,135 +94,126 @@ type CreateCredentialPublicKeyParams struct { * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It can be up to 64 characters long. * @param "PublicKey" (string) - A URL encoded representation of the public key. For example, `-----BEGIN PUBLIC KEY-----MIIBIjANB.pa9xQIDAQAB-----END PUBLIC KEY-----` * @return AccountsV1CredentialCredentialPublicKey -*/ + */ func (c *DefaultApiService) CreateCredentialPublicKey(params *CreateCredentialPublicKeyParams) (*AccountsV1CredentialCredentialPublicKey, error) { - path := "/v1/Credentials/PublicKeys" + path := "/v1/Credentials/PublicKeys" - data := url.Values{} - headers := 0 - - if params != nil && params.AccountSid != nil { - data.Set("AccountSid", *params.AccountSid) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.PublicKey != nil { - data.Set("PublicKey", *params.PublicKey) -} + data := url.Values{} + headers := 0 + if params != nil && params.AccountSid != nil { + data.Set("AccountSid", *params.AccountSid) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.PublicKey != nil { + data.Set("PublicKey", *params.PublicKey) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &AccountsV1CredentialCredentialPublicKey{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &AccountsV1CredentialCredentialPublicKey{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * CreateSecondaryAuthToken Method for CreateSecondaryAuthToken * Create a new secondary Auth Token * @return AccountsV1SecondaryAuthToken -*/ + */ func (c *DefaultApiService) CreateSecondaryAuthToken() (*AccountsV1SecondaryAuthToken, error) { - path := "/v1/AuthTokens/Secondary" - - data := url.Values{} - headers := 0 + path := "/v1/AuthTokens/Secondary" + data := url.Values{} + headers := 0 + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &AccountsV1SecondaryAuthToken{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &AccountsV1SecondaryAuthToken{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * DeleteCredentialAws Method for DeleteCredentialAws * Delete a Credential from your account * @param Sid The Twilio-provided string that uniquely identifies the AWS resource to delete. -*/ -func (c *DefaultApiService) DeleteCredentialAws(Sid string, ) (error) { - path := "/v1/Credentials/AWS/{Sid}" + */ +func (c *DefaultApiService) DeleteCredentialAws(Sid string) error { + path := "/v1/Credentials/AWS/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* * DeleteCredentialPublicKey Method for DeleteCredentialPublicKey * Delete a Credential from your account * @param Sid The Twilio-provided string that uniquely identifies the PublicKey resource to delete. -*/ -func (c *DefaultApiService) DeleteCredentialPublicKey(Sid string, ) (error) { - path := "/v1/Credentials/PublicKeys/{Sid}" + */ +func (c *DefaultApiService) DeleteCredentialPublicKey(Sid string) error { + path := "/v1/Credentials/PublicKeys/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* * DeleteSecondaryAuthToken Method for DeleteSecondaryAuthToken * Delete the secondary Auth Token from your account -*/ -func (c *DefaultApiService) DeleteSecondaryAuthToken() (error) { - path := "/v1/AuthTokens/Secondary" + */ +func (c *DefaultApiService) DeleteSecondaryAuthToken() error { + path := "/v1/AuthTokens/Secondary" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + defer resp.Body.Close() - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() - - return nil + return nil } /* @@ -229,29 +221,27 @@ func (c *DefaultApiService) DeleteSecondaryAuthToken() (error) { * Fetch the AWS credentials specified by the provided Credential Sid * @param Sid The Twilio-provided string that uniquely identifies the AWS resource to fetch. * @return AccountsV1CredentialCredentialAws -*/ -func (c *DefaultApiService) FetchCredentialAws(Sid string, ) (*AccountsV1CredentialCredentialAws, error) { - path := "/v1/Credentials/AWS/{Sid}" + */ +func (c *DefaultApiService) FetchCredentialAws(Sid string) (*AccountsV1CredentialCredentialAws, error) { + path := "/v1/Credentials/AWS/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &AccountsV1CredentialCredentialAws{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &AccountsV1CredentialCredentialAws{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -259,30 +249,29 @@ func (c *DefaultApiService) FetchCredentialAws(Sid string, ) (*AccountsV1Credent * Fetch the public key specified by the provided Credential Sid * @param Sid The Twilio-provided string that uniquely identifies the PublicKey resource to fetch. * @return AccountsV1CredentialCredentialPublicKey -*/ -func (c *DefaultApiService) FetchCredentialPublicKey(Sid string, ) (*AccountsV1CredentialCredentialPublicKey, error) { - path := "/v1/Credentials/PublicKeys/{Sid}" + */ +func (c *DefaultApiService) FetchCredentialPublicKey(Sid string) (*AccountsV1CredentialCredentialPublicKey, error) { + path := "/v1/Credentials/PublicKeys/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &AccountsV1CredentialCredentialPublicKey{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &AccountsV1CredentialCredentialPublicKey{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListCredentialAwsParams Optional parameters for the method 'ListCredentialAws' type ListCredentialAwsParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -294,32 +283,32 @@ type ListCredentialAwsParams struct { * @param optional nil or *ListCredentialAwsParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListCredentialAwsResponse -*/ + */ func (c *DefaultApiService) ListCredentialAws(params *ListCredentialAwsParams) (*ListCredentialAwsResponse, error) { - path := "/v1/Credentials/AWS" - - data := url.Values{} - headers := 0 + path := "/v1/Credentials/AWS" - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListCredentialAwsResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListCredentialAwsResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListCredentialPublicKeyParams Optional parameters for the method 'ListCredentialPublicKey' type ListCredentialPublicKeyParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -331,60 +320,58 @@ type ListCredentialPublicKeyParams struct { * @param optional nil or *ListCredentialPublicKeyParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListCredentialPublicKeyResponse -*/ + */ func (c *DefaultApiService) ListCredentialPublicKey(params *ListCredentialPublicKeyParams) (*ListCredentialPublicKeyResponse, error) { - path := "/v1/Credentials/PublicKeys" + path := "/v1/Credentials/PublicKeys" - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListCredentialPublicKeyResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListCredentialPublicKeyResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * UpdateAuthTokenPromotion Method for UpdateAuthTokenPromotion * Promote the secondary Auth Token to primary. After promoting the new token, all requests to Twilio using your old primary Auth Token will result in an error. * @return AccountsV1AuthTokenPromotion -*/ + */ func (c *DefaultApiService) UpdateAuthTokenPromotion() (*AccountsV1AuthTokenPromotion, error) { - path := "/v1/AuthTokens/Promote" - - data := url.Values{} - headers := 0 - + path := "/v1/AuthTokens/Promote" + data := url.Values{} + headers := 0 - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &AccountsV1AuthTokenPromotion{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &AccountsV1AuthTokenPromotion{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateCredentialAwsParams Optional parameters for the method 'UpdateCredentialAws' type UpdateCredentialAwsParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` @@ -397,33 +384,33 @@ type UpdateCredentialAwsParams struct { * @param optional nil or *UpdateCredentialAwsParams - Optional Parameters: * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It can be up to 64 characters long. * @return AccountsV1CredentialCredentialAws -*/ + */ func (c *DefaultApiService) UpdateCredentialAws(Sid string, params *UpdateCredentialAwsParams) (*AccountsV1CredentialCredentialAws, error) { - path := "/v1/Credentials/AWS/{Sid}" + path := "/v1/Credentials/AWS/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} + data := url.Values{} + headers := 0 + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &AccountsV1CredentialCredentialAws{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &AccountsV1CredentialCredentialAws{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateCredentialPublicKeyParams Optional parameters for the method 'UpdateCredentialPublicKey' type UpdateCredentialPublicKeyParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` @@ -436,30 +423,29 @@ type UpdateCredentialPublicKeyParams struct { * @param optional nil or *UpdateCredentialPublicKeyParams - Optional Parameters: * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It can be up to 64 characters long. * @return AccountsV1CredentialCredentialPublicKey -*/ + */ func (c *DefaultApiService) UpdateCredentialPublicKey(Sid string, params *UpdateCredentialPublicKeyParams) (*AccountsV1CredentialCredentialPublicKey, error) { - path := "/v1/Credentials/PublicKeys/{Sid}" + path := "/v1/Credentials/PublicKeys/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} + data := url.Values{} + headers := 0 + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &AccountsV1CredentialCredentialPublicKey{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &AccountsV1CredentialCredentialPublicKey{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } diff --git a/twilio/rest/accounts/v1/model_accounts_v1_auth_token_promotion.go b/twilio/rest/accounts/v1/model_accounts_v1_auth_token_promotion.go index 00962c709..d62eb9a85 100644 --- a/twilio/rest/accounts/v1/model_accounts_v1_auth_token_promotion.go +++ b/twilio/rest/accounts/v1/model_accounts_v1_auth_token_promotion.go @@ -1,18 +1,20 @@ /* - * Twilio - Accounts - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Accounts + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // AccountsV1AuthTokenPromotion struct for AccountsV1AuthTokenPromotion type AccountsV1AuthTokenPromotion struct { // The SID of the Account that the secondary Auth Token was created for diff --git a/twilio/rest/accounts/v1/model_accounts_v1_credential_credential_aws.go b/twilio/rest/accounts/v1/model_accounts_v1_credential_credential_aws.go index 8a8bc6e37..f43b14e27 100644 --- a/twilio/rest/accounts/v1/model_accounts_v1_credential_credential_aws.go +++ b/twilio/rest/accounts/v1/model_accounts_v1_credential_credential_aws.go @@ -1,18 +1,20 @@ /* - * Twilio - Accounts - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Accounts + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // AccountsV1CredentialCredentialAws struct for AccountsV1CredentialCredentialAws type AccountsV1CredentialCredentialAws struct { // The SID of the Account that created the resource diff --git a/twilio/rest/accounts/v1/model_accounts_v1_credential_credential_public_key.go b/twilio/rest/accounts/v1/model_accounts_v1_credential_credential_public_key.go index 35d0e7fa4..cb8fa0646 100644 --- a/twilio/rest/accounts/v1/model_accounts_v1_credential_credential_public_key.go +++ b/twilio/rest/accounts/v1/model_accounts_v1_credential_credential_public_key.go @@ -1,18 +1,20 @@ /* - * Twilio - Accounts - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Accounts + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // AccountsV1CredentialCredentialPublicKey struct for AccountsV1CredentialCredentialPublicKey type AccountsV1CredentialCredentialPublicKey struct { // The SID of the Account that created the Credential that the PublicKey resource belongs to diff --git a/twilio/rest/accounts/v1/model_accounts_v1_secondary_auth_token.go b/twilio/rest/accounts/v1/model_accounts_v1_secondary_auth_token.go index 835845989..d8aa60d6b 100644 --- a/twilio/rest/accounts/v1/model_accounts_v1_secondary_auth_token.go +++ b/twilio/rest/accounts/v1/model_accounts_v1_secondary_auth_token.go @@ -1,18 +1,20 @@ /* - * Twilio - Accounts - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Accounts + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // AccountsV1SecondaryAuthToken struct for AccountsV1SecondaryAuthToken type AccountsV1SecondaryAuthToken struct { // The SID of the Account that the secondary Auth Token was created for diff --git a/twilio/rest/accounts/v1/model_list_credential_aws_response.go b/twilio/rest/accounts/v1/model_list_credential_aws_response.go index bb5d9a21d..49a391f4e 100644 --- a/twilio/rest/accounts/v1/model_list_credential_aws_response.go +++ b/twilio/rest/accounts/v1/model_list_credential_aws_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Accounts - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Accounts + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListCredentialAwsResponse struct for ListCredentialAwsResponse type ListCredentialAwsResponse struct { Credentials []AccountsV1CredentialCredentialAws `json:"Credentials,omitempty"` - Meta ListCredentialAwsResponseMeta `json:"Meta,omitempty"` + Meta ListCredentialAwsResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/accounts/v1/model_list_credential_aws_response_meta.go b/twilio/rest/accounts/v1/model_list_credential_aws_response_meta.go index 469a2216b..2708b6a4d 100644 --- a/twilio/rest/accounts/v1/model_list_credential_aws_response_meta.go +++ b/twilio/rest/accounts/v1/model_list_credential_aws_response_meta.go @@ -1,22 +1,23 @@ /* - * Twilio - Accounts - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Accounts + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListCredentialAwsResponseMeta struct for ListCredentialAwsResponseMeta type ListCredentialAwsResponseMeta struct { - FirstPageUrl string `json:"FirstPageUrl,omitempty"` - Key string `json:"Key,omitempty"` - NextPageUrl string `json:"NextPageUrl,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` - Url string `json:"Url,omitempty"` + Url string `json:"Url,omitempty"` } diff --git a/twilio/rest/accounts/v1/model_list_credential_public_key_response.go b/twilio/rest/accounts/v1/model_list_credential_public_key_response.go index ccefdafe8..2eb62533e 100644 --- a/twilio/rest/accounts/v1/model_list_credential_public_key_response.go +++ b/twilio/rest/accounts/v1/model_list_credential_public_key_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Accounts - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Accounts + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListCredentialPublicKeyResponse struct for ListCredentialPublicKeyResponse type ListCredentialPublicKeyResponse struct { Credentials []AccountsV1CredentialCredentialPublicKey `json:"Credentials,omitempty"` - Meta ListCredentialAwsResponseMeta `json:"Meta,omitempty"` + Meta ListCredentialAwsResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/api/v2010/api_default.go b/twilio/rest/api/v2010/api_default.go index bbd8aed64..0342542dd 100644 --- a/twilio/rest/api/v2010/api_default.go +++ b/twilio/rest/api/v2010/api_default.go @@ -1,11 +1,11 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,10 +14,11 @@ package openapi import ( "encoding/json" "fmt" - twilio "github.com/twilio/twilio-go/client" "net/url" - "strings" - "time" + "strings" + "time" + + twilio "github.com/twilio/twilio-go/client" ) type DefaultApiService struct { @@ -26,8 +27,8 @@ type DefaultApiService struct { } func NewDefaultApiService(client *twilio.Client) *DefaultApiService { - return &DefaultApiService { - client: client, + return &DefaultApiService{ + client: client, baseURL: "https://api.twilio.com", } } @@ -43,43 +44,43 @@ type CreateAccountParams struct { * @param optional nil or *CreateAccountParams - Optional Parameters: * @param "FriendlyName" (string) - A human readable description of the account to create, defaults to `SubAccount Created at {YYYY-MM-DD HH:MM meridian}` * @return ApiV2010Account -*/ + */ func (c *DefaultApiService) CreateAccount(params *CreateAccountParams) (*ApiV2010Account, error) { - path := "/2010-04-01/Accounts.json" - - data := url.Values{} - headers := 0 + path := "/2010-04-01/Accounts.json" - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} + data := url.Values{} + headers := 0 + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010Account{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010Account{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateAddressParams Optional parameters for the method 'CreateAddress' type CreateAddressParams struct { - AutoCorrectAddress *bool `json:"AutoCorrectAddress,omitempty"` - City *string `json:"City,omitempty"` - CustomerName *string `json:"CustomerName,omitempty"` - EmergencyEnabled *bool `json:"EmergencyEnabled,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - IsoCountry *string `json:"IsoCountry,omitempty"` - PostalCode *string `json:"PostalCode,omitempty"` - Region *string `json:"Region,omitempty"` - Street *string `json:"Street,omitempty"` + AutoCorrectAddress *bool `json:"AutoCorrectAddress,omitempty"` + City *string `json:"City,omitempty"` + CustomerName *string `json:"CustomerName,omitempty"` + EmergencyEnabled *bool `json:"EmergencyEnabled,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + IsoCountry *string `json:"IsoCountry,omitempty"` + PostalCode *string `json:"PostalCode,omitempty"` + Region *string `json:"Region,omitempty"` + Street *string `json:"Street,omitempty"` } /* @@ -96,74 +97,74 @@ type CreateAddressParams struct { * @param "Region" (string) - The state or region of the new address. * @param "Street" (string) - The number and street address of the new address. * @return ApiV2010AccountAddress -*/ + */ func (c *DefaultApiService) CreateAddress(AccountSid string, params *CreateAddressParams) (*ApiV2010AccountAddress, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Addresses.json" + path := "/2010-04-01/Accounts/{AccountSid}/Addresses.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.AutoCorrectAddress != nil { - data.Set("AutoCorrectAddress", fmt.Sprint(*params.AutoCorrectAddress)) -} - if params != nil && params.City != nil { - data.Set("City", *params.City) -} - if params != nil && params.CustomerName != nil { - data.Set("CustomerName", *params.CustomerName) -} - if params != nil && params.EmergencyEnabled != nil { - data.Set("EmergencyEnabled", fmt.Sprint(*params.EmergencyEnabled)) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.IsoCountry != nil { - data.Set("IsoCountry", *params.IsoCountry) -} - if params != nil && params.PostalCode != nil { - data.Set("PostalCode", *params.PostalCode) -} - if params != nil && params.Region != nil { - data.Set("Region", *params.Region) -} - if params != nil && params.Street != nil { - data.Set("Street", *params.Street) -} + data := url.Values{} + headers := 0 + if params != nil && params.AutoCorrectAddress != nil { + data.Set("AutoCorrectAddress", fmt.Sprint(*params.AutoCorrectAddress)) + } + if params != nil && params.City != nil { + data.Set("City", *params.City) + } + if params != nil && params.CustomerName != nil { + data.Set("CustomerName", *params.CustomerName) + } + if params != nil && params.EmergencyEnabled != nil { + data.Set("EmergencyEnabled", fmt.Sprint(*params.EmergencyEnabled)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.IsoCountry != nil { + data.Set("IsoCountry", *params.IsoCountry) + } + if params != nil && params.PostalCode != nil { + data.Set("PostalCode", *params.PostalCode) + } + if params != nil && params.Region != nil { + data.Set("Region", *params.Region) + } + if params != nil && params.Street != nil { + data.Set("Street", *params.Street) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountAddress{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountAddress{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateApplicationParams Optional parameters for the method 'CreateApplication' type CreateApplicationParams struct { - ApiVersion *string `json:"ApiVersion,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` + ApiVersion *string `json:"ApiVersion,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` MessageStatusCallback *string `json:"MessageStatusCallback,omitempty"` - SmsFallbackMethod *string `json:"SmsFallbackMethod,omitempty"` - SmsFallbackUrl *string `json:"SmsFallbackUrl,omitempty"` - SmsMethod *string `json:"SmsMethod,omitempty"` - SmsStatusCallback *string `json:"SmsStatusCallback,omitempty"` - SmsUrl *string `json:"SmsUrl,omitempty"` - StatusCallback *string `json:"StatusCallback,omitempty"` - StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` - VoiceCallerIdLookup *bool `json:"VoiceCallerIdLookup,omitempty"` - VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"` - VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` - VoiceMethod *string `json:"VoiceMethod,omitempty"` - VoiceUrl *string `json:"VoiceUrl,omitempty"` + SmsFallbackMethod *string `json:"SmsFallbackMethod,omitempty"` + SmsFallbackUrl *string `json:"SmsFallbackUrl,omitempty"` + SmsMethod *string `json:"SmsMethod,omitempty"` + SmsStatusCallback *string `json:"SmsStatusCallback,omitempty"` + SmsUrl *string `json:"SmsUrl,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` + StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` + VoiceCallerIdLookup *bool `json:"VoiceCallerIdLookup,omitempty"` + VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"` + VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` + VoiceMethod *string `json:"VoiceMethod,omitempty"` + VoiceUrl *string `json:"VoiceUrl,omitempty"` } /* @@ -187,110 +188,110 @@ type CreateApplicationParams struct { * @param "VoiceMethod" (string) - The HTTP method we should use to call `voice_url`. Can be: `GET` or `POST`. * @param "VoiceUrl" (string) - The URL we should call when the phone number assigned to this application receives a call. * @return ApiV2010AccountApplication -*/ + */ func (c *DefaultApiService) CreateApplication(AccountSid string, params *CreateApplicationParams) (*ApiV2010AccountApplication, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Applications.json" + path := "/2010-04-01/Accounts/{AccountSid}/Applications.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.ApiVersion != nil { - data.Set("ApiVersion", *params.ApiVersion) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.MessageStatusCallback != nil { - data.Set("MessageStatusCallback", *params.MessageStatusCallback) -} - if params != nil && params.SmsFallbackMethod != nil { - data.Set("SmsFallbackMethod", *params.SmsFallbackMethod) -} - if params != nil && params.SmsFallbackUrl != nil { - data.Set("SmsFallbackUrl", *params.SmsFallbackUrl) -} - if params != nil && params.SmsMethod != nil { - data.Set("SmsMethod", *params.SmsMethod) -} - if params != nil && params.SmsStatusCallback != nil { - data.Set("SmsStatusCallback", *params.SmsStatusCallback) -} - if params != nil && params.SmsUrl != nil { - data.Set("SmsUrl", *params.SmsUrl) -} - if params != nil && params.StatusCallback != nil { - data.Set("StatusCallback", *params.StatusCallback) -} - if params != nil && params.StatusCallbackMethod != nil { - data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) -} - if params != nil && params.VoiceCallerIdLookup != nil { - data.Set("VoiceCallerIdLookup", fmt.Sprint(*params.VoiceCallerIdLookup)) -} - if params != nil && params.VoiceFallbackMethod != nil { - data.Set("VoiceFallbackMethod", *params.VoiceFallbackMethod) -} - if params != nil && params.VoiceFallbackUrl != nil { - data.Set("VoiceFallbackUrl", *params.VoiceFallbackUrl) -} - if params != nil && params.VoiceMethod != nil { - data.Set("VoiceMethod", *params.VoiceMethod) -} - if params != nil && params.VoiceUrl != nil { - data.Set("VoiceUrl", *params.VoiceUrl) -} + data := url.Values{} + headers := 0 + if params != nil && params.ApiVersion != nil { + data.Set("ApiVersion", *params.ApiVersion) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.MessageStatusCallback != nil { + data.Set("MessageStatusCallback", *params.MessageStatusCallback) + } + if params != nil && params.SmsFallbackMethod != nil { + data.Set("SmsFallbackMethod", *params.SmsFallbackMethod) + } + if params != nil && params.SmsFallbackUrl != nil { + data.Set("SmsFallbackUrl", *params.SmsFallbackUrl) + } + if params != nil && params.SmsMethod != nil { + data.Set("SmsMethod", *params.SmsMethod) + } + if params != nil && params.SmsStatusCallback != nil { + data.Set("SmsStatusCallback", *params.SmsStatusCallback) + } + if params != nil && params.SmsUrl != nil { + data.Set("SmsUrl", *params.SmsUrl) + } + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) + } + if params != nil && params.StatusCallbackMethod != nil { + data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) + } + if params != nil && params.VoiceCallerIdLookup != nil { + data.Set("VoiceCallerIdLookup", fmt.Sprint(*params.VoiceCallerIdLookup)) + } + if params != nil && params.VoiceFallbackMethod != nil { + data.Set("VoiceFallbackMethod", *params.VoiceFallbackMethod) + } + if params != nil && params.VoiceFallbackUrl != nil { + data.Set("VoiceFallbackUrl", *params.VoiceFallbackUrl) + } + if params != nil && params.VoiceMethod != nil { + data.Set("VoiceMethod", *params.VoiceMethod) + } + if params != nil && params.VoiceUrl != nil { + data.Set("VoiceUrl", *params.VoiceUrl) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountApplication{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountApplication{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateCallParams Optional parameters for the method 'CreateCall' type CreateCallParams struct { - ApplicationSid *string `json:"ApplicationSid,omitempty"` - AsyncAmd *string `json:"AsyncAmd,omitempty"` - AsyncAmdStatusCallback *string `json:"AsyncAmdStatusCallback,omitempty"` - AsyncAmdStatusCallbackMethod *string `json:"AsyncAmdStatusCallbackMethod,omitempty"` - Byoc *string `json:"Byoc,omitempty"` - CallReason *string `json:"CallReason,omitempty"` - CallerId *string `json:"CallerId,omitempty"` - FallbackMethod *string `json:"FallbackMethod,omitempty"` - FallbackUrl *string `json:"FallbackUrl,omitempty"` - From *string `json:"From,omitempty"` - MachineDetection *string `json:"MachineDetection,omitempty"` - MachineDetectionSilenceTimeout *int32 `json:"MachineDetectionSilenceTimeout,omitempty"` - MachineDetectionSpeechEndThreshold *int32 `json:"MachineDetectionSpeechEndThreshold,omitempty"` - MachineDetectionSpeechThreshold *int32 `json:"MachineDetectionSpeechThreshold,omitempty"` - MachineDetectionTimeout *int32 `json:"MachineDetectionTimeout,omitempty"` - Method *string `json:"Method,omitempty"` - Record *bool `json:"Record,omitempty"` - RecordingChannels *string `json:"RecordingChannels,omitempty"` - RecordingStatusCallback *string `json:"RecordingStatusCallback,omitempty"` - RecordingStatusCallbackEvent *[]string `json:"RecordingStatusCallbackEvent,omitempty"` - RecordingStatusCallbackMethod *string `json:"RecordingStatusCallbackMethod,omitempty"` - RecordingTrack *string `json:"RecordingTrack,omitempty"` - SendDigits *string `json:"SendDigits,omitempty"` - SipAuthPassword *string `json:"SipAuthPassword,omitempty"` - SipAuthUsername *string `json:"SipAuthUsername,omitempty"` - StatusCallback *string `json:"StatusCallback,omitempty"` - StatusCallbackEvent *[]string `json:"StatusCallbackEvent,omitempty"` - StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` - Timeout *int32 `json:"Timeout,omitempty"` - To *string `json:"To,omitempty"` - Trim *string `json:"Trim,omitempty"` - Twiml *string `json:"Twiml,omitempty"` - Url *string `json:"Url,omitempty"` + ApplicationSid *string `json:"ApplicationSid,omitempty"` + AsyncAmd *string `json:"AsyncAmd,omitempty"` + AsyncAmdStatusCallback *string `json:"AsyncAmdStatusCallback,omitempty"` + AsyncAmdStatusCallbackMethod *string `json:"AsyncAmdStatusCallbackMethod,omitempty"` + Byoc *string `json:"Byoc,omitempty"` + CallReason *string `json:"CallReason,omitempty"` + CallerId *string `json:"CallerId,omitempty"` + FallbackMethod *string `json:"FallbackMethod,omitempty"` + FallbackUrl *string `json:"FallbackUrl,omitempty"` + From *string `json:"From,omitempty"` + MachineDetection *string `json:"MachineDetection,omitempty"` + MachineDetectionSilenceTimeout *int32 `json:"MachineDetectionSilenceTimeout,omitempty"` + MachineDetectionSpeechEndThreshold *int32 `json:"MachineDetectionSpeechEndThreshold,omitempty"` + MachineDetectionSpeechThreshold *int32 `json:"MachineDetectionSpeechThreshold,omitempty"` + MachineDetectionTimeout *int32 `json:"MachineDetectionTimeout,omitempty"` + Method *string `json:"Method,omitempty"` + Record *bool `json:"Record,omitempty"` + RecordingChannels *string `json:"RecordingChannels,omitempty"` + RecordingStatusCallback *string `json:"RecordingStatusCallback,omitempty"` + RecordingStatusCallbackEvent *[]string `json:"RecordingStatusCallbackEvent,omitempty"` + RecordingStatusCallbackMethod *string `json:"RecordingStatusCallbackMethod,omitempty"` + RecordingTrack *string `json:"RecordingTrack,omitempty"` + SendDigits *string `json:"SendDigits,omitempty"` + SipAuthPassword *string `json:"SipAuthPassword,omitempty"` + SipAuthUsername *string `json:"SipAuthUsername,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` + StatusCallbackEvent *[]string `json:"StatusCallbackEvent,omitempty"` + StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` + Timeout *int32 `json:"Timeout,omitempty"` + To *string `json:"To,omitempty"` + Trim *string `json:"Trim,omitempty"` + Twiml *string `json:"Twiml,omitempty"` + Url *string `json:"Url,omitempty"` } /* @@ -332,136 +333,136 @@ type CreateCallParams struct { * @param "Twiml" (string) - TwiML instructions for the call Twilio will use without fetching Twiml from url parameter. If both `twiml` and `url` are provided then `twiml` parameter will be ignored. * @param "Url" (string) - The absolute URL that returns the TwiML instructions for the call. We will call this URL using the `method` when the call connects. For more information, see the [Url Parameter](https://www.twilio.com/docs/voice/make-calls#specify-a-url-parameter) section in [Making Calls](https://www.twilio.com/docs/voice/make-calls). * @return ApiV2010AccountCall -*/ + */ func (c *DefaultApiService) CreateCall(AccountSid string, params *CreateCallParams) (*ApiV2010AccountCall, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Calls.json" + path := "/2010-04-01/Accounts/{AccountSid}/Calls.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.ApplicationSid != nil { - data.Set("ApplicationSid", *params.ApplicationSid) -} - if params != nil && params.AsyncAmd != nil { - data.Set("AsyncAmd", *params.AsyncAmd) -} - if params != nil && params.AsyncAmdStatusCallback != nil { - data.Set("AsyncAmdStatusCallback", *params.AsyncAmdStatusCallback) -} - if params != nil && params.AsyncAmdStatusCallbackMethod != nil { - data.Set("AsyncAmdStatusCallbackMethod", *params.AsyncAmdStatusCallbackMethod) -} - if params != nil && params.Byoc != nil { - data.Set("Byoc", *params.Byoc) -} - if params != nil && params.CallReason != nil { - data.Set("CallReason", *params.CallReason) -} - if params != nil && params.CallerId != nil { - data.Set("CallerId", *params.CallerId) -} - if params != nil && params.FallbackMethod != nil { - data.Set("FallbackMethod", *params.FallbackMethod) -} - if params != nil && params.FallbackUrl != nil { - data.Set("FallbackUrl", *params.FallbackUrl) -} - if params != nil && params.From != nil { - data.Set("From", *params.From) -} - if params != nil && params.MachineDetection != nil { - data.Set("MachineDetection", *params.MachineDetection) -} - if params != nil && params.MachineDetectionSilenceTimeout != nil { - data.Set("MachineDetectionSilenceTimeout", fmt.Sprint(*params.MachineDetectionSilenceTimeout)) -} - if params != nil && params.MachineDetectionSpeechEndThreshold != nil { - data.Set("MachineDetectionSpeechEndThreshold", fmt.Sprint(*params.MachineDetectionSpeechEndThreshold)) -} - if params != nil && params.MachineDetectionSpeechThreshold != nil { - data.Set("MachineDetectionSpeechThreshold", fmt.Sprint(*params.MachineDetectionSpeechThreshold)) -} - if params != nil && params.MachineDetectionTimeout != nil { - data.Set("MachineDetectionTimeout", fmt.Sprint(*params.MachineDetectionTimeout)) -} - if params != nil && params.Method != nil { - data.Set("Method", *params.Method) -} - if params != nil && params.Record != nil { - data.Set("Record", fmt.Sprint(*params.Record)) -} - if params != nil && params.RecordingChannels != nil { - data.Set("RecordingChannels", *params.RecordingChannels) -} - if params != nil && params.RecordingStatusCallback != nil { - data.Set("RecordingStatusCallback", *params.RecordingStatusCallback) -} - if params != nil && params.RecordingStatusCallbackEvent != nil { - data.Set("RecordingStatusCallbackEvent", strings.Join(*params.RecordingStatusCallbackEvent, ",")) -} - if params != nil && params.RecordingStatusCallbackMethod != nil { - data.Set("RecordingStatusCallbackMethod", *params.RecordingStatusCallbackMethod) -} - if params != nil && params.RecordingTrack != nil { - data.Set("RecordingTrack", *params.RecordingTrack) -} - if params != nil && params.SendDigits != nil { - data.Set("SendDigits", *params.SendDigits) -} - if params != nil && params.SipAuthPassword != nil { - data.Set("SipAuthPassword", *params.SipAuthPassword) -} - if params != nil && params.SipAuthUsername != nil { - data.Set("SipAuthUsername", *params.SipAuthUsername) -} - if params != nil && params.StatusCallback != nil { - data.Set("StatusCallback", *params.StatusCallback) -} - if params != nil && params.StatusCallbackEvent != nil { - data.Set("StatusCallbackEvent", strings.Join(*params.StatusCallbackEvent, ",")) -} - if params != nil && params.StatusCallbackMethod != nil { - data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) -} - if params != nil && params.Timeout != nil { - data.Set("Timeout", fmt.Sprint(*params.Timeout)) -} - if params != nil && params.To != nil { - data.Set("To", *params.To) -} - if params != nil && params.Trim != nil { - data.Set("Trim", *params.Trim) -} - if params != nil && params.Twiml != nil { - data.Set("Twiml", *params.Twiml) -} - if params != nil && params.Url != nil { - data.Set("Url", *params.Url) -} + data := url.Values{} + headers := 0 + if params != nil && params.ApplicationSid != nil { + data.Set("ApplicationSid", *params.ApplicationSid) + } + if params != nil && params.AsyncAmd != nil { + data.Set("AsyncAmd", *params.AsyncAmd) + } + if params != nil && params.AsyncAmdStatusCallback != nil { + data.Set("AsyncAmdStatusCallback", *params.AsyncAmdStatusCallback) + } + if params != nil && params.AsyncAmdStatusCallbackMethod != nil { + data.Set("AsyncAmdStatusCallbackMethod", *params.AsyncAmdStatusCallbackMethod) + } + if params != nil && params.Byoc != nil { + data.Set("Byoc", *params.Byoc) + } + if params != nil && params.CallReason != nil { + data.Set("CallReason", *params.CallReason) + } + if params != nil && params.CallerId != nil { + data.Set("CallerId", *params.CallerId) + } + if params != nil && params.FallbackMethod != nil { + data.Set("FallbackMethod", *params.FallbackMethod) + } + if params != nil && params.FallbackUrl != nil { + data.Set("FallbackUrl", *params.FallbackUrl) + } + if params != nil && params.From != nil { + data.Set("From", *params.From) + } + if params != nil && params.MachineDetection != nil { + data.Set("MachineDetection", *params.MachineDetection) + } + if params != nil && params.MachineDetectionSilenceTimeout != nil { + data.Set("MachineDetectionSilenceTimeout", fmt.Sprint(*params.MachineDetectionSilenceTimeout)) + } + if params != nil && params.MachineDetectionSpeechEndThreshold != nil { + data.Set("MachineDetectionSpeechEndThreshold", fmt.Sprint(*params.MachineDetectionSpeechEndThreshold)) + } + if params != nil && params.MachineDetectionSpeechThreshold != nil { + data.Set("MachineDetectionSpeechThreshold", fmt.Sprint(*params.MachineDetectionSpeechThreshold)) + } + if params != nil && params.MachineDetectionTimeout != nil { + data.Set("MachineDetectionTimeout", fmt.Sprint(*params.MachineDetectionTimeout)) + } + if params != nil && params.Method != nil { + data.Set("Method", *params.Method) + } + if params != nil && params.Record != nil { + data.Set("Record", fmt.Sprint(*params.Record)) + } + if params != nil && params.RecordingChannels != nil { + data.Set("RecordingChannels", *params.RecordingChannels) + } + if params != nil && params.RecordingStatusCallback != nil { + data.Set("RecordingStatusCallback", *params.RecordingStatusCallback) + } + if params != nil && params.RecordingStatusCallbackEvent != nil { + data.Set("RecordingStatusCallbackEvent", strings.Join(*params.RecordingStatusCallbackEvent, ",")) + } + if params != nil && params.RecordingStatusCallbackMethod != nil { + data.Set("RecordingStatusCallbackMethod", *params.RecordingStatusCallbackMethod) + } + if params != nil && params.RecordingTrack != nil { + data.Set("RecordingTrack", *params.RecordingTrack) + } + if params != nil && params.SendDigits != nil { + data.Set("SendDigits", *params.SendDigits) + } + if params != nil && params.SipAuthPassword != nil { + data.Set("SipAuthPassword", *params.SipAuthPassword) + } + if params != nil && params.SipAuthUsername != nil { + data.Set("SipAuthUsername", *params.SipAuthUsername) + } + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) + } + if params != nil && params.StatusCallbackEvent != nil { + data.Set("StatusCallbackEvent", strings.Join(*params.StatusCallbackEvent, ",")) + } + if params != nil && params.StatusCallbackMethod != nil { + data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) + } + if params != nil && params.Timeout != nil { + data.Set("Timeout", fmt.Sprint(*params.Timeout)) + } + if params != nil && params.To != nil { + data.Set("To", *params.To) + } + if params != nil && params.Trim != nil { + data.Set("Trim", *params.Trim) + } + if params != nil && params.Twiml != nil { + data.Set("Twiml", *params.Twiml) + } + if params != nil && params.Url != nil { + data.Set("Url", *params.Url) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountCall{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountCall{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateCallFeedbackSummaryParams Optional parameters for the method 'CreateCallFeedbackSummary' type CreateCallFeedbackSummaryParams struct { - EndDate *time.Time `json:"EndDate,omitempty"` - IncludeSubaccounts *bool `json:"IncludeSubaccounts,omitempty"` - StartDate *time.Time `json:"StartDate,omitempty"` - StatusCallback *string `json:"StatusCallback,omitempty"` - StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` + EndDate *time.Time `json:"EndDate,omitempty"` + IncludeSubaccounts *bool `json:"IncludeSubaccounts,omitempty"` + StartDate *time.Time `json:"StartDate,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` + StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` } /* @@ -475,53 +476,53 @@ type CreateCallFeedbackSummaryParams struct { * @param "StatusCallback" (string) - The URL that we will request when the feedback summary is complete. * @param "StatusCallbackMethod" (string) - The HTTP method (`GET` or `POST`) we use to make the request to the `StatusCallback` URL. * @return ApiV2010AccountCallCallFeedbackSummary -*/ + */ func (c *DefaultApiService) CreateCallFeedbackSummary(AccountSid string, params *CreateCallFeedbackSummaryParams) (*ApiV2010AccountCallCallFeedbackSummary, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Calls/FeedbackSummary.json" + path := "/2010-04-01/Accounts/{AccountSid}/Calls/FeedbackSummary.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.EndDate != nil { - data.Set("EndDate", fmt.Sprint(*params.EndDate)) -} - if params != nil && params.IncludeSubaccounts != nil { - data.Set("IncludeSubaccounts", fmt.Sprint(*params.IncludeSubaccounts)) -} - if params != nil && params.StartDate != nil { - data.Set("StartDate", fmt.Sprint(*params.StartDate)) -} - if params != nil && params.StatusCallback != nil { - data.Set("StatusCallback", *params.StatusCallback) -} - if params != nil && params.StatusCallbackMethod != nil { - data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) -} + data := url.Values{} + headers := 0 + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) + } + if params != nil && params.IncludeSubaccounts != nil { + data.Set("IncludeSubaccounts", fmt.Sprint(*params.IncludeSubaccounts)) + } + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) + } + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) + } + if params != nil && params.StatusCallbackMethod != nil { + data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountCallCallFeedbackSummary{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountCallCallFeedbackSummary{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateCallRecordingParams Optional parameters for the method 'CreateCallRecording' type CreateCallRecordingParams struct { - RecordingChannels *string `json:"RecordingChannels,omitempty"` - RecordingStatusCallback *string `json:"RecordingStatusCallback,omitempty"` - RecordingStatusCallbackEvent *[]string `json:"RecordingStatusCallbackEvent,omitempty"` - RecordingStatusCallbackMethod *string `json:"RecordingStatusCallbackMethod,omitempty"` - RecordingTrack *string `json:"RecordingTrack,omitempty"` - Trim *string `json:"Trim,omitempty"` + RecordingChannels *string `json:"RecordingChannels,omitempty"` + RecordingStatusCallback *string `json:"RecordingStatusCallback,omitempty"` + RecordingStatusCallbackEvent *[]string `json:"RecordingStatusCallbackEvent,omitempty"` + RecordingStatusCallbackMethod *string `json:"RecordingStatusCallbackMethod,omitempty"` + RecordingTrack *string `json:"RecordingTrack,omitempty"` + Trim *string `json:"Trim,omitempty"` } /* @@ -537,75 +538,75 @@ type CreateCallRecordingParams struct { * @param "RecordingTrack" (string) - The audio track to record for the call. Can be: `inbound`, `outbound` or `both`. The default is `both`. `inbound` records the audio that is received by Twilio. `outbound` records the audio that is generated from Twilio. `both` records the audio that is received and generated by Twilio. * @param "Trim" (string) - Whether to trim any leading and trailing silence in the recording. Can be: `trim-silence` or `do-not-trim` and the default is `do-not-trim`. `trim-silence` trims the silence from the beginning and end of the recording and `do-not-trim` does not. * @return ApiV2010AccountCallCallRecording -*/ + */ func (c *DefaultApiService) CreateCallRecording(AccountSid string, CallSid string, params *CreateCallRecordingParams) (*ApiV2010AccountCallCallRecording, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Recordings.json" + path := "/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Recordings.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.RecordingChannels != nil { - data.Set("RecordingChannels", *params.RecordingChannels) -} - if params != nil && params.RecordingStatusCallback != nil { - data.Set("RecordingStatusCallback", *params.RecordingStatusCallback) -} - if params != nil && params.RecordingStatusCallbackEvent != nil { - data.Set("RecordingStatusCallbackEvent", strings.Join(*params.RecordingStatusCallbackEvent, ",")) -} - if params != nil && params.RecordingStatusCallbackMethod != nil { - data.Set("RecordingStatusCallbackMethod", *params.RecordingStatusCallbackMethod) -} - if params != nil && params.RecordingTrack != nil { - data.Set("RecordingTrack", *params.RecordingTrack) -} - if params != nil && params.Trim != nil { - data.Set("Trim", *params.Trim) -} + data := url.Values{} + headers := 0 + if params != nil && params.RecordingChannels != nil { + data.Set("RecordingChannels", *params.RecordingChannels) + } + if params != nil && params.RecordingStatusCallback != nil { + data.Set("RecordingStatusCallback", *params.RecordingStatusCallback) + } + if params != nil && params.RecordingStatusCallbackEvent != nil { + data.Set("RecordingStatusCallbackEvent", strings.Join(*params.RecordingStatusCallbackEvent, ",")) + } + if params != nil && params.RecordingStatusCallbackMethod != nil { + data.Set("RecordingStatusCallbackMethod", *params.RecordingStatusCallbackMethod) + } + if params != nil && params.RecordingTrack != nil { + data.Set("RecordingTrack", *params.RecordingTrack) + } + if params != nil && params.Trim != nil { + data.Set("Trim", *params.Trim) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountCallCallRecording{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountCallCallRecording{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateIncomingPhoneNumberParams Optional parameters for the method 'CreateIncomingPhoneNumber' type CreateIncomingPhoneNumberParams struct { - AddressSid *string `json:"AddressSid,omitempty"` - ApiVersion *string `json:"ApiVersion,omitempty"` - AreaCode *string `json:"AreaCode,omitempty"` - BundleSid *string `json:"BundleSid,omitempty"` - EmergencyAddressSid *string `json:"EmergencyAddressSid,omitempty"` - EmergencyStatus *string `json:"EmergencyStatus,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - IdentitySid *string `json:"IdentitySid,omitempty"` - PhoneNumber *string `json:"PhoneNumber,omitempty"` - SmsApplicationSid *string `json:"SmsApplicationSid,omitempty"` - SmsFallbackMethod *string `json:"SmsFallbackMethod,omitempty"` - SmsFallbackUrl *string `json:"SmsFallbackUrl,omitempty"` - SmsMethod *string `json:"SmsMethod,omitempty"` - SmsUrl *string `json:"SmsUrl,omitempty"` - StatusCallback *string `json:"StatusCallback,omitempty"` + AddressSid *string `json:"AddressSid,omitempty"` + ApiVersion *string `json:"ApiVersion,omitempty"` + AreaCode *string `json:"AreaCode,omitempty"` + BundleSid *string `json:"BundleSid,omitempty"` + EmergencyAddressSid *string `json:"EmergencyAddressSid,omitempty"` + EmergencyStatus *string `json:"EmergencyStatus,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + IdentitySid *string `json:"IdentitySid,omitempty"` + PhoneNumber *string `json:"PhoneNumber,omitempty"` + SmsApplicationSid *string `json:"SmsApplicationSid,omitempty"` + SmsFallbackMethod *string `json:"SmsFallbackMethod,omitempty"` + SmsFallbackUrl *string `json:"SmsFallbackUrl,omitempty"` + SmsMethod *string `json:"SmsMethod,omitempty"` + SmsUrl *string `json:"SmsUrl,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` - TrunkSid *string `json:"TrunkSid,omitempty"` - VoiceApplicationSid *string `json:"VoiceApplicationSid,omitempty"` - VoiceCallerIdLookup *bool `json:"VoiceCallerIdLookup,omitempty"` - VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"` - VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` - VoiceMethod *string `json:"VoiceMethod,omitempty"` - VoiceReceiveMode *string `json:"VoiceReceiveMode,omitempty"` - VoiceUrl *string `json:"VoiceUrl,omitempty"` + TrunkSid *string `json:"TrunkSid,omitempty"` + VoiceApplicationSid *string `json:"VoiceApplicationSid,omitempty"` + VoiceCallerIdLookup *bool `json:"VoiceCallerIdLookup,omitempty"` + VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"` + VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` + VoiceMethod *string `json:"VoiceMethod,omitempty"` + VoiceReceiveMode *string `json:"VoiceReceiveMode,omitempty"` + VoiceUrl *string `json:"VoiceUrl,omitempty"` } /* @@ -638,102 +639,102 @@ type CreateIncomingPhoneNumberParams struct { * @param "VoiceReceiveMode" (string) - The configuration parameter for the new phone number to receive incoming voice calls or faxes. Can be: `fax` or `voice` and defaults to `voice`. * @param "VoiceUrl" (string) - The URL that we should call to answer a call to the new phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set. * @return ApiV2010AccountIncomingPhoneNumber -*/ + */ func (c *DefaultApiService) CreateIncomingPhoneNumber(AccountSid string, params *CreateIncomingPhoneNumberParams) (*ApiV2010AccountIncomingPhoneNumber, error) { - path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers.json" + path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.AddressSid != nil { - data.Set("AddressSid", *params.AddressSid) -} - if params != nil && params.ApiVersion != nil { - data.Set("ApiVersion", *params.ApiVersion) -} - if params != nil && params.AreaCode != nil { - data.Set("AreaCode", *params.AreaCode) -} - if params != nil && params.BundleSid != nil { - data.Set("BundleSid", *params.BundleSid) -} - if params != nil && params.EmergencyAddressSid != nil { - data.Set("EmergencyAddressSid", *params.EmergencyAddressSid) -} - if params != nil && params.EmergencyStatus != nil { - data.Set("EmergencyStatus", *params.EmergencyStatus) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.IdentitySid != nil { - data.Set("IdentitySid", *params.IdentitySid) -} - if params != nil && params.PhoneNumber != nil { - data.Set("PhoneNumber", *params.PhoneNumber) -} - if params != nil && params.SmsApplicationSid != nil { - data.Set("SmsApplicationSid", *params.SmsApplicationSid) -} - if params != nil && params.SmsFallbackMethod != nil { - data.Set("SmsFallbackMethod", *params.SmsFallbackMethod) -} - if params != nil && params.SmsFallbackUrl != nil { - data.Set("SmsFallbackUrl", *params.SmsFallbackUrl) -} - if params != nil && params.SmsMethod != nil { - data.Set("SmsMethod", *params.SmsMethod) -} - if params != nil && params.SmsUrl != nil { - data.Set("SmsUrl", *params.SmsUrl) -} - if params != nil && params.StatusCallback != nil { - data.Set("StatusCallback", *params.StatusCallback) -} - if params != nil && params.StatusCallbackMethod != nil { - data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) -} - if params != nil && params.TrunkSid != nil { - data.Set("TrunkSid", *params.TrunkSid) -} - if params != nil && params.VoiceApplicationSid != nil { - data.Set("VoiceApplicationSid", *params.VoiceApplicationSid) -} - if params != nil && params.VoiceCallerIdLookup != nil { - data.Set("VoiceCallerIdLookup", fmt.Sprint(*params.VoiceCallerIdLookup)) -} - if params != nil && params.VoiceFallbackMethod != nil { - data.Set("VoiceFallbackMethod", *params.VoiceFallbackMethod) -} - if params != nil && params.VoiceFallbackUrl != nil { - data.Set("VoiceFallbackUrl", *params.VoiceFallbackUrl) -} - if params != nil && params.VoiceMethod != nil { - data.Set("VoiceMethod", *params.VoiceMethod) -} - if params != nil && params.VoiceReceiveMode != nil { - data.Set("VoiceReceiveMode", *params.VoiceReceiveMode) -} - if params != nil && params.VoiceUrl != nil { - data.Set("VoiceUrl", *params.VoiceUrl) -} + data := url.Values{} + headers := 0 + if params != nil && params.AddressSid != nil { + data.Set("AddressSid", *params.AddressSid) + } + if params != nil && params.ApiVersion != nil { + data.Set("ApiVersion", *params.ApiVersion) + } + if params != nil && params.AreaCode != nil { + data.Set("AreaCode", *params.AreaCode) + } + if params != nil && params.BundleSid != nil { + data.Set("BundleSid", *params.BundleSid) + } + if params != nil && params.EmergencyAddressSid != nil { + data.Set("EmergencyAddressSid", *params.EmergencyAddressSid) + } + if params != nil && params.EmergencyStatus != nil { + data.Set("EmergencyStatus", *params.EmergencyStatus) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.IdentitySid != nil { + data.Set("IdentitySid", *params.IdentitySid) + } + if params != nil && params.PhoneNumber != nil { + data.Set("PhoneNumber", *params.PhoneNumber) + } + if params != nil && params.SmsApplicationSid != nil { + data.Set("SmsApplicationSid", *params.SmsApplicationSid) + } + if params != nil && params.SmsFallbackMethod != nil { + data.Set("SmsFallbackMethod", *params.SmsFallbackMethod) + } + if params != nil && params.SmsFallbackUrl != nil { + data.Set("SmsFallbackUrl", *params.SmsFallbackUrl) + } + if params != nil && params.SmsMethod != nil { + data.Set("SmsMethod", *params.SmsMethod) + } + if params != nil && params.SmsUrl != nil { + data.Set("SmsUrl", *params.SmsUrl) + } + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) + } + if params != nil && params.StatusCallbackMethod != nil { + data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) + } + if params != nil && params.TrunkSid != nil { + data.Set("TrunkSid", *params.TrunkSid) + } + if params != nil && params.VoiceApplicationSid != nil { + data.Set("VoiceApplicationSid", *params.VoiceApplicationSid) + } + if params != nil && params.VoiceCallerIdLookup != nil { + data.Set("VoiceCallerIdLookup", fmt.Sprint(*params.VoiceCallerIdLookup)) + } + if params != nil && params.VoiceFallbackMethod != nil { + data.Set("VoiceFallbackMethod", *params.VoiceFallbackMethod) + } + if params != nil && params.VoiceFallbackUrl != nil { + data.Set("VoiceFallbackUrl", *params.VoiceFallbackUrl) + } + if params != nil && params.VoiceMethod != nil { + data.Set("VoiceMethod", *params.VoiceMethod) + } + if params != nil && params.VoiceReceiveMode != nil { + data.Set("VoiceReceiveMode", *params.VoiceReceiveMode) + } + if params != nil && params.VoiceUrl != nil { + data.Set("VoiceUrl", *params.VoiceUrl) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountIncomingPhoneNumber{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountIncomingPhoneNumber{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateIncomingPhoneNumberAssignedAddOnParams Optional parameters for the method 'CreateIncomingPhoneNumberAssignedAddOn' type CreateIncomingPhoneNumberAssignedAddOnParams struct { InstalledAddOnSid *string `json:"InstalledAddOnSid,omitempty"` @@ -747,59 +748,59 @@ type CreateIncomingPhoneNumberAssignedAddOnParams struct { * @param optional nil or *CreateIncomingPhoneNumberAssignedAddOnParams - Optional Parameters: * @param "InstalledAddOnSid" (string) - The SID that identifies the Add-on installation. * @return ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOn -*/ + */ func (c *DefaultApiService) CreateIncomingPhoneNumberAssignedAddOn(AccountSid string, ResourceSid string, params *CreateIncomingPhoneNumberAssignedAddOnParams) (*ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOn, error) { - path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{ResourceSid}/AssignedAddOns.json" + path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{ResourceSid}/AssignedAddOns.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"ResourceSid"+"}", ResourceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.InstalledAddOnSid != nil { - data.Set("InstalledAddOnSid", *params.InstalledAddOnSid) -} + data := url.Values{} + headers := 0 + if params != nil && params.InstalledAddOnSid != nil { + data.Set("InstalledAddOnSid", *params.InstalledAddOnSid) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOn{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOn{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateIncomingPhoneNumberLocalParams Optional parameters for the method 'CreateIncomingPhoneNumberLocal' type CreateIncomingPhoneNumberLocalParams struct { - AddressSid *string `json:"AddressSid,omitempty"` - ApiVersion *string `json:"ApiVersion,omitempty"` - BundleSid *string `json:"BundleSid,omitempty"` - EmergencyAddressSid *string `json:"EmergencyAddressSid,omitempty"` - EmergencyStatus *string `json:"EmergencyStatus,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - IdentitySid *string `json:"IdentitySid,omitempty"` - PhoneNumber *string `json:"PhoneNumber,omitempty"` - SmsApplicationSid *string `json:"SmsApplicationSid,omitempty"` - SmsFallbackMethod *string `json:"SmsFallbackMethod,omitempty"` - SmsFallbackUrl *string `json:"SmsFallbackUrl,omitempty"` - SmsMethod *string `json:"SmsMethod,omitempty"` - SmsUrl *string `json:"SmsUrl,omitempty"` - StatusCallback *string `json:"StatusCallback,omitempty"` + AddressSid *string `json:"AddressSid,omitempty"` + ApiVersion *string `json:"ApiVersion,omitempty"` + BundleSid *string `json:"BundleSid,omitempty"` + EmergencyAddressSid *string `json:"EmergencyAddressSid,omitempty"` + EmergencyStatus *string `json:"EmergencyStatus,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + IdentitySid *string `json:"IdentitySid,omitempty"` + PhoneNumber *string `json:"PhoneNumber,omitempty"` + SmsApplicationSid *string `json:"SmsApplicationSid,omitempty"` + SmsFallbackMethod *string `json:"SmsFallbackMethod,omitempty"` + SmsFallbackUrl *string `json:"SmsFallbackUrl,omitempty"` + SmsMethod *string `json:"SmsMethod,omitempty"` + SmsUrl *string `json:"SmsUrl,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` - TrunkSid *string `json:"TrunkSid,omitempty"` - VoiceApplicationSid *string `json:"VoiceApplicationSid,omitempty"` - VoiceCallerIdLookup *bool `json:"VoiceCallerIdLookup,omitempty"` - VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"` - VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` - VoiceMethod *string `json:"VoiceMethod,omitempty"` - VoiceReceiveMode *string `json:"VoiceReceiveMode,omitempty"` - VoiceUrl *string `json:"VoiceUrl,omitempty"` + TrunkSid *string `json:"TrunkSid,omitempty"` + VoiceApplicationSid *string `json:"VoiceApplicationSid,omitempty"` + VoiceCallerIdLookup *bool `json:"VoiceCallerIdLookup,omitempty"` + VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"` + VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` + VoiceMethod *string `json:"VoiceMethod,omitempty"` + VoiceReceiveMode *string `json:"VoiceReceiveMode,omitempty"` + VoiceUrl *string `json:"VoiceUrl,omitempty"` } /* @@ -830,124 +831,124 @@ type CreateIncomingPhoneNumberLocalParams struct { * @param "VoiceReceiveMode" (string) - The configuration parameter for the new phone number to receive incoming voice calls or faxes. Can be: `fax` or `voice` and defaults to `voice`. * @param "VoiceUrl" (string) - The URL that we should call to answer a call to the new phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set. * @return ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberLocal -*/ + */ func (c *DefaultApiService) CreateIncomingPhoneNumberLocal(AccountSid string, params *CreateIncomingPhoneNumberLocalParams) (*ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberLocal, error) { - path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/Local.json" + path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/Local.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.AddressSid != nil { - data.Set("AddressSid", *params.AddressSid) -} - if params != nil && params.ApiVersion != nil { - data.Set("ApiVersion", *params.ApiVersion) -} - if params != nil && params.BundleSid != nil { - data.Set("BundleSid", *params.BundleSid) -} - if params != nil && params.EmergencyAddressSid != nil { - data.Set("EmergencyAddressSid", *params.EmergencyAddressSid) -} - if params != nil && params.EmergencyStatus != nil { - data.Set("EmergencyStatus", *params.EmergencyStatus) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.IdentitySid != nil { - data.Set("IdentitySid", *params.IdentitySid) -} - if params != nil && params.PhoneNumber != nil { - data.Set("PhoneNumber", *params.PhoneNumber) -} - if params != nil && params.SmsApplicationSid != nil { - data.Set("SmsApplicationSid", *params.SmsApplicationSid) -} - if params != nil && params.SmsFallbackMethod != nil { - data.Set("SmsFallbackMethod", *params.SmsFallbackMethod) -} - if params != nil && params.SmsFallbackUrl != nil { - data.Set("SmsFallbackUrl", *params.SmsFallbackUrl) -} - if params != nil && params.SmsMethod != nil { - data.Set("SmsMethod", *params.SmsMethod) -} - if params != nil && params.SmsUrl != nil { - data.Set("SmsUrl", *params.SmsUrl) -} - if params != nil && params.StatusCallback != nil { - data.Set("StatusCallback", *params.StatusCallback) -} - if params != nil && params.StatusCallbackMethod != nil { - data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) -} - if params != nil && params.TrunkSid != nil { - data.Set("TrunkSid", *params.TrunkSid) -} - if params != nil && params.VoiceApplicationSid != nil { - data.Set("VoiceApplicationSid", *params.VoiceApplicationSid) -} - if params != nil && params.VoiceCallerIdLookup != nil { - data.Set("VoiceCallerIdLookup", fmt.Sprint(*params.VoiceCallerIdLookup)) -} - if params != nil && params.VoiceFallbackMethod != nil { - data.Set("VoiceFallbackMethod", *params.VoiceFallbackMethod) -} - if params != nil && params.VoiceFallbackUrl != nil { - data.Set("VoiceFallbackUrl", *params.VoiceFallbackUrl) -} - if params != nil && params.VoiceMethod != nil { - data.Set("VoiceMethod", *params.VoiceMethod) -} - if params != nil && params.VoiceReceiveMode != nil { - data.Set("VoiceReceiveMode", *params.VoiceReceiveMode) -} - if params != nil && params.VoiceUrl != nil { - data.Set("VoiceUrl", *params.VoiceUrl) -} + data := url.Values{} + headers := 0 + if params != nil && params.AddressSid != nil { + data.Set("AddressSid", *params.AddressSid) + } + if params != nil && params.ApiVersion != nil { + data.Set("ApiVersion", *params.ApiVersion) + } + if params != nil && params.BundleSid != nil { + data.Set("BundleSid", *params.BundleSid) + } + if params != nil && params.EmergencyAddressSid != nil { + data.Set("EmergencyAddressSid", *params.EmergencyAddressSid) + } + if params != nil && params.EmergencyStatus != nil { + data.Set("EmergencyStatus", *params.EmergencyStatus) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.IdentitySid != nil { + data.Set("IdentitySid", *params.IdentitySid) + } + if params != nil && params.PhoneNumber != nil { + data.Set("PhoneNumber", *params.PhoneNumber) + } + if params != nil && params.SmsApplicationSid != nil { + data.Set("SmsApplicationSid", *params.SmsApplicationSid) + } + if params != nil && params.SmsFallbackMethod != nil { + data.Set("SmsFallbackMethod", *params.SmsFallbackMethod) + } + if params != nil && params.SmsFallbackUrl != nil { + data.Set("SmsFallbackUrl", *params.SmsFallbackUrl) + } + if params != nil && params.SmsMethod != nil { + data.Set("SmsMethod", *params.SmsMethod) + } + if params != nil && params.SmsUrl != nil { + data.Set("SmsUrl", *params.SmsUrl) + } + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) + } + if params != nil && params.StatusCallbackMethod != nil { + data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) + } + if params != nil && params.TrunkSid != nil { + data.Set("TrunkSid", *params.TrunkSid) + } + if params != nil && params.VoiceApplicationSid != nil { + data.Set("VoiceApplicationSid", *params.VoiceApplicationSid) + } + if params != nil && params.VoiceCallerIdLookup != nil { + data.Set("VoiceCallerIdLookup", fmt.Sprint(*params.VoiceCallerIdLookup)) + } + if params != nil && params.VoiceFallbackMethod != nil { + data.Set("VoiceFallbackMethod", *params.VoiceFallbackMethod) + } + if params != nil && params.VoiceFallbackUrl != nil { + data.Set("VoiceFallbackUrl", *params.VoiceFallbackUrl) + } + if params != nil && params.VoiceMethod != nil { + data.Set("VoiceMethod", *params.VoiceMethod) + } + if params != nil && params.VoiceReceiveMode != nil { + data.Set("VoiceReceiveMode", *params.VoiceReceiveMode) + } + if params != nil && params.VoiceUrl != nil { + data.Set("VoiceUrl", *params.VoiceUrl) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberLocal{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberLocal{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateIncomingPhoneNumberMobileParams Optional parameters for the method 'CreateIncomingPhoneNumberMobile' type CreateIncomingPhoneNumberMobileParams struct { - AddressSid *string `json:"AddressSid,omitempty"` - ApiVersion *string `json:"ApiVersion,omitempty"` - BundleSid *string `json:"BundleSid,omitempty"` - EmergencyAddressSid *string `json:"EmergencyAddressSid,omitempty"` - EmergencyStatus *string `json:"EmergencyStatus,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - IdentitySid *string `json:"IdentitySid,omitempty"` - PhoneNumber *string `json:"PhoneNumber,omitempty"` - SmsApplicationSid *string `json:"SmsApplicationSid,omitempty"` - SmsFallbackMethod *string `json:"SmsFallbackMethod,omitempty"` - SmsFallbackUrl *string `json:"SmsFallbackUrl,omitempty"` - SmsMethod *string `json:"SmsMethod,omitempty"` - SmsUrl *string `json:"SmsUrl,omitempty"` - StatusCallback *string `json:"StatusCallback,omitempty"` + AddressSid *string `json:"AddressSid,omitempty"` + ApiVersion *string `json:"ApiVersion,omitempty"` + BundleSid *string `json:"BundleSid,omitempty"` + EmergencyAddressSid *string `json:"EmergencyAddressSid,omitempty"` + EmergencyStatus *string `json:"EmergencyStatus,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + IdentitySid *string `json:"IdentitySid,omitempty"` + PhoneNumber *string `json:"PhoneNumber,omitempty"` + SmsApplicationSid *string `json:"SmsApplicationSid,omitempty"` + SmsFallbackMethod *string `json:"SmsFallbackMethod,omitempty"` + SmsFallbackUrl *string `json:"SmsFallbackUrl,omitempty"` + SmsMethod *string `json:"SmsMethod,omitempty"` + SmsUrl *string `json:"SmsUrl,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` - TrunkSid *string `json:"TrunkSid,omitempty"` - VoiceApplicationSid *string `json:"VoiceApplicationSid,omitempty"` - VoiceCallerIdLookup *bool `json:"VoiceCallerIdLookup,omitempty"` - VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"` - VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` - VoiceMethod *string `json:"VoiceMethod,omitempty"` - VoiceReceiveMode *string `json:"VoiceReceiveMode,omitempty"` - VoiceUrl *string `json:"VoiceUrl,omitempty"` + TrunkSid *string `json:"TrunkSid,omitempty"` + VoiceApplicationSid *string `json:"VoiceApplicationSid,omitempty"` + VoiceCallerIdLookup *bool `json:"VoiceCallerIdLookup,omitempty"` + VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"` + VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` + VoiceMethod *string `json:"VoiceMethod,omitempty"` + VoiceReceiveMode *string `json:"VoiceReceiveMode,omitempty"` + VoiceUrl *string `json:"VoiceUrl,omitempty"` } /* @@ -978,124 +979,124 @@ type CreateIncomingPhoneNumberMobileParams struct { * @param "VoiceReceiveMode" (string) - The configuration parameter for the new phone number to receive incoming voice calls or faxes. Can be: `fax` or `voice` and defaults to `voice`. * @param "VoiceUrl" (string) - The URL that we should call to answer a call to the new phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set. * @return ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberMobile -*/ + */ func (c *DefaultApiService) CreateIncomingPhoneNumberMobile(AccountSid string, params *CreateIncomingPhoneNumberMobileParams) (*ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberMobile, error) { - path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/Mobile.json" + path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/Mobile.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.AddressSid != nil { - data.Set("AddressSid", *params.AddressSid) -} - if params != nil && params.ApiVersion != nil { - data.Set("ApiVersion", *params.ApiVersion) -} - if params != nil && params.BundleSid != nil { - data.Set("BundleSid", *params.BundleSid) -} - if params != nil && params.EmergencyAddressSid != nil { - data.Set("EmergencyAddressSid", *params.EmergencyAddressSid) -} - if params != nil && params.EmergencyStatus != nil { - data.Set("EmergencyStatus", *params.EmergencyStatus) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.IdentitySid != nil { - data.Set("IdentitySid", *params.IdentitySid) -} - if params != nil && params.PhoneNumber != nil { - data.Set("PhoneNumber", *params.PhoneNumber) -} - if params != nil && params.SmsApplicationSid != nil { - data.Set("SmsApplicationSid", *params.SmsApplicationSid) -} - if params != nil && params.SmsFallbackMethod != nil { - data.Set("SmsFallbackMethod", *params.SmsFallbackMethod) -} - if params != nil && params.SmsFallbackUrl != nil { - data.Set("SmsFallbackUrl", *params.SmsFallbackUrl) -} - if params != nil && params.SmsMethod != nil { - data.Set("SmsMethod", *params.SmsMethod) -} - if params != nil && params.SmsUrl != nil { - data.Set("SmsUrl", *params.SmsUrl) -} - if params != nil && params.StatusCallback != nil { - data.Set("StatusCallback", *params.StatusCallback) -} - if params != nil && params.StatusCallbackMethod != nil { - data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) -} - if params != nil && params.TrunkSid != nil { - data.Set("TrunkSid", *params.TrunkSid) -} - if params != nil && params.VoiceApplicationSid != nil { - data.Set("VoiceApplicationSid", *params.VoiceApplicationSid) -} - if params != nil && params.VoiceCallerIdLookup != nil { - data.Set("VoiceCallerIdLookup", fmt.Sprint(*params.VoiceCallerIdLookup)) -} - if params != nil && params.VoiceFallbackMethod != nil { - data.Set("VoiceFallbackMethod", *params.VoiceFallbackMethod) -} - if params != nil && params.VoiceFallbackUrl != nil { - data.Set("VoiceFallbackUrl", *params.VoiceFallbackUrl) -} - if params != nil && params.VoiceMethod != nil { - data.Set("VoiceMethod", *params.VoiceMethod) -} - if params != nil && params.VoiceReceiveMode != nil { - data.Set("VoiceReceiveMode", *params.VoiceReceiveMode) -} - if params != nil && params.VoiceUrl != nil { - data.Set("VoiceUrl", *params.VoiceUrl) -} + data := url.Values{} + headers := 0 + if params != nil && params.AddressSid != nil { + data.Set("AddressSid", *params.AddressSid) + } + if params != nil && params.ApiVersion != nil { + data.Set("ApiVersion", *params.ApiVersion) + } + if params != nil && params.BundleSid != nil { + data.Set("BundleSid", *params.BundleSid) + } + if params != nil && params.EmergencyAddressSid != nil { + data.Set("EmergencyAddressSid", *params.EmergencyAddressSid) + } + if params != nil && params.EmergencyStatus != nil { + data.Set("EmergencyStatus", *params.EmergencyStatus) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.IdentitySid != nil { + data.Set("IdentitySid", *params.IdentitySid) + } + if params != nil && params.PhoneNumber != nil { + data.Set("PhoneNumber", *params.PhoneNumber) + } + if params != nil && params.SmsApplicationSid != nil { + data.Set("SmsApplicationSid", *params.SmsApplicationSid) + } + if params != nil && params.SmsFallbackMethod != nil { + data.Set("SmsFallbackMethod", *params.SmsFallbackMethod) + } + if params != nil && params.SmsFallbackUrl != nil { + data.Set("SmsFallbackUrl", *params.SmsFallbackUrl) + } + if params != nil && params.SmsMethod != nil { + data.Set("SmsMethod", *params.SmsMethod) + } + if params != nil && params.SmsUrl != nil { + data.Set("SmsUrl", *params.SmsUrl) + } + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) + } + if params != nil && params.StatusCallbackMethod != nil { + data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) + } + if params != nil && params.TrunkSid != nil { + data.Set("TrunkSid", *params.TrunkSid) + } + if params != nil && params.VoiceApplicationSid != nil { + data.Set("VoiceApplicationSid", *params.VoiceApplicationSid) + } + if params != nil && params.VoiceCallerIdLookup != nil { + data.Set("VoiceCallerIdLookup", fmt.Sprint(*params.VoiceCallerIdLookup)) + } + if params != nil && params.VoiceFallbackMethod != nil { + data.Set("VoiceFallbackMethod", *params.VoiceFallbackMethod) + } + if params != nil && params.VoiceFallbackUrl != nil { + data.Set("VoiceFallbackUrl", *params.VoiceFallbackUrl) + } + if params != nil && params.VoiceMethod != nil { + data.Set("VoiceMethod", *params.VoiceMethod) + } + if params != nil && params.VoiceReceiveMode != nil { + data.Set("VoiceReceiveMode", *params.VoiceReceiveMode) + } + if params != nil && params.VoiceUrl != nil { + data.Set("VoiceUrl", *params.VoiceUrl) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberMobile{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberMobile{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateIncomingPhoneNumberTollFreeParams Optional parameters for the method 'CreateIncomingPhoneNumberTollFree' type CreateIncomingPhoneNumberTollFreeParams struct { - AddressSid *string `json:"AddressSid,omitempty"` - ApiVersion *string `json:"ApiVersion,omitempty"` - BundleSid *string `json:"BundleSid,omitempty"` - EmergencyAddressSid *string `json:"EmergencyAddressSid,omitempty"` - EmergencyStatus *string `json:"EmergencyStatus,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - IdentitySid *string `json:"IdentitySid,omitempty"` - PhoneNumber *string `json:"PhoneNumber,omitempty"` - SmsApplicationSid *string `json:"SmsApplicationSid,omitempty"` - SmsFallbackMethod *string `json:"SmsFallbackMethod,omitempty"` - SmsFallbackUrl *string `json:"SmsFallbackUrl,omitempty"` - SmsMethod *string `json:"SmsMethod,omitempty"` - SmsUrl *string `json:"SmsUrl,omitempty"` - StatusCallback *string `json:"StatusCallback,omitempty"` + AddressSid *string `json:"AddressSid,omitempty"` + ApiVersion *string `json:"ApiVersion,omitempty"` + BundleSid *string `json:"BundleSid,omitempty"` + EmergencyAddressSid *string `json:"EmergencyAddressSid,omitempty"` + EmergencyStatus *string `json:"EmergencyStatus,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + IdentitySid *string `json:"IdentitySid,omitempty"` + PhoneNumber *string `json:"PhoneNumber,omitempty"` + SmsApplicationSid *string `json:"SmsApplicationSid,omitempty"` + SmsFallbackMethod *string `json:"SmsFallbackMethod,omitempty"` + SmsFallbackUrl *string `json:"SmsFallbackUrl,omitempty"` + SmsMethod *string `json:"SmsMethod,omitempty"` + SmsUrl *string `json:"SmsUrl,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` - TrunkSid *string `json:"TrunkSid,omitempty"` - VoiceApplicationSid *string `json:"VoiceApplicationSid,omitempty"` - VoiceCallerIdLookup *bool `json:"VoiceCallerIdLookup,omitempty"` - VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"` - VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` - VoiceMethod *string `json:"VoiceMethod,omitempty"` - VoiceReceiveMode *string `json:"VoiceReceiveMode,omitempty"` - VoiceUrl *string `json:"VoiceUrl,omitempty"` + TrunkSid *string `json:"TrunkSid,omitempty"` + VoiceApplicationSid *string `json:"VoiceApplicationSid,omitempty"` + VoiceCallerIdLookup *bool `json:"VoiceCallerIdLookup,omitempty"` + VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"` + VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` + VoiceMethod *string `json:"VoiceMethod,omitempty"` + VoiceReceiveMode *string `json:"VoiceReceiveMode,omitempty"` + VoiceUrl *string `json:"VoiceUrl,omitempty"` } /* @@ -1126,117 +1127,117 @@ type CreateIncomingPhoneNumberTollFreeParams struct { * @param "VoiceReceiveMode" (string) - The configuration parameter for the new phone number to receive incoming voice calls or faxes. Can be: `fax` or `voice` and defaults to `voice`. * @param "VoiceUrl" (string) - The URL that we should call to answer a call to the new phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set. * @return ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberTollFree -*/ + */ func (c *DefaultApiService) CreateIncomingPhoneNumberTollFree(AccountSid string, params *CreateIncomingPhoneNumberTollFreeParams) (*ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberTollFree, error) { - path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/TollFree.json" + path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/TollFree.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.AddressSid != nil { - data.Set("AddressSid", *params.AddressSid) -} - if params != nil && params.ApiVersion != nil { - data.Set("ApiVersion", *params.ApiVersion) -} - if params != nil && params.BundleSid != nil { - data.Set("BundleSid", *params.BundleSid) -} - if params != nil && params.EmergencyAddressSid != nil { - data.Set("EmergencyAddressSid", *params.EmergencyAddressSid) -} - if params != nil && params.EmergencyStatus != nil { - data.Set("EmergencyStatus", *params.EmergencyStatus) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.IdentitySid != nil { - data.Set("IdentitySid", *params.IdentitySid) -} - if params != nil && params.PhoneNumber != nil { - data.Set("PhoneNumber", *params.PhoneNumber) -} - if params != nil && params.SmsApplicationSid != nil { - data.Set("SmsApplicationSid", *params.SmsApplicationSid) -} - if params != nil && params.SmsFallbackMethod != nil { - data.Set("SmsFallbackMethod", *params.SmsFallbackMethod) -} - if params != nil && params.SmsFallbackUrl != nil { - data.Set("SmsFallbackUrl", *params.SmsFallbackUrl) -} - if params != nil && params.SmsMethod != nil { - data.Set("SmsMethod", *params.SmsMethod) -} - if params != nil && params.SmsUrl != nil { - data.Set("SmsUrl", *params.SmsUrl) -} - if params != nil && params.StatusCallback != nil { - data.Set("StatusCallback", *params.StatusCallback) -} - if params != nil && params.StatusCallbackMethod != nil { - data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) -} - if params != nil && params.TrunkSid != nil { - data.Set("TrunkSid", *params.TrunkSid) -} - if params != nil && params.VoiceApplicationSid != nil { - data.Set("VoiceApplicationSid", *params.VoiceApplicationSid) -} - if params != nil && params.VoiceCallerIdLookup != nil { - data.Set("VoiceCallerIdLookup", fmt.Sprint(*params.VoiceCallerIdLookup)) -} - if params != nil && params.VoiceFallbackMethod != nil { - data.Set("VoiceFallbackMethod", *params.VoiceFallbackMethod) -} - if params != nil && params.VoiceFallbackUrl != nil { - data.Set("VoiceFallbackUrl", *params.VoiceFallbackUrl) -} - if params != nil && params.VoiceMethod != nil { - data.Set("VoiceMethod", *params.VoiceMethod) -} - if params != nil && params.VoiceReceiveMode != nil { - data.Set("VoiceReceiveMode", *params.VoiceReceiveMode) -} - if params != nil && params.VoiceUrl != nil { - data.Set("VoiceUrl", *params.VoiceUrl) -} + data := url.Values{} + headers := 0 + if params != nil && params.AddressSid != nil { + data.Set("AddressSid", *params.AddressSid) + } + if params != nil && params.ApiVersion != nil { + data.Set("ApiVersion", *params.ApiVersion) + } + if params != nil && params.BundleSid != nil { + data.Set("BundleSid", *params.BundleSid) + } + if params != nil && params.EmergencyAddressSid != nil { + data.Set("EmergencyAddressSid", *params.EmergencyAddressSid) + } + if params != nil && params.EmergencyStatus != nil { + data.Set("EmergencyStatus", *params.EmergencyStatus) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.IdentitySid != nil { + data.Set("IdentitySid", *params.IdentitySid) + } + if params != nil && params.PhoneNumber != nil { + data.Set("PhoneNumber", *params.PhoneNumber) + } + if params != nil && params.SmsApplicationSid != nil { + data.Set("SmsApplicationSid", *params.SmsApplicationSid) + } + if params != nil && params.SmsFallbackMethod != nil { + data.Set("SmsFallbackMethod", *params.SmsFallbackMethod) + } + if params != nil && params.SmsFallbackUrl != nil { + data.Set("SmsFallbackUrl", *params.SmsFallbackUrl) + } + if params != nil && params.SmsMethod != nil { + data.Set("SmsMethod", *params.SmsMethod) + } + if params != nil && params.SmsUrl != nil { + data.Set("SmsUrl", *params.SmsUrl) + } + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) + } + if params != nil && params.StatusCallbackMethod != nil { + data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) + } + if params != nil && params.TrunkSid != nil { + data.Set("TrunkSid", *params.TrunkSid) + } + if params != nil && params.VoiceApplicationSid != nil { + data.Set("VoiceApplicationSid", *params.VoiceApplicationSid) + } + if params != nil && params.VoiceCallerIdLookup != nil { + data.Set("VoiceCallerIdLookup", fmt.Sprint(*params.VoiceCallerIdLookup)) + } + if params != nil && params.VoiceFallbackMethod != nil { + data.Set("VoiceFallbackMethod", *params.VoiceFallbackMethod) + } + if params != nil && params.VoiceFallbackUrl != nil { + data.Set("VoiceFallbackUrl", *params.VoiceFallbackUrl) + } + if params != nil && params.VoiceMethod != nil { + data.Set("VoiceMethod", *params.VoiceMethod) + } + if params != nil && params.VoiceReceiveMode != nil { + data.Set("VoiceReceiveMode", *params.VoiceReceiveMode) + } + if params != nil && params.VoiceUrl != nil { + data.Set("VoiceUrl", *params.VoiceUrl) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberTollFree{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberTollFree{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateMessageParams Optional parameters for the method 'CreateMessage' type CreateMessageParams struct { - AddressRetention *string `json:"AddressRetention,omitempty"` - ApplicationSid *string `json:"ApplicationSid,omitempty"` - Attempt *int32 `json:"Attempt,omitempty"` - Body *string `json:"Body,omitempty"` - ContentRetention *string `json:"ContentRetention,omitempty"` - ForceDelivery *bool `json:"ForceDelivery,omitempty"` - From *string `json:"From,omitempty"` - MaxPrice *float32 `json:"MaxPrice,omitempty"` - MediaUrl *[]string `json:"MediaUrl,omitempty"` - MessagingServiceSid *string `json:"MessagingServiceSid,omitempty"` - PersistentAction *[]string `json:"PersistentAction,omitempty"` - ProvideFeedback *bool `json:"ProvideFeedback,omitempty"` - SmartEncoded *bool `json:"SmartEncoded,omitempty"` - StatusCallback *string `json:"StatusCallback,omitempty"` - To *string `json:"To,omitempty"` - ValidityPeriod *int32 `json:"ValidityPeriod,omitempty"` + AddressRetention *string `json:"AddressRetention,omitempty"` + ApplicationSid *string `json:"ApplicationSid,omitempty"` + Attempt *int32 `json:"Attempt,omitempty"` + Body *string `json:"Body,omitempty"` + ContentRetention *string `json:"ContentRetention,omitempty"` + ForceDelivery *bool `json:"ForceDelivery,omitempty"` + From *string `json:"From,omitempty"` + MaxPrice *float32 `json:"MaxPrice,omitempty"` + MediaUrl *[]string `json:"MediaUrl,omitempty"` + MessagingServiceSid *string `json:"MessagingServiceSid,omitempty"` + PersistentAction *[]string `json:"PersistentAction,omitempty"` + ProvideFeedback *bool `json:"ProvideFeedback,omitempty"` + SmartEncoded *bool `json:"SmartEncoded,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` + To *string `json:"To,omitempty"` + ValidityPeriod *int32 `json:"ValidityPeriod,omitempty"` } /* @@ -1261,78 +1262,78 @@ type CreateMessageParams struct { * @param "To" (string) - The destination phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format for SMS/MMS or [Channel user address](https://www.twilio.com/docs/sms/channels#channel-addresses) for other 3rd-party channels. * @param "ValidityPeriod" (int32) - How long in seconds the message can remain in our outgoing message queue. After this period elapses, the message fails and we call your status callback. Can be between 1 and the default value of 14,400 seconds. After a message has been accepted by a carrier, however, we cannot guarantee that the message will not be queued after this period. We recommend that this value be at least 5 seconds. * @return ApiV2010AccountMessage -*/ + */ func (c *DefaultApiService) CreateMessage(AccountSid string, params *CreateMessageParams) (*ApiV2010AccountMessage, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Messages.json" + path := "/2010-04-01/Accounts/{AccountSid}/Messages.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.AddressRetention != nil { - data.Set("AddressRetention", *params.AddressRetention) -} - if params != nil && params.ApplicationSid != nil { - data.Set("ApplicationSid", *params.ApplicationSid) -} - if params != nil && params.Attempt != nil { - data.Set("Attempt", fmt.Sprint(*params.Attempt)) -} - if params != nil && params.Body != nil { - data.Set("Body", *params.Body) -} - if params != nil && params.ContentRetention != nil { - data.Set("ContentRetention", *params.ContentRetention) -} - if params != nil && params.ForceDelivery != nil { - data.Set("ForceDelivery", fmt.Sprint(*params.ForceDelivery)) -} - if params != nil && params.From != nil { - data.Set("From", *params.From) -} - if params != nil && params.MaxPrice != nil { - data.Set("MaxPrice", fmt.Sprint(*params.MaxPrice)) -} - if params != nil && params.MediaUrl != nil { - data.Set("MediaUrl", strings.Join(*params.MediaUrl, ",")) -} - if params != nil && params.MessagingServiceSid != nil { - data.Set("MessagingServiceSid", *params.MessagingServiceSid) -} - if params != nil && params.PersistentAction != nil { - data.Set("PersistentAction", strings.Join(*params.PersistentAction, ",")) -} - if params != nil && params.ProvideFeedback != nil { - data.Set("ProvideFeedback", fmt.Sprint(*params.ProvideFeedback)) -} - if params != nil && params.SmartEncoded != nil { - data.Set("SmartEncoded", fmt.Sprint(*params.SmartEncoded)) -} - if params != nil && params.StatusCallback != nil { - data.Set("StatusCallback", *params.StatusCallback) -} - if params != nil && params.To != nil { - data.Set("To", *params.To) -} - if params != nil && params.ValidityPeriod != nil { - data.Set("ValidityPeriod", fmt.Sprint(*params.ValidityPeriod)) -} + data := url.Values{} + headers := 0 + if params != nil && params.AddressRetention != nil { + data.Set("AddressRetention", *params.AddressRetention) + } + if params != nil && params.ApplicationSid != nil { + data.Set("ApplicationSid", *params.ApplicationSid) + } + if params != nil && params.Attempt != nil { + data.Set("Attempt", fmt.Sprint(*params.Attempt)) + } + if params != nil && params.Body != nil { + data.Set("Body", *params.Body) + } + if params != nil && params.ContentRetention != nil { + data.Set("ContentRetention", *params.ContentRetention) + } + if params != nil && params.ForceDelivery != nil { + data.Set("ForceDelivery", fmt.Sprint(*params.ForceDelivery)) + } + if params != nil && params.From != nil { + data.Set("From", *params.From) + } + if params != nil && params.MaxPrice != nil { + data.Set("MaxPrice", fmt.Sprint(*params.MaxPrice)) + } + if params != nil && params.MediaUrl != nil { + data.Set("MediaUrl", strings.Join(*params.MediaUrl, ",")) + } + if params != nil && params.MessagingServiceSid != nil { + data.Set("MessagingServiceSid", *params.MessagingServiceSid) + } + if params != nil && params.PersistentAction != nil { + data.Set("PersistentAction", strings.Join(*params.PersistentAction, ",")) + } + if params != nil && params.ProvideFeedback != nil { + data.Set("ProvideFeedback", fmt.Sprint(*params.ProvideFeedback)) + } + if params != nil && params.SmartEncoded != nil { + data.Set("SmartEncoded", fmt.Sprint(*params.SmartEncoded)) + } + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) + } + if params != nil && params.To != nil { + data.Set("To", *params.To) + } + if params != nil && params.ValidityPeriod != nil { + data.Set("ValidityPeriod", fmt.Sprint(*params.ValidityPeriod)) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountMessage{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountMessage{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateMessageFeedbackParams Optional parameters for the method 'CreateMessageFeedback' type CreateMessageFeedbackParams struct { Outcome *string `json:"Outcome,omitempty"` @@ -1345,34 +1346,34 @@ type CreateMessageFeedbackParams struct { * @param optional nil or *CreateMessageFeedbackParams - Optional Parameters: * @param "Outcome" (string) - Whether the feedback has arrived. Can be: `unconfirmed` or `confirmed`. If `provide_feedback`=`true` in [the initial HTTP POST](https://www.twilio.com/docs/sms/api/message-resource#create-a-message-resource), the initial value of this property is `unconfirmed`. After the message arrives, update the value to `confirmed`. * @return ApiV2010AccountMessageMessageFeedback -*/ + */ func (c *DefaultApiService) CreateMessageFeedback(AccountSid string, MessageSid string, params *CreateMessageFeedbackParams) (*ApiV2010AccountMessageMessageFeedback, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Messages/{MessageSid}/Feedback.json" + path := "/2010-04-01/Accounts/{AccountSid}/Messages/{MessageSid}/Feedback.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"MessageSid"+"}", MessageSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Outcome != nil { - data.Set("Outcome", *params.Outcome) -} + data := url.Values{} + headers := 0 + if params != nil && params.Outcome != nil { + data.Set("Outcome", *params.Outcome) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountMessageMessageFeedback{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountMessageMessageFeedback{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateNewKeyParams Optional parameters for the method 'CreateNewKey' type CreateNewKeyParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` @@ -1384,33 +1385,33 @@ type CreateNewKeyParams struct { * @param optional nil or *CreateNewKeyParams - Optional Parameters: * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It can be up to 64 characters long. * @return ApiV2010AccountNewKey -*/ + */ func (c *DefaultApiService) CreateNewKey(AccountSid string, params *CreateNewKeyParams) (*ApiV2010AccountNewKey, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Keys.json" + path := "/2010-04-01/Accounts/{AccountSid}/Keys.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} + data := url.Values{} + headers := 0 + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountNewKey{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountNewKey{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateNewSigningKeyParams Optional parameters for the method 'CreateNewSigningKey' type CreateNewSigningKeyParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` @@ -1423,73 +1424,73 @@ type CreateNewSigningKeyParams struct { * @param optional nil or *CreateNewSigningKeyParams - Optional Parameters: * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It can be up to 64 characters long. * @return ApiV2010AccountNewSigningKey -*/ + */ func (c *DefaultApiService) CreateNewSigningKey(AccountSid string, params *CreateNewSigningKeyParams) (*ApiV2010AccountNewSigningKey, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SigningKeys.json" + path := "/2010-04-01/Accounts/{AccountSid}/SigningKeys.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} + data := url.Values{} + headers := 0 + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountNewSigningKey{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountNewSigningKey{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateParticipantParams Optional parameters for the method 'CreateParticipant' type CreateParticipantParams struct { - Beep *string `json:"Beep,omitempty"` - Byoc *string `json:"Byoc,omitempty"` - CallReason *string `json:"CallReason,omitempty"` - CallSidToCoach *string `json:"CallSidToCoach,omitempty"` - CallerId *string `json:"CallerId,omitempty"` - Coaching *bool `json:"Coaching,omitempty"` - ConferenceRecord *string `json:"ConferenceRecord,omitempty"` - ConferenceRecordingStatusCallback *string `json:"ConferenceRecordingStatusCallback,omitempty"` - ConferenceRecordingStatusCallbackEvent *[]string `json:"ConferenceRecordingStatusCallbackEvent,omitempty"` - ConferenceRecordingStatusCallbackMethod *string `json:"ConferenceRecordingStatusCallbackMethod,omitempty"` - ConferenceStatusCallback *string `json:"ConferenceStatusCallback,omitempty"` - ConferenceStatusCallbackEvent *[]string `json:"ConferenceStatusCallbackEvent,omitempty"` - ConferenceStatusCallbackMethod *string `json:"ConferenceStatusCallbackMethod,omitempty"` - ConferenceTrim *string `json:"ConferenceTrim,omitempty"` - EarlyMedia *bool `json:"EarlyMedia,omitempty"` - EndConferenceOnExit *bool `json:"EndConferenceOnExit,omitempty"` - From *string `json:"From,omitempty"` - JitterBufferSize *string `json:"JitterBufferSize,omitempty"` - Label *string `json:"Label,omitempty"` - MaxParticipants *int32 `json:"MaxParticipants,omitempty"` - Muted *bool `json:"Muted,omitempty"` - Record *bool `json:"Record,omitempty"` - RecordingChannels *string `json:"RecordingChannels,omitempty"` - RecordingStatusCallback *string `json:"RecordingStatusCallback,omitempty"` - RecordingStatusCallbackEvent *[]string `json:"RecordingStatusCallbackEvent,omitempty"` - RecordingStatusCallbackMethod *string `json:"RecordingStatusCallbackMethod,omitempty"` - RecordingTrack *string `json:"RecordingTrack,omitempty"` - Region *string `json:"Region,omitempty"` - SipAuthPassword *string `json:"SipAuthPassword,omitempty"` - SipAuthUsername *string `json:"SipAuthUsername,omitempty"` - StartConferenceOnEnter *bool `json:"StartConferenceOnEnter,omitempty"` - StatusCallback *string `json:"StatusCallback,omitempty"` - StatusCallbackEvent *[]string `json:"StatusCallbackEvent,omitempty"` - StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` - Timeout *int32 `json:"Timeout,omitempty"` - To *string `json:"To,omitempty"` - WaitMethod *string `json:"WaitMethod,omitempty"` - WaitUrl *string `json:"WaitUrl,omitempty"` + Beep *string `json:"Beep,omitempty"` + Byoc *string `json:"Byoc,omitempty"` + CallReason *string `json:"CallReason,omitempty"` + CallSidToCoach *string `json:"CallSidToCoach,omitempty"` + CallerId *string `json:"CallerId,omitempty"` + Coaching *bool `json:"Coaching,omitempty"` + ConferenceRecord *string `json:"ConferenceRecord,omitempty"` + ConferenceRecordingStatusCallback *string `json:"ConferenceRecordingStatusCallback,omitempty"` + ConferenceRecordingStatusCallbackEvent *[]string `json:"ConferenceRecordingStatusCallbackEvent,omitempty"` + ConferenceRecordingStatusCallbackMethod *string `json:"ConferenceRecordingStatusCallbackMethod,omitempty"` + ConferenceStatusCallback *string `json:"ConferenceStatusCallback,omitempty"` + ConferenceStatusCallbackEvent *[]string `json:"ConferenceStatusCallbackEvent,omitempty"` + ConferenceStatusCallbackMethod *string `json:"ConferenceStatusCallbackMethod,omitempty"` + ConferenceTrim *string `json:"ConferenceTrim,omitempty"` + EarlyMedia *bool `json:"EarlyMedia,omitempty"` + EndConferenceOnExit *bool `json:"EndConferenceOnExit,omitempty"` + From *string `json:"From,omitempty"` + JitterBufferSize *string `json:"JitterBufferSize,omitempty"` + Label *string `json:"Label,omitempty"` + MaxParticipants *int32 `json:"MaxParticipants,omitempty"` + Muted *bool `json:"Muted,omitempty"` + Record *bool `json:"Record,omitempty"` + RecordingChannels *string `json:"RecordingChannels,omitempty"` + RecordingStatusCallback *string `json:"RecordingStatusCallback,omitempty"` + RecordingStatusCallbackEvent *[]string `json:"RecordingStatusCallbackEvent,omitempty"` + RecordingStatusCallbackMethod *string `json:"RecordingStatusCallbackMethod,omitempty"` + RecordingTrack *string `json:"RecordingTrack,omitempty"` + Region *string `json:"Region,omitempty"` + SipAuthPassword *string `json:"SipAuthPassword,omitempty"` + SipAuthUsername *string `json:"SipAuthUsername,omitempty"` + StartConferenceOnEnter *bool `json:"StartConferenceOnEnter,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` + StatusCallbackEvent *[]string `json:"StatusCallbackEvent,omitempty"` + StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` + Timeout *int32 `json:"Timeout,omitempty"` + To *string `json:"To,omitempty"` + WaitMethod *string `json:"WaitMethod,omitempty"` + WaitUrl *string `json:"WaitUrl,omitempty"` } /* @@ -1536,163 +1537,163 @@ type CreateParticipantParams struct { * @param "WaitMethod" (string) - The HTTP method we should use to call `wait_url`. Can be `GET` or `POST` and the default is `POST`. When using a static audio file, this should be `GET` so that we can cache the file. * @param "WaitUrl" (string) - The URL we should call using the `wait_method` for the music to play while participants are waiting for the conference to start. The default value is the URL of our standard hold music. [Learn more about hold music](https://www.twilio.com/labs/twimlets/holdmusic). * @return ApiV2010AccountConferenceParticipant -*/ + */ func (c *DefaultApiService) CreateParticipant(AccountSid string, ConferenceSid string, params *CreateParticipantParams) (*ApiV2010AccountConferenceParticipant, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Participants.json" + path := "/2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Participants.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"ConferenceSid"+"}", ConferenceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Beep != nil { - data.Set("Beep", *params.Beep) -} - if params != nil && params.Byoc != nil { - data.Set("Byoc", *params.Byoc) -} - if params != nil && params.CallReason != nil { - data.Set("CallReason", *params.CallReason) -} - if params != nil && params.CallSidToCoach != nil { - data.Set("CallSidToCoach", *params.CallSidToCoach) -} - if params != nil && params.CallerId != nil { - data.Set("CallerId", *params.CallerId) -} - if params != nil && params.Coaching != nil { - data.Set("Coaching", fmt.Sprint(*params.Coaching)) -} - if params != nil && params.ConferenceRecord != nil { - data.Set("ConferenceRecord", *params.ConferenceRecord) -} - if params != nil && params.ConferenceRecordingStatusCallback != nil { - data.Set("ConferenceRecordingStatusCallback", *params.ConferenceRecordingStatusCallback) -} - if params != nil && params.ConferenceRecordingStatusCallbackEvent != nil { - data.Set("ConferenceRecordingStatusCallbackEvent", strings.Join(*params.ConferenceRecordingStatusCallbackEvent, ",")) -} - if params != nil && params.ConferenceRecordingStatusCallbackMethod != nil { - data.Set("ConferenceRecordingStatusCallbackMethod", *params.ConferenceRecordingStatusCallbackMethod) -} - if params != nil && params.ConferenceStatusCallback != nil { - data.Set("ConferenceStatusCallback", *params.ConferenceStatusCallback) -} - if params != nil && params.ConferenceStatusCallbackEvent != nil { - data.Set("ConferenceStatusCallbackEvent", strings.Join(*params.ConferenceStatusCallbackEvent, ",")) -} - if params != nil && params.ConferenceStatusCallbackMethod != nil { - data.Set("ConferenceStatusCallbackMethod", *params.ConferenceStatusCallbackMethod) -} - if params != nil && params.ConferenceTrim != nil { - data.Set("ConferenceTrim", *params.ConferenceTrim) -} - if params != nil && params.EarlyMedia != nil { - data.Set("EarlyMedia", fmt.Sprint(*params.EarlyMedia)) -} - if params != nil && params.EndConferenceOnExit != nil { - data.Set("EndConferenceOnExit", fmt.Sprint(*params.EndConferenceOnExit)) -} - if params != nil && params.From != nil { - data.Set("From", *params.From) -} - if params != nil && params.JitterBufferSize != nil { - data.Set("JitterBufferSize", *params.JitterBufferSize) -} - if params != nil && params.Label != nil { - data.Set("Label", *params.Label) -} - if params != nil && params.MaxParticipants != nil { - data.Set("MaxParticipants", fmt.Sprint(*params.MaxParticipants)) -} - if params != nil && params.Muted != nil { - data.Set("Muted", fmt.Sprint(*params.Muted)) -} - if params != nil && params.Record != nil { - data.Set("Record", fmt.Sprint(*params.Record)) -} - if params != nil && params.RecordingChannels != nil { - data.Set("RecordingChannels", *params.RecordingChannels) -} - if params != nil && params.RecordingStatusCallback != nil { - data.Set("RecordingStatusCallback", *params.RecordingStatusCallback) -} - if params != nil && params.RecordingStatusCallbackEvent != nil { - data.Set("RecordingStatusCallbackEvent", strings.Join(*params.RecordingStatusCallbackEvent, ",")) -} - if params != nil && params.RecordingStatusCallbackMethod != nil { - data.Set("RecordingStatusCallbackMethod", *params.RecordingStatusCallbackMethod) -} - if params != nil && params.RecordingTrack != nil { - data.Set("RecordingTrack", *params.RecordingTrack) -} - if params != nil && params.Region != nil { - data.Set("Region", *params.Region) -} - if params != nil && params.SipAuthPassword != nil { - data.Set("SipAuthPassword", *params.SipAuthPassword) -} - if params != nil && params.SipAuthUsername != nil { - data.Set("SipAuthUsername", *params.SipAuthUsername) -} - if params != nil && params.StartConferenceOnEnter != nil { - data.Set("StartConferenceOnEnter", fmt.Sprint(*params.StartConferenceOnEnter)) -} - if params != nil && params.StatusCallback != nil { - data.Set("StatusCallback", *params.StatusCallback) -} - if params != nil && params.StatusCallbackEvent != nil { - data.Set("StatusCallbackEvent", strings.Join(*params.StatusCallbackEvent, ",")) -} - if params != nil && params.StatusCallbackMethod != nil { - data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) -} - if params != nil && params.Timeout != nil { - data.Set("Timeout", fmt.Sprint(*params.Timeout)) -} - if params != nil && params.To != nil { - data.Set("To", *params.To) -} - if params != nil && params.WaitMethod != nil { - data.Set("WaitMethod", *params.WaitMethod) -} - if params != nil && params.WaitUrl != nil { - data.Set("WaitUrl", *params.WaitUrl) -} - - - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &ApiV2010AccountConferenceParticipant{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + data := url.Values{} + headers := 0 - return ps, err + if params != nil && params.Beep != nil { + data.Set("Beep", *params.Beep) + } + if params != nil && params.Byoc != nil { + data.Set("Byoc", *params.Byoc) + } + if params != nil && params.CallReason != nil { + data.Set("CallReason", *params.CallReason) + } + if params != nil && params.CallSidToCoach != nil { + data.Set("CallSidToCoach", *params.CallSidToCoach) + } + if params != nil && params.CallerId != nil { + data.Set("CallerId", *params.CallerId) + } + if params != nil && params.Coaching != nil { + data.Set("Coaching", fmt.Sprint(*params.Coaching)) + } + if params != nil && params.ConferenceRecord != nil { + data.Set("ConferenceRecord", *params.ConferenceRecord) + } + if params != nil && params.ConferenceRecordingStatusCallback != nil { + data.Set("ConferenceRecordingStatusCallback", *params.ConferenceRecordingStatusCallback) + } + if params != nil && params.ConferenceRecordingStatusCallbackEvent != nil { + data.Set("ConferenceRecordingStatusCallbackEvent", strings.Join(*params.ConferenceRecordingStatusCallbackEvent, ",")) + } + if params != nil && params.ConferenceRecordingStatusCallbackMethod != nil { + data.Set("ConferenceRecordingStatusCallbackMethod", *params.ConferenceRecordingStatusCallbackMethod) + } + if params != nil && params.ConferenceStatusCallback != nil { + data.Set("ConferenceStatusCallback", *params.ConferenceStatusCallback) + } + if params != nil && params.ConferenceStatusCallbackEvent != nil { + data.Set("ConferenceStatusCallbackEvent", strings.Join(*params.ConferenceStatusCallbackEvent, ",")) + } + if params != nil && params.ConferenceStatusCallbackMethod != nil { + data.Set("ConferenceStatusCallbackMethod", *params.ConferenceStatusCallbackMethod) + } + if params != nil && params.ConferenceTrim != nil { + data.Set("ConferenceTrim", *params.ConferenceTrim) + } + if params != nil && params.EarlyMedia != nil { + data.Set("EarlyMedia", fmt.Sprint(*params.EarlyMedia)) + } + if params != nil && params.EndConferenceOnExit != nil { + data.Set("EndConferenceOnExit", fmt.Sprint(*params.EndConferenceOnExit)) + } + if params != nil && params.From != nil { + data.Set("From", *params.From) + } + if params != nil && params.JitterBufferSize != nil { + data.Set("JitterBufferSize", *params.JitterBufferSize) + } + if params != nil && params.Label != nil { + data.Set("Label", *params.Label) + } + if params != nil && params.MaxParticipants != nil { + data.Set("MaxParticipants", fmt.Sprint(*params.MaxParticipants)) + } + if params != nil && params.Muted != nil { + data.Set("Muted", fmt.Sprint(*params.Muted)) + } + if params != nil && params.Record != nil { + data.Set("Record", fmt.Sprint(*params.Record)) + } + if params != nil && params.RecordingChannels != nil { + data.Set("RecordingChannels", *params.RecordingChannels) + } + if params != nil && params.RecordingStatusCallback != nil { + data.Set("RecordingStatusCallback", *params.RecordingStatusCallback) + } + if params != nil && params.RecordingStatusCallbackEvent != nil { + data.Set("RecordingStatusCallbackEvent", strings.Join(*params.RecordingStatusCallbackEvent, ",")) + } + if params != nil && params.RecordingStatusCallbackMethod != nil { + data.Set("RecordingStatusCallbackMethod", *params.RecordingStatusCallbackMethod) + } + if params != nil && params.RecordingTrack != nil { + data.Set("RecordingTrack", *params.RecordingTrack) + } + if params != nil && params.Region != nil { + data.Set("Region", *params.Region) + } + if params != nil && params.SipAuthPassword != nil { + data.Set("SipAuthPassword", *params.SipAuthPassword) + } + if params != nil && params.SipAuthUsername != nil { + data.Set("SipAuthUsername", *params.SipAuthUsername) + } + if params != nil && params.StartConferenceOnEnter != nil { + data.Set("StartConferenceOnEnter", fmt.Sprint(*params.StartConferenceOnEnter)) + } + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) + } + if params != nil && params.StatusCallbackEvent != nil { + data.Set("StatusCallbackEvent", strings.Join(*params.StatusCallbackEvent, ",")) + } + if params != nil && params.StatusCallbackMethod != nil { + data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) + } + if params != nil && params.Timeout != nil { + data.Set("Timeout", fmt.Sprint(*params.Timeout)) + } + if params != nil && params.To != nil { + data.Set("To", *params.To) + } + if params != nil && params.WaitMethod != nil { + data.Set("WaitMethod", *params.WaitMethod) + } + if params != nil && params.WaitUrl != nil { + data.Set("WaitUrl", *params.WaitUrl) + } + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountConferenceParticipant{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err } + // CreatePaymentsParams Optional parameters for the method 'CreatePayments' type CreatePaymentsParams struct { - BankAccountType *string `json:"BankAccountType,omitempty"` - ChargeAmount *float32 `json:"ChargeAmount,omitempty"` - Currency *string `json:"Currency,omitempty"` - Description *string `json:"Description,omitempty"` - IdempotencyKey *string `json:"IdempotencyKey,omitempty"` - Input *string `json:"Input,omitempty"` - MinPostalCodeLength *int32 `json:"MinPostalCodeLength,omitempty"` - Parameter *map[string]interface{} `json:"Parameter,omitempty"` - PaymentConnector *string `json:"PaymentConnector,omitempty"` - PaymentMethod *string `json:"PaymentMethod,omitempty"` - PostalCode *bool `json:"PostalCode,omitempty"` - SecurityCode *bool `json:"SecurityCode,omitempty"` - StatusCallback *string `json:"StatusCallback,omitempty"` - Timeout *int32 `json:"Timeout,omitempty"` - TokenType *string `json:"TokenType,omitempty"` - ValidCardTypes *string `json:"ValidCardTypes,omitempty"` + BankAccountType *string `json:"BankAccountType,omitempty"` + ChargeAmount *float32 `json:"ChargeAmount,omitempty"` + Currency *string `json:"Currency,omitempty"` + Description *string `json:"Description,omitempty"` + IdempotencyKey *string `json:"IdempotencyKey,omitempty"` + Input *string `json:"Input,omitempty"` + MinPostalCodeLength *int32 `json:"MinPostalCodeLength,omitempty"` + Parameter *map[string]interface{} `json:"Parameter,omitempty"` + PaymentConnector *string `json:"PaymentConnector,omitempty"` + PaymentMethod *string `json:"PaymentMethod,omitempty"` + PostalCode *bool `json:"PostalCode,omitempty"` + SecurityCode *bool `json:"SecurityCode,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` + Timeout *int32 `json:"Timeout,omitempty"` + TokenType *string `json:"TokenType,omitempty"` + ValidCardTypes *string `json:"ValidCardTypes,omitempty"` } /* @@ -1718,89 +1719,89 @@ type CreatePaymentsParams struct { * @param "TokenType" (string) - Indicates whether the payment method should be tokenized as a `one-time` or `reusable` token. The default value is `reusable`. Do not enter a charge amount when tokenizing. If a charge amount is entered, the payment method will be charged and not tokenized. * @param "ValidCardTypes" (string) - Credit card types separated by space that Pay should accept. The default value is `visa mastercard amex` * @return ApiV2010AccountCallPayments -*/ + */ func (c *DefaultApiService) CreatePayments(AccountSid string, CallSid string, params *CreatePaymentsParams) (*ApiV2010AccountCallPayments, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Payments.json" + path := "/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Payments.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.BankAccountType != nil { - data.Set("BankAccountType", *params.BankAccountType) -} - if params != nil && params.ChargeAmount != nil { - data.Set("ChargeAmount", fmt.Sprint(*params.ChargeAmount)) -} - if params != nil && params.Currency != nil { - data.Set("Currency", *params.Currency) -} - if params != nil && params.Description != nil { - data.Set("Description", *params.Description) -} - if params != nil && params.IdempotencyKey != nil { - data.Set("IdempotencyKey", *params.IdempotencyKey) -} - if params != nil && params.Input != nil { - data.Set("Input", *params.Input) -} - if params != nil && params.MinPostalCodeLength != nil { - data.Set("MinPostalCodeLength", fmt.Sprint(*params.MinPostalCodeLength)) -} - if params != nil && params.Parameter != nil { - v, err := json.Marshal(params.Parameter) - - if err != nil { - return nil, err + if params != nil && params.BankAccountType != nil { + data.Set("BankAccountType", *params.BankAccountType) + } + if params != nil && params.ChargeAmount != nil { + data.Set("ChargeAmount", fmt.Sprint(*params.ChargeAmount)) + } + if params != nil && params.Currency != nil { + data.Set("Currency", *params.Currency) + } + if params != nil && params.Description != nil { + data.Set("Description", *params.Description) } + if params != nil && params.IdempotencyKey != nil { + data.Set("IdempotencyKey", *params.IdempotencyKey) + } + if params != nil && params.Input != nil { + data.Set("Input", *params.Input) + } + if params != nil && params.MinPostalCodeLength != nil { + data.Set("MinPostalCodeLength", fmt.Sprint(*params.MinPostalCodeLength)) + } + if params != nil && params.Parameter != nil { + v, err := json.Marshal(params.Parameter) - data.Set("Parameter", fmt.Sprint(v)) -} - if params != nil && params.PaymentConnector != nil { - data.Set("PaymentConnector", *params.PaymentConnector) -} - if params != nil && params.PaymentMethod != nil { - data.Set("PaymentMethod", *params.PaymentMethod) -} - if params != nil && params.PostalCode != nil { - data.Set("PostalCode", fmt.Sprint(*params.PostalCode)) -} - if params != nil && params.SecurityCode != nil { - data.Set("SecurityCode", fmt.Sprint(*params.SecurityCode)) -} - if params != nil && params.StatusCallback != nil { - data.Set("StatusCallback", *params.StatusCallback) -} - if params != nil && params.Timeout != nil { - data.Set("Timeout", fmt.Sprint(*params.Timeout)) -} - if params != nil && params.TokenType != nil { - data.Set("TokenType", *params.TokenType) -} - if params != nil && params.ValidCardTypes != nil { - data.Set("ValidCardTypes", *params.ValidCardTypes) -} + if err != nil { + return nil, err + } + data.Set("Parameter", fmt.Sprint(v)) + } + if params != nil && params.PaymentConnector != nil { + data.Set("PaymentConnector", *params.PaymentConnector) + } + if params != nil && params.PaymentMethod != nil { + data.Set("PaymentMethod", *params.PaymentMethod) + } + if params != nil && params.PostalCode != nil { + data.Set("PostalCode", fmt.Sprint(*params.PostalCode)) + } + if params != nil && params.SecurityCode != nil { + data.Set("SecurityCode", fmt.Sprint(*params.SecurityCode)) + } + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) + } + if params != nil && params.Timeout != nil { + data.Set("Timeout", fmt.Sprint(*params.Timeout)) + } + if params != nil && params.TokenType != nil { + data.Set("TokenType", *params.TokenType) + } + if params != nil && params.ValidCardTypes != nil { + data.Set("ValidCardTypes", *params.ValidCardTypes) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountCallPayments{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountCallPayments{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateQueueParams Optional parameters for the method 'CreateQueue' type CreateQueueParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` - MaxSize *int32 `json:"MaxSize,omitempty"` + MaxSize *int32 `json:"MaxSize,omitempty"` } /* @@ -1811,36 +1812,36 @@ type CreateQueueParams struct { * @param "FriendlyName" (string) - A descriptive string that you created to describe this resource. It can be up to 64 characters long. * @param "MaxSize" (int32) - The maximum number of calls allowed to be in the queue. The default is 100. The maximum is 5000. * @return ApiV2010AccountQueue -*/ + */ func (c *DefaultApiService) CreateQueue(AccountSid string, params *CreateQueueParams) (*ApiV2010AccountQueue, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Queues.json" + path := "/2010-04-01/Accounts/{AccountSid}/Queues.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.MaxSize != nil { - data.Set("MaxSize", fmt.Sprint(*params.MaxSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.MaxSize != nil { + data.Set("MaxSize", fmt.Sprint(*params.MaxSize)) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountQueue{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountQueue{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateSipAuthCallsCredentialListMappingParams Optional parameters for the method 'CreateSipAuthCallsCredentialListMapping' type CreateSipAuthCallsCredentialListMappingParams struct { CredentialListSid *string `json:"CredentialListSid,omitempty"` @@ -1854,34 +1855,34 @@ type CreateSipAuthCallsCredentialListMappingParams struct { * @param optional nil or *CreateSipAuthCallsCredentialListMappingParams - Optional Parameters: * @param "CredentialListSid" (string) - The SID of the CredentialList resource to map to the SIP domain. * @return ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsCredentialListMapping -*/ + */ func (c *DefaultApiService) CreateSipAuthCallsCredentialListMapping(AccountSid string, DomainSid string, params *CreateSipAuthCallsCredentialListMappingParams) (*ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsCredentialListMapping, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls/CredentialListMappings.json" + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls/CredentialListMappings.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.CredentialListSid != nil { - data.Set("CredentialListSid", *params.CredentialListSid) -} + data := url.Values{} + headers := 0 + if params != nil && params.CredentialListSid != nil { + data.Set("CredentialListSid", *params.CredentialListSid) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsCredentialListMapping{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsCredentialListMapping{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateSipAuthCallsIpAccessControlListMappingParams Optional parameters for the method 'CreateSipAuthCallsIpAccessControlListMapping' type CreateSipAuthCallsIpAccessControlListMappingParams struct { IpAccessControlListSid *string `json:"IpAccessControlListSid,omitempty"` @@ -1895,34 +1896,34 @@ type CreateSipAuthCallsIpAccessControlListMappingParams struct { * @param optional nil or *CreateSipAuthCallsIpAccessControlListMappingParams - Optional Parameters: * @param "IpAccessControlListSid" (string) - The SID of the IpAccessControlList resource to map to the SIP domain. * @return ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsIpAccessControlListMapping -*/ + */ func (c *DefaultApiService) CreateSipAuthCallsIpAccessControlListMapping(AccountSid string, DomainSid string, params *CreateSipAuthCallsIpAccessControlListMappingParams) (*ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsIpAccessControlListMapping, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls/IpAccessControlListMappings.json" + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls/IpAccessControlListMappings.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.IpAccessControlListSid != nil { - data.Set("IpAccessControlListSid", *params.IpAccessControlListSid) -} + data := url.Values{} + headers := 0 + if params != nil && params.IpAccessControlListSid != nil { + data.Set("IpAccessControlListSid", *params.IpAccessControlListSid) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsIpAccessControlListMapping{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsIpAccessControlListMapping{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateSipAuthRegistrationsCredentialListMappingParams Optional parameters for the method 'CreateSipAuthRegistrationsCredentialListMapping' type CreateSipAuthRegistrationsCredentialListMappingParams struct { CredentialListSid *string `json:"CredentialListSid,omitempty"` @@ -1936,34 +1937,34 @@ type CreateSipAuthRegistrationsCredentialListMappingParams struct { * @param optional nil or *CreateSipAuthRegistrationsCredentialListMappingParams - Optional Parameters: * @param "CredentialListSid" (string) - The SID of the CredentialList resource to map to the SIP domain. * @return ApiV2010AccountSipSipDomainSipAuthSipAuthRegistrationsSipAuthRegistrationsCredentialListMapping -*/ + */ func (c *DefaultApiService) CreateSipAuthRegistrationsCredentialListMapping(AccountSid string, DomainSid string, params *CreateSipAuthRegistrationsCredentialListMappingParams) (*ApiV2010AccountSipSipDomainSipAuthSipAuthRegistrationsSipAuthRegistrationsCredentialListMapping, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Registrations/CredentialListMappings.json" + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Registrations/CredentialListMappings.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.CredentialListSid != nil { - data.Set("CredentialListSid", *params.CredentialListSid) -} + data := url.Values{} + headers := 0 + if params != nil && params.CredentialListSid != nil { + data.Set("CredentialListSid", *params.CredentialListSid) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountSipSipDomainSipAuthSipAuthRegistrationsSipAuthRegistrationsCredentialListMapping{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountSipSipDomainSipAuthSipAuthRegistrationsSipAuthRegistrationsCredentialListMapping{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateSipCredentialParams Optional parameters for the method 'CreateSipCredential' type CreateSipCredentialParams struct { Password *string `json:"Password,omitempty"` @@ -1979,37 +1980,37 @@ type CreateSipCredentialParams struct { * @param "Password" (string) - The password that the username will use when authenticating SIP requests. The password must be a minimum of 12 characters, contain at least 1 digit, and have mixed case. (eg `IWasAtSignal2018`) * @param "Username" (string) - The username that will be passed when authenticating SIP requests. The username should be sent in response to Twilio's challenge of the initial INVITE. It can be up to 32 characters long. * @return ApiV2010AccountSipSipCredentialListSipCredential -*/ + */ func (c *DefaultApiService) CreateSipCredential(AccountSid string, CredentialListSid string, params *CreateSipCredentialParams) (*ApiV2010AccountSipSipCredentialListSipCredential, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{CredentialListSid}/Credentials.json" + path := "/2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{CredentialListSid}/Credentials.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"CredentialListSid"+"}", CredentialListSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Password != nil { - data.Set("Password", *params.Password) -} - if params != nil && params.Username != nil { - data.Set("Username", *params.Username) -} + data := url.Values{} + headers := 0 + if params != nil && params.Password != nil { + data.Set("Password", *params.Password) + } + if params != nil && params.Username != nil { + data.Set("Username", *params.Username) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountSipSipCredentialListSipCredential{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountSipSipCredentialListSipCredential{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateSipCredentialListParams Optional parameters for the method 'CreateSipCredentialList' type CreateSipCredentialListParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` @@ -2022,33 +2023,33 @@ type CreateSipCredentialListParams struct { * @param optional nil or *CreateSipCredentialListParams - Optional Parameters: * @param "FriendlyName" (string) - A human readable descriptive text that describes the CredentialList, up to 64 characters long. * @return ApiV2010AccountSipSipCredentialList -*/ + */ func (c *DefaultApiService) CreateSipCredentialList(AccountSid string, params *CreateSipCredentialListParams) (*ApiV2010AccountSipSipCredentialList, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists.json" + path := "/2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} + data := url.Values{} + headers := 0 + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountSipSipCredentialList{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountSipSipCredentialList{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateSipCredentialListMappingParams Optional parameters for the method 'CreateSipCredentialListMapping' type CreateSipCredentialListMappingParams struct { CredentialListSid *string `json:"CredentialListSid,omitempty"` @@ -2062,49 +2063,49 @@ type CreateSipCredentialListMappingParams struct { * @param optional nil or *CreateSipCredentialListMappingParams - Optional Parameters: * @param "CredentialListSid" (string) - A 34 character string that uniquely identifies the CredentialList resource to map to the SIP domain. * @return ApiV2010AccountSipSipDomainSipCredentialListMapping -*/ + */ func (c *DefaultApiService) CreateSipCredentialListMapping(AccountSid string, DomainSid string, params *CreateSipCredentialListMappingParams) (*ApiV2010AccountSipSipDomainSipCredentialListMapping, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/CredentialListMappings.json" + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/CredentialListMappings.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.CredentialListSid != nil { - data.Set("CredentialListSid", *params.CredentialListSid) -} + data := url.Values{} + headers := 0 + if params != nil && params.CredentialListSid != nil { + data.Set("CredentialListSid", *params.CredentialListSid) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountSipSipDomainSipCredentialListMapping{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountSipSipDomainSipCredentialListMapping{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateSipDomainParams Optional parameters for the method 'CreateSipDomain' type CreateSipDomainParams struct { - ByocTrunkSid *string `json:"ByocTrunkSid,omitempty"` - DomainName *string `json:"DomainName,omitempty"` - EmergencyCallerSid *string `json:"EmergencyCallerSid,omitempty"` - EmergencyCallingEnabled *bool `json:"EmergencyCallingEnabled,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Secure *bool `json:"Secure,omitempty"` - SipRegistration *bool `json:"SipRegistration,omitempty"` - VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"` - VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` - VoiceMethod *string `json:"VoiceMethod,omitempty"` + ByocTrunkSid *string `json:"ByocTrunkSid,omitempty"` + DomainName *string `json:"DomainName,omitempty"` + EmergencyCallerSid *string `json:"EmergencyCallerSid,omitempty"` + EmergencyCallingEnabled *bool `json:"EmergencyCallingEnabled,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Secure *bool `json:"Secure,omitempty"` + SipRegistration *bool `json:"SipRegistration,omitempty"` + VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"` + VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` + VoiceMethod *string `json:"VoiceMethod,omitempty"` VoiceStatusCallbackMethod *string `json:"VoiceStatusCallbackMethod,omitempty"` - VoiceStatusCallbackUrl *string `json:"VoiceStatusCallbackUrl,omitempty"` - VoiceUrl *string `json:"VoiceUrl,omitempty"` + VoiceStatusCallbackUrl *string `json:"VoiceStatusCallbackUrl,omitempty"` + VoiceUrl *string `json:"VoiceUrl,omitempty"` } /* @@ -2126,69 +2127,69 @@ type CreateSipDomainParams struct { * @param "VoiceStatusCallbackUrl" (string) - The URL that we should call to pass status parameters (such as call ended) to your application. * @param "VoiceUrl" (string) - The URL we should when the domain receives a call. * @return ApiV2010AccountSipSipDomain -*/ + */ func (c *DefaultApiService) CreateSipDomain(AccountSid string, params *CreateSipDomainParams) (*ApiV2010AccountSipSipDomain, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains.json" + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.ByocTrunkSid != nil { - data.Set("ByocTrunkSid", *params.ByocTrunkSid) -} - if params != nil && params.DomainName != nil { - data.Set("DomainName", *params.DomainName) -} - if params != nil && params.EmergencyCallerSid != nil { - data.Set("EmergencyCallerSid", *params.EmergencyCallerSid) -} - if params != nil && params.EmergencyCallingEnabled != nil { - data.Set("EmergencyCallingEnabled", fmt.Sprint(*params.EmergencyCallingEnabled)) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.Secure != nil { - data.Set("Secure", fmt.Sprint(*params.Secure)) -} - if params != nil && params.SipRegistration != nil { - data.Set("SipRegistration", fmt.Sprint(*params.SipRegistration)) -} - if params != nil && params.VoiceFallbackMethod != nil { - data.Set("VoiceFallbackMethod", *params.VoiceFallbackMethod) -} - if params != nil && params.VoiceFallbackUrl != nil { - data.Set("VoiceFallbackUrl", *params.VoiceFallbackUrl) -} - if params != nil && params.VoiceMethod != nil { - data.Set("VoiceMethod", *params.VoiceMethod) -} - if params != nil && params.VoiceStatusCallbackMethod != nil { - data.Set("VoiceStatusCallbackMethod", *params.VoiceStatusCallbackMethod) -} - if params != nil && params.VoiceStatusCallbackUrl != nil { - data.Set("VoiceStatusCallbackUrl", *params.VoiceStatusCallbackUrl) -} - if params != nil && params.VoiceUrl != nil { - data.Set("VoiceUrl", *params.VoiceUrl) -} + data := url.Values{} + headers := 0 + if params != nil && params.ByocTrunkSid != nil { + data.Set("ByocTrunkSid", *params.ByocTrunkSid) + } + if params != nil && params.DomainName != nil { + data.Set("DomainName", *params.DomainName) + } + if params != nil && params.EmergencyCallerSid != nil { + data.Set("EmergencyCallerSid", *params.EmergencyCallerSid) + } + if params != nil && params.EmergencyCallingEnabled != nil { + data.Set("EmergencyCallingEnabled", fmt.Sprint(*params.EmergencyCallingEnabled)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Secure != nil { + data.Set("Secure", fmt.Sprint(*params.Secure)) + } + if params != nil && params.SipRegistration != nil { + data.Set("SipRegistration", fmt.Sprint(*params.SipRegistration)) + } + if params != nil && params.VoiceFallbackMethod != nil { + data.Set("VoiceFallbackMethod", *params.VoiceFallbackMethod) + } + if params != nil && params.VoiceFallbackUrl != nil { + data.Set("VoiceFallbackUrl", *params.VoiceFallbackUrl) + } + if params != nil && params.VoiceMethod != nil { + data.Set("VoiceMethod", *params.VoiceMethod) + } + if params != nil && params.VoiceStatusCallbackMethod != nil { + data.Set("VoiceStatusCallbackMethod", *params.VoiceStatusCallbackMethod) + } + if params != nil && params.VoiceStatusCallbackUrl != nil { + data.Set("VoiceStatusCallbackUrl", *params.VoiceStatusCallbackUrl) + } + if params != nil && params.VoiceUrl != nil { + data.Set("VoiceUrl", *params.VoiceUrl) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountSipSipDomain{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountSipSipDomain{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateSipIpAccessControlListParams Optional parameters for the method 'CreateSipIpAccessControlList' type CreateSipIpAccessControlListParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` @@ -2201,33 +2202,33 @@ type CreateSipIpAccessControlListParams struct { * @param optional nil or *CreateSipIpAccessControlListParams - Optional Parameters: * @param "FriendlyName" (string) - A human readable descriptive text that describes the IpAccessControlList, up to 64 characters long. * @return ApiV2010AccountSipSipIpAccessControlList -*/ + */ func (c *DefaultApiService) CreateSipIpAccessControlList(AccountSid string, params *CreateSipIpAccessControlListParams) (*ApiV2010AccountSipSipIpAccessControlList, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists.json" + path := "/2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} + data := url.Values{} + headers := 0 + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountSipSipIpAccessControlList{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountSipSipIpAccessControlList{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateSipIpAccessControlListMappingParams Optional parameters for the method 'CreateSipIpAccessControlListMapping' type CreateSipIpAccessControlListMappingParams struct { IpAccessControlListSid *string `json:"IpAccessControlListSid,omitempty"` @@ -2241,39 +2242,39 @@ type CreateSipIpAccessControlListMappingParams struct { * @param optional nil or *CreateSipIpAccessControlListMappingParams - Optional Parameters: * @param "IpAccessControlListSid" (string) - The unique id of the IP access control list to map to the SIP domain. * @return ApiV2010AccountSipSipDomainSipIpAccessControlListMapping -*/ + */ func (c *DefaultApiService) CreateSipIpAccessControlListMapping(AccountSid string, DomainSid string, params *CreateSipIpAccessControlListMappingParams) (*ApiV2010AccountSipSipDomainSipIpAccessControlListMapping, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/IpAccessControlListMappings.json" + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/IpAccessControlListMappings.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.IpAccessControlListSid != nil { - data.Set("IpAccessControlListSid", *params.IpAccessControlListSid) -} + data := url.Values{} + headers := 0 + if params != nil && params.IpAccessControlListSid != nil { + data.Set("IpAccessControlListSid", *params.IpAccessControlListSid) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountSipSipDomainSipIpAccessControlListMapping{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountSipSipDomainSipIpAccessControlListMapping{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateSipIpAddressParams Optional parameters for the method 'CreateSipIpAddress' type CreateSipIpAddressParams struct { - CidrPrefixLength *int32 `json:"CidrPrefixLength,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - IpAddress *string `json:"IpAddress,omitempty"` + CidrPrefixLength *int32 `json:"CidrPrefixLength,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + IpAddress *string `json:"IpAddress,omitempty"` } /* @@ -2286,40 +2287,40 @@ type CreateSipIpAddressParams struct { * @param "FriendlyName" (string) - A human readable descriptive text for this resource, up to 64 characters long. * @param "IpAddress" (string) - An IP address in dotted decimal notation from which you want to accept traffic. Any SIP requests from this IP address will be allowed by Twilio. IPv4 only supported today. * @return ApiV2010AccountSipSipIpAccessControlListSipIpAddress -*/ + */ func (c *DefaultApiService) CreateSipIpAddress(AccountSid string, IpAccessControlListSid string, params *CreateSipIpAddressParams) (*ApiV2010AccountSipSipIpAccessControlListSipIpAddress, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists/{IpAccessControlListSid}/IpAddresses.json" + path := "/2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists/{IpAccessControlListSid}/IpAddresses.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"IpAccessControlListSid"+"}", IpAccessControlListSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.CidrPrefixLength != nil { - data.Set("CidrPrefixLength", fmt.Sprint(*params.CidrPrefixLength)) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.IpAddress != nil { - data.Set("IpAddress", *params.IpAddress) -} + data := url.Values{} + headers := 0 + if params != nil && params.CidrPrefixLength != nil { + data.Set("CidrPrefixLength", fmt.Sprint(*params.CidrPrefixLength)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.IpAddress != nil { + data.Set("IpAddress", *params.IpAddress) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountSipSipIpAccessControlListSipIpAddress{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountSipSipIpAccessControlListSipIpAddress{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateTokenParams Optional parameters for the method 'CreateToken' type CreateTokenParams struct { Ttl *int32 `json:"Ttl,omitempty"` @@ -2332,42 +2333,42 @@ type CreateTokenParams struct { * @param optional nil or *CreateTokenParams - Optional Parameters: * @param "Ttl" (int32) - The duration in seconds for which the generated credentials are valid. The default value is 86400 (24 hours). * @return ApiV2010AccountToken -*/ + */ func (c *DefaultApiService) CreateToken(AccountSid string, params *CreateTokenParams) (*ApiV2010AccountToken, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Tokens.json" + path := "/2010-04-01/Accounts/{AccountSid}/Tokens.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Ttl != nil { - data.Set("Ttl", fmt.Sprint(*params.Ttl)) -} + data := url.Values{} + headers := 0 + if params != nil && params.Ttl != nil { + data.Set("Ttl", fmt.Sprint(*params.Ttl)) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountToken{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountToken{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateUsageTriggerParams Optional parameters for the method 'CreateUsageTrigger' type CreateUsageTriggerParams struct { CallbackMethod *string `json:"CallbackMethod,omitempty"` - CallbackUrl *string `json:"CallbackUrl,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Recurring *string `json:"Recurring,omitempty"` - TriggerBy *string `json:"TriggerBy,omitempty"` - TriggerValue *string `json:"TriggerValue,omitempty"` - UsageCategory *string `json:"UsageCategory,omitempty"` + CallbackUrl *string `json:"CallbackUrl,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Recurring *string `json:"Recurring,omitempty"` + TriggerBy *string `json:"TriggerBy,omitempty"` + TriggerValue *string `json:"TriggerValue,omitempty"` + UsageCategory *string `json:"UsageCategory,omitempty"` } /* @@ -2383,58 +2384,58 @@ type CreateUsageTriggerParams struct { * @param "TriggerValue" (string) - The usage value at which the trigger should fire. For convenience, you can use an offset value such as `+30` to specify a trigger_value that is 30 units more than the current usage value. Be sure to urlencode a `+` as `%2B`. * @param "UsageCategory" (string) - The usage category that the trigger should watch. Use one of the supported [usage categories](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) for this value. * @return ApiV2010AccountUsageUsageTrigger -*/ + */ func (c *DefaultApiService) CreateUsageTrigger(AccountSid string, params *CreateUsageTriggerParams) (*ApiV2010AccountUsageUsageTrigger, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Usage/Triggers.json" + path := "/2010-04-01/Accounts/{AccountSid}/Usage/Triggers.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.CallbackMethod != nil { - data.Set("CallbackMethod", *params.CallbackMethod) -} - if params != nil && params.CallbackUrl != nil { - data.Set("CallbackUrl", *params.CallbackUrl) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.Recurring != nil { - data.Set("Recurring", *params.Recurring) -} - if params != nil && params.TriggerBy != nil { - data.Set("TriggerBy", *params.TriggerBy) -} - if params != nil && params.TriggerValue != nil { - data.Set("TriggerValue", *params.TriggerValue) -} - if params != nil && params.UsageCategory != nil { - data.Set("UsageCategory", *params.UsageCategory) -} + data := url.Values{} + headers := 0 + if params != nil && params.CallbackMethod != nil { + data.Set("CallbackMethod", *params.CallbackMethod) + } + if params != nil && params.CallbackUrl != nil { + data.Set("CallbackUrl", *params.CallbackUrl) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Recurring != nil { + data.Set("Recurring", *params.Recurring) + } + if params != nil && params.TriggerBy != nil { + data.Set("TriggerBy", *params.TriggerBy) + } + if params != nil && params.TriggerValue != nil { + data.Set("TriggerValue", *params.TriggerValue) + } + if params != nil && params.UsageCategory != nil { + data.Set("UsageCategory", *params.UsageCategory) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountUsageUsageTrigger{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountUsageUsageTrigger{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateValidationRequestParams Optional parameters for the method 'CreateValidationRequest' type CreateValidationRequestParams struct { - CallDelay *int32 `json:"CallDelay,omitempty"` - Extension *string `json:"Extension,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - PhoneNumber *string `json:"PhoneNumber,omitempty"` - StatusCallback *string `json:"StatusCallback,omitempty"` + CallDelay *int32 `json:"CallDelay,omitempty"` + Extension *string `json:"Extension,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + PhoneNumber *string `json:"PhoneNumber,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` } @@ -2449,72 +2450,69 @@ type CreateValidationRequestParams struct { * @param "StatusCallback" (string) - The URL we should call using the `status_callback_method` to send status information about the verification process to your application. * @param "StatusCallbackMethod" (string) - The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST`, and the default is `POST`. * @return ApiV2010AccountValidationRequest -*/ + */ func (c *DefaultApiService) CreateValidationRequest(AccountSid string, params *CreateValidationRequestParams) (*ApiV2010AccountValidationRequest, error) { - path := "/2010-04-01/Accounts/{AccountSid}/OutgoingCallerIds.json" + path := "/2010-04-01/Accounts/{AccountSid}/OutgoingCallerIds.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.CallDelay != nil { - data.Set("CallDelay", fmt.Sprint(*params.CallDelay)) -} - if params != nil && params.Extension != nil { - data.Set("Extension", *params.Extension) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.PhoneNumber != nil { - data.Set("PhoneNumber", *params.PhoneNumber) -} - if params != nil && params.StatusCallback != nil { - data.Set("StatusCallback", *params.StatusCallback) -} - if params != nil && params.StatusCallbackMethod != nil { - data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) -} + data := url.Values{} + headers := 0 + if params != nil && params.CallDelay != nil { + data.Set("CallDelay", fmt.Sprint(*params.CallDelay)) + } + if params != nil && params.Extension != nil { + data.Set("Extension", *params.Extension) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.PhoneNumber != nil { + data.Set("PhoneNumber", *params.PhoneNumber) + } + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) + } + if params != nil && params.StatusCallbackMethod != nil { + data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountValidationRequest{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountValidationRequest{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * DeleteAddress Method for DeleteAddress * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that is responsible for the Address resource to delete. * @param Sid The Twilio-provided string that uniquely identifies the Address resource to delete. -*/ -func (c *DefaultApiService) DeleteAddress(AccountSid string, Sid string, ) (error) { - path := "/2010-04-01/Accounts/{AccountSid}/Addresses/{Sid}.json" + */ +func (c *DefaultApiService) DeleteAddress(AccountSid string, Sid string) error { + path := "/2010-04-01/Accounts/{AccountSid}/Addresses/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -2522,25 +2520,23 @@ func (c *DefaultApiService) DeleteAddress(AccountSid string, Sid string, ) (erro * Delete the application by the specified application sid * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Application resources to delete. * @param Sid The Twilio-provided string that uniquely identifies the Application resource to delete. -*/ -func (c *DefaultApiService) DeleteApplication(AccountSid string, Sid string, ) (error) { - path := "/2010-04-01/Accounts/{AccountSid}/Applications/{Sid}.json" + */ +func (c *DefaultApiService) DeleteApplication(AccountSid string, Sid string) error { + path := "/2010-04-01/Accounts/{AccountSid}/Applications/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -2548,25 +2544,23 @@ func (c *DefaultApiService) DeleteApplication(AccountSid string, Sid string, ) ( * Delete a Call record from your account. Once the record is deleted, it will no longer appear in the API and Account Portal logs. * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Call resource(s) to delete. * @param Sid The Twilio-provided Call SID that uniquely identifies the Call resource to delete -*/ -func (c *DefaultApiService) DeleteCall(AccountSid string, Sid string, ) (error) { - path := "/2010-04-01/Accounts/{AccountSid}/Calls/{Sid}.json" + */ +func (c *DefaultApiService) DeleteCall(AccountSid string, Sid string) error { + path := "/2010-04-01/Accounts/{AccountSid}/Calls/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -2574,25 +2568,23 @@ func (c *DefaultApiService) DeleteCall(AccountSid string, Sid string, ) (error) * Delete a FeedbackSummary resource from a call * @param AccountSid The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. * @param Sid A 34 character string that uniquely identifies this resource. -*/ -func (c *DefaultApiService) DeleteCallFeedbackSummary(AccountSid string, Sid string, ) (error) { - path := "/2010-04-01/Accounts/{AccountSid}/Calls/FeedbackSummary/{Sid}.json" + */ +func (c *DefaultApiService) DeleteCallFeedbackSummary(AccountSid string, Sid string) error { + path := "/2010-04-01/Accounts/{AccountSid}/Calls/FeedbackSummary/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + defer resp.Body.Close() - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() - - return nil + return nil } /* @@ -2601,26 +2593,24 @@ func (c *DefaultApiService) DeleteCallFeedbackSummary(AccountSid string, Sid str * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording resources to delete. * @param CallSid The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID of the resources to delete. * @param Sid The Twilio-provided string that uniquely identifies the Recording resource to delete. -*/ -func (c *DefaultApiService) DeleteCallRecording(AccountSid string, CallSid string, Sid string, ) (error) { - path := "/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Recordings/{Sid}.json" + */ +func (c *DefaultApiService) DeleteCallRecording(AccountSid string, CallSid string, Sid string) error { + path := "/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Recordings/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -2629,26 +2619,24 @@ func (c *DefaultApiService) DeleteCallRecording(AccountSid string, CallSid strin * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Conference Recording resources to delete. * @param ConferenceSid The Conference SID that identifies the conference associated with the recording to delete. * @param Sid The Twilio-provided string that uniquely identifies the Conference Recording resource to delete. -*/ -func (c *DefaultApiService) DeleteConferenceRecording(AccountSid string, ConferenceSid string, Sid string, ) (error) { - path := "/2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Recordings/{Sid}.json" + */ +func (c *DefaultApiService) DeleteConferenceRecording(AccountSid string, ConferenceSid string, Sid string) error { + path := "/2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Recordings/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"ConferenceSid"+"}", ConferenceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -2656,25 +2644,23 @@ func (c *DefaultApiService) DeleteConferenceRecording(AccountSid string, Confere * Delete an instance of a connect-app * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the ConnectApp resource to fetch. * @param Sid The Twilio-provided string that uniquely identifies the ConnectApp resource to fetch. -*/ -func (c *DefaultApiService) DeleteConnectApp(AccountSid string, Sid string, ) (error) { - path := "/2010-04-01/Accounts/{AccountSid}/ConnectApps/{Sid}.json" + */ +func (c *DefaultApiService) DeleteConnectApp(AccountSid string, Sid string) error { + path := "/2010-04-01/Accounts/{AccountSid}/ConnectApps/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -2682,25 +2668,23 @@ func (c *DefaultApiService) DeleteConnectApp(AccountSid string, Sid string, ) (e * Delete a phone-numbers belonging to the account used to make the request. * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the IncomingPhoneNumber resources to delete. * @param Sid The Twilio-provided string that uniquely identifies the IncomingPhoneNumber resource to delete. -*/ -func (c *DefaultApiService) DeleteIncomingPhoneNumber(AccountSid string, Sid string, ) (error) { - path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{Sid}.json" + */ +func (c *DefaultApiService) DeleteIncomingPhoneNumber(AccountSid string, Sid string) error { + path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -2709,51 +2693,47 @@ func (c *DefaultApiService) DeleteIncomingPhoneNumber(AccountSid string, Sid str * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the resources to delete. * @param ResourceSid The SID of the Phone Number to which the Add-on is assigned. * @param Sid The Twilio-provided string that uniquely identifies the resource to delete. -*/ -func (c *DefaultApiService) DeleteIncomingPhoneNumberAssignedAddOn(AccountSid string, ResourceSid string, Sid string, ) (error) { - path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{ResourceSid}/AssignedAddOns/{Sid}.json" + */ +func (c *DefaultApiService) DeleteIncomingPhoneNumberAssignedAddOn(AccountSid string, ResourceSid string, Sid string) error { + path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{ResourceSid}/AssignedAddOns/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"ResourceSid"+"}", ResourceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* * DeleteKey Method for DeleteKey * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Key resources to delete. * @param Sid The Twilio-provided string that uniquely identifies the Key resource to delete. -*/ -func (c *DefaultApiService) DeleteKey(AccountSid string, Sid string, ) (error) { - path := "/2010-04-01/Accounts/{AccountSid}/Keys/{Sid}.json" + */ +func (c *DefaultApiService) DeleteKey(AccountSid string, Sid string) error { + path := "/2010-04-01/Accounts/{AccountSid}/Keys/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -2762,26 +2742,24 @@ func (c *DefaultApiService) DeleteKey(AccountSid string, Sid string, ) (error) { * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Media resource(s) to delete. * @param MessageSid The SID of the Message resource that this Media resource belongs to. * @param Sid The Twilio-provided string that uniquely identifies the Media resource to delete -*/ -func (c *DefaultApiService) DeleteMedia(AccountSid string, MessageSid string, Sid string, ) (error) { - path := "/2010-04-01/Accounts/{AccountSid}/Messages/{MessageSid}/Media/{Sid}.json" + */ +func (c *DefaultApiService) DeleteMedia(AccountSid string, MessageSid string, Sid string) error { + path := "/2010-04-01/Accounts/{AccountSid}/Messages/{MessageSid}/Media/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"MessageSid"+"}", MessageSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -2789,25 +2767,23 @@ func (c *DefaultApiService) DeleteMedia(AccountSid string, MessageSid string, Si * Deletes a message record from your account * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Message resources to delete. * @param Sid The Twilio-provided string that uniquely identifies the Message resource to delete. -*/ -func (c *DefaultApiService) DeleteMessage(AccountSid string, Sid string, ) (error) { - path := "/2010-04-01/Accounts/{AccountSid}/Messages/{Sid}.json" + */ +func (c *DefaultApiService) DeleteMessage(AccountSid string, Sid string) error { + path := "/2010-04-01/Accounts/{AccountSid}/Messages/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -2815,25 +2791,23 @@ func (c *DefaultApiService) DeleteMessage(AccountSid string, Sid string, ) (erro * Delete the caller-id specified from the account * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the OutgoingCallerId resources to delete. * @param Sid The Twilio-provided string that uniquely identifies the OutgoingCallerId resource to delete. -*/ -func (c *DefaultApiService) DeleteOutgoingCallerId(AccountSid string, Sid string, ) (error) { - path := "/2010-04-01/Accounts/{AccountSid}/OutgoingCallerIds/{Sid}.json" + */ +func (c *DefaultApiService) DeleteOutgoingCallerId(AccountSid string, Sid string) error { + path := "/2010-04-01/Accounts/{AccountSid}/OutgoingCallerIds/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -2842,26 +2816,24 @@ func (c *DefaultApiService) DeleteOutgoingCallerId(AccountSid string, Sid string * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Participant resources to delete. * @param ConferenceSid The SID of the conference with the participants to delete. * @param CallSid The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID or label of the participant to delete. Non URL safe characters in a label must be percent encoded, for example, a space character is represented as %20. -*/ -func (c *DefaultApiService) DeleteParticipant(AccountSid string, ConferenceSid string, CallSid string, ) (error) { - path := "/2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Participants/{CallSid}.json" + */ +func (c *DefaultApiService) DeleteParticipant(AccountSid string, ConferenceSid string, CallSid string) error { + path := "/2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Participants/{CallSid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"ConferenceSid"+"}", ConferenceSid, -1) path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -2869,25 +2841,23 @@ func (c *DefaultApiService) DeleteParticipant(AccountSid string, ConferenceSid s * Remove an empty queue * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Queue resource to delete. * @param Sid The Twilio-provided string that uniquely identifies the Queue resource to delete -*/ -func (c *DefaultApiService) DeleteQueue(AccountSid string, Sid string, ) (error) { - path := "/2010-04-01/Accounts/{AccountSid}/Queues/{Sid}.json" + */ +func (c *DefaultApiService) DeleteQueue(AccountSid string, Sid string) error { + path := "/2010-04-01/Accounts/{AccountSid}/Queues/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -2895,25 +2865,23 @@ func (c *DefaultApiService) DeleteQueue(AccountSid string, Sid string, ) (error) * Delete a recording from your account * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording resources to delete. * @param Sid The Twilio-provided string that uniquely identifies the Recording resource to delete. -*/ -func (c *DefaultApiService) DeleteRecording(AccountSid string, Sid string, ) (error) { - path := "/2010-04-01/Accounts/{AccountSid}/Recordings/{Sid}.json" + */ +func (c *DefaultApiService) DeleteRecording(AccountSid string, Sid string) error { + path := "/2010-04-01/Accounts/{AccountSid}/Recordings/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -2922,26 +2890,24 @@ func (c *DefaultApiService) DeleteRecording(AccountSid string, Sid string, ) (er * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording AddOnResult resources to delete. * @param ReferenceSid The SID of the recording to which the result to delete belongs. * @param Sid The Twilio-provided string that uniquely identifies the Recording AddOnResult resource to delete. -*/ -func (c *DefaultApiService) DeleteRecordingAddOnResult(AccountSid string, ReferenceSid string, Sid string, ) (error) { - path := "/2010-04-01/Accounts/{AccountSid}/Recordings/{ReferenceSid}/AddOnResults/{Sid}.json" + */ +func (c *DefaultApiService) DeleteRecordingAddOnResult(AccountSid string, ReferenceSid string, Sid string) error { + path := "/2010-04-01/Accounts/{AccountSid}/Recordings/{ReferenceSid}/AddOnResults/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"ReferenceSid"+"}", ReferenceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -2951,27 +2917,25 @@ func (c *DefaultApiService) DeleteRecordingAddOnResult(AccountSid string, Refere * @param ReferenceSid The SID of the recording to which the AddOnResult resource that contains the payloads to delete belongs. * @param AddOnResultSid The SID of the AddOnResult to which the payloads to delete belongs. * @param Sid The Twilio-provided string that uniquely identifies the Recording AddOnResult Payload resource to delete. -*/ -func (c *DefaultApiService) DeleteRecordingAddOnResultPayload(AccountSid string, ReferenceSid string, AddOnResultSid string, Sid string, ) (error) { - path := "/2010-04-01/Accounts/{AccountSid}/Recordings/{ReferenceSid}/AddOnResults/{AddOnResultSid}/Payloads/{Sid}.json" + */ +func (c *DefaultApiService) DeleteRecordingAddOnResultPayload(AccountSid string, ReferenceSid string, AddOnResultSid string, Sid string) error { + path := "/2010-04-01/Accounts/{AccountSid}/Recordings/{ReferenceSid}/AddOnResults/{AddOnResultSid}/Payloads/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"ReferenceSid"+"}", ReferenceSid, -1) path = strings.Replace(path, "{"+"AddOnResultSid"+"}", AddOnResultSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -2979,51 +2943,47 @@ func (c *DefaultApiService) DeleteRecordingAddOnResultPayload(AccountSid string, * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Transcription resources to delete. * @param RecordingSid The SID of the [Recording](https://www.twilio.com/docs/voice/api/recording) that created the transcription to delete. * @param Sid The Twilio-provided string that uniquely identifies the Transcription resource to delete. -*/ -func (c *DefaultApiService) DeleteRecordingTranscription(AccountSid string, RecordingSid string, Sid string, ) (error) { - path := "/2010-04-01/Accounts/{AccountSid}/Recordings/{RecordingSid}/Transcriptions/{Sid}.json" + */ +func (c *DefaultApiService) DeleteRecordingTranscription(AccountSid string, RecordingSid string, Sid string) error { + path := "/2010-04-01/Accounts/{AccountSid}/Recordings/{RecordingSid}/Transcriptions/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"RecordingSid"+"}", RecordingSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* * DeleteSigningKey Method for DeleteSigningKey * @param AccountSid * @param Sid -*/ -func (c *DefaultApiService) DeleteSigningKey(AccountSid string, Sid string, ) (error) { - path := "/2010-04-01/Accounts/{AccountSid}/SigningKeys/{Sid}.json" + */ +func (c *DefaultApiService) DeleteSigningKey(AccountSid string, Sid string) error { + path := "/2010-04-01/Accounts/{AccountSid}/SigningKeys/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -3032,26 +2992,24 @@ func (c *DefaultApiService) DeleteSigningKey(AccountSid string, Sid string, ) (e * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the CredentialListMapping resources to delete. * @param DomainSid The SID of the SIP domain that contains the resource to delete. * @param Sid The Twilio-provided string that uniquely identifies the CredentialListMapping resource to delete. -*/ -func (c *DefaultApiService) DeleteSipAuthCallsCredentialListMapping(AccountSid string, DomainSid string, Sid string, ) (error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls/CredentialListMappings/{Sid}.json" + */ +func (c *DefaultApiService) DeleteSipAuthCallsCredentialListMapping(AccountSid string, DomainSid string, Sid string) error { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls/CredentialListMappings/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -3060,26 +3018,24 @@ func (c *DefaultApiService) DeleteSipAuthCallsCredentialListMapping(AccountSid s * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the IpAccessControlListMapping resources to delete. * @param DomainSid The SID of the SIP domain that contains the resources to delete. * @param Sid The Twilio-provided string that uniquely identifies the IpAccessControlListMapping resource to delete. -*/ -func (c *DefaultApiService) DeleteSipAuthCallsIpAccessControlListMapping(AccountSid string, DomainSid string, Sid string, ) (error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls/IpAccessControlListMappings/{Sid}.json" + */ +func (c *DefaultApiService) DeleteSipAuthCallsIpAccessControlListMapping(AccountSid string, DomainSid string, Sid string) error { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls/IpAccessControlListMappings/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -3088,26 +3044,24 @@ func (c *DefaultApiService) DeleteSipAuthCallsIpAccessControlListMapping(Account * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the CredentialListMapping resources to delete. * @param DomainSid The SID of the SIP domain that contains the resources to delete. * @param Sid The Twilio-provided string that uniquely identifies the CredentialListMapping resource to delete. -*/ -func (c *DefaultApiService) DeleteSipAuthRegistrationsCredentialListMapping(AccountSid string, DomainSid string, Sid string, ) (error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Registrations/CredentialListMappings/{Sid}.json" + */ +func (c *DefaultApiService) DeleteSipAuthRegistrationsCredentialListMapping(AccountSid string, DomainSid string, Sid string) error { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Registrations/CredentialListMappings/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -3116,26 +3070,24 @@ func (c *DefaultApiService) DeleteSipAuthRegistrationsCredentialListMapping(Acco * @param AccountSid The unique id of the Account that is responsible for this resource. * @param CredentialListSid The unique id that identifies the credential list that contains the desired credentials. * @param Sid The unique id that identifies the resource to delete. -*/ -func (c *DefaultApiService) DeleteSipCredential(AccountSid string, CredentialListSid string, Sid string, ) (error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{CredentialListSid}/Credentials/{Sid}.json" + */ +func (c *DefaultApiService) DeleteSipCredential(AccountSid string, CredentialListSid string, Sid string) error { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{CredentialListSid}/Credentials/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"CredentialListSid"+"}", CredentialListSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -3143,25 +3095,23 @@ func (c *DefaultApiService) DeleteSipCredential(AccountSid string, CredentialLis * Delete a Credential List * @param AccountSid The unique id of the Account that is responsible for this resource. * @param Sid The credential list Sid that uniquely identifies this resource -*/ -func (c *DefaultApiService) DeleteSipCredentialList(AccountSid string, Sid string, ) (error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{Sid}.json" + */ +func (c *DefaultApiService) DeleteSipCredentialList(AccountSid string, Sid string) error { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -3170,26 +3120,24 @@ func (c *DefaultApiService) DeleteSipCredentialList(AccountSid string, Sid strin * @param AccountSid The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. * @param DomainSid A 34 character string that uniquely identifies the SIP Domain that includes the resource to delete. * @param Sid A 34 character string that uniquely identifies the resource to delete. -*/ -func (c *DefaultApiService) DeleteSipCredentialListMapping(AccountSid string, DomainSid string, Sid string, ) (error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/CredentialListMappings/{Sid}.json" + */ +func (c *DefaultApiService) DeleteSipCredentialListMapping(AccountSid string, DomainSid string, Sid string) error { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/CredentialListMappings/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -3197,25 +3145,23 @@ func (c *DefaultApiService) DeleteSipCredentialListMapping(AccountSid string, Do * Delete an instance of a Domain * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the SipDomain resources to delete. * @param Sid The Twilio-provided string that uniquely identifies the SipDomain resource to delete. -*/ -func (c *DefaultApiService) DeleteSipDomain(AccountSid string, Sid string, ) (error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{Sid}.json" + */ +func (c *DefaultApiService) DeleteSipDomain(AccountSid string, Sid string) error { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -3223,25 +3169,23 @@ func (c *DefaultApiService) DeleteSipDomain(AccountSid string, Sid string, ) (er * Delete an IpAccessControlList from the requested account * @param AccountSid The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. * @param Sid A 34 character string that uniquely identifies the resource to delete. -*/ -func (c *DefaultApiService) DeleteSipIpAccessControlList(AccountSid string, Sid string, ) (error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists/{Sid}.json" + */ +func (c *DefaultApiService) DeleteSipIpAccessControlList(AccountSid string, Sid string) error { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -3250,26 +3194,24 @@ func (c *DefaultApiService) DeleteSipIpAccessControlList(AccountSid string, Sid * @param AccountSid The unique id of the Account that is responsible for this resource. * @param DomainSid A 34 character string that uniquely identifies the SIP domain. * @param Sid A 34 character string that uniquely identifies the resource to delete. -*/ -func (c *DefaultApiService) DeleteSipIpAccessControlListMapping(AccountSid string, DomainSid string, Sid string, ) (error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/IpAccessControlListMappings/{Sid}.json" + */ +func (c *DefaultApiService) DeleteSipIpAccessControlListMapping(AccountSid string, DomainSid string, Sid string) error { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/IpAccessControlListMappings/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -3278,26 +3220,24 @@ func (c *DefaultApiService) DeleteSipIpAccessControlListMapping(AccountSid strin * @param AccountSid The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. * @param IpAccessControlListSid The IpAccessControlList Sid that identifies the IpAddress resources to delete. * @param Sid A 34 character string that uniquely identifies the resource to delete. -*/ -func (c *DefaultApiService) DeleteSipIpAddress(AccountSid string, IpAccessControlListSid string, Sid string, ) (error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists/{IpAccessControlListSid}/IpAddresses/{Sid}.json" + */ +func (c *DefaultApiService) DeleteSipIpAddress(AccountSid string, IpAccessControlListSid string, Sid string) error { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists/{IpAccessControlListSid}/IpAddresses/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"IpAccessControlListSid"+"}", IpAccessControlListSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -3305,50 +3245,46 @@ func (c *DefaultApiService) DeleteSipIpAddress(AccountSid string, IpAccessContro * Delete a transcription from the account used to make the request * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Transcription resources to delete. * @param Sid The Twilio-provided string that uniquely identifies the Transcription resource to delete. -*/ -func (c *DefaultApiService) DeleteTranscription(AccountSid string, Sid string, ) (error) { - path := "/2010-04-01/Accounts/{AccountSid}/Transcriptions/{Sid}.json" + */ +func (c *DefaultApiService) DeleteTranscription(AccountSid string, Sid string) error { + path := "/2010-04-01/Accounts/{AccountSid}/Transcriptions/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* * DeleteUsageTrigger Method for DeleteUsageTrigger * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageTrigger resources to delete. * @param Sid The Twilio-provided string that uniquely identifies the UsageTrigger resource to delete. -*/ -func (c *DefaultApiService) DeleteUsageTrigger(AccountSid string, Sid string, ) (error) { - path := "/2010-04-01/Accounts/{AccountSid}/Usage/Triggers/{Sid}.json" + */ +func (c *DefaultApiService) DeleteUsageTrigger(AccountSid string, Sid string) error { + path := "/2010-04-01/Accounts/{AccountSid}/Usage/Triggers/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -3356,29 +3292,27 @@ func (c *DefaultApiService) DeleteUsageTrigger(AccountSid string, Sid string, ) * Fetch the account specified by the provided Account Sid * @param Sid The Account Sid that uniquely identifies the account to fetch * @return ApiV2010Account -*/ -func (c *DefaultApiService) FetchAccount(Sid string, ) (*ApiV2010Account, error) { - path := "/2010-04-01/Accounts/{Sid}.json" + */ +func (c *DefaultApiService) FetchAccount(Sid string) (*ApiV2010Account, error) { + path := "/2010-04-01/Accounts/{Sid}.json" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010Account{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010Account{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -3386,30 +3320,28 @@ func (c *DefaultApiService) FetchAccount(Sid string, ) (*ApiV2010Account, error) * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that is responsible for the Address resource to fetch. * @param Sid The Twilio-provided string that uniquely identifies the Address resource to fetch. * @return ApiV2010AccountAddress -*/ -func (c *DefaultApiService) FetchAddress(AccountSid string, Sid string, ) (*ApiV2010AccountAddress, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Addresses/{Sid}.json" + */ +func (c *DefaultApiService) FetchAddress(AccountSid string, Sid string) (*ApiV2010AccountAddress, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Addresses/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountAddress{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountAddress{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -3418,30 +3350,28 @@ func (c *DefaultApiService) FetchAddress(AccountSid string, Sid string, ) (*ApiV * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Application resource to fetch. * @param Sid The Twilio-provided string that uniquely identifies the Application resource to fetch. * @return ApiV2010AccountApplication -*/ -func (c *DefaultApiService) FetchApplication(AccountSid string, Sid string, ) (*ApiV2010AccountApplication, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Applications/{Sid}.json" + */ +func (c *DefaultApiService) FetchApplication(AccountSid string, Sid string) (*ApiV2010AccountApplication, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Applications/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &ApiV2010AccountApplication{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountApplication{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -3450,30 +3380,28 @@ func (c *DefaultApiService) FetchApplication(AccountSid string, Sid string, ) (* * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the AuthorizedConnectApp resource to fetch. * @param ConnectAppSid The SID of the Connect App to fetch. * @return ApiV2010AccountAuthorizedConnectApp -*/ -func (c *DefaultApiService) FetchAuthorizedConnectApp(AccountSid string, ConnectAppSid string, ) (*ApiV2010AccountAuthorizedConnectApp, error) { - path := "/2010-04-01/Accounts/{AccountSid}/AuthorizedConnectApps/{ConnectAppSid}.json" + */ +func (c *DefaultApiService) FetchAuthorizedConnectApp(AccountSid string, ConnectAppSid string) (*ApiV2010AccountAuthorizedConnectApp, error) { + path := "/2010-04-01/Accounts/{AccountSid}/AuthorizedConnectApps/{ConnectAppSid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"ConnectAppSid"+"}", ConnectAppSid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountAuthorizedConnectApp{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountAuthorizedConnectApp{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -3481,30 +3409,28 @@ func (c *DefaultApiService) FetchAuthorizedConnectApp(AccountSid string, Connect * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) requesting the available phone number Country resource. * @param CountryCode The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country to fetch available phone number information about. * @return ApiV2010AccountAvailablePhoneNumberCountry -*/ -func (c *DefaultApiService) FetchAvailablePhoneNumberCountry(AccountSid string, CountryCode string, ) (*ApiV2010AccountAvailablePhoneNumberCountry, error) { - path := "/2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}.json" + */ +func (c *DefaultApiService) FetchAvailablePhoneNumberCountry(AccountSid string, CountryCode string) (*ApiV2010AccountAvailablePhoneNumberCountry, error) { + path := "/2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"CountryCode"+"}", CountryCode, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountAvailablePhoneNumberCountry{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountAvailablePhoneNumberCountry{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -3512,29 +3438,27 @@ func (c *DefaultApiService) FetchAvailablePhoneNumberCountry(AccountSid string, * Fetch the balance for an Account based on Account Sid. Balance changes may not be reflected immediately. Child accounts do not contain balance information * @param AccountSid The unique SID identifier of the Account. * @return ApiV2010AccountBalance -*/ -func (c *DefaultApiService) FetchBalance(AccountSid string, ) (*ApiV2010AccountBalance, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Balance.json" + */ +func (c *DefaultApiService) FetchBalance(AccountSid string) (*ApiV2010AccountBalance, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Balance.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountBalance{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountBalance{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -3543,30 +3467,28 @@ func (c *DefaultApiService) FetchBalance(AccountSid string, ) (*ApiV2010AccountB * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Call resource(s) to fetch. * @param Sid The SID of the Call resource to fetch. * @return ApiV2010AccountCall -*/ -func (c *DefaultApiService) FetchCall(AccountSid string, Sid string, ) (*ApiV2010AccountCall, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Calls/{Sid}.json" + */ +func (c *DefaultApiService) FetchCall(AccountSid string, Sid string) (*ApiV2010AccountCall, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Calls/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &ApiV2010AccountCall{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountCall{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -3575,30 +3497,28 @@ func (c *DefaultApiService) FetchCall(AccountSid string, Sid string, ) (*ApiV201 * @param AccountSid The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. * @param CallSid The call sid that uniquely identifies the call * @return ApiV2010AccountCallCallFeedback -*/ -func (c *DefaultApiService) FetchCallFeedback(AccountSid string, CallSid string, ) (*ApiV2010AccountCallCallFeedback, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Feedback.json" + */ +func (c *DefaultApiService) FetchCallFeedback(AccountSid string, CallSid string) (*ApiV2010AccountCallCallFeedback, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Feedback.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountCallCallFeedback{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountCallCallFeedback{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -3607,30 +3527,28 @@ func (c *DefaultApiService) FetchCallFeedback(AccountSid string, CallSid string, * @param AccountSid The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. * @param Sid A 34 character string that uniquely identifies this resource. * @return ApiV2010AccountCallCallFeedbackSummary -*/ -func (c *DefaultApiService) FetchCallFeedbackSummary(AccountSid string, Sid string, ) (*ApiV2010AccountCallCallFeedbackSummary, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Calls/FeedbackSummary/{Sid}.json" + */ +func (c *DefaultApiService) FetchCallFeedbackSummary(AccountSid string, Sid string) (*ApiV2010AccountCallCallFeedbackSummary, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Calls/FeedbackSummary/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountCallCallFeedbackSummary{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountCallCallFeedbackSummary{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -3639,31 +3557,29 @@ func (c *DefaultApiService) FetchCallFeedbackSummary(AccountSid string, Sid stri * @param CallSid The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID of the Call Notification resource to fetch. * @param Sid The Twilio-provided string that uniquely identifies the Call Notification resource to fetch. * @return ApiV2010AccountCallCallNotificationInstance -*/ -func (c *DefaultApiService) FetchCallNotification(AccountSid string, CallSid string, Sid string, ) (*ApiV2010AccountCallCallNotificationInstance, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Notifications/{Sid}.json" + */ +func (c *DefaultApiService) FetchCallNotification(AccountSid string, CallSid string, Sid string) (*ApiV2010AccountCallCallNotificationInstance, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Notifications/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountCallCallNotificationInstance{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountCallCallNotificationInstance{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -3673,31 +3589,29 @@ func (c *DefaultApiService) FetchCallNotification(AccountSid string, CallSid str * @param CallSid The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID of the resource to fetch. * @param Sid The Twilio-provided string that uniquely identifies the Recording resource to fetch. * @return ApiV2010AccountCallCallRecording -*/ -func (c *DefaultApiService) FetchCallRecording(AccountSid string, CallSid string, Sid string, ) (*ApiV2010AccountCallCallRecording, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Recordings/{Sid}.json" + */ +func (c *DefaultApiService) FetchCallRecording(AccountSid string, CallSid string, Sid string) (*ApiV2010AccountCallCallRecording, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Recordings/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &ApiV2010AccountCallCallRecording{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountCallCallRecording{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -3706,30 +3620,28 @@ func (c *DefaultApiService) FetchCallRecording(AccountSid string, CallSid string * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Conference resource(s) to fetch. * @param Sid The Twilio-provided string that uniquely identifies the Conference resource to fetch * @return ApiV2010AccountConference -*/ -func (c *DefaultApiService) FetchConference(AccountSid string, Sid string, ) (*ApiV2010AccountConference, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Conferences/{Sid}.json" + */ +func (c *DefaultApiService) FetchConference(AccountSid string, Sid string) (*ApiV2010AccountConference, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Conferences/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountConference{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountConference{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -3739,31 +3651,29 @@ func (c *DefaultApiService) FetchConference(AccountSid string, Sid string, ) (*A * @param ConferenceSid The Conference SID that identifies the conference associated with the recording to fetch. * @param Sid The Twilio-provided string that uniquely identifies the Conference Recording resource to fetch. * @return ApiV2010AccountConferenceConferenceRecording -*/ -func (c *DefaultApiService) FetchConferenceRecording(AccountSid string, ConferenceSid string, Sid string, ) (*ApiV2010AccountConferenceConferenceRecording, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Recordings/{Sid}.json" + */ +func (c *DefaultApiService) FetchConferenceRecording(AccountSid string, ConferenceSid string, Sid string) (*ApiV2010AccountConferenceConferenceRecording, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Recordings/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"ConferenceSid"+"}", ConferenceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountConferenceConferenceRecording{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountConferenceConferenceRecording{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -3772,30 +3682,28 @@ func (c *DefaultApiService) FetchConferenceRecording(AccountSid string, Conferen * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the ConnectApp resource to fetch. * @param Sid The Twilio-provided string that uniquely identifies the ConnectApp resource to fetch. * @return ApiV2010AccountConnectApp -*/ -func (c *DefaultApiService) FetchConnectApp(AccountSid string, Sid string, ) (*ApiV2010AccountConnectApp, error) { - path := "/2010-04-01/Accounts/{AccountSid}/ConnectApps/{Sid}.json" + */ +func (c *DefaultApiService) FetchConnectApp(AccountSid string, Sid string) (*ApiV2010AccountConnectApp, error) { + path := "/2010-04-01/Accounts/{AccountSid}/ConnectApps/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountConnectApp{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountConnectApp{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -3804,30 +3712,28 @@ func (c *DefaultApiService) FetchConnectApp(AccountSid string, Sid string, ) (*A * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the IncomingPhoneNumber resource to fetch. * @param Sid The Twilio-provided string that uniquely identifies the IncomingPhoneNumber resource to fetch. * @return ApiV2010AccountIncomingPhoneNumber -*/ -func (c *DefaultApiService) FetchIncomingPhoneNumber(AccountSid string, Sid string, ) (*ApiV2010AccountIncomingPhoneNumber, error) { - path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{Sid}.json" + */ +func (c *DefaultApiService) FetchIncomingPhoneNumber(AccountSid string, Sid string) (*ApiV2010AccountIncomingPhoneNumber, error) { + path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &ApiV2010AccountIncomingPhoneNumber{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountIncomingPhoneNumber{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -3837,31 +3743,29 @@ func (c *DefaultApiService) FetchIncomingPhoneNumber(AccountSid string, Sid stri * @param ResourceSid The SID of the Phone Number to which the Add-on is assigned. * @param Sid The Twilio-provided string that uniquely identifies the resource to fetch. * @return ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOn -*/ -func (c *DefaultApiService) FetchIncomingPhoneNumberAssignedAddOn(AccountSid string, ResourceSid string, Sid string, ) (*ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOn, error) { - path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{ResourceSid}/AssignedAddOns/{Sid}.json" + */ +func (c *DefaultApiService) FetchIncomingPhoneNumberAssignedAddOn(AccountSid string, ResourceSid string, Sid string) (*ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOn, error) { + path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{ResourceSid}/AssignedAddOns/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"ResourceSid"+"}", ResourceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOn{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOn{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -3872,32 +3776,30 @@ func (c *DefaultApiService) FetchIncomingPhoneNumberAssignedAddOn(AccountSid str * @param AssignedAddOnSid The SID that uniquely identifies the assigned Add-on installation. * @param Sid The Twilio-provided string that uniquely identifies the resource to fetch. * @return ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOnIncomingPhoneNumberAssignedAddOnExtension -*/ -func (c *DefaultApiService) FetchIncomingPhoneNumberAssignedAddOnExtension(AccountSid string, ResourceSid string, AssignedAddOnSid string, Sid string, ) (*ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOnIncomingPhoneNumberAssignedAddOnExtension, error) { - path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{ResourceSid}/AssignedAddOns/{AssignedAddOnSid}/Extensions/{Sid}.json" + */ +func (c *DefaultApiService) FetchIncomingPhoneNumberAssignedAddOnExtension(AccountSid string, ResourceSid string, AssignedAddOnSid string, Sid string) (*ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOnIncomingPhoneNumberAssignedAddOnExtension, error) { + path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{ResourceSid}/AssignedAddOns/{AssignedAddOnSid}/Extensions/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"ResourceSid"+"}", ResourceSid, -1) path = strings.Replace(path, "{"+"AssignedAddOnSid"+"}", AssignedAddOnSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOnIncomingPhoneNumberAssignedAddOnExtension{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOnIncomingPhoneNumberAssignedAddOnExtension{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -3905,30 +3807,28 @@ func (c *DefaultApiService) FetchIncomingPhoneNumberAssignedAddOnExtension(Accou * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Key resource to fetch. * @param Sid The Twilio-provided string that uniquely identifies the Key resource to fetch. * @return ApiV2010AccountKey -*/ -func (c *DefaultApiService) FetchKey(AccountSid string, Sid string, ) (*ApiV2010AccountKey, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Keys/{Sid}.json" + */ +func (c *DefaultApiService) FetchKey(AccountSid string, Sid string) (*ApiV2010AccountKey, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Keys/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountKey{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountKey{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -3938,31 +3838,29 @@ func (c *DefaultApiService) FetchKey(AccountSid string, Sid string, ) (*ApiV2010 * @param MessageSid The SID of the Message resource that this Media resource belongs to. * @param Sid The Twilio-provided string that uniquely identifies the Media resource to fetch * @return ApiV2010AccountMessageMedia -*/ -func (c *DefaultApiService) FetchMedia(AccountSid string, MessageSid string, Sid string, ) (*ApiV2010AccountMessageMedia, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Messages/{MessageSid}/Media/{Sid}.json" + */ +func (c *DefaultApiService) FetchMedia(AccountSid string, MessageSid string, Sid string) (*ApiV2010AccountMessageMedia, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Messages/{MessageSid}/Media/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"MessageSid"+"}", MessageSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &ApiV2010AccountMessageMedia{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountMessageMedia{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -3972,31 +3870,29 @@ func (c *DefaultApiService) FetchMedia(AccountSid string, MessageSid string, Sid * @param QueueSid The SID of the Queue in which to find the members to fetch. * @param CallSid The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID of the resource(s) to fetch. * @return ApiV2010AccountQueueMember -*/ -func (c *DefaultApiService) FetchMember(AccountSid string, QueueSid string, CallSid string, ) (*ApiV2010AccountQueueMember, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Queues/{QueueSid}/Members/{CallSid}.json" + */ +func (c *DefaultApiService) FetchMember(AccountSid string, QueueSid string, CallSid string) (*ApiV2010AccountQueueMember, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Queues/{QueueSid}/Members/{CallSid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"QueueSid"+"}", QueueSid, -1) path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountQueueMember{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountQueueMember{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -4005,30 +3901,28 @@ func (c *DefaultApiService) FetchMember(AccountSid string, QueueSid string, Call * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Message resource to fetch. * @param Sid The Twilio-provided string that uniquely identifies the Message resource to fetch. * @return ApiV2010AccountMessage -*/ -func (c *DefaultApiService) FetchMessage(AccountSid string, Sid string, ) (*ApiV2010AccountMessage, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Messages/{Sid}.json" + */ +func (c *DefaultApiService) FetchMessage(AccountSid string, Sid string) (*ApiV2010AccountMessage, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Messages/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountMessage{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountMessage{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -4037,30 +3931,28 @@ func (c *DefaultApiService) FetchMessage(AccountSid string, Sid string, ) (*ApiV * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Notification resource to fetch. * @param Sid The Twilio-provided string that uniquely identifies the Notification resource to fetch. * @return ApiV2010AccountNotificationInstance -*/ -func (c *DefaultApiService) FetchNotification(AccountSid string, Sid string, ) (*ApiV2010AccountNotificationInstance, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Notifications/{Sid}.json" + */ +func (c *DefaultApiService) FetchNotification(AccountSid string, Sid string) (*ApiV2010AccountNotificationInstance, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Notifications/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountNotificationInstance{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountNotificationInstance{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -4069,30 +3961,28 @@ func (c *DefaultApiService) FetchNotification(AccountSid string, Sid string, ) ( * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the OutgoingCallerId resource to fetch. * @param Sid The Twilio-provided string that uniquely identifies the OutgoingCallerId resource to fetch. * @return ApiV2010AccountOutgoingCallerId -*/ -func (c *DefaultApiService) FetchOutgoingCallerId(AccountSid string, Sid string, ) (*ApiV2010AccountOutgoingCallerId, error) { - path := "/2010-04-01/Accounts/{AccountSid}/OutgoingCallerIds/{Sid}.json" + */ +func (c *DefaultApiService) FetchOutgoingCallerId(AccountSid string, Sid string) (*ApiV2010AccountOutgoingCallerId, error) { + path := "/2010-04-01/Accounts/{AccountSid}/OutgoingCallerIds/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &ApiV2010AccountOutgoingCallerId{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountOutgoingCallerId{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -4102,31 +3992,29 @@ func (c *DefaultApiService) FetchOutgoingCallerId(AccountSid string, Sid string, * @param ConferenceSid The SID of the conference with the participant to fetch. * @param CallSid The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID or label of the participant to fetch. Non URL safe characters in a label must be percent encoded, for example, a space character is represented as %20. * @return ApiV2010AccountConferenceParticipant -*/ -func (c *DefaultApiService) FetchParticipant(AccountSid string, ConferenceSid string, CallSid string, ) (*ApiV2010AccountConferenceParticipant, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Participants/{CallSid}.json" + */ +func (c *DefaultApiService) FetchParticipant(AccountSid string, ConferenceSid string, CallSid string) (*ApiV2010AccountConferenceParticipant, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Participants/{CallSid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"ConferenceSid"+"}", ConferenceSid, -1) path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountConferenceParticipant{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountConferenceParticipant{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -4135,30 +4023,28 @@ func (c *DefaultApiService) FetchParticipant(AccountSid string, ConferenceSid st * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Queue resource to fetch. * @param Sid The Twilio-provided string that uniquely identifies the Queue resource to fetch * @return ApiV2010AccountQueue -*/ -func (c *DefaultApiService) FetchQueue(AccountSid string, Sid string, ) (*ApiV2010AccountQueue, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Queues/{Sid}.json" + */ +func (c *DefaultApiService) FetchQueue(AccountSid string, Sid string) (*ApiV2010AccountQueue, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Queues/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountQueue{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountQueue{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -4167,30 +4053,28 @@ func (c *DefaultApiService) FetchQueue(AccountSid string, Sid string, ) (*ApiV20 * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording resource to fetch. * @param Sid The Twilio-provided string that uniquely identifies the Recording resource to fetch. * @return ApiV2010AccountRecording -*/ -func (c *DefaultApiService) FetchRecording(AccountSid string, Sid string, ) (*ApiV2010AccountRecording, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Recordings/{Sid}.json" + */ +func (c *DefaultApiService) FetchRecording(AccountSid string, Sid string) (*ApiV2010AccountRecording, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Recordings/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountRecording{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountRecording{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -4200,31 +4084,29 @@ func (c *DefaultApiService) FetchRecording(AccountSid string, Sid string, ) (*Ap * @param ReferenceSid The SID of the recording to which the result to fetch belongs. * @param Sid The Twilio-provided string that uniquely identifies the Recording AddOnResult resource to fetch. * @return ApiV2010AccountRecordingRecordingAddOnResult -*/ -func (c *DefaultApiService) FetchRecordingAddOnResult(AccountSid string, ReferenceSid string, Sid string, ) (*ApiV2010AccountRecordingRecordingAddOnResult, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Recordings/{ReferenceSid}/AddOnResults/{Sid}.json" + */ +func (c *DefaultApiService) FetchRecordingAddOnResult(AccountSid string, ReferenceSid string, Sid string) (*ApiV2010AccountRecordingRecordingAddOnResult, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Recordings/{ReferenceSid}/AddOnResults/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"ReferenceSid"+"}", ReferenceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &ApiV2010AccountRecordingRecordingAddOnResult{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountRecordingRecordingAddOnResult{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -4235,32 +4117,30 @@ func (c *DefaultApiService) FetchRecordingAddOnResult(AccountSid string, Referen * @param AddOnResultSid The SID of the AddOnResult to which the payload to fetch belongs. * @param Sid The Twilio-provided string that uniquely identifies the Recording AddOnResult Payload resource to fetch. * @return ApiV2010AccountRecordingRecordingAddOnResultRecordingAddOnResultPayload -*/ -func (c *DefaultApiService) FetchRecordingAddOnResultPayload(AccountSid string, ReferenceSid string, AddOnResultSid string, Sid string, ) (*ApiV2010AccountRecordingRecordingAddOnResultRecordingAddOnResultPayload, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Recordings/{ReferenceSid}/AddOnResults/{AddOnResultSid}/Payloads/{Sid}.json" + */ +func (c *DefaultApiService) FetchRecordingAddOnResultPayload(AccountSid string, ReferenceSid string, AddOnResultSid string, Sid string) (*ApiV2010AccountRecordingRecordingAddOnResultRecordingAddOnResultPayload, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Recordings/{ReferenceSid}/AddOnResults/{AddOnResultSid}/Payloads/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"ReferenceSid"+"}", ReferenceSid, -1) path = strings.Replace(path, "{"+"AddOnResultSid"+"}", AddOnResultSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountRecordingRecordingAddOnResultRecordingAddOnResultPayload{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountRecordingRecordingAddOnResultRecordingAddOnResultPayload{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -4269,31 +4149,29 @@ func (c *DefaultApiService) FetchRecordingAddOnResultPayload(AccountSid string, * @param RecordingSid The SID of the [Recording](https://www.twilio.com/docs/voice/api/recording) that created the transcription to fetch. * @param Sid The Twilio-provided string that uniquely identifies the Transcription resource to fetch. * @return ApiV2010AccountRecordingRecordingTranscription -*/ -func (c *DefaultApiService) FetchRecordingTranscription(AccountSid string, RecordingSid string, Sid string, ) (*ApiV2010AccountRecordingRecordingTranscription, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Recordings/{RecordingSid}/Transcriptions/{Sid}.json" + */ +func (c *DefaultApiService) FetchRecordingTranscription(AccountSid string, RecordingSid string, Sid string) (*ApiV2010AccountRecordingRecordingTranscription, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Recordings/{RecordingSid}/Transcriptions/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"RecordingSid"+"}", RecordingSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &ApiV2010AccountRecordingRecordingTranscription{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountRecordingRecordingTranscription{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -4302,30 +4180,28 @@ func (c *DefaultApiService) FetchRecordingTranscription(AccountSid string, Recor * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the ShortCode resource(s) to fetch. * @param Sid The Twilio-provided string that uniquely identifies the ShortCode resource to fetch * @return ApiV2010AccountShortCode -*/ -func (c *DefaultApiService) FetchShortCode(AccountSid string, Sid string, ) (*ApiV2010AccountShortCode, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SMS/ShortCodes/{Sid}.json" + */ +func (c *DefaultApiService) FetchShortCode(AccountSid string, Sid string) (*ApiV2010AccountShortCode, error) { + path := "/2010-04-01/Accounts/{AccountSid}/SMS/ShortCodes/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountShortCode{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountShortCode{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -4333,30 +4209,28 @@ func (c *DefaultApiService) FetchShortCode(AccountSid string, Sid string, ) (*Ap * @param AccountSid * @param Sid * @return ApiV2010AccountSigningKey -*/ -func (c *DefaultApiService) FetchSigningKey(AccountSid string, Sid string, ) (*ApiV2010AccountSigningKey, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SigningKeys/{Sid}.json" + */ +func (c *DefaultApiService) FetchSigningKey(AccountSid string, Sid string) (*ApiV2010AccountSigningKey, error) { + path := "/2010-04-01/Accounts/{AccountSid}/SigningKeys/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountSigningKey{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountSigningKey{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -4366,31 +4240,29 @@ func (c *DefaultApiService) FetchSigningKey(AccountSid string, Sid string, ) (*A * @param DomainSid The SID of the SIP domain that contains the resource to fetch. * @param Sid The Twilio-provided string that uniquely identifies the CredentialListMapping resource to fetch. * @return ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsCredentialListMapping -*/ -func (c *DefaultApiService) FetchSipAuthCallsCredentialListMapping(AccountSid string, DomainSid string, Sid string, ) (*ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsCredentialListMapping, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls/CredentialListMappings/{Sid}.json" + */ +func (c *DefaultApiService) FetchSipAuthCallsCredentialListMapping(AccountSid string, DomainSid string, Sid string) (*ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsCredentialListMapping, error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls/CredentialListMappings/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsCredentialListMapping{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsCredentialListMapping{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -4400,31 +4272,29 @@ func (c *DefaultApiService) FetchSipAuthCallsCredentialListMapping(AccountSid st * @param DomainSid The SID of the SIP domain that contains the resource to fetch. * @param Sid The Twilio-provided string that uniquely identifies the IpAccessControlListMapping resource to fetch. * @return ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsIpAccessControlListMapping -*/ -func (c *DefaultApiService) FetchSipAuthCallsIpAccessControlListMapping(AccountSid string, DomainSid string, Sid string, ) (*ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsIpAccessControlListMapping, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls/IpAccessControlListMappings/{Sid}.json" + */ +func (c *DefaultApiService) FetchSipAuthCallsIpAccessControlListMapping(AccountSid string, DomainSid string, Sid string) (*ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsIpAccessControlListMapping, error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls/IpAccessControlListMappings/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsIpAccessControlListMapping{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsIpAccessControlListMapping{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -4434,31 +4304,29 @@ func (c *DefaultApiService) FetchSipAuthCallsIpAccessControlListMapping(AccountS * @param DomainSid The SID of the SIP domain that contains the resource to fetch. * @param Sid The Twilio-provided string that uniquely identifies the CredentialListMapping resource to fetch. * @return ApiV2010AccountSipSipDomainSipAuthSipAuthRegistrationsSipAuthRegistrationsCredentialListMapping -*/ -func (c *DefaultApiService) FetchSipAuthRegistrationsCredentialListMapping(AccountSid string, DomainSid string, Sid string, ) (*ApiV2010AccountSipSipDomainSipAuthSipAuthRegistrationsSipAuthRegistrationsCredentialListMapping, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Registrations/CredentialListMappings/{Sid}.json" + */ +func (c *DefaultApiService) FetchSipAuthRegistrationsCredentialListMapping(AccountSid string, DomainSid string, Sid string) (*ApiV2010AccountSipSipDomainSipAuthSipAuthRegistrationsSipAuthRegistrationsCredentialListMapping, error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Registrations/CredentialListMappings/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &ApiV2010AccountSipSipDomainSipAuthSipAuthRegistrationsSipAuthRegistrationsCredentialListMapping{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountSipSipDomainSipAuthSipAuthRegistrationsSipAuthRegistrationsCredentialListMapping{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -4468,31 +4336,29 @@ func (c *DefaultApiService) FetchSipAuthRegistrationsCredentialListMapping(Accou * @param CredentialListSid The unique id that identifies the credential list that contains the desired credential. * @param Sid The unique id that identifies the resource to fetch. * @return ApiV2010AccountSipSipCredentialListSipCredential -*/ -func (c *DefaultApiService) FetchSipCredential(AccountSid string, CredentialListSid string, Sid string, ) (*ApiV2010AccountSipSipCredentialListSipCredential, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{CredentialListSid}/Credentials/{Sid}.json" + */ +func (c *DefaultApiService) FetchSipCredential(AccountSid string, CredentialListSid string, Sid string) (*ApiV2010AccountSipSipCredentialListSipCredential, error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{CredentialListSid}/Credentials/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"CredentialListSid"+"}", CredentialListSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountSipSipCredentialListSipCredential{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountSipSipCredentialListSipCredential{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -4501,30 +4367,28 @@ func (c *DefaultApiService) FetchSipCredential(AccountSid string, CredentialList * @param AccountSid The unique id of the Account that is responsible for this resource. * @param Sid The credential list Sid that uniquely identifies this resource * @return ApiV2010AccountSipSipCredentialList -*/ -func (c *DefaultApiService) FetchSipCredentialList(AccountSid string, Sid string, ) (*ApiV2010AccountSipSipCredentialList, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{Sid}.json" + */ +func (c *DefaultApiService) FetchSipCredentialList(AccountSid string, Sid string) (*ApiV2010AccountSipSipCredentialList, error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &ApiV2010AccountSipSipCredentialList{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountSipSipCredentialList{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -4534,31 +4398,29 @@ func (c *DefaultApiService) FetchSipCredentialList(AccountSid string, Sid string * @param DomainSid A 34 character string that uniquely identifies the SIP Domain that includes the resource to fetch. * @param Sid A 34 character string that uniquely identifies the resource to fetch. * @return ApiV2010AccountSipSipDomainSipCredentialListMapping -*/ -func (c *DefaultApiService) FetchSipCredentialListMapping(AccountSid string, DomainSid string, Sid string, ) (*ApiV2010AccountSipSipDomainSipCredentialListMapping, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/CredentialListMappings/{Sid}.json" + */ +func (c *DefaultApiService) FetchSipCredentialListMapping(AccountSid string, DomainSid string, Sid string) (*ApiV2010AccountSipSipDomainSipCredentialListMapping, error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/CredentialListMappings/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountSipSipDomainSipCredentialListMapping{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountSipSipDomainSipCredentialListMapping{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -4567,30 +4429,28 @@ func (c *DefaultApiService) FetchSipCredentialListMapping(AccountSid string, Dom * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the SipDomain resource to fetch. * @param Sid The Twilio-provided string that uniquely identifies the SipDomain resource to fetch. * @return ApiV2010AccountSipSipDomain -*/ -func (c *DefaultApiService) FetchSipDomain(AccountSid string, Sid string, ) (*ApiV2010AccountSipSipDomain, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{Sid}.json" + */ +func (c *DefaultApiService) FetchSipDomain(AccountSid string, Sid string) (*ApiV2010AccountSipSipDomain, error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &ApiV2010AccountSipSipDomain{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountSipSipDomain{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -4599,30 +4459,28 @@ func (c *DefaultApiService) FetchSipDomain(AccountSid string, Sid string, ) (*Ap * @param AccountSid The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. * @param Sid A 34 character string that uniquely identifies the resource to fetch. * @return ApiV2010AccountSipSipIpAccessControlList -*/ -func (c *DefaultApiService) FetchSipIpAccessControlList(AccountSid string, Sid string, ) (*ApiV2010AccountSipSipIpAccessControlList, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists/{Sid}.json" + */ +func (c *DefaultApiService) FetchSipIpAccessControlList(AccountSid string, Sid string) (*ApiV2010AccountSipSipIpAccessControlList, error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountSipSipIpAccessControlList{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountSipSipIpAccessControlList{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -4632,31 +4490,29 @@ func (c *DefaultApiService) FetchSipIpAccessControlList(AccountSid string, Sid s * @param DomainSid A 34 character string that uniquely identifies the SIP domain. * @param Sid A 34 character string that uniquely identifies the resource to fetch. * @return ApiV2010AccountSipSipDomainSipIpAccessControlListMapping -*/ -func (c *DefaultApiService) FetchSipIpAccessControlListMapping(AccountSid string, DomainSid string, Sid string, ) (*ApiV2010AccountSipSipDomainSipIpAccessControlListMapping, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/IpAccessControlListMappings/{Sid}.json" + */ +func (c *DefaultApiService) FetchSipIpAccessControlListMapping(AccountSid string, DomainSid string, Sid string) (*ApiV2010AccountSipSipDomainSipIpAccessControlListMapping, error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/IpAccessControlListMappings/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountSipSipDomainSipIpAccessControlListMapping{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountSipSipDomainSipIpAccessControlListMapping{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -4666,31 +4522,29 @@ func (c *DefaultApiService) FetchSipIpAccessControlListMapping(AccountSid string * @param IpAccessControlListSid The IpAccessControlList Sid that identifies the IpAddress resources to fetch. * @param Sid A 34 character string that uniquely identifies the IpAddress resource to fetch. * @return ApiV2010AccountSipSipIpAccessControlListSipIpAddress -*/ -func (c *DefaultApiService) FetchSipIpAddress(AccountSid string, IpAccessControlListSid string, Sid string, ) (*ApiV2010AccountSipSipIpAccessControlListSipIpAddress, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists/{IpAccessControlListSid}/IpAddresses/{Sid}.json" + */ +func (c *DefaultApiService) FetchSipIpAddress(AccountSid string, IpAccessControlListSid string, Sid string) (*ApiV2010AccountSipSipIpAccessControlListSipIpAddress, error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists/{IpAccessControlListSid}/IpAddresses/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"IpAccessControlListSid"+"}", IpAccessControlListSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountSipSipIpAccessControlListSipIpAddress{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountSipSipIpAccessControlListSipIpAddress{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -4699,30 +4553,28 @@ func (c *DefaultApiService) FetchSipIpAddress(AccountSid string, IpAccessControl * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Transcription resource to fetch. * @param Sid The Twilio-provided string that uniquely identifies the Transcription resource to fetch. * @return ApiV2010AccountTranscription -*/ -func (c *DefaultApiService) FetchTranscription(AccountSid string, Sid string, ) (*ApiV2010AccountTranscription, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Transcriptions/{Sid}.json" + */ +func (c *DefaultApiService) FetchTranscription(AccountSid string, Sid string) (*ApiV2010AccountTranscription, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Transcriptions/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountTranscription{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountTranscription{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -4731,36 +4583,35 @@ func (c *DefaultApiService) FetchTranscription(AccountSid string, Sid string, ) * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageTrigger resource to fetch. * @param Sid The Twilio-provided string that uniquely identifies the UsageTrigger resource to fetch. * @return ApiV2010AccountUsageUsageTrigger -*/ -func (c *DefaultApiService) FetchUsageTrigger(AccountSid string, Sid string, ) (*ApiV2010AccountUsageUsageTrigger, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Usage/Triggers/{Sid}.json" + */ +func (c *DefaultApiService) FetchUsageTrigger(AccountSid string, Sid string) (*ApiV2010AccountUsageUsageTrigger, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Usage/Triggers/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountUsageUsageTrigger{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountUsageUsageTrigger{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListAccountParams Optional parameters for the method 'ListAccount' type ListAccountParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` - Status *string `json:"Status,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + Status *string `json:"Status,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -4771,44 +4622,44 @@ type ListAccountParams struct { * @param "Status" (string) - Only return Account resources with the given status. Can be `closed`, `suspended` or `active`. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListAccountResponse -*/ + */ func (c *DefaultApiService) ListAccount(params *ListAccountParams) (*ListAccountResponse, error) { - path := "/2010-04-01/Accounts.json" + path := "/2010-04-01/Accounts.json" - data := url.Values{} - headers := 0 - - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListAccountResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListAccountResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListAddressParams Optional parameters for the method 'ListAddress' type ListAddressParams struct { CustomerName *string `json:"CustomerName,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` - IsoCountry *string `json:"IsoCountry,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + IsoCountry *string `json:"IsoCountry,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -4820,46 +4671,46 @@ type ListAddressParams struct { * @param "IsoCountry" (string) - The ISO country code of the Address resources to read. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListAddressResponse -*/ + */ func (c *DefaultApiService) ListAddress(AccountSid string, params *ListAddressParams) (*ListAddressResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Addresses.json" + path := "/2010-04-01/Accounts/{AccountSid}/Addresses.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.CustomerName != nil { - data.Set("CustomerName", *params.CustomerName) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.IsoCountry != nil { - data.Set("IsoCountry", *params.IsoCountry) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.CustomerName != nil { + data.Set("CustomerName", *params.CustomerName) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.IsoCountry != nil { + data.Set("IsoCountry", *params.IsoCountry) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListAddressResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListAddressResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListApplicationParams Optional parameters for the method 'ListApplication' type ListApplicationParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -4870,36 +4721,36 @@ type ListApplicationParams struct { * @param "FriendlyName" (string) - The string that identifies the Application resources to read. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListApplicationResponse -*/ + */ func (c *DefaultApiService) ListApplication(AccountSid string, params *ListApplicationParams) (*ListApplicationResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Applications.json" + path := "/2010-04-01/Accounts/{AccountSid}/Applications.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListApplicationResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListApplicationResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListAuthorizedConnectAppParams Optional parameters for the method 'ListAuthorizedConnectApp' type ListAuthorizedConnectAppParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -4912,33 +4763,33 @@ type ListAuthorizedConnectAppParams struct { * @param optional nil or *ListAuthorizedConnectAppParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListAuthorizedConnectAppResponse -*/ + */ func (c *DefaultApiService) ListAuthorizedConnectApp(AccountSid string, params *ListAuthorizedConnectAppParams) (*ListAuthorizedConnectAppResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/AuthorizedConnectApps.json" + path := "/2010-04-01/Accounts/{AccountSid}/AuthorizedConnectApps.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListAuthorizedConnectAppResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListAuthorizedConnectAppResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListAvailablePhoneNumberCountryParams Optional parameters for the method 'ListAvailablePhoneNumberCountry' type ListAvailablePhoneNumberCountryParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -4950,54 +4801,54 @@ type ListAvailablePhoneNumberCountryParams struct { * @param optional nil or *ListAvailablePhoneNumberCountryParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListAvailablePhoneNumberCountryResponse -*/ + */ func (c *DefaultApiService) ListAvailablePhoneNumberCountry(AccountSid string, params *ListAvailablePhoneNumberCountryParams) (*ListAvailablePhoneNumberCountryResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers.json" + path := "/2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListAvailablePhoneNumberCountryResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListAvailablePhoneNumberCountryResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListAvailablePhoneNumberLocalParams Optional parameters for the method 'ListAvailablePhoneNumberLocal' type ListAvailablePhoneNumberLocalParams struct { - AreaCode *int32 `json:"AreaCode,omitempty"` - Contains *string `json:"Contains,omitempty"` - SmsEnabled *bool `json:"SmsEnabled,omitempty"` - MmsEnabled *bool `json:"MmsEnabled,omitempty"` - VoiceEnabled *bool `json:"VoiceEnabled,omitempty"` - ExcludeAllAddressRequired *bool `json:"ExcludeAllAddressRequired,omitempty"` - ExcludeLocalAddressRequired *bool `json:"ExcludeLocalAddressRequired,omitempty"` - ExcludeForeignAddressRequired *bool `json:"ExcludeForeignAddressRequired,omitempty"` - Beta *bool `json:"Beta,omitempty"` - NearNumber *string `json:"NearNumber,omitempty"` - NearLatLong *string `json:"NearLatLong,omitempty"` - Distance *int32 `json:"Distance,omitempty"` - InPostalCode *string `json:"InPostalCode,omitempty"` - InRegion *string `json:"InRegion,omitempty"` - InRateCenter *string `json:"InRateCenter,omitempty"` - InLata *string `json:"InLata,omitempty"` - InLocality *string `json:"InLocality,omitempty"` - FaxEnabled *bool `json:"FaxEnabled,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + AreaCode *int32 `json:"AreaCode,omitempty"` + Contains *string `json:"Contains,omitempty"` + SmsEnabled *bool `json:"SmsEnabled,omitempty"` + MmsEnabled *bool `json:"MmsEnabled,omitempty"` + VoiceEnabled *bool `json:"VoiceEnabled,omitempty"` + ExcludeAllAddressRequired *bool `json:"ExcludeAllAddressRequired,omitempty"` + ExcludeLocalAddressRequired *bool `json:"ExcludeLocalAddressRequired,omitempty"` + ExcludeForeignAddressRequired *bool `json:"ExcludeForeignAddressRequired,omitempty"` + Beta *bool `json:"Beta,omitempty"` + NearNumber *string `json:"NearNumber,omitempty"` + NearLatLong *string `json:"NearLatLong,omitempty"` + Distance *int32 `json:"Distance,omitempty"` + InPostalCode *string `json:"InPostalCode,omitempty"` + InRegion *string `json:"InRegion,omitempty"` + InRateCenter *string `json:"InRateCenter,omitempty"` + InLata *string `json:"InLata,omitempty"` + InLocality *string `json:"InLocality,omitempty"` + FaxEnabled *bool `json:"FaxEnabled,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -5025,109 +4876,109 @@ type ListAvailablePhoneNumberLocalParams struct { * @param "FaxEnabled" (bool) - Whether the phone numbers can receive faxes. Can be: `true` or `false`. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListAvailablePhoneNumberLocalResponse -*/ + */ func (c *DefaultApiService) ListAvailablePhoneNumberLocal(AccountSid string, CountryCode string, params *ListAvailablePhoneNumberLocalParams) (*ListAvailablePhoneNumberLocalResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}/Local.json" + path := "/2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}/Local.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"CountryCode"+"}", CountryCode, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.AreaCode != nil { - data.Set("AreaCode", fmt.Sprint(*params.AreaCode)) -} - if params != nil && params.Contains != nil { - data.Set("Contains", *params.Contains) -} - if params != nil && params.SmsEnabled != nil { - data.Set("SmsEnabled", fmt.Sprint(*params.SmsEnabled)) -} - if params != nil && params.MmsEnabled != nil { - data.Set("MmsEnabled", fmt.Sprint(*params.MmsEnabled)) -} - if params != nil && params.VoiceEnabled != nil { - data.Set("VoiceEnabled", fmt.Sprint(*params.VoiceEnabled)) -} - if params != nil && params.ExcludeAllAddressRequired != nil { - data.Set("ExcludeAllAddressRequired", fmt.Sprint(*params.ExcludeAllAddressRequired)) -} - if params != nil && params.ExcludeLocalAddressRequired != nil { - data.Set("ExcludeLocalAddressRequired", fmt.Sprint(*params.ExcludeLocalAddressRequired)) -} - if params != nil && params.ExcludeForeignAddressRequired != nil { - data.Set("ExcludeForeignAddressRequired", fmt.Sprint(*params.ExcludeForeignAddressRequired)) -} - if params != nil && params.Beta != nil { - data.Set("Beta", fmt.Sprint(*params.Beta)) -} - if params != nil && params.NearNumber != nil { - data.Set("NearNumber", *params.NearNumber) -} - if params != nil && params.NearLatLong != nil { - data.Set("NearLatLong", *params.NearLatLong) -} - if params != nil && params.Distance != nil { - data.Set("Distance", fmt.Sprint(*params.Distance)) -} - if params != nil && params.InPostalCode != nil { - data.Set("InPostalCode", *params.InPostalCode) -} - if params != nil && params.InRegion != nil { - data.Set("InRegion", *params.InRegion) -} - if params != nil && params.InRateCenter != nil { - data.Set("InRateCenter", *params.InRateCenter) -} - if params != nil && params.InLata != nil { - data.Set("InLata", *params.InLata) -} - if params != nil && params.InLocality != nil { - data.Set("InLocality", *params.InLocality) -} - if params != nil && params.FaxEnabled != nil { - data.Set("FaxEnabled", fmt.Sprint(*params.FaxEnabled)) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.AreaCode != nil { + data.Set("AreaCode", fmt.Sprint(*params.AreaCode)) + } + if params != nil && params.Contains != nil { + data.Set("Contains", *params.Contains) + } + if params != nil && params.SmsEnabled != nil { + data.Set("SmsEnabled", fmt.Sprint(*params.SmsEnabled)) + } + if params != nil && params.MmsEnabled != nil { + data.Set("MmsEnabled", fmt.Sprint(*params.MmsEnabled)) + } + if params != nil && params.VoiceEnabled != nil { + data.Set("VoiceEnabled", fmt.Sprint(*params.VoiceEnabled)) + } + if params != nil && params.ExcludeAllAddressRequired != nil { + data.Set("ExcludeAllAddressRequired", fmt.Sprint(*params.ExcludeAllAddressRequired)) + } + if params != nil && params.ExcludeLocalAddressRequired != nil { + data.Set("ExcludeLocalAddressRequired", fmt.Sprint(*params.ExcludeLocalAddressRequired)) + } + if params != nil && params.ExcludeForeignAddressRequired != nil { + data.Set("ExcludeForeignAddressRequired", fmt.Sprint(*params.ExcludeForeignAddressRequired)) + } + if params != nil && params.Beta != nil { + data.Set("Beta", fmt.Sprint(*params.Beta)) + } + if params != nil && params.NearNumber != nil { + data.Set("NearNumber", *params.NearNumber) + } + if params != nil && params.NearLatLong != nil { + data.Set("NearLatLong", *params.NearLatLong) + } + if params != nil && params.Distance != nil { + data.Set("Distance", fmt.Sprint(*params.Distance)) + } + if params != nil && params.InPostalCode != nil { + data.Set("InPostalCode", *params.InPostalCode) + } + if params != nil && params.InRegion != nil { + data.Set("InRegion", *params.InRegion) + } + if params != nil && params.InRateCenter != nil { + data.Set("InRateCenter", *params.InRateCenter) + } + if params != nil && params.InLata != nil { + data.Set("InLata", *params.InLata) + } + if params != nil && params.InLocality != nil { + data.Set("InLocality", *params.InLocality) + } + if params != nil && params.FaxEnabled != nil { + data.Set("FaxEnabled", fmt.Sprint(*params.FaxEnabled)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListAvailablePhoneNumberLocalResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListAvailablePhoneNumberLocalResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListAvailablePhoneNumberMachineToMachineParams Optional parameters for the method 'ListAvailablePhoneNumberMachineToMachine' type ListAvailablePhoneNumberMachineToMachineParams struct { - AreaCode *int32 `json:"AreaCode,omitempty"` - Contains *string `json:"Contains,omitempty"` - SmsEnabled *bool `json:"SmsEnabled,omitempty"` - MmsEnabled *bool `json:"MmsEnabled,omitempty"` - VoiceEnabled *bool `json:"VoiceEnabled,omitempty"` - ExcludeAllAddressRequired *bool `json:"ExcludeAllAddressRequired,omitempty"` - ExcludeLocalAddressRequired *bool `json:"ExcludeLocalAddressRequired,omitempty"` - ExcludeForeignAddressRequired *bool `json:"ExcludeForeignAddressRequired,omitempty"` - Beta *bool `json:"Beta,omitempty"` - NearNumber *string `json:"NearNumber,omitempty"` - NearLatLong *string `json:"NearLatLong,omitempty"` - Distance *int32 `json:"Distance,omitempty"` - InPostalCode *string `json:"InPostalCode,omitempty"` - InRegion *string `json:"InRegion,omitempty"` - InRateCenter *string `json:"InRateCenter,omitempty"` - InLata *string `json:"InLata,omitempty"` - InLocality *string `json:"InLocality,omitempty"` - FaxEnabled *bool `json:"FaxEnabled,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + AreaCode *int32 `json:"AreaCode,omitempty"` + Contains *string `json:"Contains,omitempty"` + SmsEnabled *bool `json:"SmsEnabled,omitempty"` + MmsEnabled *bool `json:"MmsEnabled,omitempty"` + VoiceEnabled *bool `json:"VoiceEnabled,omitempty"` + ExcludeAllAddressRequired *bool `json:"ExcludeAllAddressRequired,omitempty"` + ExcludeLocalAddressRequired *bool `json:"ExcludeLocalAddressRequired,omitempty"` + ExcludeForeignAddressRequired *bool `json:"ExcludeForeignAddressRequired,omitempty"` + Beta *bool `json:"Beta,omitempty"` + NearNumber *string `json:"NearNumber,omitempty"` + NearLatLong *string `json:"NearLatLong,omitempty"` + Distance *int32 `json:"Distance,omitempty"` + InPostalCode *string `json:"InPostalCode,omitempty"` + InRegion *string `json:"InRegion,omitempty"` + InRateCenter *string `json:"InRateCenter,omitempty"` + InLata *string `json:"InLata,omitempty"` + InLocality *string `json:"InLocality,omitempty"` + FaxEnabled *bool `json:"FaxEnabled,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -5155,109 +5006,109 @@ type ListAvailablePhoneNumberMachineToMachineParams struct { * @param "FaxEnabled" (bool) - Whether the phone numbers can receive faxes. Can be: `true` or `false`. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListAvailablePhoneNumberMachineToMachineResponse -*/ + */ func (c *DefaultApiService) ListAvailablePhoneNumberMachineToMachine(AccountSid string, CountryCode string, params *ListAvailablePhoneNumberMachineToMachineParams) (*ListAvailablePhoneNumberMachineToMachineResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}/MachineToMachine.json" + path := "/2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}/MachineToMachine.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"CountryCode"+"}", CountryCode, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.AreaCode != nil { - data.Set("AreaCode", fmt.Sprint(*params.AreaCode)) -} - if params != nil && params.Contains != nil { - data.Set("Contains", *params.Contains) -} - if params != nil && params.SmsEnabled != nil { - data.Set("SmsEnabled", fmt.Sprint(*params.SmsEnabled)) -} - if params != nil && params.MmsEnabled != nil { - data.Set("MmsEnabled", fmt.Sprint(*params.MmsEnabled)) -} - if params != nil && params.VoiceEnabled != nil { - data.Set("VoiceEnabled", fmt.Sprint(*params.VoiceEnabled)) -} - if params != nil && params.ExcludeAllAddressRequired != nil { - data.Set("ExcludeAllAddressRequired", fmt.Sprint(*params.ExcludeAllAddressRequired)) -} - if params != nil && params.ExcludeLocalAddressRequired != nil { - data.Set("ExcludeLocalAddressRequired", fmt.Sprint(*params.ExcludeLocalAddressRequired)) -} - if params != nil && params.ExcludeForeignAddressRequired != nil { - data.Set("ExcludeForeignAddressRequired", fmt.Sprint(*params.ExcludeForeignAddressRequired)) -} - if params != nil && params.Beta != nil { - data.Set("Beta", fmt.Sprint(*params.Beta)) -} - if params != nil && params.NearNumber != nil { - data.Set("NearNumber", *params.NearNumber) -} - if params != nil && params.NearLatLong != nil { - data.Set("NearLatLong", *params.NearLatLong) -} - if params != nil && params.Distance != nil { - data.Set("Distance", fmt.Sprint(*params.Distance)) -} - if params != nil && params.InPostalCode != nil { - data.Set("InPostalCode", *params.InPostalCode) -} - if params != nil && params.InRegion != nil { - data.Set("InRegion", *params.InRegion) -} - if params != nil && params.InRateCenter != nil { - data.Set("InRateCenter", *params.InRateCenter) -} - if params != nil && params.InLata != nil { - data.Set("InLata", *params.InLata) -} - if params != nil && params.InLocality != nil { - data.Set("InLocality", *params.InLocality) -} - if params != nil && params.FaxEnabled != nil { - data.Set("FaxEnabled", fmt.Sprint(*params.FaxEnabled)) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.AreaCode != nil { + data.Set("AreaCode", fmt.Sprint(*params.AreaCode)) + } + if params != nil && params.Contains != nil { + data.Set("Contains", *params.Contains) + } + if params != nil && params.SmsEnabled != nil { + data.Set("SmsEnabled", fmt.Sprint(*params.SmsEnabled)) + } + if params != nil && params.MmsEnabled != nil { + data.Set("MmsEnabled", fmt.Sprint(*params.MmsEnabled)) + } + if params != nil && params.VoiceEnabled != nil { + data.Set("VoiceEnabled", fmt.Sprint(*params.VoiceEnabled)) + } + if params != nil && params.ExcludeAllAddressRequired != nil { + data.Set("ExcludeAllAddressRequired", fmt.Sprint(*params.ExcludeAllAddressRequired)) + } + if params != nil && params.ExcludeLocalAddressRequired != nil { + data.Set("ExcludeLocalAddressRequired", fmt.Sprint(*params.ExcludeLocalAddressRequired)) + } + if params != nil && params.ExcludeForeignAddressRequired != nil { + data.Set("ExcludeForeignAddressRequired", fmt.Sprint(*params.ExcludeForeignAddressRequired)) + } + if params != nil && params.Beta != nil { + data.Set("Beta", fmt.Sprint(*params.Beta)) + } + if params != nil && params.NearNumber != nil { + data.Set("NearNumber", *params.NearNumber) + } + if params != nil && params.NearLatLong != nil { + data.Set("NearLatLong", *params.NearLatLong) + } + if params != nil && params.Distance != nil { + data.Set("Distance", fmt.Sprint(*params.Distance)) + } + if params != nil && params.InPostalCode != nil { + data.Set("InPostalCode", *params.InPostalCode) + } + if params != nil && params.InRegion != nil { + data.Set("InRegion", *params.InRegion) + } + if params != nil && params.InRateCenter != nil { + data.Set("InRateCenter", *params.InRateCenter) + } + if params != nil && params.InLata != nil { + data.Set("InLata", *params.InLata) + } + if params != nil && params.InLocality != nil { + data.Set("InLocality", *params.InLocality) + } + if params != nil && params.FaxEnabled != nil { + data.Set("FaxEnabled", fmt.Sprint(*params.FaxEnabled)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListAvailablePhoneNumberMachineToMachineResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListAvailablePhoneNumberMachineToMachineResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListAvailablePhoneNumberMobileParams Optional parameters for the method 'ListAvailablePhoneNumberMobile' type ListAvailablePhoneNumberMobileParams struct { - AreaCode *int32 `json:"AreaCode,omitempty"` - Contains *string `json:"Contains,omitempty"` - SmsEnabled *bool `json:"SmsEnabled,omitempty"` - MmsEnabled *bool `json:"MmsEnabled,omitempty"` - VoiceEnabled *bool `json:"VoiceEnabled,omitempty"` - ExcludeAllAddressRequired *bool `json:"ExcludeAllAddressRequired,omitempty"` - ExcludeLocalAddressRequired *bool `json:"ExcludeLocalAddressRequired,omitempty"` - ExcludeForeignAddressRequired *bool `json:"ExcludeForeignAddressRequired,omitempty"` - Beta *bool `json:"Beta,omitempty"` - NearNumber *string `json:"NearNumber,omitempty"` - NearLatLong *string `json:"NearLatLong,omitempty"` - Distance *int32 `json:"Distance,omitempty"` - InPostalCode *string `json:"InPostalCode,omitempty"` - InRegion *string `json:"InRegion,omitempty"` - InRateCenter *string `json:"InRateCenter,omitempty"` - InLata *string `json:"InLata,omitempty"` - InLocality *string `json:"InLocality,omitempty"` - FaxEnabled *bool `json:"FaxEnabled,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + AreaCode *int32 `json:"AreaCode,omitempty"` + Contains *string `json:"Contains,omitempty"` + SmsEnabled *bool `json:"SmsEnabled,omitempty"` + MmsEnabled *bool `json:"MmsEnabled,omitempty"` + VoiceEnabled *bool `json:"VoiceEnabled,omitempty"` + ExcludeAllAddressRequired *bool `json:"ExcludeAllAddressRequired,omitempty"` + ExcludeLocalAddressRequired *bool `json:"ExcludeLocalAddressRequired,omitempty"` + ExcludeForeignAddressRequired *bool `json:"ExcludeForeignAddressRequired,omitempty"` + Beta *bool `json:"Beta,omitempty"` + NearNumber *string `json:"NearNumber,omitempty"` + NearLatLong *string `json:"NearLatLong,omitempty"` + Distance *int32 `json:"Distance,omitempty"` + InPostalCode *string `json:"InPostalCode,omitempty"` + InRegion *string `json:"InRegion,omitempty"` + InRateCenter *string `json:"InRateCenter,omitempty"` + InLata *string `json:"InLata,omitempty"` + InLocality *string `json:"InLocality,omitempty"` + FaxEnabled *bool `json:"FaxEnabled,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -5285,109 +5136,109 @@ type ListAvailablePhoneNumberMobileParams struct { * @param "FaxEnabled" (bool) - Whether the phone numbers can receive faxes. Can be: `true` or `false`. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListAvailablePhoneNumberMobileResponse -*/ + */ func (c *DefaultApiService) ListAvailablePhoneNumberMobile(AccountSid string, CountryCode string, params *ListAvailablePhoneNumberMobileParams) (*ListAvailablePhoneNumberMobileResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}/Mobile.json" + path := "/2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}/Mobile.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"CountryCode"+"}", CountryCode, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.AreaCode != nil { - data.Set("AreaCode", fmt.Sprint(*params.AreaCode)) -} - if params != nil && params.Contains != nil { - data.Set("Contains", *params.Contains) -} - if params != nil && params.SmsEnabled != nil { - data.Set("SmsEnabled", fmt.Sprint(*params.SmsEnabled)) -} - if params != nil && params.MmsEnabled != nil { - data.Set("MmsEnabled", fmt.Sprint(*params.MmsEnabled)) -} - if params != nil && params.VoiceEnabled != nil { - data.Set("VoiceEnabled", fmt.Sprint(*params.VoiceEnabled)) -} - if params != nil && params.ExcludeAllAddressRequired != nil { - data.Set("ExcludeAllAddressRequired", fmt.Sprint(*params.ExcludeAllAddressRequired)) -} - if params != nil && params.ExcludeLocalAddressRequired != nil { - data.Set("ExcludeLocalAddressRequired", fmt.Sprint(*params.ExcludeLocalAddressRequired)) -} - if params != nil && params.ExcludeForeignAddressRequired != nil { - data.Set("ExcludeForeignAddressRequired", fmt.Sprint(*params.ExcludeForeignAddressRequired)) -} - if params != nil && params.Beta != nil { - data.Set("Beta", fmt.Sprint(*params.Beta)) -} - if params != nil && params.NearNumber != nil { - data.Set("NearNumber", *params.NearNumber) -} - if params != nil && params.NearLatLong != nil { - data.Set("NearLatLong", *params.NearLatLong) -} - if params != nil && params.Distance != nil { - data.Set("Distance", fmt.Sprint(*params.Distance)) -} - if params != nil && params.InPostalCode != nil { - data.Set("InPostalCode", *params.InPostalCode) -} - if params != nil && params.InRegion != nil { - data.Set("InRegion", *params.InRegion) -} - if params != nil && params.InRateCenter != nil { - data.Set("InRateCenter", *params.InRateCenter) -} - if params != nil && params.InLata != nil { - data.Set("InLata", *params.InLata) -} - if params != nil && params.InLocality != nil { - data.Set("InLocality", *params.InLocality) -} - if params != nil && params.FaxEnabled != nil { - data.Set("FaxEnabled", fmt.Sprint(*params.FaxEnabled)) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.AreaCode != nil { + data.Set("AreaCode", fmt.Sprint(*params.AreaCode)) + } + if params != nil && params.Contains != nil { + data.Set("Contains", *params.Contains) + } + if params != nil && params.SmsEnabled != nil { + data.Set("SmsEnabled", fmt.Sprint(*params.SmsEnabled)) + } + if params != nil && params.MmsEnabled != nil { + data.Set("MmsEnabled", fmt.Sprint(*params.MmsEnabled)) + } + if params != nil && params.VoiceEnabled != nil { + data.Set("VoiceEnabled", fmt.Sprint(*params.VoiceEnabled)) + } + if params != nil && params.ExcludeAllAddressRequired != nil { + data.Set("ExcludeAllAddressRequired", fmt.Sprint(*params.ExcludeAllAddressRequired)) + } + if params != nil && params.ExcludeLocalAddressRequired != nil { + data.Set("ExcludeLocalAddressRequired", fmt.Sprint(*params.ExcludeLocalAddressRequired)) + } + if params != nil && params.ExcludeForeignAddressRequired != nil { + data.Set("ExcludeForeignAddressRequired", fmt.Sprint(*params.ExcludeForeignAddressRequired)) + } + if params != nil && params.Beta != nil { + data.Set("Beta", fmt.Sprint(*params.Beta)) + } + if params != nil && params.NearNumber != nil { + data.Set("NearNumber", *params.NearNumber) + } + if params != nil && params.NearLatLong != nil { + data.Set("NearLatLong", *params.NearLatLong) + } + if params != nil && params.Distance != nil { + data.Set("Distance", fmt.Sprint(*params.Distance)) + } + if params != nil && params.InPostalCode != nil { + data.Set("InPostalCode", *params.InPostalCode) + } + if params != nil && params.InRegion != nil { + data.Set("InRegion", *params.InRegion) + } + if params != nil && params.InRateCenter != nil { + data.Set("InRateCenter", *params.InRateCenter) + } + if params != nil && params.InLata != nil { + data.Set("InLata", *params.InLata) + } + if params != nil && params.InLocality != nil { + data.Set("InLocality", *params.InLocality) + } + if params != nil && params.FaxEnabled != nil { + data.Set("FaxEnabled", fmt.Sprint(*params.FaxEnabled)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListAvailablePhoneNumberMobileResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListAvailablePhoneNumberMobileResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListAvailablePhoneNumberNationalParams Optional parameters for the method 'ListAvailablePhoneNumberNational' type ListAvailablePhoneNumberNationalParams struct { - AreaCode *int32 `json:"AreaCode,omitempty"` - Contains *string `json:"Contains,omitempty"` - SmsEnabled *bool `json:"SmsEnabled,omitempty"` - MmsEnabled *bool `json:"MmsEnabled,omitempty"` - VoiceEnabled *bool `json:"VoiceEnabled,omitempty"` - ExcludeAllAddressRequired *bool `json:"ExcludeAllAddressRequired,omitempty"` - ExcludeLocalAddressRequired *bool `json:"ExcludeLocalAddressRequired,omitempty"` - ExcludeForeignAddressRequired *bool `json:"ExcludeForeignAddressRequired,omitempty"` - Beta *bool `json:"Beta,omitempty"` - NearNumber *string `json:"NearNumber,omitempty"` - NearLatLong *string `json:"NearLatLong,omitempty"` - Distance *int32 `json:"Distance,omitempty"` - InPostalCode *string `json:"InPostalCode,omitempty"` - InRegion *string `json:"InRegion,omitempty"` - InRateCenter *string `json:"InRateCenter,omitempty"` - InLata *string `json:"InLata,omitempty"` - InLocality *string `json:"InLocality,omitempty"` - FaxEnabled *bool `json:"FaxEnabled,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + AreaCode *int32 `json:"AreaCode,omitempty"` + Contains *string `json:"Contains,omitempty"` + SmsEnabled *bool `json:"SmsEnabled,omitempty"` + MmsEnabled *bool `json:"MmsEnabled,omitempty"` + VoiceEnabled *bool `json:"VoiceEnabled,omitempty"` + ExcludeAllAddressRequired *bool `json:"ExcludeAllAddressRequired,omitempty"` + ExcludeLocalAddressRequired *bool `json:"ExcludeLocalAddressRequired,omitempty"` + ExcludeForeignAddressRequired *bool `json:"ExcludeForeignAddressRequired,omitempty"` + Beta *bool `json:"Beta,omitempty"` + NearNumber *string `json:"NearNumber,omitempty"` + NearLatLong *string `json:"NearLatLong,omitempty"` + Distance *int32 `json:"Distance,omitempty"` + InPostalCode *string `json:"InPostalCode,omitempty"` + InRegion *string `json:"InRegion,omitempty"` + InRateCenter *string `json:"InRateCenter,omitempty"` + InLata *string `json:"InLata,omitempty"` + InLocality *string `json:"InLocality,omitempty"` + FaxEnabled *bool `json:"FaxEnabled,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -5415,109 +5266,109 @@ type ListAvailablePhoneNumberNationalParams struct { * @param "FaxEnabled" (bool) - Whether the phone numbers can receive faxes. Can be: `true` or `false`. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListAvailablePhoneNumberNationalResponse -*/ + */ func (c *DefaultApiService) ListAvailablePhoneNumberNational(AccountSid string, CountryCode string, params *ListAvailablePhoneNumberNationalParams) (*ListAvailablePhoneNumberNationalResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}/National.json" + path := "/2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}/National.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"CountryCode"+"}", CountryCode, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.AreaCode != nil { - data.Set("AreaCode", fmt.Sprint(*params.AreaCode)) -} - if params != nil && params.Contains != nil { - data.Set("Contains", *params.Contains) -} - if params != nil && params.SmsEnabled != nil { - data.Set("SmsEnabled", fmt.Sprint(*params.SmsEnabled)) -} - if params != nil && params.MmsEnabled != nil { - data.Set("MmsEnabled", fmt.Sprint(*params.MmsEnabled)) -} - if params != nil && params.VoiceEnabled != nil { - data.Set("VoiceEnabled", fmt.Sprint(*params.VoiceEnabled)) -} - if params != nil && params.ExcludeAllAddressRequired != nil { - data.Set("ExcludeAllAddressRequired", fmt.Sprint(*params.ExcludeAllAddressRequired)) -} - if params != nil && params.ExcludeLocalAddressRequired != nil { - data.Set("ExcludeLocalAddressRequired", fmt.Sprint(*params.ExcludeLocalAddressRequired)) -} - if params != nil && params.ExcludeForeignAddressRequired != nil { - data.Set("ExcludeForeignAddressRequired", fmt.Sprint(*params.ExcludeForeignAddressRequired)) -} - if params != nil && params.Beta != nil { - data.Set("Beta", fmt.Sprint(*params.Beta)) -} - if params != nil && params.NearNumber != nil { - data.Set("NearNumber", *params.NearNumber) -} - if params != nil && params.NearLatLong != nil { - data.Set("NearLatLong", *params.NearLatLong) -} - if params != nil && params.Distance != nil { - data.Set("Distance", fmt.Sprint(*params.Distance)) -} - if params != nil && params.InPostalCode != nil { - data.Set("InPostalCode", *params.InPostalCode) -} - if params != nil && params.InRegion != nil { - data.Set("InRegion", *params.InRegion) -} - if params != nil && params.InRateCenter != nil { - data.Set("InRateCenter", *params.InRateCenter) -} - if params != nil && params.InLata != nil { - data.Set("InLata", *params.InLata) -} - if params != nil && params.InLocality != nil { - data.Set("InLocality", *params.InLocality) -} - if params != nil && params.FaxEnabled != nil { - data.Set("FaxEnabled", fmt.Sprint(*params.FaxEnabled)) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.AreaCode != nil { + data.Set("AreaCode", fmt.Sprint(*params.AreaCode)) + } + if params != nil && params.Contains != nil { + data.Set("Contains", *params.Contains) + } + if params != nil && params.SmsEnabled != nil { + data.Set("SmsEnabled", fmt.Sprint(*params.SmsEnabled)) + } + if params != nil && params.MmsEnabled != nil { + data.Set("MmsEnabled", fmt.Sprint(*params.MmsEnabled)) + } + if params != nil && params.VoiceEnabled != nil { + data.Set("VoiceEnabled", fmt.Sprint(*params.VoiceEnabled)) + } + if params != nil && params.ExcludeAllAddressRequired != nil { + data.Set("ExcludeAllAddressRequired", fmt.Sprint(*params.ExcludeAllAddressRequired)) + } + if params != nil && params.ExcludeLocalAddressRequired != nil { + data.Set("ExcludeLocalAddressRequired", fmt.Sprint(*params.ExcludeLocalAddressRequired)) + } + if params != nil && params.ExcludeForeignAddressRequired != nil { + data.Set("ExcludeForeignAddressRequired", fmt.Sprint(*params.ExcludeForeignAddressRequired)) + } + if params != nil && params.Beta != nil { + data.Set("Beta", fmt.Sprint(*params.Beta)) + } + if params != nil && params.NearNumber != nil { + data.Set("NearNumber", *params.NearNumber) + } + if params != nil && params.NearLatLong != nil { + data.Set("NearLatLong", *params.NearLatLong) + } + if params != nil && params.Distance != nil { + data.Set("Distance", fmt.Sprint(*params.Distance)) + } + if params != nil && params.InPostalCode != nil { + data.Set("InPostalCode", *params.InPostalCode) + } + if params != nil && params.InRegion != nil { + data.Set("InRegion", *params.InRegion) + } + if params != nil && params.InRateCenter != nil { + data.Set("InRateCenter", *params.InRateCenter) + } + if params != nil && params.InLata != nil { + data.Set("InLata", *params.InLata) + } + if params != nil && params.InLocality != nil { + data.Set("InLocality", *params.InLocality) + } + if params != nil && params.FaxEnabled != nil { + data.Set("FaxEnabled", fmt.Sprint(*params.FaxEnabled)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListAvailablePhoneNumberNationalResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListAvailablePhoneNumberNationalResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListAvailablePhoneNumberSharedCostParams Optional parameters for the method 'ListAvailablePhoneNumberSharedCost' type ListAvailablePhoneNumberSharedCostParams struct { - AreaCode *int32 `json:"AreaCode,omitempty"` - Contains *string `json:"Contains,omitempty"` - SmsEnabled *bool `json:"SmsEnabled,omitempty"` - MmsEnabled *bool `json:"MmsEnabled,omitempty"` - VoiceEnabled *bool `json:"VoiceEnabled,omitempty"` - ExcludeAllAddressRequired *bool `json:"ExcludeAllAddressRequired,omitempty"` - ExcludeLocalAddressRequired *bool `json:"ExcludeLocalAddressRequired,omitempty"` - ExcludeForeignAddressRequired *bool `json:"ExcludeForeignAddressRequired,omitempty"` - Beta *bool `json:"Beta,omitempty"` - NearNumber *string `json:"NearNumber,omitempty"` - NearLatLong *string `json:"NearLatLong,omitempty"` - Distance *int32 `json:"Distance,omitempty"` - InPostalCode *string `json:"InPostalCode,omitempty"` - InRegion *string `json:"InRegion,omitempty"` - InRateCenter *string `json:"InRateCenter,omitempty"` - InLata *string `json:"InLata,omitempty"` - InLocality *string `json:"InLocality,omitempty"` - FaxEnabled *bool `json:"FaxEnabled,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + AreaCode *int32 `json:"AreaCode,omitempty"` + Contains *string `json:"Contains,omitempty"` + SmsEnabled *bool `json:"SmsEnabled,omitempty"` + MmsEnabled *bool `json:"MmsEnabled,omitempty"` + VoiceEnabled *bool `json:"VoiceEnabled,omitempty"` + ExcludeAllAddressRequired *bool `json:"ExcludeAllAddressRequired,omitempty"` + ExcludeLocalAddressRequired *bool `json:"ExcludeLocalAddressRequired,omitempty"` + ExcludeForeignAddressRequired *bool `json:"ExcludeForeignAddressRequired,omitempty"` + Beta *bool `json:"Beta,omitempty"` + NearNumber *string `json:"NearNumber,omitempty"` + NearLatLong *string `json:"NearLatLong,omitempty"` + Distance *int32 `json:"Distance,omitempty"` + InPostalCode *string `json:"InPostalCode,omitempty"` + InRegion *string `json:"InRegion,omitempty"` + InRateCenter *string `json:"InRateCenter,omitempty"` + InLata *string `json:"InLata,omitempty"` + InLocality *string `json:"InLocality,omitempty"` + FaxEnabled *bool `json:"FaxEnabled,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -5545,109 +5396,109 @@ type ListAvailablePhoneNumberSharedCostParams struct { * @param "FaxEnabled" (bool) - Whether the phone numbers can receive faxes. Can be: `true` or `false`. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListAvailablePhoneNumberSharedCostResponse -*/ + */ func (c *DefaultApiService) ListAvailablePhoneNumberSharedCost(AccountSid string, CountryCode string, params *ListAvailablePhoneNumberSharedCostParams) (*ListAvailablePhoneNumberSharedCostResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}/SharedCost.json" + path := "/2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}/SharedCost.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"CountryCode"+"}", CountryCode, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.AreaCode != nil { - data.Set("AreaCode", fmt.Sprint(*params.AreaCode)) -} - if params != nil && params.Contains != nil { - data.Set("Contains", *params.Contains) -} - if params != nil && params.SmsEnabled != nil { - data.Set("SmsEnabled", fmt.Sprint(*params.SmsEnabled)) -} - if params != nil && params.MmsEnabled != nil { - data.Set("MmsEnabled", fmt.Sprint(*params.MmsEnabled)) -} - if params != nil && params.VoiceEnabled != nil { - data.Set("VoiceEnabled", fmt.Sprint(*params.VoiceEnabled)) -} - if params != nil && params.ExcludeAllAddressRequired != nil { - data.Set("ExcludeAllAddressRequired", fmt.Sprint(*params.ExcludeAllAddressRequired)) -} - if params != nil && params.ExcludeLocalAddressRequired != nil { - data.Set("ExcludeLocalAddressRequired", fmt.Sprint(*params.ExcludeLocalAddressRequired)) -} - if params != nil && params.ExcludeForeignAddressRequired != nil { - data.Set("ExcludeForeignAddressRequired", fmt.Sprint(*params.ExcludeForeignAddressRequired)) -} - if params != nil && params.Beta != nil { - data.Set("Beta", fmt.Sprint(*params.Beta)) -} - if params != nil && params.NearNumber != nil { - data.Set("NearNumber", *params.NearNumber) -} - if params != nil && params.NearLatLong != nil { - data.Set("NearLatLong", *params.NearLatLong) -} - if params != nil && params.Distance != nil { - data.Set("Distance", fmt.Sprint(*params.Distance)) -} - if params != nil && params.InPostalCode != nil { - data.Set("InPostalCode", *params.InPostalCode) -} - if params != nil && params.InRegion != nil { - data.Set("InRegion", *params.InRegion) -} - if params != nil && params.InRateCenter != nil { - data.Set("InRateCenter", *params.InRateCenter) -} - if params != nil && params.InLata != nil { - data.Set("InLata", *params.InLata) -} - if params != nil && params.InLocality != nil { - data.Set("InLocality", *params.InLocality) -} - if params != nil && params.FaxEnabled != nil { - data.Set("FaxEnabled", fmt.Sprint(*params.FaxEnabled)) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.AreaCode != nil { + data.Set("AreaCode", fmt.Sprint(*params.AreaCode)) + } + if params != nil && params.Contains != nil { + data.Set("Contains", *params.Contains) + } + if params != nil && params.SmsEnabled != nil { + data.Set("SmsEnabled", fmt.Sprint(*params.SmsEnabled)) + } + if params != nil && params.MmsEnabled != nil { + data.Set("MmsEnabled", fmt.Sprint(*params.MmsEnabled)) + } + if params != nil && params.VoiceEnabled != nil { + data.Set("VoiceEnabled", fmt.Sprint(*params.VoiceEnabled)) + } + if params != nil && params.ExcludeAllAddressRequired != nil { + data.Set("ExcludeAllAddressRequired", fmt.Sprint(*params.ExcludeAllAddressRequired)) + } + if params != nil && params.ExcludeLocalAddressRequired != nil { + data.Set("ExcludeLocalAddressRequired", fmt.Sprint(*params.ExcludeLocalAddressRequired)) + } + if params != nil && params.ExcludeForeignAddressRequired != nil { + data.Set("ExcludeForeignAddressRequired", fmt.Sprint(*params.ExcludeForeignAddressRequired)) + } + if params != nil && params.Beta != nil { + data.Set("Beta", fmt.Sprint(*params.Beta)) + } + if params != nil && params.NearNumber != nil { + data.Set("NearNumber", *params.NearNumber) + } + if params != nil && params.NearLatLong != nil { + data.Set("NearLatLong", *params.NearLatLong) + } + if params != nil && params.Distance != nil { + data.Set("Distance", fmt.Sprint(*params.Distance)) + } + if params != nil && params.InPostalCode != nil { + data.Set("InPostalCode", *params.InPostalCode) + } + if params != nil && params.InRegion != nil { + data.Set("InRegion", *params.InRegion) + } + if params != nil && params.InRateCenter != nil { + data.Set("InRateCenter", *params.InRateCenter) + } + if params != nil && params.InLata != nil { + data.Set("InLata", *params.InLata) + } + if params != nil && params.InLocality != nil { + data.Set("InLocality", *params.InLocality) + } + if params != nil && params.FaxEnabled != nil { + data.Set("FaxEnabled", fmt.Sprint(*params.FaxEnabled)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListAvailablePhoneNumberSharedCostResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListAvailablePhoneNumberSharedCostResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListAvailablePhoneNumberTollFreeParams Optional parameters for the method 'ListAvailablePhoneNumberTollFree' type ListAvailablePhoneNumberTollFreeParams struct { - AreaCode *int32 `json:"AreaCode,omitempty"` - Contains *string `json:"Contains,omitempty"` - SmsEnabled *bool `json:"SmsEnabled,omitempty"` - MmsEnabled *bool `json:"MmsEnabled,omitempty"` - VoiceEnabled *bool `json:"VoiceEnabled,omitempty"` - ExcludeAllAddressRequired *bool `json:"ExcludeAllAddressRequired,omitempty"` - ExcludeLocalAddressRequired *bool `json:"ExcludeLocalAddressRequired,omitempty"` - ExcludeForeignAddressRequired *bool `json:"ExcludeForeignAddressRequired,omitempty"` - Beta *bool `json:"Beta,omitempty"` - NearNumber *string `json:"NearNumber,omitempty"` - NearLatLong *string `json:"NearLatLong,omitempty"` - Distance *int32 `json:"Distance,omitempty"` - InPostalCode *string `json:"InPostalCode,omitempty"` - InRegion *string `json:"InRegion,omitempty"` - InRateCenter *string `json:"InRateCenter,omitempty"` - InLata *string `json:"InLata,omitempty"` - InLocality *string `json:"InLocality,omitempty"` - FaxEnabled *bool `json:"FaxEnabled,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + AreaCode *int32 `json:"AreaCode,omitempty"` + Contains *string `json:"Contains,omitempty"` + SmsEnabled *bool `json:"SmsEnabled,omitempty"` + MmsEnabled *bool `json:"MmsEnabled,omitempty"` + VoiceEnabled *bool `json:"VoiceEnabled,omitempty"` + ExcludeAllAddressRequired *bool `json:"ExcludeAllAddressRequired,omitempty"` + ExcludeLocalAddressRequired *bool `json:"ExcludeLocalAddressRequired,omitempty"` + ExcludeForeignAddressRequired *bool `json:"ExcludeForeignAddressRequired,omitempty"` + Beta *bool `json:"Beta,omitempty"` + NearNumber *string `json:"NearNumber,omitempty"` + NearLatLong *string `json:"NearLatLong,omitempty"` + Distance *int32 `json:"Distance,omitempty"` + InPostalCode *string `json:"InPostalCode,omitempty"` + InRegion *string `json:"InRegion,omitempty"` + InRateCenter *string `json:"InRateCenter,omitempty"` + InLata *string `json:"InLata,omitempty"` + InLocality *string `json:"InLocality,omitempty"` + FaxEnabled *bool `json:"FaxEnabled,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -5675,109 +5526,109 @@ type ListAvailablePhoneNumberTollFreeParams struct { * @param "FaxEnabled" (bool) - Whether the phone numbers can receive faxes. Can be: `true` or `false`. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListAvailablePhoneNumberTollFreeResponse -*/ + */ func (c *DefaultApiService) ListAvailablePhoneNumberTollFree(AccountSid string, CountryCode string, params *ListAvailablePhoneNumberTollFreeParams) (*ListAvailablePhoneNumberTollFreeResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}/TollFree.json" + path := "/2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}/TollFree.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"CountryCode"+"}", CountryCode, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.AreaCode != nil { - data.Set("AreaCode", fmt.Sprint(*params.AreaCode)) -} - if params != nil && params.Contains != nil { - data.Set("Contains", *params.Contains) -} - if params != nil && params.SmsEnabled != nil { - data.Set("SmsEnabled", fmt.Sprint(*params.SmsEnabled)) -} - if params != nil && params.MmsEnabled != nil { - data.Set("MmsEnabled", fmt.Sprint(*params.MmsEnabled)) -} - if params != nil && params.VoiceEnabled != nil { - data.Set("VoiceEnabled", fmt.Sprint(*params.VoiceEnabled)) -} - if params != nil && params.ExcludeAllAddressRequired != nil { - data.Set("ExcludeAllAddressRequired", fmt.Sprint(*params.ExcludeAllAddressRequired)) -} - if params != nil && params.ExcludeLocalAddressRequired != nil { - data.Set("ExcludeLocalAddressRequired", fmt.Sprint(*params.ExcludeLocalAddressRequired)) -} - if params != nil && params.ExcludeForeignAddressRequired != nil { - data.Set("ExcludeForeignAddressRequired", fmt.Sprint(*params.ExcludeForeignAddressRequired)) -} - if params != nil && params.Beta != nil { - data.Set("Beta", fmt.Sprint(*params.Beta)) -} - if params != nil && params.NearNumber != nil { - data.Set("NearNumber", *params.NearNumber) -} - if params != nil && params.NearLatLong != nil { - data.Set("NearLatLong", *params.NearLatLong) -} - if params != nil && params.Distance != nil { - data.Set("Distance", fmt.Sprint(*params.Distance)) -} - if params != nil && params.InPostalCode != nil { - data.Set("InPostalCode", *params.InPostalCode) -} - if params != nil && params.InRegion != nil { - data.Set("InRegion", *params.InRegion) -} - if params != nil && params.InRateCenter != nil { - data.Set("InRateCenter", *params.InRateCenter) -} - if params != nil && params.InLata != nil { - data.Set("InLata", *params.InLata) -} - if params != nil && params.InLocality != nil { - data.Set("InLocality", *params.InLocality) -} - if params != nil && params.FaxEnabled != nil { - data.Set("FaxEnabled", fmt.Sprint(*params.FaxEnabled)) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.AreaCode != nil { + data.Set("AreaCode", fmt.Sprint(*params.AreaCode)) + } + if params != nil && params.Contains != nil { + data.Set("Contains", *params.Contains) + } + if params != nil && params.SmsEnabled != nil { + data.Set("SmsEnabled", fmt.Sprint(*params.SmsEnabled)) + } + if params != nil && params.MmsEnabled != nil { + data.Set("MmsEnabled", fmt.Sprint(*params.MmsEnabled)) + } + if params != nil && params.VoiceEnabled != nil { + data.Set("VoiceEnabled", fmt.Sprint(*params.VoiceEnabled)) + } + if params != nil && params.ExcludeAllAddressRequired != nil { + data.Set("ExcludeAllAddressRequired", fmt.Sprint(*params.ExcludeAllAddressRequired)) + } + if params != nil && params.ExcludeLocalAddressRequired != nil { + data.Set("ExcludeLocalAddressRequired", fmt.Sprint(*params.ExcludeLocalAddressRequired)) + } + if params != nil && params.ExcludeForeignAddressRequired != nil { + data.Set("ExcludeForeignAddressRequired", fmt.Sprint(*params.ExcludeForeignAddressRequired)) + } + if params != nil && params.Beta != nil { + data.Set("Beta", fmt.Sprint(*params.Beta)) + } + if params != nil && params.NearNumber != nil { + data.Set("NearNumber", *params.NearNumber) + } + if params != nil && params.NearLatLong != nil { + data.Set("NearLatLong", *params.NearLatLong) + } + if params != nil && params.Distance != nil { + data.Set("Distance", fmt.Sprint(*params.Distance)) + } + if params != nil && params.InPostalCode != nil { + data.Set("InPostalCode", *params.InPostalCode) + } + if params != nil && params.InRegion != nil { + data.Set("InRegion", *params.InRegion) + } + if params != nil && params.InRateCenter != nil { + data.Set("InRateCenter", *params.InRateCenter) + } + if params != nil && params.InLata != nil { + data.Set("InLata", *params.InLata) + } + if params != nil && params.InLocality != nil { + data.Set("InLocality", *params.InLocality) + } + if params != nil && params.FaxEnabled != nil { + data.Set("FaxEnabled", fmt.Sprint(*params.FaxEnabled)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListAvailablePhoneNumberTollFreeResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListAvailablePhoneNumberTollFreeResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListAvailablePhoneNumberVoipParams Optional parameters for the method 'ListAvailablePhoneNumberVoip' type ListAvailablePhoneNumberVoipParams struct { - AreaCode *int32 `json:"AreaCode,omitempty"` - Contains *string `json:"Contains,omitempty"` - SmsEnabled *bool `json:"SmsEnabled,omitempty"` - MmsEnabled *bool `json:"MmsEnabled,omitempty"` - VoiceEnabled *bool `json:"VoiceEnabled,omitempty"` - ExcludeAllAddressRequired *bool `json:"ExcludeAllAddressRequired,omitempty"` - ExcludeLocalAddressRequired *bool `json:"ExcludeLocalAddressRequired,omitempty"` - ExcludeForeignAddressRequired *bool `json:"ExcludeForeignAddressRequired,omitempty"` - Beta *bool `json:"Beta,omitempty"` - NearNumber *string `json:"NearNumber,omitempty"` - NearLatLong *string `json:"NearLatLong,omitempty"` - Distance *int32 `json:"Distance,omitempty"` - InPostalCode *string `json:"InPostalCode,omitempty"` - InRegion *string `json:"InRegion,omitempty"` - InRateCenter *string `json:"InRateCenter,omitempty"` - InLata *string `json:"InLata,omitempty"` - InLocality *string `json:"InLocality,omitempty"` - FaxEnabled *bool `json:"FaxEnabled,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + AreaCode *int32 `json:"AreaCode,omitempty"` + Contains *string `json:"Contains,omitempty"` + SmsEnabled *bool `json:"SmsEnabled,omitempty"` + MmsEnabled *bool `json:"MmsEnabled,omitempty"` + VoiceEnabled *bool `json:"VoiceEnabled,omitempty"` + ExcludeAllAddressRequired *bool `json:"ExcludeAllAddressRequired,omitempty"` + ExcludeLocalAddressRequired *bool `json:"ExcludeLocalAddressRequired,omitempty"` + ExcludeForeignAddressRequired *bool `json:"ExcludeForeignAddressRequired,omitempty"` + Beta *bool `json:"Beta,omitempty"` + NearNumber *string `json:"NearNumber,omitempty"` + NearLatLong *string `json:"NearLatLong,omitempty"` + Distance *int32 `json:"Distance,omitempty"` + InPostalCode *string `json:"InPostalCode,omitempty"` + InRegion *string `json:"InRegion,omitempty"` + InRateCenter *string `json:"InRateCenter,omitempty"` + InLata *string `json:"InLata,omitempty"` + InLocality *string `json:"InLocality,omitempty"` + FaxEnabled *bool `json:"FaxEnabled,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -5805,101 +5656,101 @@ type ListAvailablePhoneNumberVoipParams struct { * @param "FaxEnabled" (bool) - Whether the phone numbers can receive faxes. Can be: `true` or `false`. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListAvailablePhoneNumberVoipResponse -*/ + */ func (c *DefaultApiService) ListAvailablePhoneNumberVoip(AccountSid string, CountryCode string, params *ListAvailablePhoneNumberVoipParams) (*ListAvailablePhoneNumberVoipResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}/Voip.json" + path := "/2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}/Voip.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"CountryCode"+"}", CountryCode, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.AreaCode != nil { - data.Set("AreaCode", fmt.Sprint(*params.AreaCode)) -} - if params != nil && params.Contains != nil { - data.Set("Contains", *params.Contains) -} - if params != nil && params.SmsEnabled != nil { - data.Set("SmsEnabled", fmt.Sprint(*params.SmsEnabled)) -} - if params != nil && params.MmsEnabled != nil { - data.Set("MmsEnabled", fmt.Sprint(*params.MmsEnabled)) -} - if params != nil && params.VoiceEnabled != nil { - data.Set("VoiceEnabled", fmt.Sprint(*params.VoiceEnabled)) -} - if params != nil && params.ExcludeAllAddressRequired != nil { - data.Set("ExcludeAllAddressRequired", fmt.Sprint(*params.ExcludeAllAddressRequired)) -} - if params != nil && params.ExcludeLocalAddressRequired != nil { - data.Set("ExcludeLocalAddressRequired", fmt.Sprint(*params.ExcludeLocalAddressRequired)) -} - if params != nil && params.ExcludeForeignAddressRequired != nil { - data.Set("ExcludeForeignAddressRequired", fmt.Sprint(*params.ExcludeForeignAddressRequired)) -} - if params != nil && params.Beta != nil { - data.Set("Beta", fmt.Sprint(*params.Beta)) -} - if params != nil && params.NearNumber != nil { - data.Set("NearNumber", *params.NearNumber) -} - if params != nil && params.NearLatLong != nil { - data.Set("NearLatLong", *params.NearLatLong) -} - if params != nil && params.Distance != nil { - data.Set("Distance", fmt.Sprint(*params.Distance)) -} - if params != nil && params.InPostalCode != nil { - data.Set("InPostalCode", *params.InPostalCode) -} - if params != nil && params.InRegion != nil { - data.Set("InRegion", *params.InRegion) -} - if params != nil && params.InRateCenter != nil { - data.Set("InRateCenter", *params.InRateCenter) -} - if params != nil && params.InLata != nil { - data.Set("InLata", *params.InLata) -} - if params != nil && params.InLocality != nil { - data.Set("InLocality", *params.InLocality) -} - if params != nil && params.FaxEnabled != nil { - data.Set("FaxEnabled", fmt.Sprint(*params.FaxEnabled)) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.AreaCode != nil { + data.Set("AreaCode", fmt.Sprint(*params.AreaCode)) + } + if params != nil && params.Contains != nil { + data.Set("Contains", *params.Contains) + } + if params != nil && params.SmsEnabled != nil { + data.Set("SmsEnabled", fmt.Sprint(*params.SmsEnabled)) + } + if params != nil && params.MmsEnabled != nil { + data.Set("MmsEnabled", fmt.Sprint(*params.MmsEnabled)) + } + if params != nil && params.VoiceEnabled != nil { + data.Set("VoiceEnabled", fmt.Sprint(*params.VoiceEnabled)) + } + if params != nil && params.ExcludeAllAddressRequired != nil { + data.Set("ExcludeAllAddressRequired", fmt.Sprint(*params.ExcludeAllAddressRequired)) + } + if params != nil && params.ExcludeLocalAddressRequired != nil { + data.Set("ExcludeLocalAddressRequired", fmt.Sprint(*params.ExcludeLocalAddressRequired)) + } + if params != nil && params.ExcludeForeignAddressRequired != nil { + data.Set("ExcludeForeignAddressRequired", fmt.Sprint(*params.ExcludeForeignAddressRequired)) + } + if params != nil && params.Beta != nil { + data.Set("Beta", fmt.Sprint(*params.Beta)) + } + if params != nil && params.NearNumber != nil { + data.Set("NearNumber", *params.NearNumber) + } + if params != nil && params.NearLatLong != nil { + data.Set("NearLatLong", *params.NearLatLong) + } + if params != nil && params.Distance != nil { + data.Set("Distance", fmt.Sprint(*params.Distance)) + } + if params != nil && params.InPostalCode != nil { + data.Set("InPostalCode", *params.InPostalCode) + } + if params != nil && params.InRegion != nil { + data.Set("InRegion", *params.InRegion) + } + if params != nil && params.InRateCenter != nil { + data.Set("InRateCenter", *params.InRateCenter) + } + if params != nil && params.InLata != nil { + data.Set("InLata", *params.InLata) + } + if params != nil && params.InLocality != nil { + data.Set("InLocality", *params.InLocality) + } + if params != nil && params.FaxEnabled != nil { + data.Set("FaxEnabled", fmt.Sprint(*params.FaxEnabled)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListAvailablePhoneNumberVoipResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListAvailablePhoneNumberVoipResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListCallParams Optional parameters for the method 'ListCall' type ListCallParams struct { - To *string `json:"To,omitempty"` - From *string `json:"From,omitempty"` - ParentCallSid *string `json:"ParentCallSid,omitempty"` - Status *string `json:"Status,omitempty"` - StartTime *time.Time `json:"StartTime,omitempty"` + To *string `json:"To,omitempty"` + From *string `json:"From,omitempty"` + ParentCallSid *string `json:"ParentCallSid,omitempty"` + Status *string `json:"Status,omitempty"` + StartTime *time.Time `json:"StartTime,omitempty"` StartTimeBefore *time.Time `json:"StartTime<,omitempty"` - StartTimeAfter *time.Time `json:"StartTime>,omitempty"` - EndTime *time.Time `json:"EndTime,omitempty"` - EndTimeBefore *time.Time `json:"EndTime<,omitempty"` - EndTimeAfter *time.Time `json:"EndTime>,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + StartTimeAfter *time.Time `json:"StartTime>,omitempty"` + EndTime *time.Time `json:"EndTime,omitempty"` + EndTimeBefore *time.Time `json:"EndTime<,omitempty"` + EndTimeAfter *time.Time `json:"EndTime>,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -5919,63 +5770,63 @@ type ListCallParams struct { * @param "EndTimeAfter" (time.Time) - Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListCallResponse -*/ + */ func (c *DefaultApiService) ListCall(AccountSid string, params *ListCallParams) (*ListCallResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Calls.json" + path := "/2010-04-01/Accounts/{AccountSid}/Calls.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.To != nil { - data.Set("To", *params.To) -} - if params != nil && params.From != nil { - data.Set("From", *params.From) -} - if params != nil && params.ParentCallSid != nil { - data.Set("ParentCallSid", *params.ParentCallSid) -} - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) -} - if params != nil && params.StartTime != nil { - data.Set("StartTime", fmt.Sprint(*params.StartTime)) -} - if params != nil && params.StartTimeBefore != nil { - data.Set("StartTimeBefore", fmt.Sprint(*params.StartTimeBefore)) -} - if params != nil && params.StartTimeAfter != nil { - data.Set("StartTimeAfter", fmt.Sprint(*params.StartTimeAfter)) -} - if params != nil && params.EndTime != nil { - data.Set("EndTime", fmt.Sprint(*params.EndTime)) -} - if params != nil && params.EndTimeBefore != nil { - data.Set("EndTimeBefore", fmt.Sprint(*params.EndTimeBefore)) -} - if params != nil && params.EndTimeAfter != nil { - data.Set("EndTimeAfter", fmt.Sprint(*params.EndTimeAfter)) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.To != nil { + data.Set("To", *params.To) + } + if params != nil && params.From != nil { + data.Set("From", *params.From) + } + if params != nil && params.ParentCallSid != nil { + data.Set("ParentCallSid", *params.ParentCallSid) + } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + if params != nil && params.StartTime != nil { + data.Set("StartTime", fmt.Sprint(*params.StartTime)) + } + if params != nil && params.StartTimeBefore != nil { + data.Set("StartTimeBefore", fmt.Sprint(*params.StartTimeBefore)) + } + if params != nil && params.StartTimeAfter != nil { + data.Set("StartTimeAfter", fmt.Sprint(*params.StartTimeAfter)) + } + if params != nil && params.EndTime != nil { + data.Set("EndTime", fmt.Sprint(*params.EndTime)) + } + if params != nil && params.EndTimeBefore != nil { + data.Set("EndTimeBefore", fmt.Sprint(*params.EndTimeBefore)) + } + if params != nil && params.EndTimeAfter != nil { + data.Set("EndTimeAfter", fmt.Sprint(*params.EndTimeAfter)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListCallResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListCallResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListCallEventParams Optional parameters for the method 'ListCallEvent' type ListCallEventParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -5989,41 +5840,41 @@ type ListCallEventParams struct { * @param optional nil or *ListCallEventParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListCallEventResponse -*/ + */ func (c *DefaultApiService) ListCallEvent(AccountSid string, CallSid string, params *ListCallEventParams) (*ListCallEventResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Events.json" + path := "/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Events.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListCallEventResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListCallEventResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListCallNotificationParams Optional parameters for the method 'ListCallNotification' type ListCallNotificationParams struct { - Log *int32 `json:"Log,omitempty"` - MessageDate *time.Time `json:"MessageDate,omitempty"` + Log *int32 `json:"Log,omitempty"` + MessageDate *time.Time `json:"MessageDate,omitempty"` MessageDateBefore *time.Time `json:"MessageDate<,omitempty"` - MessageDateAfter *time.Time `json:"MessageDate>,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + MessageDateAfter *time.Time `json:"MessageDate>,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -6037,52 +5888,52 @@ type ListCallNotificationParams struct { * @param "MessageDateAfter" (time.Time) - Only show notifications for the specified date, formatted as `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for messages logged at or after midnight on a date. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListCallNotificationResponse -*/ + */ func (c *DefaultApiService) ListCallNotification(AccountSid string, CallSid string, params *ListCallNotificationParams) (*ListCallNotificationResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Notifications.json" + path := "/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Notifications.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Log != nil { - data.Set("Log", fmt.Sprint(*params.Log)) -} - if params != nil && params.MessageDate != nil { - data.Set("MessageDate", fmt.Sprint(*params.MessageDate)) -} - if params != nil && params.MessageDateBefore != nil { - data.Set("MessageDateBefore", fmt.Sprint(*params.MessageDateBefore)) -} - if params != nil && params.MessageDateAfter != nil { - data.Set("MessageDateAfter", fmt.Sprint(*params.MessageDateAfter)) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.Log != nil { + data.Set("Log", fmt.Sprint(*params.Log)) + } + if params != nil && params.MessageDate != nil { + data.Set("MessageDate", fmt.Sprint(*params.MessageDate)) + } + if params != nil && params.MessageDateBefore != nil { + data.Set("MessageDateBefore", fmt.Sprint(*params.MessageDateBefore)) + } + if params != nil && params.MessageDateAfter != nil { + data.Set("MessageDateAfter", fmt.Sprint(*params.MessageDateAfter)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListCallNotificationResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListCallNotificationResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListCallRecordingParams Optional parameters for the method 'ListCallRecording' type ListCallRecordingParams struct { - DateCreated *time.Time `json:"DateCreated,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` DateCreatedBefore *time.Time `json:"DateCreated<,omitempty"` - DateCreatedAfter *time.Time `json:"DateCreated>,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + DateCreatedAfter *time.Time `json:"DateCreated>,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -6096,54 +5947,54 @@ type ListCallRecordingParams struct { * @param "DateCreatedAfter" (time.Time) - The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` will return recordings generated at or before midnight on a given date, and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight on a date. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListCallRecordingResponse -*/ + */ func (c *DefaultApiService) ListCallRecording(AccountSid string, CallSid string, params *ListCallRecordingParams) (*ListCallRecordingResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Recordings.json" + path := "/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Recordings.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.DateCreated != nil { - data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) -} - if params != nil && params.DateCreatedBefore != nil { - data.Set("DateCreatedBefore", fmt.Sprint(*params.DateCreatedBefore)) -} - if params != nil && params.DateCreatedAfter != nil { - data.Set("DateCreatedAfter", fmt.Sprint(*params.DateCreatedAfter)) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) + } + if params != nil && params.DateCreatedBefore != nil { + data.Set("DateCreatedBefore", fmt.Sprint(*params.DateCreatedBefore)) + } + if params != nil && params.DateCreatedAfter != nil { + data.Set("DateCreatedAfter", fmt.Sprint(*params.DateCreatedAfter)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListCallRecordingResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListCallRecordingResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListConferenceParams Optional parameters for the method 'ListConference' type ListConferenceParams struct { - DateCreated *time.Time `json:"DateCreated,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` DateCreatedBefore *time.Time `json:"DateCreated<,omitempty"` - DateCreatedAfter *time.Time `json:"DateCreated>,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` + DateCreatedAfter *time.Time `json:"DateCreated>,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` DateUpdatedBefore *time.Time `json:"DateUpdated<,omitempty"` - DateUpdatedAfter *time.Time `json:"DateUpdated>,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Status *string `json:"Status,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + DateUpdatedAfter *time.Time `json:"DateUpdated>,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Status *string `json:"Status,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -6161,63 +6012,63 @@ type ListConferenceParams struct { * @param "Status" (string) - The status of the resources to read. Can be: `init`, `in-progress`, or `completed`. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListConferenceResponse -*/ + */ func (c *DefaultApiService) ListConference(AccountSid string, params *ListConferenceParams) (*ListConferenceResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Conferences.json" + path := "/2010-04-01/Accounts/{AccountSid}/Conferences.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.DateCreated != nil { - data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) -} - if params != nil && params.DateCreatedBefore != nil { - data.Set("DateCreatedBefore", fmt.Sprint(*params.DateCreatedBefore)) -} - if params != nil && params.DateCreatedAfter != nil { - data.Set("DateCreatedAfter", fmt.Sprint(*params.DateCreatedAfter)) -} - if params != nil && params.DateUpdated != nil { - data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) -} - if params != nil && params.DateUpdatedBefore != nil { - data.Set("DateUpdatedBefore", fmt.Sprint(*params.DateUpdatedBefore)) -} - if params != nil && params.DateUpdatedAfter != nil { - data.Set("DateUpdatedAfter", fmt.Sprint(*params.DateUpdatedAfter)) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) + } + if params != nil && params.DateCreatedBefore != nil { + data.Set("DateCreatedBefore", fmt.Sprint(*params.DateCreatedBefore)) + } + if params != nil && params.DateCreatedAfter != nil { + data.Set("DateCreatedAfter", fmt.Sprint(*params.DateCreatedAfter)) + } + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) + } + if params != nil && params.DateUpdatedBefore != nil { + data.Set("DateUpdatedBefore", fmt.Sprint(*params.DateUpdatedBefore)) + } + if params != nil && params.DateUpdatedAfter != nil { + data.Set("DateUpdatedAfter", fmt.Sprint(*params.DateUpdatedAfter)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListConferenceResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListConferenceResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListConferenceRecordingParams Optional parameters for the method 'ListConferenceRecording' type ListConferenceRecordingParams struct { - DateCreated *time.Time `json:"DateCreated,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` DateCreatedBefore *time.Time `json:"DateCreated<,omitempty"` - DateCreatedAfter *time.Time `json:"DateCreated>,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + DateCreatedAfter *time.Time `json:"DateCreated>,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -6231,43 +6082,43 @@ type ListConferenceRecordingParams struct { * @param "DateCreatedAfter" (time.Time) - The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` will return recordings generated at or before midnight on a given date, and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight on a date. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListConferenceRecordingResponse -*/ + */ func (c *DefaultApiService) ListConferenceRecording(AccountSid string, ConferenceSid string, params *ListConferenceRecordingParams) (*ListConferenceRecordingResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Recordings.json" + path := "/2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Recordings.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"ConferenceSid"+"}", ConferenceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.DateCreated != nil { - data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) -} - if params != nil && params.DateCreatedBefore != nil { - data.Set("DateCreatedBefore", fmt.Sprint(*params.DateCreatedBefore)) -} - if params != nil && params.DateCreatedAfter != nil { - data.Set("DateCreatedAfter", fmt.Sprint(*params.DateCreatedAfter)) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) + } + if params != nil && params.DateCreatedBefore != nil { + data.Set("DateCreatedBefore", fmt.Sprint(*params.DateCreatedBefore)) + } + if params != nil && params.DateCreatedAfter != nil { + data.Set("DateCreatedAfter", fmt.Sprint(*params.DateCreatedAfter)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListConferenceRecordingResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListConferenceRecordingResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListConnectAppParams Optional parameters for the method 'ListConnectApp' type ListConnectAppParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -6280,33 +6131,33 @@ type ListConnectAppParams struct { * @param optional nil or *ListConnectAppParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListConnectAppResponse -*/ + */ func (c *DefaultApiService) ListConnectApp(AccountSid string, params *ListConnectAppParams) (*ListConnectAppResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/ConnectApps.json" + path := "/2010-04-01/Accounts/{AccountSid}/ConnectApps.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListConnectAppResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListConnectAppResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListDependentPhoneNumberParams Optional parameters for the method 'ListDependentPhoneNumber' type ListDependentPhoneNumberParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -6319,41 +6170,41 @@ type ListDependentPhoneNumberParams struct { * @param optional nil or *ListDependentPhoneNumberParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListDependentPhoneNumberResponse -*/ + */ func (c *DefaultApiService) ListDependentPhoneNumber(AccountSid string, AddressSid string, params *ListDependentPhoneNumberParams) (*ListDependentPhoneNumberResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Addresses/{AddressSid}/DependentPhoneNumbers.json" + path := "/2010-04-01/Accounts/{AccountSid}/Addresses/{AddressSid}/DependentPhoneNumbers.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"AddressSid"+"}", AddressSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListDependentPhoneNumberResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListDependentPhoneNumberResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListIncomingPhoneNumberParams Optional parameters for the method 'ListIncomingPhoneNumber' type ListIncomingPhoneNumberParams struct { - Beta *bool `json:"Beta,omitempty"` + Beta *bool `json:"Beta,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` - PhoneNumber *string `json:"PhoneNumber,omitempty"` - Origin *string `json:"Origin,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PhoneNumber *string `json:"PhoneNumber,omitempty"` + Origin *string `json:"Origin,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -6367,45 +6218,45 @@ type ListIncomingPhoneNumberParams struct { * @param "Origin" (string) - Whether to include phone numbers based on their origin. Can be: `twilio` or `hosted`. By default, phone numbers of all origin are included. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListIncomingPhoneNumberResponse -*/ + */ func (c *DefaultApiService) ListIncomingPhoneNumber(AccountSid string, params *ListIncomingPhoneNumberParams) (*ListIncomingPhoneNumberResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers.json" + path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Beta != nil { - data.Set("Beta", fmt.Sprint(*params.Beta)) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.PhoneNumber != nil { - data.Set("PhoneNumber", *params.PhoneNumber) -} - if params != nil && params.Origin != nil { - data.Set("Origin", *params.Origin) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.Beta != nil { + data.Set("Beta", fmt.Sprint(*params.Beta)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.PhoneNumber != nil { + data.Set("PhoneNumber", *params.PhoneNumber) + } + if params != nil && params.Origin != nil { + data.Set("Origin", *params.Origin) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListIncomingPhoneNumberResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListIncomingPhoneNumberResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListIncomingPhoneNumberAssignedAddOnParams Optional parameters for the method 'ListIncomingPhoneNumberAssignedAddOn' type ListIncomingPhoneNumberAssignedAddOnParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -6419,34 +6270,34 @@ type ListIncomingPhoneNumberAssignedAddOnParams struct { * @param optional nil or *ListIncomingPhoneNumberAssignedAddOnParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListIncomingPhoneNumberAssignedAddOnResponse -*/ + */ func (c *DefaultApiService) ListIncomingPhoneNumberAssignedAddOn(AccountSid string, ResourceSid string, params *ListIncomingPhoneNumberAssignedAddOnParams) (*ListIncomingPhoneNumberAssignedAddOnResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{ResourceSid}/AssignedAddOns.json" + path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{ResourceSid}/AssignedAddOns.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"ResourceSid"+"}", ResourceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListIncomingPhoneNumberAssignedAddOnResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListIncomingPhoneNumberAssignedAddOnResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListIncomingPhoneNumberAssignedAddOnExtensionParams Optional parameters for the method 'ListIncomingPhoneNumberAssignedAddOnExtension' type ListIncomingPhoneNumberAssignedAddOnExtensionParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -6461,42 +6312,42 @@ type ListIncomingPhoneNumberAssignedAddOnExtensionParams struct { * @param optional nil or *ListIncomingPhoneNumberAssignedAddOnExtensionParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListIncomingPhoneNumberAssignedAddOnExtensionResponse -*/ + */ func (c *DefaultApiService) ListIncomingPhoneNumberAssignedAddOnExtension(AccountSid string, ResourceSid string, AssignedAddOnSid string, params *ListIncomingPhoneNumberAssignedAddOnExtensionParams) (*ListIncomingPhoneNumberAssignedAddOnExtensionResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{ResourceSid}/AssignedAddOns/{AssignedAddOnSid}/Extensions.json" + path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{ResourceSid}/AssignedAddOns/{AssignedAddOnSid}/Extensions.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"ResourceSid"+"}", ResourceSid, -1) path = strings.Replace(path, "{"+"AssignedAddOnSid"+"}", AssignedAddOnSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListIncomingPhoneNumberAssignedAddOnExtensionResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListIncomingPhoneNumberAssignedAddOnExtensionResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListIncomingPhoneNumberLocalParams Optional parameters for the method 'ListIncomingPhoneNumberLocal' type ListIncomingPhoneNumberLocalParams struct { - Beta *bool `json:"Beta,omitempty"` + Beta *bool `json:"Beta,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` - PhoneNumber *string `json:"PhoneNumber,omitempty"` - Origin *string `json:"Origin,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PhoneNumber *string `json:"PhoneNumber,omitempty"` + Origin *string `json:"Origin,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -6509,52 +6360,52 @@ type ListIncomingPhoneNumberLocalParams struct { * @param "Origin" (string) - Whether to include phone numbers based on their origin. Can be: `twilio` or `hosted`. By default, phone numbers of all origin are included. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListIncomingPhoneNumberLocalResponse -*/ + */ func (c *DefaultApiService) ListIncomingPhoneNumberLocal(AccountSid string, params *ListIncomingPhoneNumberLocalParams) (*ListIncomingPhoneNumberLocalResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/Local.json" + path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/Local.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Beta != nil { - data.Set("Beta", fmt.Sprint(*params.Beta)) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.PhoneNumber != nil { - data.Set("PhoneNumber", *params.PhoneNumber) -} - if params != nil && params.Origin != nil { - data.Set("Origin", *params.Origin) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.Beta != nil { + data.Set("Beta", fmt.Sprint(*params.Beta)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.PhoneNumber != nil { + data.Set("PhoneNumber", *params.PhoneNumber) + } + if params != nil && params.Origin != nil { + data.Set("Origin", *params.Origin) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListIncomingPhoneNumberLocalResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListIncomingPhoneNumberLocalResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListIncomingPhoneNumberMobileParams Optional parameters for the method 'ListIncomingPhoneNumberMobile' type ListIncomingPhoneNumberMobileParams struct { - Beta *bool `json:"Beta,omitempty"` + Beta *bool `json:"Beta,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` - PhoneNumber *string `json:"PhoneNumber,omitempty"` - Origin *string `json:"Origin,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PhoneNumber *string `json:"PhoneNumber,omitempty"` + Origin *string `json:"Origin,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -6567,52 +6418,52 @@ type ListIncomingPhoneNumberMobileParams struct { * @param "Origin" (string) - Whether to include phone numbers based on their origin. Can be: `twilio` or `hosted`. By default, phone numbers of all origin are included. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListIncomingPhoneNumberMobileResponse -*/ + */ func (c *DefaultApiService) ListIncomingPhoneNumberMobile(AccountSid string, params *ListIncomingPhoneNumberMobileParams) (*ListIncomingPhoneNumberMobileResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/Mobile.json" + path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/Mobile.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Beta != nil { - data.Set("Beta", fmt.Sprint(*params.Beta)) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.PhoneNumber != nil { - data.Set("PhoneNumber", *params.PhoneNumber) -} - if params != nil && params.Origin != nil { - data.Set("Origin", *params.Origin) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.Beta != nil { + data.Set("Beta", fmt.Sprint(*params.Beta)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.PhoneNumber != nil { + data.Set("PhoneNumber", *params.PhoneNumber) + } + if params != nil && params.Origin != nil { + data.Set("Origin", *params.Origin) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListIncomingPhoneNumberMobileResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListIncomingPhoneNumberMobileResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListIncomingPhoneNumberTollFreeParams Optional parameters for the method 'ListIncomingPhoneNumberTollFree' type ListIncomingPhoneNumberTollFreeParams struct { - Beta *bool `json:"Beta,omitempty"` + Beta *bool `json:"Beta,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` - PhoneNumber *string `json:"PhoneNumber,omitempty"` - Origin *string `json:"Origin,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PhoneNumber *string `json:"PhoneNumber,omitempty"` + Origin *string `json:"Origin,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -6625,45 +6476,45 @@ type ListIncomingPhoneNumberTollFreeParams struct { * @param "Origin" (string) - Whether to include phone numbers based on their origin. Can be: `twilio` or `hosted`. By default, phone numbers of all origin are included. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListIncomingPhoneNumberTollFreeResponse -*/ + */ func (c *DefaultApiService) ListIncomingPhoneNumberTollFree(AccountSid string, params *ListIncomingPhoneNumberTollFreeParams) (*ListIncomingPhoneNumberTollFreeResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/TollFree.json" + path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/TollFree.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Beta != nil { - data.Set("Beta", fmt.Sprint(*params.Beta)) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.PhoneNumber != nil { - data.Set("PhoneNumber", *params.PhoneNumber) -} - if params != nil && params.Origin != nil { - data.Set("Origin", *params.Origin) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.Beta != nil { + data.Set("Beta", fmt.Sprint(*params.Beta)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.PhoneNumber != nil { + data.Set("PhoneNumber", *params.PhoneNumber) + } + if params != nil && params.Origin != nil { + data.Set("Origin", *params.Origin) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListIncomingPhoneNumberTollFreeResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListIncomingPhoneNumberTollFreeResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListKeyParams Optional parameters for the method 'ListKey' type ListKeyParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -6675,39 +6526,39 @@ type ListKeyParams struct { * @param optional nil or *ListKeyParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListKeyResponse -*/ + */ func (c *DefaultApiService) ListKey(AccountSid string, params *ListKeyParams) (*ListKeyResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Keys.json" + path := "/2010-04-01/Accounts/{AccountSid}/Keys.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListKeyResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListKeyResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListMediaParams Optional parameters for the method 'ListMedia' type ListMediaParams struct { - DateCreated *time.Time `json:"DateCreated,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` DateCreatedBefore *time.Time `json:"DateCreated<,omitempty"` - DateCreatedAfter *time.Time `json:"DateCreated>,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + DateCreatedAfter *time.Time `json:"DateCreated>,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -6721,43 +6572,43 @@ type ListMediaParams struct { * @param "DateCreatedAfter" (time.Time) - Only include media that was created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read media that was created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read media that was created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read media that was created on or after midnight of this date. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListMediaResponse -*/ + */ func (c *DefaultApiService) ListMedia(AccountSid string, MessageSid string, params *ListMediaParams) (*ListMediaResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Messages/{MessageSid}/Media.json" + path := "/2010-04-01/Accounts/{AccountSid}/Messages/{MessageSid}/Media.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"MessageSid"+"}", MessageSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.DateCreated != nil { - data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) -} - if params != nil && params.DateCreatedBefore != nil { - data.Set("DateCreatedBefore", fmt.Sprint(*params.DateCreatedBefore)) -} - if params != nil && params.DateCreatedAfter != nil { - data.Set("DateCreatedAfter", fmt.Sprint(*params.DateCreatedAfter)) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) + } + if params != nil && params.DateCreatedBefore != nil { + data.Set("DateCreatedBefore", fmt.Sprint(*params.DateCreatedBefore)) + } + if params != nil && params.DateCreatedAfter != nil { + data.Set("DateCreatedAfter", fmt.Sprint(*params.DateCreatedAfter)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListMediaResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListMediaResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListMemberParams Optional parameters for the method 'ListMember' type ListMemberParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -6771,42 +6622,42 @@ type ListMemberParams struct { * @param optional nil or *ListMemberParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListMemberResponse -*/ + */ func (c *DefaultApiService) ListMember(AccountSid string, QueueSid string, params *ListMemberParams) (*ListMemberResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Queues/{QueueSid}/Members.json" + path := "/2010-04-01/Accounts/{AccountSid}/Queues/{QueueSid}/Members.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"QueueSid"+"}", QueueSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListMemberResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListMemberResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListMessageParams Optional parameters for the method 'ListMessage' type ListMessageParams struct { - To *string `json:"To,omitempty"` - From *string `json:"From,omitempty"` - DateSent *time.Time `json:"DateSent,omitempty"` + To *string `json:"To,omitempty"` + From *string `json:"From,omitempty"` + DateSent *time.Time `json:"DateSent,omitempty"` DateSentBefore *time.Time `json:"DateSent<,omitempty"` - DateSentAfter *time.Time `json:"DateSent>,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + DateSentAfter *time.Time `json:"DateSent>,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -6820,56 +6671,56 @@ type ListMessageParams struct { * @param "DateSentBefore" (time.Time) - The date of the messages to show. Specify a date as `YYYY-MM-DD` in GMT to read only messages sent on this date. For example: `2009-07-06`. You can also specify an inequality, such as `DateSent<=YYYY-MM-DD`, to read messages sent on or before midnight on a date, and `DateSent>=YYYY-MM-DD` to read messages sent on or after midnight on a date. * @param "DateSentAfter" (time.Time) - The date of the messages to show. Specify a date as `YYYY-MM-DD` in GMT to read only messages sent on this date. For example: `2009-07-06`. You can also specify an inequality, such as `DateSent<=YYYY-MM-DD`, to read messages sent on or before midnight on a date, and `DateSent>=YYYY-MM-DD` to read messages sent on or after midnight on a date. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. -* @return ListMessageResponse -*/ -func (c *DefaultApiService) ListMessage(AccountSid string, params *ListMessageParams) (*ListMessageResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Messages.json" - path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - - data := url.Values{} - headers := 0 - - if params != nil && params.To != nil { - data.Set("To", *params.To) -} - if params != nil && params.From != nil { - data.Set("From", *params.From) -} - if params != nil && params.DateSent != nil { - data.Set("DateSent", fmt.Sprint(*params.DateSent)) -} - if params != nil && params.DateSentBefore != nil { - data.Set("DateSentBefore", fmt.Sprint(*params.DateSentBefore)) -} - if params != nil && params.DateSentAfter != nil { - data.Set("DateSentAfter", fmt.Sprint(*params.DateSentAfter)) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} +* @return ListMessageResponse + */ +func (c *DefaultApiService) ListMessage(AccountSid string, params *ListMessageParams) (*ListMessageResponse, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Messages.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + + data := url.Values{} + headers := 0 + if params != nil && params.To != nil { + data.Set("To", *params.To) + } + if params != nil && params.From != nil { + data.Set("From", *params.From) + } + if params != nil && params.DateSent != nil { + data.Set("DateSent", fmt.Sprint(*params.DateSent)) + } + if params != nil && params.DateSentBefore != nil { + data.Set("DateSentBefore", fmt.Sprint(*params.DateSentBefore)) + } + if params != nil && params.DateSentAfter != nil { + data.Set("DateSentAfter", fmt.Sprint(*params.DateSentAfter)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListMessageResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListMessageResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListNotificationParams Optional parameters for the method 'ListNotification' type ListNotificationParams struct { - Log *int32 `json:"Log,omitempty"` - MessageDate *time.Time `json:"MessageDate,omitempty"` + Log *int32 `json:"Log,omitempty"` + MessageDate *time.Time `json:"MessageDate,omitempty"` MessageDateBefore *time.Time `json:"MessageDate<,omitempty"` - MessageDateAfter *time.Time `json:"MessageDate>,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + MessageDateAfter *time.Time `json:"MessageDate>,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -6883,50 +6734,50 @@ type ListNotificationParams struct { * @param "MessageDateAfter" (time.Time) - Only show notifications for the specified date, formatted as `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for messages logged at or after midnight on a date. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListNotificationResponse -*/ + */ func (c *DefaultApiService) ListNotification(AccountSid string, params *ListNotificationParams) (*ListNotificationResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Notifications.json" + path := "/2010-04-01/Accounts/{AccountSid}/Notifications.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Log != nil { - data.Set("Log", fmt.Sprint(*params.Log)) -} - if params != nil && params.MessageDate != nil { - data.Set("MessageDate", fmt.Sprint(*params.MessageDate)) -} - if params != nil && params.MessageDateBefore != nil { - data.Set("MessageDateBefore", fmt.Sprint(*params.MessageDateBefore)) -} - if params != nil && params.MessageDateAfter != nil { - data.Set("MessageDateAfter", fmt.Sprint(*params.MessageDateAfter)) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.Log != nil { + data.Set("Log", fmt.Sprint(*params.Log)) + } + if params != nil && params.MessageDate != nil { + data.Set("MessageDate", fmt.Sprint(*params.MessageDate)) + } + if params != nil && params.MessageDateBefore != nil { + data.Set("MessageDateBefore", fmt.Sprint(*params.MessageDateBefore)) + } + if params != nil && params.MessageDateAfter != nil { + data.Set("MessageDateAfter", fmt.Sprint(*params.MessageDateAfter)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListNotificationResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListNotificationResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListOutgoingCallerIdParams Optional parameters for the method 'ListOutgoingCallerId' type ListOutgoingCallerIdParams struct { - PhoneNumber *string `json:"PhoneNumber,omitempty"` + PhoneNumber *string `json:"PhoneNumber,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -6938,44 +6789,44 @@ type ListOutgoingCallerIdParams struct { * @param "FriendlyName" (string) - The string that identifies the OutgoingCallerId resources to read. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListOutgoingCallerIdResponse -*/ + */ func (c *DefaultApiService) ListOutgoingCallerId(AccountSid string, params *ListOutgoingCallerIdParams) (*ListOutgoingCallerIdResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/OutgoingCallerIds.json" + path := "/2010-04-01/Accounts/{AccountSid}/OutgoingCallerIds.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PhoneNumber != nil { - data.Set("PhoneNumber", *params.PhoneNumber) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PhoneNumber != nil { + data.Set("PhoneNumber", *params.PhoneNumber) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListOutgoingCallerIdResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListOutgoingCallerIdResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListParticipantParams Optional parameters for the method 'ListParticipant' type ListParticipantParams struct { - Muted *bool `json:"Muted,omitempty"` - Hold *bool `json:"Hold,omitempty"` - Coaching *bool `json:"Coaching,omitempty"` + Muted *bool `json:"Muted,omitempty"` + Hold *bool `json:"Hold,omitempty"` + Coaching *bool `json:"Coaching,omitempty"` PageSize *int32 `json:"PageSize,omitempty"` } @@ -6990,43 +6841,43 @@ type ListParticipantParams struct { * @param "Coaching" (bool) - Whether to return only participants who are coaching another call. Can be: `true` or `false`. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListParticipantResponse -*/ + */ func (c *DefaultApiService) ListParticipant(AccountSid string, ConferenceSid string, params *ListParticipantParams) (*ListParticipantResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Participants.json" + path := "/2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Participants.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"ConferenceSid"+"}", ConferenceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Muted != nil { - data.Set("Muted", fmt.Sprint(*params.Muted)) -} - if params != nil && params.Hold != nil { - data.Set("Hold", fmt.Sprint(*params.Hold)) -} - if params != nil && params.Coaching != nil { - data.Set("Coaching", fmt.Sprint(*params.Coaching)) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.Muted != nil { + data.Set("Muted", fmt.Sprint(*params.Muted)) + } + if params != nil && params.Hold != nil { + data.Set("Hold", fmt.Sprint(*params.Hold)) + } + if params != nil && params.Coaching != nil { + data.Set("Coaching", fmt.Sprint(*params.Coaching)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListParticipantResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListParticipantResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListQueueParams Optional parameters for the method 'ListQueue' type ListQueueParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -7039,41 +6890,41 @@ type ListQueueParams struct { * @param optional nil or *ListQueueParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListQueueResponse -*/ + */ func (c *DefaultApiService) ListQueue(AccountSid string, params *ListQueueParams) (*ListQueueResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Queues.json" + path := "/2010-04-01/Accounts/{AccountSid}/Queues.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListQueueResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListQueueResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListRecordingParams Optional parameters for the method 'ListRecording' type ListRecordingParams struct { - DateCreated *time.Time `json:"DateCreated,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` DateCreatedBefore *time.Time `json:"DateCreated<,omitempty"` - DateCreatedAfter *time.Time `json:"DateCreated>,omitempty"` - CallSid *string `json:"CallSid,omitempty"` - ConferenceSid *string `json:"ConferenceSid,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + DateCreatedAfter *time.Time `json:"DateCreated>,omitempty"` + CallSid *string `json:"CallSid,omitempty"` + ConferenceSid *string `json:"ConferenceSid,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -7088,48 +6939,48 @@ type ListRecordingParams struct { * @param "ConferenceSid" (string) - The Conference SID that identifies the conference associated with the recording to read. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListRecordingResponse -*/ + */ func (c *DefaultApiService) ListRecording(AccountSid string, params *ListRecordingParams) (*ListRecordingResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Recordings.json" + path := "/2010-04-01/Accounts/{AccountSid}/Recordings.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.DateCreated != nil { - data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) -} - if params != nil && params.DateCreatedBefore != nil { - data.Set("DateCreatedBefore", fmt.Sprint(*params.DateCreatedBefore)) -} - if params != nil && params.DateCreatedAfter != nil { - data.Set("DateCreatedAfter", fmt.Sprint(*params.DateCreatedAfter)) -} - if params != nil && params.CallSid != nil { - data.Set("CallSid", *params.CallSid) -} - if params != nil && params.ConferenceSid != nil { - data.Set("ConferenceSid", *params.ConferenceSid) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) + } + if params != nil && params.DateCreatedBefore != nil { + data.Set("DateCreatedBefore", fmt.Sprint(*params.DateCreatedBefore)) + } + if params != nil && params.DateCreatedAfter != nil { + data.Set("DateCreatedAfter", fmt.Sprint(*params.DateCreatedAfter)) + } + if params != nil && params.CallSid != nil { + data.Set("CallSid", *params.CallSid) + } + if params != nil && params.ConferenceSid != nil { + data.Set("ConferenceSid", *params.ConferenceSid) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListRecordingResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListRecordingResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListRecordingAddOnResultParams Optional parameters for the method 'ListRecordingAddOnResult' type ListRecordingAddOnResultParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -7143,34 +6994,34 @@ type ListRecordingAddOnResultParams struct { * @param optional nil or *ListRecordingAddOnResultParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListRecordingAddOnResultResponse -*/ + */ func (c *DefaultApiService) ListRecordingAddOnResult(AccountSid string, ReferenceSid string, params *ListRecordingAddOnResultParams) (*ListRecordingAddOnResultResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Recordings/{ReferenceSid}/AddOnResults.json" + path := "/2010-04-01/Accounts/{AccountSid}/Recordings/{ReferenceSid}/AddOnResults.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"ReferenceSid"+"}", ReferenceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListRecordingAddOnResultResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListRecordingAddOnResultResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListRecordingAddOnResultPayloadParams Optional parameters for the method 'ListRecordingAddOnResultPayload' type ListRecordingAddOnResultPayloadParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -7185,35 +7036,35 @@ type ListRecordingAddOnResultPayloadParams struct { * @param optional nil or *ListRecordingAddOnResultPayloadParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListRecordingAddOnResultPayloadResponse -*/ + */ func (c *DefaultApiService) ListRecordingAddOnResultPayload(AccountSid string, ReferenceSid string, AddOnResultSid string, params *ListRecordingAddOnResultPayloadParams) (*ListRecordingAddOnResultPayloadResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Recordings/{ReferenceSid}/AddOnResults/{AddOnResultSid}/Payloads.json" + path := "/2010-04-01/Accounts/{AccountSid}/Recordings/{ReferenceSid}/AddOnResults/{AddOnResultSid}/Payloads.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"ReferenceSid"+"}", ReferenceSid, -1) path = strings.Replace(path, "{"+"AddOnResultSid"+"}", AddOnResultSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListRecordingAddOnResultPayloadResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListRecordingAddOnResultPayloadResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListRecordingTranscriptionParams Optional parameters for the method 'ListRecordingTranscription' type ListRecordingTranscriptionParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -7226,39 +7077,39 @@ type ListRecordingTranscriptionParams struct { * @param optional nil or *ListRecordingTranscriptionParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListRecordingTranscriptionResponse -*/ + */ func (c *DefaultApiService) ListRecordingTranscription(AccountSid string, RecordingSid string, params *ListRecordingTranscriptionParams) (*ListRecordingTranscriptionResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Recordings/{RecordingSid}/Transcriptions.json" + path := "/2010-04-01/Accounts/{AccountSid}/Recordings/{RecordingSid}/Transcriptions.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"RecordingSid"+"}", RecordingSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListRecordingTranscriptionResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListRecordingTranscriptionResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListShortCodeParams Optional parameters for the method 'ListShortCode' type ListShortCodeParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` - ShortCode *string `json:"ShortCode,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + ShortCode *string `json:"ShortCode,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -7270,39 +7121,39 @@ type ListShortCodeParams struct { * @param "ShortCode" (string) - Only show the ShortCode resources that match this pattern. You can specify partial numbers and use '*' as a wildcard for any digit. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListShortCodeResponse -*/ + */ func (c *DefaultApiService) ListShortCode(AccountSid string, params *ListShortCodeParams) (*ListShortCodeResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SMS/ShortCodes.json" + path := "/2010-04-01/Accounts/{AccountSid}/SMS/ShortCodes.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.ShortCode != nil { - data.Set("ShortCode", *params.ShortCode) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.ShortCode != nil { + data.Set("ShortCode", *params.ShortCode) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListShortCodeResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListShortCodeResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListSigningKeyParams Optional parameters for the method 'ListSigningKey' type ListSigningKeyParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -7314,33 +7165,33 @@ type ListSigningKeyParams struct { * @param optional nil or *ListSigningKeyParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListSigningKeyResponse -*/ + */ func (c *DefaultApiService) ListSigningKey(AccountSid string, params *ListSigningKeyParams) (*ListSigningKeyResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SigningKeys.json" + path := "/2010-04-01/Accounts/{AccountSid}/SigningKeys.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListSigningKeyResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListSigningKeyResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListSipAuthCallsCredentialListMappingParams Optional parameters for the method 'ListSipAuthCallsCredentialListMapping' type ListSipAuthCallsCredentialListMappingParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -7354,34 +7205,34 @@ type ListSipAuthCallsCredentialListMappingParams struct { * @param optional nil or *ListSipAuthCallsCredentialListMappingParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListSipAuthCallsCredentialListMappingResponse -*/ + */ func (c *DefaultApiService) ListSipAuthCallsCredentialListMapping(AccountSid string, DomainSid string, params *ListSipAuthCallsCredentialListMappingParams) (*ListSipAuthCallsCredentialListMappingResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls/CredentialListMappings.json" + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls/CredentialListMappings.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListSipAuthCallsCredentialListMappingResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListSipAuthCallsCredentialListMappingResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListSipAuthCallsIpAccessControlListMappingParams Optional parameters for the method 'ListSipAuthCallsIpAccessControlListMapping' type ListSipAuthCallsIpAccessControlListMappingParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -7395,34 +7246,34 @@ type ListSipAuthCallsIpAccessControlListMappingParams struct { * @param optional nil or *ListSipAuthCallsIpAccessControlListMappingParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListSipAuthCallsIpAccessControlListMappingResponse -*/ + */ func (c *DefaultApiService) ListSipAuthCallsIpAccessControlListMapping(AccountSid string, DomainSid string, params *ListSipAuthCallsIpAccessControlListMappingParams) (*ListSipAuthCallsIpAccessControlListMappingResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls/IpAccessControlListMappings.json" + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls/IpAccessControlListMappings.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListSipAuthCallsIpAccessControlListMappingResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListSipAuthCallsIpAccessControlListMappingResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListSipAuthRegistrationsCredentialListMappingParams Optional parameters for the method 'ListSipAuthRegistrationsCredentialListMapping' type ListSipAuthRegistrationsCredentialListMappingParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -7436,34 +7287,34 @@ type ListSipAuthRegistrationsCredentialListMappingParams struct { * @param optional nil or *ListSipAuthRegistrationsCredentialListMappingParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListSipAuthRegistrationsCredentialListMappingResponse -*/ + */ func (c *DefaultApiService) ListSipAuthRegistrationsCredentialListMapping(AccountSid string, DomainSid string, params *ListSipAuthRegistrationsCredentialListMappingParams) (*ListSipAuthRegistrationsCredentialListMappingResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Registrations/CredentialListMappings.json" + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Registrations/CredentialListMappings.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListSipAuthRegistrationsCredentialListMappingResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListSipAuthRegistrationsCredentialListMappingResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListSipCredentialParams Optional parameters for the method 'ListSipCredential' type ListSipCredentialParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -7477,34 +7328,34 @@ type ListSipCredentialParams struct { * @param optional nil or *ListSipCredentialParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListSipCredentialResponse -*/ + */ func (c *DefaultApiService) ListSipCredential(AccountSid string, CredentialListSid string, params *ListSipCredentialParams) (*ListSipCredentialResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{CredentialListSid}/Credentials.json" + path := "/2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{CredentialListSid}/Credentials.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"CredentialListSid"+"}", CredentialListSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListSipCredentialResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListSipCredentialResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListSipCredentialListParams Optional parameters for the method 'ListSipCredentialList' type ListSipCredentialListParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -7517,33 +7368,33 @@ type ListSipCredentialListParams struct { * @param optional nil or *ListSipCredentialListParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListSipCredentialListResponse -*/ + */ func (c *DefaultApiService) ListSipCredentialList(AccountSid string, params *ListSipCredentialListParams) (*ListSipCredentialListResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists.json" + path := "/2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListSipCredentialListResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListSipCredentialListResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListSipCredentialListMappingParams Optional parameters for the method 'ListSipCredentialListMapping' type ListSipCredentialListMappingParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -7557,34 +7408,34 @@ type ListSipCredentialListMappingParams struct { * @param optional nil or *ListSipCredentialListMappingParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListSipCredentialListMappingResponse -*/ + */ func (c *DefaultApiService) ListSipCredentialListMapping(AccountSid string, DomainSid string, params *ListSipCredentialListMappingParams) (*ListSipCredentialListMappingResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/CredentialListMappings.json" + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/CredentialListMappings.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListSipCredentialListMappingResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListSipCredentialListMappingResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListSipDomainParams Optional parameters for the method 'ListSipDomain' type ListSipDomainParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -7597,33 +7448,33 @@ type ListSipDomainParams struct { * @param optional nil or *ListSipDomainParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListSipDomainResponse -*/ + */ func (c *DefaultApiService) ListSipDomain(AccountSid string, params *ListSipDomainParams) (*ListSipDomainResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains.json" + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListSipDomainResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListSipDomainResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListSipIpAccessControlListParams Optional parameters for the method 'ListSipIpAccessControlList' type ListSipIpAccessControlListParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -7636,33 +7487,33 @@ type ListSipIpAccessControlListParams struct { * @param optional nil or *ListSipIpAccessControlListParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListSipIpAccessControlListResponse -*/ + */ func (c *DefaultApiService) ListSipIpAccessControlList(AccountSid string, params *ListSipIpAccessControlListParams) (*ListSipIpAccessControlListResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists.json" + path := "/2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListSipIpAccessControlListResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListSipIpAccessControlListResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListSipIpAccessControlListMappingParams Optional parameters for the method 'ListSipIpAccessControlListMapping' type ListSipIpAccessControlListMappingParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -7676,34 +7527,34 @@ type ListSipIpAccessControlListMappingParams struct { * @param optional nil or *ListSipIpAccessControlListMappingParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListSipIpAccessControlListMappingResponse -*/ + */ func (c *DefaultApiService) ListSipIpAccessControlListMapping(AccountSid string, DomainSid string, params *ListSipIpAccessControlListMappingParams) (*ListSipIpAccessControlListMappingResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/IpAccessControlListMappings.json" + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/IpAccessControlListMappings.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListSipIpAccessControlListMappingResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListSipIpAccessControlListMappingResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListSipIpAddressParams Optional parameters for the method 'ListSipIpAddress' type ListSipIpAddressParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -7717,34 +7568,34 @@ type ListSipIpAddressParams struct { * @param optional nil or *ListSipIpAddressParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListSipIpAddressResponse -*/ + */ func (c *DefaultApiService) ListSipIpAddress(AccountSid string, IpAccessControlListSid string, params *ListSipIpAddressParams) (*ListSipIpAddressResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists/{IpAccessControlListSid}/IpAddresses.json" + path := "/2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists/{IpAccessControlListSid}/IpAddresses.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"IpAccessControlListSid"+"}", IpAccessControlListSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListSipIpAddressResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListSipIpAddressResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListTranscriptionParams Optional parameters for the method 'ListTranscription' type ListTranscriptionParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -7757,40 +7608,40 @@ type ListTranscriptionParams struct { * @param optional nil or *ListTranscriptionParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListTranscriptionResponse -*/ + */ func (c *DefaultApiService) ListTranscription(AccountSid string, params *ListTranscriptionParams) (*ListTranscriptionResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Transcriptions.json" + path := "/2010-04-01/Accounts/{AccountSid}/Transcriptions.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListTranscriptionResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListTranscriptionResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListUsageRecordParams Optional parameters for the method 'ListUsageRecord' type ListUsageRecordParams struct { - Category *string `json:"Category,omitempty"` - StartDate *time.Time `json:"StartDate,omitempty"` - EndDate *time.Time `json:"EndDate,omitempty"` - IncludeSubaccounts *bool `json:"IncludeSubaccounts,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + Category *string `json:"Category,omitempty"` + StartDate *time.Time `json:"StartDate,omitempty"` + EndDate *time.Time `json:"EndDate,omitempty"` + IncludeSubaccounts *bool `json:"IncludeSubaccounts,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -7804,52 +7655,52 @@ type ListUsageRecordParams struct { * @param "IncludeSubaccounts" (bool) - Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListUsageRecordResponse -*/ + */ func (c *DefaultApiService) ListUsageRecord(AccountSid string, params *ListUsageRecordParams) (*ListUsageRecordResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Usage/Records.json" + path := "/2010-04-01/Accounts/{AccountSid}/Usage/Records.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Category != nil { - data.Set("Category", *params.Category) -} - if params != nil && params.StartDate != nil { - data.Set("StartDate", fmt.Sprint(*params.StartDate)) -} - if params != nil && params.EndDate != nil { - data.Set("EndDate", fmt.Sprint(*params.EndDate)) -} - if params != nil && params.IncludeSubaccounts != nil { - data.Set("IncludeSubaccounts", fmt.Sprint(*params.IncludeSubaccounts)) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.Category != nil { + data.Set("Category", *params.Category) + } + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) + } + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) + } + if params != nil && params.IncludeSubaccounts != nil { + data.Set("IncludeSubaccounts", fmt.Sprint(*params.IncludeSubaccounts)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListUsageRecordResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListUsageRecordResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListUsageRecordAllTimeParams Optional parameters for the method 'ListUsageRecordAllTime' type ListUsageRecordAllTimeParams struct { - Category *string `json:"Category,omitempty"` - StartDate *time.Time `json:"StartDate,omitempty"` - EndDate *time.Time `json:"EndDate,omitempty"` - IncludeSubaccounts *bool `json:"IncludeSubaccounts,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + Category *string `json:"Category,omitempty"` + StartDate *time.Time `json:"StartDate,omitempty"` + EndDate *time.Time `json:"EndDate,omitempty"` + IncludeSubaccounts *bool `json:"IncludeSubaccounts,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -7862,52 +7713,52 @@ type ListUsageRecordAllTimeParams struct { * @param "IncludeSubaccounts" (bool) - Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListUsageRecordAllTimeResponse -*/ + */ func (c *DefaultApiService) ListUsageRecordAllTime(AccountSid string, params *ListUsageRecordAllTimeParams) (*ListUsageRecordAllTimeResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Usage/Records/AllTime.json" + path := "/2010-04-01/Accounts/{AccountSid}/Usage/Records/AllTime.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Category != nil { - data.Set("Category", *params.Category) -} - if params != nil && params.StartDate != nil { - data.Set("StartDate", fmt.Sprint(*params.StartDate)) -} - if params != nil && params.EndDate != nil { - data.Set("EndDate", fmt.Sprint(*params.EndDate)) -} - if params != nil && params.IncludeSubaccounts != nil { - data.Set("IncludeSubaccounts", fmt.Sprint(*params.IncludeSubaccounts)) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.Category != nil { + data.Set("Category", *params.Category) + } + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) + } + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) + } + if params != nil && params.IncludeSubaccounts != nil { + data.Set("IncludeSubaccounts", fmt.Sprint(*params.IncludeSubaccounts)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListUsageRecordAllTimeResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListUsageRecordAllTimeResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListUsageRecordDailyParams Optional parameters for the method 'ListUsageRecordDaily' type ListUsageRecordDailyParams struct { - Category *string `json:"Category,omitempty"` - StartDate *time.Time `json:"StartDate,omitempty"` - EndDate *time.Time `json:"EndDate,omitempty"` - IncludeSubaccounts *bool `json:"IncludeSubaccounts,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + Category *string `json:"Category,omitempty"` + StartDate *time.Time `json:"StartDate,omitempty"` + EndDate *time.Time `json:"EndDate,omitempty"` + IncludeSubaccounts *bool `json:"IncludeSubaccounts,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -7920,52 +7771,52 @@ type ListUsageRecordDailyParams struct { * @param "IncludeSubaccounts" (bool) - Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListUsageRecordDailyResponse -*/ + */ func (c *DefaultApiService) ListUsageRecordDaily(AccountSid string, params *ListUsageRecordDailyParams) (*ListUsageRecordDailyResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Usage/Records/Daily.json" + path := "/2010-04-01/Accounts/{AccountSid}/Usage/Records/Daily.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Category != nil { - data.Set("Category", *params.Category) -} - if params != nil && params.StartDate != nil { - data.Set("StartDate", fmt.Sprint(*params.StartDate)) -} - if params != nil && params.EndDate != nil { - data.Set("EndDate", fmt.Sprint(*params.EndDate)) -} - if params != nil && params.IncludeSubaccounts != nil { - data.Set("IncludeSubaccounts", fmt.Sprint(*params.IncludeSubaccounts)) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.Category != nil { + data.Set("Category", *params.Category) + } + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) + } + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) + } + if params != nil && params.IncludeSubaccounts != nil { + data.Set("IncludeSubaccounts", fmt.Sprint(*params.IncludeSubaccounts)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListUsageRecordDailyResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListUsageRecordDailyResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListUsageRecordLastMonthParams Optional parameters for the method 'ListUsageRecordLastMonth' type ListUsageRecordLastMonthParams struct { - Category *string `json:"Category,omitempty"` - StartDate *time.Time `json:"StartDate,omitempty"` - EndDate *time.Time `json:"EndDate,omitempty"` - IncludeSubaccounts *bool `json:"IncludeSubaccounts,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + Category *string `json:"Category,omitempty"` + StartDate *time.Time `json:"StartDate,omitempty"` + EndDate *time.Time `json:"EndDate,omitempty"` + IncludeSubaccounts *bool `json:"IncludeSubaccounts,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -7977,53 +7828,53 @@ type ListUsageRecordLastMonthParams struct { * @param "EndDate" (time.Time) - Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date. * @param "IncludeSubaccounts" (bool) - Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. -* @return ListUsageRecordLastMonthResponse -*/ -func (c *DefaultApiService) ListUsageRecordLastMonth(AccountSid string, params *ListUsageRecordLastMonthParams) (*ListUsageRecordLastMonthResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Usage/Records/LastMonth.json" - path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - - data := url.Values{} - headers := 0 - - if params != nil && params.Category != nil { - data.Set("Category", *params.Category) -} - if params != nil && params.StartDate != nil { - data.Set("StartDate", fmt.Sprint(*params.StartDate)) -} - if params != nil && params.EndDate != nil { - data.Set("EndDate", fmt.Sprint(*params.EndDate)) -} - if params != nil && params.IncludeSubaccounts != nil { - data.Set("IncludeSubaccounts", fmt.Sprint(*params.IncludeSubaccounts)) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} +* @return ListUsageRecordLastMonthResponse + */ +func (c *DefaultApiService) ListUsageRecordLastMonth(AccountSid string, params *ListUsageRecordLastMonthParams) (*ListUsageRecordLastMonthResponse, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Usage/Records/LastMonth.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + + data := url.Values{} + headers := 0 + if params != nil && params.Category != nil { + data.Set("Category", *params.Category) + } + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) + } + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) + } + if params != nil && params.IncludeSubaccounts != nil { + data.Set("IncludeSubaccounts", fmt.Sprint(*params.IncludeSubaccounts)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListUsageRecordLastMonthResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListUsageRecordLastMonthResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListUsageRecordMonthlyParams Optional parameters for the method 'ListUsageRecordMonthly' type ListUsageRecordMonthlyParams struct { - Category *string `json:"Category,omitempty"` - StartDate *time.Time `json:"StartDate,omitempty"` - EndDate *time.Time `json:"EndDate,omitempty"` - IncludeSubaccounts *bool `json:"IncludeSubaccounts,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + Category *string `json:"Category,omitempty"` + StartDate *time.Time `json:"StartDate,omitempty"` + EndDate *time.Time `json:"EndDate,omitempty"` + IncludeSubaccounts *bool `json:"IncludeSubaccounts,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -8036,52 +7887,52 @@ type ListUsageRecordMonthlyParams struct { * @param "IncludeSubaccounts" (bool) - Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListUsageRecordMonthlyResponse -*/ + */ func (c *DefaultApiService) ListUsageRecordMonthly(AccountSid string, params *ListUsageRecordMonthlyParams) (*ListUsageRecordMonthlyResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Usage/Records/Monthly.json" + path := "/2010-04-01/Accounts/{AccountSid}/Usage/Records/Monthly.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Category != nil { - data.Set("Category", *params.Category) -} - if params != nil && params.StartDate != nil { - data.Set("StartDate", fmt.Sprint(*params.StartDate)) -} - if params != nil && params.EndDate != nil { - data.Set("EndDate", fmt.Sprint(*params.EndDate)) -} - if params != nil && params.IncludeSubaccounts != nil { - data.Set("IncludeSubaccounts", fmt.Sprint(*params.IncludeSubaccounts)) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.Category != nil { + data.Set("Category", *params.Category) + } + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) + } + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) + } + if params != nil && params.IncludeSubaccounts != nil { + data.Set("IncludeSubaccounts", fmt.Sprint(*params.IncludeSubaccounts)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListUsageRecordMonthlyResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListUsageRecordMonthlyResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListUsageRecordThisMonthParams Optional parameters for the method 'ListUsageRecordThisMonth' type ListUsageRecordThisMonthParams struct { - Category *string `json:"Category,omitempty"` - StartDate *time.Time `json:"StartDate,omitempty"` - EndDate *time.Time `json:"EndDate,omitempty"` - IncludeSubaccounts *bool `json:"IncludeSubaccounts,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + Category *string `json:"Category,omitempty"` + StartDate *time.Time `json:"StartDate,omitempty"` + EndDate *time.Time `json:"EndDate,omitempty"` + IncludeSubaccounts *bool `json:"IncludeSubaccounts,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -8094,52 +7945,52 @@ type ListUsageRecordThisMonthParams struct { * @param "IncludeSubaccounts" (bool) - Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListUsageRecordThisMonthResponse -*/ + */ func (c *DefaultApiService) ListUsageRecordThisMonth(AccountSid string, params *ListUsageRecordThisMonthParams) (*ListUsageRecordThisMonthResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Usage/Records/ThisMonth.json" + path := "/2010-04-01/Accounts/{AccountSid}/Usage/Records/ThisMonth.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Category != nil { - data.Set("Category", *params.Category) -} - if params != nil && params.StartDate != nil { - data.Set("StartDate", fmt.Sprint(*params.StartDate)) -} - if params != nil && params.EndDate != nil { - data.Set("EndDate", fmt.Sprint(*params.EndDate)) -} - if params != nil && params.IncludeSubaccounts != nil { - data.Set("IncludeSubaccounts", fmt.Sprint(*params.IncludeSubaccounts)) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.Category != nil { + data.Set("Category", *params.Category) + } + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) + } + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) + } + if params != nil && params.IncludeSubaccounts != nil { + data.Set("IncludeSubaccounts", fmt.Sprint(*params.IncludeSubaccounts)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListUsageRecordThisMonthResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListUsageRecordThisMonthResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListUsageRecordTodayParams Optional parameters for the method 'ListUsageRecordToday' type ListUsageRecordTodayParams struct { - Category *string `json:"Category,omitempty"` - StartDate *time.Time `json:"StartDate,omitempty"` - EndDate *time.Time `json:"EndDate,omitempty"` - IncludeSubaccounts *bool `json:"IncludeSubaccounts,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + Category *string `json:"Category,omitempty"` + StartDate *time.Time `json:"StartDate,omitempty"` + EndDate *time.Time `json:"EndDate,omitempty"` + IncludeSubaccounts *bool `json:"IncludeSubaccounts,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -8152,52 +8003,52 @@ type ListUsageRecordTodayParams struct { * @param "IncludeSubaccounts" (bool) - Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListUsageRecordTodayResponse -*/ + */ func (c *DefaultApiService) ListUsageRecordToday(AccountSid string, params *ListUsageRecordTodayParams) (*ListUsageRecordTodayResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Usage/Records/Today.json" + path := "/2010-04-01/Accounts/{AccountSid}/Usage/Records/Today.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Category != nil { - data.Set("Category", *params.Category) -} - if params != nil && params.StartDate != nil { - data.Set("StartDate", fmt.Sprint(*params.StartDate)) -} - if params != nil && params.EndDate != nil { - data.Set("EndDate", fmt.Sprint(*params.EndDate)) -} - if params != nil && params.IncludeSubaccounts != nil { - data.Set("IncludeSubaccounts", fmt.Sprint(*params.IncludeSubaccounts)) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.Category != nil { + data.Set("Category", *params.Category) + } + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) + } + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) + } + if params != nil && params.IncludeSubaccounts != nil { + data.Set("IncludeSubaccounts", fmt.Sprint(*params.IncludeSubaccounts)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListUsageRecordTodayResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListUsageRecordTodayResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListUsageRecordYearlyParams Optional parameters for the method 'ListUsageRecordYearly' type ListUsageRecordYearlyParams struct { - Category *string `json:"Category,omitempty"` - StartDate *time.Time `json:"StartDate,omitempty"` - EndDate *time.Time `json:"EndDate,omitempty"` - IncludeSubaccounts *bool `json:"IncludeSubaccounts,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + Category *string `json:"Category,omitempty"` + StartDate *time.Time `json:"StartDate,omitempty"` + EndDate *time.Time `json:"EndDate,omitempty"` + IncludeSubaccounts *bool `json:"IncludeSubaccounts,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -8210,52 +8061,52 @@ type ListUsageRecordYearlyParams struct { * @param "IncludeSubaccounts" (bool) - Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListUsageRecordYearlyResponse -*/ + */ func (c *DefaultApiService) ListUsageRecordYearly(AccountSid string, params *ListUsageRecordYearlyParams) (*ListUsageRecordYearlyResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Usage/Records/Yearly.json" + path := "/2010-04-01/Accounts/{AccountSid}/Usage/Records/Yearly.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Category != nil { - data.Set("Category", *params.Category) -} - if params != nil && params.StartDate != nil { - data.Set("StartDate", fmt.Sprint(*params.StartDate)) -} - if params != nil && params.EndDate != nil { - data.Set("EndDate", fmt.Sprint(*params.EndDate)) -} - if params != nil && params.IncludeSubaccounts != nil { - data.Set("IncludeSubaccounts", fmt.Sprint(*params.IncludeSubaccounts)) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.Category != nil { + data.Set("Category", *params.Category) + } + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) + } + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) + } + if params != nil && params.IncludeSubaccounts != nil { + data.Set("IncludeSubaccounts", fmt.Sprint(*params.IncludeSubaccounts)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListUsageRecordYearlyResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListUsageRecordYearlyResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListUsageRecordYesterdayParams Optional parameters for the method 'ListUsageRecordYesterday' type ListUsageRecordYesterdayParams struct { - Category *string `json:"Category,omitempty"` - StartDate *time.Time `json:"StartDate,omitempty"` - EndDate *time.Time `json:"EndDate,omitempty"` - IncludeSubaccounts *bool `json:"IncludeSubaccounts,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + Category *string `json:"Category,omitempty"` + StartDate *time.Time `json:"StartDate,omitempty"` + EndDate *time.Time `json:"EndDate,omitempty"` + IncludeSubaccounts *bool `json:"IncludeSubaccounts,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -8268,51 +8119,51 @@ type ListUsageRecordYesterdayParams struct { * @param "IncludeSubaccounts" (bool) - Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListUsageRecordYesterdayResponse -*/ + */ func (c *DefaultApiService) ListUsageRecordYesterday(AccountSid string, params *ListUsageRecordYesterdayParams) (*ListUsageRecordYesterdayResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Usage/Records/Yesterday.json" + path := "/2010-04-01/Accounts/{AccountSid}/Usage/Records/Yesterday.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Category != nil { - data.Set("Category", *params.Category) -} - if params != nil && params.StartDate != nil { - data.Set("StartDate", fmt.Sprint(*params.StartDate)) -} - if params != nil && params.EndDate != nil { - data.Set("EndDate", fmt.Sprint(*params.EndDate)) -} - if params != nil && params.IncludeSubaccounts != nil { - data.Set("IncludeSubaccounts", fmt.Sprint(*params.IncludeSubaccounts)) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.Category != nil { + data.Set("Category", *params.Category) + } + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) + } + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) + } + if params != nil && params.IncludeSubaccounts != nil { + data.Set("IncludeSubaccounts", fmt.Sprint(*params.IncludeSubaccounts)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListUsageRecordYesterdayResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListUsageRecordYesterdayResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListUsageTriggerParams Optional parameters for the method 'ListUsageTrigger' type ListUsageTriggerParams struct { - Recurring *string `json:"Recurring,omitempty"` - TriggerBy *string `json:"TriggerBy,omitempty"` + Recurring *string `json:"Recurring,omitempty"` + TriggerBy *string `json:"TriggerBy,omitempty"` UsageCategory *string `json:"UsageCategory,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -8325,46 +8176,46 @@ type ListUsageTriggerParams struct { * @param "UsageCategory" (string) - The usage category of the UsageTriggers to read. Must be a supported [usage categories](https://www.twilio.com/docs/usage/api/usage-record#usage-categories). * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListUsageTriggerResponse -*/ + */ func (c *DefaultApiService) ListUsageTrigger(AccountSid string, params *ListUsageTriggerParams) (*ListUsageTriggerResponse, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Usage/Triggers.json" + path := "/2010-04-01/Accounts/{AccountSid}/Usage/Triggers.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Recurring != nil { - data.Set("Recurring", *params.Recurring) -} - if params != nil && params.TriggerBy != nil { - data.Set("TriggerBy", *params.TriggerBy) -} - if params != nil && params.UsageCategory != nil { - data.Set("UsageCategory", *params.UsageCategory) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.Recurring != nil { + data.Set("Recurring", *params.Recurring) + } + if params != nil && params.TriggerBy != nil { + data.Set("TriggerBy", *params.TriggerBy) + } + if params != nil && params.UsageCategory != nil { + data.Set("UsageCategory", *params.UsageCategory) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListUsageTriggerResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListUsageTriggerResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateAccountParams Optional parameters for the method 'UpdateAccount' type UpdateAccountParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` - Status *string `json:"Status,omitempty"` + Status *string `json:"Status,omitempty"` } /* @@ -8375,46 +8226,46 @@ type UpdateAccountParams struct { * @param "FriendlyName" (string) - Update the human-readable description of this Account * @param "Status" (string) - Alter the status of this account: use `closed` to irreversibly close this account, `suspended` to temporarily suspend it, or `active` to reactivate it. * @return ApiV2010Account -*/ + */ func (c *DefaultApiService) UpdateAccount(Sid string, params *UpdateAccountParams) (*ApiV2010Account, error) { - path := "/2010-04-01/Accounts/{Sid}.json" + path := "/2010-04-01/Accounts/{Sid}.json" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) -} + data := url.Values{} + headers := 0 + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010Account{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010Account{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateAddressParams Optional parameters for the method 'UpdateAddress' type UpdateAddressParams struct { - AutoCorrectAddress *bool `json:"AutoCorrectAddress,omitempty"` - City *string `json:"City,omitempty"` - CustomerName *string `json:"CustomerName,omitempty"` - EmergencyEnabled *bool `json:"EmergencyEnabled,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - PostalCode *string `json:"PostalCode,omitempty"` - Region *string `json:"Region,omitempty"` - Street *string `json:"Street,omitempty"` + AutoCorrectAddress *bool `json:"AutoCorrectAddress,omitempty"` + City *string `json:"City,omitempty"` + CustomerName *string `json:"CustomerName,omitempty"` + EmergencyEnabled *bool `json:"EmergencyEnabled,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + PostalCode *string `json:"PostalCode,omitempty"` + Region *string `json:"Region,omitempty"` + Street *string `json:"Street,omitempty"` } /* @@ -8431,72 +8282,72 @@ type UpdateAddressParams struct { * @param "Region" (string) - The state or region of the address. * @param "Street" (string) - The number and street address of the address. * @return ApiV2010AccountAddress -*/ + */ func (c *DefaultApiService) UpdateAddress(AccountSid string, Sid string, params *UpdateAddressParams) (*ApiV2010AccountAddress, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Addresses/{Sid}.json" + path := "/2010-04-01/Accounts/{AccountSid}/Addresses/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.AutoCorrectAddress != nil { - data.Set("AutoCorrectAddress", fmt.Sprint(*params.AutoCorrectAddress)) -} - if params != nil && params.City != nil { - data.Set("City", *params.City) -} - if params != nil && params.CustomerName != nil { - data.Set("CustomerName", *params.CustomerName) -} - if params != nil && params.EmergencyEnabled != nil { - data.Set("EmergencyEnabled", fmt.Sprint(*params.EmergencyEnabled)) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.PostalCode != nil { - data.Set("PostalCode", *params.PostalCode) -} - if params != nil && params.Region != nil { - data.Set("Region", *params.Region) -} - if params != nil && params.Street != nil { - data.Set("Street", *params.Street) -} + data := url.Values{} + headers := 0 + if params != nil && params.AutoCorrectAddress != nil { + data.Set("AutoCorrectAddress", fmt.Sprint(*params.AutoCorrectAddress)) + } + if params != nil && params.City != nil { + data.Set("City", *params.City) + } + if params != nil && params.CustomerName != nil { + data.Set("CustomerName", *params.CustomerName) + } + if params != nil && params.EmergencyEnabled != nil { + data.Set("EmergencyEnabled", fmt.Sprint(*params.EmergencyEnabled)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.PostalCode != nil { + data.Set("PostalCode", *params.PostalCode) + } + if params != nil && params.Region != nil { + data.Set("Region", *params.Region) + } + if params != nil && params.Street != nil { + data.Set("Street", *params.Street) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountAddress{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountAddress{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateApplicationParams Optional parameters for the method 'UpdateApplication' type UpdateApplicationParams struct { - ApiVersion *string `json:"ApiVersion,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` + ApiVersion *string `json:"ApiVersion,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` MessageStatusCallback *string `json:"MessageStatusCallback,omitempty"` - SmsFallbackMethod *string `json:"SmsFallbackMethod,omitempty"` - SmsFallbackUrl *string `json:"SmsFallbackUrl,omitempty"` - SmsMethod *string `json:"SmsMethod,omitempty"` - SmsStatusCallback *string `json:"SmsStatusCallback,omitempty"` - SmsUrl *string `json:"SmsUrl,omitempty"` - StatusCallback *string `json:"StatusCallback,omitempty"` - StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` - VoiceCallerIdLookup *bool `json:"VoiceCallerIdLookup,omitempty"` - VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"` - VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` - VoiceMethod *string `json:"VoiceMethod,omitempty"` - VoiceUrl *string `json:"VoiceUrl,omitempty"` + SmsFallbackMethod *string `json:"SmsFallbackMethod,omitempty"` + SmsFallbackUrl *string `json:"SmsFallbackUrl,omitempty"` + SmsMethod *string `json:"SmsMethod,omitempty"` + SmsStatusCallback *string `json:"SmsStatusCallback,omitempty"` + SmsUrl *string `json:"SmsUrl,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` + StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` + VoiceCallerIdLookup *bool `json:"VoiceCallerIdLookup,omitempty"` + VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"` + VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` + VoiceMethod *string `json:"VoiceMethod,omitempty"` + VoiceUrl *string `json:"VoiceUrl,omitempty"` } /* @@ -8521,86 +8372,86 @@ type UpdateApplicationParams struct { * @param "VoiceMethod" (string) - The HTTP method we should use to call `voice_url`. Can be: `GET` or `POST`. * @param "VoiceUrl" (string) - The URL we should call when the phone number assigned to this application receives a call. * @return ApiV2010AccountApplication -*/ + */ func (c *DefaultApiService) UpdateApplication(AccountSid string, Sid string, params *UpdateApplicationParams) (*ApiV2010AccountApplication, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Applications/{Sid}.json" + path := "/2010-04-01/Accounts/{AccountSid}/Applications/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.ApiVersion != nil { - data.Set("ApiVersion", *params.ApiVersion) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.MessageStatusCallback != nil { - data.Set("MessageStatusCallback", *params.MessageStatusCallback) -} - if params != nil && params.SmsFallbackMethod != nil { - data.Set("SmsFallbackMethod", *params.SmsFallbackMethod) -} - if params != nil && params.SmsFallbackUrl != nil { - data.Set("SmsFallbackUrl", *params.SmsFallbackUrl) -} - if params != nil && params.SmsMethod != nil { - data.Set("SmsMethod", *params.SmsMethod) -} - if params != nil && params.SmsStatusCallback != nil { - data.Set("SmsStatusCallback", *params.SmsStatusCallback) -} - if params != nil && params.SmsUrl != nil { - data.Set("SmsUrl", *params.SmsUrl) -} - if params != nil && params.StatusCallback != nil { - data.Set("StatusCallback", *params.StatusCallback) -} - if params != nil && params.StatusCallbackMethod != nil { - data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) -} - if params != nil && params.VoiceCallerIdLookup != nil { - data.Set("VoiceCallerIdLookup", fmt.Sprint(*params.VoiceCallerIdLookup)) -} - if params != nil && params.VoiceFallbackMethod != nil { - data.Set("VoiceFallbackMethod", *params.VoiceFallbackMethod) -} - if params != nil && params.VoiceFallbackUrl != nil { - data.Set("VoiceFallbackUrl", *params.VoiceFallbackUrl) -} - if params != nil && params.VoiceMethod != nil { - data.Set("VoiceMethod", *params.VoiceMethod) -} - if params != nil && params.VoiceUrl != nil { - data.Set("VoiceUrl", *params.VoiceUrl) -} + data := url.Values{} + headers := 0 + if params != nil && params.ApiVersion != nil { + data.Set("ApiVersion", *params.ApiVersion) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.MessageStatusCallback != nil { + data.Set("MessageStatusCallback", *params.MessageStatusCallback) + } + if params != nil && params.SmsFallbackMethod != nil { + data.Set("SmsFallbackMethod", *params.SmsFallbackMethod) + } + if params != nil && params.SmsFallbackUrl != nil { + data.Set("SmsFallbackUrl", *params.SmsFallbackUrl) + } + if params != nil && params.SmsMethod != nil { + data.Set("SmsMethod", *params.SmsMethod) + } + if params != nil && params.SmsStatusCallback != nil { + data.Set("SmsStatusCallback", *params.SmsStatusCallback) + } + if params != nil && params.SmsUrl != nil { + data.Set("SmsUrl", *params.SmsUrl) + } + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) + } + if params != nil && params.StatusCallbackMethod != nil { + data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) + } + if params != nil && params.VoiceCallerIdLookup != nil { + data.Set("VoiceCallerIdLookup", fmt.Sprint(*params.VoiceCallerIdLookup)) + } + if params != nil && params.VoiceFallbackMethod != nil { + data.Set("VoiceFallbackMethod", *params.VoiceFallbackMethod) + } + if params != nil && params.VoiceFallbackUrl != nil { + data.Set("VoiceFallbackUrl", *params.VoiceFallbackUrl) + } + if params != nil && params.VoiceMethod != nil { + data.Set("VoiceMethod", *params.VoiceMethod) + } + if params != nil && params.VoiceUrl != nil { + data.Set("VoiceUrl", *params.VoiceUrl) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountApplication{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountApplication{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateCallParams Optional parameters for the method 'UpdateCall' type UpdateCallParams struct { - FallbackMethod *string `json:"FallbackMethod,omitempty"` - FallbackUrl *string `json:"FallbackUrl,omitempty"` - Method *string `json:"Method,omitempty"` - Status *string `json:"Status,omitempty"` - StatusCallback *string `json:"StatusCallback,omitempty"` + FallbackMethod *string `json:"FallbackMethod,omitempty"` + FallbackUrl *string `json:"FallbackUrl,omitempty"` + Method *string `json:"Method,omitempty"` + Status *string `json:"Status,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` - Twiml *string `json:"Twiml,omitempty"` - Url *string `json:"Url,omitempty"` + Twiml *string `json:"Twiml,omitempty"` + Url *string `json:"Url,omitempty"` } /* @@ -8618,59 +8469,59 @@ type UpdateCallParams struct { * @param "Twiml" (string) - TwiML instructions for the call Twilio will use without fetching Twiml from url. Twiml and url parameters are mutually exclusive * @param "Url" (string) - The absolute URL that returns the TwiML instructions for the call. We will call this URL using the `method` when the call connects. For more information, see the [Url Parameter](https://www.twilio.com/docs/voice/make-calls#specify-a-url-parameter) section in [Making Calls](https://www.twilio.com/docs/voice/make-calls). * @return ApiV2010AccountCall -*/ + */ func (c *DefaultApiService) UpdateCall(AccountSid string, Sid string, params *UpdateCallParams) (*ApiV2010AccountCall, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Calls/{Sid}.json" + path := "/2010-04-01/Accounts/{AccountSid}/Calls/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.FallbackMethod != nil { - data.Set("FallbackMethod", *params.FallbackMethod) -} - if params != nil && params.FallbackUrl != nil { - data.Set("FallbackUrl", *params.FallbackUrl) -} - if params != nil && params.Method != nil { - data.Set("Method", *params.Method) -} - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) -} - if params != nil && params.StatusCallback != nil { - data.Set("StatusCallback", *params.StatusCallback) -} - if params != nil && params.StatusCallbackMethod != nil { - data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) -} - if params != nil && params.Twiml != nil { - data.Set("Twiml", *params.Twiml) -} - if params != nil && params.Url != nil { - data.Set("Url", *params.Url) -} + data := url.Values{} + headers := 0 + if params != nil && params.FallbackMethod != nil { + data.Set("FallbackMethod", *params.FallbackMethod) + } + if params != nil && params.FallbackUrl != nil { + data.Set("FallbackUrl", *params.FallbackUrl) + } + if params != nil && params.Method != nil { + data.Set("Method", *params.Method) + } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) + } + if params != nil && params.StatusCallbackMethod != nil { + data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) + } + if params != nil && params.Twiml != nil { + data.Set("Twiml", *params.Twiml) + } + if params != nil && params.Url != nil { + data.Set("Url", *params.Url) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountCall{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountCall{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateCallFeedbackParams Optional parameters for the method 'UpdateCallFeedback' type UpdateCallFeedbackParams struct { - Issue *[]string `json:"Issue,omitempty"` - QualityScore *int32 `json:"QualityScore,omitempty"` + Issue *[]string `json:"Issue,omitempty"` + QualityScore *int32 `json:"QualityScore,omitempty"` } /* @@ -8682,41 +8533,41 @@ type UpdateCallFeedbackParams struct { * @param "Issue" ([]string) - One or more issues experienced during the call. The issues can be: `imperfect-audio`, `dropped-call`, `incorrect-caller-id`, `post-dial-delay`, `digits-not-captured`, `audio-latency`, `unsolicited-call`, or `one-way-audio`. * @param "QualityScore" (int32) - The call quality expressed as an integer from `1` to `5` where `1` represents very poor call quality and `5` represents a perfect call. * @return ApiV2010AccountCallCallFeedback -*/ + */ func (c *DefaultApiService) UpdateCallFeedback(AccountSid string, CallSid string, params *UpdateCallFeedbackParams) (*ApiV2010AccountCallCallFeedback, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Feedback.json" + path := "/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Feedback.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Issue != nil { - data.Set("Issue", strings.Join(*params.Issue, ",")) -} - if params != nil && params.QualityScore != nil { - data.Set("QualityScore", fmt.Sprint(*params.QualityScore)) -} + data := url.Values{} + headers := 0 + if params != nil && params.Issue != nil { + data.Set("Issue", strings.Join(*params.Issue, ",")) + } + if params != nil && params.QualityScore != nil { + data.Set("QualityScore", fmt.Sprint(*params.QualityScore)) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountCallCallFeedback{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountCallCallFeedback{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateCallRecordingParams Optional parameters for the method 'UpdateCallRecording' type UpdateCallRecordingParams struct { PauseBehavior *string `json:"PauseBehavior,omitempty"` - Status *string `json:"Status,omitempty"` + Status *string `json:"Status,omitempty"` } /* @@ -8729,43 +8580,43 @@ type UpdateCallRecordingParams struct { * @param "PauseBehavior" (string) - Whether to record during a pause. Can be: `skip` or `silence` and the default is `silence`. `skip` does not record during the pause period, while `silence` will replace the actual audio of the call with silence during the pause period. This parameter only applies when setting `status` is set to `paused`. * @param "Status" (string) - The new status of the recording. Can be: `stopped`, `paused`, `in-progress`. * @return ApiV2010AccountCallCallRecording -*/ + */ func (c *DefaultApiService) UpdateCallRecording(AccountSid string, CallSid string, Sid string, params *UpdateCallRecordingParams) (*ApiV2010AccountCallCallRecording, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Recordings/{Sid}.json" + path := "/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Recordings/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PauseBehavior != nil { - data.Set("PauseBehavior", *params.PauseBehavior) -} - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) -} + data := url.Values{} + headers := 0 + if params != nil && params.PauseBehavior != nil { + data.Set("PauseBehavior", *params.PauseBehavior) + } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountCallCallRecording{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountCallCallRecording{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateConferenceParams Optional parameters for the method 'UpdateConference' type UpdateConferenceParams struct { AnnounceMethod *string `json:"AnnounceMethod,omitempty"` - AnnounceUrl *string `json:"AnnounceUrl,omitempty"` - Status *string `json:"Status,omitempty"` + AnnounceUrl *string `json:"AnnounceUrl,omitempty"` + Status *string `json:"Status,omitempty"` } /* @@ -8777,44 +8628,44 @@ type UpdateConferenceParams struct { * @param "AnnounceUrl" (string) - The URL we should call to announce something into the conference. The URL can return an MP3, a WAV, or a TwiML document with `` or ``. * @param "Status" (string) - The new status of the resource. Can be: Can be: `init`, `in-progress`, or `completed`. Specifying `completed` will end the conference and hang up all participants * @return ApiV2010AccountConference -*/ + */ func (c *DefaultApiService) UpdateConference(AccountSid string, Sid string, params *UpdateConferenceParams) (*ApiV2010AccountConference, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Conferences/{Sid}.json" + path := "/2010-04-01/Accounts/{AccountSid}/Conferences/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.AnnounceMethod != nil { - data.Set("AnnounceMethod", *params.AnnounceMethod) -} - if params != nil && params.AnnounceUrl != nil { - data.Set("AnnounceUrl", *params.AnnounceUrl) -} - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) -} + data := url.Values{} + headers := 0 + if params != nil && params.AnnounceMethod != nil { + data.Set("AnnounceMethod", *params.AnnounceMethod) + } + if params != nil && params.AnnounceUrl != nil { + data.Set("AnnounceUrl", *params.AnnounceUrl) + } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountConference{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountConference{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateConferenceRecordingParams Optional parameters for the method 'UpdateConferenceRecording' type UpdateConferenceRecordingParams struct { PauseBehavior *string `json:"PauseBehavior,omitempty"` - Status *string `json:"Status,omitempty"` + Status *string `json:"Status,omitempty"` } /* @@ -8827,48 +8678,48 @@ type UpdateConferenceRecordingParams struct { * @param "PauseBehavior" (string) - Whether to record during a pause. Can be: `skip` or `silence` and the default is `silence`. `skip` does not record during the pause period, while `silence` will replace the actual audio of the call with silence during the pause period. This parameter only applies when setting `status` is set to `paused`. * @param "Status" (string) - The new status of the recording. Can be: `stopped`, `paused`, `in-progress`. * @return ApiV2010AccountConferenceConferenceRecording -*/ + */ func (c *DefaultApiService) UpdateConferenceRecording(AccountSid string, ConferenceSid string, Sid string, params *UpdateConferenceRecordingParams) (*ApiV2010AccountConferenceConferenceRecording, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Recordings/{Sid}.json" + path := "/2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Recordings/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"ConferenceSid"+"}", ConferenceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PauseBehavior != nil { - data.Set("PauseBehavior", *params.PauseBehavior) -} - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) -} + data := url.Values{} + headers := 0 + if params != nil && params.PauseBehavior != nil { + data.Set("PauseBehavior", *params.PauseBehavior) + } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountConferenceConferenceRecording{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountConferenceConferenceRecording{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateConnectAppParams Optional parameters for the method 'UpdateConnectApp' type UpdateConnectAppParams struct { - AuthorizeRedirectUrl *string `json:"AuthorizeRedirectUrl,omitempty"` - CompanyName *string `json:"CompanyName,omitempty"` - DeauthorizeCallbackMethod *string `json:"DeauthorizeCallbackMethod,omitempty"` - DeauthorizeCallbackUrl *string `json:"DeauthorizeCallbackUrl,omitempty"` - Description *string `json:"Description,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - HomepageUrl *string `json:"HomepageUrl,omitempty"` - Permissions *[]string `json:"Permissions,omitempty"` + AuthorizeRedirectUrl *string `json:"AuthorizeRedirectUrl,omitempty"` + CompanyName *string `json:"CompanyName,omitempty"` + DeauthorizeCallbackMethod *string `json:"DeauthorizeCallbackMethod,omitempty"` + DeauthorizeCallbackUrl *string `json:"DeauthorizeCallbackUrl,omitempty"` + Description *string `json:"Description,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + HomepageUrl *string `json:"HomepageUrl,omitempty"` + Permissions *[]string `json:"Permissions,omitempty"` } /* @@ -8883,83 +8734,83 @@ type UpdateConnectAppParams struct { * @param "DeauthorizeCallbackUrl" (string) - The URL to call using the `deauthorize_callback_method` to de-authorize the Connect App. * @param "Description" (string) - A description of the Connect App. * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It can be up to 64 characters long. -* @param "HomepageUrl" (string) - A public URL where users can obtain more information about this Connect App. -* @param "Permissions" ([]string) - A comma-separated list of the permissions you will request from the users of this ConnectApp. Can include: `get-all` and `post-all`. -* @return ApiV2010AccountConnectApp -*/ -func (c *DefaultApiService) UpdateConnectApp(AccountSid string, Sid string, params *UpdateConnectAppParams) (*ApiV2010AccountConnectApp, error) { - path := "/2010-04-01/Accounts/{AccountSid}/ConnectApps/{Sid}.json" - path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) - path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - - data := url.Values{} - headers := 0 - - if params != nil && params.AuthorizeRedirectUrl != nil { - data.Set("AuthorizeRedirectUrl", *params.AuthorizeRedirectUrl) -} - if params != nil && params.CompanyName != nil { - data.Set("CompanyName", *params.CompanyName) -} - if params != nil && params.DeauthorizeCallbackMethod != nil { - data.Set("DeauthorizeCallbackMethod", *params.DeauthorizeCallbackMethod) -} - if params != nil && params.DeauthorizeCallbackUrl != nil { - data.Set("DeauthorizeCallbackUrl", *params.DeauthorizeCallbackUrl) -} - if params != nil && params.Description != nil { - data.Set("Description", *params.Description) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.HomepageUrl != nil { - data.Set("HomepageUrl", *params.HomepageUrl) -} - if params != nil && params.Permissions != nil { - data.Set("Permissions", strings.Join(*params.Permissions, ",")) -} +* @param "HomepageUrl" (string) - A public URL where users can obtain more information about this Connect App. +* @param "Permissions" ([]string) - A comma-separated list of the permissions you will request from the users of this ConnectApp. Can include: `get-all` and `post-all`. +* @return ApiV2010AccountConnectApp + */ +func (c *DefaultApiService) UpdateConnectApp(AccountSid string, Sid string, params *UpdateConnectAppParams) (*ApiV2010AccountConnectApp, error) { + path := "/2010-04-01/Accounts/{AccountSid}/ConnectApps/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + data := url.Values{} + headers := 0 + + if params != nil && params.AuthorizeRedirectUrl != nil { + data.Set("AuthorizeRedirectUrl", *params.AuthorizeRedirectUrl) + } + if params != nil && params.CompanyName != nil { + data.Set("CompanyName", *params.CompanyName) + } + if params != nil && params.DeauthorizeCallbackMethod != nil { + data.Set("DeauthorizeCallbackMethod", *params.DeauthorizeCallbackMethod) + } + if params != nil && params.DeauthorizeCallbackUrl != nil { + data.Set("DeauthorizeCallbackUrl", *params.DeauthorizeCallbackUrl) + } + if params != nil && params.Description != nil { + data.Set("Description", *params.Description) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.HomepageUrl != nil { + data.Set("HomepageUrl", *params.HomepageUrl) + } + if params != nil && params.Permissions != nil { + data.Set("Permissions", strings.Join(*params.Permissions, ",")) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountConnectApp{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountConnectApp{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateIncomingPhoneNumberParams Optional parameters for the method 'UpdateIncomingPhoneNumber' type UpdateIncomingPhoneNumberParams struct { - AccountSid2 *string `json:"AccountSid,omitempty"` - AddressSid *string `json:"AddressSid,omitempty"` - ApiVersion *string `json:"ApiVersion,omitempty"` - BundleSid *string `json:"BundleSid,omitempty"` - EmergencyAddressSid *string `json:"EmergencyAddressSid,omitempty"` - EmergencyStatus *string `json:"EmergencyStatus,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - IdentitySid *string `json:"IdentitySid,omitempty"` - SmsApplicationSid *string `json:"SmsApplicationSid,omitempty"` - SmsFallbackMethod *string `json:"SmsFallbackMethod,omitempty"` - SmsFallbackUrl *string `json:"SmsFallbackUrl,omitempty"` - SmsMethod *string `json:"SmsMethod,omitempty"` - SmsUrl *string `json:"SmsUrl,omitempty"` - StatusCallback *string `json:"StatusCallback,omitempty"` + AccountSid2 *string `json:"AccountSid,omitempty"` + AddressSid *string `json:"AddressSid,omitempty"` + ApiVersion *string `json:"ApiVersion,omitempty"` + BundleSid *string `json:"BundleSid,omitempty"` + EmergencyAddressSid *string `json:"EmergencyAddressSid,omitempty"` + EmergencyStatus *string `json:"EmergencyStatus,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + IdentitySid *string `json:"IdentitySid,omitempty"` + SmsApplicationSid *string `json:"SmsApplicationSid,omitempty"` + SmsFallbackMethod *string `json:"SmsFallbackMethod,omitempty"` + SmsFallbackUrl *string `json:"SmsFallbackUrl,omitempty"` + SmsMethod *string `json:"SmsMethod,omitempty"` + SmsUrl *string `json:"SmsUrl,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` - TrunkSid *string `json:"TrunkSid,omitempty"` - VoiceApplicationSid *string `json:"VoiceApplicationSid,omitempty"` - VoiceCallerIdLookup *bool `json:"VoiceCallerIdLookup,omitempty"` - VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"` - VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` - VoiceMethod *string `json:"VoiceMethod,omitempty"` - VoiceReceiveMode *string `json:"VoiceReceiveMode,omitempty"` - VoiceUrl *string `json:"VoiceUrl,omitempty"` + TrunkSid *string `json:"TrunkSid,omitempty"` + VoiceApplicationSid *string `json:"VoiceApplicationSid,omitempty"` + VoiceCallerIdLookup *bool `json:"VoiceCallerIdLookup,omitempty"` + VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"` + VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` + VoiceMethod *string `json:"VoiceMethod,omitempty"` + VoiceReceiveMode *string `json:"VoiceReceiveMode,omitempty"` + VoiceUrl *string `json:"VoiceUrl,omitempty"` } /* @@ -8992,100 +8843,100 @@ type UpdateIncomingPhoneNumberParams struct { * @param "VoiceReceiveMode" (string) - The configuration parameter for the phone number to receive incoming voice calls or faxes. Can be: `fax` or `voice` and defaults to `voice`. * @param "VoiceUrl" (string) - The URL that we should call to answer a call to the phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set. * @return ApiV2010AccountIncomingPhoneNumber -*/ + */ func (c *DefaultApiService) UpdateIncomingPhoneNumber(AccountSid string, Sid string, params *UpdateIncomingPhoneNumberParams) (*ApiV2010AccountIncomingPhoneNumber, error) { - path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{Sid}.json" + path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.AccountSid2 != nil { - data.Set("AccountSid2", *params.AccountSid2) -} - if params != nil && params.AddressSid != nil { - data.Set("AddressSid", *params.AddressSid) -} - if params != nil && params.ApiVersion != nil { - data.Set("ApiVersion", *params.ApiVersion) -} - if params != nil && params.BundleSid != nil { - data.Set("BundleSid", *params.BundleSid) -} - if params != nil && params.EmergencyAddressSid != nil { - data.Set("EmergencyAddressSid", *params.EmergencyAddressSid) -} - if params != nil && params.EmergencyStatus != nil { - data.Set("EmergencyStatus", *params.EmergencyStatus) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.IdentitySid != nil { - data.Set("IdentitySid", *params.IdentitySid) -} - if params != nil && params.SmsApplicationSid != nil { - data.Set("SmsApplicationSid", *params.SmsApplicationSid) -} - if params != nil && params.SmsFallbackMethod != nil { - data.Set("SmsFallbackMethod", *params.SmsFallbackMethod) -} - if params != nil && params.SmsFallbackUrl != nil { - data.Set("SmsFallbackUrl", *params.SmsFallbackUrl) -} - if params != nil && params.SmsMethod != nil { - data.Set("SmsMethod", *params.SmsMethod) -} - if params != nil && params.SmsUrl != nil { - data.Set("SmsUrl", *params.SmsUrl) -} - if params != nil && params.StatusCallback != nil { - data.Set("StatusCallback", *params.StatusCallback) -} - if params != nil && params.StatusCallbackMethod != nil { - data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) -} - if params != nil && params.TrunkSid != nil { - data.Set("TrunkSid", *params.TrunkSid) -} - if params != nil && params.VoiceApplicationSid != nil { - data.Set("VoiceApplicationSid", *params.VoiceApplicationSid) -} - if params != nil && params.VoiceCallerIdLookup != nil { - data.Set("VoiceCallerIdLookup", fmt.Sprint(*params.VoiceCallerIdLookup)) -} - if params != nil && params.VoiceFallbackMethod != nil { - data.Set("VoiceFallbackMethod", *params.VoiceFallbackMethod) -} - if params != nil && params.VoiceFallbackUrl != nil { - data.Set("VoiceFallbackUrl", *params.VoiceFallbackUrl) -} - if params != nil && params.VoiceMethod != nil { - data.Set("VoiceMethod", *params.VoiceMethod) -} - if params != nil && params.VoiceReceiveMode != nil { - data.Set("VoiceReceiveMode", *params.VoiceReceiveMode) -} - if params != nil && params.VoiceUrl != nil { - data.Set("VoiceUrl", *params.VoiceUrl) -} + data := url.Values{} + headers := 0 + if params != nil && params.AccountSid2 != nil { + data.Set("AccountSid2", *params.AccountSid2) + } + if params != nil && params.AddressSid != nil { + data.Set("AddressSid", *params.AddressSid) + } + if params != nil && params.ApiVersion != nil { + data.Set("ApiVersion", *params.ApiVersion) + } + if params != nil && params.BundleSid != nil { + data.Set("BundleSid", *params.BundleSid) + } + if params != nil && params.EmergencyAddressSid != nil { + data.Set("EmergencyAddressSid", *params.EmergencyAddressSid) + } + if params != nil && params.EmergencyStatus != nil { + data.Set("EmergencyStatus", *params.EmergencyStatus) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.IdentitySid != nil { + data.Set("IdentitySid", *params.IdentitySid) + } + if params != nil && params.SmsApplicationSid != nil { + data.Set("SmsApplicationSid", *params.SmsApplicationSid) + } + if params != nil && params.SmsFallbackMethod != nil { + data.Set("SmsFallbackMethod", *params.SmsFallbackMethod) + } + if params != nil && params.SmsFallbackUrl != nil { + data.Set("SmsFallbackUrl", *params.SmsFallbackUrl) + } + if params != nil && params.SmsMethod != nil { + data.Set("SmsMethod", *params.SmsMethod) + } + if params != nil && params.SmsUrl != nil { + data.Set("SmsUrl", *params.SmsUrl) + } + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) + } + if params != nil && params.StatusCallbackMethod != nil { + data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) + } + if params != nil && params.TrunkSid != nil { + data.Set("TrunkSid", *params.TrunkSid) + } + if params != nil && params.VoiceApplicationSid != nil { + data.Set("VoiceApplicationSid", *params.VoiceApplicationSid) + } + if params != nil && params.VoiceCallerIdLookup != nil { + data.Set("VoiceCallerIdLookup", fmt.Sprint(*params.VoiceCallerIdLookup)) + } + if params != nil && params.VoiceFallbackMethod != nil { + data.Set("VoiceFallbackMethod", *params.VoiceFallbackMethod) + } + if params != nil && params.VoiceFallbackUrl != nil { + data.Set("VoiceFallbackUrl", *params.VoiceFallbackUrl) + } + if params != nil && params.VoiceMethod != nil { + data.Set("VoiceMethod", *params.VoiceMethod) + } + if params != nil && params.VoiceReceiveMode != nil { + data.Set("VoiceReceiveMode", *params.VoiceReceiveMode) + } + if params != nil && params.VoiceUrl != nil { + data.Set("VoiceUrl", *params.VoiceUrl) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountIncomingPhoneNumber{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountIncomingPhoneNumber{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateKeyParams Optional parameters for the method 'UpdateKey' type UpdateKeyParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` @@ -9098,38 +8949,38 @@ type UpdateKeyParams struct { * @param optional nil or *UpdateKeyParams - Optional Parameters: * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It can be up to 64 characters long. * @return ApiV2010AccountKey -*/ + */ func (c *DefaultApiService) UpdateKey(AccountSid string, Sid string, params *UpdateKeyParams) (*ApiV2010AccountKey, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Keys/{Sid}.json" + path := "/2010-04-01/Accounts/{AccountSid}/Keys/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} + data := url.Values{} + headers := 0 + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountKey{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountKey{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateMemberParams Optional parameters for the method 'UpdateMember' type UpdateMemberParams struct { Method *string `json:"Method,omitempty"` - Url *string `json:"Url,omitempty"` + Url *string `json:"Url,omitempty"` } /* @@ -9142,38 +8993,38 @@ type UpdateMemberParams struct { * @param "Method" (string) - How to pass the update request data. Can be `GET` or `POST` and the default is `POST`. `POST` sends the data as encoded form data and `GET` sends the data as query parameters. * @param "Url" (string) - The absolute URL of the Queue resource. * @return ApiV2010AccountQueueMember -*/ + */ func (c *DefaultApiService) UpdateMember(AccountSid string, QueueSid string, CallSid string, params *UpdateMemberParams) (*ApiV2010AccountQueueMember, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Queues/{QueueSid}/Members/{CallSid}.json" + path := "/2010-04-01/Accounts/{AccountSid}/Queues/{QueueSid}/Members/{CallSid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"QueueSid"+"}", QueueSid, -1) path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Method != nil { - data.Set("Method", *params.Method) -} - if params != nil && params.Url != nil { - data.Set("Url", *params.Url) -} + data := url.Values{} + headers := 0 + if params != nil && params.Method != nil { + data.Set("Method", *params.Method) + } + if params != nil && params.Url != nil { + data.Set("Url", *params.Url) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountQueueMember{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountQueueMember{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateMessageParams Optional parameters for the method 'UpdateMessage' type UpdateMessageParams struct { Body *string `json:"Body,omitempty"` @@ -9187,34 +9038,34 @@ type UpdateMessageParams struct { * @param optional nil or *UpdateMessageParams - Optional Parameters: * @param "Body" (string) - The text of the message you want to send. Can be up to 1,600 characters long. * @return ApiV2010AccountMessage -*/ + */ func (c *DefaultApiService) UpdateMessage(AccountSid string, Sid string, params *UpdateMessageParams) (*ApiV2010AccountMessage, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Messages/{Sid}.json" + path := "/2010-04-01/Accounts/{AccountSid}/Messages/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Body != nil { - data.Set("Body", *params.Body) -} + data := url.Values{} + headers := 0 + if params != nil && params.Body != nil { + data.Set("Body", *params.Body) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountMessage{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountMessage{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateOutgoingCallerIdParams Optional parameters for the method 'UpdateOutgoingCallerId' type UpdateOutgoingCallerIdParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` @@ -9228,48 +9079,48 @@ type UpdateOutgoingCallerIdParams struct { * @param optional nil or *UpdateOutgoingCallerIdParams - Optional Parameters: * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It can be up to 64 characters long. * @return ApiV2010AccountOutgoingCallerId -*/ + */ func (c *DefaultApiService) UpdateOutgoingCallerId(AccountSid string, Sid string, params *UpdateOutgoingCallerIdParams) (*ApiV2010AccountOutgoingCallerId, error) { - path := "/2010-04-01/Accounts/{AccountSid}/OutgoingCallerIds/{Sid}.json" + path := "/2010-04-01/Accounts/{AccountSid}/OutgoingCallerIds/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} + data := url.Values{} + headers := 0 + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountOutgoingCallerId{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountOutgoingCallerId{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateParticipantParams Optional parameters for the method 'UpdateParticipant' type UpdateParticipantParams struct { - AnnounceMethod *string `json:"AnnounceMethod,omitempty"` - AnnounceUrl *string `json:"AnnounceUrl,omitempty"` - BeepOnExit *bool `json:"BeepOnExit,omitempty"` - CallSidToCoach *string `json:"CallSidToCoach,omitempty"` - Coaching *bool `json:"Coaching,omitempty"` - EndConferenceOnExit *bool `json:"EndConferenceOnExit,omitempty"` - Hold *bool `json:"Hold,omitempty"` - HoldMethod *string `json:"HoldMethod,omitempty"` - HoldUrl *string `json:"HoldUrl,omitempty"` - Muted *bool `json:"Muted,omitempty"` - WaitMethod *string `json:"WaitMethod,omitempty"` - WaitUrl *string `json:"WaitUrl,omitempty"` + AnnounceMethod *string `json:"AnnounceMethod,omitempty"` + AnnounceUrl *string `json:"AnnounceUrl,omitempty"` + BeepOnExit *bool `json:"BeepOnExit,omitempty"` + CallSidToCoach *string `json:"CallSidToCoach,omitempty"` + Coaching *bool `json:"Coaching,omitempty"` + EndConferenceOnExit *bool `json:"EndConferenceOnExit,omitempty"` + Hold *bool `json:"Hold,omitempty"` + HoldMethod *string `json:"HoldMethod,omitempty"` + HoldUrl *string `json:"HoldUrl,omitempty"` + Muted *bool `json:"Muted,omitempty"` + WaitMethod *string `json:"WaitMethod,omitempty"` + WaitUrl *string `json:"WaitUrl,omitempty"` } /* @@ -9292,73 +9143,73 @@ type UpdateParticipantParams struct { * @param "WaitMethod" (string) - The HTTP method we should use to call `wait_url`. Can be `GET` or `POST` and the default is `POST`. When using a static audio file, this should be `GET` so that we can cache the file. * @param "WaitUrl" (string) - The URL we should call using the `wait_method` for the music to play while participants are waiting for the conference to start. The default value is the URL of our standard hold music. [Learn more about hold music](https://www.twilio.com/labs/twimlets/holdmusic). * @return ApiV2010AccountConferenceParticipant -*/ + */ func (c *DefaultApiService) UpdateParticipant(AccountSid string, ConferenceSid string, CallSid string, params *UpdateParticipantParams) (*ApiV2010AccountConferenceParticipant, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Participants/{CallSid}.json" + path := "/2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Participants/{CallSid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"ConferenceSid"+"}", ConferenceSid, -1) path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.AnnounceMethod != nil { - data.Set("AnnounceMethod", *params.AnnounceMethod) -} - if params != nil && params.AnnounceUrl != nil { - data.Set("AnnounceUrl", *params.AnnounceUrl) -} - if params != nil && params.BeepOnExit != nil { - data.Set("BeepOnExit", fmt.Sprint(*params.BeepOnExit)) -} - if params != nil && params.CallSidToCoach != nil { - data.Set("CallSidToCoach", *params.CallSidToCoach) -} - if params != nil && params.Coaching != nil { - data.Set("Coaching", fmt.Sprint(*params.Coaching)) -} - if params != nil && params.EndConferenceOnExit != nil { - data.Set("EndConferenceOnExit", fmt.Sprint(*params.EndConferenceOnExit)) -} - if params != nil && params.Hold != nil { - data.Set("Hold", fmt.Sprint(*params.Hold)) -} - if params != nil && params.HoldMethod != nil { - data.Set("HoldMethod", *params.HoldMethod) -} - if params != nil && params.HoldUrl != nil { - data.Set("HoldUrl", *params.HoldUrl) -} - if params != nil && params.Muted != nil { - data.Set("Muted", fmt.Sprint(*params.Muted)) -} - if params != nil && params.WaitMethod != nil { - data.Set("WaitMethod", *params.WaitMethod) -} - if params != nil && params.WaitUrl != nil { - data.Set("WaitUrl", *params.WaitUrl) -} + data := url.Values{} + headers := 0 + if params != nil && params.AnnounceMethod != nil { + data.Set("AnnounceMethod", *params.AnnounceMethod) + } + if params != nil && params.AnnounceUrl != nil { + data.Set("AnnounceUrl", *params.AnnounceUrl) + } + if params != nil && params.BeepOnExit != nil { + data.Set("BeepOnExit", fmt.Sprint(*params.BeepOnExit)) + } + if params != nil && params.CallSidToCoach != nil { + data.Set("CallSidToCoach", *params.CallSidToCoach) + } + if params != nil && params.Coaching != nil { + data.Set("Coaching", fmt.Sprint(*params.Coaching)) + } + if params != nil && params.EndConferenceOnExit != nil { + data.Set("EndConferenceOnExit", fmt.Sprint(*params.EndConferenceOnExit)) + } + if params != nil && params.Hold != nil { + data.Set("Hold", fmt.Sprint(*params.Hold)) + } + if params != nil && params.HoldMethod != nil { + data.Set("HoldMethod", *params.HoldMethod) + } + if params != nil && params.HoldUrl != nil { + data.Set("HoldUrl", *params.HoldUrl) + } + if params != nil && params.Muted != nil { + data.Set("Muted", fmt.Sprint(*params.Muted)) + } + if params != nil && params.WaitMethod != nil { + data.Set("WaitMethod", *params.WaitMethod) + } + if params != nil && params.WaitUrl != nil { + data.Set("WaitUrl", *params.WaitUrl) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountConferenceParticipant{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountConferenceParticipant{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdatePaymentsParams Optional parameters for the method 'UpdatePayments' type UpdatePaymentsParams struct { - Capture *string `json:"Capture,omitempty"` + Capture *string `json:"Capture,omitempty"` IdempotencyKey *string `json:"IdempotencyKey,omitempty"` - Status *string `json:"Status,omitempty"` + Status *string `json:"Status,omitempty"` StatusCallback *string `json:"StatusCallback,omitempty"` } @@ -9374,48 +9225,48 @@ type UpdatePaymentsParams struct { * @param "Status" (string) - Indicates whether the current payment session should be cancelled or completed. When `cancel` the payment session is cancelled. When `complete`, Twilio sends the payment information to the selected connector for processing. * @param "StatusCallback" (string) - Provide an absolute or relative URL to receive status updates regarding your Pay session. Read more about the [Update](https://www.twilio.com/docs/voice/api/payment-resource#statuscallback-update) and [Complete/Cancel](https://www.twilio.com/docs/voice/api/payment-resource#statuscallback-cancelcomplete) POST requests. * @return ApiV2010AccountCallPayments -*/ + */ func (c *DefaultApiService) UpdatePayments(AccountSid string, CallSid string, Sid string, params *UpdatePaymentsParams) (*ApiV2010AccountCallPayments, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Payments/{Sid}.json" + path := "/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Payments/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Capture != nil { - data.Set("Capture", *params.Capture) -} - if params != nil && params.IdempotencyKey != nil { - data.Set("IdempotencyKey", *params.IdempotencyKey) -} - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) -} - if params != nil && params.StatusCallback != nil { - data.Set("StatusCallback", *params.StatusCallback) -} + data := url.Values{} + headers := 0 + if params != nil && params.Capture != nil { + data.Set("Capture", *params.Capture) + } + if params != nil && params.IdempotencyKey != nil { + data.Set("IdempotencyKey", *params.IdempotencyKey) + } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountCallPayments{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountCallPayments{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateQueueParams Optional parameters for the method 'UpdateQueue' type UpdateQueueParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` - MaxSize *int32 `json:"MaxSize,omitempty"` + MaxSize *int32 `json:"MaxSize,omitempty"` } /* @@ -9427,45 +9278,45 @@ type UpdateQueueParams struct { * @param "FriendlyName" (string) - A descriptive string that you created to describe this resource. It can be up to 64 characters long. * @param "MaxSize" (int32) - The maximum number of calls allowed to be in the queue. The default is 100. The maximum is 5000. * @return ApiV2010AccountQueue -*/ + */ func (c *DefaultApiService) UpdateQueue(AccountSid string, Sid string, params *UpdateQueueParams) (*ApiV2010AccountQueue, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Queues/{Sid}.json" + path := "/2010-04-01/Accounts/{AccountSid}/Queues/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.MaxSize != nil { - data.Set("MaxSize", fmt.Sprint(*params.MaxSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.MaxSize != nil { + data.Set("MaxSize", fmt.Sprint(*params.MaxSize)) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountQueue{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountQueue{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateShortCodeParams Optional parameters for the method 'UpdateShortCode' type UpdateShortCodeParams struct { - ApiVersion *string `json:"ApiVersion,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` + ApiVersion *string `json:"ApiVersion,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` SmsFallbackMethod *string `json:"SmsFallbackMethod,omitempty"` - SmsFallbackUrl *string `json:"SmsFallbackUrl,omitempty"` - SmsMethod *string `json:"SmsMethod,omitempty"` - SmsUrl *string `json:"SmsUrl,omitempty"` + SmsFallbackUrl *string `json:"SmsFallbackUrl,omitempty"` + SmsMethod *string `json:"SmsMethod,omitempty"` + SmsUrl *string `json:"SmsUrl,omitempty"` } /* @@ -9481,49 +9332,49 @@ type UpdateShortCodeParams struct { * @param "SmsMethod" (string) - The HTTP method we should use when calling the `sms_url`. Can be: `GET` or `POST`. * @param "SmsUrl" (string) - The URL we should call when receiving an incoming SMS message to this short code. * @return ApiV2010AccountShortCode -*/ + */ func (c *DefaultApiService) UpdateShortCode(AccountSid string, Sid string, params *UpdateShortCodeParams) (*ApiV2010AccountShortCode, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SMS/ShortCodes/{Sid}.json" + path := "/2010-04-01/Accounts/{AccountSid}/SMS/ShortCodes/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.ApiVersion != nil { - data.Set("ApiVersion", *params.ApiVersion) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.SmsFallbackMethod != nil { - data.Set("SmsFallbackMethod", *params.SmsFallbackMethod) -} - if params != nil && params.SmsFallbackUrl != nil { - data.Set("SmsFallbackUrl", *params.SmsFallbackUrl) -} - if params != nil && params.SmsMethod != nil { - data.Set("SmsMethod", *params.SmsMethod) -} - if params != nil && params.SmsUrl != nil { - data.Set("SmsUrl", *params.SmsUrl) -} + data := url.Values{} + headers := 0 + if params != nil && params.ApiVersion != nil { + data.Set("ApiVersion", *params.ApiVersion) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.SmsFallbackMethod != nil { + data.Set("SmsFallbackMethod", *params.SmsFallbackMethod) + } + if params != nil && params.SmsFallbackUrl != nil { + data.Set("SmsFallbackUrl", *params.SmsFallbackUrl) + } + if params != nil && params.SmsMethod != nil { + data.Set("SmsMethod", *params.SmsMethod) + } + if params != nil && params.SmsUrl != nil { + data.Set("SmsUrl", *params.SmsUrl) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountShortCode{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountShortCode{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateSigningKeyParams Optional parameters for the method 'UpdateSigningKey' type UpdateSigningKeyParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` @@ -9534,36 +9385,36 @@ type UpdateSigningKeyParams struct { * @param AccountSid * @param Sid * @param optional nil or *UpdateSigningKeyParams - Optional Parameters: -* @param "FriendlyName" (string) - +* @param "FriendlyName" (string) - * @return ApiV2010AccountSigningKey -*/ + */ func (c *DefaultApiService) UpdateSigningKey(AccountSid string, Sid string, params *UpdateSigningKeyParams) (*ApiV2010AccountSigningKey, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SigningKeys/{Sid}.json" + path := "/2010-04-01/Accounts/{AccountSid}/SigningKeys/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} + data := url.Values{} + headers := 0 + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountSigningKey{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountSigningKey{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateSipCredentialParams Optional parameters for the method 'UpdateSipCredential' type UpdateSipCredentialParams struct { Password *string `json:"Password,omitempty"` @@ -9578,35 +9429,35 @@ type UpdateSipCredentialParams struct { * @param optional nil or *UpdateSipCredentialParams - Optional Parameters: * @param "Password" (string) - The password that the username will use when authenticating SIP requests. The password must be a minimum of 12 characters, contain at least 1 digit, and have mixed case. (eg `IWasAtSignal2018`) * @return ApiV2010AccountSipSipCredentialListSipCredential -*/ + */ func (c *DefaultApiService) UpdateSipCredential(AccountSid string, CredentialListSid string, Sid string, params *UpdateSipCredentialParams) (*ApiV2010AccountSipSipCredentialListSipCredential, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{CredentialListSid}/Credentials/{Sid}.json" + path := "/2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{CredentialListSid}/Credentials/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"CredentialListSid"+"}", CredentialListSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Password != nil { - data.Set("Password", *params.Password) -} + data := url.Values{} + headers := 0 + if params != nil && params.Password != nil { + data.Set("Password", *params.Password) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountSipSipCredentialListSipCredential{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountSipSipCredentialListSipCredential{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateSipCredentialListParams Optional parameters for the method 'UpdateSipCredentialList' type UpdateSipCredentialListParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` @@ -9620,49 +9471,49 @@ type UpdateSipCredentialListParams struct { * @param optional nil or *UpdateSipCredentialListParams - Optional Parameters: * @param "FriendlyName" (string) - A human readable descriptive text for a CredentialList, up to 64 characters long. * @return ApiV2010AccountSipSipCredentialList -*/ + */ func (c *DefaultApiService) UpdateSipCredentialList(AccountSid string, Sid string, params *UpdateSipCredentialListParams) (*ApiV2010AccountSipSipCredentialList, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{Sid}.json" + path := "/2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} + data := url.Values{} + headers := 0 + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountSipSipCredentialList{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountSipSipCredentialList{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateSipDomainParams Optional parameters for the method 'UpdateSipDomain' type UpdateSipDomainParams struct { - ByocTrunkSid *string `json:"ByocTrunkSid,omitempty"` - DomainName *string `json:"DomainName,omitempty"` - EmergencyCallerSid *string `json:"EmergencyCallerSid,omitempty"` - EmergencyCallingEnabled *bool `json:"EmergencyCallingEnabled,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Secure *bool `json:"Secure,omitempty"` - SipRegistration *bool `json:"SipRegistration,omitempty"` - VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"` - VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` - VoiceMethod *string `json:"VoiceMethod,omitempty"` + ByocTrunkSid *string `json:"ByocTrunkSid,omitempty"` + DomainName *string `json:"DomainName,omitempty"` + EmergencyCallerSid *string `json:"EmergencyCallerSid,omitempty"` + EmergencyCallingEnabled *bool `json:"EmergencyCallingEnabled,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Secure *bool `json:"Secure,omitempty"` + SipRegistration *bool `json:"SipRegistration,omitempty"` + VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"` + VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` + VoiceMethod *string `json:"VoiceMethod,omitempty"` VoiceStatusCallbackMethod *string `json:"VoiceStatusCallbackMethod,omitempty"` - VoiceStatusCallbackUrl *string `json:"VoiceStatusCallbackUrl,omitempty"` - VoiceUrl *string `json:"VoiceUrl,omitempty"` + VoiceStatusCallbackUrl *string `json:"VoiceStatusCallbackUrl,omitempty"` + VoiceUrl *string `json:"VoiceUrl,omitempty"` } /* @@ -9685,70 +9536,70 @@ type UpdateSipDomainParams struct { * @param "VoiceStatusCallbackUrl" (string) - The URL that we should call to pass status parameters (such as call ended) to your application. * @param "VoiceUrl" (string) - The URL we should call when the domain receives a call. * @return ApiV2010AccountSipSipDomain -*/ + */ func (c *DefaultApiService) UpdateSipDomain(AccountSid string, Sid string, params *UpdateSipDomainParams) (*ApiV2010AccountSipSipDomain, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{Sid}.json" + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.ByocTrunkSid != nil { - data.Set("ByocTrunkSid", *params.ByocTrunkSid) -} - if params != nil && params.DomainName != nil { - data.Set("DomainName", *params.DomainName) -} - if params != nil && params.EmergencyCallerSid != nil { - data.Set("EmergencyCallerSid", *params.EmergencyCallerSid) -} - if params != nil && params.EmergencyCallingEnabled != nil { - data.Set("EmergencyCallingEnabled", fmt.Sprint(*params.EmergencyCallingEnabled)) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.Secure != nil { - data.Set("Secure", fmt.Sprint(*params.Secure)) -} - if params != nil && params.SipRegistration != nil { - data.Set("SipRegistration", fmt.Sprint(*params.SipRegistration)) -} - if params != nil && params.VoiceFallbackMethod != nil { - data.Set("VoiceFallbackMethod", *params.VoiceFallbackMethod) -} - if params != nil && params.VoiceFallbackUrl != nil { - data.Set("VoiceFallbackUrl", *params.VoiceFallbackUrl) -} - if params != nil && params.VoiceMethod != nil { - data.Set("VoiceMethod", *params.VoiceMethod) -} - if params != nil && params.VoiceStatusCallbackMethod != nil { - data.Set("VoiceStatusCallbackMethod", *params.VoiceStatusCallbackMethod) -} - if params != nil && params.VoiceStatusCallbackUrl != nil { - data.Set("VoiceStatusCallbackUrl", *params.VoiceStatusCallbackUrl) -} - if params != nil && params.VoiceUrl != nil { - data.Set("VoiceUrl", *params.VoiceUrl) -} + data := url.Values{} + headers := 0 + if params != nil && params.ByocTrunkSid != nil { + data.Set("ByocTrunkSid", *params.ByocTrunkSid) + } + if params != nil && params.DomainName != nil { + data.Set("DomainName", *params.DomainName) + } + if params != nil && params.EmergencyCallerSid != nil { + data.Set("EmergencyCallerSid", *params.EmergencyCallerSid) + } + if params != nil && params.EmergencyCallingEnabled != nil { + data.Set("EmergencyCallingEnabled", fmt.Sprint(*params.EmergencyCallingEnabled)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Secure != nil { + data.Set("Secure", fmt.Sprint(*params.Secure)) + } + if params != nil && params.SipRegistration != nil { + data.Set("SipRegistration", fmt.Sprint(*params.SipRegistration)) + } + if params != nil && params.VoiceFallbackMethod != nil { + data.Set("VoiceFallbackMethod", *params.VoiceFallbackMethod) + } + if params != nil && params.VoiceFallbackUrl != nil { + data.Set("VoiceFallbackUrl", *params.VoiceFallbackUrl) + } + if params != nil && params.VoiceMethod != nil { + data.Set("VoiceMethod", *params.VoiceMethod) + } + if params != nil && params.VoiceStatusCallbackMethod != nil { + data.Set("VoiceStatusCallbackMethod", *params.VoiceStatusCallbackMethod) + } + if params != nil && params.VoiceStatusCallbackUrl != nil { + data.Set("VoiceStatusCallbackUrl", *params.VoiceStatusCallbackUrl) + } + if params != nil && params.VoiceUrl != nil { + data.Set("VoiceUrl", *params.VoiceUrl) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountSipSipDomain{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountSipSipDomain{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateSipIpAccessControlListParams Optional parameters for the method 'UpdateSipIpAccessControlList' type UpdateSipIpAccessControlListParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` @@ -9762,39 +9613,39 @@ type UpdateSipIpAccessControlListParams struct { * @param optional nil or *UpdateSipIpAccessControlListParams - Optional Parameters: * @param "FriendlyName" (string) - A human readable descriptive text, up to 64 characters long. * @return ApiV2010AccountSipSipIpAccessControlList -*/ + */ func (c *DefaultApiService) UpdateSipIpAccessControlList(AccountSid string, Sid string, params *UpdateSipIpAccessControlListParams) (*ApiV2010AccountSipSipIpAccessControlList, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists/{Sid}.json" + path := "/2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} + data := url.Values{} + headers := 0 + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountSipSipIpAccessControlList{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountSipSipIpAccessControlList{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateSipIpAddressParams Optional parameters for the method 'UpdateSipIpAddress' type UpdateSipIpAddressParams struct { - CidrPrefixLength *int32 `json:"CidrPrefixLength,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - IpAddress *string `json:"IpAddress,omitempty"` + CidrPrefixLength *int32 `json:"CidrPrefixLength,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + IpAddress *string `json:"IpAddress,omitempty"` } /* @@ -9808,46 +9659,46 @@ type UpdateSipIpAddressParams struct { * @param "FriendlyName" (string) - A human readable descriptive text for this resource, up to 64 characters long. * @param "IpAddress" (string) - An IP address in dotted decimal notation from which you want to accept traffic. Any SIP requests from this IP address will be allowed by Twilio. IPv4 only supported today. * @return ApiV2010AccountSipSipIpAccessControlListSipIpAddress -*/ + */ func (c *DefaultApiService) UpdateSipIpAddress(AccountSid string, IpAccessControlListSid string, Sid string, params *UpdateSipIpAddressParams) (*ApiV2010AccountSipSipIpAccessControlListSipIpAddress, error) { - path := "/2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists/{IpAccessControlListSid}/IpAddresses/{Sid}.json" + path := "/2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists/{IpAccessControlListSid}/IpAddresses/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"IpAccessControlListSid"+"}", IpAccessControlListSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.CidrPrefixLength != nil { - data.Set("CidrPrefixLength", fmt.Sprint(*params.CidrPrefixLength)) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.IpAddress != nil { - data.Set("IpAddress", *params.IpAddress) -} + data := url.Values{} + headers := 0 + if params != nil && params.CidrPrefixLength != nil { + data.Set("CidrPrefixLength", fmt.Sprint(*params.CidrPrefixLength)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.IpAddress != nil { + data.Set("IpAddress", *params.IpAddress) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountSipSipIpAccessControlListSipIpAddress{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountSipSipIpAccessControlListSipIpAddress{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateUsageTriggerParams Optional parameters for the method 'UpdateUsageTrigger' type UpdateUsageTriggerParams struct { CallbackMethod *string `json:"CallbackMethod,omitempty"` - CallbackUrl *string `json:"CallbackUrl,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` + CallbackUrl *string `json:"CallbackUrl,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` } /* @@ -9860,37 +9711,36 @@ type UpdateUsageTriggerParams struct { * @param "CallbackUrl" (string) - The URL we should call using `callback_method` when the trigger fires. * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It can be up to 64 characters long. * @return ApiV2010AccountUsageUsageTrigger -*/ + */ func (c *DefaultApiService) UpdateUsageTrigger(AccountSid string, Sid string, params *UpdateUsageTriggerParams) (*ApiV2010AccountUsageUsageTrigger, error) { - path := "/2010-04-01/Accounts/{AccountSid}/Usage/Triggers/{Sid}.json" + path := "/2010-04-01/Accounts/{AccountSid}/Usage/Triggers/{Sid}.json" path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.CallbackMethod != nil { - data.Set("CallbackMethod", *params.CallbackMethod) -} - if params != nil && params.CallbackUrl != nil { - data.Set("CallbackUrl", *params.CallbackUrl) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} + data := url.Values{} + headers := 0 + if params != nil && params.CallbackMethod != nil { + data.Set("CallbackMethod", *params.CallbackMethod) + } + if params != nil && params.CallbackUrl != nil { + data.Set("CallbackUrl", *params.CallbackUrl) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ApiV2010AccountUsageUsageTrigger{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ApiV2010AccountUsageUsageTrigger{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } diff --git a/twilio/rest/api/v2010/model_api_v2010_account.go b/twilio/rest/api/v2010/model_api_v2010_account.go index 37bc727fc..16fa4e3bd 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account.go +++ b/twilio/rest/api/v2010/model_api_v2010_account.go @@ -1,15 +1,16 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ApiV2010Account struct for ApiV2010Account type ApiV2010Account struct { // The authorization token for this account diff --git a/twilio/rest/api/v2010/model_api_v2010_account_address.go b/twilio/rest/api/v2010/model_api_v2010_account_address.go index 5d452451c..64f55887a 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_address.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_address.go @@ -1,15 +1,16 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ApiV2010AccountAddress struct for ApiV2010AccountAddress type ApiV2010AccountAddress struct { // The SID of the Account that is responsible for the resource diff --git a/twilio/rest/api/v2010/model_api_v2010_account_address_dependent_phone_number.go b/twilio/rest/api/v2010/model_api_v2010_account_address_dependent_phone_number.go index cd1e86000..a87291f87 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_address_dependent_phone_number.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_address_dependent_phone_number.go @@ -1,15 +1,16 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ApiV2010AccountAddressDependentPhoneNumber struct for ApiV2010AccountAddressDependentPhoneNumber type ApiV2010AccountAddressDependentPhoneNumber struct { // The SID of the Account that created the resource diff --git a/twilio/rest/api/v2010/model_api_v2010_account_application.go b/twilio/rest/api/v2010/model_api_v2010_account_application.go index 3943f92fd..b9d5d709a 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_application.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_application.go @@ -1,15 +1,16 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ApiV2010AccountApplication struct for ApiV2010AccountApplication type ApiV2010AccountApplication struct { // The SID of the Account that created the resource diff --git a/twilio/rest/api/v2010/model_api_v2010_account_authorized_connect_app.go b/twilio/rest/api/v2010/model_api_v2010_account_authorized_connect_app.go index eb7e4be91..65a096253 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_authorized_connect_app.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_authorized_connect_app.go @@ -1,15 +1,16 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ApiV2010AccountAuthorizedConnectApp struct for ApiV2010AccountAuthorizedConnectApp type ApiV2010AccountAuthorizedConnectApp struct { // The SID of the Account that created the resource diff --git a/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country.go b/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country.go index 04dc8cf3e..f22c0d71c 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country.go @@ -1,15 +1,16 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ApiV2010AccountAvailablePhoneNumberCountry struct for ApiV2010AccountAvailablePhoneNumberCountry type ApiV2010AccountAvailablePhoneNumberCountry struct { // Whether all phone numbers available in the country are new to the Twilio platform. diff --git a/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_local.go b/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_local.go index 8d8d9b5ca..2a53f8999 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_local.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_local.go @@ -1,21 +1,22 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocal struct for ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocal type ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocal struct { // The type of Address resource the phone number requires AddressRequirements *string `json:"AddressRequirements,omitempty"` // Whether the phone number is new to the Twilio platform - Beta *bool `json:"Beta,omitempty"` + Beta *bool `json:"Beta,omitempty"` Capabilities *ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocalCapabilities `json:"Capabilities,omitempty"` // A formatted version of the phone number FriendlyName *string `json:"FriendlyName,omitempty"` diff --git a/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_local_capabilities.go b/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_local_capabilities.go index 3decb1dfd..bcf296000 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_local_capabilities.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_local_capabilities.go @@ -1,19 +1,20 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocalCapabilities Whether a phone number can receive calls or messages type ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocalCapabilities struct { - Fax bool `json:"Fax,omitempty"` - Mms bool `json:"Mms,omitempty"` - Sms bool `json:"Sms,omitempty"` + Fax bool `json:"Fax,omitempty"` + Mms bool `json:"Mms,omitempty"` + Sms bool `json:"Sms,omitempty"` Voice bool `json:"Voice,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_machine_to_machine.go b/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_machine_to_machine.go index 4af6334cb..d471ee908 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_machine_to_machine.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_machine_to_machine.go @@ -1,21 +1,22 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberMachineToMachine struct for ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberMachineToMachine type ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberMachineToMachine struct { // The type of Address resource the phone number requires AddressRequirements *string `json:"AddressRequirements,omitempty"` // Whether the phone number is new to the Twilio platform - Beta *bool `json:"Beta,omitempty"` + Beta *bool `json:"Beta,omitempty"` Capabilities *ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocalCapabilities `json:"Capabilities,omitempty"` // A formatted version of the phone number FriendlyName *string `json:"FriendlyName,omitempty"` diff --git a/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_mobile.go b/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_mobile.go index 7f58d9767..e37afedff 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_mobile.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_mobile.go @@ -1,21 +1,22 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberMobile struct for ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberMobile type ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberMobile struct { // The type of Address resource the phone number requires AddressRequirements *string `json:"AddressRequirements,omitempty"` // Whether the phone number is new to the Twilio platform - Beta *bool `json:"Beta,omitempty"` + Beta *bool `json:"Beta,omitempty"` Capabilities *ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocalCapabilities `json:"Capabilities,omitempty"` // A formatted version of the phone number FriendlyName *string `json:"FriendlyName,omitempty"` diff --git a/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_national.go b/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_national.go index 56c81a8f3..06ba69450 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_national.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_national.go @@ -1,21 +1,22 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberNational struct for ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberNational type ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberNational struct { // The type of Address resource the phone number requires AddressRequirements *string `json:"AddressRequirements,omitempty"` // Whether the phone number is new to the Twilio platform - Beta *bool `json:"Beta,omitempty"` + Beta *bool `json:"Beta,omitempty"` Capabilities *ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocalCapabilities `json:"Capabilities,omitempty"` // A formatted version of the phone number FriendlyName *string `json:"FriendlyName,omitempty"` diff --git a/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_shared_cost.go b/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_shared_cost.go index afcd663eb..0431bee31 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_shared_cost.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_shared_cost.go @@ -1,21 +1,22 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberSharedCost struct for ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberSharedCost type ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberSharedCost struct { // The type of Address resource the phone number requires AddressRequirements *string `json:"AddressRequirements,omitempty"` // Whether the phone number is new to the Twilio platform - Beta *bool `json:"Beta,omitempty"` + Beta *bool `json:"Beta,omitempty"` Capabilities *ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocalCapabilities `json:"Capabilities,omitempty"` // A formatted version of the phone number FriendlyName *string `json:"FriendlyName,omitempty"` diff --git a/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_toll_free.go b/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_toll_free.go index 8ac62bba0..023c62eb7 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_toll_free.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_toll_free.go @@ -1,21 +1,22 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberTollFree struct for ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberTollFree type ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberTollFree struct { // The type of Address resource the phone number requires AddressRequirements *string `json:"AddressRequirements,omitempty"` // Whether the phone number is new to the Twilio platform - Beta *bool `json:"Beta,omitempty"` + Beta *bool `json:"Beta,omitempty"` Capabilities *ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocalCapabilities `json:"Capabilities,omitempty"` // A formatted version of the phone number FriendlyName *string `json:"FriendlyName,omitempty"` diff --git a/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_voip.go b/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_voip.go index e484b73cb..c13b98a85 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_voip.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_voip.go @@ -1,21 +1,22 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberVoip struct for ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberVoip type ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberVoip struct { // The type of Address resource the phone number requires AddressRequirements *string `json:"AddressRequirements,omitempty"` // Whether the phone number is new to the Twilio platform - Beta *bool `json:"Beta,omitempty"` + Beta *bool `json:"Beta,omitempty"` Capabilities *ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocalCapabilities `json:"Capabilities,omitempty"` // A formatted version of the phone number FriendlyName *string `json:"FriendlyName,omitempty"` diff --git a/twilio/rest/api/v2010/model_api_v2010_account_balance.go b/twilio/rest/api/v2010/model_api_v2010_account_balance.go index c208f5fa8..3f9c1fa2e 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_balance.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_balance.go @@ -1,15 +1,16 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ApiV2010AccountBalance struct for ApiV2010AccountBalance type ApiV2010AccountBalance struct { // Account Sid. diff --git a/twilio/rest/api/v2010/model_api_v2010_account_call.go b/twilio/rest/api/v2010/model_api_v2010_account_call.go index 028303556..50e8f3254 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_call.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_call.go @@ -1,15 +1,16 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ApiV2010AccountCall struct for ApiV2010AccountCall type ApiV2010AccountCall struct { // The SID of the Account that created this resource diff --git a/twilio/rest/api/v2010/model_api_v2010_account_call_call_event.go b/twilio/rest/api/v2010/model_api_v2010_account_call_call_event.go index acf9aaa1c..64af39eba 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_call_call_event.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_call_call_event.go @@ -1,15 +1,16 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ApiV2010AccountCallCallEvent struct for ApiV2010AccountCallCallEvent type ApiV2010AccountCallCallEvent struct { // Call Request. diff --git a/twilio/rest/api/v2010/model_api_v2010_account_call_call_feedback.go b/twilio/rest/api/v2010/model_api_v2010_account_call_call_feedback.go index 7d220fe93..cd304b270 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_call_call_feedback.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_call_call_feedback.go @@ -1,15 +1,16 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ApiV2010AccountCallCallFeedback struct for ApiV2010AccountCallCallFeedback type ApiV2010AccountCallCallFeedback struct { // The unique sid that identifies this account diff --git a/twilio/rest/api/v2010/model_api_v2010_account_call_call_feedback_summary.go b/twilio/rest/api/v2010/model_api_v2010_account_call_call_feedback_summary.go index 38513c4db..17dc6e8dd 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_call_call_feedback_summary.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_call_call_feedback_summary.go @@ -1,18 +1,20 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // ApiV2010AccountCallCallFeedbackSummary struct for ApiV2010AccountCallCallFeedbackSummary type ApiV2010AccountCallCallFeedbackSummary struct { // The unique sid that identifies this account diff --git a/twilio/rest/api/v2010/model_api_v2010_account_call_call_feedback_summary_issues.go b/twilio/rest/api/v2010/model_api_v2010_account_call_call_feedback_summary_issues.go index 88770a810..7ee0bb2ae 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_call_call_feedback_summary_issues.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_call_call_feedback_summary_issues.go @@ -1,18 +1,19 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ApiV2010AccountCallCallFeedbackSummaryIssues struct for ApiV2010AccountCallCallFeedbackSummaryIssues type ApiV2010AccountCallCallFeedbackSummaryIssues struct { - Count float32 `json:"Count,omitempty"` - Description string `json:"Description,omitempty"` - PercentageOfTotalCalls string `json:"PercentageOfTotalCalls,omitempty"` + Count float32 `json:"Count,omitempty"` + Description string `json:"Description,omitempty"` + PercentageOfTotalCalls string `json:"PercentageOfTotalCalls,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_call_call_notification.go b/twilio/rest/api/v2010/model_api_v2010_account_call_call_notification.go index d2b9113fe..6b3606473 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_call_call_notification.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_call_call_notification.go @@ -1,15 +1,16 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ApiV2010AccountCallCallNotification struct for ApiV2010AccountCallCallNotification type ApiV2010AccountCallCallNotification struct { // The SID of the Account that created the resource diff --git a/twilio/rest/api/v2010/model_api_v2010_account_call_call_notification_instance.go b/twilio/rest/api/v2010/model_api_v2010_account_call_call_notification_instance.go index 6537012a7..5db6b2c21 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_call_call_notification_instance.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_call_call_notification_instance.go @@ -1,15 +1,16 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ApiV2010AccountCallCallNotificationInstance struct for ApiV2010AccountCallCallNotificationInstance type ApiV2010AccountCallCallNotificationInstance struct { // The SID of the Account that created the resource diff --git a/twilio/rest/api/v2010/model_api_v2010_account_call_call_recording.go b/twilio/rest/api/v2010/model_api_v2010_account_call_call_recording.go index 093c56d19..7af72eb0f 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_call_call_recording.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_call_call_recording.go @@ -1,15 +1,16 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ApiV2010AccountCallCallRecording struct for ApiV2010AccountCallCallRecording type ApiV2010AccountCallCallRecording struct { // The SID of the Account that created the resource diff --git a/twilio/rest/api/v2010/model_api_v2010_account_call_payments.go b/twilio/rest/api/v2010/model_api_v2010_account_call_payments.go index 05470949d..e99c27c17 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_call_payments.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_call_payments.go @@ -1,15 +1,16 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ApiV2010AccountCallPayments struct for ApiV2010AccountCallPayments type ApiV2010AccountCallPayments struct { // The SID of the Account that created the Payments resource. diff --git a/twilio/rest/api/v2010/model_api_v2010_account_conference.go b/twilio/rest/api/v2010/model_api_v2010_account_conference.go index e6ae75b93..f12162a6a 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_conference.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_conference.go @@ -1,15 +1,16 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ApiV2010AccountConference struct for ApiV2010AccountConference type ApiV2010AccountConference struct { // The SID of the Account that created this resource diff --git a/twilio/rest/api/v2010/model_api_v2010_account_conference_conference_recording.go b/twilio/rest/api/v2010/model_api_v2010_account_conference_conference_recording.go index e63ec6149..6ad28afb3 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_conference_conference_recording.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_conference_conference_recording.go @@ -1,15 +1,16 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ApiV2010AccountConferenceConferenceRecording struct for ApiV2010AccountConferenceConferenceRecording type ApiV2010AccountConferenceConferenceRecording struct { // The SID of the Account that created the resource diff --git a/twilio/rest/api/v2010/model_api_v2010_account_conference_participant.go b/twilio/rest/api/v2010/model_api_v2010_account_conference_participant.go index f550e8fbc..a0ea48551 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_conference_participant.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_conference_participant.go @@ -1,15 +1,16 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ApiV2010AccountConferenceParticipant struct for ApiV2010AccountConferenceParticipant type ApiV2010AccountConferenceParticipant struct { // The SID of the Account that created the resource diff --git a/twilio/rest/api/v2010/model_api_v2010_account_connect_app.go b/twilio/rest/api/v2010/model_api_v2010_account_connect_app.go index 5f0dd4069..8a72c0cea 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_connect_app.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_connect_app.go @@ -1,15 +1,16 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ApiV2010AccountConnectApp struct for ApiV2010AccountConnectApp type ApiV2010AccountConnectApp struct { // The SID of the Account that created the resource diff --git a/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number.go b/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number.go index 2bd192d4d..b2daf7b37 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number.go @@ -1,15 +1,16 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ApiV2010AccountIncomingPhoneNumber struct for ApiV2010AccountIncomingPhoneNumber type ApiV2010AccountIncomingPhoneNumber struct { // The SID of the Account that created the resource @@ -23,7 +24,7 @@ type ApiV2010AccountIncomingPhoneNumber struct { // Whether the phone number is new to the Twilio platform Beta *bool `json:"Beta,omitempty"` // The SID of the Bundle resource associated with number - BundleSid *string `json:"BundleSid,omitempty"` + BundleSid *string `json:"BundleSid,omitempty"` Capabilities *ApiV2010AccountIncomingPhoneNumberCapabilities `json:"Capabilities,omitempty"` // The RFC 2822 date and time in GMT that the resource was created DateCreated *string `json:"DateCreated,omitempty"` @@ -71,7 +72,7 @@ type ApiV2010AccountIncomingPhoneNumber struct { // The URL we call when an error occurs in TwiML VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` // The HTTP method used with the voice_url - VoiceMethod *string `json:"VoiceMethod,omitempty"` + VoiceMethod *string `json:"VoiceMethod,omitempty"` VoiceReceiveMode *string `json:"VoiceReceiveMode,omitempty"` // The URL we call when the phone number receives a call VoiceUrl *string `json:"VoiceUrl,omitempty"` diff --git a/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number_capabilities.go b/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number_capabilities.go index 4b94c5b4d..e5ba30993 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number_capabilities.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number_capabilities.go @@ -1,19 +1,20 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ApiV2010AccountIncomingPhoneNumberCapabilities Indicate if a phone can receive calls or messages type ApiV2010AccountIncomingPhoneNumberCapabilities struct { - Fax bool `json:"Fax,omitempty"` - Mms bool `json:"Mms,omitempty"` - Sms bool `json:"Sms,omitempty"` + Fax bool `json:"Fax,omitempty"` + Mms bool `json:"Mms,omitempty"` + Sms bool `json:"Sms,omitempty"` Voice bool `json:"Voice,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_assigned_add_on.go b/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_assigned_add_on.go index ef4568f01..50aed05e6 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_assigned_add_on.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_assigned_add_on.go @@ -1,15 +1,16 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOn struct for ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOn type ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOn struct { // The SID of the Account that created the resource diff --git a/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_assigned_add_on_incoming_phone_number_assigned_add_on_extension.go b/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_assigned_add_on_incoming_phone_number_assigned_add_on_extension.go index d7f7e64f6..dfa70b00a 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_assigned_add_on_incoming_phone_number_assigned_add_on_extension.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_assigned_add_on_incoming_phone_number_assigned_add_on_extension.go @@ -1,15 +1,16 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOnIncomingPhoneNumberAssignedAddOnExtension struct for ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOnIncomingPhoneNumberAssignedAddOnExtension type ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOnIncomingPhoneNumberAssignedAddOnExtension struct { // The SID of the Account that created the resource diff --git a/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_local.go b/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_local.go index 07476bc9d..b81fe6970 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_local.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_local.go @@ -1,15 +1,16 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberLocal struct for ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberLocal type ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberLocal struct { // The SID of the Account that created the resource @@ -23,7 +24,7 @@ type ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberLocal struct { // Whether the phone number is new to the Twilio platform Beta *bool `json:"Beta,omitempty"` // The SID of the Bundle resource associated with number - BundleSid *string `json:"BundleSid,omitempty"` + BundleSid *string `json:"BundleSid,omitempty"` Capabilities *ApiV2010AccountIncomingPhoneNumberCapabilities `json:"Capabilities,omitempty"` // The RFC 2822 date and time in GMT that the resource was created DateCreated *string `json:"DateCreated,omitempty"` @@ -71,7 +72,7 @@ type ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberLocal struct { // The URL we call when an error occurs in TwiML VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` // The HTTP method used with the voice_url - VoiceMethod *string `json:"VoiceMethod,omitempty"` + VoiceMethod *string `json:"VoiceMethod,omitempty"` VoiceReceiveMode *string `json:"VoiceReceiveMode,omitempty"` // The URL we call when this phone number receives a call VoiceUrl *string `json:"VoiceUrl,omitempty"` diff --git a/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_mobile.go b/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_mobile.go index ccb285c21..867633ed7 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_mobile.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_mobile.go @@ -1,15 +1,16 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberMobile struct for ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberMobile type ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberMobile struct { // The SID of the Account that created the resource @@ -23,7 +24,7 @@ type ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberMobile struct { // Whether the phone number is new to the Twilio platform Beta *bool `json:"Beta,omitempty"` // The SID of the Bundle resource associated with number - BundleSid *string `json:"BundleSid,omitempty"` + BundleSid *string `json:"BundleSid,omitempty"` Capabilities *ApiV2010AccountIncomingPhoneNumberCapabilities `json:"Capabilities,omitempty"` // The RFC 2822 date and time in GMT that the resource was created DateCreated *string `json:"DateCreated,omitempty"` @@ -71,7 +72,7 @@ type ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberMobile struct { // The URL we call when an error occurs in TwiML VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` // The HTTP method used with the voice_url - VoiceMethod *string `json:"VoiceMethod,omitempty"` + VoiceMethod *string `json:"VoiceMethod,omitempty"` VoiceReceiveMode *string `json:"VoiceReceiveMode,omitempty"` // The URL we call when the phone number receives a call VoiceUrl *string `json:"VoiceUrl,omitempty"` diff --git a/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_toll_free.go b/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_toll_free.go index 51d2636d9..bf37d9695 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_toll_free.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_toll_free.go @@ -1,15 +1,16 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberTollFree struct for ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberTollFree type ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberTollFree struct { // The SID of the Account that created the resource @@ -23,7 +24,7 @@ type ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberTollFree struct { // Whether the phone number is new to the Twilio platform Beta *bool `json:"Beta,omitempty"` // The SID of the Bundle resource associated with number - BundleSid *string `json:"BundleSid,omitempty"` + BundleSid *string `json:"BundleSid,omitempty"` Capabilities *ApiV2010AccountIncomingPhoneNumberCapabilities `json:"Capabilities,omitempty"` // The RFC 2822 date and time in GMT that the resource was created DateCreated *string `json:"DateCreated,omitempty"` @@ -71,7 +72,7 @@ type ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberTollFree struct { // The URL we call when an error occurs in TwiML VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` // The HTTP method used with the voice_url - VoiceMethod *string `json:"VoiceMethod,omitempty"` + VoiceMethod *string `json:"VoiceMethod,omitempty"` VoiceReceiveMode *string `json:"VoiceReceiveMode,omitempty"` // The URL we call when the phone number receives a call VoiceUrl *string `json:"VoiceUrl,omitempty"` diff --git a/twilio/rest/api/v2010/model_api_v2010_account_key.go b/twilio/rest/api/v2010/model_api_v2010_account_key.go index a21ab08ee..fc061f0a0 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_key.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_key.go @@ -1,15 +1,16 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ApiV2010AccountKey struct for ApiV2010AccountKey type ApiV2010AccountKey struct { // The RFC 2822 date and time in GMT that the resource was created diff --git a/twilio/rest/api/v2010/model_api_v2010_account_message.go b/twilio/rest/api/v2010/model_api_v2010_account_message.go index b42c358b4..56035a891 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_message.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_message.go @@ -1,15 +1,16 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ApiV2010AccountMessage struct for ApiV2010AccountMessage type ApiV2010AccountMessage struct { // The SID of the Account that created the resource diff --git a/twilio/rest/api/v2010/model_api_v2010_account_message_media.go b/twilio/rest/api/v2010/model_api_v2010_account_message_media.go index 7b113a0f0..74d292def 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_message_media.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_message_media.go @@ -1,15 +1,16 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ApiV2010AccountMessageMedia struct for ApiV2010AccountMessageMedia type ApiV2010AccountMessageMedia struct { // The SID of the Account that created this resource diff --git a/twilio/rest/api/v2010/model_api_v2010_account_message_message_feedback.go b/twilio/rest/api/v2010/model_api_v2010_account_message_message_feedback.go index da9937af7..109a3f97d 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_message_message_feedback.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_message_message_feedback.go @@ -1,15 +1,16 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ApiV2010AccountMessageMessageFeedback struct for ApiV2010AccountMessageMessageFeedback type ApiV2010AccountMessageMessageFeedback struct { // The SID of the Account that created the resource diff --git a/twilio/rest/api/v2010/model_api_v2010_account_new_key.go b/twilio/rest/api/v2010/model_api_v2010_account_new_key.go index f08c6b789..d92641b58 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_new_key.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_new_key.go @@ -1,15 +1,16 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ApiV2010AccountNewKey struct for ApiV2010AccountNewKey type ApiV2010AccountNewKey struct { // The RFC 2822 date and time in GMT that the resource was created diff --git a/twilio/rest/api/v2010/model_api_v2010_account_new_signing_key.go b/twilio/rest/api/v2010/model_api_v2010_account_new_signing_key.go index 8d7f8b828..b17812e25 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_new_signing_key.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_new_signing_key.go @@ -1,15 +1,16 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ApiV2010AccountNewSigningKey struct for ApiV2010AccountNewSigningKey type ApiV2010AccountNewSigningKey struct { // The RFC 2822 date and time in GMT that the resource was created diff --git a/twilio/rest/api/v2010/model_api_v2010_account_notification.go b/twilio/rest/api/v2010/model_api_v2010_account_notification.go index 9e0dda244..93e1e1c1c 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_notification.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_notification.go @@ -1,15 +1,16 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ApiV2010AccountNotification struct for ApiV2010AccountNotification type ApiV2010AccountNotification struct { // The SID of the Account that created the resource diff --git a/twilio/rest/api/v2010/model_api_v2010_account_notification_instance.go b/twilio/rest/api/v2010/model_api_v2010_account_notification_instance.go index 4e9d7073a..4364a1774 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_notification_instance.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_notification_instance.go @@ -1,15 +1,16 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ApiV2010AccountNotificationInstance struct for ApiV2010AccountNotificationInstance type ApiV2010AccountNotificationInstance struct { // The SID of the Account that created the resource diff --git a/twilio/rest/api/v2010/model_api_v2010_account_outgoing_caller_id.go b/twilio/rest/api/v2010/model_api_v2010_account_outgoing_caller_id.go index 736aeac5d..997772792 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_outgoing_caller_id.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_outgoing_caller_id.go @@ -1,15 +1,16 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ApiV2010AccountOutgoingCallerId struct for ApiV2010AccountOutgoingCallerId type ApiV2010AccountOutgoingCallerId struct { // The SID of the Account that created the resource diff --git a/twilio/rest/api/v2010/model_api_v2010_account_queue.go b/twilio/rest/api/v2010/model_api_v2010_account_queue.go index f54be21dc..44b011469 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_queue.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_queue.go @@ -1,15 +1,16 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ApiV2010AccountQueue struct for ApiV2010AccountQueue type ApiV2010AccountQueue struct { // The SID of the Account that created this resource diff --git a/twilio/rest/api/v2010/model_api_v2010_account_queue_member.go b/twilio/rest/api/v2010/model_api_v2010_account_queue_member.go index 08f25f606..bff575ce9 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_queue_member.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_queue_member.go @@ -1,15 +1,16 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ApiV2010AccountQueueMember struct for ApiV2010AccountQueueMember type ApiV2010AccountQueueMember struct { // The SID of the Call the resource is associated with diff --git a/twilio/rest/api/v2010/model_api_v2010_account_recording.go b/twilio/rest/api/v2010/model_api_v2010_account_recording.go index 975479f8e..f35fff909 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_recording.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_recording.go @@ -1,15 +1,16 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ApiV2010AccountRecording struct for ApiV2010AccountRecording type ApiV2010AccountRecording struct { // The SID of the Account that created the resource diff --git a/twilio/rest/api/v2010/model_api_v2010_account_recording_recording_add_on_result.go b/twilio/rest/api/v2010/model_api_v2010_account_recording_recording_add_on_result.go index ae7e80f19..10097b7ab 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_recording_recording_add_on_result.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_recording_recording_add_on_result.go @@ -1,15 +1,16 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ApiV2010AccountRecordingRecordingAddOnResult struct for ApiV2010AccountRecordingRecordingAddOnResult type ApiV2010AccountRecordingRecordingAddOnResult struct { // The SID of the Account that created the resource diff --git a/twilio/rest/api/v2010/model_api_v2010_account_recording_recording_add_on_result_recording_add_on_result_payload.go b/twilio/rest/api/v2010/model_api_v2010_account_recording_recording_add_on_result_recording_add_on_result_payload.go index c923204f7..51fd023cf 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_recording_recording_add_on_result_recording_add_on_result_payload.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_recording_recording_add_on_result_recording_add_on_result_payload.go @@ -1,15 +1,16 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ApiV2010AccountRecordingRecordingAddOnResultRecordingAddOnResultPayload struct for ApiV2010AccountRecordingRecordingAddOnResultRecordingAddOnResultPayload type ApiV2010AccountRecordingRecordingAddOnResultRecordingAddOnResultPayload struct { // The SID of the Account that created the resource diff --git a/twilio/rest/api/v2010/model_api_v2010_account_recording_recording_transcription.go b/twilio/rest/api/v2010/model_api_v2010_account_recording_recording_transcription.go index 11e63df36..f895d2f41 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_recording_recording_transcription.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_recording_recording_transcription.go @@ -1,15 +1,16 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ApiV2010AccountRecordingRecordingTranscription struct for ApiV2010AccountRecordingRecordingTranscription type ApiV2010AccountRecordingRecordingTranscription struct { // The SID of the Account that created the resource diff --git a/twilio/rest/api/v2010/model_api_v2010_account_short_code.go b/twilio/rest/api/v2010/model_api_v2010_account_short_code.go index 59dc53998..d0517f2cc 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_short_code.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_short_code.go @@ -1,15 +1,16 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ApiV2010AccountShortCode struct for ApiV2010AccountShortCode type ApiV2010AccountShortCode struct { // The SID of the Account that created this resource diff --git a/twilio/rest/api/v2010/model_api_v2010_account_signing_key.go b/twilio/rest/api/v2010/model_api_v2010_account_signing_key.go index bec715bf6..2be6b4558 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_signing_key.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_signing_key.go @@ -1,19 +1,20 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ApiV2010AccountSigningKey struct for ApiV2010AccountSigningKey type ApiV2010AccountSigningKey struct { - DateCreated *string `json:"DateCreated,omitempty"` - DateUpdated *string `json:"DateUpdated,omitempty"` + DateCreated *string `json:"DateCreated,omitempty"` + DateUpdated *string `json:"DateUpdated,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` - Sid *string `json:"Sid,omitempty"` + Sid *string `json:"Sid,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_credential_list.go b/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_credential_list.go index da338baf4..2c95c8767 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_credential_list.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_credential_list.go @@ -1,15 +1,16 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ApiV2010AccountSipSipCredentialList struct for ApiV2010AccountSipSipCredentialList type ApiV2010AccountSipSipCredentialList struct { // The unique sid that identifies this account diff --git a/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_credential_list_sip_credential.go b/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_credential_list_sip_credential.go index afa36efaa..785693328 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_credential_list_sip_credential.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_credential_list_sip_credential.go @@ -1,15 +1,16 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ApiV2010AccountSipSipCredentialListSipCredential struct for ApiV2010AccountSipSipCredentialListSipCredential type ApiV2010AccountSipSipCredentialListSipCredential struct { // The unique id of the Account that is responsible for this resource. diff --git a/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_domain.go b/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_domain.go index f945084f0..fc83afa52 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_domain.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_domain.go @@ -1,15 +1,16 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ApiV2010AccountSipSipDomain struct for ApiV2010AccountSipSipDomain type ApiV2010AccountSipSipDomain struct { // The SID of the Account that created the resource diff --git a/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_auth_sip_auth_calls_sip_auth_calls_credential_list_mapping.go b/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_auth_sip_auth_calls_sip_auth_calls_credential_list_mapping.go index 1bccf819d..57dc44e9d 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_auth_sip_auth_calls_sip_auth_calls_credential_list_mapping.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_auth_sip_auth_calls_sip_auth_calls_credential_list_mapping.go @@ -1,15 +1,16 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsCredentialListMapping struct for ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsCredentialListMapping type ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsCredentialListMapping struct { // The SID of the Account that created the resource diff --git a/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_auth_sip_auth_calls_sip_auth_calls_ip_access_control_list_mapping.go b/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_auth_sip_auth_calls_sip_auth_calls_ip_access_control_list_mapping.go index 398620aed..629dcf9e6 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_auth_sip_auth_calls_sip_auth_calls_ip_access_control_list_mapping.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_auth_sip_auth_calls_sip_auth_calls_ip_access_control_list_mapping.go @@ -1,15 +1,16 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsIpAccessControlListMapping struct for ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsIpAccessControlListMapping type ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsIpAccessControlListMapping struct { // The SID of the Account that created the resource diff --git a/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_auth_sip_auth_registrations_sip_auth_registrations_credential_list_mapping.go b/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_auth_sip_auth_registrations_sip_auth_registrations_credential_list_mapping.go index 2e66cf327..61804a522 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_auth_sip_auth_registrations_sip_auth_registrations_credential_list_mapping.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_auth_sip_auth_registrations_sip_auth_registrations_credential_list_mapping.go @@ -1,15 +1,16 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ApiV2010AccountSipSipDomainSipAuthSipAuthRegistrationsSipAuthRegistrationsCredentialListMapping struct for ApiV2010AccountSipSipDomainSipAuthSipAuthRegistrationsSipAuthRegistrationsCredentialListMapping type ApiV2010AccountSipSipDomainSipAuthSipAuthRegistrationsSipAuthRegistrationsCredentialListMapping struct { // The SID of the Account that created the resource diff --git a/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_credential_list_mapping.go b/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_credential_list_mapping.go index c8e5ab269..336f58ee7 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_credential_list_mapping.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_credential_list_mapping.go @@ -1,15 +1,16 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ApiV2010AccountSipSipDomainSipCredentialListMapping struct for ApiV2010AccountSipSipDomainSipCredentialListMapping type ApiV2010AccountSipSipDomainSipCredentialListMapping struct { // The unique id of the Account that is responsible for this resource. diff --git a/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_ip_access_control_list_mapping.go b/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_ip_access_control_list_mapping.go index ab0e02a44..8f4612414 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_ip_access_control_list_mapping.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_ip_access_control_list_mapping.go @@ -1,15 +1,16 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ApiV2010AccountSipSipDomainSipIpAccessControlListMapping struct for ApiV2010AccountSipSipDomainSipIpAccessControlListMapping type ApiV2010AccountSipSipDomainSipIpAccessControlListMapping struct { // The unique id of the Account that is responsible for this resource. diff --git a/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_ip_access_control_list.go b/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_ip_access_control_list.go index 2d15e8847..6a19cbd50 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_ip_access_control_list.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_ip_access_control_list.go @@ -1,15 +1,16 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ApiV2010AccountSipSipIpAccessControlList struct for ApiV2010AccountSipSipIpAccessControlList type ApiV2010AccountSipSipIpAccessControlList struct { // The unique sid that identifies this account diff --git a/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_ip_access_control_list_sip_ip_address.go b/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_ip_access_control_list_sip_ip_address.go index bc5714e0d..63b02de70 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_ip_access_control_list_sip_ip_address.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_sip_sip_ip_access_control_list_sip_ip_address.go @@ -1,15 +1,16 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ApiV2010AccountSipSipIpAccessControlListSipIpAddress struct for ApiV2010AccountSipSipIpAccessControlListSipIpAddress type ApiV2010AccountSipSipIpAccessControlListSipIpAddress struct { // The unique id of the Account that is responsible for this resource. diff --git a/twilio/rest/api/v2010/model_api_v2010_account_token.go b/twilio/rest/api/v2010/model_api_v2010_account_token.go index 91c37be67..b327f4ee3 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_token.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_token.go @@ -1,15 +1,16 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ApiV2010AccountToken struct for ApiV2010AccountToken type ApiV2010AccountToken struct { // The SID of the Account that created the resource diff --git a/twilio/rest/api/v2010/model_api_v2010_account_token_ice_servers.go b/twilio/rest/api/v2010/model_api_v2010_account_token_ice_servers.go index 611de15de..08a9a8f14 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_token_ice_servers.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_token_ice_servers.go @@ -1,19 +1,20 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ApiV2010AccountTokenIceServers struct for ApiV2010AccountTokenIceServers type ApiV2010AccountTokenIceServers struct { Credential string `json:"Credential,omitempty"` - Url string `json:"Url,omitempty"` - Urls string `json:"Urls,omitempty"` - Username string `json:"Username,omitempty"` + Url string `json:"Url,omitempty"` + Urls string `json:"Urls,omitempty"` + Username string `json:"Username,omitempty"` } diff --git a/twilio/rest/api/v2010/model_api_v2010_account_transcription.go b/twilio/rest/api/v2010/model_api_v2010_account_transcription.go index df98aec85..eeeeabeda 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_transcription.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_transcription.go @@ -1,15 +1,16 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ApiV2010AccountTranscription struct for ApiV2010AccountTranscription type ApiV2010AccountTranscription struct { // The SID of the Account that created the resource diff --git a/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record.go b/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record.go index 1228b17e6..8215068cc 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record.go @@ -1,18 +1,20 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // ApiV2010AccountUsageUsageRecord struct for ApiV2010AccountUsageUsageRecord type ApiV2010AccountUsageUsageRecord struct { // The SID of the Account accrued the usage diff --git a/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_all_time.go b/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_all_time.go index 21fa3984a..98dddc6d8 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_all_time.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_all_time.go @@ -1,18 +1,20 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // ApiV2010AccountUsageUsageRecordUsageRecordAllTime struct for ApiV2010AccountUsageUsageRecordUsageRecordAllTime type ApiV2010AccountUsageUsageRecordUsageRecordAllTime struct { // The SID of the Account accrued the usage diff --git a/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_daily.go b/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_daily.go index ba2d2cf4c..bc617d0dd 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_daily.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_daily.go @@ -1,18 +1,20 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // ApiV2010AccountUsageUsageRecordUsageRecordDaily struct for ApiV2010AccountUsageUsageRecordUsageRecordDaily type ApiV2010AccountUsageUsageRecordUsageRecordDaily struct { // The SID of the Account accrued the usage diff --git a/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_last_month.go b/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_last_month.go index a9a0b2230..4cbbae56e 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_last_month.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_last_month.go @@ -1,18 +1,20 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // ApiV2010AccountUsageUsageRecordUsageRecordLastMonth struct for ApiV2010AccountUsageUsageRecordUsageRecordLastMonth type ApiV2010AccountUsageUsageRecordUsageRecordLastMonth struct { // The SID of the Account accrued the usage diff --git a/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_monthly.go b/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_monthly.go index 96bacdb7f..e06835754 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_monthly.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_monthly.go @@ -1,18 +1,20 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // ApiV2010AccountUsageUsageRecordUsageRecordMonthly struct for ApiV2010AccountUsageUsageRecordUsageRecordMonthly type ApiV2010AccountUsageUsageRecordUsageRecordMonthly struct { // The SID of the Account accrued the usage diff --git a/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_this_month.go b/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_this_month.go index d0127878b..4202daa20 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_this_month.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_this_month.go @@ -1,18 +1,20 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // ApiV2010AccountUsageUsageRecordUsageRecordThisMonth struct for ApiV2010AccountUsageUsageRecordUsageRecordThisMonth type ApiV2010AccountUsageUsageRecordUsageRecordThisMonth struct { // The SID of the Account accrued the usage diff --git a/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_today.go b/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_today.go index 67d80a60e..6d74bf501 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_today.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_today.go @@ -1,18 +1,20 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // ApiV2010AccountUsageUsageRecordUsageRecordToday struct for ApiV2010AccountUsageUsageRecordUsageRecordToday type ApiV2010AccountUsageUsageRecordUsageRecordToday struct { // The SID of the Account accrued the usage diff --git a/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_yearly.go b/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_yearly.go index ed3ac932a..03ffc6709 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_yearly.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_yearly.go @@ -1,18 +1,20 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // ApiV2010AccountUsageUsageRecordUsageRecordYearly struct for ApiV2010AccountUsageUsageRecordUsageRecordYearly type ApiV2010AccountUsageUsageRecordUsageRecordYearly struct { // The SID of the Account accrued the usage diff --git a/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_yesterday.go b/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_yesterday.go index d4383e59e..fb97886e1 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_yesterday.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_yesterday.go @@ -1,18 +1,20 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // ApiV2010AccountUsageUsageRecordUsageRecordYesterday struct for ApiV2010AccountUsageUsageRecordUsageRecordYesterday type ApiV2010AccountUsageUsageRecordUsageRecordYesterday struct { // The SID of the Account accrued the usage diff --git a/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_trigger.go b/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_trigger.go index e9dc20f22..5fc245a9f 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_trigger.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_usage_usage_trigger.go @@ -1,15 +1,16 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ApiV2010AccountUsageUsageTrigger struct for ApiV2010AccountUsageUsageTrigger type ApiV2010AccountUsageUsageTrigger struct { // The SID of the Account that this trigger monitors diff --git a/twilio/rest/api/v2010/model_api_v2010_account_validation_request.go b/twilio/rest/api/v2010/model_api_v2010_account_validation_request.go index 20c326ff1..342b8e833 100644 --- a/twilio/rest/api/v2010/model_api_v2010_account_validation_request.go +++ b/twilio/rest/api/v2010/model_api_v2010_account_validation_request.go @@ -1,15 +1,16 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ApiV2010AccountValidationRequest struct for ApiV2010AccountValidationRequest type ApiV2010AccountValidationRequest struct { // The SID of the Account that created the resource diff --git a/twilio/rest/api/v2010/model_list_account_response.go b/twilio/rest/api/v2010/model_list_account_response.go index 31b0a8f2f..9db498fe7 100644 --- a/twilio/rest/api/v2010/model_list_account_response.go +++ b/twilio/rest/api/v2010/model_list_account_response.go @@ -1,24 +1,25 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListAccountResponse struct for ListAccountResponse type ListAccountResponse struct { - Accounts []ApiV2010Account `json:"Accounts,omitempty"` - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + Accounts []ApiV2010Account `json:"Accounts,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_address_response.go b/twilio/rest/api/v2010/model_list_address_response.go index 34d44e87b..cbc7d7077 100644 --- a/twilio/rest/api/v2010/model_list_address_response.go +++ b/twilio/rest/api/v2010/model_list_address_response.go @@ -1,24 +1,25 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListAddressResponse struct for ListAddressResponse type ListAddressResponse struct { - Addresses []ApiV2010AccountAddress `json:"Addresses,omitempty"` - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + Addresses []ApiV2010AccountAddress `json:"Addresses,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_application_response.go b/twilio/rest/api/v2010/model_list_application_response.go index db8b526d6..a6b902d69 100644 --- a/twilio/rest/api/v2010/model_list_application_response.go +++ b/twilio/rest/api/v2010/model_list_application_response.go @@ -1,24 +1,25 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListApplicationResponse struct for ListApplicationResponse type ListApplicationResponse struct { - Applications []ApiV2010AccountApplication `json:"Applications,omitempty"` - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + Applications []ApiV2010AccountApplication `json:"Applications,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_authorized_connect_app_response.go b/twilio/rest/api/v2010/model_list_authorized_connect_app_response.go index 571f1315f..b64f6155e 100644 --- a/twilio/rest/api/v2010/model_list_authorized_connect_app_response.go +++ b/twilio/rest/api/v2010/model_list_authorized_connect_app_response.go @@ -1,24 +1,25 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListAuthorizedConnectAppResponse struct for ListAuthorizedConnectAppResponse type ListAuthorizedConnectAppResponse struct { AuthorizedConnectApps []ApiV2010AccountAuthorizedConnectApp `json:"AuthorizedConnectApps,omitempty"` - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_available_phone_number_country_response.go b/twilio/rest/api/v2010/model_list_available_phone_number_country_response.go index 14b0c3e55..86cb7b720 100644 --- a/twilio/rest/api/v2010/model_list_available_phone_number_country_response.go +++ b/twilio/rest/api/v2010/model_list_available_phone_number_country_response.go @@ -1,24 +1,25 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListAvailablePhoneNumberCountryResponse struct for ListAvailablePhoneNumberCountryResponse type ListAvailablePhoneNumberCountryResponse struct { - Countries []ApiV2010AccountAvailablePhoneNumberCountry `json:"Countries,omitempty"` - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + Countries []ApiV2010AccountAvailablePhoneNumberCountry `json:"Countries,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_available_phone_number_local_response.go b/twilio/rest/api/v2010/model_list_available_phone_number_local_response.go index 328af6d97..d144f61d0 100644 --- a/twilio/rest/api/v2010/model_list_available_phone_number_local_response.go +++ b/twilio/rest/api/v2010/model_list_available_phone_number_local_response.go @@ -1,24 +1,25 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListAvailablePhoneNumberLocalResponse struct for ListAvailablePhoneNumberLocalResponse type ListAvailablePhoneNumberLocalResponse struct { AvailablePhoneNumbers []ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocal `json:"AvailablePhoneNumbers,omitempty"` - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_available_phone_number_machine_to_machine_response.go b/twilio/rest/api/v2010/model_list_available_phone_number_machine_to_machine_response.go index cd5fa934a..d5875ef3a 100644 --- a/twilio/rest/api/v2010/model_list_available_phone_number_machine_to_machine_response.go +++ b/twilio/rest/api/v2010/model_list_available_phone_number_machine_to_machine_response.go @@ -1,24 +1,25 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListAvailablePhoneNumberMachineToMachineResponse struct for ListAvailablePhoneNumberMachineToMachineResponse type ListAvailablePhoneNumberMachineToMachineResponse struct { AvailablePhoneNumbers []ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberMachineToMachine `json:"AvailablePhoneNumbers,omitempty"` - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_available_phone_number_mobile_response.go b/twilio/rest/api/v2010/model_list_available_phone_number_mobile_response.go index 62015ef6f..8ad5ef955 100644 --- a/twilio/rest/api/v2010/model_list_available_phone_number_mobile_response.go +++ b/twilio/rest/api/v2010/model_list_available_phone_number_mobile_response.go @@ -1,24 +1,25 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListAvailablePhoneNumberMobileResponse struct for ListAvailablePhoneNumberMobileResponse type ListAvailablePhoneNumberMobileResponse struct { AvailablePhoneNumbers []ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberMobile `json:"AvailablePhoneNumbers,omitempty"` - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_available_phone_number_national_response.go b/twilio/rest/api/v2010/model_list_available_phone_number_national_response.go index 2df960ada..0ad6658d7 100644 --- a/twilio/rest/api/v2010/model_list_available_phone_number_national_response.go +++ b/twilio/rest/api/v2010/model_list_available_phone_number_national_response.go @@ -1,24 +1,25 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListAvailablePhoneNumberNationalResponse struct for ListAvailablePhoneNumberNationalResponse type ListAvailablePhoneNumberNationalResponse struct { AvailablePhoneNumbers []ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberNational `json:"AvailablePhoneNumbers,omitempty"` - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_available_phone_number_shared_cost_response.go b/twilio/rest/api/v2010/model_list_available_phone_number_shared_cost_response.go index a54f42d4e..b28df322c 100644 --- a/twilio/rest/api/v2010/model_list_available_phone_number_shared_cost_response.go +++ b/twilio/rest/api/v2010/model_list_available_phone_number_shared_cost_response.go @@ -1,24 +1,25 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListAvailablePhoneNumberSharedCostResponse struct for ListAvailablePhoneNumberSharedCostResponse type ListAvailablePhoneNumberSharedCostResponse struct { AvailablePhoneNumbers []ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberSharedCost `json:"AvailablePhoneNumbers,omitempty"` - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_available_phone_number_toll_free_response.go b/twilio/rest/api/v2010/model_list_available_phone_number_toll_free_response.go index fb0f66fec..3f4da4b8c 100644 --- a/twilio/rest/api/v2010/model_list_available_phone_number_toll_free_response.go +++ b/twilio/rest/api/v2010/model_list_available_phone_number_toll_free_response.go @@ -1,24 +1,25 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListAvailablePhoneNumberTollFreeResponse struct for ListAvailablePhoneNumberTollFreeResponse type ListAvailablePhoneNumberTollFreeResponse struct { AvailablePhoneNumbers []ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberTollFree `json:"AvailablePhoneNumbers,omitempty"` - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_available_phone_number_voip_response.go b/twilio/rest/api/v2010/model_list_available_phone_number_voip_response.go index 3c0391d2a..3c7ce3040 100644 --- a/twilio/rest/api/v2010/model_list_available_phone_number_voip_response.go +++ b/twilio/rest/api/v2010/model_list_available_phone_number_voip_response.go @@ -1,24 +1,25 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListAvailablePhoneNumberVoipResponse struct for ListAvailablePhoneNumberVoipResponse type ListAvailablePhoneNumberVoipResponse struct { AvailablePhoneNumbers []ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberVoip `json:"AvailablePhoneNumbers,omitempty"` - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_call_event_response.go b/twilio/rest/api/v2010/model_list_call_event_response.go index f02d57cbd..9dccfbd7c 100644 --- a/twilio/rest/api/v2010/model_list_call_event_response.go +++ b/twilio/rest/api/v2010/model_list_call_event_response.go @@ -1,24 +1,25 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListCallEventResponse struct for ListCallEventResponse type ListCallEventResponse struct { - End int32 `json:"End,omitempty"` - Events []ApiV2010AccountCallCallEvent `json:"Events,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + End int32 `json:"End,omitempty"` + Events []ApiV2010AccountCallCallEvent `json:"Events,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_call_notification_response.go b/twilio/rest/api/v2010/model_list_call_notification_response.go index 656c4b5fd..aa7cc52fb 100644 --- a/twilio/rest/api/v2010/model_list_call_notification_response.go +++ b/twilio/rest/api/v2010/model_list_call_notification_response.go @@ -1,24 +1,25 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListCallNotificationResponse struct for ListCallNotificationResponse type ListCallNotificationResponse struct { - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Notifications []ApiV2010AccountCallCallNotification `json:"Notifications,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Notifications []ApiV2010AccountCallCallNotification `json:"Notifications,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_call_recording_response.go b/twilio/rest/api/v2010/model_list_call_recording_response.go index 89a25f99b..646e113c8 100644 --- a/twilio/rest/api/v2010/model_list_call_recording_response.go +++ b/twilio/rest/api/v2010/model_list_call_recording_response.go @@ -1,24 +1,25 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListCallRecordingResponse struct for ListCallRecordingResponse type ListCallRecordingResponse struct { - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Recordings []ApiV2010AccountCallCallRecording `json:"Recordings,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Recordings []ApiV2010AccountCallCallRecording `json:"Recordings,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_call_response.go b/twilio/rest/api/v2010/model_list_call_response.go index 9fa3f9184..5d32a19d4 100644 --- a/twilio/rest/api/v2010/model_list_call_response.go +++ b/twilio/rest/api/v2010/model_list_call_response.go @@ -1,24 +1,25 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListCallResponse struct for ListCallResponse type ListCallResponse struct { - Calls []ApiV2010AccountCall `json:"Calls,omitempty"` - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + Calls []ApiV2010AccountCall `json:"Calls,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_conference_recording_response.go b/twilio/rest/api/v2010/model_list_conference_recording_response.go index 865e2af98..40e58c6ec 100644 --- a/twilio/rest/api/v2010/model_list_conference_recording_response.go +++ b/twilio/rest/api/v2010/model_list_conference_recording_response.go @@ -1,24 +1,25 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListConferenceRecordingResponse struct for ListConferenceRecordingResponse type ListConferenceRecordingResponse struct { - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Recordings []ApiV2010AccountConferenceConferenceRecording `json:"Recordings,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Recordings []ApiV2010AccountConferenceConferenceRecording `json:"Recordings,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_conference_response.go b/twilio/rest/api/v2010/model_list_conference_response.go index 3184e1d10..a8c1efe8b 100644 --- a/twilio/rest/api/v2010/model_list_conference_response.go +++ b/twilio/rest/api/v2010/model_list_conference_response.go @@ -1,24 +1,25 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListConferenceResponse struct for ListConferenceResponse type ListConferenceResponse struct { - Conferences []ApiV2010AccountConference `json:"Conferences,omitempty"` - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + Conferences []ApiV2010AccountConference `json:"Conferences,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_connect_app_response.go b/twilio/rest/api/v2010/model_list_connect_app_response.go index 4b000db69..428c4d7b1 100644 --- a/twilio/rest/api/v2010/model_list_connect_app_response.go +++ b/twilio/rest/api/v2010/model_list_connect_app_response.go @@ -1,24 +1,25 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListConnectAppResponse struct for ListConnectAppResponse type ListConnectAppResponse struct { - ConnectApps []ApiV2010AccountConnectApp `json:"ConnectApps,omitempty"` - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + ConnectApps []ApiV2010AccountConnectApp `json:"ConnectApps,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_dependent_phone_number_response.go b/twilio/rest/api/v2010/model_list_dependent_phone_number_response.go index a292d70cd..2314746a0 100644 --- a/twilio/rest/api/v2010/model_list_dependent_phone_number_response.go +++ b/twilio/rest/api/v2010/model_list_dependent_phone_number_response.go @@ -1,24 +1,25 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListDependentPhoneNumberResponse struct for ListDependentPhoneNumberResponse type ListDependentPhoneNumberResponse struct { DependentPhoneNumbers []ApiV2010AccountAddressDependentPhoneNumber `json:"DependentPhoneNumbers,omitempty"` - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_incoming_phone_number_assigned_add_on_extension_response.go b/twilio/rest/api/v2010/model_list_incoming_phone_number_assigned_add_on_extension_response.go index 632c68bc7..ab1ff4969 100644 --- a/twilio/rest/api/v2010/model_list_incoming_phone_number_assigned_add_on_extension_response.go +++ b/twilio/rest/api/v2010/model_list_incoming_phone_number_assigned_add_on_extension_response.go @@ -1,24 +1,25 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListIncomingPhoneNumberAssignedAddOnExtensionResponse struct for ListIncomingPhoneNumberAssignedAddOnExtensionResponse type ListIncomingPhoneNumberAssignedAddOnExtensionResponse struct { - End int32 `json:"End,omitempty"` - Extensions []ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOnIncomingPhoneNumberAssignedAddOnExtension `json:"Extensions,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + End int32 `json:"End,omitempty"` + Extensions []ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOnIncomingPhoneNumberAssignedAddOnExtension `json:"Extensions,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_incoming_phone_number_assigned_add_on_response.go b/twilio/rest/api/v2010/model_list_incoming_phone_number_assigned_add_on_response.go index a4d55e5de..13ea30775 100644 --- a/twilio/rest/api/v2010/model_list_incoming_phone_number_assigned_add_on_response.go +++ b/twilio/rest/api/v2010/model_list_incoming_phone_number_assigned_add_on_response.go @@ -1,24 +1,25 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListIncomingPhoneNumberAssignedAddOnResponse struct for ListIncomingPhoneNumberAssignedAddOnResponse type ListIncomingPhoneNumberAssignedAddOnResponse struct { - AssignedAddOns []ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOn `json:"AssignedAddOns,omitempty"` - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + AssignedAddOns []ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOn `json:"AssignedAddOns,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_incoming_phone_number_local_response.go b/twilio/rest/api/v2010/model_list_incoming_phone_number_local_response.go index 7e5e13466..c779e1d44 100644 --- a/twilio/rest/api/v2010/model_list_incoming_phone_number_local_response.go +++ b/twilio/rest/api/v2010/model_list_incoming_phone_number_local_response.go @@ -1,24 +1,25 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListIncomingPhoneNumberLocalResponse struct for ListIncomingPhoneNumberLocalResponse type ListIncomingPhoneNumberLocalResponse struct { - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` IncomingPhoneNumbers []ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberLocal `json:"IncomingPhoneNumbers,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_incoming_phone_number_mobile_response.go b/twilio/rest/api/v2010/model_list_incoming_phone_number_mobile_response.go index 9db8fccc7..58df811b5 100644 --- a/twilio/rest/api/v2010/model_list_incoming_phone_number_mobile_response.go +++ b/twilio/rest/api/v2010/model_list_incoming_phone_number_mobile_response.go @@ -1,24 +1,25 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListIncomingPhoneNumberMobileResponse struct for ListIncomingPhoneNumberMobileResponse type ListIncomingPhoneNumberMobileResponse struct { - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` IncomingPhoneNumbers []ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberMobile `json:"IncomingPhoneNumbers,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_incoming_phone_number_response.go b/twilio/rest/api/v2010/model_list_incoming_phone_number_response.go index 0a6ab1571..c575ad4ac 100644 --- a/twilio/rest/api/v2010/model_list_incoming_phone_number_response.go +++ b/twilio/rest/api/v2010/model_list_incoming_phone_number_response.go @@ -1,24 +1,25 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListIncomingPhoneNumberResponse struct for ListIncomingPhoneNumberResponse type ListIncomingPhoneNumberResponse struct { - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` IncomingPhoneNumbers []ApiV2010AccountIncomingPhoneNumber `json:"IncomingPhoneNumbers,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_incoming_phone_number_toll_free_response.go b/twilio/rest/api/v2010/model_list_incoming_phone_number_toll_free_response.go index d15cb9723..f5f3a7213 100644 --- a/twilio/rest/api/v2010/model_list_incoming_phone_number_toll_free_response.go +++ b/twilio/rest/api/v2010/model_list_incoming_phone_number_toll_free_response.go @@ -1,24 +1,25 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListIncomingPhoneNumberTollFreeResponse struct for ListIncomingPhoneNumberTollFreeResponse type ListIncomingPhoneNumberTollFreeResponse struct { - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` IncomingPhoneNumbers []ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberTollFree `json:"IncomingPhoneNumbers,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_key_response.go b/twilio/rest/api/v2010/model_list_key_response.go index aea1fa7b3..587467c99 100644 --- a/twilio/rest/api/v2010/model_list_key_response.go +++ b/twilio/rest/api/v2010/model_list_key_response.go @@ -1,24 +1,25 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListKeyResponse struct for ListKeyResponse type ListKeyResponse struct { - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - Keys []ApiV2010AccountKey `json:"Keys,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + Keys []ApiV2010AccountKey `json:"Keys,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_media_response.go b/twilio/rest/api/v2010/model_list_media_response.go index 059f7cf85..2b2b513b6 100644 --- a/twilio/rest/api/v2010/model_list_media_response.go +++ b/twilio/rest/api/v2010/model_list_media_response.go @@ -1,24 +1,25 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListMediaResponse struct for ListMediaResponse type ListMediaResponse struct { - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - MediaList []ApiV2010AccountMessageMedia `json:"MediaList,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + MediaList []ApiV2010AccountMessageMedia `json:"MediaList,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_member_response.go b/twilio/rest/api/v2010/model_list_member_response.go index 5b7db04e5..a16daee88 100644 --- a/twilio/rest/api/v2010/model_list_member_response.go +++ b/twilio/rest/api/v2010/model_list_member_response.go @@ -1,24 +1,25 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListMemberResponse struct for ListMemberResponse type ListMemberResponse struct { - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - QueueMembers []ApiV2010AccountQueueMember `json:"QueueMembers,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + QueueMembers []ApiV2010AccountQueueMember `json:"QueueMembers,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_message_response.go b/twilio/rest/api/v2010/model_list_message_response.go index f9bba4dd7..3ebb29322 100644 --- a/twilio/rest/api/v2010/model_list_message_response.go +++ b/twilio/rest/api/v2010/model_list_message_response.go @@ -1,24 +1,25 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListMessageResponse struct for ListMessageResponse type ListMessageResponse struct { - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - Messages []ApiV2010AccountMessage `json:"Messages,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + Messages []ApiV2010AccountMessage `json:"Messages,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_notification_response.go b/twilio/rest/api/v2010/model_list_notification_response.go index d095e7a2a..e8d3bf4c6 100644 --- a/twilio/rest/api/v2010/model_list_notification_response.go +++ b/twilio/rest/api/v2010/model_list_notification_response.go @@ -1,24 +1,25 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListNotificationResponse struct for ListNotificationResponse type ListNotificationResponse struct { - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Notifications []ApiV2010AccountNotification `json:"Notifications,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Notifications []ApiV2010AccountNotification `json:"Notifications,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_outgoing_caller_id_response.go b/twilio/rest/api/v2010/model_list_outgoing_caller_id_response.go index 3c26e8f9b..1b1293f08 100644 --- a/twilio/rest/api/v2010/model_list_outgoing_caller_id_response.go +++ b/twilio/rest/api/v2010/model_list_outgoing_caller_id_response.go @@ -1,24 +1,25 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListOutgoingCallerIdResponse struct for ListOutgoingCallerIdResponse type ListOutgoingCallerIdResponse struct { - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` OutgoingCallerIds []ApiV2010AccountOutgoingCallerId `json:"OutgoingCallerIds,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_participant_response.go b/twilio/rest/api/v2010/model_list_participant_response.go index 2b938a801..da3e9e502 100644 --- a/twilio/rest/api/v2010/model_list_participant_response.go +++ b/twilio/rest/api/v2010/model_list_participant_response.go @@ -1,24 +1,25 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListParticipantResponse struct for ListParticipantResponse type ListParticipantResponse struct { - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - Participants []ApiV2010AccountConferenceParticipant `json:"Participants,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + Participants []ApiV2010AccountConferenceParticipant `json:"Participants,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_queue_response.go b/twilio/rest/api/v2010/model_list_queue_response.go index e0d8010bd..b692f1a29 100644 --- a/twilio/rest/api/v2010/model_list_queue_response.go +++ b/twilio/rest/api/v2010/model_list_queue_response.go @@ -1,24 +1,25 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListQueueResponse struct for ListQueueResponse type ListQueueResponse struct { - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Queues []ApiV2010AccountQueue `json:"Queues,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Queues []ApiV2010AccountQueue `json:"Queues,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_recording_add_on_result_payload_response.go b/twilio/rest/api/v2010/model_list_recording_add_on_result_payload_response.go index e4e5bb180..3710be520 100644 --- a/twilio/rest/api/v2010/model_list_recording_add_on_result_payload_response.go +++ b/twilio/rest/api/v2010/model_list_recording_add_on_result_payload_response.go @@ -1,24 +1,25 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListRecordingAddOnResultPayloadResponse struct for ListRecordingAddOnResultPayloadResponse type ListRecordingAddOnResultPayloadResponse struct { - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - Payloads []ApiV2010AccountRecordingRecordingAddOnResultRecordingAddOnResultPayload `json:"Payloads,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + Payloads []ApiV2010AccountRecordingRecordingAddOnResultRecordingAddOnResultPayload `json:"Payloads,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_recording_add_on_result_response.go b/twilio/rest/api/v2010/model_list_recording_add_on_result_response.go index 2fa689f26..ce2383128 100644 --- a/twilio/rest/api/v2010/model_list_recording_add_on_result_response.go +++ b/twilio/rest/api/v2010/model_list_recording_add_on_result_response.go @@ -1,24 +1,25 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListRecordingAddOnResultResponse struct for ListRecordingAddOnResultResponse type ListRecordingAddOnResultResponse struct { - AddOnResults []ApiV2010AccountRecordingRecordingAddOnResult `json:"AddOnResults,omitempty"` - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + AddOnResults []ApiV2010AccountRecordingRecordingAddOnResult `json:"AddOnResults,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_recording_response.go b/twilio/rest/api/v2010/model_list_recording_response.go index 43706810f..920a67a92 100644 --- a/twilio/rest/api/v2010/model_list_recording_response.go +++ b/twilio/rest/api/v2010/model_list_recording_response.go @@ -1,24 +1,25 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListRecordingResponse struct for ListRecordingResponse type ListRecordingResponse struct { - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Recordings []ApiV2010AccountRecording `json:"Recordings,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Recordings []ApiV2010AccountRecording `json:"Recordings,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_recording_transcription_response.go b/twilio/rest/api/v2010/model_list_recording_transcription_response.go index 69c0ca55d..691337135 100644 --- a/twilio/rest/api/v2010/model_list_recording_transcription_response.go +++ b/twilio/rest/api/v2010/model_list_recording_transcription_response.go @@ -1,24 +1,25 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListRecordingTranscriptionResponse struct for ListRecordingTranscriptionResponse type ListRecordingTranscriptionResponse struct { - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Transcriptions []ApiV2010AccountRecordingRecordingTranscription `json:"Transcriptions,omitempty"` - Uri string `json:"Uri,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Transcriptions []ApiV2010AccountRecordingRecordingTranscription `json:"Transcriptions,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_short_code_response.go b/twilio/rest/api/v2010/model_list_short_code_response.go index f2edfad3e..2dd564601 100644 --- a/twilio/rest/api/v2010/model_list_short_code_response.go +++ b/twilio/rest/api/v2010/model_list_short_code_response.go @@ -1,24 +1,25 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListShortCodeResponse struct for ListShortCodeResponse type ListShortCodeResponse struct { - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - ShortCodes []ApiV2010AccountShortCode `json:"ShortCodes,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + ShortCodes []ApiV2010AccountShortCode `json:"ShortCodes,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_signing_key_response.go b/twilio/rest/api/v2010/model_list_signing_key_response.go index 57ff48600..5ce22f54c 100644 --- a/twilio/rest/api/v2010/model_list_signing_key_response.go +++ b/twilio/rest/api/v2010/model_list_signing_key_response.go @@ -1,24 +1,25 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListSigningKeyResponse struct for ListSigningKeyResponse type ListSigningKeyResponse struct { - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - SigningKeys []ApiV2010AccountSigningKey `json:"SigningKeys,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + SigningKeys []ApiV2010AccountSigningKey `json:"SigningKeys,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_sip_auth_calls_credential_list_mapping_response.go b/twilio/rest/api/v2010/model_list_sip_auth_calls_credential_list_mapping_response.go index 234362751..338f57fcc 100644 --- a/twilio/rest/api/v2010/model_list_sip_auth_calls_credential_list_mapping_response.go +++ b/twilio/rest/api/v2010/model_list_sip_auth_calls_credential_list_mapping_response.go @@ -1,24 +1,25 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListSipAuthCallsCredentialListMappingResponse struct for ListSipAuthCallsCredentialListMappingResponse type ListSipAuthCallsCredentialListMappingResponse struct { - Contents []ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsCredentialListMapping `json:"Contents,omitempty"` - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + Contents []ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsCredentialListMapping `json:"Contents,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_sip_auth_calls_ip_access_control_list_mapping_response.go b/twilio/rest/api/v2010/model_list_sip_auth_calls_ip_access_control_list_mapping_response.go index a57d65090..e5926f517 100644 --- a/twilio/rest/api/v2010/model_list_sip_auth_calls_ip_access_control_list_mapping_response.go +++ b/twilio/rest/api/v2010/model_list_sip_auth_calls_ip_access_control_list_mapping_response.go @@ -1,24 +1,25 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListSipAuthCallsIpAccessControlListMappingResponse struct for ListSipAuthCallsIpAccessControlListMappingResponse type ListSipAuthCallsIpAccessControlListMappingResponse struct { - Contents []ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsIpAccessControlListMapping `json:"Contents,omitempty"` - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + Contents []ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsIpAccessControlListMapping `json:"Contents,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_sip_auth_registrations_credential_list_mapping_response.go b/twilio/rest/api/v2010/model_list_sip_auth_registrations_credential_list_mapping_response.go index 9ec9ce316..c5ecf9c5a 100644 --- a/twilio/rest/api/v2010/model_list_sip_auth_registrations_credential_list_mapping_response.go +++ b/twilio/rest/api/v2010/model_list_sip_auth_registrations_credential_list_mapping_response.go @@ -1,24 +1,25 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListSipAuthRegistrationsCredentialListMappingResponse struct for ListSipAuthRegistrationsCredentialListMappingResponse type ListSipAuthRegistrationsCredentialListMappingResponse struct { - Contents []ApiV2010AccountSipSipDomainSipAuthSipAuthRegistrationsSipAuthRegistrationsCredentialListMapping `json:"Contents,omitempty"` - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + Contents []ApiV2010AccountSipSipDomainSipAuthSipAuthRegistrationsSipAuthRegistrationsCredentialListMapping `json:"Contents,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_sip_credential_list_mapping_response.go b/twilio/rest/api/v2010/model_list_sip_credential_list_mapping_response.go index b490e5657..8c4e11753 100644 --- a/twilio/rest/api/v2010/model_list_sip_credential_list_mapping_response.go +++ b/twilio/rest/api/v2010/model_list_sip_credential_list_mapping_response.go @@ -1,24 +1,25 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListSipCredentialListMappingResponse struct for ListSipCredentialListMappingResponse type ListSipCredentialListMappingResponse struct { CredentialListMappings []ApiV2010AccountSipSipDomainSipCredentialListMapping `json:"CredentialListMappings,omitempty"` - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_sip_credential_list_response.go b/twilio/rest/api/v2010/model_list_sip_credential_list_response.go index 689e857e5..b002ff9a5 100644 --- a/twilio/rest/api/v2010/model_list_sip_credential_list_response.go +++ b/twilio/rest/api/v2010/model_list_sip_credential_list_response.go @@ -1,24 +1,25 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListSipCredentialListResponse struct for ListSipCredentialListResponse type ListSipCredentialListResponse struct { CredentialLists []ApiV2010AccountSipSipCredentialList `json:"CredentialLists,omitempty"` - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_sip_credential_response.go b/twilio/rest/api/v2010/model_list_sip_credential_response.go index 61d2495cb..a18b79902 100644 --- a/twilio/rest/api/v2010/model_list_sip_credential_response.go +++ b/twilio/rest/api/v2010/model_list_sip_credential_response.go @@ -1,24 +1,25 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListSipCredentialResponse struct for ListSipCredentialResponse type ListSipCredentialResponse struct { - Credentials []ApiV2010AccountSipSipCredentialListSipCredential `json:"Credentials,omitempty"` - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + Credentials []ApiV2010AccountSipSipCredentialListSipCredential `json:"Credentials,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_sip_domain_response.go b/twilio/rest/api/v2010/model_list_sip_domain_response.go index ce524fafa..4b4008e17 100644 --- a/twilio/rest/api/v2010/model_list_sip_domain_response.go +++ b/twilio/rest/api/v2010/model_list_sip_domain_response.go @@ -1,24 +1,25 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListSipDomainResponse struct for ListSipDomainResponse type ListSipDomainResponse struct { - Domains []ApiV2010AccountSipSipDomain `json:"Domains,omitempty"` - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + Domains []ApiV2010AccountSipSipDomain `json:"Domains,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_sip_ip_access_control_list_mapping_response.go b/twilio/rest/api/v2010/model_list_sip_ip_access_control_list_mapping_response.go index b788754f2..a4018bfa5 100644 --- a/twilio/rest/api/v2010/model_list_sip_ip_access_control_list_mapping_response.go +++ b/twilio/rest/api/v2010/model_list_sip_ip_access_control_list_mapping_response.go @@ -1,24 +1,25 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListSipIpAccessControlListMappingResponse struct for ListSipIpAccessControlListMappingResponse type ListSipIpAccessControlListMappingResponse struct { - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` IpAccessControlListMappings []ApiV2010AccountSipSipDomainSipIpAccessControlListMapping `json:"IpAccessControlListMappings,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_sip_ip_access_control_list_response.go b/twilio/rest/api/v2010/model_list_sip_ip_access_control_list_response.go index fed49e4ec..d03a21329 100644 --- a/twilio/rest/api/v2010/model_list_sip_ip_access_control_list_response.go +++ b/twilio/rest/api/v2010/model_list_sip_ip_access_control_list_response.go @@ -1,24 +1,25 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListSipIpAccessControlListResponse struct for ListSipIpAccessControlListResponse type ListSipIpAccessControlListResponse struct { - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` IpAccessControlLists []ApiV2010AccountSipSipIpAccessControlList `json:"IpAccessControlLists,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_sip_ip_address_response.go b/twilio/rest/api/v2010/model_list_sip_ip_address_response.go index 5eef6eac8..2d4769fb5 100644 --- a/twilio/rest/api/v2010/model_list_sip_ip_address_response.go +++ b/twilio/rest/api/v2010/model_list_sip_ip_address_response.go @@ -1,24 +1,25 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListSipIpAddressResponse struct for ListSipIpAddressResponse type ListSipIpAddressResponse struct { - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - IpAddresses []ApiV2010AccountSipSipIpAccessControlListSipIpAddress `json:"IpAddresses,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + IpAddresses []ApiV2010AccountSipSipIpAccessControlListSipIpAddress `json:"IpAddresses,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_transcription_response.go b/twilio/rest/api/v2010/model_list_transcription_response.go index 863905937..8b1915e1b 100644 --- a/twilio/rest/api/v2010/model_list_transcription_response.go +++ b/twilio/rest/api/v2010/model_list_transcription_response.go @@ -1,24 +1,25 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListTranscriptionResponse struct for ListTranscriptionResponse type ListTranscriptionResponse struct { - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Transcriptions []ApiV2010AccountTranscription `json:"Transcriptions,omitempty"` - Uri string `json:"Uri,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Transcriptions []ApiV2010AccountTranscription `json:"Transcriptions,omitempty"` + Uri string `json:"Uri,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_usage_record_all_time_response.go b/twilio/rest/api/v2010/model_list_usage_record_all_time_response.go index 5e9735324..7aad690c4 100644 --- a/twilio/rest/api/v2010/model_list_usage_record_all_time_response.go +++ b/twilio/rest/api/v2010/model_list_usage_record_all_time_response.go @@ -1,24 +1,25 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListUsageRecordAllTimeResponse struct for ListUsageRecordAllTimeResponse type ListUsageRecordAllTimeResponse struct { - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` - UsageRecords []ApiV2010AccountUsageUsageRecordUsageRecordAllTime `json:"UsageRecords,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` + UsageRecords []ApiV2010AccountUsageUsageRecordUsageRecordAllTime `json:"UsageRecords,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_usage_record_daily_response.go b/twilio/rest/api/v2010/model_list_usage_record_daily_response.go index e6f41d713..23792ce02 100644 --- a/twilio/rest/api/v2010/model_list_usage_record_daily_response.go +++ b/twilio/rest/api/v2010/model_list_usage_record_daily_response.go @@ -1,24 +1,25 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListUsageRecordDailyResponse struct for ListUsageRecordDailyResponse type ListUsageRecordDailyResponse struct { - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` - UsageRecords []ApiV2010AccountUsageUsageRecordUsageRecordDaily `json:"UsageRecords,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` + UsageRecords []ApiV2010AccountUsageUsageRecordUsageRecordDaily `json:"UsageRecords,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_usage_record_last_month_response.go b/twilio/rest/api/v2010/model_list_usage_record_last_month_response.go index d1f16e02b..cfbe5bf75 100644 --- a/twilio/rest/api/v2010/model_list_usage_record_last_month_response.go +++ b/twilio/rest/api/v2010/model_list_usage_record_last_month_response.go @@ -1,24 +1,25 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListUsageRecordLastMonthResponse struct for ListUsageRecordLastMonthResponse type ListUsageRecordLastMonthResponse struct { - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` - UsageRecords []ApiV2010AccountUsageUsageRecordUsageRecordLastMonth `json:"UsageRecords,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` + UsageRecords []ApiV2010AccountUsageUsageRecordUsageRecordLastMonth `json:"UsageRecords,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_usage_record_monthly_response.go b/twilio/rest/api/v2010/model_list_usage_record_monthly_response.go index c910fd098..1ae63cfe5 100644 --- a/twilio/rest/api/v2010/model_list_usage_record_monthly_response.go +++ b/twilio/rest/api/v2010/model_list_usage_record_monthly_response.go @@ -1,24 +1,25 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListUsageRecordMonthlyResponse struct for ListUsageRecordMonthlyResponse type ListUsageRecordMonthlyResponse struct { - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` - UsageRecords []ApiV2010AccountUsageUsageRecordUsageRecordMonthly `json:"UsageRecords,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` + UsageRecords []ApiV2010AccountUsageUsageRecordUsageRecordMonthly `json:"UsageRecords,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_usage_record_response.go b/twilio/rest/api/v2010/model_list_usage_record_response.go index dcefedd40..eaea62e3c 100644 --- a/twilio/rest/api/v2010/model_list_usage_record_response.go +++ b/twilio/rest/api/v2010/model_list_usage_record_response.go @@ -1,24 +1,25 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListUsageRecordResponse struct for ListUsageRecordResponse type ListUsageRecordResponse struct { - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` - UsageRecords []ApiV2010AccountUsageUsageRecord `json:"UsageRecords,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` + UsageRecords []ApiV2010AccountUsageUsageRecord `json:"UsageRecords,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_usage_record_this_month_response.go b/twilio/rest/api/v2010/model_list_usage_record_this_month_response.go index 437f03eaa..839266650 100644 --- a/twilio/rest/api/v2010/model_list_usage_record_this_month_response.go +++ b/twilio/rest/api/v2010/model_list_usage_record_this_month_response.go @@ -1,24 +1,25 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListUsageRecordThisMonthResponse struct for ListUsageRecordThisMonthResponse type ListUsageRecordThisMonthResponse struct { - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` - UsageRecords []ApiV2010AccountUsageUsageRecordUsageRecordThisMonth `json:"UsageRecords,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` + UsageRecords []ApiV2010AccountUsageUsageRecordUsageRecordThisMonth `json:"UsageRecords,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_usage_record_today_response.go b/twilio/rest/api/v2010/model_list_usage_record_today_response.go index 1b6925651..a3e7889f3 100644 --- a/twilio/rest/api/v2010/model_list_usage_record_today_response.go +++ b/twilio/rest/api/v2010/model_list_usage_record_today_response.go @@ -1,24 +1,25 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListUsageRecordTodayResponse struct for ListUsageRecordTodayResponse type ListUsageRecordTodayResponse struct { - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` - UsageRecords []ApiV2010AccountUsageUsageRecordUsageRecordToday `json:"UsageRecords,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` + UsageRecords []ApiV2010AccountUsageUsageRecordUsageRecordToday `json:"UsageRecords,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_usage_record_yearly_response.go b/twilio/rest/api/v2010/model_list_usage_record_yearly_response.go index 73277cea7..bd1fdb9ac 100644 --- a/twilio/rest/api/v2010/model_list_usage_record_yearly_response.go +++ b/twilio/rest/api/v2010/model_list_usage_record_yearly_response.go @@ -1,24 +1,25 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListUsageRecordYearlyResponse struct for ListUsageRecordYearlyResponse type ListUsageRecordYearlyResponse struct { - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` - UsageRecords []ApiV2010AccountUsageUsageRecordUsageRecordYearly `json:"UsageRecords,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` + UsageRecords []ApiV2010AccountUsageUsageRecordUsageRecordYearly `json:"UsageRecords,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_usage_record_yesterday_response.go b/twilio/rest/api/v2010/model_list_usage_record_yesterday_response.go index 416690ceb..25fc7c32b 100644 --- a/twilio/rest/api/v2010/model_list_usage_record_yesterday_response.go +++ b/twilio/rest/api/v2010/model_list_usage_record_yesterday_response.go @@ -1,24 +1,25 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListUsageRecordYesterdayResponse struct for ListUsageRecordYesterdayResponse type ListUsageRecordYesterdayResponse struct { - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` - UsageRecords []ApiV2010AccountUsageUsageRecordUsageRecordYesterday `json:"UsageRecords,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` + UsageRecords []ApiV2010AccountUsageUsageRecordUsageRecordYesterday `json:"UsageRecords,omitempty"` } diff --git a/twilio/rest/api/v2010/model_list_usage_trigger_response.go b/twilio/rest/api/v2010/model_list_usage_trigger_response.go index 4dc0dd163..6addb6df4 100644 --- a/twilio/rest/api/v2010/model_list_usage_trigger_response.go +++ b/twilio/rest/api/v2010/model_list_usage_trigger_response.go @@ -1,24 +1,25 @@ /* - * Twilio - Api - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListUsageTriggerResponse struct for ListUsageTriggerResponse type ListUsageTriggerResponse struct { - End int32 `json:"End,omitempty"` - FirstPageUri string `json:"FirstPageUri,omitempty"` - NextPageUri string `json:"NextPageUri,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` - PreviousPageUri string `json:"PreviousPageUri,omitempty"` - Start int32 `json:"Start,omitempty"` - Uri string `json:"Uri,omitempty"` - UsageTriggers []ApiV2010AccountUsageUsageTrigger `json:"UsageTriggers,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` + UsageTriggers []ApiV2010AccountUsageUsageTrigger `json:"UsageTriggers,omitempty"` } diff --git a/twilio/rest/autopilot/v1/api_default.go b/twilio/rest/autopilot/v1/api_default.go index 73e0f6341..23c0e97f4 100644 --- a/twilio/rest/autopilot/v1/api_default.go +++ b/twilio/rest/autopilot/v1/api_default.go @@ -1,11 +1,11 @@ /* - * Twilio - Autopilot - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,9 +14,10 @@ package openapi import ( "encoding/json" "fmt" - twilio "github.com/twilio/twilio-go/client" "net/url" - "strings" + "strings" + + twilio "github.com/twilio/twilio-go/client" ) type DefaultApiService struct { @@ -25,21 +26,21 @@ type DefaultApiService struct { } func NewDefaultApiService(client *twilio.Client) *DefaultApiService { - return &DefaultApiService { - client: client, + return &DefaultApiService{ + client: client, baseURL: "https://autopilot.twilio.com", } } // CreateAssistantParams Optional parameters for the method 'CreateAssistant' type CreateAssistantParams struct { - CallbackEvents *string `json:"CallbackEvents,omitempty"` - CallbackUrl *string `json:"CallbackUrl,omitempty"` - Defaults *map[string]interface{} `json:"Defaults,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - LogQueries *bool `json:"LogQueries,omitempty"` - StyleSheet *map[string]interface{} `json:"StyleSheet,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + CallbackEvents *string `json:"CallbackEvents,omitempty"` + CallbackUrl *string `json:"CallbackUrl,omitempty"` + Defaults *map[string]interface{} `json:"Defaults,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + LogQueries *bool `json:"LogQueries,omitempty"` + StyleSheet *map[string]interface{} `json:"StyleSheet,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` } /* @@ -53,65 +54,65 @@ type CreateAssistantParams struct { * @param "StyleSheet" (map[string]interface{}) - The JSON string that defines the Assistant's [style sheet](https://www.twilio.com/docs/autopilot/api/assistant/stylesheet) * @param "UniqueName" (string) - An application-defined string that uniquely identifies the new resource. It can be used as an alternative to the `sid` in the URL path to address the resource. The first 64 characters must be unique. * @return AutopilotV1Assistant -*/ + */ func (c *DefaultApiService) CreateAssistant(params *CreateAssistantParams) (*AutopilotV1Assistant, error) { - path := "/v1/Assistants" + path := "/v1/Assistants" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.CallbackEvents != nil { - data.Set("CallbackEvents", *params.CallbackEvents) -} - if params != nil && params.CallbackUrl != nil { - data.Set("CallbackUrl", *params.CallbackUrl) -} - if params != nil && params.Defaults != nil { - v, err := json.Marshal(params.Defaults) - - if err != nil { - return nil, err + if params != nil && params.CallbackEvents != nil { + data.Set("CallbackEvents", *params.CallbackEvents) } + if params != nil && params.CallbackUrl != nil { + data.Set("CallbackUrl", *params.CallbackUrl) + } + if params != nil && params.Defaults != nil { + v, err := json.Marshal(params.Defaults) - data.Set("Defaults", fmt.Sprint(v)) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.LogQueries != nil { - data.Set("LogQueries", fmt.Sprint(*params.LogQueries)) -} - if params != nil && params.StyleSheet != nil { - v, err := json.Marshal(params.StyleSheet) + if err != nil { + return nil, err + } - if err != nil { - return nil, err + data.Set("Defaults", fmt.Sprint(v)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.LogQueries != nil { + data.Set("LogQueries", fmt.Sprint(*params.LogQueries)) } + if params != nil && params.StyleSheet != nil { + v, err := json.Marshal(params.StyleSheet) - data.Set("StyleSheet", fmt.Sprint(v)) -} - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) -} + if err != nil { + return nil, err + } + data.Set("StyleSheet", fmt.Sprint(v)) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &AutopilotV1Assistant{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &AutopilotV1Assistant{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateFieldParams Optional parameters for the method 'CreateField' type CreateFieldParams struct { - FieldType *string `json:"FieldType,omitempty"` + FieldType *string `json:"FieldType,omitempty"` UniqueName *string `json:"UniqueName,omitempty"` } @@ -123,41 +124,41 @@ type CreateFieldParams struct { * @param "FieldType" (string) - The Field Type of the new field. Can be: a [Built-in Field Type](https://www.twilio.com/docs/autopilot/built-in-field-types), the `unique_name`, or the `sid` of a custom Field Type. * @param "UniqueName" (string) - An application-defined string that uniquely identifies the new resource. This value must be a unique string of no more than 64 characters. It can be used as an alternative to the `sid` in the URL path to address the resource. * @return AutopilotV1AssistantTaskField -*/ + */ func (c *DefaultApiService) CreateField(AssistantSid string, TaskSid string, params *CreateFieldParams) (*AutopilotV1AssistantTaskField, error) { - path := "/v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Fields" + path := "/v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Fields" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) path = strings.Replace(path, "{"+"TaskSid"+"}", TaskSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.FieldType != nil { - data.Set("FieldType", *params.FieldType) -} - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) -} + data := url.Values{} + headers := 0 + if params != nil && params.FieldType != nil { + data.Set("FieldType", *params.FieldType) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &AutopilotV1AssistantTaskField{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &AutopilotV1AssistantTaskField{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateFieldTypeParams Optional parameters for the method 'CreateFieldType' type CreateFieldTypeParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` } /* @@ -167,41 +168,41 @@ type CreateFieldTypeParams struct { * @param "FriendlyName" (string) - A descriptive string that you create to describe the new resource. It is not unique and can be up to 255 characters long. * @param "UniqueName" (string) - An application-defined string that uniquely identifies the new resource. It can be used as an alternative to the `sid` in the URL path to address the resource. The first 64 characters must be unique. * @return AutopilotV1AssistantFieldType -*/ + */ func (c *DefaultApiService) CreateFieldType(AssistantSid string, params *CreateFieldTypeParams) (*AutopilotV1AssistantFieldType, error) { - path := "/v1/Assistants/{AssistantSid}/FieldTypes" + path := "/v1/Assistants/{AssistantSid}/FieldTypes" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) -} + data := url.Values{} + headers := 0 + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &AutopilotV1AssistantFieldType{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &AutopilotV1AssistantFieldType{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateFieldValueParams Optional parameters for the method 'CreateFieldValue' type CreateFieldValueParams struct { - Language *string `json:"Language,omitempty"` + Language *string `json:"Language,omitempty"` SynonymOf *string `json:"SynonymOf,omitempty"` - Value *string `json:"Value,omitempty"` + Value *string `json:"Value,omitempty"` } /* @@ -213,44 +214,44 @@ type CreateFieldValueParams struct { * @param "SynonymOf" (string) - The string value that indicates which word the field value is a synonym of. * @param "Value" (string) - The Field Value data. * @return AutopilotV1AssistantFieldTypeFieldValue -*/ + */ func (c *DefaultApiService) CreateFieldValue(AssistantSid string, FieldTypeSid string, params *CreateFieldValueParams) (*AutopilotV1AssistantFieldTypeFieldValue, error) { - path := "/v1/Assistants/{AssistantSid}/FieldTypes/{FieldTypeSid}/FieldValues" + path := "/v1/Assistants/{AssistantSid}/FieldTypes/{FieldTypeSid}/FieldValues" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) path = strings.Replace(path, "{"+"FieldTypeSid"+"}", FieldTypeSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Language != nil { - data.Set("Language", *params.Language) -} - if params != nil && params.SynonymOf != nil { - data.Set("SynonymOf", *params.SynonymOf) -} - if params != nil && params.Value != nil { - data.Set("Value", *params.Value) -} + data := url.Values{} + headers := 0 + if params != nil && params.Language != nil { + data.Set("Language", *params.Language) + } + if params != nil && params.SynonymOf != nil { + data.Set("SynonymOf", *params.SynonymOf) + } + if params != nil && params.Value != nil { + data.Set("Value", *params.Value) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &AutopilotV1AssistantFieldTypeFieldValue{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &AutopilotV1AssistantFieldTypeFieldValue{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateModelBuildParams Optional parameters for the method 'CreateModelBuild' type CreateModelBuildParams struct { StatusCallback *string `json:"StatusCallback,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` } /* @@ -260,42 +261,42 @@ type CreateModelBuildParams struct { * @param "StatusCallback" (string) - The URL we should call using a POST method to send status information to your application. * @param "UniqueName" (string) - An application-defined string that uniquely identifies the new resource. This value must be a unique string of no more than 64 characters. It can be used as an alternative to the `sid` in the URL path to address the resource. * @return AutopilotV1AssistantModelBuild -*/ + */ func (c *DefaultApiService) CreateModelBuild(AssistantSid string, params *CreateModelBuildParams) (*AutopilotV1AssistantModelBuild, error) { - path := "/v1/Assistants/{AssistantSid}/ModelBuilds" + path := "/v1/Assistants/{AssistantSid}/ModelBuilds" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.StatusCallback != nil { - data.Set("StatusCallback", *params.StatusCallback) -} - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) -} + data := url.Values{} + headers := 0 + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &AutopilotV1AssistantModelBuild{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &AutopilotV1AssistantModelBuild{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateQueryParams Optional parameters for the method 'CreateQuery' type CreateQueryParams struct { - Language *string `json:"Language,omitempty"` + Language *string `json:"Language,omitempty"` ModelBuild *string `json:"ModelBuild,omitempty"` - Query *string `json:"Query,omitempty"` - Tasks *string `json:"Tasks,omitempty"` + Query *string `json:"Query,omitempty"` + Tasks *string `json:"Tasks,omitempty"` } /* @@ -307,47 +308,47 @@ type CreateQueryParams struct { * @param "Query" (string) - The end-user's natural language input. It can be up to 2048 characters long. * @param "Tasks" (string) - The list of tasks to limit the new query to. Tasks are expressed as a comma-separated list of task `unique_name` values. For example, `task-unique_name-1, task-unique_name-2`. Listing specific tasks is useful to constrain the paths that a user can take. * @return AutopilotV1AssistantQuery -*/ + */ func (c *DefaultApiService) CreateQuery(AssistantSid string, params *CreateQueryParams) (*AutopilotV1AssistantQuery, error) { - path := "/v1/Assistants/{AssistantSid}/Queries" + path := "/v1/Assistants/{AssistantSid}/Queries" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Language != nil { - data.Set("Language", *params.Language) -} - if params != nil && params.ModelBuild != nil { - data.Set("ModelBuild", *params.ModelBuild) -} - if params != nil && params.Query != nil { - data.Set("Query", *params.Query) -} - if params != nil && params.Tasks != nil { - data.Set("Tasks", *params.Tasks) -} + data := url.Values{} + headers := 0 + if params != nil && params.Language != nil { + data.Set("Language", *params.Language) + } + if params != nil && params.ModelBuild != nil { + data.Set("ModelBuild", *params.ModelBuild) + } + if params != nil && params.Query != nil { + data.Set("Query", *params.Query) + } + if params != nil && params.Tasks != nil { + data.Set("Tasks", *params.Tasks) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &AutopilotV1AssistantQuery{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &AutopilotV1AssistantQuery{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateSampleParams Optional parameters for the method 'CreateSample' type CreateSampleParams struct { - Language *string `json:"Language,omitempty"` + Language *string `json:"Language,omitempty"` SourceChannel *string `json:"SourceChannel,omitempty"` - TaggedText *string `json:"TaggedText,omitempty"` + TaggedText *string `json:"TaggedText,omitempty"` } /* @@ -359,46 +360,46 @@ type CreateSampleParams struct { * @param "SourceChannel" (string) - The communication channel from which the new sample was captured. Can be: `voice`, `sms`, `chat`, `alexa`, `google-assistant`, `slack`, or null if not included. * @param "TaggedText" (string) - The text example of how end users might express the task. The sample can contain [Field tag blocks](https://www.twilio.com/docs/autopilot/api/task-sample#field-tagging). * @return AutopilotV1AssistantTaskSample -*/ + */ func (c *DefaultApiService) CreateSample(AssistantSid string, TaskSid string, params *CreateSampleParams) (*AutopilotV1AssistantTaskSample, error) { - path := "/v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Samples" + path := "/v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Samples" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) path = strings.Replace(path, "{"+"TaskSid"+"}", TaskSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Language != nil { - data.Set("Language", *params.Language) -} - if params != nil && params.SourceChannel != nil { - data.Set("SourceChannel", *params.SourceChannel) -} - if params != nil && params.TaggedText != nil { - data.Set("TaggedText", *params.TaggedText) -} + data := url.Values{} + headers := 0 + if params != nil && params.Language != nil { + data.Set("Language", *params.Language) + } + if params != nil && params.SourceChannel != nil { + data.Set("SourceChannel", *params.SourceChannel) + } + if params != nil && params.TaggedText != nil { + data.Set("TaggedText", *params.TaggedText) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &AutopilotV1AssistantTaskSample{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &AutopilotV1AssistantTaskSample{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateTaskParams Optional parameters for the method 'CreateTask' type CreateTaskParams struct { - Actions *map[string]interface{} `json:"Actions,omitempty"` - ActionsUrl *string `json:"ActionsUrl,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + Actions *map[string]interface{} `json:"Actions,omitempty"` + ActionsUrl *string `json:"ActionsUrl,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` } /* @@ -410,54 +411,54 @@ type CreateTaskParams struct { * @param "FriendlyName" (string) - A descriptive string that you create to describe the new resource. It is not unique and can be up to 255 characters long. * @param "UniqueName" (string) - An application-defined string that uniquely identifies the new resource. It can be used as an alternative to the `sid` in the URL path to address the resource. This value must be unique and 64 characters or less in length. * @return AutopilotV1AssistantTask -*/ + */ func (c *DefaultApiService) CreateTask(AssistantSid string, params *CreateTaskParams) (*AutopilotV1AssistantTask, error) { - path := "/v1/Assistants/{AssistantSid}/Tasks" + path := "/v1/Assistants/{AssistantSid}/Tasks" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Actions != nil { - v, err := json.Marshal(params.Actions) + if params != nil && params.Actions != nil { + v, err := json.Marshal(params.Actions) - if err != nil { - return nil, err - } - - data.Set("Actions", fmt.Sprint(v)) -} - if params != nil && params.ActionsUrl != nil { - data.Set("ActionsUrl", *params.ActionsUrl) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) -} + if err != nil { + return nil, err + } + data.Set("Actions", fmt.Sprint(v)) + } + if params != nil && params.ActionsUrl != nil { + data.Set("ActionsUrl", *params.ActionsUrl) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &AutopilotV1AssistantTask{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &AutopilotV1AssistantTask{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateWebhookParams Optional parameters for the method 'CreateWebhook' type CreateWebhookParams struct { - Events *string `json:"Events,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + Events *string `json:"Events,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` WebhookMethod *string `json:"WebhookMethod,omitempty"` - WebhookUrl *string `json:"WebhookUrl,omitempty"` + WebhookUrl *string `json:"WebhookUrl,omitempty"` } /* @@ -469,64 +470,61 @@ type CreateWebhookParams struct { * @param "WebhookMethod" (string) - The method to be used when calling the webhook's URL. * @param "WebhookUrl" (string) - The URL associated with this Webhook. * @return AutopilotV1AssistantWebhook -*/ + */ func (c *DefaultApiService) CreateWebhook(AssistantSid string, params *CreateWebhookParams) (*AutopilotV1AssistantWebhook, error) { - path := "/v1/Assistants/{AssistantSid}/Webhooks" + path := "/v1/Assistants/{AssistantSid}/Webhooks" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Events != nil { - data.Set("Events", *params.Events) -} - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) -} - if params != nil && params.WebhookMethod != nil { - data.Set("WebhookMethod", *params.WebhookMethod) -} - if params != nil && params.WebhookUrl != nil { - data.Set("WebhookUrl", *params.WebhookUrl) -} + data := url.Values{} + headers := 0 + if params != nil && params.Events != nil { + data.Set("Events", *params.Events) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } + if params != nil && params.WebhookMethod != nil { + data.Set("WebhookMethod", *params.WebhookMethod) + } + if params != nil && params.WebhookUrl != nil { + data.Set("WebhookUrl", *params.WebhookUrl) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &AutopilotV1AssistantWebhook{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &AutopilotV1AssistantWebhook{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * DeleteAssistant Method for DeleteAssistant * @param Sid The Twilio-provided string that uniquely identifies the Assistant resource to delete. -*/ -func (c *DefaultApiService) DeleteAssistant(Sid string, ) (error) { - path := "/v1/Assistants/{Sid}" + */ +func (c *DefaultApiService) DeleteAssistant(Sid string) error { + path := "/v1/Assistants/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + defer resp.Body.Close() - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() - - return nil + return nil } /* @@ -534,51 +532,47 @@ func (c *DefaultApiService) DeleteAssistant(Sid string, ) (error) { * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the Task associated with the resources to delete. * @param TaskSid The SID of the [Task](https://www.twilio.com/docs/autopilot/api/task) resource associated with the Field resource to delete. * @param Sid The Twilio-provided string that uniquely identifies the Field resource to delete. -*/ -func (c *DefaultApiService) DeleteField(AssistantSid string, TaskSid string, Sid string, ) (error) { - path := "/v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Fields/{Sid}" + */ +func (c *DefaultApiService) DeleteField(AssistantSid string, TaskSid string, Sid string) error { + path := "/v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Fields/{Sid}" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) path = strings.Replace(path, "{"+"TaskSid"+"}", TaskSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + defer resp.Body.Close() - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() - - return nil + return nil } /* * DeleteFieldType Method for DeleteFieldType * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resources to delete. * @param Sid The Twilio-provided string that uniquely identifies the FieldType resource to delete. -*/ -func (c *DefaultApiService) DeleteFieldType(AssistantSid string, Sid string, ) (error) { - path := "/v1/Assistants/{AssistantSid}/FieldTypes/{Sid}" + */ +func (c *DefaultApiService) DeleteFieldType(AssistantSid string, Sid string) error { + path := "/v1/Assistants/{AssistantSid}/FieldTypes/{Sid}" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -586,76 +580,70 @@ func (c *DefaultApiService) DeleteFieldType(AssistantSid string, Sid string, ) ( * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the FieldType associated with the resources to delete. * @param FieldTypeSid The SID of the Field Type associated with the Field Value to delete. * @param Sid The Twilio-provided string that uniquely identifies the FieldValue resource to delete. -*/ -func (c *DefaultApiService) DeleteFieldValue(AssistantSid string, FieldTypeSid string, Sid string, ) (error) { - path := "/v1/Assistants/{AssistantSid}/FieldTypes/{FieldTypeSid}/FieldValues/{Sid}" + */ +func (c *DefaultApiService) DeleteFieldValue(AssistantSid string, FieldTypeSid string, Sid string) error { + path := "/v1/Assistants/{AssistantSid}/FieldTypes/{FieldTypeSid}/FieldValues/{Sid}" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) path = strings.Replace(path, "{"+"FieldTypeSid"+"}", FieldTypeSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* * DeleteModelBuild Method for DeleteModelBuild * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resources to delete. * @param Sid The Twilio-provided string that uniquely identifies the ModelBuild resource to delete. -*/ -func (c *DefaultApiService) DeleteModelBuild(AssistantSid string, Sid string, ) (error) { - path := "/v1/Assistants/{AssistantSid}/ModelBuilds/{Sid}" + */ +func (c *DefaultApiService) DeleteModelBuild(AssistantSid string, Sid string) error { + path := "/v1/Assistants/{AssistantSid}/ModelBuilds/{Sid}" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* * DeleteQuery Method for DeleteQuery * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resources to delete. * @param Sid The Twilio-provided string that uniquely identifies the Query resource to delete. -*/ -func (c *DefaultApiService) DeleteQuery(AssistantSid string, Sid string, ) (error) { - path := "/v1/Assistants/{AssistantSid}/Queries/{Sid}" + */ +func (c *DefaultApiService) DeleteQuery(AssistantSid string, Sid string) error { + path := "/v1/Assistants/{AssistantSid}/Queries/{Sid}" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -663,134 +651,124 @@ func (c *DefaultApiService) DeleteQuery(AssistantSid string, Sid string, ) (erro * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the Task associated with the resources to delete. * @param TaskSid The SID of the [Task](https://www.twilio.com/docs/autopilot/api/task) associated with the Sample resource to delete. * @param Sid The Twilio-provided string that uniquely identifies the Sample resource to delete. -*/ -func (c *DefaultApiService) DeleteSample(AssistantSid string, TaskSid string, Sid string, ) (error) { - path := "/v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Samples/{Sid}" + */ +func (c *DefaultApiService) DeleteSample(AssistantSid string, TaskSid string, Sid string) error { + path := "/v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Samples/{Sid}" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) path = strings.Replace(path, "{"+"TaskSid"+"}", TaskSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* * DeleteTask Method for DeleteTask * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resources to delete. * @param Sid The Twilio-provided string that uniquely identifies the Task resource to delete. -*/ -func (c *DefaultApiService) DeleteTask(AssistantSid string, Sid string, ) (error) { - path := "/v1/Assistants/{AssistantSid}/Tasks/{Sid}" + */ +func (c *DefaultApiService) DeleteTask(AssistantSid string, Sid string) error { + path := "/v1/Assistants/{AssistantSid}/Tasks/{Sid}" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + defer resp.Body.Close() - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() - - return nil + return nil } /* * DeleteWebhook Method for DeleteWebhook * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resources to delete. * @param Sid The Twilio-provided string that uniquely identifies the Webhook resource to delete. -*/ -func (c *DefaultApiService) DeleteWebhook(AssistantSid string, Sid string, ) (error) { - path := "/v1/Assistants/{AssistantSid}/Webhooks/{Sid}" + */ +func (c *DefaultApiService) DeleteWebhook(AssistantSid string, Sid string) error { + path := "/v1/Assistants/{AssistantSid}/Webhooks/{Sid}" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + defer resp.Body.Close() - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() - - return nil + return nil } /* * FetchAssistant Method for FetchAssistant * @param Sid The Twilio-provided string that uniquely identifies the Assistant resource to fetch. * @return AutopilotV1Assistant -*/ -func (c *DefaultApiService) FetchAssistant(Sid string, ) (*AutopilotV1Assistant, error) { - path := "/v1/Assistants/{Sid}" + */ +func (c *DefaultApiService) FetchAssistant(Sid string) (*AutopilotV1Assistant, error) { + path := "/v1/Assistants/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &AutopilotV1Assistant{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &AutopilotV1Assistant{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * FetchDefaults Method for FetchDefaults * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to fetch. * @return AutopilotV1AssistantDefaults -*/ -func (c *DefaultApiService) FetchDefaults(AssistantSid string, ) (*AutopilotV1AssistantDefaults, error) { - path := "/v1/Assistants/{AssistantSid}/Defaults" + */ +func (c *DefaultApiService) FetchDefaults(AssistantSid string) (*AutopilotV1AssistantDefaults, error) { + path := "/v1/Assistants/{AssistantSid}/Defaults" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &AutopilotV1AssistantDefaults{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &AutopilotV1AssistantDefaults{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -798,30 +776,28 @@ func (c *DefaultApiService) FetchDefaults(AssistantSid string, ) (*AutopilotV1As * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to fetch. * @param Sid The Twilio-provided string that uniquely identifies the Dialogue resource to fetch. * @return AutopilotV1AssistantDialogue -*/ -func (c *DefaultApiService) FetchDialogue(AssistantSid string, Sid string, ) (*AutopilotV1AssistantDialogue, error) { - path := "/v1/Assistants/{AssistantSid}/Dialogues/{Sid}" + */ +func (c *DefaultApiService) FetchDialogue(AssistantSid string, Sid string) (*AutopilotV1AssistantDialogue, error) { + path := "/v1/Assistants/{AssistantSid}/Dialogues/{Sid}" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &AutopilotV1AssistantDialogue{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &AutopilotV1AssistantDialogue{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -830,31 +806,29 @@ func (c *DefaultApiService) FetchDialogue(AssistantSid string, Sid string, ) (*A * @param TaskSid The SID of the [Task](https://www.twilio.com/docs/autopilot/api/task) resource associated with the Field resource to fetch. * @param Sid The Twilio-provided string that uniquely identifies the Field resource to fetch. * @return AutopilotV1AssistantTaskField -*/ -func (c *DefaultApiService) FetchField(AssistantSid string, TaskSid string, Sid string, ) (*AutopilotV1AssistantTaskField, error) { - path := "/v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Fields/{Sid}" + */ +func (c *DefaultApiService) FetchField(AssistantSid string, TaskSid string, Sid string) (*AutopilotV1AssistantTaskField, error) { + path := "/v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Fields/{Sid}" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) path = strings.Replace(path, "{"+"TaskSid"+"}", TaskSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &AutopilotV1AssistantTaskField{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &AutopilotV1AssistantTaskField{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -862,30 +836,28 @@ func (c *DefaultApiService) FetchField(AssistantSid string, TaskSid string, Sid * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to fetch. * @param Sid The Twilio-provided string that uniquely identifies the FieldType resource to fetch. * @return AutopilotV1AssistantFieldType -*/ -func (c *DefaultApiService) FetchFieldType(AssistantSid string, Sid string, ) (*AutopilotV1AssistantFieldType, error) { - path := "/v1/Assistants/{AssistantSid}/FieldTypes/{Sid}" + */ +func (c *DefaultApiService) FetchFieldType(AssistantSid string, Sid string) (*AutopilotV1AssistantFieldType, error) { + path := "/v1/Assistants/{AssistantSid}/FieldTypes/{Sid}" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &AutopilotV1AssistantFieldType{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &AutopilotV1AssistantFieldType{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -894,31 +866,29 @@ func (c *DefaultApiService) FetchFieldType(AssistantSid string, Sid string, ) (* * @param FieldTypeSid The SID of the Field Type associated with the Field Value to fetch. * @param Sid The Twilio-provided string that uniquely identifies the FieldValue resource to fetch. * @return AutopilotV1AssistantFieldTypeFieldValue -*/ -func (c *DefaultApiService) FetchFieldValue(AssistantSid string, FieldTypeSid string, Sid string, ) (*AutopilotV1AssistantFieldTypeFieldValue, error) { - path := "/v1/Assistants/{AssistantSid}/FieldTypes/{FieldTypeSid}/FieldValues/{Sid}" + */ +func (c *DefaultApiService) FetchFieldValue(AssistantSid string, FieldTypeSid string, Sid string) (*AutopilotV1AssistantFieldTypeFieldValue, error) { + path := "/v1/Assistants/{AssistantSid}/FieldTypes/{FieldTypeSid}/FieldValues/{Sid}" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) path = strings.Replace(path, "{"+"FieldTypeSid"+"}", FieldTypeSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &AutopilotV1AssistantFieldTypeFieldValue{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &AutopilotV1AssistantFieldTypeFieldValue{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -926,30 +896,28 @@ func (c *DefaultApiService) FetchFieldValue(AssistantSid string, FieldTypeSid st * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to fetch. * @param Sid The Twilio-provided string that uniquely identifies the ModelBuild resource to fetch. * @return AutopilotV1AssistantModelBuild -*/ -func (c *DefaultApiService) FetchModelBuild(AssistantSid string, Sid string, ) (*AutopilotV1AssistantModelBuild, error) { - path := "/v1/Assistants/{AssistantSid}/ModelBuilds/{Sid}" + */ +func (c *DefaultApiService) FetchModelBuild(AssistantSid string, Sid string) (*AutopilotV1AssistantModelBuild, error) { + path := "/v1/Assistants/{AssistantSid}/ModelBuilds/{Sid}" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &AutopilotV1AssistantModelBuild{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &AutopilotV1AssistantModelBuild{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -957,30 +925,28 @@ func (c *DefaultApiService) FetchModelBuild(AssistantSid string, Sid string, ) ( * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to fetch. * @param Sid The Twilio-provided string that uniquely identifies the Query resource to fetch. * @return AutopilotV1AssistantQuery -*/ -func (c *DefaultApiService) FetchQuery(AssistantSid string, Sid string, ) (*AutopilotV1AssistantQuery, error) { - path := "/v1/Assistants/{AssistantSid}/Queries/{Sid}" + */ +func (c *DefaultApiService) FetchQuery(AssistantSid string, Sid string) (*AutopilotV1AssistantQuery, error) { + path := "/v1/Assistants/{AssistantSid}/Queries/{Sid}" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &AutopilotV1AssistantQuery{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &AutopilotV1AssistantQuery{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -989,31 +955,29 @@ func (c *DefaultApiService) FetchQuery(AssistantSid string, Sid string, ) (*Auto * @param TaskSid The SID of the [Task](https://www.twilio.com/docs/autopilot/api/task) associated with the Sample resource to create. * @param Sid The Twilio-provided string that uniquely identifies the Sample resource to fetch. * @return AutopilotV1AssistantTaskSample -*/ -func (c *DefaultApiService) FetchSample(AssistantSid string, TaskSid string, Sid string, ) (*AutopilotV1AssistantTaskSample, error) { - path := "/v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Samples/{Sid}" + */ +func (c *DefaultApiService) FetchSample(AssistantSid string, TaskSid string, Sid string) (*AutopilotV1AssistantTaskSample, error) { + path := "/v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Samples/{Sid}" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) path = strings.Replace(path, "{"+"TaskSid"+"}", TaskSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &AutopilotV1AssistantTaskSample{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &AutopilotV1AssistantTaskSample{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -1021,29 +985,27 @@ func (c *DefaultApiService) FetchSample(AssistantSid string, TaskSid string, Sid * Returns Style sheet JSON object for the Assistant * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to fetch. * @return AutopilotV1AssistantStyleSheet -*/ -func (c *DefaultApiService) FetchStyleSheet(AssistantSid string, ) (*AutopilotV1AssistantStyleSheet, error) { - path := "/v1/Assistants/{AssistantSid}/StyleSheet" + */ +func (c *DefaultApiService) FetchStyleSheet(AssistantSid string) (*AutopilotV1AssistantStyleSheet, error) { + path := "/v1/Assistants/{AssistantSid}/StyleSheet" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &AutopilotV1AssistantStyleSheet{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &AutopilotV1AssistantStyleSheet{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -1051,30 +1013,28 @@ func (c *DefaultApiService) FetchStyleSheet(AssistantSid string, ) (*AutopilotV1 * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to fetch. * @param Sid The Twilio-provided string that uniquely identifies the Task resource to fetch. * @return AutopilotV1AssistantTask -*/ -func (c *DefaultApiService) FetchTask(AssistantSid string, Sid string, ) (*AutopilotV1AssistantTask, error) { - path := "/v1/Assistants/{AssistantSid}/Tasks/{Sid}" + */ +func (c *DefaultApiService) FetchTask(AssistantSid string, Sid string) (*AutopilotV1AssistantTask, error) { + path := "/v1/Assistants/{AssistantSid}/Tasks/{Sid}" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &AutopilotV1AssistantTask{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &AutopilotV1AssistantTask{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -1083,30 +1043,28 @@ func (c *DefaultApiService) FetchTask(AssistantSid string, Sid string, ) (*Autop * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the Task for which the task actions to fetch were defined. * @param TaskSid The SID of the [Task](https://www.twilio.com/docs/autopilot/api/task) for which the task actions to fetch were defined. * @return AutopilotV1AssistantTaskTaskActions -*/ -func (c *DefaultApiService) FetchTaskActions(AssistantSid string, TaskSid string, ) (*AutopilotV1AssistantTaskTaskActions, error) { - path := "/v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Actions" + */ +func (c *DefaultApiService) FetchTaskActions(AssistantSid string, TaskSid string) (*AutopilotV1AssistantTaskTaskActions, error) { + path := "/v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Actions" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) path = strings.Replace(path, "{"+"TaskSid"+"}", TaskSid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &AutopilotV1AssistantTaskTaskActions{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &AutopilotV1AssistantTaskTaskActions{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -1114,30 +1072,28 @@ func (c *DefaultApiService) FetchTaskActions(AssistantSid string, TaskSid string * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to fetch. * @param TaskSid The SID of the [Task](https://www.twilio.com/docs/autopilot/api/task) that is associated with the resource to fetch. * @return AutopilotV1AssistantTaskTaskStatistics -*/ -func (c *DefaultApiService) FetchTaskStatistics(AssistantSid string, TaskSid string, ) (*AutopilotV1AssistantTaskTaskStatistics, error) { - path := "/v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Statistics" + */ +func (c *DefaultApiService) FetchTaskStatistics(AssistantSid string, TaskSid string) (*AutopilotV1AssistantTaskTaskStatistics, error) { + path := "/v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Statistics" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) path = strings.Replace(path, "{"+"TaskSid"+"}", TaskSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &AutopilotV1AssistantTaskTaskStatistics{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &AutopilotV1AssistantTaskTaskStatistics{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -1145,31 +1101,30 @@ func (c *DefaultApiService) FetchTaskStatistics(AssistantSid string, TaskSid str * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to fetch. * @param Sid The Twilio-provided string that uniquely identifies the Webhook resource to fetch. * @return AutopilotV1AssistantWebhook -*/ -func (c *DefaultApiService) FetchWebhook(AssistantSid string, Sid string, ) (*AutopilotV1AssistantWebhook, error) { - path := "/v1/Assistants/{AssistantSid}/Webhooks/{Sid}" + */ +func (c *DefaultApiService) FetchWebhook(AssistantSid string, Sid string) (*AutopilotV1AssistantWebhook, error) { + path := "/v1/Assistants/{AssistantSid}/Webhooks/{Sid}" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &AutopilotV1AssistantWebhook{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &AutopilotV1AssistantWebhook{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListAssistantParams Optional parameters for the method 'ListAssistant' type ListAssistantParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1180,32 +1135,32 @@ type ListAssistantParams struct { * @param optional nil or *ListAssistantParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListAssistantResponse -*/ + */ func (c *DefaultApiService) ListAssistant(params *ListAssistantParams) (*ListAssistantResponse, error) { - path := "/v1/Assistants" + path := "/v1/Assistants" - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListAssistantResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListAssistantResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListFieldParams Optional parameters for the method 'ListField' type ListFieldParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1218,34 +1173,34 @@ type ListFieldParams struct { * @param optional nil or *ListFieldParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListFieldResponse -*/ + */ func (c *DefaultApiService) ListField(AssistantSid string, TaskSid string, params *ListFieldParams) (*ListFieldResponse, error) { - path := "/v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Fields" + path := "/v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Fields" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) path = strings.Replace(path, "{"+"TaskSid"+"}", TaskSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListFieldResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListFieldResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListFieldTypeParams Optional parameters for the method 'ListFieldType' type ListFieldTypeParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1257,37 +1212,37 @@ type ListFieldTypeParams struct { * @param optional nil or *ListFieldTypeParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListFieldTypeResponse -*/ + */ func (c *DefaultApiService) ListFieldType(AssistantSid string, params *ListFieldTypeParams) (*ListFieldTypeResponse, error) { - path := "/v1/Assistants/{AssistantSid}/FieldTypes" + path := "/v1/Assistants/{AssistantSid}/FieldTypes" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListFieldTypeResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListFieldTypeResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListFieldValueParams Optional parameters for the method 'ListFieldValue' type ListFieldValueParams struct { Language *string `json:"Language,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -1298,37 +1253,37 @@ type ListFieldValueParams struct { * @param "Language" (string) - The [ISO language-country](https://docs.oracle.com/cd/E13214_01/wli/docs92/xref/xqisocodes.html) tag that specifies the language of the value. Currently supported tags: `en-US` * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListFieldValueResponse -*/ + */ func (c *DefaultApiService) ListFieldValue(AssistantSid string, FieldTypeSid string, params *ListFieldValueParams) (*ListFieldValueResponse, error) { - path := "/v1/Assistants/{AssistantSid}/FieldTypes/{FieldTypeSid}/FieldValues" + path := "/v1/Assistants/{AssistantSid}/FieldTypes/{FieldTypeSid}/FieldValues" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) path = strings.Replace(path, "{"+"FieldTypeSid"+"}", FieldTypeSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Language != nil { - data.Set("Language", *params.Language) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.Language != nil { + data.Set("Language", *params.Language) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListFieldValueResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListFieldValueResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListModelBuildParams Optional parameters for the method 'ListModelBuild' type ListModelBuildParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1340,40 +1295,40 @@ type ListModelBuildParams struct { * @param optional nil or *ListModelBuildParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListModelBuildResponse -*/ + */ func (c *DefaultApiService) ListModelBuild(AssistantSid string, params *ListModelBuildParams) (*ListModelBuildResponse, error) { - path := "/v1/Assistants/{AssistantSid}/ModelBuilds" + path := "/v1/Assistants/{AssistantSid}/ModelBuilds" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListModelBuildResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListModelBuildResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListQueryParams Optional parameters for the method 'ListQuery' type ListQueryParams struct { - Language *string `json:"Language,omitempty"` - ModelBuild *string `json:"ModelBuild,omitempty"` - Status *string `json:"Status,omitempty"` + Language *string `json:"Language,omitempty"` + ModelBuild *string `json:"ModelBuild,omitempty"` + Status *string `json:"Status,omitempty"` DialogueSid *string `json:"DialogueSid,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -1386,49 +1341,49 @@ type ListQueryParams struct { * @param "DialogueSid" (string) - The SID of the [Dialogue](https://www.twilio.com/docs/autopilot/api/dialogue). * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListQueryResponse -*/ + */ func (c *DefaultApiService) ListQuery(AssistantSid string, params *ListQueryParams) (*ListQueryResponse, error) { - path := "/v1/Assistants/{AssistantSid}/Queries" + path := "/v1/Assistants/{AssistantSid}/Queries" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Language != nil { - data.Set("Language", *params.Language) -} - if params != nil && params.ModelBuild != nil { - data.Set("ModelBuild", *params.ModelBuild) -} - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) -} - if params != nil && params.DialogueSid != nil { - data.Set("DialogueSid", *params.DialogueSid) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.Language != nil { + data.Set("Language", *params.Language) + } + if params != nil && params.ModelBuild != nil { + data.Set("ModelBuild", *params.ModelBuild) + } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + if params != nil && params.DialogueSid != nil { + data.Set("DialogueSid", *params.DialogueSid) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListQueryResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListQueryResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListSampleParams Optional parameters for the method 'ListSample' type ListSampleParams struct { Language *string `json:"Language,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -1439,37 +1394,37 @@ type ListSampleParams struct { * @param "Language" (string) - The [ISO language-country](https://docs.oracle.com/cd/E13214_01/wli/docs92/xref/xqisocodes.html) string that specifies the language used for the sample. For example: `en-US`. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListSampleResponse -*/ + */ func (c *DefaultApiService) ListSample(AssistantSid string, TaskSid string, params *ListSampleParams) (*ListSampleResponse, error) { - path := "/v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Samples" + path := "/v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Samples" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) path = strings.Replace(path, "{"+"TaskSid"+"}", TaskSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Language != nil { - data.Set("Language", *params.Language) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.Language != nil { + data.Set("Language", *params.Language) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListSampleResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListSampleResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListTaskParams Optional parameters for the method 'ListTask' type ListTaskParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1481,33 +1436,33 @@ type ListTaskParams struct { * @param optional nil or *ListTaskParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListTaskResponse -*/ + */ func (c *DefaultApiService) ListTask(AssistantSid string, params *ListTaskParams) (*ListTaskResponse, error) { - path := "/v1/Assistants/{AssistantSid}/Tasks" + path := "/v1/Assistants/{AssistantSid}/Tasks" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListTaskResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListTaskResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListWebhookParams Optional parameters for the method 'ListWebhook' type ListWebhookParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1519,43 +1474,43 @@ type ListWebhookParams struct { * @param optional nil or *ListWebhookParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListWebhookResponse -*/ + */ func (c *DefaultApiService) ListWebhook(AssistantSid string, params *ListWebhookParams) (*ListWebhookResponse, error) { - path := "/v1/Assistants/{AssistantSid}/Webhooks" + path := "/v1/Assistants/{AssistantSid}/Webhooks" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListWebhookResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListWebhookResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateAssistantParams Optional parameters for the method 'UpdateAssistant' type UpdateAssistantParams struct { - CallbackEvents *string `json:"CallbackEvents,omitempty"` - CallbackUrl *string `json:"CallbackUrl,omitempty"` - Defaults *map[string]interface{} `json:"Defaults,omitempty"` - DevelopmentStage *string `json:"DevelopmentStage,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - LogQueries *bool `json:"LogQueries,omitempty"` - StyleSheet *map[string]interface{} `json:"StyleSheet,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + CallbackEvents *string `json:"CallbackEvents,omitempty"` + CallbackUrl *string `json:"CallbackUrl,omitempty"` + Defaults *map[string]interface{} `json:"Defaults,omitempty"` + DevelopmentStage *string `json:"DevelopmentStage,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + LogQueries *bool `json:"LogQueries,omitempty"` + StyleSheet *map[string]interface{} `json:"StyleSheet,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` } /* @@ -1571,66 +1526,66 @@ type UpdateAssistantParams struct { * @param "StyleSheet" (map[string]interface{}) - The JSON string that defines the Assistant's [style sheet](https://www.twilio.com/docs/autopilot/api/assistant/stylesheet) * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. It can be used as an alternative to the `sid` in the URL path to address the resource. The first 64 characters must be unique. * @return AutopilotV1Assistant -*/ + */ func (c *DefaultApiService) UpdateAssistant(Sid string, params *UpdateAssistantParams) (*AutopilotV1Assistant, error) { - path := "/v1/Assistants/{Sid}" + path := "/v1/Assistants/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.CallbackEvents != nil { - data.Set("CallbackEvents", *params.CallbackEvents) -} - if params != nil && params.CallbackUrl != nil { - data.Set("CallbackUrl", *params.CallbackUrl) -} - if params != nil && params.Defaults != nil { - v, err := json.Marshal(params.Defaults) - - if err != nil { - return nil, err + if params != nil && params.CallbackEvents != nil { + data.Set("CallbackEvents", *params.CallbackEvents) } + if params != nil && params.CallbackUrl != nil { + data.Set("CallbackUrl", *params.CallbackUrl) + } + if params != nil && params.Defaults != nil { + v, err := json.Marshal(params.Defaults) - data.Set("Defaults", fmt.Sprint(v)) -} - if params != nil && params.DevelopmentStage != nil { - data.Set("DevelopmentStage", *params.DevelopmentStage) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.LogQueries != nil { - data.Set("LogQueries", fmt.Sprint(*params.LogQueries)) -} - if params != nil && params.StyleSheet != nil { - v, err := json.Marshal(params.StyleSheet) + if err != nil { + return nil, err + } - if err != nil { - return nil, err + data.Set("Defaults", fmt.Sprint(v)) + } + if params != nil && params.DevelopmentStage != nil { + data.Set("DevelopmentStage", *params.DevelopmentStage) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) } + if params != nil && params.LogQueries != nil { + data.Set("LogQueries", fmt.Sprint(*params.LogQueries)) + } + if params != nil && params.StyleSheet != nil { + v, err := json.Marshal(params.StyleSheet) - data.Set("StyleSheet", fmt.Sprint(v)) -} - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) -} + if err != nil { + return nil, err + } + data.Set("StyleSheet", fmt.Sprint(v)) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &AutopilotV1Assistant{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &AutopilotV1Assistant{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateDefaultsParams Optional parameters for the method 'UpdateDefaults' type UpdateDefaultsParams struct { Defaults *map[string]interface{} `json:"Defaults,omitempty"` @@ -1642,43 +1597,43 @@ type UpdateDefaultsParams struct { * @param optional nil or *UpdateDefaultsParams - Optional Parameters: * @param "Defaults" (map[string]interface{}) - A JSON string that describes the default task links for the `assistant_initiation`, `collect`, and `fallback` situations. * @return AutopilotV1AssistantDefaults -*/ + */ func (c *DefaultApiService) UpdateDefaults(AssistantSid string, params *UpdateDefaultsParams) (*AutopilotV1AssistantDefaults, error) { - path := "/v1/Assistants/{AssistantSid}/Defaults" + path := "/v1/Assistants/{AssistantSid}/Defaults" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Defaults != nil { - v, err := json.Marshal(params.Defaults) + data := url.Values{} + headers := 0 - if err != nil { - return nil, err - } + if params != nil && params.Defaults != nil { + v, err := json.Marshal(params.Defaults) - data.Set("Defaults", fmt.Sprint(v)) -} + if err != nil { + return nil, err + } + data.Set("Defaults", fmt.Sprint(v)) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &AutopilotV1AssistantDefaults{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &AutopilotV1AssistantDefaults{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateFieldTypeParams Optional parameters for the method 'UpdateFieldType' type UpdateFieldTypeParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` } /* @@ -1689,37 +1644,37 @@ type UpdateFieldTypeParams struct { * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. It can be used as an alternative to the `sid` in the URL path to address the resource. The first 64 characters must be unique. * @return AutopilotV1AssistantFieldType -*/ + */ func (c *DefaultApiService) UpdateFieldType(AssistantSid string, Sid string, params *UpdateFieldTypeParams) (*AutopilotV1AssistantFieldType, error) { - path := "/v1/Assistants/{AssistantSid}/FieldTypes/{Sid}" + path := "/v1/Assistants/{AssistantSid}/FieldTypes/{Sid}" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) -} + data := url.Values{} + headers := 0 + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &AutopilotV1AssistantFieldType{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &AutopilotV1AssistantFieldType{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateModelBuildParams Optional parameters for the method 'UpdateModelBuild' type UpdateModelBuildParams struct { UniqueName *string `json:"UniqueName,omitempty"` @@ -1732,38 +1687,38 @@ type UpdateModelBuildParams struct { * @param optional nil or *UpdateModelBuildParams - Optional Parameters: * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. This value must be a unique string of no more than 64 characters. It can be used as an alternative to the `sid` in the URL path to address the resource. * @return AutopilotV1AssistantModelBuild -*/ + */ func (c *DefaultApiService) UpdateModelBuild(AssistantSid string, Sid string, params *UpdateModelBuildParams) (*AutopilotV1AssistantModelBuild, error) { - path := "/v1/Assistants/{AssistantSid}/ModelBuilds/{Sid}" + path := "/v1/Assistants/{AssistantSid}/ModelBuilds/{Sid}" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) -} + data := url.Values{} + headers := 0 + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &AutopilotV1AssistantModelBuild{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &AutopilotV1AssistantModelBuild{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateQueryParams Optional parameters for the method 'UpdateQuery' type UpdateQueryParams struct { SampleSid *string `json:"SampleSid,omitempty"` - Status *string `json:"Status,omitempty"` + Status *string `json:"Status,omitempty"` } /* @@ -1774,37 +1729,37 @@ type UpdateQueryParams struct { * @param "SampleSid" (string) - The SID of an optional reference to the [Sample](https://www.twilio.com/docs/autopilot/api/task-sample) created from the query. * @param "Status" (string) - The new status of the resource. Can be: `pending-review`, `reviewed`, or `discarded` * @return AutopilotV1AssistantQuery -*/ + */ func (c *DefaultApiService) UpdateQuery(AssistantSid string, Sid string, params *UpdateQueryParams) (*AutopilotV1AssistantQuery, error) { - path := "/v1/Assistants/{AssistantSid}/Queries/{Sid}" + path := "/v1/Assistants/{AssistantSid}/Queries/{Sid}" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.SampleSid != nil { - data.Set("SampleSid", *params.SampleSid) -} - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) -} + data := url.Values{} + headers := 0 + if params != nil && params.SampleSid != nil { + data.Set("SampleSid", *params.SampleSid) + } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &AutopilotV1AssistantQuery{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &AutopilotV1AssistantQuery{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateRestoreAssistantParams Optional parameters for the method 'UpdateRestoreAssistant' type UpdateRestoreAssistantParams struct { Assistant *string `json:"Assistant,omitempty"` @@ -1815,37 +1770,37 @@ type UpdateRestoreAssistantParams struct { * @param optional nil or *UpdateRestoreAssistantParams - Optional Parameters: * @param "Assistant" (string) - The Twilio-provided string that uniquely identifies the Assistant resource to restore. * @return AutopilotV1RestoreAssistant -*/ + */ func (c *DefaultApiService) UpdateRestoreAssistant(params *UpdateRestoreAssistantParams) (*AutopilotV1RestoreAssistant, error) { - path := "/v1/Assistants/Restore" + path := "/v1/Assistants/Restore" - data := url.Values{} - headers := 0 - - if params != nil && params.Assistant != nil { - data.Set("Assistant", *params.Assistant) -} + data := url.Values{} + headers := 0 + if params != nil && params.Assistant != nil { + data.Set("Assistant", *params.Assistant) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &AutopilotV1RestoreAssistant{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &AutopilotV1RestoreAssistant{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateSampleParams Optional parameters for the method 'UpdateSample' type UpdateSampleParams struct { - Language *string `json:"Language,omitempty"` + Language *string `json:"Language,omitempty"` SourceChannel *string `json:"SourceChannel,omitempty"` - TaggedText *string `json:"TaggedText,omitempty"` + TaggedText *string `json:"TaggedText,omitempty"` } /* @@ -1858,41 +1813,41 @@ type UpdateSampleParams struct { * @param "SourceChannel" (string) - The communication channel from which the sample was captured. Can be: `voice`, `sms`, `chat`, `alexa`, `google-assistant`, `slack`, or null if not included. * @param "TaggedText" (string) - The text example of how end users might express the task. The sample can contain [Field tag blocks](https://www.twilio.com/docs/autopilot/api/task-sample#field-tagging). * @return AutopilotV1AssistantTaskSample -*/ + */ func (c *DefaultApiService) UpdateSample(AssistantSid string, TaskSid string, Sid string, params *UpdateSampleParams) (*AutopilotV1AssistantTaskSample, error) { - path := "/v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Samples/{Sid}" + path := "/v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Samples/{Sid}" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) path = strings.Replace(path, "{"+"TaskSid"+"}", TaskSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Language != nil { - data.Set("Language", *params.Language) -} - if params != nil && params.SourceChannel != nil { - data.Set("SourceChannel", *params.SourceChannel) -} - if params != nil && params.TaggedText != nil { - data.Set("TaggedText", *params.TaggedText) -} + data := url.Values{} + headers := 0 + if params != nil && params.Language != nil { + data.Set("Language", *params.Language) + } + if params != nil && params.SourceChannel != nil { + data.Set("SourceChannel", *params.SourceChannel) + } + if params != nil && params.TaggedText != nil { + data.Set("TaggedText", *params.TaggedText) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &AutopilotV1AssistantTaskSample{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &AutopilotV1AssistantTaskSample{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateStyleSheetParams Optional parameters for the method 'UpdateStyleSheet' type UpdateStyleSheetParams struct { StyleSheet *map[string]interface{} `json:"StyleSheet,omitempty"` @@ -1905,45 +1860,45 @@ type UpdateStyleSheetParams struct { * @param optional nil or *UpdateStyleSheetParams - Optional Parameters: * @param "StyleSheet" (map[string]interface{}) - The JSON string that describes the style sheet object. * @return AutopilotV1AssistantStyleSheet -*/ + */ func (c *DefaultApiService) UpdateStyleSheet(AssistantSid string, params *UpdateStyleSheetParams) (*AutopilotV1AssistantStyleSheet, error) { - path := "/v1/Assistants/{AssistantSid}/StyleSheet" + path := "/v1/Assistants/{AssistantSid}/StyleSheet" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.StyleSheet != nil { - v, err := json.Marshal(params.StyleSheet) + data := url.Values{} + headers := 0 - if err != nil { - return nil, err - } + if params != nil && params.StyleSheet != nil { + v, err := json.Marshal(params.StyleSheet) - data.Set("StyleSheet", fmt.Sprint(v)) -} + if err != nil { + return nil, err + } + data.Set("StyleSheet", fmt.Sprint(v)) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &AutopilotV1AssistantStyleSheet{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &AutopilotV1AssistantStyleSheet{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateTaskParams Optional parameters for the method 'UpdateTask' type UpdateTaskParams struct { - Actions *map[string]interface{} `json:"Actions,omitempty"` - ActionsUrl *string `json:"ActionsUrl,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + Actions *map[string]interface{} `json:"Actions,omitempty"` + ActionsUrl *string `json:"ActionsUrl,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` } /* @@ -1956,49 +1911,49 @@ type UpdateTaskParams struct { * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. This value must be 64 characters or less in length and be unique. It can be used as an alternative to the `sid` in the URL path to address the resource. * @return AutopilotV1AssistantTask -*/ + */ func (c *DefaultApiService) UpdateTask(AssistantSid string, Sid string, params *UpdateTaskParams) (*AutopilotV1AssistantTask, error) { - path := "/v1/Assistants/{AssistantSid}/Tasks/{Sid}" + path := "/v1/Assistants/{AssistantSid}/Tasks/{Sid}" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Actions != nil { - v, err := json.Marshal(params.Actions) + if params != nil && params.Actions != nil { + v, err := json.Marshal(params.Actions) - if err != nil { - return nil, err - } - - data.Set("Actions", fmt.Sprint(v)) -} - if params != nil && params.ActionsUrl != nil { - data.Set("ActionsUrl", *params.ActionsUrl) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) -} + if err != nil { + return nil, err + } + data.Set("Actions", fmt.Sprint(v)) + } + if params != nil && params.ActionsUrl != nil { + data.Set("ActionsUrl", *params.ActionsUrl) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &AutopilotV1AssistantTask{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &AutopilotV1AssistantTask{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateTaskActionsParams Optional parameters for the method 'UpdateTaskActions' type UpdateTaskActionsParams struct { Actions *map[string]interface{} `json:"Actions,omitempty"` @@ -2012,46 +1967,46 @@ type UpdateTaskActionsParams struct { * @param optional nil or *UpdateTaskActionsParams - Optional Parameters: * @param "Actions" (map[string]interface{}) - The JSON string that specifies the [actions](https://www.twilio.com/docs/autopilot/actions) that instruct the Assistant on how to perform the task. * @return AutopilotV1AssistantTaskTaskActions -*/ + */ func (c *DefaultApiService) UpdateTaskActions(AssistantSid string, TaskSid string, params *UpdateTaskActionsParams) (*AutopilotV1AssistantTaskTaskActions, error) { - path := "/v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Actions" + path := "/v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Actions" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) path = strings.Replace(path, "{"+"TaskSid"+"}", TaskSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Actions != nil { - v, err := json.Marshal(params.Actions) + data := url.Values{} + headers := 0 - if err != nil { - return nil, err - } + if params != nil && params.Actions != nil { + v, err := json.Marshal(params.Actions) - data.Set("Actions", fmt.Sprint(v)) -} + if err != nil { + return nil, err + } + data.Set("Actions", fmt.Sprint(v)) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &AutopilotV1AssistantTaskTaskActions{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &AutopilotV1AssistantTaskTaskActions{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateWebhookParams Optional parameters for the method 'UpdateWebhook' type UpdateWebhookParams struct { - Events *string `json:"Events,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + Events *string `json:"Events,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` WebhookMethod *string `json:"WebhookMethod,omitempty"` - WebhookUrl *string `json:"WebhookUrl,omitempty"` + WebhookUrl *string `json:"WebhookUrl,omitempty"` } /* @@ -2064,40 +2019,39 @@ type UpdateWebhookParams struct { * @param "WebhookMethod" (string) - The method to be used when calling the webhook's URL. * @param "WebhookUrl" (string) - The URL associated with this Webhook. * @return AutopilotV1AssistantWebhook -*/ + */ func (c *DefaultApiService) UpdateWebhook(AssistantSid string, Sid string, params *UpdateWebhookParams) (*AutopilotV1AssistantWebhook, error) { - path := "/v1/Assistants/{AssistantSid}/Webhooks/{Sid}" + path := "/v1/Assistants/{AssistantSid}/Webhooks/{Sid}" path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Events != nil { - data.Set("Events", *params.Events) -} - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) -} - if params != nil && params.WebhookMethod != nil { - data.Set("WebhookMethod", *params.WebhookMethod) -} - if params != nil && params.WebhookUrl != nil { - data.Set("WebhookUrl", *params.WebhookUrl) -} + data := url.Values{} + headers := 0 + if params != nil && params.Events != nil { + data.Set("Events", *params.Events) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } + if params != nil && params.WebhookMethod != nil { + data.Set("WebhookMethod", *params.WebhookMethod) + } + if params != nil && params.WebhookUrl != nil { + data.Set("WebhookUrl", *params.WebhookUrl) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &AutopilotV1AssistantWebhook{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &AutopilotV1AssistantWebhook{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } diff --git a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant.go b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant.go index e6d7b5641..bd1991c60 100644 --- a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant.go +++ b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant.go @@ -1,18 +1,20 @@ /* - * Twilio - Autopilot - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // AutopilotV1Assistant struct for AutopilotV1Assistant type AutopilotV1Assistant struct { // The SID of the Account that created the resource diff --git a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_defaults.go b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_defaults.go index 91f52173f..2bed3d78e 100644 --- a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_defaults.go +++ b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_defaults.go @@ -1,15 +1,16 @@ /* - * Twilio - Autopilot - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // AutopilotV1AssistantDefaults struct for AutopilotV1AssistantDefaults type AutopilotV1AssistantDefaults struct { // The SID of the Account that created the resource diff --git a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_dialogue.go b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_dialogue.go index 3c20b98ec..66326d80c 100644 --- a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_dialogue.go +++ b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_dialogue.go @@ -1,15 +1,16 @@ /* - * Twilio - Autopilot - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // AutopilotV1AssistantDialogue struct for AutopilotV1AssistantDialogue type AutopilotV1AssistantDialogue struct { // The SID of the Account that created the resource diff --git a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_field_type.go b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_field_type.go index bdefe1377..9b266c7ad 100644 --- a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_field_type.go +++ b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_field_type.go @@ -1,18 +1,20 @@ /* - * Twilio - Autopilot - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // AutopilotV1AssistantFieldType struct for AutopilotV1AssistantFieldType type AutopilotV1AssistantFieldType struct { // The SID of the Account that created the resource diff --git a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_field_type_field_value.go b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_field_type_field_value.go index 0dc700d4f..d15c4aac4 100644 --- a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_field_type_field_value.go +++ b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_field_type_field_value.go @@ -1,18 +1,20 @@ /* - * Twilio - Autopilot - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // AutopilotV1AssistantFieldTypeFieldValue struct for AutopilotV1AssistantFieldTypeFieldValue type AutopilotV1AssistantFieldTypeFieldValue struct { // The SID of the Account that created the resource diff --git a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_model_build.go b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_model_build.go index e48f73df0..d8b9deb62 100644 --- a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_model_build.go +++ b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_model_build.go @@ -1,18 +1,20 @@ /* - * Twilio - Autopilot - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // AutopilotV1AssistantModelBuild struct for AutopilotV1AssistantModelBuild type AutopilotV1AssistantModelBuild struct { // The SID of the Account that created the resource diff --git a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_query.go b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_query.go index 01e78c3d7..762bc6c3b 100644 --- a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_query.go +++ b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_query.go @@ -1,18 +1,20 @@ /* - * Twilio - Autopilot - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // AutopilotV1AssistantQuery struct for AutopilotV1AssistantQuery type AutopilotV1AssistantQuery struct { // The SID of the Account that created the resource diff --git a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_style_sheet.go b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_style_sheet.go index e5f6da6c0..dde6186c5 100644 --- a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_style_sheet.go +++ b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_style_sheet.go @@ -1,15 +1,16 @@ /* - * Twilio - Autopilot - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // AutopilotV1AssistantStyleSheet struct for AutopilotV1AssistantStyleSheet type AutopilotV1AssistantStyleSheet struct { // The SID of the Account that created the resource diff --git a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_task.go b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_task.go index 325606d28..5678aa6c8 100644 --- a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_task.go +++ b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_task.go @@ -1,18 +1,20 @@ /* - * Twilio - Autopilot - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // AutopilotV1AssistantTask struct for AutopilotV1AssistantTask type AutopilotV1AssistantTask struct { // The SID of the Account that created the resource diff --git a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_task_field.go b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_task_field.go index 577130101..98283431a 100644 --- a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_task_field.go +++ b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_task_field.go @@ -1,18 +1,20 @@ /* - * Twilio - Autopilot - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // AutopilotV1AssistantTaskField struct for AutopilotV1AssistantTaskField type AutopilotV1AssistantTaskField struct { // The SID of the Account that created the resource diff --git a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_task_sample.go b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_task_sample.go index de1bb4b65..2a4270efd 100644 --- a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_task_sample.go +++ b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_task_sample.go @@ -1,18 +1,20 @@ /* - * Twilio - Autopilot - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // AutopilotV1AssistantTaskSample struct for AutopilotV1AssistantTaskSample type AutopilotV1AssistantTaskSample struct { // The SID of the Account that created the resource diff --git a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_task_task_actions.go b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_task_task_actions.go index a564f14f8..974dfae00 100644 --- a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_task_task_actions.go +++ b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_task_task_actions.go @@ -1,15 +1,16 @@ /* - * Twilio - Autopilot - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // AutopilotV1AssistantTaskTaskActions struct for AutopilotV1AssistantTaskTaskActions type AutopilotV1AssistantTaskTaskActions struct { // The SID of the Account that created the resource diff --git a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_task_task_statistics.go b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_task_task_statistics.go index cba75bccc..2ff031051 100644 --- a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_task_task_statistics.go +++ b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_task_task_statistics.go @@ -1,15 +1,16 @@ /* - * Twilio - Autopilot - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // AutopilotV1AssistantTaskTaskStatistics struct for AutopilotV1AssistantTaskTaskStatistics type AutopilotV1AssistantTaskTaskStatistics struct { // The SID of the Account that created the resource diff --git a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_webhook.go b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_webhook.go index 56a59dc72..d0ba020da 100644 --- a/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_webhook.go +++ b/twilio/rest/autopilot/v1/model_autopilot_v1_assistant_webhook.go @@ -1,18 +1,20 @@ /* - * Twilio - Autopilot - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // AutopilotV1AssistantWebhook struct for AutopilotV1AssistantWebhook type AutopilotV1AssistantWebhook struct { // The SID of the Account that created the resource diff --git a/twilio/rest/autopilot/v1/model_autopilot_v1_restore_assistant.go b/twilio/rest/autopilot/v1/model_autopilot_v1_restore_assistant.go index a687d4099..4e78d760d 100644 --- a/twilio/rest/autopilot/v1/model_autopilot_v1_restore_assistant.go +++ b/twilio/rest/autopilot/v1/model_autopilot_v1_restore_assistant.go @@ -1,18 +1,20 @@ /* - * Twilio - Autopilot - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // AutopilotV1RestoreAssistant struct for AutopilotV1RestoreAssistant type AutopilotV1RestoreAssistant struct { // The SID of the Account that created the resource diff --git a/twilio/rest/autopilot/v1/model_list_assistant_response.go b/twilio/rest/autopilot/v1/model_list_assistant_response.go index 567002f0b..2000c16d3 100644 --- a/twilio/rest/autopilot/v1/model_list_assistant_response.go +++ b/twilio/rest/autopilot/v1/model_list_assistant_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Autopilot - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListAssistantResponse struct for ListAssistantResponse type ListAssistantResponse struct { - Assistants []AutopilotV1Assistant `json:"Assistants,omitempty"` - Meta ListAssistantResponseMeta `json:"Meta,omitempty"` + Assistants []AutopilotV1Assistant `json:"Assistants,omitempty"` + Meta ListAssistantResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/autopilot/v1/model_list_assistant_response_meta.go b/twilio/rest/autopilot/v1/model_list_assistant_response_meta.go index 5d1f9f373..2f08c5aa0 100644 --- a/twilio/rest/autopilot/v1/model_list_assistant_response_meta.go +++ b/twilio/rest/autopilot/v1/model_list_assistant_response_meta.go @@ -1,22 +1,23 @@ /* - * Twilio - Autopilot - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListAssistantResponseMeta struct for ListAssistantResponseMeta type ListAssistantResponseMeta struct { - FirstPageUrl string `json:"FirstPageUrl,omitempty"` - Key string `json:"Key,omitempty"` - NextPageUrl string `json:"NextPageUrl,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` - Url string `json:"Url,omitempty"` + Url string `json:"Url,omitempty"` } diff --git a/twilio/rest/autopilot/v1/model_list_field_response.go b/twilio/rest/autopilot/v1/model_list_field_response.go index ae489455e..ac78b5cdc 100644 --- a/twilio/rest/autopilot/v1/model_list_field_response.go +++ b/twilio/rest/autopilot/v1/model_list_field_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Autopilot - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListFieldResponse struct for ListFieldResponse type ListFieldResponse struct { Fields []AutopilotV1AssistantTaskField `json:"Fields,omitempty"` - Meta ListAssistantResponseMeta `json:"Meta,omitempty"` + Meta ListAssistantResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/autopilot/v1/model_list_field_type_response.go b/twilio/rest/autopilot/v1/model_list_field_type_response.go index 488d50edc..5ab58e521 100644 --- a/twilio/rest/autopilot/v1/model_list_field_type_response.go +++ b/twilio/rest/autopilot/v1/model_list_field_type_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Autopilot - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListFieldTypeResponse struct for ListFieldTypeResponse type ListFieldTypeResponse struct { FieldTypes []AutopilotV1AssistantFieldType `json:"FieldTypes,omitempty"` - Meta ListAssistantResponseMeta `json:"Meta,omitempty"` + Meta ListAssistantResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/autopilot/v1/model_list_field_value_response.go b/twilio/rest/autopilot/v1/model_list_field_value_response.go index 9a84c4a0f..7d3f49b15 100644 --- a/twilio/rest/autopilot/v1/model_list_field_value_response.go +++ b/twilio/rest/autopilot/v1/model_list_field_value_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Autopilot - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListFieldValueResponse struct for ListFieldValueResponse type ListFieldValueResponse struct { FieldValues []AutopilotV1AssistantFieldTypeFieldValue `json:"FieldValues,omitempty"` - Meta ListAssistantResponseMeta `json:"Meta,omitempty"` + Meta ListAssistantResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/autopilot/v1/model_list_model_build_response.go b/twilio/rest/autopilot/v1/model_list_model_build_response.go index 61188528a..db27cbf2e 100644 --- a/twilio/rest/autopilot/v1/model_list_model_build_response.go +++ b/twilio/rest/autopilot/v1/model_list_model_build_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Autopilot - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListModelBuildResponse struct for ListModelBuildResponse type ListModelBuildResponse struct { - Meta ListAssistantResponseMeta `json:"Meta,omitempty"` + Meta ListAssistantResponseMeta `json:"Meta,omitempty"` ModelBuilds []AutopilotV1AssistantModelBuild `json:"ModelBuilds,omitempty"` } diff --git a/twilio/rest/autopilot/v1/model_list_query_response.go b/twilio/rest/autopilot/v1/model_list_query_response.go index c49bc2a57..e65f649a8 100644 --- a/twilio/rest/autopilot/v1/model_list_query_response.go +++ b/twilio/rest/autopilot/v1/model_list_query_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Autopilot - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListQueryResponse struct for ListQueryResponse type ListQueryResponse struct { - Meta ListAssistantResponseMeta `json:"Meta,omitempty"` + Meta ListAssistantResponseMeta `json:"Meta,omitempty"` Queries []AutopilotV1AssistantQuery `json:"Queries,omitempty"` } diff --git a/twilio/rest/autopilot/v1/model_list_sample_response.go b/twilio/rest/autopilot/v1/model_list_sample_response.go index eb08be880..44a6e4d63 100644 --- a/twilio/rest/autopilot/v1/model_list_sample_response.go +++ b/twilio/rest/autopilot/v1/model_list_sample_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Autopilot - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListSampleResponse struct for ListSampleResponse type ListSampleResponse struct { - Meta ListAssistantResponseMeta `json:"Meta,omitempty"` + Meta ListAssistantResponseMeta `json:"Meta,omitempty"` Samples []AutopilotV1AssistantTaskSample `json:"Samples,omitempty"` } diff --git a/twilio/rest/autopilot/v1/model_list_task_response.go b/twilio/rest/autopilot/v1/model_list_task_response.go index d7b1a717a..5f2bd1f7e 100644 --- a/twilio/rest/autopilot/v1/model_list_task_response.go +++ b/twilio/rest/autopilot/v1/model_list_task_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Autopilot - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListTaskResponse struct for ListTaskResponse type ListTaskResponse struct { - Meta ListAssistantResponseMeta `json:"Meta,omitempty"` + Meta ListAssistantResponseMeta `json:"Meta,omitempty"` Tasks []AutopilotV1AssistantTask `json:"Tasks,omitempty"` } diff --git a/twilio/rest/autopilot/v1/model_list_webhook_response.go b/twilio/rest/autopilot/v1/model_list_webhook_response.go index e21a4279d..25a2e4ed2 100644 --- a/twilio/rest/autopilot/v1/model_list_webhook_response.go +++ b/twilio/rest/autopilot/v1/model_list_webhook_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Autopilot - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListWebhookResponse struct for ListWebhookResponse type ListWebhookResponse struct { - Meta ListAssistantResponseMeta `json:"Meta,omitempty"` + Meta ListAssistantResponseMeta `json:"Meta,omitempty"` Webhooks []AutopilotV1AssistantWebhook `json:"Webhooks,omitempty"` } diff --git a/twilio/rest/bulkexports/v1/api_default.go b/twilio/rest/bulkexports/v1/api_default.go index 7be17261c..fef7989da 100644 --- a/twilio/rest/bulkexports/v1/api_default.go +++ b/twilio/rest/bulkexports/v1/api_default.go @@ -1,11 +1,11 @@ /* - * Twilio - Bulkexports - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Bulkexports + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,9 +14,10 @@ package openapi import ( "encoding/json" "fmt" - twilio "github.com/twilio/twilio-go/client" "net/url" - "strings" + "strings" + + twilio "github.com/twilio/twilio-go/client" ) type DefaultApiService struct { @@ -25,20 +26,20 @@ type DefaultApiService struct { } func NewDefaultApiService(client *twilio.Client) *DefaultApiService { - return &DefaultApiService { - client: client, + return &DefaultApiService{ + client: client, baseURL: "https://bulkexports.twilio.com", } } // CreateExportCustomJobParams Optional parameters for the method 'CreateExportCustomJob' type CreateExportCustomJobParams struct { - Email *string `json:"Email,omitempty"` - EndDay *string `json:"EndDay,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - StartDay *string `json:"StartDay,omitempty"` + Email *string `json:"Email,omitempty"` + EndDay *string `json:"EndDay,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + StartDay *string `json:"StartDay,omitempty"` WebhookMethod *string `json:"WebhookMethod,omitempty"` - WebhookUrl *string `json:"WebhookUrl,omitempty"` + WebhookUrl *string `json:"WebhookUrl,omitempty"` } /* @@ -52,70 +53,67 @@ type CreateExportCustomJobParams struct { * @param "WebhookMethod" (string) - This is the method used to call the webhook on completion of the job. If this is supplied, `WebhookUrl` must also be supplied. * @param "WebhookUrl" (string) - The optional webhook url called on completion of the job. If this is supplied, `WebhookMethod` must also be supplied. If you set neither webhook nor email, you will have to check your job's status manually. * @return BulkexportsV1ExportExportCustomJob -*/ + */ func (c *DefaultApiService) CreateExportCustomJob(ResourceType string, params *CreateExportCustomJobParams) (*BulkexportsV1ExportExportCustomJob, error) { - path := "/v1/Exports/{ResourceType}/Jobs" + path := "/v1/Exports/{ResourceType}/Jobs" path = strings.Replace(path, "{"+"ResourceType"+"}", ResourceType, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Email != nil { - data.Set("Email", *params.Email) -} - if params != nil && params.EndDay != nil { - data.Set("EndDay", *params.EndDay) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.StartDay != nil { - data.Set("StartDay", *params.StartDay) -} - if params != nil && params.WebhookMethod != nil { - data.Set("WebhookMethod", *params.WebhookMethod) -} - if params != nil && params.WebhookUrl != nil { - data.Set("WebhookUrl", *params.WebhookUrl) -} + data := url.Values{} + headers := 0 + if params != nil && params.Email != nil { + data.Set("Email", *params.Email) + } + if params != nil && params.EndDay != nil { + data.Set("EndDay", *params.EndDay) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.StartDay != nil { + data.Set("StartDay", *params.StartDay) + } + if params != nil && params.WebhookMethod != nil { + data.Set("WebhookMethod", *params.WebhookMethod) + } + if params != nil && params.WebhookUrl != nil { + data.Set("WebhookUrl", *params.WebhookUrl) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &BulkexportsV1ExportExportCustomJob{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &BulkexportsV1ExportExportCustomJob{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * DeleteJob Method for DeleteJob * @param JobSid The unique string that that we created to identify the Bulk Export job -*/ -func (c *DefaultApiService) DeleteJob(JobSid string, ) (error) { - path := "/v1/Exports/Jobs/{JobSid}" + */ +func (c *DefaultApiService) DeleteJob(JobSid string) error { + path := "/v1/Exports/Jobs/{JobSid}" path = strings.Replace(path, "{"+"JobSid"+"}", JobSid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -123,25 +121,23 @@ func (c *DefaultApiService) DeleteJob(JobSid string, ) (error) { * Fetch a specific Day. * @param ResourceType The type of communication – Messages, Calls, Conferences, and Participants * @param Day The ISO 8601 format date of the resources in the file, for a UTC day -*/ -func (c *DefaultApiService) FetchDay(ResourceType string, Day string, ) (error) { - path := "/v1/Exports/{ResourceType}/Days/{Day}" + */ +func (c *DefaultApiService) FetchDay(ResourceType string, Day string) error { + path := "/v1/Exports/{ResourceType}/Days/{Day}" path = strings.Replace(path, "{"+"ResourceType"+"}", ResourceType, -1) path = strings.Replace(path, "{"+"Day"+"}", Day, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -149,29 +145,27 @@ func (c *DefaultApiService) FetchDay(ResourceType string, Day string, ) (error) * Fetch a specific Export. * @param ResourceType The type of communication – Messages, Calls, Conferences, and Participants * @return BulkexportsV1Export -*/ -func (c *DefaultApiService) FetchExport(ResourceType string, ) (*BulkexportsV1Export, error) { - path := "/v1/Exports/{ResourceType}" + */ +func (c *DefaultApiService) FetchExport(ResourceType string) (*BulkexportsV1Export, error) { + path := "/v1/Exports/{ResourceType}" path = strings.Replace(path, "{"+"ResourceType"+"}", ResourceType, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &BulkexportsV1Export{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &BulkexportsV1Export{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -179,59 +173,56 @@ func (c *DefaultApiService) FetchExport(ResourceType string, ) (*BulkexportsV1Ex * Fetch a specific Export Configuration. * @param ResourceType The type of communication – Messages, Calls, Conferences, and Participants * @return BulkexportsV1ExportConfiguration -*/ -func (c *DefaultApiService) FetchExportConfiguration(ResourceType string, ) (*BulkexportsV1ExportConfiguration, error) { - path := "/v1/Exports/{ResourceType}/Configuration" + */ +func (c *DefaultApiService) FetchExportConfiguration(ResourceType string) (*BulkexportsV1ExportConfiguration, error) { + path := "/v1/Exports/{ResourceType}/Configuration" path = strings.Replace(path, "{"+"ResourceType"+"}", ResourceType, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &BulkexportsV1ExportConfiguration{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &BulkexportsV1ExportConfiguration{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * FetchJob Method for FetchJob * @param JobSid The unique string that that we created to identify the Bulk Export job * @return BulkexportsV1ExportJob -*/ -func (c *DefaultApiService) FetchJob(JobSid string, ) (*BulkexportsV1ExportJob, error) { - path := "/v1/Exports/Jobs/{JobSid}" + */ +func (c *DefaultApiService) FetchJob(JobSid string) (*BulkexportsV1ExportJob, error) { + path := "/v1/Exports/Jobs/{JobSid}" path = strings.Replace(path, "{"+"JobSid"+"}", JobSid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &BulkexportsV1ExportJob{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &BulkexportsV1ExportJob{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListDayParams Optional parameters for the method 'ListDay' type ListDayParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -244,33 +235,33 @@ type ListDayParams struct { * @param optional nil or *ListDayParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListDayResponse -*/ + */ func (c *DefaultApiService) ListDay(ResourceType string, params *ListDayParams) (*ListDayResponse, error) { - path := "/v1/Exports/{ResourceType}/Days" + path := "/v1/Exports/{ResourceType}/Days" path = strings.Replace(path, "{"+"ResourceType"+"}", ResourceType, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListDayResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListDayResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListExportCustomJobParams Optional parameters for the method 'ListExportCustomJob' type ListExportCustomJobParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -282,38 +273,38 @@ type ListExportCustomJobParams struct { * @param optional nil or *ListExportCustomJobParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListExportCustomJobResponse -*/ + */ func (c *DefaultApiService) ListExportCustomJob(ResourceType string, params *ListExportCustomJobParams) (*ListExportCustomJobResponse, error) { - path := "/v1/Exports/{ResourceType}/Jobs" + path := "/v1/Exports/{ResourceType}/Jobs" path = strings.Replace(path, "{"+"ResourceType"+"}", ResourceType, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListExportCustomJobResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListExportCustomJobResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateExportConfigurationParams Optional parameters for the method 'UpdateExportConfiguration' type UpdateExportConfigurationParams struct { - Enabled *bool `json:"Enabled,omitempty"` + Enabled *bool `json:"Enabled,omitempty"` WebhookMethod *string `json:"WebhookMethod,omitempty"` - WebhookUrl *string `json:"WebhookUrl,omitempty"` + WebhookUrl *string `json:"WebhookUrl,omitempty"` } /* @@ -325,36 +316,35 @@ type UpdateExportConfigurationParams struct { * @param "WebhookMethod" (string) - Sets whether Twilio should call a webhook URL when the automatic generation is complete, using GET or POST. The actual destination is set in the webhook_url * @param "WebhookUrl" (string) - Stores the URL destination for the method specified in webhook_method. * @return BulkexportsV1ExportConfiguration -*/ + */ func (c *DefaultApiService) UpdateExportConfiguration(ResourceType string, params *UpdateExportConfigurationParams) (*BulkexportsV1ExportConfiguration, error) { - path := "/v1/Exports/{ResourceType}/Configuration" + path := "/v1/Exports/{ResourceType}/Configuration" path = strings.Replace(path, "{"+"ResourceType"+"}", ResourceType, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Enabled != nil { - data.Set("Enabled", fmt.Sprint(*params.Enabled)) -} - if params != nil && params.WebhookMethod != nil { - data.Set("WebhookMethod", *params.WebhookMethod) -} - if params != nil && params.WebhookUrl != nil { - data.Set("WebhookUrl", *params.WebhookUrl) -} + data := url.Values{} + headers := 0 + if params != nil && params.Enabled != nil { + data.Set("Enabled", fmt.Sprint(*params.Enabled)) + } + if params != nil && params.WebhookMethod != nil { + data.Set("WebhookMethod", *params.WebhookMethod) + } + if params != nil && params.WebhookUrl != nil { + data.Set("WebhookUrl", *params.WebhookUrl) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &BulkexportsV1ExportConfiguration{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &BulkexportsV1ExportConfiguration{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } diff --git a/twilio/rest/bulkexports/v1/model_bulkexports_v1_export.go b/twilio/rest/bulkexports/v1/model_bulkexports_v1_export.go index 88e352f11..daf2f7bd3 100644 --- a/twilio/rest/bulkexports/v1/model_bulkexports_v1_export.go +++ b/twilio/rest/bulkexports/v1/model_bulkexports_v1_export.go @@ -1,15 +1,16 @@ /* - * Twilio - Bulkexports - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Bulkexports + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // BulkexportsV1Export struct for BulkexportsV1Export type BulkexportsV1Export struct { // Nested resource URLs. diff --git a/twilio/rest/bulkexports/v1/model_bulkexports_v1_export_configuration.go b/twilio/rest/bulkexports/v1/model_bulkexports_v1_export_configuration.go index d1fd0b7a9..7999347d4 100644 --- a/twilio/rest/bulkexports/v1/model_bulkexports_v1_export_configuration.go +++ b/twilio/rest/bulkexports/v1/model_bulkexports_v1_export_configuration.go @@ -1,15 +1,16 @@ /* - * Twilio - Bulkexports - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Bulkexports + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // BulkexportsV1ExportConfiguration struct for BulkexportsV1ExportConfiguration type BulkexportsV1ExportConfiguration struct { // Whether files are automatically generated diff --git a/twilio/rest/bulkexports/v1/model_bulkexports_v1_export_day.go b/twilio/rest/bulkexports/v1/model_bulkexports_v1_export_day.go index 36967cdc4..4af7ad177 100644 --- a/twilio/rest/bulkexports/v1/model_bulkexports_v1_export_day.go +++ b/twilio/rest/bulkexports/v1/model_bulkexports_v1_export_day.go @@ -1,15 +1,16 @@ /* - * Twilio - Bulkexports - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Bulkexports + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // BulkexportsV1ExportDay struct for BulkexportsV1ExportDay type BulkexportsV1ExportDay struct { // The date when resource is created diff --git a/twilio/rest/bulkexports/v1/model_bulkexports_v1_export_day_instance.go b/twilio/rest/bulkexports/v1/model_bulkexports_v1_export_day_instance.go index f285303ee..76e60eac3 100644 --- a/twilio/rest/bulkexports/v1/model_bulkexports_v1_export_day_instance.go +++ b/twilio/rest/bulkexports/v1/model_bulkexports_v1_export_day_instance.go @@ -1,15 +1,16 @@ /* - * Twilio - Bulkexports - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Bulkexports + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // BulkexportsV1ExportDayInstance struct for BulkexportsV1ExportDayInstance type BulkexportsV1ExportDayInstance struct { RedirectTo *string `json:"RedirectTo,omitempty"` diff --git a/twilio/rest/bulkexports/v1/model_bulkexports_v1_export_export_custom_job.go b/twilio/rest/bulkexports/v1/model_bulkexports_v1_export_export_custom_job.go index cc6ffc656..9ab4f36d0 100644 --- a/twilio/rest/bulkexports/v1/model_bulkexports_v1_export_export_custom_job.go +++ b/twilio/rest/bulkexports/v1/model_bulkexports_v1_export_export_custom_job.go @@ -1,15 +1,16 @@ /* - * Twilio - Bulkexports - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Bulkexports + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // BulkexportsV1ExportExportCustomJob struct for BulkexportsV1ExportExportCustomJob type BulkexportsV1ExportExportCustomJob struct { // The details of a job state which is an object that contains a status string, a day count integer, and list of days in the job diff --git a/twilio/rest/bulkexports/v1/model_bulkexports_v1_export_job.go b/twilio/rest/bulkexports/v1/model_bulkexports_v1_export_job.go index cdd3671a3..e4d30be37 100644 --- a/twilio/rest/bulkexports/v1/model_bulkexports_v1_export_job.go +++ b/twilio/rest/bulkexports/v1/model_bulkexports_v1_export_job.go @@ -1,15 +1,16 @@ /* - * Twilio - Bulkexports - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Bulkexports + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // BulkexportsV1ExportJob struct for BulkexportsV1ExportJob type BulkexportsV1ExportJob struct { // This is a list of the completed, pending, or errored dates within the export time range, with one entry for each status with more than one day in that status @@ -26,7 +27,7 @@ type BulkexportsV1ExportJob struct { ResourceType *string `json:"ResourceType,omitempty"` // The start time for the export specified when creating the job StartDay *string `json:"StartDay,omitempty"` - Url *string `json:"Url,omitempty"` + Url *string `json:"Url,omitempty"` // This is the method used to call the webhook WebhookMethod *string `json:"WebhookMethod,omitempty"` // The optional webhook url called on completion diff --git a/twilio/rest/bulkexports/v1/model_list_day_response.go b/twilio/rest/bulkexports/v1/model_list_day_response.go index ac3f99578..a65a19bf8 100644 --- a/twilio/rest/bulkexports/v1/model_list_day_response.go +++ b/twilio/rest/bulkexports/v1/model_list_day_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Bulkexports - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Bulkexports + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListDayResponse struct for ListDayResponse type ListDayResponse struct { Days []BulkexportsV1ExportDay `json:"Days,omitempty"` - Meta ListDayResponseMeta `json:"Meta,omitempty"` + Meta ListDayResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/bulkexports/v1/model_list_day_response_meta.go b/twilio/rest/bulkexports/v1/model_list_day_response_meta.go index 78c2e28ec..3db2f5bb4 100644 --- a/twilio/rest/bulkexports/v1/model_list_day_response_meta.go +++ b/twilio/rest/bulkexports/v1/model_list_day_response_meta.go @@ -1,22 +1,23 @@ /* - * Twilio - Bulkexports - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Bulkexports + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListDayResponseMeta struct for ListDayResponseMeta type ListDayResponseMeta struct { - FirstPageUrl string `json:"FirstPageUrl,omitempty"` - Key string `json:"Key,omitempty"` - NextPageUrl string `json:"NextPageUrl,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` - Url string `json:"Url,omitempty"` + Url string `json:"Url,omitempty"` } diff --git a/twilio/rest/bulkexports/v1/model_list_export_custom_job_response.go b/twilio/rest/bulkexports/v1/model_list_export_custom_job_response.go index 86c2ede78..bd04f4f7f 100644 --- a/twilio/rest/bulkexports/v1/model_list_export_custom_job_response.go +++ b/twilio/rest/bulkexports/v1/model_list_export_custom_job_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Bulkexports - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Bulkexports + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListExportCustomJobResponse struct for ListExportCustomJobResponse type ListExportCustomJobResponse struct { Jobs []BulkexportsV1ExportExportCustomJob `json:"Jobs,omitempty"` - Meta ListDayResponseMeta `json:"Meta,omitempty"` + Meta ListDayResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/chat/v1/api_default.go b/twilio/rest/chat/v1/api_default.go index ec1cee4e5..c90789bc8 100644 --- a/twilio/rest/chat/v1/api_default.go +++ b/twilio/rest/chat/v1/api_default.go @@ -1,11 +1,11 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,10 +14,10 @@ package openapi import ( "encoding/json" "fmt" - twilio "github.com/twilio/twilio-go/client" "net/url" - "strings" - "reflect" + "strings" + + twilio "github.com/twilio/twilio-go/client" ) type DefaultApiService struct { @@ -26,18 +26,18 @@ type DefaultApiService struct { } func NewDefaultApiService(client *twilio.Client) *DefaultApiService { - return &DefaultApiService { - client: client, + return &DefaultApiService{ + client: client, baseURL: "https://chat.twilio.com", } } // CreateChannelParams Optional parameters for the method 'CreateChannel' type CreateChannelParams struct { - Attributes *string `json:"Attributes,omitempty"` + Attributes *string `json:"Attributes,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` - Type *string `json:"Type,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + Type *string `json:"Type,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` } /* @@ -49,51 +49,51 @@ type CreateChannelParams struct { * @param "Type" (string) - The visibility of the channel. Can be: `public` or `private` and defaults to `public`. * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. This value must be 64 characters or less in length and be unique within the Service. * @return ChatV1ServiceChannel -*/ + */ func (c *DefaultApiService) CreateChannel(ServiceSid string, params *CreateChannelParams) (*ChatV1ServiceChannel, error) { - path := "/v1/Services/{ServiceSid}/Channels" + path := "/v1/Services/{ServiceSid}/Channels" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.Type != nil { - data.Set("Type", *params.Type) -} - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) -} + data := url.Values{} + headers := 0 + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Type != nil { + data.Set("Type", *params.Type) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ChatV1ServiceChannel{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ChatV1ServiceChannel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateCredentialParams Optional parameters for the method 'CreateCredential' type CreateCredentialParams struct { - ApiKey *string `json:"ApiKey,omitempty"` - Certificate *string `json:"Certificate,omitempty"` + ApiKey *string `json:"ApiKey,omitempty"` + Certificate *string `json:"Certificate,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` - PrivateKey *string `json:"PrivateKey,omitempty"` - Sandbox *bool `json:"Sandbox,omitempty"` - Secret *string `json:"Secret,omitempty"` - Type *string `json:"Type,omitempty"` + PrivateKey *string `json:"PrivateKey,omitempty"` + Sandbox *bool `json:"Sandbox,omitempty"` + Secret *string `json:"Secret,omitempty"` + Type *string `json:"Type,omitempty"` } /* @@ -107,54 +107,54 @@ type CreateCredentialParams struct { * @param "Secret" (string) - [FCM only] The **Server key** of your project from the Firebase console, found under Settings / Cloud messaging. * @param "Type" (string) - The type of push-notification service the credential is for. Can be: `gcm`, `fcm`, or `apn`. * @return ChatV1Credential -*/ + */ func (c *DefaultApiService) CreateCredential(params *CreateCredentialParams) (*ChatV1Credential, error) { - path := "/v1/Credentials" + path := "/v1/Credentials" - data := url.Values{} - headers := 0 - - if params != nil && params.ApiKey != nil { - data.Set("ApiKey", *params.ApiKey) -} - if params != nil && params.Certificate != nil { - data.Set("Certificate", *params.Certificate) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.PrivateKey != nil { - data.Set("PrivateKey", *params.PrivateKey) -} - if params != nil && params.Sandbox != nil { - data.Set("Sandbox", fmt.Sprint(*params.Sandbox)) -} - if params != nil && params.Secret != nil { - data.Set("Secret", *params.Secret) -} - if params != nil && params.Type != nil { - data.Set("Type", *params.Type) -} + data := url.Values{} + headers := 0 + if params != nil && params.ApiKey != nil { + data.Set("ApiKey", *params.ApiKey) + } + if params != nil && params.Certificate != nil { + data.Set("Certificate", *params.Certificate) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.PrivateKey != nil { + data.Set("PrivateKey", *params.PrivateKey) + } + if params != nil && params.Sandbox != nil { + data.Set("Sandbox", fmt.Sprint(*params.Sandbox)) + } + if params != nil && params.Secret != nil { + data.Set("Secret", *params.Secret) + } + if params != nil && params.Type != nil { + data.Set("Type", *params.Type) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ChatV1Credential{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ChatV1Credential{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateInviteParams Optional parameters for the method 'CreateInvite' type CreateInviteParams struct { Identity *string `json:"Identity,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` } /* @@ -165,41 +165,41 @@ type CreateInviteParams struct { * @param "Identity" (string) - The `identity` value that uniquely identifies the new resource's [User](https://www.twilio.com/docs/api/chat/rest/v1/user) within the [Service](https://www.twilio.com/docs/api/chat/rest/v1/service). See [access tokens](https://www.twilio.com/docs/api/chat/guides/create-tokens) for more info. * @param "RoleSid" (string) - The SID of the [Role](https://www.twilio.com/docs/api/chat/rest/roles) assigned to the new member. * @return ChatV1ServiceChannelInvite -*/ + */ func (c *DefaultApiService) CreateInvite(ServiceSid string, ChannelSid string, params *CreateInviteParams) (*ChatV1ServiceChannelInvite, error) { - path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Invites" + path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Invites" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Identity != nil { - data.Set("Identity", *params.Identity) -} - if params != nil && params.RoleSid != nil { - data.Set("RoleSid", *params.RoleSid) -} + data := url.Values{} + headers := 0 + if params != nil && params.Identity != nil { + data.Set("Identity", *params.Identity) + } + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ChatV1ServiceChannelInvite{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ChatV1ServiceChannelInvite{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateMemberParams Optional parameters for the method 'CreateMember' type CreateMemberParams struct { Identity *string `json:"Identity,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` } /* @@ -210,42 +210,42 @@ type CreateMemberParams struct { * @param "Identity" (string) - The `identity` value that uniquely identifies the new resource's [User](https://www.twilio.com/docs/api/chat/rest/v1/user) within the [Service](https://www.twilio.com/docs/api/chat/rest/services). See [access tokens](https://www.twilio.com/docs/api/chat/guides/create-tokens) for more details. * @param "RoleSid" (string) - The SID of the [Role](https://www.twilio.com/docs/api/chat/rest/roles) to assign to the member. The default roles are those specified on the [Service](https://www.twilio.com/docs/chat/api/services). * @return ChatV1ServiceChannelMember -*/ + */ func (c *DefaultApiService) CreateMember(ServiceSid string, ChannelSid string, params *CreateMemberParams) (*ChatV1ServiceChannelMember, error) { - path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members" + path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Identity != nil { - data.Set("Identity", *params.Identity) -} - if params != nil && params.RoleSid != nil { - data.Set("RoleSid", *params.RoleSid) -} + data := url.Values{} + headers := 0 + if params != nil && params.Identity != nil { + data.Set("Identity", *params.Identity) + } + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ChatV1ServiceChannelMember{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ChatV1ServiceChannelMember{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateMessageParams Optional parameters for the method 'CreateMessage' type CreateMessageParams struct { Attributes *string `json:"Attributes,omitempty"` - Body *string `json:"Body,omitempty"` - From *string `json:"From,omitempty"` + Body *string `json:"Body,omitempty"` + From *string `json:"From,omitempty"` } /* @@ -257,45 +257,45 @@ type CreateMessageParams struct { * @param "Body" (string) - The message to send to the channel. Can also be an empty string or `null`, which sets the value as an empty string. You can send structured data in the body by serializing it as a string. * @param "From" (string) - The [identity](https://www.twilio.com/docs/api/chat/guides/identity) of the new message's author. The default value is `system`. * @return ChatV1ServiceChannelMessage -*/ + */ func (c *DefaultApiService) CreateMessage(ServiceSid string, ChannelSid string, params *CreateMessageParams) (*ChatV1ServiceChannelMessage, error) { - path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages" + path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) -} - if params != nil && params.Body != nil { - data.Set("Body", *params.Body) -} - if params != nil && params.From != nil { - data.Set("From", *params.From) -} + data := url.Values{} + headers := 0 + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.Body != nil { + data.Set("Body", *params.Body) + } + if params != nil && params.From != nil { + data.Set("From", *params.From) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ChatV1ServiceChannelMessage{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ChatV1ServiceChannelMessage{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateRoleParams Optional parameters for the method 'CreateRole' type CreateRoleParams struct { - FriendlyName *string `json:"FriendlyName,omitempty"` - Permission *[]string `json:"Permission,omitempty"` - Type *string `json:"Type,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Permission *[]string `json:"Permission,omitempty"` + Type *string `json:"Type,omitempty"` } /* @@ -306,39 +306,39 @@ type CreateRoleParams struct { * @param "Permission" ([]string) - A permission that you grant to the new role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. The values for this parameter depend on the role's `type` and are described in the documentation. * @param "Type" (string) - The type of role. Can be: `channel` for [Channel](https://www.twilio.com/docs/chat/api/channels) roles or `deployment` for [Service](https://www.twilio.com/docs/chat/api/services) roles. * @return ChatV1ServiceRole -*/ + */ func (c *DefaultApiService) CreateRole(ServiceSid string, params *CreateRoleParams) (*ChatV1ServiceRole, error) { - path := "/v1/Services/{ServiceSid}/Roles" + path := "/v1/Services/{ServiceSid}/Roles" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.Permission != nil { - data.Set("Permission", strings.Join(*params.Permission, ",")) -} - if params != nil && params.Type != nil { - data.Set("Type", *params.Type) -} + data := url.Values{} + headers := 0 + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Permission != nil { + data.Set("Permission", strings.Join(*params.Permission, ",")) + } + if params != nil && params.Type != nil { + data.Set("Type", *params.Type) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ChatV1ServiceRole{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ChatV1ServiceRole{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateServiceParams Optional parameters for the method 'CreateService' type CreateServiceParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` @@ -349,38 +349,38 @@ type CreateServiceParams struct { * @param optional nil or *CreateServiceParams - Optional Parameters: * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It can be up to 64 characters long. * @return ChatV1Service -*/ + */ func (c *DefaultApiService) CreateService(params *CreateServiceParams) (*ChatV1Service, error) { - path := "/v1/Services" - - data := url.Values{} - headers := 0 + path := "/v1/Services" - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} + data := url.Values{} + headers := 0 + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ChatV1Service{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ChatV1Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateUserParams Optional parameters for the method 'CreateUser' type CreateUserParams struct { - Attributes *string `json:"Attributes,omitempty"` + Attributes *string `json:"Attributes,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` - Identity *string `json:"Identity,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` + Identity *string `json:"Identity,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` } /* @@ -392,89 +392,84 @@ type CreateUserParams struct { * @param "Identity" (string) - The `identity` value that uniquely identifies the new resource's [User](https://www.twilio.com/docs/api/chat/rest/v1/user) within the [Service](https://www.twilio.com/docs/api/chat/rest/v1/service). This value is often a username or email address. See the Identity documentation for more details. * @param "RoleSid" (string) - The SID of the [Role](https://www.twilio.com/docs/api/chat/rest/roles) assigned to the new User. * @return ChatV1ServiceUser -*/ + */ func (c *DefaultApiService) CreateUser(ServiceSid string, params *CreateUserParams) (*ChatV1ServiceUser, error) { - path := "/v1/Services/{ServiceSid}/Users" + path := "/v1/Services/{ServiceSid}/Users" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.Identity != nil { - data.Set("Identity", *params.Identity) -} - if params != nil && params.RoleSid != nil { - data.Set("RoleSid", *params.RoleSid) -} + data := url.Values{} + headers := 0 + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Identity != nil { + data.Set("Identity", *params.Identity) + } + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ChatV1ServiceUser{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ChatV1ServiceUser{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * DeleteChannel Method for DeleteChannel * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to delete the resource from. * @param Sid The Twilio-provided string that uniquely identifies the Channel resource to delete. -*/ -func (c *DefaultApiService) DeleteChannel(ServiceSid string, Sid string, ) (error) { - path := "/v1/Services/{ServiceSid}/Channels/{Sid}" + */ +func (c *DefaultApiService) DeleteChannel(ServiceSid string, Sid string) error { + path := "/v1/Services/{ServiceSid}/Channels/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + defer resp.Body.Close() - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() - - return nil + return nil } /* * DeleteCredential Method for DeleteCredential * @param Sid The Twilio-provided string that uniquely identifies the Credential resource to delete. -*/ -func (c *DefaultApiService) DeleteCredential(Sid string, ) (error) { - path := "/v1/Credentials/{Sid}" + */ +func (c *DefaultApiService) DeleteCredential(Sid string) error { + path := "/v1/Credentials/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + defer resp.Body.Close() - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() - - return nil + return nil } /* @@ -482,26 +477,24 @@ func (c *DefaultApiService) DeleteCredential(Sid string, ) (error) { * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to delete the resource from. * @param ChannelSid The SID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the resource to delete belongs to. * @param Sid The Twilio-provided string that uniquely identifies the Invite resource to delete. -*/ -func (c *DefaultApiService) DeleteInvite(ServiceSid string, ChannelSid string, Sid string, ) (error) { - path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Invites/{Sid}" + */ +func (c *DefaultApiService) DeleteInvite(ServiceSid string, ChannelSid string, Sid string) error { + path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Invites/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + defer resp.Body.Close() - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() - - return nil + return nil } /* @@ -509,26 +502,24 @@ func (c *DefaultApiService) DeleteInvite(ServiceSid string, ChannelSid string, S * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to delete the resource from. * @param ChannelSid The unique ID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the message belongs to. Can be the Channel's `sid` or `unique_name`. * @param Sid The Twilio-provided string that uniquely identifies the Member resource to delete. -*/ -func (c *DefaultApiService) DeleteMember(ServiceSid string, ChannelSid string, Sid string, ) (error) { - path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}" + */ +func (c *DefaultApiService) DeleteMember(ServiceSid string, ChannelSid string, Sid string) error { + path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + defer resp.Body.Close() - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() - - return nil + return nil } /* @@ -536,99 +527,91 @@ func (c *DefaultApiService) DeleteMember(ServiceSid string, ChannelSid string, S * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to delete the resource from. * @param ChannelSid The unique ID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the message to delete belongs to. Can be the Channel resource's `sid` or `unique_name`. * @param Sid The Twilio-provided string that uniquely identifies the Message resource to delete. -*/ -func (c *DefaultApiService) DeleteMessage(ServiceSid string, ChannelSid string, Sid string, ) (error) { - path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}" + */ +func (c *DefaultApiService) DeleteMessage(ServiceSid string, ChannelSid string, Sid string) error { + path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + defer resp.Body.Close() - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() - - return nil + return nil } /* * DeleteRole Method for DeleteRole * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to delete the resource from. * @param Sid The Twilio-provided string that uniquely identifies the Role resource to delete. -*/ -func (c *DefaultApiService) DeleteRole(ServiceSid string, Sid string, ) (error) { - path := "/v1/Services/{ServiceSid}/Roles/{Sid}" + */ +func (c *DefaultApiService) DeleteRole(ServiceSid string, Sid string) error { + path := "/v1/Services/{ServiceSid}/Roles/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + defer resp.Body.Close() - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() - - return nil + return nil } /* * DeleteService Method for DeleteService * @param Sid The Twilio-provided string that uniquely identifies the Service resource to delete. -*/ -func (c *DefaultApiService) DeleteService(Sid string, ) (error) { - path := "/v1/Services/{Sid}" + */ +func (c *DefaultApiService) DeleteService(Sid string) error { + path := "/v1/Services/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + defer resp.Body.Close() - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() - - return nil + return nil } /* * DeleteUser Method for DeleteUser * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to delete the resource from. * @param Sid The Twilio-provided string that uniquely identifies the User resource to delete. -*/ -func (c *DefaultApiService) DeleteUser(ServiceSid string, Sid string, ) (error) { - path := "/v1/Services/{ServiceSid}/Users/{Sid}" + */ +func (c *DefaultApiService) DeleteUser(ServiceSid string, Sid string) error { + path := "/v1/Services/{ServiceSid}/Users/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + defer resp.Body.Close() - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() - - return nil + return nil } /* @@ -636,59 +619,55 @@ func (c *DefaultApiService) DeleteUser(ServiceSid string, Sid string, ) (error) * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to fetch the resource from. * @param Sid The Twilio-provided string that uniquely identifies the Channel resource to fetch. * @return ChatV1ServiceChannel -*/ -func (c *DefaultApiService) FetchChannel(ServiceSid string, Sid string, ) (*ChatV1ServiceChannel, error) { - path := "/v1/Services/{ServiceSid}/Channels/{Sid}" + */ +func (c *DefaultApiService) FetchChannel(ServiceSid string, Sid string) (*ChatV1ServiceChannel, error) { + path := "/v1/Services/{ServiceSid}/Channels/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &ChatV1ServiceChannel{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ChatV1ServiceChannel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * FetchCredential Method for FetchCredential * @param Sid The Twilio-provided string that uniquely identifies the Credential resource to fetch. * @return ChatV1Credential -*/ -func (c *DefaultApiService) FetchCredential(Sid string, ) (*ChatV1Credential, error) { - path := "/v1/Credentials/{Sid}" + */ +func (c *DefaultApiService) FetchCredential(Sid string) (*ChatV1Credential, error) { + path := "/v1/Credentials/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ChatV1Credential{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ChatV1Credential{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -697,31 +676,29 @@ func (c *DefaultApiService) FetchCredential(Sid string, ) (*ChatV1Credential, er * @param ChannelSid The SID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the resource to fetch belongs to. * @param Sid The Twilio-provided string that uniquely identifies the Invite resource to fetch. * @return ChatV1ServiceChannelInvite -*/ -func (c *DefaultApiService) FetchInvite(ServiceSid string, ChannelSid string, Sid string, ) (*ChatV1ServiceChannelInvite, error) { - path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Invites/{Sid}" + */ +func (c *DefaultApiService) FetchInvite(ServiceSid string, ChannelSid string, Sid string) (*ChatV1ServiceChannelInvite, error) { + path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Invites/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ChatV1ServiceChannelInvite{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ChatV1ServiceChannelInvite{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -730,31 +707,29 @@ func (c *DefaultApiService) FetchInvite(ServiceSid string, ChannelSid string, Si * @param ChannelSid The unique ID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the member to fetch belongs to. Can be the Channel resource's `sid` or `unique_name` value. * @param Sid The Twilio-provided string that uniquely identifies the Member resource to fetch. * @return ChatV1ServiceChannelMember -*/ -func (c *DefaultApiService) FetchMember(ServiceSid string, ChannelSid string, Sid string, ) (*ChatV1ServiceChannelMember, error) { - path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}" + */ +func (c *DefaultApiService) FetchMember(ServiceSid string, ChannelSid string, Sid string) (*ChatV1ServiceChannelMember, error) { + path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &ChatV1ServiceChannelMember{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ChatV1ServiceChannelMember{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -763,31 +738,29 @@ func (c *DefaultApiService) FetchMember(ServiceSid string, ChannelSid string, Si * @param ChannelSid The unique ID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the message to fetch belongs to. Can be the Channel's `sid` or `unique_name`. * @param Sid The Twilio-provided string that uniquely identifies the Message resource to fetch. * @return ChatV1ServiceChannelMessage -*/ -func (c *DefaultApiService) FetchMessage(ServiceSid string, ChannelSid string, Sid string, ) (*ChatV1ServiceChannelMessage, error) { - path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}" + */ +func (c *DefaultApiService) FetchMessage(ServiceSid string, ChannelSid string, Sid string) (*ChatV1ServiceChannelMessage, error) { + path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ChatV1ServiceChannelMessage{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ChatV1ServiceChannelMessage{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -795,59 +768,55 @@ func (c *DefaultApiService) FetchMessage(ServiceSid string, ChannelSid string, S * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to fetch the resource from. * @param Sid The Twilio-provided string that uniquely identifies the Role resource to fetch. * @return ChatV1ServiceRole -*/ -func (c *DefaultApiService) FetchRole(ServiceSid string, Sid string, ) (*ChatV1ServiceRole, error) { - path := "/v1/Services/{ServiceSid}/Roles/{Sid}" + */ +func (c *DefaultApiService) FetchRole(ServiceSid string, Sid string) (*ChatV1ServiceRole, error) { + path := "/v1/Services/{ServiceSid}/Roles/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ChatV1ServiceRole{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ChatV1ServiceRole{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * FetchService Method for FetchService * @param Sid The Twilio-provided string that uniquely identifies the Service resource to fetch. * @return ChatV1Service -*/ -func (c *DefaultApiService) FetchService(Sid string, ) (*ChatV1Service, error) { - path := "/v1/Services/{Sid}" + */ +func (c *DefaultApiService) FetchService(Sid string) (*ChatV1Service, error) { + path := "/v1/Services/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &ChatV1Service{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ChatV1Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -855,35 +824,34 @@ func (c *DefaultApiService) FetchService(Sid string, ) (*ChatV1Service, error) { * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to fetch the resource from. * @param Sid The Twilio-provided string that uniquely identifies the User resource to fetch. * @return ChatV1ServiceUser -*/ -func (c *DefaultApiService) FetchUser(ServiceSid string, Sid string, ) (*ChatV1ServiceUser, error) { - path := "/v1/Services/{ServiceSid}/Users/{Sid}" + */ +func (c *DefaultApiService) FetchUser(ServiceSid string, Sid string) (*ChatV1ServiceUser, error) { + path := "/v1/Services/{ServiceSid}/Users/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ChatV1ServiceUser{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ChatV1ServiceUser{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListChannelParams Optional parameters for the method 'ListChannel' type ListChannelParams struct { - Type *[]string `json:"Type,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + Type *[]string `json:"Type,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -893,36 +861,36 @@ type ListChannelParams struct { * @param "Type" ([]string) - The visibility of the Channels to read. Can be: `public` or `private` and defaults to `public`. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListChannelResponse -*/ + */ func (c *DefaultApiService) ListChannel(ServiceSid string, params *ListChannelParams) (*ListChannelResponse, error) { - path := "/v1/Services/{ServiceSid}/Channels" + path := "/v1/Services/{ServiceSid}/Channels" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Type != nil { - data.Set("Type", strings.Join(*params.Type, ",")) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.Type != nil { + data.Set("Type", strings.Join(*params.Type, ",")) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListChannelResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListChannelResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListCredentialParams Optional parameters for the method 'ListCredential' type ListCredentialParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -933,36 +901,36 @@ type ListCredentialParams struct { * @param optional nil or *ListCredentialParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListCredentialResponse -*/ + */ func (c *DefaultApiService) ListCredential(params *ListCredentialParams) (*ListCredentialResponse, error) { - path := "/v1/Credentials" + path := "/v1/Credentials" - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListCredentialResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListCredentialResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListInviteParams Optional parameters for the method 'ListInvite' type ListInviteParams struct { Identity *[]string `json:"Identity,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -973,41 +941,41 @@ type ListInviteParams struct { * @param "Identity" ([]string) - The [User](https://www.twilio.com/docs/api/chat/rest/v1/user)'s `identity` value of the resources to read. See [access tokens](https://www.twilio.com/docs/api/chat/guides/create-tokens) for more details. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListInviteResponse -*/ + */ func (c *DefaultApiService) ListInvite(ServiceSid string, ChannelSid string, params *ListInviteParams) (*ListInviteResponse, error) { - path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Invites" + path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Invites" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Identity != nil { - data.Set("Identity", strings.Join(*params.Identity, ",")) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.Identity != nil { + data.Set("Identity", strings.Join(*params.Identity, ",")) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListInviteResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListInviteResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListMemberParams Optional parameters for the method 'ListMember' type ListMemberParams struct { Identity *[]string `json:"Identity,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -1018,41 +986,41 @@ type ListMemberParams struct { * @param "Identity" ([]string) - The [User](https://www.twilio.com/docs/api/chat/rest/v1/user)'s `identity` value of the resources to read. See [access tokens](https://www.twilio.com/docs/api/chat/guides/create-tokens) for more details. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListMemberResponse -*/ + */ func (c *DefaultApiService) ListMember(ServiceSid string, ChannelSid string, params *ListMemberParams) (*ListMemberResponse, error) { - path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members" + path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Identity != nil { - data.Set("Identity", strings.Join(*params.Identity, ",")) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.Identity != nil { + data.Set("Identity", strings.Join(*params.Identity, ",")) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListMemberResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListMemberResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListMessageParams Optional parameters for the method 'ListMessage' type ListMessageParams struct { - Order *string `json:"Order,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + Order *string `json:"Order,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -1063,37 +1031,37 @@ type ListMessageParams struct { * @param "Order" (string) - The sort order of the returned messages. Can be: `asc` (ascending) or `desc` (descending) with `asc` as the default. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListMessageResponse -*/ + */ func (c *DefaultApiService) ListMessage(ServiceSid string, ChannelSid string, params *ListMessageParams) (*ListMessageResponse, error) { - path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages" + path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Order != nil { - data.Set("Order", *params.Order) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.Order != nil { + data.Set("Order", *params.Order) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListMessageResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListMessageResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListRoleParams Optional parameters for the method 'ListRole' type ListRoleParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1105,33 +1073,33 @@ type ListRoleParams struct { * @param optional nil or *ListRoleParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListRoleResponse -*/ + */ func (c *DefaultApiService) ListRole(ServiceSid string, params *ListRoleParams) (*ListRoleResponse, error) { - path := "/v1/Services/{ServiceSid}/Roles" + path := "/v1/Services/{ServiceSid}/Roles" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListRoleResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListRoleResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListServiceParams Optional parameters for the method 'ListService' type ListServiceParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1142,32 +1110,32 @@ type ListServiceParams struct { * @param optional nil or *ListServiceParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListServiceResponse -*/ + */ func (c *DefaultApiService) ListService(params *ListServiceParams) (*ListServiceResponse, error) { - path := "/v1/Services" + path := "/v1/Services" - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListServiceResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListServiceResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListUserParams Optional parameters for the method 'ListUser' type ListUserParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1179,33 +1147,33 @@ type ListUserParams struct { * @param optional nil or *ListUserParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListUserResponse -*/ + */ func (c *DefaultApiService) ListUser(ServiceSid string, params *ListUserParams) (*ListUserResponse, error) { - path := "/v1/Services/{ServiceSid}/Users" + path := "/v1/Services/{ServiceSid}/Users" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListUserResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListUserResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListUserChannelParams Optional parameters for the method 'ListUserChannel' type ListUserChannelParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1219,39 +1187,39 @@ type ListUserChannelParams struct { * @param optional nil or *ListUserChannelParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListUserChannelResponse -*/ + */ func (c *DefaultApiService) ListUserChannel(ServiceSid string, UserSid string, params *ListUserChannelParams) (*ListUserChannelResponse, error) { - path := "/v1/Services/{ServiceSid}/Users/{UserSid}/Channels" + path := "/v1/Services/{ServiceSid}/Users/{UserSid}/Channels" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"UserSid"+"}", UserSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListUserChannelResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListUserChannelResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateChannelParams Optional parameters for the method 'UpdateChannel' type UpdateChannelParams struct { - Attributes *string `json:"Attributes,omitempty"` + Attributes *string `json:"Attributes,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` } /* @@ -1263,48 +1231,48 @@ type UpdateChannelParams struct { * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It can be up to 64 characters long. * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. This value must be 64 characters or less in length and be unique within the Service. * @return ChatV1ServiceChannel -*/ + */ func (c *DefaultApiService) UpdateChannel(ServiceSid string, Sid string, params *UpdateChannelParams) (*ChatV1ServiceChannel, error) { - path := "/v1/Services/{ServiceSid}/Channels/{Sid}" + path := "/v1/Services/{ServiceSid}/Channels/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) -} + data := url.Values{} + headers := 0 + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ChatV1ServiceChannel{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ChatV1ServiceChannel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateCredentialParams Optional parameters for the method 'UpdateCredential' type UpdateCredentialParams struct { - ApiKey *string `json:"ApiKey,omitempty"` - Certificate *string `json:"Certificate,omitempty"` + ApiKey *string `json:"ApiKey,omitempty"` + Certificate *string `json:"Certificate,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` - PrivateKey *string `json:"PrivateKey,omitempty"` - Sandbox *bool `json:"Sandbox,omitempty"` - Secret *string `json:"Secret,omitempty"` + PrivateKey *string `json:"PrivateKey,omitempty"` + Sandbox *bool `json:"Sandbox,omitempty"` + Secret *string `json:"Secret,omitempty"` } /* @@ -1318,52 +1286,52 @@ type UpdateCredentialParams struct { * @param "Sandbox" (bool) - [APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production. * @param "Secret" (string) - [FCM only] The **Server key** of your project from the Firebase console, found under Settings / Cloud messaging. * @return ChatV1Credential -*/ + */ func (c *DefaultApiService) UpdateCredential(Sid string, params *UpdateCredentialParams) (*ChatV1Credential, error) { - path := "/v1/Credentials/{Sid}" + path := "/v1/Credentials/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.ApiKey != nil { - data.Set("ApiKey", *params.ApiKey) -} - if params != nil && params.Certificate != nil { - data.Set("Certificate", *params.Certificate) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.PrivateKey != nil { - data.Set("PrivateKey", *params.PrivateKey) -} - if params != nil && params.Sandbox != nil { - data.Set("Sandbox", fmt.Sprint(*params.Sandbox)) -} - if params != nil && params.Secret != nil { - data.Set("Secret", *params.Secret) -} + data := url.Values{} + headers := 0 + if params != nil && params.ApiKey != nil { + data.Set("ApiKey", *params.ApiKey) + } + if params != nil && params.Certificate != nil { + data.Set("Certificate", *params.Certificate) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.PrivateKey != nil { + data.Set("PrivateKey", *params.PrivateKey) + } + if params != nil && params.Sandbox != nil { + data.Set("Sandbox", fmt.Sprint(*params.Sandbox)) + } + if params != nil && params.Secret != nil { + data.Set("Secret", *params.Secret) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ChatV1Credential{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ChatV1Credential{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateMemberParams Optional parameters for the method 'UpdateMember' type UpdateMemberParams struct { - LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` + LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` } /* @@ -1375,42 +1343,42 @@ type UpdateMemberParams struct { * @param "LastConsumedMessageIndex" (*int32) - The index of the last [Message](https://www.twilio.com/docs/api/chat/rest/messages) that the Member has read within the [Channel](https://www.twilio.com/docs/api/chat/rest/channels). * @param "RoleSid" (string) - The SID of the [Role](https://www.twilio.com/docs/api/chat/rest/roles) to assign to the member. The default roles are those specified on the [Service](https://www.twilio.com/docs/chat/api/services). * @return ChatV1ServiceChannelMember -*/ + */ func (c *DefaultApiService) UpdateMember(ServiceSid string, ChannelSid string, Sid string, params *UpdateMemberParams) (*ChatV1ServiceChannelMember, error) { - path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}" + path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.LastConsumedMessageIndex != nil { - data.Set("LastConsumedMessageIndex", fmt.Sprint(*params.LastConsumedMessageIndex)) -} - if params != nil && params.RoleSid != nil { - data.Set("RoleSid", *params.RoleSid) -} + data := url.Values{} + headers := 0 + if params != nil && params.LastConsumedMessageIndex != nil { + data.Set("LastConsumedMessageIndex", fmt.Sprint(*params.LastConsumedMessageIndex)) + } + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ChatV1ServiceChannelMember{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ChatV1ServiceChannelMember{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateMessageParams Optional parameters for the method 'UpdateMessage' type UpdateMessageParams struct { Attributes *string `json:"Attributes,omitempty"` - Body *string `json:"Body,omitempty"` + Body *string `json:"Body,omitempty"` } /* @@ -1422,38 +1390,38 @@ type UpdateMessageParams struct { * @param "Attributes" (string) - A valid JSON string that contains application-specific data. * @param "Body" (string) - The message to send to the channel. Can also be an empty string or `null`, which sets the value as an empty string. You can send structured data in the body by serializing it as a string. * @return ChatV1ServiceChannelMessage -*/ + */ func (c *DefaultApiService) UpdateMessage(ServiceSid string, ChannelSid string, Sid string, params *UpdateMessageParams) (*ChatV1ServiceChannelMessage, error) { - path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}" + path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) -} - if params != nil && params.Body != nil { - data.Set("Body", *params.Body) -} + data := url.Values{} + headers := 0 + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.Body != nil { + data.Set("Body", *params.Body) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ChatV1ServiceChannelMessage{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ChatV1ServiceChannelMessage{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateRoleParams Optional parameters for the method 'UpdateRole' type UpdateRoleParams struct { Permission *[]string `json:"Permission,omitempty"` @@ -1466,90 +1434,90 @@ type UpdateRoleParams struct { * @param optional nil or *UpdateRoleParams - Optional Parameters: * @param "Permission" ([]string) - A permission that you grant to the role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. The values for this parameter depend on the role's `type` and are described in the documentation. * @return ChatV1ServiceRole -*/ + */ func (c *DefaultApiService) UpdateRole(ServiceSid string, Sid string, params *UpdateRoleParams) (*ChatV1ServiceRole, error) { - path := "/v1/Services/{ServiceSid}/Roles/{Sid}" + path := "/v1/Services/{ServiceSid}/Roles/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Permission != nil { - data.Set("Permission", strings.Join(*params.Permission, ",")) -} + data := url.Values{} + headers := 0 + if params != nil && params.Permission != nil { + data.Set("Permission", strings.Join(*params.Permission, ",")) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ChatV1ServiceRole{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ChatV1ServiceRole{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateServiceParams Optional parameters for the method 'UpdateService' type UpdateServiceParams struct { - ConsumptionReportInterval *int32 `json:"ConsumptionReportInterval,omitempty"` - DefaultChannelCreatorRoleSid *string `json:"DefaultChannelCreatorRoleSid,omitempty"` - DefaultChannelRoleSid *string `json:"DefaultChannelRoleSid,omitempty"` - DefaultServiceRoleSid *string `json:"DefaultServiceRoleSid,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - LimitsChannelMembers *int32 `json:"Limits.ChannelMembers,omitempty"` - LimitsUserChannels *int32 `json:"Limits.UserChannels,omitempty"` - NotificationsAddedToChannelEnabled *bool `json:"Notifications.AddedToChannel.Enabled,omitempty"` - NotificationsAddedToChannelTemplate *string `json:"Notifications.AddedToChannel.Template,omitempty"` - NotificationsInvitedToChannelEnabled *bool `json:"Notifications.InvitedToChannel.Enabled,omitempty"` - NotificationsInvitedToChannelTemplate *string `json:"Notifications.InvitedToChannel.Template,omitempty"` - NotificationsNewMessageEnabled *bool `json:"Notifications.NewMessage.Enabled,omitempty"` - NotificationsNewMessageTemplate *string `json:"Notifications.NewMessage.Template,omitempty"` - NotificationsRemovedFromChannelEnabled *bool `json:"Notifications.RemovedFromChannel.Enabled,omitempty"` - NotificationsRemovedFromChannelTemplate *string `json:"Notifications.RemovedFromChannel.Template,omitempty"` - PostWebhookUrl *string `json:"PostWebhookUrl,omitempty"` - PreWebhookUrl *string `json:"PreWebhookUrl,omitempty"` - ReachabilityEnabled *bool `json:"ReachabilityEnabled,omitempty"` - ReadStatusEnabled *bool `json:"ReadStatusEnabled,omitempty"` - TypingIndicatorTimeout *int32 `json:"TypingIndicatorTimeout,omitempty"` - WebhookFilters *[]string `json:"WebhookFilters,omitempty"` - WebhookMethod *string `json:"WebhookMethod,omitempty"` - WebhooksOnChannelAddMethod *string `json:"Webhooks.OnChannelAdd.Method,omitempty"` - WebhooksOnChannelAddUrl *string `json:"Webhooks.OnChannelAdd.Url,omitempty"` - WebhooksOnChannelAddedMethod *string `json:"Webhooks.OnChannelAdded.Method,omitempty"` - WebhooksOnChannelAddedUrl *string `json:"Webhooks.OnChannelAdded.Url,omitempty"` - WebhooksOnChannelDestroyMethod *string `json:"Webhooks.OnChannelDestroy.Method,omitempty"` - WebhooksOnChannelDestroyUrl *string `json:"Webhooks.OnChannelDestroy.Url,omitempty"` - WebhooksOnChannelDestroyedMethod *string `json:"Webhooks.OnChannelDestroyed.Method,omitempty"` - WebhooksOnChannelDestroyedUrl *string `json:"Webhooks.OnChannelDestroyed.Url,omitempty"` - WebhooksOnChannelUpdateMethod *string `json:"Webhooks.OnChannelUpdate.Method,omitempty"` - WebhooksOnChannelUpdateUrl *string `json:"Webhooks.OnChannelUpdate.Url,omitempty"` - WebhooksOnChannelUpdatedMethod *string `json:"Webhooks.OnChannelUpdated.Method,omitempty"` - WebhooksOnChannelUpdatedUrl *string `json:"Webhooks.OnChannelUpdated.Url,omitempty"` - WebhooksOnMemberAddMethod *string `json:"Webhooks.OnMemberAdd.Method,omitempty"` - WebhooksOnMemberAddUrl *string `json:"Webhooks.OnMemberAdd.Url,omitempty"` - WebhooksOnMemberAddedMethod *string `json:"Webhooks.OnMemberAdded.Method,omitempty"` - WebhooksOnMemberAddedUrl *string `json:"Webhooks.OnMemberAdded.Url,omitempty"` - WebhooksOnMemberRemoveMethod *string `json:"Webhooks.OnMemberRemove.Method,omitempty"` - WebhooksOnMemberRemoveUrl *string `json:"Webhooks.OnMemberRemove.Url,omitempty"` - WebhooksOnMemberRemovedMethod *string `json:"Webhooks.OnMemberRemoved.Method,omitempty"` - WebhooksOnMemberRemovedUrl *string `json:"Webhooks.OnMemberRemoved.Url,omitempty"` - WebhooksOnMessageRemoveMethod *string `json:"Webhooks.OnMessageRemove.Method,omitempty"` - WebhooksOnMessageRemoveUrl *string `json:"Webhooks.OnMessageRemove.Url,omitempty"` - WebhooksOnMessageRemovedMethod *string `json:"Webhooks.OnMessageRemoved.Method,omitempty"` - WebhooksOnMessageRemovedUrl *string `json:"Webhooks.OnMessageRemoved.Url,omitempty"` - WebhooksOnMessageSendMethod *string `json:"Webhooks.OnMessageSend.Method,omitempty"` - WebhooksOnMessageSendUrl *string `json:"Webhooks.OnMessageSend.Url,omitempty"` - WebhooksOnMessageSentMethod *string `json:"Webhooks.OnMessageSent.Method,omitempty"` - WebhooksOnMessageSentUrl *string `json:"Webhooks.OnMessageSent.Url,omitempty"` - WebhooksOnMessageUpdateMethod *string `json:"Webhooks.OnMessageUpdate.Method,omitempty"` - WebhooksOnMessageUpdateUrl *string `json:"Webhooks.OnMessageUpdate.Url,omitempty"` - WebhooksOnMessageUpdatedMethod *string `json:"Webhooks.OnMessageUpdated.Method,omitempty"` - WebhooksOnMessageUpdatedUrl *string `json:"Webhooks.OnMessageUpdated.Url,omitempty"` + ConsumptionReportInterval *int32 `json:"ConsumptionReportInterval,omitempty"` + DefaultChannelCreatorRoleSid *string `json:"DefaultChannelCreatorRoleSid,omitempty"` + DefaultChannelRoleSid *string `json:"DefaultChannelRoleSid,omitempty"` + DefaultServiceRoleSid *string `json:"DefaultServiceRoleSid,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + LimitsChannelMembers *int32 `json:"Limits.ChannelMembers,omitempty"` + LimitsUserChannels *int32 `json:"Limits.UserChannels,omitempty"` + NotificationsAddedToChannelEnabled *bool `json:"Notifications.AddedToChannel.Enabled,omitempty"` + NotificationsAddedToChannelTemplate *string `json:"Notifications.AddedToChannel.Template,omitempty"` + NotificationsInvitedToChannelEnabled *bool `json:"Notifications.InvitedToChannel.Enabled,omitempty"` + NotificationsInvitedToChannelTemplate *string `json:"Notifications.InvitedToChannel.Template,omitempty"` + NotificationsNewMessageEnabled *bool `json:"Notifications.NewMessage.Enabled,omitempty"` + NotificationsNewMessageTemplate *string `json:"Notifications.NewMessage.Template,omitempty"` + NotificationsRemovedFromChannelEnabled *bool `json:"Notifications.RemovedFromChannel.Enabled,omitempty"` + NotificationsRemovedFromChannelTemplate *string `json:"Notifications.RemovedFromChannel.Template,omitempty"` + PostWebhookUrl *string `json:"PostWebhookUrl,omitempty"` + PreWebhookUrl *string `json:"PreWebhookUrl,omitempty"` + ReachabilityEnabled *bool `json:"ReachabilityEnabled,omitempty"` + ReadStatusEnabled *bool `json:"ReadStatusEnabled,omitempty"` + TypingIndicatorTimeout *int32 `json:"TypingIndicatorTimeout,omitempty"` + WebhookFilters *[]string `json:"WebhookFilters,omitempty"` + WebhookMethod *string `json:"WebhookMethod,omitempty"` + WebhooksOnChannelAddMethod *string `json:"Webhooks.OnChannelAdd.Method,omitempty"` + WebhooksOnChannelAddUrl *string `json:"Webhooks.OnChannelAdd.Url,omitempty"` + WebhooksOnChannelAddedMethod *string `json:"Webhooks.OnChannelAdded.Method,omitempty"` + WebhooksOnChannelAddedUrl *string `json:"Webhooks.OnChannelAdded.Url,omitempty"` + WebhooksOnChannelDestroyMethod *string `json:"Webhooks.OnChannelDestroy.Method,omitempty"` + WebhooksOnChannelDestroyUrl *string `json:"Webhooks.OnChannelDestroy.Url,omitempty"` + WebhooksOnChannelDestroyedMethod *string `json:"Webhooks.OnChannelDestroyed.Method,omitempty"` + WebhooksOnChannelDestroyedUrl *string `json:"Webhooks.OnChannelDestroyed.Url,omitempty"` + WebhooksOnChannelUpdateMethod *string `json:"Webhooks.OnChannelUpdate.Method,omitempty"` + WebhooksOnChannelUpdateUrl *string `json:"Webhooks.OnChannelUpdate.Url,omitempty"` + WebhooksOnChannelUpdatedMethod *string `json:"Webhooks.OnChannelUpdated.Method,omitempty"` + WebhooksOnChannelUpdatedUrl *string `json:"Webhooks.OnChannelUpdated.Url,omitempty"` + WebhooksOnMemberAddMethod *string `json:"Webhooks.OnMemberAdd.Method,omitempty"` + WebhooksOnMemberAddUrl *string `json:"Webhooks.OnMemberAdd.Url,omitempty"` + WebhooksOnMemberAddedMethod *string `json:"Webhooks.OnMemberAdded.Method,omitempty"` + WebhooksOnMemberAddedUrl *string `json:"Webhooks.OnMemberAdded.Url,omitempty"` + WebhooksOnMemberRemoveMethod *string `json:"Webhooks.OnMemberRemove.Method,omitempty"` + WebhooksOnMemberRemoveUrl *string `json:"Webhooks.OnMemberRemove.Url,omitempty"` + WebhooksOnMemberRemovedMethod *string `json:"Webhooks.OnMemberRemoved.Method,omitempty"` + WebhooksOnMemberRemovedUrl *string `json:"Webhooks.OnMemberRemoved.Url,omitempty"` + WebhooksOnMessageRemoveMethod *string `json:"Webhooks.OnMessageRemove.Method,omitempty"` + WebhooksOnMessageRemoveUrl *string `json:"Webhooks.OnMessageRemove.Url,omitempty"` + WebhooksOnMessageRemovedMethod *string `json:"Webhooks.OnMessageRemoved.Method,omitempty"` + WebhooksOnMessageRemovedUrl *string `json:"Webhooks.OnMessageRemoved.Url,omitempty"` + WebhooksOnMessageSendMethod *string `json:"Webhooks.OnMessageSend.Method,omitempty"` + WebhooksOnMessageSendUrl *string `json:"Webhooks.OnMessageSend.Url,omitempty"` + WebhooksOnMessageSentMethod *string `json:"Webhooks.OnMessageSent.Method,omitempty"` + WebhooksOnMessageSentUrl *string `json:"Webhooks.OnMessageSent.Url,omitempty"` + WebhooksOnMessageUpdateMethod *string `json:"Webhooks.OnMessageUpdate.Method,omitempty"` + WebhooksOnMessageUpdateUrl *string `json:"Webhooks.OnMessageUpdate.Url,omitempty"` + WebhooksOnMessageUpdatedMethod *string `json:"Webhooks.OnMessageUpdated.Method,omitempty"` + WebhooksOnMessageUpdatedUrl *string `json:"Webhooks.OnMessageUpdated.Url,omitempty"` } /* @@ -1611,197 +1579,197 @@ type UpdateServiceParams struct { * @param "WebhooksOnMessageUpdatedMethod" (string) - The HTTP method to use when calling the `webhooks.on_message_updated.url`. * @param "WebhooksOnMessageUpdatedUrl" (string) - The URL of the webhook to call in response to the `on_message_updated` event using the `webhooks.on_message_updated.method` HTTP method. * @return ChatV1Service -*/ + */ func (c *DefaultApiService) UpdateService(Sid string, params *UpdateServiceParams) (*ChatV1Service, error) { - path := "/v1/Services/{Sid}" + path := "/v1/Services/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.ConsumptionReportInterval != nil { - data.Set("ConsumptionReportInterval", fmt.Sprint(*params.ConsumptionReportInterval)) -} - if params != nil && params.DefaultChannelCreatorRoleSid != nil { - data.Set("DefaultChannelCreatorRoleSid", *params.DefaultChannelCreatorRoleSid) -} - if params != nil && params.DefaultChannelRoleSid != nil { - data.Set("DefaultChannelRoleSid", *params.DefaultChannelRoleSid) -} - if params != nil && params.DefaultServiceRoleSid != nil { - data.Set("DefaultServiceRoleSid", *params.DefaultServiceRoleSid) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.LimitsChannelMembers != nil { - data.Set("LimitsChannelMembers", fmt.Sprint(*params.LimitsChannelMembers)) -} - if params != nil && params.LimitsUserChannels != nil { - data.Set("LimitsUserChannels", fmt.Sprint(*params.LimitsUserChannels)) -} - if params != nil && params.NotificationsAddedToChannelEnabled != nil { - data.Set("NotificationsAddedToChannelEnabled", fmt.Sprint(*params.NotificationsAddedToChannelEnabled)) -} - if params != nil && params.NotificationsAddedToChannelTemplate != nil { - data.Set("NotificationsAddedToChannelTemplate", *params.NotificationsAddedToChannelTemplate) -} - if params != nil && params.NotificationsInvitedToChannelEnabled != nil { - data.Set("NotificationsInvitedToChannelEnabled", fmt.Sprint(*params.NotificationsInvitedToChannelEnabled)) -} - if params != nil && params.NotificationsInvitedToChannelTemplate != nil { - data.Set("NotificationsInvitedToChannelTemplate", *params.NotificationsInvitedToChannelTemplate) -} - if params != nil && params.NotificationsNewMessageEnabled != nil { - data.Set("NotificationsNewMessageEnabled", fmt.Sprint(*params.NotificationsNewMessageEnabled)) -} - if params != nil && params.NotificationsNewMessageTemplate != nil { - data.Set("NotificationsNewMessageTemplate", *params.NotificationsNewMessageTemplate) -} - if params != nil && params.NotificationsRemovedFromChannelEnabled != nil { - data.Set("NotificationsRemovedFromChannelEnabled", fmt.Sprint(*params.NotificationsRemovedFromChannelEnabled)) -} - if params != nil && params.NotificationsRemovedFromChannelTemplate != nil { - data.Set("NotificationsRemovedFromChannelTemplate", *params.NotificationsRemovedFromChannelTemplate) -} - if params != nil && params.PostWebhookUrl != nil { - data.Set("PostWebhookUrl", *params.PostWebhookUrl) -} - if params != nil && params.PreWebhookUrl != nil { - data.Set("PreWebhookUrl", *params.PreWebhookUrl) -} - if params != nil && params.ReachabilityEnabled != nil { - data.Set("ReachabilityEnabled", fmt.Sprint(*params.ReachabilityEnabled)) -} - if params != nil && params.ReadStatusEnabled != nil { - data.Set("ReadStatusEnabled", fmt.Sprint(*params.ReadStatusEnabled)) -} - if params != nil && params.TypingIndicatorTimeout != nil { - data.Set("TypingIndicatorTimeout", fmt.Sprint(*params.TypingIndicatorTimeout)) -} - if params != nil && params.WebhookFilters != nil { - data.Set("WebhookFilters", strings.Join(*params.WebhookFilters, ",")) -} - if params != nil && params.WebhookMethod != nil { - data.Set("WebhookMethod", *params.WebhookMethod) -} - if params != nil && params.WebhooksOnChannelAddMethod != nil { - data.Set("WebhooksOnChannelAddMethod", *params.WebhooksOnChannelAddMethod) -} - if params != nil && params.WebhooksOnChannelAddUrl != nil { - data.Set("WebhooksOnChannelAddUrl", *params.WebhooksOnChannelAddUrl) -} - if params != nil && params.WebhooksOnChannelAddedMethod != nil { - data.Set("WebhooksOnChannelAddedMethod", *params.WebhooksOnChannelAddedMethod) -} - if params != nil && params.WebhooksOnChannelAddedUrl != nil { - data.Set("WebhooksOnChannelAddedUrl", *params.WebhooksOnChannelAddedUrl) -} - if params != nil && params.WebhooksOnChannelDestroyMethod != nil { - data.Set("WebhooksOnChannelDestroyMethod", *params.WebhooksOnChannelDestroyMethod) -} - if params != nil && params.WebhooksOnChannelDestroyUrl != nil { - data.Set("WebhooksOnChannelDestroyUrl", *params.WebhooksOnChannelDestroyUrl) -} - if params != nil && params.WebhooksOnChannelDestroyedMethod != nil { - data.Set("WebhooksOnChannelDestroyedMethod", *params.WebhooksOnChannelDestroyedMethod) -} - if params != nil && params.WebhooksOnChannelDestroyedUrl != nil { - data.Set("WebhooksOnChannelDestroyedUrl", *params.WebhooksOnChannelDestroyedUrl) -} - if params != nil && params.WebhooksOnChannelUpdateMethod != nil { - data.Set("WebhooksOnChannelUpdateMethod", *params.WebhooksOnChannelUpdateMethod) -} - if params != nil && params.WebhooksOnChannelUpdateUrl != nil { - data.Set("WebhooksOnChannelUpdateUrl", *params.WebhooksOnChannelUpdateUrl) -} - if params != nil && params.WebhooksOnChannelUpdatedMethod != nil { - data.Set("WebhooksOnChannelUpdatedMethod", *params.WebhooksOnChannelUpdatedMethod) -} - if params != nil && params.WebhooksOnChannelUpdatedUrl != nil { - data.Set("WebhooksOnChannelUpdatedUrl", *params.WebhooksOnChannelUpdatedUrl) -} - if params != nil && params.WebhooksOnMemberAddMethod != nil { - data.Set("WebhooksOnMemberAddMethod", *params.WebhooksOnMemberAddMethod) -} - if params != nil && params.WebhooksOnMemberAddUrl != nil { - data.Set("WebhooksOnMemberAddUrl", *params.WebhooksOnMemberAddUrl) -} - if params != nil && params.WebhooksOnMemberAddedMethod != nil { - data.Set("WebhooksOnMemberAddedMethod", *params.WebhooksOnMemberAddedMethod) -} - if params != nil && params.WebhooksOnMemberAddedUrl != nil { - data.Set("WebhooksOnMemberAddedUrl", *params.WebhooksOnMemberAddedUrl) -} - if params != nil && params.WebhooksOnMemberRemoveMethod != nil { - data.Set("WebhooksOnMemberRemoveMethod", *params.WebhooksOnMemberRemoveMethod) -} - if params != nil && params.WebhooksOnMemberRemoveUrl != nil { - data.Set("WebhooksOnMemberRemoveUrl", *params.WebhooksOnMemberRemoveUrl) -} - if params != nil && params.WebhooksOnMemberRemovedMethod != nil { - data.Set("WebhooksOnMemberRemovedMethod", *params.WebhooksOnMemberRemovedMethod) -} - if params != nil && params.WebhooksOnMemberRemovedUrl != nil { - data.Set("WebhooksOnMemberRemovedUrl", *params.WebhooksOnMemberRemovedUrl) -} - if params != nil && params.WebhooksOnMessageRemoveMethod != nil { - data.Set("WebhooksOnMessageRemoveMethod", *params.WebhooksOnMessageRemoveMethod) -} - if params != nil && params.WebhooksOnMessageRemoveUrl != nil { - data.Set("WebhooksOnMessageRemoveUrl", *params.WebhooksOnMessageRemoveUrl) -} - if params != nil && params.WebhooksOnMessageRemovedMethod != nil { - data.Set("WebhooksOnMessageRemovedMethod", *params.WebhooksOnMessageRemovedMethod) -} - if params != nil && params.WebhooksOnMessageRemovedUrl != nil { - data.Set("WebhooksOnMessageRemovedUrl", *params.WebhooksOnMessageRemovedUrl) -} - if params != nil && params.WebhooksOnMessageSendMethod != nil { - data.Set("WebhooksOnMessageSendMethod", *params.WebhooksOnMessageSendMethod) -} - if params != nil && params.WebhooksOnMessageSendUrl != nil { - data.Set("WebhooksOnMessageSendUrl", *params.WebhooksOnMessageSendUrl) -} - if params != nil && params.WebhooksOnMessageSentMethod != nil { - data.Set("WebhooksOnMessageSentMethod", *params.WebhooksOnMessageSentMethod) -} - if params != nil && params.WebhooksOnMessageSentUrl != nil { - data.Set("WebhooksOnMessageSentUrl", *params.WebhooksOnMessageSentUrl) -} - if params != nil && params.WebhooksOnMessageUpdateMethod != nil { - data.Set("WebhooksOnMessageUpdateMethod", *params.WebhooksOnMessageUpdateMethod) -} - if params != nil && params.WebhooksOnMessageUpdateUrl != nil { - data.Set("WebhooksOnMessageUpdateUrl", *params.WebhooksOnMessageUpdateUrl) -} - if params != nil && params.WebhooksOnMessageUpdatedMethod != nil { - data.Set("WebhooksOnMessageUpdatedMethod", *params.WebhooksOnMessageUpdatedMethod) -} - if params != nil && params.WebhooksOnMessageUpdatedUrl != nil { - data.Set("WebhooksOnMessageUpdatedUrl", *params.WebhooksOnMessageUpdatedUrl) -} + data := url.Values{} + headers := 0 + if params != nil && params.ConsumptionReportInterval != nil { + data.Set("ConsumptionReportInterval", fmt.Sprint(*params.ConsumptionReportInterval)) + } + if params != nil && params.DefaultChannelCreatorRoleSid != nil { + data.Set("DefaultChannelCreatorRoleSid", *params.DefaultChannelCreatorRoleSid) + } + if params != nil && params.DefaultChannelRoleSid != nil { + data.Set("DefaultChannelRoleSid", *params.DefaultChannelRoleSid) + } + if params != nil && params.DefaultServiceRoleSid != nil { + data.Set("DefaultServiceRoleSid", *params.DefaultServiceRoleSid) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.LimitsChannelMembers != nil { + data.Set("LimitsChannelMembers", fmt.Sprint(*params.LimitsChannelMembers)) + } + if params != nil && params.LimitsUserChannels != nil { + data.Set("LimitsUserChannels", fmt.Sprint(*params.LimitsUserChannels)) + } + if params != nil && params.NotificationsAddedToChannelEnabled != nil { + data.Set("NotificationsAddedToChannelEnabled", fmt.Sprint(*params.NotificationsAddedToChannelEnabled)) + } + if params != nil && params.NotificationsAddedToChannelTemplate != nil { + data.Set("NotificationsAddedToChannelTemplate", *params.NotificationsAddedToChannelTemplate) + } + if params != nil && params.NotificationsInvitedToChannelEnabled != nil { + data.Set("NotificationsInvitedToChannelEnabled", fmt.Sprint(*params.NotificationsInvitedToChannelEnabled)) + } + if params != nil && params.NotificationsInvitedToChannelTemplate != nil { + data.Set("NotificationsInvitedToChannelTemplate", *params.NotificationsInvitedToChannelTemplate) + } + if params != nil && params.NotificationsNewMessageEnabled != nil { + data.Set("NotificationsNewMessageEnabled", fmt.Sprint(*params.NotificationsNewMessageEnabled)) + } + if params != nil && params.NotificationsNewMessageTemplate != nil { + data.Set("NotificationsNewMessageTemplate", *params.NotificationsNewMessageTemplate) + } + if params != nil && params.NotificationsRemovedFromChannelEnabled != nil { + data.Set("NotificationsRemovedFromChannelEnabled", fmt.Sprint(*params.NotificationsRemovedFromChannelEnabled)) + } + if params != nil && params.NotificationsRemovedFromChannelTemplate != nil { + data.Set("NotificationsRemovedFromChannelTemplate", *params.NotificationsRemovedFromChannelTemplate) + } + if params != nil && params.PostWebhookUrl != nil { + data.Set("PostWebhookUrl", *params.PostWebhookUrl) + } + if params != nil && params.PreWebhookUrl != nil { + data.Set("PreWebhookUrl", *params.PreWebhookUrl) + } + if params != nil && params.ReachabilityEnabled != nil { + data.Set("ReachabilityEnabled", fmt.Sprint(*params.ReachabilityEnabled)) + } + if params != nil && params.ReadStatusEnabled != nil { + data.Set("ReadStatusEnabled", fmt.Sprint(*params.ReadStatusEnabled)) + } + if params != nil && params.TypingIndicatorTimeout != nil { + data.Set("TypingIndicatorTimeout", fmt.Sprint(*params.TypingIndicatorTimeout)) + } + if params != nil && params.WebhookFilters != nil { + data.Set("WebhookFilters", strings.Join(*params.WebhookFilters, ",")) + } + if params != nil && params.WebhookMethod != nil { + data.Set("WebhookMethod", *params.WebhookMethod) + } + if params != nil && params.WebhooksOnChannelAddMethod != nil { + data.Set("WebhooksOnChannelAddMethod", *params.WebhooksOnChannelAddMethod) + } + if params != nil && params.WebhooksOnChannelAddUrl != nil { + data.Set("WebhooksOnChannelAddUrl", *params.WebhooksOnChannelAddUrl) + } + if params != nil && params.WebhooksOnChannelAddedMethod != nil { + data.Set("WebhooksOnChannelAddedMethod", *params.WebhooksOnChannelAddedMethod) + } + if params != nil && params.WebhooksOnChannelAddedUrl != nil { + data.Set("WebhooksOnChannelAddedUrl", *params.WebhooksOnChannelAddedUrl) + } + if params != nil && params.WebhooksOnChannelDestroyMethod != nil { + data.Set("WebhooksOnChannelDestroyMethod", *params.WebhooksOnChannelDestroyMethod) + } + if params != nil && params.WebhooksOnChannelDestroyUrl != nil { + data.Set("WebhooksOnChannelDestroyUrl", *params.WebhooksOnChannelDestroyUrl) + } + if params != nil && params.WebhooksOnChannelDestroyedMethod != nil { + data.Set("WebhooksOnChannelDestroyedMethod", *params.WebhooksOnChannelDestroyedMethod) + } + if params != nil && params.WebhooksOnChannelDestroyedUrl != nil { + data.Set("WebhooksOnChannelDestroyedUrl", *params.WebhooksOnChannelDestroyedUrl) + } + if params != nil && params.WebhooksOnChannelUpdateMethod != nil { + data.Set("WebhooksOnChannelUpdateMethod", *params.WebhooksOnChannelUpdateMethod) + } + if params != nil && params.WebhooksOnChannelUpdateUrl != nil { + data.Set("WebhooksOnChannelUpdateUrl", *params.WebhooksOnChannelUpdateUrl) + } + if params != nil && params.WebhooksOnChannelUpdatedMethod != nil { + data.Set("WebhooksOnChannelUpdatedMethod", *params.WebhooksOnChannelUpdatedMethod) + } + if params != nil && params.WebhooksOnChannelUpdatedUrl != nil { + data.Set("WebhooksOnChannelUpdatedUrl", *params.WebhooksOnChannelUpdatedUrl) + } + if params != nil && params.WebhooksOnMemberAddMethod != nil { + data.Set("WebhooksOnMemberAddMethod", *params.WebhooksOnMemberAddMethod) + } + if params != nil && params.WebhooksOnMemberAddUrl != nil { + data.Set("WebhooksOnMemberAddUrl", *params.WebhooksOnMemberAddUrl) + } + if params != nil && params.WebhooksOnMemberAddedMethod != nil { + data.Set("WebhooksOnMemberAddedMethod", *params.WebhooksOnMemberAddedMethod) + } + if params != nil && params.WebhooksOnMemberAddedUrl != nil { + data.Set("WebhooksOnMemberAddedUrl", *params.WebhooksOnMemberAddedUrl) + } + if params != nil && params.WebhooksOnMemberRemoveMethod != nil { + data.Set("WebhooksOnMemberRemoveMethod", *params.WebhooksOnMemberRemoveMethod) + } + if params != nil && params.WebhooksOnMemberRemoveUrl != nil { + data.Set("WebhooksOnMemberRemoveUrl", *params.WebhooksOnMemberRemoveUrl) + } + if params != nil && params.WebhooksOnMemberRemovedMethod != nil { + data.Set("WebhooksOnMemberRemovedMethod", *params.WebhooksOnMemberRemovedMethod) + } + if params != nil && params.WebhooksOnMemberRemovedUrl != nil { + data.Set("WebhooksOnMemberRemovedUrl", *params.WebhooksOnMemberRemovedUrl) + } + if params != nil && params.WebhooksOnMessageRemoveMethod != nil { + data.Set("WebhooksOnMessageRemoveMethod", *params.WebhooksOnMessageRemoveMethod) + } + if params != nil && params.WebhooksOnMessageRemoveUrl != nil { + data.Set("WebhooksOnMessageRemoveUrl", *params.WebhooksOnMessageRemoveUrl) + } + if params != nil && params.WebhooksOnMessageRemovedMethod != nil { + data.Set("WebhooksOnMessageRemovedMethod", *params.WebhooksOnMessageRemovedMethod) + } + if params != nil && params.WebhooksOnMessageRemovedUrl != nil { + data.Set("WebhooksOnMessageRemovedUrl", *params.WebhooksOnMessageRemovedUrl) + } + if params != nil && params.WebhooksOnMessageSendMethod != nil { + data.Set("WebhooksOnMessageSendMethod", *params.WebhooksOnMessageSendMethod) + } + if params != nil && params.WebhooksOnMessageSendUrl != nil { + data.Set("WebhooksOnMessageSendUrl", *params.WebhooksOnMessageSendUrl) + } + if params != nil && params.WebhooksOnMessageSentMethod != nil { + data.Set("WebhooksOnMessageSentMethod", *params.WebhooksOnMessageSentMethod) + } + if params != nil && params.WebhooksOnMessageSentUrl != nil { + data.Set("WebhooksOnMessageSentUrl", *params.WebhooksOnMessageSentUrl) + } + if params != nil && params.WebhooksOnMessageUpdateMethod != nil { + data.Set("WebhooksOnMessageUpdateMethod", *params.WebhooksOnMessageUpdateMethod) + } + if params != nil && params.WebhooksOnMessageUpdateUrl != nil { + data.Set("WebhooksOnMessageUpdateUrl", *params.WebhooksOnMessageUpdateUrl) + } + if params != nil && params.WebhooksOnMessageUpdatedMethod != nil { + data.Set("WebhooksOnMessageUpdatedMethod", *params.WebhooksOnMessageUpdatedMethod) + } + if params != nil && params.WebhooksOnMessageUpdatedUrl != nil { + data.Set("WebhooksOnMessageUpdatedUrl", *params.WebhooksOnMessageUpdatedUrl) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ChatV1Service{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ChatV1Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateUserParams Optional parameters for the method 'UpdateUser' type UpdateUserParams struct { - Attributes *string `json:"Attributes,omitempty"` + Attributes *string `json:"Attributes,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` } /* @@ -1813,37 +1781,36 @@ type UpdateUserParams struct { * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It is often used for display purposes. * @param "RoleSid" (string) - The SID of the [Role](https://www.twilio.com/docs/api/chat/rest/roles) assigned to this user. * @return ChatV1ServiceUser -*/ + */ func (c *DefaultApiService) UpdateUser(ServiceSid string, Sid string, params *UpdateUserParams) (*ChatV1ServiceUser, error) { - path := "/v1/Services/{ServiceSid}/Users/{Sid}" + path := "/v1/Services/{ServiceSid}/Users/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.RoleSid != nil { - data.Set("RoleSid", *params.RoleSid) -} + data := url.Values{} + headers := 0 + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ChatV1ServiceUser{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ChatV1ServiceUser{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } diff --git a/twilio/rest/chat/v1/model_chat_v1_credential.go b/twilio/rest/chat/v1/model_chat_v1_credential.go index 67ddfb71b..d2eef1cb7 100644 --- a/twilio/rest/chat/v1/model_chat_v1_credential.go +++ b/twilio/rest/chat/v1/model_chat_v1_credential.go @@ -1,18 +1,20 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // ChatV1Credential struct for ChatV1Credential type ChatV1Credential struct { // The SID of the Account that created the resource diff --git a/twilio/rest/chat/v1/model_chat_v1_service.go b/twilio/rest/chat/v1/model_chat_v1_service.go index 842496757..2bbab2418 100644 --- a/twilio/rest/chat/v1/model_chat_v1_service.go +++ b/twilio/rest/chat/v1/model_chat_v1_service.go @@ -1,18 +1,20 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // ChatV1Service struct for ChatV1Service type ChatV1Service struct { // The SID of the Account that created the resource diff --git a/twilio/rest/chat/v1/model_chat_v1_service_channel.go b/twilio/rest/chat/v1/model_chat_v1_service_channel.go index 91c12714f..a0fb9a88e 100644 --- a/twilio/rest/chat/v1/model_chat_v1_service_channel.go +++ b/twilio/rest/chat/v1/model_chat_v1_service_channel.go @@ -1,18 +1,20 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // ChatV1ServiceChannel struct for ChatV1ServiceChannel type ChatV1ServiceChannel struct { // The SID of the Account that created the resource diff --git a/twilio/rest/chat/v1/model_chat_v1_service_channel_invite.go b/twilio/rest/chat/v1/model_chat_v1_service_channel_invite.go index ccc19b712..5bd0f3566 100644 --- a/twilio/rest/chat/v1/model_chat_v1_service_channel_invite.go +++ b/twilio/rest/chat/v1/model_chat_v1_service_channel_invite.go @@ -1,18 +1,20 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // ChatV1ServiceChannelInvite struct for ChatV1ServiceChannelInvite type ChatV1ServiceChannelInvite struct { // The SID of the Account that created the resource diff --git a/twilio/rest/chat/v1/model_chat_v1_service_channel_member.go b/twilio/rest/chat/v1/model_chat_v1_service_channel_member.go index fef81475b..0d0b52df4 100644 --- a/twilio/rest/chat/v1/model_chat_v1_service_channel_member.go +++ b/twilio/rest/chat/v1/model_chat_v1_service_channel_member.go @@ -1,18 +1,20 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // ChatV1ServiceChannelMember struct for ChatV1ServiceChannelMember type ChatV1ServiceChannelMember struct { // The SID of the Account that created the resource diff --git a/twilio/rest/chat/v1/model_chat_v1_service_channel_message.go b/twilio/rest/chat/v1/model_chat_v1_service_channel_message.go index 2849136bd..9a5a7ea4e 100644 --- a/twilio/rest/chat/v1/model_chat_v1_service_channel_message.go +++ b/twilio/rest/chat/v1/model_chat_v1_service_channel_message.go @@ -1,18 +1,20 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // ChatV1ServiceChannelMessage struct for ChatV1ServiceChannelMessage type ChatV1ServiceChannelMessage struct { // The SID of the Account that created the resource diff --git a/twilio/rest/chat/v1/model_chat_v1_service_role.go b/twilio/rest/chat/v1/model_chat_v1_service_role.go index e7fce11c7..4a97996c9 100644 --- a/twilio/rest/chat/v1/model_chat_v1_service_role.go +++ b/twilio/rest/chat/v1/model_chat_v1_service_role.go @@ -1,18 +1,20 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // ChatV1ServiceRole struct for ChatV1ServiceRole type ChatV1ServiceRole struct { // The SID of the Account that created the resource diff --git a/twilio/rest/chat/v1/model_chat_v1_service_user.go b/twilio/rest/chat/v1/model_chat_v1_service_user.go index 0112dc6f2..ff6906c19 100644 --- a/twilio/rest/chat/v1/model_chat_v1_service_user.go +++ b/twilio/rest/chat/v1/model_chat_v1_service_user.go @@ -1,18 +1,20 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // ChatV1ServiceUser struct for ChatV1ServiceUser type ChatV1ServiceUser struct { // The SID of the Account that created the resource diff --git a/twilio/rest/chat/v1/model_chat_v1_service_user_user_channel.go b/twilio/rest/chat/v1/model_chat_v1_service_user_user_channel.go index fbf8babf3..3a9904cfe 100644 --- a/twilio/rest/chat/v1/model_chat_v1_service_user_user_channel.go +++ b/twilio/rest/chat/v1/model_chat_v1_service_user_user_channel.go @@ -1,15 +1,16 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ChatV1ServiceUserUserChannel struct for ChatV1ServiceUserUserChannel type ChatV1ServiceUserUserChannel struct { // The SID of the Account that created the resource diff --git a/twilio/rest/chat/v1/model_list_channel_response.go b/twilio/rest/chat/v1/model_list_channel_response.go index 6f1fda941..6141f0f64 100644 --- a/twilio/rest/chat/v1/model_list_channel_response.go +++ b/twilio/rest/chat/v1/model_list_channel_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListChannelResponse struct for ListChannelResponse type ListChannelResponse struct { - Channels []ChatV1ServiceChannel `json:"Channels,omitempty"` - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Channels []ChatV1ServiceChannel `json:"Channels,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/chat/v1/model_list_credential_response.go b/twilio/rest/chat/v1/model_list_credential_response.go index 736720c94..1ac6c7b68 100644 --- a/twilio/rest/chat/v1/model_list_credential_response.go +++ b/twilio/rest/chat/v1/model_list_credential_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListCredentialResponse struct for ListCredentialResponse type ListCredentialResponse struct { - Credentials []ChatV1Credential `json:"Credentials,omitempty"` - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Credentials []ChatV1Credential `json:"Credentials,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/chat/v1/model_list_credential_response_meta.go b/twilio/rest/chat/v1/model_list_credential_response_meta.go index 3396dd7da..76cc60bd1 100644 --- a/twilio/rest/chat/v1/model_list_credential_response_meta.go +++ b/twilio/rest/chat/v1/model_list_credential_response_meta.go @@ -1,22 +1,23 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListCredentialResponseMeta struct for ListCredentialResponseMeta type ListCredentialResponseMeta struct { - FirstPageUrl string `json:"FirstPageUrl,omitempty"` - Key string `json:"Key,omitempty"` - NextPageUrl string `json:"NextPageUrl,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` - Url string `json:"Url,omitempty"` + Url string `json:"Url,omitempty"` } diff --git a/twilio/rest/chat/v1/model_list_invite_response.go b/twilio/rest/chat/v1/model_list_invite_response.go index 0be7c6192..88110c028 100644 --- a/twilio/rest/chat/v1/model_list_invite_response.go +++ b/twilio/rest/chat/v1/model_list_invite_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListInviteResponse struct for ListInviteResponse type ListInviteResponse struct { Invites []ChatV1ServiceChannelInvite `json:"Invites,omitempty"` - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/chat/v1/model_list_member_response.go b/twilio/rest/chat/v1/model_list_member_response.go index 4d1ca03d2..f1650c354 100644 --- a/twilio/rest/chat/v1/model_list_member_response.go +++ b/twilio/rest/chat/v1/model_list_member_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListMemberResponse struct for ListMemberResponse type ListMemberResponse struct { Members []ChatV1ServiceChannelMember `json:"Members,omitempty"` - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/chat/v1/model_list_message_response.go b/twilio/rest/chat/v1/model_list_message_response.go index 9b94039ac..11cc9c150 100644 --- a/twilio/rest/chat/v1/model_list_message_response.go +++ b/twilio/rest/chat/v1/model_list_message_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListMessageResponse struct for ListMessageResponse type ListMessageResponse struct { Messages []ChatV1ServiceChannelMessage `json:"Messages,omitempty"` - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/chat/v1/model_list_role_response.go b/twilio/rest/chat/v1/model_list_role_response.go index 78dd0b96a..ba3891756 100644 --- a/twilio/rest/chat/v1/model_list_role_response.go +++ b/twilio/rest/chat/v1/model_list_role_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListRoleResponse struct for ListRoleResponse type ListRoleResponse struct { - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` - Roles []ChatV1ServiceRole `json:"Roles,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Roles []ChatV1ServiceRole `json:"Roles,omitempty"` } diff --git a/twilio/rest/chat/v1/model_list_service_response.go b/twilio/rest/chat/v1/model_list_service_response.go index f97dd040f..72ac3f50f 100644 --- a/twilio/rest/chat/v1/model_list_service_response.go +++ b/twilio/rest/chat/v1/model_list_service_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListServiceResponse struct for ListServiceResponse type ListServiceResponse struct { - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` - Services []ChatV1Service `json:"Services,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Services []ChatV1Service `json:"Services,omitempty"` } diff --git a/twilio/rest/chat/v1/model_list_user_channel_response.go b/twilio/rest/chat/v1/model_list_user_channel_response.go index c3acff953..c0543f724 100644 --- a/twilio/rest/chat/v1/model_list_user_channel_response.go +++ b/twilio/rest/chat/v1/model_list_user_channel_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListUserChannelResponse struct for ListUserChannelResponse type ListUserChannelResponse struct { Channels []ChatV1ServiceUserUserChannel `json:"Channels,omitempty"` - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/chat/v1/model_list_user_response.go b/twilio/rest/chat/v1/model_list_user_response.go index 1663fb3b2..d47e7cc71 100644 --- a/twilio/rest/chat/v1/model_list_user_response.go +++ b/twilio/rest/chat/v1/model_list_user_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListUserResponse struct for ListUserResponse type ListUserResponse struct { - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` - Users []ChatV1ServiceUser `json:"Users,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Users []ChatV1ServiceUser `json:"Users,omitempty"` } diff --git a/twilio/rest/chat/v2/api_default.go b/twilio/rest/chat/v2/api_default.go index 2f6264eb7..35eeea0dc 100644 --- a/twilio/rest/chat/v2/api_default.go +++ b/twilio/rest/chat/v2/api_default.go @@ -1,11 +1,11 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,11 +14,11 @@ package openapi import ( "encoding/json" "fmt" - twilio "github.com/twilio/twilio-go/client" "net/url" - "strings" - "time" - "reflect" + "strings" + "time" + + twilio "github.com/twilio/twilio-go/client" ) type DefaultApiService struct { @@ -27,22 +27,22 @@ type DefaultApiService struct { } func NewDefaultApiService(client *twilio.Client) *DefaultApiService { - return &DefaultApiService { - client: client, + return &DefaultApiService{ + client: client, baseURL: "https://chat.twilio.com", } } // CreateChannelParams Optional parameters for the method 'CreateChannel' type CreateChannelParams struct { - XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - CreatedBy *string `json:"CreatedBy,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Type *string `json:"Type,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + CreatedBy *string `json:"CreatedBy,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Type *string `json:"Type,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` } /* @@ -58,63 +58,64 @@ type CreateChannelParams struct { * @param "Type" (string) - The visibility of the channel. Can be: `public` or `private` and defaults to `public`. * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the Channel resource's `sid` in the URL. This value must be 64 characters or less in length and be unique within the Service. * @return ChatV2ServiceChannel -*/ + */ func (c *DefaultApiService) CreateChannel(ServiceSid string, params *CreateChannelParams) (*ChatV2ServiceChannel, error) { - path := "/v2/Services/{ServiceSid}/Channels" + path := "/v2/Services/{ServiceSid}/Channels" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) -} - if params != nil && params.CreatedBy != nil { - data.Set("CreatedBy", *params.CreatedBy) -} - if params != nil && params.DateCreated != nil { - data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) -} - if params != nil && params.DateUpdated != nil { - data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.Type != nil { - data.Set("Type", *params.Type) -} - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) -} + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.CreatedBy != nil { + data.Set("CreatedBy", *params.CreatedBy) + } + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) + } + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Type != nil { + data.Set("Type", *params.Type) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ChatV2ServiceChannel{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ChatV2ServiceChannel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateChannelWebhookParams Optional parameters for the method 'CreateChannelWebhook' type CreateChannelWebhookParams struct { - ConfigurationFilters *[]string `json:"Configuration.Filters,omitempty"` - ConfigurationFlowSid *string `json:"Configuration.FlowSid,omitempty"` - ConfigurationMethod *string `json:"Configuration.Method,omitempty"` - ConfigurationRetryCount *int32 `json:"Configuration.RetryCount,omitempty"` - ConfigurationTriggers *[]string `json:"Configuration.Triggers,omitempty"` - ConfigurationUrl *string `json:"Configuration.Url,omitempty"` - Type *string `json:"Type,omitempty"` + ConfigurationFilters *[]string `json:"Configuration.Filters,omitempty"` + ConfigurationFlowSid *string `json:"Configuration.FlowSid,omitempty"` + ConfigurationMethod *string `json:"Configuration.Method,omitempty"` + ConfigurationRetryCount *int32 `json:"Configuration.RetryCount,omitempty"` + ConfigurationTriggers *[]string `json:"Configuration.Triggers,omitempty"` + ConfigurationUrl *string `json:"Configuration.Url,omitempty"` + Type *string `json:"Type,omitempty"` } /* @@ -130,61 +131,61 @@ type CreateChannelWebhookParams struct { * @param "ConfigurationUrl" (string) - The URL of the webhook to call using the `configuration.method`. * @param "Type" (string) - The type of webhook. Can be: `webhook`, `studio`, or `trigger`. * @return ChatV2ServiceChannelChannelWebhook -*/ + */ func (c *DefaultApiService) CreateChannelWebhook(ServiceSid string, ChannelSid string, params *CreateChannelWebhookParams) (*ChatV2ServiceChannelChannelWebhook, error) { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks" + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.ConfigurationFilters != nil { - data.Set("ConfigurationFilters", strings.Join(*params.ConfigurationFilters, ",")) -} - if params != nil && params.ConfigurationFlowSid != nil { - data.Set("ConfigurationFlowSid", *params.ConfigurationFlowSid) -} - if params != nil && params.ConfigurationMethod != nil { - data.Set("ConfigurationMethod", *params.ConfigurationMethod) -} - if params != nil && params.ConfigurationRetryCount != nil { - data.Set("ConfigurationRetryCount", fmt.Sprint(*params.ConfigurationRetryCount)) -} - if params != nil && params.ConfigurationTriggers != nil { - data.Set("ConfigurationTriggers", strings.Join(*params.ConfigurationTriggers, ",")) -} - if params != nil && params.ConfigurationUrl != nil { - data.Set("ConfigurationUrl", *params.ConfigurationUrl) -} - if params != nil && params.Type != nil { - data.Set("Type", *params.Type) -} + data := url.Values{} + headers := 0 + if params != nil && params.ConfigurationFilters != nil { + data.Set("ConfigurationFilters", strings.Join(*params.ConfigurationFilters, ",")) + } + if params != nil && params.ConfigurationFlowSid != nil { + data.Set("ConfigurationFlowSid", *params.ConfigurationFlowSid) + } + if params != nil && params.ConfigurationMethod != nil { + data.Set("ConfigurationMethod", *params.ConfigurationMethod) + } + if params != nil && params.ConfigurationRetryCount != nil { + data.Set("ConfigurationRetryCount", fmt.Sprint(*params.ConfigurationRetryCount)) + } + if params != nil && params.ConfigurationTriggers != nil { + data.Set("ConfigurationTriggers", strings.Join(*params.ConfigurationTriggers, ",")) + } + if params != nil && params.ConfigurationUrl != nil { + data.Set("ConfigurationUrl", *params.ConfigurationUrl) + } + if params != nil && params.Type != nil { + data.Set("Type", *params.Type) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ChatV2ServiceChannelChannelWebhook{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ChatV2ServiceChannelChannelWebhook{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateCredentialParams Optional parameters for the method 'CreateCredential' type CreateCredentialParams struct { - ApiKey *string `json:"ApiKey,omitempty"` - Certificate *string `json:"Certificate,omitempty"` + ApiKey *string `json:"ApiKey,omitempty"` + Certificate *string `json:"Certificate,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` - PrivateKey *string `json:"PrivateKey,omitempty"` - Sandbox *bool `json:"Sandbox,omitempty"` - Secret *string `json:"Secret,omitempty"` - Type *string `json:"Type,omitempty"` + PrivateKey *string `json:"PrivateKey,omitempty"` + Sandbox *bool `json:"Sandbox,omitempty"` + Secret *string `json:"Secret,omitempty"` + Type *string `json:"Type,omitempty"` } /* @@ -198,54 +199,54 @@ type CreateCredentialParams struct { * @param "Secret" (string) - [FCM only] The **Server key** of your project from the Firebase console, found under Settings / Cloud messaging. * @param "Type" (string) - The type of push-notification service the credential is for. Can be: `gcm`, `fcm`, or `apn`. * @return ChatV2Credential -*/ + */ func (c *DefaultApiService) CreateCredential(params *CreateCredentialParams) (*ChatV2Credential, error) { - path := "/v2/Credentials" - - data := url.Values{} - headers := 0 + path := "/v2/Credentials" - if params != nil && params.ApiKey != nil { - data.Set("ApiKey", *params.ApiKey) -} - if params != nil && params.Certificate != nil { - data.Set("Certificate", *params.Certificate) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.PrivateKey != nil { - data.Set("PrivateKey", *params.PrivateKey) -} - if params != nil && params.Sandbox != nil { - data.Set("Sandbox", fmt.Sprint(*params.Sandbox)) -} - if params != nil && params.Secret != nil { - data.Set("Secret", *params.Secret) -} - if params != nil && params.Type != nil { - data.Set("Type", *params.Type) -} + data := url.Values{} + headers := 0 + if params != nil && params.ApiKey != nil { + data.Set("ApiKey", *params.ApiKey) + } + if params != nil && params.Certificate != nil { + data.Set("Certificate", *params.Certificate) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.PrivateKey != nil { + data.Set("PrivateKey", *params.PrivateKey) + } + if params != nil && params.Sandbox != nil { + data.Set("Sandbox", fmt.Sprint(*params.Sandbox)) + } + if params != nil && params.Secret != nil { + data.Set("Secret", *params.Secret) + } + if params != nil && params.Type != nil { + data.Set("Type", *params.Type) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ChatV2Credential{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ChatV2Credential{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateInviteParams Optional parameters for the method 'CreateInvite' type CreateInviteParams struct { Identity *string `json:"Identity,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` } /* @@ -256,47 +257,47 @@ type CreateInviteParams struct { * @param "Identity" (string) - The `identity` value that uniquely identifies the new resource's [User](https://www.twilio.com/docs/chat/rest/user-resource) within the [Service](https://www.twilio.com/docs/chat/rest/service-resource). See [access tokens](https://www.twilio.com/docs/chat/create-tokens) for more info. * @param "RoleSid" (string) - The SID of the [Role](https://www.twilio.com/docs/chat/rest/role-resource) assigned to the new member. * @return ChatV2ServiceChannelInvite -*/ + */ func (c *DefaultApiService) CreateInvite(ServiceSid string, ChannelSid string, params *CreateInviteParams) (*ChatV2ServiceChannelInvite, error) { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Invites" + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Invites" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Identity != nil { - data.Set("Identity", *params.Identity) -} - if params != nil && params.RoleSid != nil { - data.Set("RoleSid", *params.RoleSid) -} + data := url.Values{} + headers := 0 + if params != nil && params.Identity != nil { + data.Set("Identity", *params.Identity) + } + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ChatV2ServiceChannelInvite{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ChatV2ServiceChannelInvite{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateMemberParams Optional parameters for the method 'CreateMember' type CreateMemberParams struct { - XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Identity *string `json:"Identity,omitempty"` - LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + Identity *string `json:"Identity,omitempty"` + LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` LastConsumptionTimestamp *time.Time `json:"LastConsumptionTimestamp,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` } /* @@ -313,65 +314,66 @@ type CreateMemberParams struct { * @param "LastConsumptionTimestamp" (time.Time) - The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) read event for the Member within the [Channel](https://www.twilio.com/docs/chat/channels). * @param "RoleSid" (string) - The SID of the [Role](https://www.twilio.com/docs/chat/rest/role-resource) to assign to the member. The default roles are those specified on the [Service](https://www.twilio.com/docs/chat/rest/service-resource). * @return ChatV2ServiceChannelMember -*/ + */ func (c *DefaultApiService) CreateMember(ServiceSid string, ChannelSid string, params *CreateMemberParams) (*ChatV2ServiceChannelMember, error) { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members" + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) -} - if params != nil && params.DateCreated != nil { - data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) -} - if params != nil && params.DateUpdated != nil { - data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) -} - if params != nil && params.Identity != nil { - data.Set("Identity", *params.Identity) -} - if params != nil && params.LastConsumedMessageIndex != nil { - data.Set("LastConsumedMessageIndex", fmt.Sprint(*params.LastConsumedMessageIndex)) -} - if params != nil && params.LastConsumptionTimestamp != nil { - data.Set("LastConsumptionTimestamp", fmt.Sprint(*params.LastConsumptionTimestamp)) -} - if params != nil && params.RoleSid != nil { - data.Set("RoleSid", *params.RoleSid) -} + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) + } + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) + } + if params != nil && params.Identity != nil { + data.Set("Identity", *params.Identity) + } + if params != nil && params.LastConsumedMessageIndex != nil { + data.Set("LastConsumedMessageIndex", fmt.Sprint(*params.LastConsumedMessageIndex)) + } + if params != nil && params.LastConsumptionTimestamp != nil { + data.Set("LastConsumptionTimestamp", fmt.Sprint(*params.LastConsumptionTimestamp)) + } + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) + } if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ChatV2ServiceChannelMember{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ChatV2ServiceChannelMember{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateMessageParams Optional parameters for the method 'CreateMessage' type CreateMessageParams struct { - XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - Body *string `json:"Body,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - From *string `json:"From,omitempty"` - LastUpdatedBy *string `json:"LastUpdatedBy,omitempty"` - MediaSid *string `json:"MediaSid,omitempty"` + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + Body *string `json:"Body,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + From *string `json:"From,omitempty"` + LastUpdatedBy *string `json:"LastUpdatedBy,omitempty"` + MediaSid *string `json:"MediaSid,omitempty"` } /* @@ -388,60 +390,61 @@ type CreateMessageParams struct { * @param "LastUpdatedBy" (string) - The [Identity](https://www.twilio.com/docs/chat/identity) of the User who last updated the Message, if applicable. * @param "MediaSid" (string) - The SID of the [Media](https://www.twilio.com/docs/chat/rest/media) to attach to the new Message. * @return ChatV2ServiceChannelMessage -*/ + */ func (c *DefaultApiService) CreateMessage(ServiceSid string, ChannelSid string, params *CreateMessageParams) (*ChatV2ServiceChannelMessage, error) { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages" + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) -} - if params != nil && params.Body != nil { - data.Set("Body", *params.Body) -} - if params != nil && params.DateCreated != nil { - data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) -} - if params != nil && params.DateUpdated != nil { - data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) -} - if params != nil && params.From != nil { - data.Set("From", *params.From) -} - if params != nil && params.LastUpdatedBy != nil { - data.Set("LastUpdatedBy", *params.LastUpdatedBy) -} - if params != nil && params.MediaSid != nil { - data.Set("MediaSid", *params.MediaSid) -} + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.Body != nil { + data.Set("Body", *params.Body) + } + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) + } + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) + } + if params != nil && params.From != nil { + data.Set("From", *params.From) + } + if params != nil && params.LastUpdatedBy != nil { + data.Set("LastUpdatedBy", *params.LastUpdatedBy) + } + if params != nil && params.MediaSid != nil { + data.Set("MediaSid", *params.MediaSid) + } if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ChatV2ServiceChannelMessage{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ChatV2ServiceChannelMessage{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateRoleParams Optional parameters for the method 'CreateRole' type CreateRoleParams struct { - FriendlyName *string `json:"FriendlyName,omitempty"` - Permission *[]string `json:"Permission,omitempty"` - Type *string `json:"Type,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Permission *[]string `json:"Permission,omitempty"` + Type *string `json:"Type,omitempty"` } /* @@ -452,39 +455,39 @@ type CreateRoleParams struct { * @param "Permission" ([]string) - A permission that you grant to the new role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. The values for this parameter depend on the role's `type`. * @param "Type" (string) - The type of role. Can be: `channel` for [Channel](https://www.twilio.com/docs/chat/channels) roles or `deployment` for [Service](https://www.twilio.com/docs/chat/rest/service-resource) roles. * @return ChatV2ServiceRole -*/ + */ func (c *DefaultApiService) CreateRole(ServiceSid string, params *CreateRoleParams) (*ChatV2ServiceRole, error) { - path := "/v2/Services/{ServiceSid}/Roles" + path := "/v2/Services/{ServiceSid}/Roles" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.Permission != nil { - data.Set("Permission", strings.Join(*params.Permission, ",")) -} - if params != nil && params.Type != nil { - data.Set("Type", *params.Type) -} + data := url.Values{} + headers := 0 + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Permission != nil { + data.Set("Permission", strings.Join(*params.Permission, ",")) + } + if params != nil && params.Type != nil { + data.Set("Type", *params.Type) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ChatV2ServiceRole{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ChatV2ServiceRole{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateServiceParams Optional parameters for the method 'CreateService' type CreateServiceParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` @@ -495,39 +498,39 @@ type CreateServiceParams struct { * @param optional nil or *CreateServiceParams - Optional Parameters: * @param "FriendlyName" (string) - A descriptive string that you create to describe the new resource. * @return ChatV2Service -*/ + */ func (c *DefaultApiService) CreateService(params *CreateServiceParams) (*ChatV2Service, error) { - path := "/v2/Services" - - data := url.Values{} - headers := 0 + path := "/v2/Services" - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} + data := url.Values{} + headers := 0 + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ChatV2Service{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ChatV2Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateUserParams Optional parameters for the method 'CreateUser' type CreateUserParams struct { XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Identity *string `json:"Identity,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Identity *string `json:"Identity,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` } /* @@ -540,70 +543,69 @@ type CreateUserParams struct { * @param "Identity" (string) - The `identity` value that uniquely identifies the new resource's [User](https://www.twilio.com/docs/chat/rest/user-resource) within the [Service](https://www.twilio.com/docs/chat/rest/service-resource). This value is often a username or email address. See the Identity documentation for more info. * @param "RoleSid" (string) - The SID of the [Role](https://www.twilio.com/docs/chat/rest/role-resource) to assign to the new User. * @return ChatV2ServiceUser -*/ + */ func (c *DefaultApiService) CreateUser(ServiceSid string, params *CreateUserParams) (*ChatV2ServiceUser, error) { - path := "/v2/Services/{ServiceSid}/Users" + path := "/v2/Services/{ServiceSid}/Users" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.Identity != nil { - data.Set("Identity", *params.Identity) -} - if params != nil && params.RoleSid != nil { - data.Set("RoleSid", *params.RoleSid) -} + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Identity != nil { + data.Set("Identity", *params.Identity) + } + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) + } if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ChatV2ServiceUser{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ChatV2ServiceUser{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * DeleteBinding Method for DeleteBinding * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to delete the Binding resource from. * @param Sid The SID of the Binding resource to delete. -*/ -func (c *DefaultApiService) DeleteBinding(ServiceSid string, Sid string, ) (error) { - path := "/v2/Services/{ServiceSid}/Bindings/{Sid}" + */ +func (c *DefaultApiService) DeleteBinding(ServiceSid string, Sid string) error { + path := "/v2/Services/{ServiceSid}/Bindings/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + defer resp.Body.Close() - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() - - return nil + return nil } + // DeleteChannelParams Optional parameters for the method 'DeleteChannel' type DeleteChannelParams struct { XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` @@ -615,28 +617,27 @@ type DeleteChannelParams struct { * @param Sid The SID of the Channel resource to delete. This value can be either the `sid` or the `unique_name` of the Channel resource to delete. * @param optional nil or *DeleteChannelParams - Optional Parameters: * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header -*/ -func (c *DefaultApiService) DeleteChannel(ServiceSid string, Sid string, params *DeleteChannelParams) (error) { - path := "/v2/Services/{ServiceSid}/Channels/{Sid}" + */ +func (c *DefaultApiService) DeleteChannel(ServiceSid string, Sid string, params *DeleteChannelParams) error { + path := "/v2/Services/{ServiceSid}/Channels/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := make(map[string]interface{}) - + data := url.Values{} + headers := make(map[string]interface{}) if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -644,49 +645,45 @@ func (c *DefaultApiService) DeleteChannel(ServiceSid string, Sid string, params * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) with the Channel to delete the Webhook resource from. * @param ChannelSid The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Channel Webhook resource to delete belongs to. This value can be the Channel resource's `sid` or `unique_name`. * @param Sid The SID of the Channel Webhook resource to delete. -*/ -func (c *DefaultApiService) DeleteChannelWebhook(ServiceSid string, ChannelSid string, Sid string, ) (error) { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks/{Sid}" + */ +func (c *DefaultApiService) DeleteChannelWebhook(ServiceSid string, ChannelSid string, Sid string) error { + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* * DeleteCredential Method for DeleteCredential * @param Sid The SID of the Credential resource to delete. -*/ -func (c *DefaultApiService) DeleteCredential(Sid string, ) (error) { - path := "/v2/Credentials/{Sid}" + */ +func (c *DefaultApiService) DeleteCredential(Sid string) error { + path := "/v2/Credentials/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -694,27 +691,26 @@ func (c *DefaultApiService) DeleteCredential(Sid string, ) (error) { * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to delete the Invite resource from. * @param ChannelSid The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Invite resource to delete belongs to. This value can be the Channel resource's `sid` or `unique_name`. * @param Sid The SID of the Invite resource to delete. -*/ -func (c *DefaultApiService) DeleteInvite(ServiceSid string, ChannelSid string, Sid string, ) (error) { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Invites/{Sid}" + */ +func (c *DefaultApiService) DeleteInvite(ServiceSid string, ChannelSid string, Sid string) error { + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Invites/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + defer resp.Body.Close() - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() - - return nil + return nil } + // DeleteMemberParams Optional parameters for the method 'DeleteMember' type DeleteMemberParams struct { XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` @@ -727,30 +723,30 @@ type DeleteMemberParams struct { * @param Sid The SID of the Member resource to delete. This value can be either the Member's `sid` or its `identity` value. * @param optional nil or *DeleteMemberParams - Optional Parameters: * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header -*/ -func (c *DefaultApiService) DeleteMember(ServiceSid string, ChannelSid string, Sid string, params *DeleteMemberParams) (error) { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}" + */ +func (c *DefaultApiService) DeleteMember(ServiceSid string, ChannelSid string, Sid string, params *DeleteMemberParams) error { + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := make(map[string]interface{}) - + data := url.Values{} + headers := make(map[string]interface{}) if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } + // DeleteMessageParams Optional parameters for the method 'DeleteMessage' type DeleteMessageParams struct { XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` @@ -763,102 +759,95 @@ type DeleteMessageParams struct { * @param Sid The SID of the Message resource to delete. * @param optional nil or *DeleteMessageParams - Optional Parameters: * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header -*/ -func (c *DefaultApiService) DeleteMessage(ServiceSid string, ChannelSid string, Sid string, params *DeleteMessageParams) (error) { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}" + */ +func (c *DefaultApiService) DeleteMessage(ServiceSid string, ChannelSid string, Sid string, params *DeleteMessageParams) error { + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := make(map[string]interface{}) - + data := url.Values{} + headers := make(map[string]interface{}) if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* * DeleteRole Method for DeleteRole * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to delete the Role resource from. * @param Sid The SID of the Role resource to delete. -*/ -func (c *DefaultApiService) DeleteRole(ServiceSid string, Sid string, ) (error) { - path := "/v2/Services/{ServiceSid}/Roles/{Sid}" + */ +func (c *DefaultApiService) DeleteRole(ServiceSid string, Sid string) error { + path := "/v2/Services/{ServiceSid}/Roles/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* * DeleteService Method for DeleteService * @param Sid The SID of the Service resource to delete. -*/ -func (c *DefaultApiService) DeleteService(Sid string, ) (error) { - path := "/v2/Services/{Sid}" + */ +func (c *DefaultApiService) DeleteService(Sid string) error { + path := "/v2/Services/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* * DeleteUser Method for DeleteUser * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to delete the User resource from. * @param Sid The SID of the User resource to delete. This value can be either the `sid` or the `identity` of the User resource to delete. -*/ -func (c *DefaultApiService) DeleteUser(ServiceSid string, Sid string, ) (error) { - path := "/v2/Services/{ServiceSid}/Users/{Sid}" + */ +func (c *DefaultApiService) DeleteUser(ServiceSid string, Sid string) error { + path := "/v2/Services/{ServiceSid}/Users/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + defer resp.Body.Close() - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() - - return nil + return nil } /* @@ -866,26 +855,24 @@ func (c *DefaultApiService) DeleteUser(ServiceSid string, Sid string, ) (error) * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to delete the User Binding resource from. * @param UserSid The SID of the [User](https://www.twilio.com/docs/chat/rest/user-resource) with the User Binding resources to delete. See [push notification configuration](https://www.twilio.com/docs/chat/push-notification-configuration) for more info. * @param Sid The SID of the User Binding resource to delete. -*/ -func (c *DefaultApiService) DeleteUserBinding(ServiceSid string, UserSid string, Sid string, ) (error) { - path := "/v2/Services/{ServiceSid}/Users/{UserSid}/Bindings/{Sid}" + */ +func (c *DefaultApiService) DeleteUserBinding(ServiceSid string, UserSid string, Sid string) error { + path := "/v2/Services/{ServiceSid}/Users/{UserSid}/Bindings/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"UserSid"+"}", UserSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -894,26 +881,24 @@ func (c *DefaultApiService) DeleteUserBinding(ServiceSid string, UserSid string, * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to read the resources from. * @param UserSid The SID of the [User](https://www.twilio.com/docs/api/chat/rest/users) to read the User Channel resources from. * @param ChannelSid The SID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the resource belongs to. -*/ -func (c *DefaultApiService) DeleteUserChannel(ServiceSid string, UserSid string, ChannelSid string, ) (error) { - path := "/v2/Services/{ServiceSid}/Users/{UserSid}/Channels/{ChannelSid}" + */ +func (c *DefaultApiService) DeleteUserChannel(ServiceSid string, UserSid string, ChannelSid string) error { + path := "/v2/Services/{ServiceSid}/Users/{UserSid}/Channels/{ChannelSid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"UserSid"+"}", UserSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -921,30 +906,28 @@ func (c *DefaultApiService) DeleteUserChannel(ServiceSid string, UserSid string, * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to fetch the Binding resource from. * @param Sid The SID of the Binding resource to fetch. * @return ChatV2ServiceBinding -*/ -func (c *DefaultApiService) FetchBinding(ServiceSid string, Sid string, ) (*ChatV2ServiceBinding, error) { - path := "/v2/Services/{ServiceSid}/Bindings/{Sid}" + */ +func (c *DefaultApiService) FetchBinding(ServiceSid string, Sid string) (*ChatV2ServiceBinding, error) { + path := "/v2/Services/{ServiceSid}/Bindings/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ChatV2ServiceBinding{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ChatV2ServiceBinding{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -952,30 +935,28 @@ func (c *DefaultApiService) FetchBinding(ServiceSid string, Sid string, ) (*Chat * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to fetch the Channel resource from. * @param Sid The SID of the Channel resource to fetch. This value can be either the `sid` or the `unique_name` of the Channel resource to fetch. * @return ChatV2ServiceChannel -*/ -func (c *DefaultApiService) FetchChannel(ServiceSid string, Sid string, ) (*ChatV2ServiceChannel, error) { - path := "/v2/Services/{ServiceSid}/Channels/{Sid}" + */ +func (c *DefaultApiService) FetchChannel(ServiceSid string, Sid string) (*ChatV2ServiceChannel, error) { + path := "/v2/Services/{ServiceSid}/Channels/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ChatV2ServiceChannel{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ChatV2ServiceChannel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -984,60 +965,56 @@ func (c *DefaultApiService) FetchChannel(ServiceSid string, Sid string, ) (*Chat * @param ChannelSid The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Channel Webhook resource to fetch belongs to. This value can be the Channel resource's `sid` or `unique_name`. * @param Sid The SID of the Channel Webhook resource to fetch. * @return ChatV2ServiceChannelChannelWebhook -*/ -func (c *DefaultApiService) FetchChannelWebhook(ServiceSid string, ChannelSid string, Sid string, ) (*ChatV2ServiceChannelChannelWebhook, error) { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks/{Sid}" + */ +func (c *DefaultApiService) FetchChannelWebhook(ServiceSid string, ChannelSid string, Sid string) (*ChatV2ServiceChannelChannelWebhook, error) { + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ChatV2ServiceChannelChannelWebhook{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ChatV2ServiceChannelChannelWebhook{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * FetchCredential Method for FetchCredential * @param Sid The SID of the Credential resource to fetch. * @return ChatV2Credential -*/ -func (c *DefaultApiService) FetchCredential(Sid string, ) (*ChatV2Credential, error) { - path := "/v2/Credentials/{Sid}" + */ +func (c *DefaultApiService) FetchCredential(Sid string) (*ChatV2Credential, error) { + path := "/v2/Credentials/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ChatV2Credential{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ChatV2Credential{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -1046,31 +1023,29 @@ func (c *DefaultApiService) FetchCredential(Sid string, ) (*ChatV2Credential, er * @param ChannelSid The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Invite resource to fetch belongs to. This value can be the Channel resource's `sid` or `unique_name`. * @param Sid The SID of the Invite resource to fetch. * @return ChatV2ServiceChannelInvite -*/ -func (c *DefaultApiService) FetchInvite(ServiceSid string, ChannelSid string, Sid string, ) (*ChatV2ServiceChannelInvite, error) { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Invites/{Sid}" + */ +func (c *DefaultApiService) FetchInvite(ServiceSid string, ChannelSid string, Sid string) (*ChatV2ServiceChannelInvite, error) { + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Invites/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ChatV2ServiceChannelInvite{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ChatV2ServiceChannelInvite{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -1079,31 +1054,29 @@ func (c *DefaultApiService) FetchInvite(ServiceSid string, ChannelSid string, Si * @param ChannelSid The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Member resource to fetch belongs to. This value can be the Channel resource's `sid` or `unique_name`. * @param Sid The SID of the Member resource to fetch. This value can be either the Member's `sid` or its `identity` value. * @return ChatV2ServiceChannelMember -*/ -func (c *DefaultApiService) FetchMember(ServiceSid string, ChannelSid string, Sid string, ) (*ChatV2ServiceChannelMember, error) { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}" + */ +func (c *DefaultApiService) FetchMember(ServiceSid string, ChannelSid string, Sid string) (*ChatV2ServiceChannelMember, error) { + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ChatV2ServiceChannelMember{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ChatV2ServiceChannelMember{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -1112,31 +1085,29 @@ func (c *DefaultApiService) FetchMember(ServiceSid string, ChannelSid string, Si * @param ChannelSid The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Message resource to fetch belongs to. This value can be the Channel resource's `sid` or `unique_name`. * @param Sid The SID of the Message resource to fetch. * @return ChatV2ServiceChannelMessage -*/ -func (c *DefaultApiService) FetchMessage(ServiceSid string, ChannelSid string, Sid string, ) (*ChatV2ServiceChannelMessage, error) { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}" + */ +func (c *DefaultApiService) FetchMessage(ServiceSid string, ChannelSid string, Sid string) (*ChatV2ServiceChannelMessage, error) { + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ChatV2ServiceChannelMessage{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ChatV2ServiceChannelMessage{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -1144,59 +1115,55 @@ func (c *DefaultApiService) FetchMessage(ServiceSid string, ChannelSid string, S * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to fetch the Role resource from. * @param Sid The SID of the Role resource to fetch. * @return ChatV2ServiceRole -*/ -func (c *DefaultApiService) FetchRole(ServiceSid string, Sid string, ) (*ChatV2ServiceRole, error) { - path := "/v2/Services/{ServiceSid}/Roles/{Sid}" + */ +func (c *DefaultApiService) FetchRole(ServiceSid string, Sid string) (*ChatV2ServiceRole, error) { + path := "/v2/Services/{ServiceSid}/Roles/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &ChatV2ServiceRole{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ChatV2ServiceRole{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * FetchService Method for FetchService * @param Sid The SID of the Service resource to fetch. * @return ChatV2Service -*/ -func (c *DefaultApiService) FetchService(Sid string, ) (*ChatV2Service, error) { - path := "/v2/Services/{Sid}" + */ +func (c *DefaultApiService) FetchService(Sid string) (*ChatV2Service, error) { + path := "/v2/Services/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &ChatV2Service{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ChatV2Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -1204,30 +1171,28 @@ func (c *DefaultApiService) FetchService(Sid string, ) (*ChatV2Service, error) { * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to fetch the User resource from. * @param Sid The SID of the User resource to fetch. This value can be either the `sid` or the `identity` of the User resource to fetch. * @return ChatV2ServiceUser -*/ -func (c *DefaultApiService) FetchUser(ServiceSid string, Sid string, ) (*ChatV2ServiceUser, error) { - path := "/v2/Services/{ServiceSid}/Users/{Sid}" + */ +func (c *DefaultApiService) FetchUser(ServiceSid string, Sid string) (*ChatV2ServiceUser, error) { + path := "/v2/Services/{ServiceSid}/Users/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &ChatV2ServiceUser{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ChatV2ServiceUser{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -1236,31 +1201,29 @@ func (c *DefaultApiService) FetchUser(ServiceSid string, Sid string, ) (*ChatV2S * @param UserSid The SID of the [User](https://www.twilio.com/docs/chat/rest/user-resource) with the User Binding resource to fetch. See [push notification configuration](https://www.twilio.com/docs/chat/push-notification-configuration) for more info. * @param Sid The SID of the User Binding resource to fetch. * @return ChatV2ServiceUserUserBinding -*/ -func (c *DefaultApiService) FetchUserBinding(ServiceSid string, UserSid string, Sid string, ) (*ChatV2ServiceUserUserBinding, error) { - path := "/v2/Services/{ServiceSid}/Users/{UserSid}/Bindings/{Sid}" + */ +func (c *DefaultApiService) FetchUserBinding(ServiceSid string, UserSid string, Sid string) (*ChatV2ServiceUserUserBinding, error) { + path := "/v2/Services/{ServiceSid}/Users/{UserSid}/Bindings/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"UserSid"+"}", UserSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &ChatV2ServiceUserUserBinding{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ChatV2ServiceUserUserBinding{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -1269,37 +1232,36 @@ func (c *DefaultApiService) FetchUserBinding(ServiceSid string, UserSid string, * @param UserSid The SID of the [User](https://www.twilio.com/docs/chat/rest/user-resource) to fetch the User Channel resource from. This value can be either the `sid` or the `identity` of the User resource. * @param ChannelSid The SID of the [Channel](https://www.twilio.com/docs/chat/channels) that has the User Channel to fetch. This value can be either the `sid` or the `unique_name` of the Channel to fetch. * @return ChatV2ServiceUserUserChannel -*/ -func (c *DefaultApiService) FetchUserChannel(ServiceSid string, UserSid string, ChannelSid string, ) (*ChatV2ServiceUserUserChannel, error) { - path := "/v2/Services/{ServiceSid}/Users/{UserSid}/Channels/{ChannelSid}" + */ +func (c *DefaultApiService) FetchUserChannel(ServiceSid string, UserSid string, ChannelSid string) (*ChatV2ServiceUserUserChannel, error) { + path := "/v2/Services/{ServiceSid}/Users/{UserSid}/Channels/{ChannelSid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"UserSid"+"}", UserSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ChatV2ServiceUserUserChannel{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ChatV2ServiceUserUserChannel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListBindingParams Optional parameters for the method 'ListBinding' type ListBindingParams struct { BindingType *[]string `json:"BindingType,omitempty"` - Identity *[]string `json:"Identity,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + Identity *[]string `json:"Identity,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -1310,43 +1272,43 @@ type ListBindingParams struct { * @param "Identity" ([]string) - The [User](https://www.twilio.com/docs/chat/rest/user-resource)'s `identity` value of the resources to read. See [access tokens](https://www.twilio.com/docs/chat/create-tokens) for more details. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListBindingResponse -*/ + */ func (c *DefaultApiService) ListBinding(ServiceSid string, params *ListBindingParams) (*ListBindingResponse, error) { - path := "/v2/Services/{ServiceSid}/Bindings" + path := "/v2/Services/{ServiceSid}/Bindings" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.BindingType != nil { - data.Set("BindingType", strings.Join(*params.BindingType, ",")) -} - if params != nil && params.Identity != nil { - data.Set("Identity", strings.Join(*params.Identity, ",")) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.BindingType != nil { + data.Set("BindingType", strings.Join(*params.BindingType, ",")) + } + if params != nil && params.Identity != nil { + data.Set("Identity", strings.Join(*params.Identity, ",")) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListBindingResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListBindingResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListChannelParams Optional parameters for the method 'ListChannel' type ListChannelParams struct { - Type *[]string `json:"Type,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + Type *[]string `json:"Type,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -1356,36 +1318,36 @@ type ListChannelParams struct { * @param "Type" ([]string) - The visibility of the Channels to read. Can be: `public` or `private` and defaults to `public`. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListChannelResponse -*/ + */ func (c *DefaultApiService) ListChannel(ServiceSid string, params *ListChannelParams) (*ListChannelResponse, error) { - path := "/v2/Services/{ServiceSid}/Channels" + path := "/v2/Services/{ServiceSid}/Channels" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Type != nil { - data.Set("Type", strings.Join(*params.Type, ",")) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.Type != nil { + data.Set("Type", strings.Join(*params.Type, ",")) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListChannelResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListChannelResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListChannelWebhookParams Optional parameters for the method 'ListChannelWebhook' type ListChannelWebhookParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1398,34 +1360,34 @@ type ListChannelWebhookParams struct { * @param optional nil or *ListChannelWebhookParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListChannelWebhookResponse -*/ + */ func (c *DefaultApiService) ListChannelWebhook(ServiceSid string, ChannelSid string, params *ListChannelWebhookParams) (*ListChannelWebhookResponse, error) { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks" + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListChannelWebhookResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListChannelWebhookResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListCredentialParams Optional parameters for the method 'ListCredential' type ListCredentialParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1436,36 +1398,36 @@ type ListCredentialParams struct { * @param optional nil or *ListCredentialParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListCredentialResponse -*/ + */ func (c *DefaultApiService) ListCredential(params *ListCredentialParams) (*ListCredentialResponse, error) { - path := "/v2/Credentials" - - data := url.Values{} - headers := 0 + path := "/v2/Credentials" - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListCredentialResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListCredentialResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListInviteParams Optional parameters for the method 'ListInvite' type ListInviteParams struct { Identity *[]string `json:"Identity,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -1476,41 +1438,41 @@ type ListInviteParams struct { * @param "Identity" ([]string) - The [User](https://www.twilio.com/docs/chat/rest/user-resource)'s `identity` value of the resources to read. See [access tokens](https://www.twilio.com/docs/chat/create-tokens) for more details. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListInviteResponse -*/ + */ func (c *DefaultApiService) ListInvite(ServiceSid string, ChannelSid string, params *ListInviteParams) (*ListInviteResponse, error) { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Invites" + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Invites" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Identity != nil { - data.Set("Identity", strings.Join(*params.Identity, ",")) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.Identity != nil { + data.Set("Identity", strings.Join(*params.Identity, ",")) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListInviteResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListInviteResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListMemberParams Optional parameters for the method 'ListMember' type ListMemberParams struct { Identity *[]string `json:"Identity,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -1521,41 +1483,41 @@ type ListMemberParams struct { * @param "Identity" ([]string) - The [User](https://www.twilio.com/docs/chat/rest/user-resource)'s `identity` value of the Member resources to read. See [access tokens](https://www.twilio.com/docs/chat/create-tokens) for more details. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListMemberResponse -*/ + */ func (c *DefaultApiService) ListMember(ServiceSid string, ChannelSid string, params *ListMemberParams) (*ListMemberResponse, error) { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members" + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Identity != nil { - data.Set("Identity", strings.Join(*params.Identity, ",")) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.Identity != nil { + data.Set("Identity", strings.Join(*params.Identity, ",")) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListMemberResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListMemberResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListMessageParams Optional parameters for the method 'ListMessage' type ListMessageParams struct { - Order *string `json:"Order,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + Order *string `json:"Order,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -1566,37 +1528,37 @@ type ListMessageParams struct { * @param "Order" (string) - The sort order of the returned messages. Can be: `asc` (ascending) or `desc` (descending) with `asc` as the default. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListMessageResponse -*/ + */ func (c *DefaultApiService) ListMessage(ServiceSid string, ChannelSid string, params *ListMessageParams) (*ListMessageResponse, error) { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages" + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Order != nil { - data.Set("Order", *params.Order) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.Order != nil { + data.Set("Order", *params.Order) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListMessageResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListMessageResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListRoleParams Optional parameters for the method 'ListRole' type ListRoleParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1608,33 +1570,33 @@ type ListRoleParams struct { * @param optional nil or *ListRoleParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListRoleResponse -*/ + */ func (c *DefaultApiService) ListRole(ServiceSid string, params *ListRoleParams) (*ListRoleResponse, error) { - path := "/v2/Services/{ServiceSid}/Roles" + path := "/v2/Services/{ServiceSid}/Roles" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListRoleResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListRoleResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListServiceParams Optional parameters for the method 'ListService' type ListServiceParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1645,32 +1607,32 @@ type ListServiceParams struct { * @param optional nil or *ListServiceParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListServiceResponse -*/ + */ func (c *DefaultApiService) ListService(params *ListServiceParams) (*ListServiceResponse, error) { - path := "/v2/Services" + path := "/v2/Services" - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListServiceResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListServiceResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListUserParams Optional parameters for the method 'ListUser' type ListUserParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1682,37 +1644,37 @@ type ListUserParams struct { * @param optional nil or *ListUserParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListUserResponse -*/ + */ func (c *DefaultApiService) ListUser(ServiceSid string, params *ListUserParams) (*ListUserResponse, error) { - path := "/v2/Services/{ServiceSid}/Users" + path := "/v2/Services/{ServiceSid}/Users" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListUserResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListUserResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListUserBindingParams Optional parameters for the method 'ListUserBinding' type ListUserBindingParams struct { BindingType *[]string `json:"BindingType,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -1723,37 +1685,37 @@ type ListUserBindingParams struct { * @param "BindingType" ([]string) - The push technology used by the User Binding resources to read. Can be: `apn`, `gcm`, or `fcm`. See [push notification configuration](https://www.twilio.com/docs/chat/push-notification-configuration) for more info. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListUserBindingResponse -*/ + */ func (c *DefaultApiService) ListUserBinding(ServiceSid string, UserSid string, params *ListUserBindingParams) (*ListUserBindingResponse, error) { - path := "/v2/Services/{ServiceSid}/Users/{UserSid}/Bindings" + path := "/v2/Services/{ServiceSid}/Users/{UserSid}/Bindings" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"UserSid"+"}", UserSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.BindingType != nil { - data.Set("BindingType", strings.Join(*params.BindingType, ",")) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.BindingType != nil { + data.Set("BindingType", strings.Join(*params.BindingType, ",")) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListUserBindingResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListUserBindingResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListUserChannelParams Optional parameters for the method 'ListUserChannel' type ListUserChannelParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1767,43 +1729,43 @@ type ListUserChannelParams struct { * @param optional nil or *ListUserChannelParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListUserChannelResponse -*/ + */ func (c *DefaultApiService) ListUserChannel(ServiceSid string, UserSid string, params *ListUserChannelParams) (*ListUserChannelResponse, error) { - path := "/v2/Services/{ServiceSid}/Users/{UserSid}/Channels" + path := "/v2/Services/{ServiceSid}/Users/{UserSid}/Channels" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"UserSid"+"}", UserSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListUserChannelResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListUserChannelResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateChannelParams Optional parameters for the method 'UpdateChannel' type UpdateChannelParams struct { - XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - CreatedBy *string `json:"CreatedBy,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + CreatedBy *string `json:"CreatedBy,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` } /* @@ -1819,60 +1781,61 @@ type UpdateChannelParams struct { * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It can be up to 256 characters long. * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. This value must be 256 characters or less in length and unique within the Service. * @return ChatV2ServiceChannel -*/ + */ func (c *DefaultApiService) UpdateChannel(ServiceSid string, Sid string, params *UpdateChannelParams) (*ChatV2ServiceChannel, error) { - path := "/v2/Services/{ServiceSid}/Channels/{Sid}" + path := "/v2/Services/{ServiceSid}/Channels/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) -} - if params != nil && params.CreatedBy != nil { - data.Set("CreatedBy", *params.CreatedBy) -} - if params != nil && params.DateCreated != nil { - data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) -} - if params != nil && params.DateUpdated != nil { - data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) -} + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.CreatedBy != nil { + data.Set("CreatedBy", *params.CreatedBy) + } + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) + } + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ChatV2ServiceChannel{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ChatV2ServiceChannel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateChannelWebhookParams Optional parameters for the method 'UpdateChannelWebhook' type UpdateChannelWebhookParams struct { - ConfigurationFilters *[]string `json:"Configuration.Filters,omitempty"` - ConfigurationFlowSid *string `json:"Configuration.FlowSid,omitempty"` - ConfigurationMethod *string `json:"Configuration.Method,omitempty"` - ConfigurationRetryCount *int32 `json:"Configuration.RetryCount,omitempty"` - ConfigurationTriggers *[]string `json:"Configuration.Triggers,omitempty"` - ConfigurationUrl *string `json:"Configuration.Url,omitempty"` + ConfigurationFilters *[]string `json:"Configuration.Filters,omitempty"` + ConfigurationFlowSid *string `json:"Configuration.FlowSid,omitempty"` + ConfigurationMethod *string `json:"Configuration.Method,omitempty"` + ConfigurationRetryCount *int32 `json:"Configuration.RetryCount,omitempty"` + ConfigurationTriggers *[]string `json:"Configuration.Triggers,omitempty"` + ConfigurationUrl *string `json:"Configuration.Url,omitempty"` } /* @@ -1888,58 +1851,58 @@ type UpdateChannelWebhookParams struct { * @param "ConfigurationTriggers" ([]string) - A string that will cause us to call the webhook when it is present in a message body. This parameter takes only one trigger string. To specify more than one, repeat this parameter for each trigger string up to a total of 5 trigger strings. Used only when `type` = `trigger`. * @param "ConfigurationUrl" (string) - The URL of the webhook to call using the `configuration.method`. * @return ChatV2ServiceChannelChannelWebhook -*/ + */ func (c *DefaultApiService) UpdateChannelWebhook(ServiceSid string, ChannelSid string, Sid string, params *UpdateChannelWebhookParams) (*ChatV2ServiceChannelChannelWebhook, error) { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks/{Sid}" + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.ConfigurationFilters != nil { - data.Set("ConfigurationFilters", strings.Join(*params.ConfigurationFilters, ",")) -} - if params != nil && params.ConfigurationFlowSid != nil { - data.Set("ConfigurationFlowSid", *params.ConfigurationFlowSid) -} - if params != nil && params.ConfigurationMethod != nil { - data.Set("ConfigurationMethod", *params.ConfigurationMethod) -} - if params != nil && params.ConfigurationRetryCount != nil { - data.Set("ConfigurationRetryCount", fmt.Sprint(*params.ConfigurationRetryCount)) -} - if params != nil && params.ConfigurationTriggers != nil { - data.Set("ConfigurationTriggers", strings.Join(*params.ConfigurationTriggers, ",")) -} - if params != nil && params.ConfigurationUrl != nil { - data.Set("ConfigurationUrl", *params.ConfigurationUrl) -} + data := url.Values{} + headers := 0 + if params != nil && params.ConfigurationFilters != nil { + data.Set("ConfigurationFilters", strings.Join(*params.ConfigurationFilters, ",")) + } + if params != nil && params.ConfigurationFlowSid != nil { + data.Set("ConfigurationFlowSid", *params.ConfigurationFlowSid) + } + if params != nil && params.ConfigurationMethod != nil { + data.Set("ConfigurationMethod", *params.ConfigurationMethod) + } + if params != nil && params.ConfigurationRetryCount != nil { + data.Set("ConfigurationRetryCount", fmt.Sprint(*params.ConfigurationRetryCount)) + } + if params != nil && params.ConfigurationTriggers != nil { + data.Set("ConfigurationTriggers", strings.Join(*params.ConfigurationTriggers, ",")) + } + if params != nil && params.ConfigurationUrl != nil { + data.Set("ConfigurationUrl", *params.ConfigurationUrl) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ChatV2ServiceChannelChannelWebhook{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ChatV2ServiceChannelChannelWebhook{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateCredentialParams Optional parameters for the method 'UpdateCredential' type UpdateCredentialParams struct { - ApiKey *string `json:"ApiKey,omitempty"` - Certificate *string `json:"Certificate,omitempty"` + ApiKey *string `json:"ApiKey,omitempty"` + Certificate *string `json:"Certificate,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` - PrivateKey *string `json:"PrivateKey,omitempty"` - Sandbox *bool `json:"Sandbox,omitempty"` - Secret *string `json:"Secret,omitempty"` + PrivateKey *string `json:"PrivateKey,omitempty"` + Sandbox *bool `json:"Sandbox,omitempty"` + Secret *string `json:"Secret,omitempty"` } /* @@ -1953,57 +1916,57 @@ type UpdateCredentialParams struct { * @param "Sandbox" (bool) - [APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production. * @param "Secret" (string) - [FCM only] The **Server key** of your project from the Firebase console, found under Settings / Cloud messaging. * @return ChatV2Credential -*/ + */ func (c *DefaultApiService) UpdateCredential(Sid string, params *UpdateCredentialParams) (*ChatV2Credential, error) { - path := "/v2/Credentials/{Sid}" + path := "/v2/Credentials/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.ApiKey != nil { - data.Set("ApiKey", *params.ApiKey) -} - if params != nil && params.Certificate != nil { - data.Set("Certificate", *params.Certificate) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.PrivateKey != nil { - data.Set("PrivateKey", *params.PrivateKey) -} - if params != nil && params.Sandbox != nil { - data.Set("Sandbox", fmt.Sprint(*params.Sandbox)) -} - if params != nil && params.Secret != nil { - data.Set("Secret", *params.Secret) -} + data := url.Values{} + headers := 0 + if params != nil && params.ApiKey != nil { + data.Set("ApiKey", *params.ApiKey) + } + if params != nil && params.Certificate != nil { + data.Set("Certificate", *params.Certificate) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.PrivateKey != nil { + data.Set("PrivateKey", *params.PrivateKey) + } + if params != nil && params.Sandbox != nil { + data.Set("Sandbox", fmt.Sprint(*params.Sandbox)) + } + if params != nil && params.Secret != nil { + data.Set("Secret", *params.Secret) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ChatV2Credential{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ChatV2Credential{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateMemberParams Optional parameters for the method 'UpdateMember' type UpdateMemberParams struct { - XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` LastConsumptionTimestamp *time.Time `json:"LastConsumptionTimestamp,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` } /* @@ -2020,62 +1983,63 @@ type UpdateMemberParams struct { * @param "LastConsumptionTimestamp" (time.Time) - The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) read event for the Member within the [Channel](https://www.twilio.com/docs/chat/channels). * @param "RoleSid" (string) - The SID of the [Role](https://www.twilio.com/docs/chat/rest/role-resource) to assign to the member. The default roles are those specified on the [Service](https://www.twilio.com/docs/chat/rest/service-resource). * @return ChatV2ServiceChannelMember -*/ + */ func (c *DefaultApiService) UpdateMember(ServiceSid string, ChannelSid string, Sid string, params *UpdateMemberParams) (*ChatV2ServiceChannelMember, error) { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}" + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) -} - if params != nil && params.DateCreated != nil { - data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) -} - if params != nil && params.DateUpdated != nil { - data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) -} - if params != nil && params.LastConsumedMessageIndex != nil { - data.Set("LastConsumedMessageIndex", fmt.Sprint(*params.LastConsumedMessageIndex)) -} - if params != nil && params.LastConsumptionTimestamp != nil { - data.Set("LastConsumptionTimestamp", fmt.Sprint(*params.LastConsumptionTimestamp)) -} - if params != nil && params.RoleSid != nil { - data.Set("RoleSid", *params.RoleSid) -} + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) + } + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) + } + if params != nil && params.LastConsumedMessageIndex != nil { + data.Set("LastConsumedMessageIndex", fmt.Sprint(*params.LastConsumedMessageIndex)) + } + if params != nil && params.LastConsumptionTimestamp != nil { + data.Set("LastConsumptionTimestamp", fmt.Sprint(*params.LastConsumptionTimestamp)) + } + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) + } if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ChatV2ServiceChannelMember{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ChatV2ServiceChannelMember{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateMessageParams Optional parameters for the method 'UpdateMessage' type UpdateMessageParams struct { - XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - Body *string `json:"Body,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - From *string `json:"From,omitempty"` - LastUpdatedBy *string `json:"LastUpdatedBy,omitempty"` + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + Body *string `json:"Body,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + From *string `json:"From,omitempty"` + LastUpdatedBy *string `json:"LastUpdatedBy,omitempty"` } /* @@ -2092,53 +2056,54 @@ type UpdateMessageParams struct { * @param "From" (string) - The [Identity](https://www.twilio.com/docs/chat/identity) of the message's author. * @param "LastUpdatedBy" (string) - The [Identity](https://www.twilio.com/docs/chat/identity) of the User who last updated the Message, if applicable. * @return ChatV2ServiceChannelMessage -*/ + */ func (c *DefaultApiService) UpdateMessage(ServiceSid string, ChannelSid string, Sid string, params *UpdateMessageParams) (*ChatV2ServiceChannelMessage, error) { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}" + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) -} - if params != nil && params.Body != nil { - data.Set("Body", *params.Body) -} - if params != nil && params.DateCreated != nil { - data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) -} - if params != nil && params.DateUpdated != nil { - data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) -} - if params != nil && params.From != nil { - data.Set("From", *params.From) -} - if params != nil && params.LastUpdatedBy != nil { - data.Set("LastUpdatedBy", *params.LastUpdatedBy) -} + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.Body != nil { + data.Set("Body", *params.Body) + } + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) + } + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) + } + if params != nil && params.From != nil { + data.Set("From", *params.From) + } + if params != nil && params.LastUpdatedBy != nil { + data.Set("LastUpdatedBy", *params.LastUpdatedBy) + } if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ChatV2ServiceChannelMessage{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ChatV2ServiceChannelMessage{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateRoleParams Optional parameters for the method 'UpdateRole' type UpdateRoleParams struct { Permission *[]string `json:"Permission,omitempty"` @@ -2151,67 +2116,67 @@ type UpdateRoleParams struct { * @param optional nil or *UpdateRoleParams - Optional Parameters: * @param "Permission" ([]string) - A permission that you grant to the role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. Note that the update action replaces all previously assigned permissions with those defined in the update action. To remove a permission, do not include it in the subsequent update action. The values for this parameter depend on the role's `type`. * @return ChatV2ServiceRole -*/ + */ func (c *DefaultApiService) UpdateRole(ServiceSid string, Sid string, params *UpdateRoleParams) (*ChatV2ServiceRole, error) { - path := "/v2/Services/{ServiceSid}/Roles/{Sid}" + path := "/v2/Services/{ServiceSid}/Roles/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Permission != nil { - data.Set("Permission", strings.Join(*params.Permission, ",")) -} + data := url.Values{} + headers := 0 + if params != nil && params.Permission != nil { + data.Set("Permission", strings.Join(*params.Permission, ",")) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ChatV2ServiceRole{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ChatV2ServiceRole{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateServiceParams Optional parameters for the method 'UpdateService' type UpdateServiceParams struct { - ConsumptionReportInterval *int32 `json:"ConsumptionReportInterval,omitempty"` - DefaultChannelCreatorRoleSid *string `json:"DefaultChannelCreatorRoleSid,omitempty"` - DefaultChannelRoleSid *string `json:"DefaultChannelRoleSid,omitempty"` - DefaultServiceRoleSid *string `json:"DefaultServiceRoleSid,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - LimitsChannelMembers *int32 `json:"Limits.ChannelMembers,omitempty"` - LimitsUserChannels *int32 `json:"Limits.UserChannels,omitempty"` - MediaCompatibilityMessage *string `json:"Media.CompatibilityMessage,omitempty"` - NotificationsAddedToChannelEnabled *bool `json:"Notifications.AddedToChannel.Enabled,omitempty"` - NotificationsAddedToChannelSound *string `json:"Notifications.AddedToChannel.Sound,omitempty"` - NotificationsAddedToChannelTemplate *string `json:"Notifications.AddedToChannel.Template,omitempty"` - NotificationsInvitedToChannelEnabled *bool `json:"Notifications.InvitedToChannel.Enabled,omitempty"` - NotificationsInvitedToChannelSound *string `json:"Notifications.InvitedToChannel.Sound,omitempty"` - NotificationsInvitedToChannelTemplate *string `json:"Notifications.InvitedToChannel.Template,omitempty"` - NotificationsLogEnabled *bool `json:"Notifications.LogEnabled,omitempty"` - NotificationsNewMessageBadgeCountEnabled *bool `json:"Notifications.NewMessage.BadgeCountEnabled,omitempty"` - NotificationsNewMessageEnabled *bool `json:"Notifications.NewMessage.Enabled,omitempty"` - NotificationsNewMessageSound *string `json:"Notifications.NewMessage.Sound,omitempty"` - NotificationsNewMessageTemplate *string `json:"Notifications.NewMessage.Template,omitempty"` - NotificationsRemovedFromChannelEnabled *bool `json:"Notifications.RemovedFromChannel.Enabled,omitempty"` - NotificationsRemovedFromChannelSound *string `json:"Notifications.RemovedFromChannel.Sound,omitempty"` - NotificationsRemovedFromChannelTemplate *string `json:"Notifications.RemovedFromChannel.Template,omitempty"` - PostWebhookRetryCount *int32 `json:"PostWebhookRetryCount,omitempty"` - PostWebhookUrl *string `json:"PostWebhookUrl,omitempty"` - PreWebhookRetryCount *int32 `json:"PreWebhookRetryCount,omitempty"` - PreWebhookUrl *string `json:"PreWebhookUrl,omitempty"` - ReachabilityEnabled *bool `json:"ReachabilityEnabled,omitempty"` - ReadStatusEnabled *bool `json:"ReadStatusEnabled,omitempty"` - TypingIndicatorTimeout *int32 `json:"TypingIndicatorTimeout,omitempty"` - WebhookFilters *[]string `json:"WebhookFilters,omitempty"` - WebhookMethod *string `json:"WebhookMethod,omitempty"` + ConsumptionReportInterval *int32 `json:"ConsumptionReportInterval,omitempty"` + DefaultChannelCreatorRoleSid *string `json:"DefaultChannelCreatorRoleSid,omitempty"` + DefaultChannelRoleSid *string `json:"DefaultChannelRoleSid,omitempty"` + DefaultServiceRoleSid *string `json:"DefaultServiceRoleSid,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + LimitsChannelMembers *int32 `json:"Limits.ChannelMembers,omitempty"` + LimitsUserChannels *int32 `json:"Limits.UserChannels,omitempty"` + MediaCompatibilityMessage *string `json:"Media.CompatibilityMessage,omitempty"` + NotificationsAddedToChannelEnabled *bool `json:"Notifications.AddedToChannel.Enabled,omitempty"` + NotificationsAddedToChannelSound *string `json:"Notifications.AddedToChannel.Sound,omitempty"` + NotificationsAddedToChannelTemplate *string `json:"Notifications.AddedToChannel.Template,omitempty"` + NotificationsInvitedToChannelEnabled *bool `json:"Notifications.InvitedToChannel.Enabled,omitempty"` + NotificationsInvitedToChannelSound *string `json:"Notifications.InvitedToChannel.Sound,omitempty"` + NotificationsInvitedToChannelTemplate *string `json:"Notifications.InvitedToChannel.Template,omitempty"` + NotificationsLogEnabled *bool `json:"Notifications.LogEnabled,omitempty"` + NotificationsNewMessageBadgeCountEnabled *bool `json:"Notifications.NewMessage.BadgeCountEnabled,omitempty"` + NotificationsNewMessageEnabled *bool `json:"Notifications.NewMessage.Enabled,omitempty"` + NotificationsNewMessageSound *string `json:"Notifications.NewMessage.Sound,omitempty"` + NotificationsNewMessageTemplate *string `json:"Notifications.NewMessage.Template,omitempty"` + NotificationsRemovedFromChannelEnabled *bool `json:"Notifications.RemovedFromChannel.Enabled,omitempty"` + NotificationsRemovedFromChannelSound *string `json:"Notifications.RemovedFromChannel.Sound,omitempty"` + NotificationsRemovedFromChannelTemplate *string `json:"Notifications.RemovedFromChannel.Template,omitempty"` + PostWebhookRetryCount *int32 `json:"PostWebhookRetryCount,omitempty"` + PostWebhookUrl *string `json:"PostWebhookUrl,omitempty"` + PreWebhookRetryCount *int32 `json:"PreWebhookRetryCount,omitempty"` + PreWebhookUrl *string `json:"PreWebhookUrl,omitempty"` + ReachabilityEnabled *bool `json:"ReachabilityEnabled,omitempty"` + ReadStatusEnabled *bool `json:"ReadStatusEnabled,omitempty"` + TypingIndicatorTimeout *int32 `json:"TypingIndicatorTimeout,omitempty"` + WebhookFilters *[]string `json:"WebhookFilters,omitempty"` + WebhookMethod *string `json:"WebhookMethod,omitempty"` } /* @@ -2250,129 +2215,129 @@ type UpdateServiceParams struct { * @param "WebhookFilters" ([]string) - The list of webhook events that are enabled for this Service instance. See [Webhook Events](https://www.twilio.com/docs/chat/webhook-events) for more details. * @param "WebhookMethod" (string) - The HTTP method to use for calls to the `pre_webhook_url` and `post_webhook_url` webhooks. Can be: `POST` or `GET` and the default is `POST`. See [Webhook Events](https://www.twilio.com/docs/chat/webhook-events) for more details. * @return ChatV2Service -*/ + */ func (c *DefaultApiService) UpdateService(Sid string, params *UpdateServiceParams) (*ChatV2Service, error) { - path := "/v2/Services/{Sid}" + path := "/v2/Services/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.ConsumptionReportInterval != nil { - data.Set("ConsumptionReportInterval", fmt.Sprint(*params.ConsumptionReportInterval)) -} - if params != nil && params.DefaultChannelCreatorRoleSid != nil { - data.Set("DefaultChannelCreatorRoleSid", *params.DefaultChannelCreatorRoleSid) -} - if params != nil && params.DefaultChannelRoleSid != nil { - data.Set("DefaultChannelRoleSid", *params.DefaultChannelRoleSid) -} - if params != nil && params.DefaultServiceRoleSid != nil { - data.Set("DefaultServiceRoleSid", *params.DefaultServiceRoleSid) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.LimitsChannelMembers != nil { - data.Set("LimitsChannelMembers", fmt.Sprint(*params.LimitsChannelMembers)) -} - if params != nil && params.LimitsUserChannels != nil { - data.Set("LimitsUserChannels", fmt.Sprint(*params.LimitsUserChannels)) -} - if params != nil && params.MediaCompatibilityMessage != nil { - data.Set("MediaCompatibilityMessage", *params.MediaCompatibilityMessage) -} - if params != nil && params.NotificationsAddedToChannelEnabled != nil { - data.Set("NotificationsAddedToChannelEnabled", fmt.Sprint(*params.NotificationsAddedToChannelEnabled)) -} - if params != nil && params.NotificationsAddedToChannelSound != nil { - data.Set("NotificationsAddedToChannelSound", *params.NotificationsAddedToChannelSound) -} - if params != nil && params.NotificationsAddedToChannelTemplate != nil { - data.Set("NotificationsAddedToChannelTemplate", *params.NotificationsAddedToChannelTemplate) -} - if params != nil && params.NotificationsInvitedToChannelEnabled != nil { - data.Set("NotificationsInvitedToChannelEnabled", fmt.Sprint(*params.NotificationsInvitedToChannelEnabled)) -} - if params != nil && params.NotificationsInvitedToChannelSound != nil { - data.Set("NotificationsInvitedToChannelSound", *params.NotificationsInvitedToChannelSound) -} - if params != nil && params.NotificationsInvitedToChannelTemplate != nil { - data.Set("NotificationsInvitedToChannelTemplate", *params.NotificationsInvitedToChannelTemplate) -} - if params != nil && params.NotificationsLogEnabled != nil { - data.Set("NotificationsLogEnabled", fmt.Sprint(*params.NotificationsLogEnabled)) -} - if params != nil && params.NotificationsNewMessageBadgeCountEnabled != nil { - data.Set("NotificationsNewMessageBadgeCountEnabled", fmt.Sprint(*params.NotificationsNewMessageBadgeCountEnabled)) -} - if params != nil && params.NotificationsNewMessageEnabled != nil { - data.Set("NotificationsNewMessageEnabled", fmt.Sprint(*params.NotificationsNewMessageEnabled)) -} - if params != nil && params.NotificationsNewMessageSound != nil { - data.Set("NotificationsNewMessageSound", *params.NotificationsNewMessageSound) -} - if params != nil && params.NotificationsNewMessageTemplate != nil { - data.Set("NotificationsNewMessageTemplate", *params.NotificationsNewMessageTemplate) -} - if params != nil && params.NotificationsRemovedFromChannelEnabled != nil { - data.Set("NotificationsRemovedFromChannelEnabled", fmt.Sprint(*params.NotificationsRemovedFromChannelEnabled)) -} - if params != nil && params.NotificationsRemovedFromChannelSound != nil { - data.Set("NotificationsRemovedFromChannelSound", *params.NotificationsRemovedFromChannelSound) -} - if params != nil && params.NotificationsRemovedFromChannelTemplate != nil { - data.Set("NotificationsRemovedFromChannelTemplate", *params.NotificationsRemovedFromChannelTemplate) -} - if params != nil && params.PostWebhookRetryCount != nil { - data.Set("PostWebhookRetryCount", fmt.Sprint(*params.PostWebhookRetryCount)) -} - if params != nil && params.PostWebhookUrl != nil { - data.Set("PostWebhookUrl", *params.PostWebhookUrl) -} - if params != nil && params.PreWebhookRetryCount != nil { - data.Set("PreWebhookRetryCount", fmt.Sprint(*params.PreWebhookRetryCount)) -} - if params != nil && params.PreWebhookUrl != nil { - data.Set("PreWebhookUrl", *params.PreWebhookUrl) -} - if params != nil && params.ReachabilityEnabled != nil { - data.Set("ReachabilityEnabled", fmt.Sprint(*params.ReachabilityEnabled)) -} - if params != nil && params.ReadStatusEnabled != nil { - data.Set("ReadStatusEnabled", fmt.Sprint(*params.ReadStatusEnabled)) -} - if params != nil && params.TypingIndicatorTimeout != nil { - data.Set("TypingIndicatorTimeout", fmt.Sprint(*params.TypingIndicatorTimeout)) -} - if params != nil && params.WebhookFilters != nil { - data.Set("WebhookFilters", strings.Join(*params.WebhookFilters, ",")) -} - if params != nil && params.WebhookMethod != nil { - data.Set("WebhookMethod", *params.WebhookMethod) -} + data := url.Values{} + headers := 0 + if params != nil && params.ConsumptionReportInterval != nil { + data.Set("ConsumptionReportInterval", fmt.Sprint(*params.ConsumptionReportInterval)) + } + if params != nil && params.DefaultChannelCreatorRoleSid != nil { + data.Set("DefaultChannelCreatorRoleSid", *params.DefaultChannelCreatorRoleSid) + } + if params != nil && params.DefaultChannelRoleSid != nil { + data.Set("DefaultChannelRoleSid", *params.DefaultChannelRoleSid) + } + if params != nil && params.DefaultServiceRoleSid != nil { + data.Set("DefaultServiceRoleSid", *params.DefaultServiceRoleSid) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.LimitsChannelMembers != nil { + data.Set("LimitsChannelMembers", fmt.Sprint(*params.LimitsChannelMembers)) + } + if params != nil && params.LimitsUserChannels != nil { + data.Set("LimitsUserChannels", fmt.Sprint(*params.LimitsUserChannels)) + } + if params != nil && params.MediaCompatibilityMessage != nil { + data.Set("MediaCompatibilityMessage", *params.MediaCompatibilityMessage) + } + if params != nil && params.NotificationsAddedToChannelEnabled != nil { + data.Set("NotificationsAddedToChannelEnabled", fmt.Sprint(*params.NotificationsAddedToChannelEnabled)) + } + if params != nil && params.NotificationsAddedToChannelSound != nil { + data.Set("NotificationsAddedToChannelSound", *params.NotificationsAddedToChannelSound) + } + if params != nil && params.NotificationsAddedToChannelTemplate != nil { + data.Set("NotificationsAddedToChannelTemplate", *params.NotificationsAddedToChannelTemplate) + } + if params != nil && params.NotificationsInvitedToChannelEnabled != nil { + data.Set("NotificationsInvitedToChannelEnabled", fmt.Sprint(*params.NotificationsInvitedToChannelEnabled)) + } + if params != nil && params.NotificationsInvitedToChannelSound != nil { + data.Set("NotificationsInvitedToChannelSound", *params.NotificationsInvitedToChannelSound) + } + if params != nil && params.NotificationsInvitedToChannelTemplate != nil { + data.Set("NotificationsInvitedToChannelTemplate", *params.NotificationsInvitedToChannelTemplate) + } + if params != nil && params.NotificationsLogEnabled != nil { + data.Set("NotificationsLogEnabled", fmt.Sprint(*params.NotificationsLogEnabled)) + } + if params != nil && params.NotificationsNewMessageBadgeCountEnabled != nil { + data.Set("NotificationsNewMessageBadgeCountEnabled", fmt.Sprint(*params.NotificationsNewMessageBadgeCountEnabled)) + } + if params != nil && params.NotificationsNewMessageEnabled != nil { + data.Set("NotificationsNewMessageEnabled", fmt.Sprint(*params.NotificationsNewMessageEnabled)) + } + if params != nil && params.NotificationsNewMessageSound != nil { + data.Set("NotificationsNewMessageSound", *params.NotificationsNewMessageSound) + } + if params != nil && params.NotificationsNewMessageTemplate != nil { + data.Set("NotificationsNewMessageTemplate", *params.NotificationsNewMessageTemplate) + } + if params != nil && params.NotificationsRemovedFromChannelEnabled != nil { + data.Set("NotificationsRemovedFromChannelEnabled", fmt.Sprint(*params.NotificationsRemovedFromChannelEnabled)) + } + if params != nil && params.NotificationsRemovedFromChannelSound != nil { + data.Set("NotificationsRemovedFromChannelSound", *params.NotificationsRemovedFromChannelSound) + } + if params != nil && params.NotificationsRemovedFromChannelTemplate != nil { + data.Set("NotificationsRemovedFromChannelTemplate", *params.NotificationsRemovedFromChannelTemplate) + } + if params != nil && params.PostWebhookRetryCount != nil { + data.Set("PostWebhookRetryCount", fmt.Sprint(*params.PostWebhookRetryCount)) + } + if params != nil && params.PostWebhookUrl != nil { + data.Set("PostWebhookUrl", *params.PostWebhookUrl) + } + if params != nil && params.PreWebhookRetryCount != nil { + data.Set("PreWebhookRetryCount", fmt.Sprint(*params.PreWebhookRetryCount)) + } + if params != nil && params.PreWebhookUrl != nil { + data.Set("PreWebhookUrl", *params.PreWebhookUrl) + } + if params != nil && params.ReachabilityEnabled != nil { + data.Set("ReachabilityEnabled", fmt.Sprint(*params.ReachabilityEnabled)) + } + if params != nil && params.ReadStatusEnabled != nil { + data.Set("ReadStatusEnabled", fmt.Sprint(*params.ReadStatusEnabled)) + } + if params != nil && params.TypingIndicatorTimeout != nil { + data.Set("TypingIndicatorTimeout", fmt.Sprint(*params.TypingIndicatorTimeout)) + } + if params != nil && params.WebhookFilters != nil { + data.Set("WebhookFilters", strings.Join(*params.WebhookFilters, ",")) + } + if params != nil && params.WebhookMethod != nil { + data.Set("WebhookMethod", *params.WebhookMethod) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ChatV2Service{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ChatV2Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateUserParams Optional parameters for the method 'UpdateUser' type UpdateUserParams struct { XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` } /* @@ -2385,48 +2350,49 @@ type UpdateUserParams struct { * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It is often used for display purposes. * @param "RoleSid" (string) - The SID of the [Role](https://www.twilio.com/docs/chat/rest/role-resource) to assign to the User. * @return ChatV2ServiceUser -*/ + */ func (c *DefaultApiService) UpdateUser(ServiceSid string, Sid string, params *UpdateUserParams) (*ChatV2ServiceUser, error) { - path := "/v2/Services/{ServiceSid}/Users/{Sid}" + path := "/v2/Services/{ServiceSid}/Users/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.RoleSid != nil { - data.Set("RoleSid", *params.RoleSid) -} + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) + } if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ChatV2ServiceUser{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ChatV2ServiceUser{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateUserChannelParams Optional parameters for the method 'UpdateUserChannel' type UpdateUserChannelParams struct { - LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` + LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` LastConsumptionTimestamp *time.Time `json:"LastConsumptionTimestamp,omitempty"` - NotificationLevel *string `json:"NotificationLevel,omitempty"` + NotificationLevel *string `json:"NotificationLevel,omitempty"` } /* @@ -2439,38 +2405,37 @@ type UpdateUserChannelParams struct { * @param "LastConsumptionTimestamp" (time.Time) - The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) read event for the Member within the [Channel](https://www.twilio.com/docs/chat/channels). * @param "NotificationLevel" (string) - The push notification level to assign to the User Channel. Can be: `default` or `muted`. * @return ChatV2ServiceUserUserChannel -*/ + */ func (c *DefaultApiService) UpdateUserChannel(ServiceSid string, UserSid string, ChannelSid string, params *UpdateUserChannelParams) (*ChatV2ServiceUserUserChannel, error) { - path := "/v2/Services/{ServiceSid}/Users/{UserSid}/Channels/{ChannelSid}" + path := "/v2/Services/{ServiceSid}/Users/{UserSid}/Channels/{ChannelSid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"UserSid"+"}", UserSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.LastConsumedMessageIndex != nil { - data.Set("LastConsumedMessageIndex", fmt.Sprint(*params.LastConsumedMessageIndex)) -} - if params != nil && params.LastConsumptionTimestamp != nil { - data.Set("LastConsumptionTimestamp", fmt.Sprint(*params.LastConsumptionTimestamp)) -} - if params != nil && params.NotificationLevel != nil { - data.Set("NotificationLevel", *params.NotificationLevel) -} + data := url.Values{} + headers := 0 + if params != nil && params.LastConsumedMessageIndex != nil { + data.Set("LastConsumedMessageIndex", fmt.Sprint(*params.LastConsumedMessageIndex)) + } + if params != nil && params.LastConsumptionTimestamp != nil { + data.Set("LastConsumptionTimestamp", fmt.Sprint(*params.LastConsumptionTimestamp)) + } + if params != nil && params.NotificationLevel != nil { + data.Set("NotificationLevel", *params.NotificationLevel) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ChatV2ServiceUserUserChannel{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ChatV2ServiceUserUserChannel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } diff --git a/twilio/rest/chat/v2/model_chat_v2_credential.go b/twilio/rest/chat/v2/model_chat_v2_credential.go index 1eb1a7d42..fd8eb761c 100644 --- a/twilio/rest/chat/v2/model_chat_v2_credential.go +++ b/twilio/rest/chat/v2/model_chat_v2_credential.go @@ -1,18 +1,20 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // ChatV2Credential struct for ChatV2Credential type ChatV2Credential struct { // The SID of the Account that created the resource diff --git a/twilio/rest/chat/v2/model_chat_v2_service.go b/twilio/rest/chat/v2/model_chat_v2_service.go index c7a2f51ed..34218216e 100644 --- a/twilio/rest/chat/v2/model_chat_v2_service.go +++ b/twilio/rest/chat/v2/model_chat_v2_service.go @@ -1,18 +1,20 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // ChatV2Service struct for ChatV2Service type ChatV2Service struct { // The SID of the Account that created the resource diff --git a/twilio/rest/chat/v2/model_chat_v2_service_binding.go b/twilio/rest/chat/v2/model_chat_v2_service_binding.go index 04feb7ea9..4047afab6 100644 --- a/twilio/rest/chat/v2/model_chat_v2_service_binding.go +++ b/twilio/rest/chat/v2/model_chat_v2_service_binding.go @@ -1,18 +1,20 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // ChatV2ServiceBinding struct for ChatV2ServiceBinding type ChatV2ServiceBinding struct { // The SID of the Account that created the resource diff --git a/twilio/rest/chat/v2/model_chat_v2_service_channel.go b/twilio/rest/chat/v2/model_chat_v2_service_channel.go index 1eaf86778..4fb11d9c6 100644 --- a/twilio/rest/chat/v2/model_chat_v2_service_channel.go +++ b/twilio/rest/chat/v2/model_chat_v2_service_channel.go @@ -1,18 +1,20 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // ChatV2ServiceChannel struct for ChatV2ServiceChannel type ChatV2ServiceChannel struct { // The SID of the Account that created the resource diff --git a/twilio/rest/chat/v2/model_chat_v2_service_channel_channel_webhook.go b/twilio/rest/chat/v2/model_chat_v2_service_channel_channel_webhook.go index f27fa24f2..4ae08b97c 100644 --- a/twilio/rest/chat/v2/model_chat_v2_service_channel_channel_webhook.go +++ b/twilio/rest/chat/v2/model_chat_v2_service_channel_channel_webhook.go @@ -1,18 +1,20 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // ChatV2ServiceChannelChannelWebhook struct for ChatV2ServiceChannelChannelWebhook type ChatV2ServiceChannelChannelWebhook struct { // The SID of the Account that created the resource diff --git a/twilio/rest/chat/v2/model_chat_v2_service_channel_invite.go b/twilio/rest/chat/v2/model_chat_v2_service_channel_invite.go index f3f5cb393..3f8f8038c 100644 --- a/twilio/rest/chat/v2/model_chat_v2_service_channel_invite.go +++ b/twilio/rest/chat/v2/model_chat_v2_service_channel_invite.go @@ -1,18 +1,20 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // ChatV2ServiceChannelInvite struct for ChatV2ServiceChannelInvite type ChatV2ServiceChannelInvite struct { // The SID of the Account that created the resource diff --git a/twilio/rest/chat/v2/model_chat_v2_service_channel_member.go b/twilio/rest/chat/v2/model_chat_v2_service_channel_member.go index 3d7597924..1bd6fac4a 100644 --- a/twilio/rest/chat/v2/model_chat_v2_service_channel_member.go +++ b/twilio/rest/chat/v2/model_chat_v2_service_channel_member.go @@ -1,18 +1,20 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // ChatV2ServiceChannelMember struct for ChatV2ServiceChannelMember type ChatV2ServiceChannelMember struct { // The SID of the Account that created the resource diff --git a/twilio/rest/chat/v2/model_chat_v2_service_channel_message.go b/twilio/rest/chat/v2/model_chat_v2_service_channel_message.go index 6d9464447..42b284fdd 100644 --- a/twilio/rest/chat/v2/model_chat_v2_service_channel_message.go +++ b/twilio/rest/chat/v2/model_chat_v2_service_channel_message.go @@ -1,18 +1,20 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // ChatV2ServiceChannelMessage struct for ChatV2ServiceChannelMessage type ChatV2ServiceChannelMessage struct { // The SID of the Account that created the resource diff --git a/twilio/rest/chat/v2/model_chat_v2_service_role.go b/twilio/rest/chat/v2/model_chat_v2_service_role.go index 941a51954..fd9a4abb8 100644 --- a/twilio/rest/chat/v2/model_chat_v2_service_role.go +++ b/twilio/rest/chat/v2/model_chat_v2_service_role.go @@ -1,18 +1,20 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // ChatV2ServiceRole struct for ChatV2ServiceRole type ChatV2ServiceRole struct { // The SID of the Account that created the resource diff --git a/twilio/rest/chat/v2/model_chat_v2_service_user.go b/twilio/rest/chat/v2/model_chat_v2_service_user.go index f00ecc28c..2eac57fe8 100644 --- a/twilio/rest/chat/v2/model_chat_v2_service_user.go +++ b/twilio/rest/chat/v2/model_chat_v2_service_user.go @@ -1,18 +1,20 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // ChatV2ServiceUser struct for ChatV2ServiceUser type ChatV2ServiceUser struct { // The SID of the Account that created the resource diff --git a/twilio/rest/chat/v2/model_chat_v2_service_user_user_binding.go b/twilio/rest/chat/v2/model_chat_v2_service_user_user_binding.go index 0d0c8fe8b..ed39cd819 100644 --- a/twilio/rest/chat/v2/model_chat_v2_service_user_user_binding.go +++ b/twilio/rest/chat/v2/model_chat_v2_service_user_user_binding.go @@ -1,18 +1,20 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // ChatV2ServiceUserUserBinding struct for ChatV2ServiceUserUserBinding type ChatV2ServiceUserUserBinding struct { // The SID of the Account that created the resource diff --git a/twilio/rest/chat/v2/model_chat_v2_service_user_user_channel.go b/twilio/rest/chat/v2/model_chat_v2_service_user_user_channel.go index 7b0b8b211..d658070b0 100644 --- a/twilio/rest/chat/v2/model_chat_v2_service_user_user_channel.go +++ b/twilio/rest/chat/v2/model_chat_v2_service_user_user_channel.go @@ -1,15 +1,16 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ChatV2ServiceUserUserChannel struct for ChatV2ServiceUserUserChannel type ChatV2ServiceUserUserChannel struct { // The SID of the Account that created the resource diff --git a/twilio/rest/chat/v2/model_list_binding_response.go b/twilio/rest/chat/v2/model_list_binding_response.go index 82df8e165..ecee4ce41 100644 --- a/twilio/rest/chat/v2/model_list_binding_response.go +++ b/twilio/rest/chat/v2/model_list_binding_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListBindingResponse struct for ListBindingResponse type ListBindingResponse struct { - Bindings []ChatV2ServiceBinding `json:"Bindings,omitempty"` - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Bindings []ChatV2ServiceBinding `json:"Bindings,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/chat/v2/model_list_channel_response.go b/twilio/rest/chat/v2/model_list_channel_response.go index d4babf699..0781b8ecc 100644 --- a/twilio/rest/chat/v2/model_list_channel_response.go +++ b/twilio/rest/chat/v2/model_list_channel_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListChannelResponse struct for ListChannelResponse type ListChannelResponse struct { - Channels []ChatV2ServiceChannel `json:"Channels,omitempty"` - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Channels []ChatV2ServiceChannel `json:"Channels,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/chat/v2/model_list_channel_webhook_response.go b/twilio/rest/chat/v2/model_list_channel_webhook_response.go index bcf1e0aac..9697a8884 100644 --- a/twilio/rest/chat/v2/model_list_channel_webhook_response.go +++ b/twilio/rest/chat/v2/model_list_channel_webhook_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListChannelWebhookResponse struct for ListChannelWebhookResponse type ListChannelWebhookResponse struct { - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` Webhooks []ChatV2ServiceChannelChannelWebhook `json:"Webhooks,omitempty"` } diff --git a/twilio/rest/chat/v2/model_list_credential_response.go b/twilio/rest/chat/v2/model_list_credential_response.go index 316809869..19cbb1d5d 100644 --- a/twilio/rest/chat/v2/model_list_credential_response.go +++ b/twilio/rest/chat/v2/model_list_credential_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListCredentialResponse struct for ListCredentialResponse type ListCredentialResponse struct { - Credentials []ChatV2Credential `json:"Credentials,omitempty"` - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Credentials []ChatV2Credential `json:"Credentials,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/chat/v2/model_list_credential_response_meta.go b/twilio/rest/chat/v2/model_list_credential_response_meta.go index 3396dd7da..76cc60bd1 100644 --- a/twilio/rest/chat/v2/model_list_credential_response_meta.go +++ b/twilio/rest/chat/v2/model_list_credential_response_meta.go @@ -1,22 +1,23 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListCredentialResponseMeta struct for ListCredentialResponseMeta type ListCredentialResponseMeta struct { - FirstPageUrl string `json:"FirstPageUrl,omitempty"` - Key string `json:"Key,omitempty"` - NextPageUrl string `json:"NextPageUrl,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` - Url string `json:"Url,omitempty"` + Url string `json:"Url,omitempty"` } diff --git a/twilio/rest/chat/v2/model_list_invite_response.go b/twilio/rest/chat/v2/model_list_invite_response.go index bc26ba557..1523f209e 100644 --- a/twilio/rest/chat/v2/model_list_invite_response.go +++ b/twilio/rest/chat/v2/model_list_invite_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListInviteResponse struct for ListInviteResponse type ListInviteResponse struct { Invites []ChatV2ServiceChannelInvite `json:"Invites,omitempty"` - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/chat/v2/model_list_member_response.go b/twilio/rest/chat/v2/model_list_member_response.go index ac94b13a2..7554ac14d 100644 --- a/twilio/rest/chat/v2/model_list_member_response.go +++ b/twilio/rest/chat/v2/model_list_member_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListMemberResponse struct for ListMemberResponse type ListMemberResponse struct { Members []ChatV2ServiceChannelMember `json:"Members,omitempty"` - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/chat/v2/model_list_message_response.go b/twilio/rest/chat/v2/model_list_message_response.go index adbe293d7..103084172 100644 --- a/twilio/rest/chat/v2/model_list_message_response.go +++ b/twilio/rest/chat/v2/model_list_message_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListMessageResponse struct for ListMessageResponse type ListMessageResponse struct { Messages []ChatV2ServiceChannelMessage `json:"Messages,omitempty"` - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/chat/v2/model_list_role_response.go b/twilio/rest/chat/v2/model_list_role_response.go index 71c581295..1e7c7cea9 100644 --- a/twilio/rest/chat/v2/model_list_role_response.go +++ b/twilio/rest/chat/v2/model_list_role_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListRoleResponse struct for ListRoleResponse type ListRoleResponse struct { - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` - Roles []ChatV2ServiceRole `json:"Roles,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Roles []ChatV2ServiceRole `json:"Roles,omitempty"` } diff --git a/twilio/rest/chat/v2/model_list_service_response.go b/twilio/rest/chat/v2/model_list_service_response.go index d8d80f169..15fa6d3a9 100644 --- a/twilio/rest/chat/v2/model_list_service_response.go +++ b/twilio/rest/chat/v2/model_list_service_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListServiceResponse struct for ListServiceResponse type ListServiceResponse struct { - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` - Services []ChatV2Service `json:"Services,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Services []ChatV2Service `json:"Services,omitempty"` } diff --git a/twilio/rest/chat/v2/model_list_user_binding_response.go b/twilio/rest/chat/v2/model_list_user_binding_response.go index 496d0f607..09a48b544 100644 --- a/twilio/rest/chat/v2/model_list_user_binding_response.go +++ b/twilio/rest/chat/v2/model_list_user_binding_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListUserBindingResponse struct for ListUserBindingResponse type ListUserBindingResponse struct { Bindings []ChatV2ServiceUserUserBinding `json:"Bindings,omitempty"` - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/chat/v2/model_list_user_channel_response.go b/twilio/rest/chat/v2/model_list_user_channel_response.go index 2e7b15da3..127345f59 100644 --- a/twilio/rest/chat/v2/model_list_user_channel_response.go +++ b/twilio/rest/chat/v2/model_list_user_channel_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListUserChannelResponse struct for ListUserChannelResponse type ListUserChannelResponse struct { Channels []ChatV2ServiceUserUserChannel `json:"Channels,omitempty"` - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/chat/v2/model_list_user_response.go b/twilio/rest/chat/v2/model_list_user_response.go index 91be110be..072111086 100644 --- a/twilio/rest/chat/v2/model_list_user_response.go +++ b/twilio/rest/chat/v2/model_list_user_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Chat - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListUserResponse struct for ListUserResponse type ListUserResponse struct { - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` - Users []ChatV2ServiceUser `json:"Users,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Users []ChatV2ServiceUser `json:"Users,omitempty"` } diff --git a/twilio/rest/conversations/v1/api_default.go b/twilio/rest/conversations/v1/api_default.go index 806cf1e66..a3d9ea0a6 100644 --- a/twilio/rest/conversations/v1/api_default.go +++ b/twilio/rest/conversations/v1/api_default.go @@ -1,11 +1,11 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,11 +14,11 @@ package openapi import ( "encoding/json" "fmt" - twilio "github.com/twilio/twilio-go/client" "net/url" - "strings" - "time" - "reflect" + "strings" + "time" + + twilio "github.com/twilio/twilio-go/client" ) type DefaultApiService struct { @@ -27,24 +27,24 @@ type DefaultApiService struct { } func NewDefaultApiService(client *twilio.Client) *DefaultApiService { - return &DefaultApiService { - client: client, + return &DefaultApiService{ + client: client, baseURL: "https://conversations.twilio.com", } } // CreateConversationParams Optional parameters for the method 'CreateConversation' type CreateConversationParams struct { - XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - MessagingServiceSid *string `json:"MessagingServiceSid,omitempty"` - State *string `json:"State,omitempty"` - TimersClosed *string `json:"Timers.Closed,omitempty"` - TimersInactive *string `json:"Timers.Inactive,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + MessagingServiceSid *string `json:"MessagingServiceSid,omitempty"` + State *string `json:"State,omitempty"` + TimersClosed *string `json:"Timers.Closed,omitempty"` + TimersInactive *string `json:"Timers.Inactive,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` } /* @@ -62,68 +62,69 @@ type CreateConversationParams struct { * @param "TimersInactive" (string) - ISO8601 duration when conversation will be switched to `inactive` state. Minimum value for this timer is 1 minute. * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. * @return ConversationsV1Conversation -*/ + */ func (c *DefaultApiService) CreateConversation(params *CreateConversationParams) (*ConversationsV1Conversation, error) { - path := "/v1/Conversations" + path := "/v1/Conversations" - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) -} - if params != nil && params.DateCreated != nil { - data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) -} - if params != nil && params.DateUpdated != nil { - data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.MessagingServiceSid != nil { - data.Set("MessagingServiceSid", *params.MessagingServiceSid) -} - if params != nil && params.State != nil { - data.Set("State", *params.State) -} - if params != nil && params.TimersClosed != nil { - data.Set("TimersClosed", *params.TimersClosed) -} - if params != nil && params.TimersInactive != nil { - data.Set("TimersInactive", *params.TimersInactive) -} - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) -} + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) + } + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.MessagingServiceSid != nil { + data.Set("MessagingServiceSid", *params.MessagingServiceSid) + } + if params != nil && params.State != nil { + data.Set("State", *params.State) + } + if params != nil && params.TimersClosed != nil { + data.Set("TimersClosed", *params.TimersClosed) + } + if params != nil && params.TimersInactive != nil { + data.Set("TimersInactive", *params.TimersInactive) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ConversationsV1Conversation{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ConversationsV1Conversation{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateConversationMessageParams Optional parameters for the method 'CreateConversationMessage' type CreateConversationMessageParams struct { - XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - Author *string `json:"Author,omitempty"` - Body *string `json:"Body,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - MediaSid *string `json:"MediaSid,omitempty"` + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + Author *string `json:"Author,omitempty"` + Body *string `json:"Body,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + MediaSid *string `json:"MediaSid,omitempty"` } /* @@ -139,62 +140,63 @@ type CreateConversationMessageParams struct { * @param "DateUpdated" (time.Time) - The date that this resource was last updated. `null` if the message has not been edited. * @param "MediaSid" (string) - The Media SID to be attached to the new Message. * @return ConversationsV1ConversationConversationMessage -*/ + */ func (c *DefaultApiService) CreateConversationMessage(ConversationSid string, params *CreateConversationMessageParams) (*ConversationsV1ConversationConversationMessage, error) { - path := "/v1/Conversations/{ConversationSid}/Messages" + path := "/v1/Conversations/{ConversationSid}/Messages" path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) -} - if params != nil && params.Author != nil { - data.Set("Author", *params.Author) -} - if params != nil && params.Body != nil { - data.Set("Body", *params.Body) -} - if params != nil && params.DateCreated != nil { - data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) -} - if params != nil && params.DateUpdated != nil { - data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) -} - if params != nil && params.MediaSid != nil { - data.Set("MediaSid", *params.MediaSid) -} + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.Author != nil { + data.Set("Author", *params.Author) + } + if params != nil && params.Body != nil { + data.Set("Body", *params.Body) + } + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) + } + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) + } + if params != nil && params.MediaSid != nil { + data.Set("MediaSid", *params.MediaSid) + } if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ConversationsV1ConversationConversationMessage{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ConversationsV1ConversationConversationMessage{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateConversationParticipantParams Optional parameters for the method 'CreateConversationParticipant' type CreateConversationParticipantParams struct { - XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Identity *string `json:"Identity,omitempty"` - MessagingBindingAddress *string `json:"MessagingBinding.Address,omitempty"` - MessagingBindingProjectedAddress *string `json:"MessagingBinding.ProjectedAddress,omitempty"` - MessagingBindingProxyAddress *string `json:"MessagingBinding.ProxyAddress,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + Identity *string `json:"Identity,omitempty"` + MessagingBindingAddress *string `json:"MessagingBinding.Address,omitempty"` + MessagingBindingProjectedAddress *string `json:"MessagingBinding.ProjectedAddress,omitempty"` + MessagingBindingProxyAddress *string `json:"MessagingBinding.ProxyAddress,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` } /* @@ -212,66 +214,67 @@ type CreateConversationParticipantParams struct { * @param "MessagingBindingProxyAddress" (string) - The address of the Twilio phone number (or WhatsApp number) that the participant is in contact with. This field, together with participant address, is only null when the participant is interacting from an SDK endpoint (see the 'identity' field). * @param "RoleSid" (string) - The SID of a conversation-level [Role](https://www.twilio.com/docs/conversations/api/role-resource) to assign to the participant. * @return ConversationsV1ConversationConversationParticipant -*/ + */ func (c *DefaultApiService) CreateConversationParticipant(ConversationSid string, params *CreateConversationParticipantParams) (*ConversationsV1ConversationConversationParticipant, error) { - path := "/v1/Conversations/{ConversationSid}/Participants" + path := "/v1/Conversations/{ConversationSid}/Participants" path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) -} - if params != nil && params.DateCreated != nil { - data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) -} - if params != nil && params.DateUpdated != nil { - data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) -} - if params != nil && params.Identity != nil { - data.Set("Identity", *params.Identity) -} - if params != nil && params.MessagingBindingAddress != nil { - data.Set("MessagingBindingAddress", *params.MessagingBindingAddress) -} - if params != nil && params.MessagingBindingProjectedAddress != nil { - data.Set("MessagingBindingProjectedAddress", *params.MessagingBindingProjectedAddress) -} - if params != nil && params.MessagingBindingProxyAddress != nil { - data.Set("MessagingBindingProxyAddress", *params.MessagingBindingProxyAddress) -} - if params != nil && params.RoleSid != nil { - data.Set("RoleSid", *params.RoleSid) -} + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) + } + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) + } + if params != nil && params.Identity != nil { + data.Set("Identity", *params.Identity) + } + if params != nil && params.MessagingBindingAddress != nil { + data.Set("MessagingBindingAddress", *params.MessagingBindingAddress) + } + if params != nil && params.MessagingBindingProjectedAddress != nil { + data.Set("MessagingBindingProjectedAddress", *params.MessagingBindingProjectedAddress) + } + if params != nil && params.MessagingBindingProxyAddress != nil { + data.Set("MessagingBindingProxyAddress", *params.MessagingBindingProxyAddress) + } + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) + } if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ConversationsV1ConversationConversationParticipant{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ConversationsV1ConversationConversationParticipant{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateConversationScopedWebhookParams Optional parameters for the method 'CreateConversationScopedWebhook' type CreateConversationScopedWebhookParams struct { - ConfigurationFilters *[]string `json:"Configuration.Filters,omitempty"` - ConfigurationFlowSid *string `json:"Configuration.FlowSid,omitempty"` - ConfigurationMethod *string `json:"Configuration.Method,omitempty"` - ConfigurationReplayAfter *int32 `json:"Configuration.ReplayAfter,omitempty"` - ConfigurationTriggers *[]string `json:"Configuration.Triggers,omitempty"` - ConfigurationUrl *string `json:"Configuration.Url,omitempty"` - Target *string `json:"Target,omitempty"` + ConfigurationFilters *[]string `json:"Configuration.Filters,omitempty"` + ConfigurationFlowSid *string `json:"Configuration.FlowSid,omitempty"` + ConfigurationMethod *string `json:"Configuration.Method,omitempty"` + ConfigurationReplayAfter *int32 `json:"Configuration.ReplayAfter,omitempty"` + ConfigurationTriggers *[]string `json:"Configuration.Triggers,omitempty"` + ConfigurationUrl *string `json:"Configuration.Url,omitempty"` + Target *string `json:"Target,omitempty"` } /* @@ -287,60 +290,60 @@ type CreateConversationScopedWebhookParams struct { * @param "ConfigurationUrl" (string) - The absolute url the webhook request should be sent to. * @param "Target" (string) - The target of this webhook: `webhook`, `studio`, `trigger` * @return ConversationsV1ConversationConversationScopedWebhook -*/ + */ func (c *DefaultApiService) CreateConversationScopedWebhook(ConversationSid string, params *CreateConversationScopedWebhookParams) (*ConversationsV1ConversationConversationScopedWebhook, error) { - path := "/v1/Conversations/{ConversationSid}/Webhooks" + path := "/v1/Conversations/{ConversationSid}/Webhooks" path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.ConfigurationFilters != nil { - data.Set("ConfigurationFilters", strings.Join(*params.ConfigurationFilters, ",")) -} - if params != nil && params.ConfigurationFlowSid != nil { - data.Set("ConfigurationFlowSid", *params.ConfigurationFlowSid) -} - if params != nil && params.ConfigurationMethod != nil { - data.Set("ConfigurationMethod", *params.ConfigurationMethod) -} - if params != nil && params.ConfigurationReplayAfter != nil { - data.Set("ConfigurationReplayAfter", fmt.Sprint(*params.ConfigurationReplayAfter)) -} - if params != nil && params.ConfigurationTriggers != nil { - data.Set("ConfigurationTriggers", strings.Join(*params.ConfigurationTriggers, ",")) -} - if params != nil && params.ConfigurationUrl != nil { - data.Set("ConfigurationUrl", *params.ConfigurationUrl) -} - if params != nil && params.Target != nil { - data.Set("Target", *params.Target) -} + data := url.Values{} + headers := 0 + if params != nil && params.ConfigurationFilters != nil { + data.Set("ConfigurationFilters", strings.Join(*params.ConfigurationFilters, ",")) + } + if params != nil && params.ConfigurationFlowSid != nil { + data.Set("ConfigurationFlowSid", *params.ConfigurationFlowSid) + } + if params != nil && params.ConfigurationMethod != nil { + data.Set("ConfigurationMethod", *params.ConfigurationMethod) + } + if params != nil && params.ConfigurationReplayAfter != nil { + data.Set("ConfigurationReplayAfter", fmt.Sprint(*params.ConfigurationReplayAfter)) + } + if params != nil && params.ConfigurationTriggers != nil { + data.Set("ConfigurationTriggers", strings.Join(*params.ConfigurationTriggers, ",")) + } + if params != nil && params.ConfigurationUrl != nil { + data.Set("ConfigurationUrl", *params.ConfigurationUrl) + } + if params != nil && params.Target != nil { + data.Set("Target", *params.Target) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ConversationsV1ConversationConversationScopedWebhook{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ConversationsV1ConversationConversationScopedWebhook{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateCredentialParams Optional parameters for the method 'CreateCredential' type CreateCredentialParams struct { - ApiKey *string `json:"ApiKey,omitempty"` - Certificate *string `json:"Certificate,omitempty"` + ApiKey *string `json:"ApiKey,omitempty"` + Certificate *string `json:"Certificate,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` - PrivateKey *string `json:"PrivateKey,omitempty"` - Sandbox *bool `json:"Sandbox,omitempty"` - Secret *string `json:"Secret,omitempty"` - Type *string `json:"Type,omitempty"` + PrivateKey *string `json:"PrivateKey,omitempty"` + Sandbox *bool `json:"Sandbox,omitempty"` + Secret *string `json:"Secret,omitempty"` + Type *string `json:"Type,omitempty"` } /* @@ -355,55 +358,55 @@ type CreateCredentialParams struct { * @param "Secret" (string) - [FCM only] The **Server key** of your project from the Firebase console, found under Settings / Cloud messaging. * @param "Type" (string) - The type of push-notification service the credential is for. Can be: `fcm`, `gcm`, or `apn`. * @return ConversationsV1Credential -*/ + */ func (c *DefaultApiService) CreateCredential(params *CreateCredentialParams) (*ConversationsV1Credential, error) { - path := "/v1/Credentials" - - data := url.Values{} - headers := 0 + path := "/v1/Credentials" - if params != nil && params.ApiKey != nil { - data.Set("ApiKey", *params.ApiKey) -} - if params != nil && params.Certificate != nil { - data.Set("Certificate", *params.Certificate) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.PrivateKey != nil { - data.Set("PrivateKey", *params.PrivateKey) -} - if params != nil && params.Sandbox != nil { - data.Set("Sandbox", fmt.Sprint(*params.Sandbox)) -} - if params != nil && params.Secret != nil { - data.Set("Secret", *params.Secret) -} - if params != nil && params.Type != nil { - data.Set("Type", *params.Type) -} + data := url.Values{} + headers := 0 + if params != nil && params.ApiKey != nil { + data.Set("ApiKey", *params.ApiKey) + } + if params != nil && params.Certificate != nil { + data.Set("Certificate", *params.Certificate) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.PrivateKey != nil { + data.Set("PrivateKey", *params.PrivateKey) + } + if params != nil && params.Sandbox != nil { + data.Set("Sandbox", fmt.Sprint(*params.Sandbox)) + } + if params != nil && params.Secret != nil { + data.Set("Secret", *params.Secret) + } + if params != nil && params.Type != nil { + data.Set("Type", *params.Type) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ConversationsV1Credential{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ConversationsV1Credential{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateRoleParams Optional parameters for the method 'CreateRole' type CreateRoleParams struct { - FriendlyName *string `json:"FriendlyName,omitempty"` - Permission *[]string `json:"Permission,omitempty"` - Type *string `json:"Type,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Permission *[]string `json:"Permission,omitempty"` + Type *string `json:"Type,omitempty"` } /* @@ -414,38 +417,38 @@ type CreateRoleParams struct { * @param "Permission" ([]string) - A permission that you grant to the new role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. The values for this parameter depend on the role's `type`. * @param "Type" (string) - The type of role. Can be: `conversation` for [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) roles or `service` for [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) roles. * @return ConversationsV1Role -*/ + */ func (c *DefaultApiService) CreateRole(params *CreateRoleParams) (*ConversationsV1Role, error) { - path := "/v1/Roles" - - data := url.Values{} - headers := 0 + path := "/v1/Roles" - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.Permission != nil { - data.Set("Permission", strings.Join(*params.Permission, ",")) -} - if params != nil && params.Type != nil { - data.Set("Type", *params.Type) -} + data := url.Values{} + headers := 0 + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Permission != nil { + data.Set("Permission", strings.Join(*params.Permission, ",")) + } + if params != nil && params.Type != nil { + data.Set("Type", *params.Type) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ConversationsV1Role{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ConversationsV1Role{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateServiceParams Optional parameters for the method 'CreateService' type CreateServiceParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` @@ -457,44 +460,44 @@ type CreateServiceParams struct { * @param optional nil or *CreateServiceParams - Optional Parameters: * @param "FriendlyName" (string) - The human-readable name of this service, limited to 256 characters. Optional. * @return ConversationsV1Service -*/ + */ func (c *DefaultApiService) CreateService(params *CreateServiceParams) (*ConversationsV1Service, error) { - path := "/v1/Services" - - data := url.Values{} - headers := 0 + path := "/v1/Services" - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} + data := url.Values{} + headers := 0 + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ConversationsV1Service{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ConversationsV1Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateServiceConversationParams Optional parameters for the method 'CreateServiceConversation' type CreateServiceConversationParams struct { - XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - MessagingServiceSid *string `json:"MessagingServiceSid,omitempty"` - State *string `json:"State,omitempty"` - TimersClosed *string `json:"Timers.Closed,omitempty"` - TimersInactive *string `json:"Timers.Inactive,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + MessagingServiceSid *string `json:"MessagingServiceSid,omitempty"` + State *string `json:"State,omitempty"` + TimersClosed *string `json:"Timers.Closed,omitempty"` + TimersInactive *string `json:"Timers.Inactive,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` } /* @@ -513,69 +516,70 @@ type CreateServiceConversationParams struct { * @param "TimersInactive" (string) - ISO8601 duration when conversation will be switched to `inactive` state. Minimum value for this timer is 1 minute. * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. * @return ConversationsV1ServiceServiceConversation -*/ + */ func (c *DefaultApiService) CreateServiceConversation(ChatServiceSid string, params *CreateServiceConversationParams) (*ConversationsV1ServiceServiceConversation, error) { - path := "/v1/Services/{ChatServiceSid}/Conversations" + path := "/v1/Services/{ChatServiceSid}/Conversations" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) -} - if params != nil && params.DateCreated != nil { - data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) -} - if params != nil && params.DateUpdated != nil { - data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.MessagingServiceSid != nil { - data.Set("MessagingServiceSid", *params.MessagingServiceSid) -} - if params != nil && params.State != nil { - data.Set("State", *params.State) -} - if params != nil && params.TimersClosed != nil { - data.Set("TimersClosed", *params.TimersClosed) -} - if params != nil && params.TimersInactive != nil { - data.Set("TimersInactive", *params.TimersInactive) -} - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) -} + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) + } + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.MessagingServiceSid != nil { + data.Set("MessagingServiceSid", *params.MessagingServiceSid) + } + if params != nil && params.State != nil { + data.Set("State", *params.State) + } + if params != nil && params.TimersClosed != nil { + data.Set("TimersClosed", *params.TimersClosed) + } + if params != nil && params.TimersInactive != nil { + data.Set("TimersInactive", *params.TimersInactive) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ConversationsV1ServiceServiceConversation{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ConversationsV1ServiceServiceConversation{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateServiceConversationMessageParams Optional parameters for the method 'CreateServiceConversationMessage' type CreateServiceConversationMessageParams struct { - XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - Author *string `json:"Author,omitempty"` - Body *string `json:"Body,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - MediaSid *string `json:"MediaSid,omitempty"` + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + Author *string `json:"Author,omitempty"` + Body *string `json:"Body,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + MediaSid *string `json:"MediaSid,omitempty"` } /* @@ -592,63 +596,64 @@ type CreateServiceConversationMessageParams struct { * @param "DateUpdated" (time.Time) - The date that this resource was last updated. `null` if the message has not been edited. * @param "MediaSid" (string) - The Media SID to be attached to the new Message. * @return ConversationsV1ServiceServiceConversationServiceConversationMessage -*/ + */ func (c *DefaultApiService) CreateServiceConversationMessage(ChatServiceSid string, ConversationSid string, params *CreateServiceConversationMessageParams) (*ConversationsV1ServiceServiceConversationServiceConversationMessage, error) { - path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages" + path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) -} - if params != nil && params.Author != nil { - data.Set("Author", *params.Author) -} - if params != nil && params.Body != nil { - data.Set("Body", *params.Body) -} - if params != nil && params.DateCreated != nil { - data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) -} - if params != nil && params.DateUpdated != nil { - data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) -} - if params != nil && params.MediaSid != nil { - data.Set("MediaSid", *params.MediaSid) -} + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.Author != nil { + data.Set("Author", *params.Author) + } + if params != nil && params.Body != nil { + data.Set("Body", *params.Body) + } + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) + } + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) + } + if params != nil && params.MediaSid != nil { + data.Set("MediaSid", *params.MediaSid) + } if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ConversationsV1ServiceServiceConversationServiceConversationMessage{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ConversationsV1ServiceServiceConversationServiceConversationMessage{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateServiceConversationParticipantParams Optional parameters for the method 'CreateServiceConversationParticipant' type CreateServiceConversationParticipantParams struct { - XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Identity *string `json:"Identity,omitempty"` - MessagingBindingAddress *string `json:"MessagingBinding.Address,omitempty"` - MessagingBindingProjectedAddress *string `json:"MessagingBinding.ProjectedAddress,omitempty"` - MessagingBindingProxyAddress *string `json:"MessagingBinding.ProxyAddress,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + Identity *string `json:"Identity,omitempty"` + MessagingBindingAddress *string `json:"MessagingBinding.Address,omitempty"` + MessagingBindingProjectedAddress *string `json:"MessagingBinding.ProjectedAddress,omitempty"` + MessagingBindingProxyAddress *string `json:"MessagingBinding.ProxyAddress,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` } /* @@ -667,67 +672,68 @@ type CreateServiceConversationParticipantParams struct { * @param "MessagingBindingProxyAddress" (string) - The address of the Twilio phone number (or WhatsApp number) that the participant is in contact with. This field, together with participant address, is only null when the participant is interacting from an SDK endpoint (see the 'identity' field). * @param "RoleSid" (string) - The SID of a conversation-level [Role](https://www.twilio.com/docs/conversations/api/role-resource) to assign to the participant. * @return ConversationsV1ServiceServiceConversationServiceConversationParticipant -*/ + */ func (c *DefaultApiService) CreateServiceConversationParticipant(ChatServiceSid string, ConversationSid string, params *CreateServiceConversationParticipantParams) (*ConversationsV1ServiceServiceConversationServiceConversationParticipant, error) { - path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Participants" + path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Participants" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) -} - if params != nil && params.DateCreated != nil { - data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) -} - if params != nil && params.DateUpdated != nil { - data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) -} - if params != nil && params.Identity != nil { - data.Set("Identity", *params.Identity) -} - if params != nil && params.MessagingBindingAddress != nil { - data.Set("MessagingBindingAddress", *params.MessagingBindingAddress) -} - if params != nil && params.MessagingBindingProjectedAddress != nil { - data.Set("MessagingBindingProjectedAddress", *params.MessagingBindingProjectedAddress) -} - if params != nil && params.MessagingBindingProxyAddress != nil { - data.Set("MessagingBindingProxyAddress", *params.MessagingBindingProxyAddress) -} - if params != nil && params.RoleSid != nil { - data.Set("RoleSid", *params.RoleSid) -} + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) + } + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) + } + if params != nil && params.Identity != nil { + data.Set("Identity", *params.Identity) + } + if params != nil && params.MessagingBindingAddress != nil { + data.Set("MessagingBindingAddress", *params.MessagingBindingAddress) + } + if params != nil && params.MessagingBindingProjectedAddress != nil { + data.Set("MessagingBindingProjectedAddress", *params.MessagingBindingProjectedAddress) + } + if params != nil && params.MessagingBindingProxyAddress != nil { + data.Set("MessagingBindingProxyAddress", *params.MessagingBindingProxyAddress) + } + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) + } if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ConversationsV1ServiceServiceConversationServiceConversationParticipant{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ConversationsV1ServiceServiceConversationServiceConversationParticipant{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateServiceConversationScopedWebhookParams Optional parameters for the method 'CreateServiceConversationScopedWebhook' type CreateServiceConversationScopedWebhookParams struct { - ConfigurationFilters *[]string `json:"Configuration.Filters,omitempty"` - ConfigurationFlowSid *string `json:"Configuration.FlowSid,omitempty"` - ConfigurationMethod *string `json:"Configuration.Method,omitempty"` - ConfigurationReplayAfter *int32 `json:"Configuration.ReplayAfter,omitempty"` - ConfigurationTriggers *[]string `json:"Configuration.Triggers,omitempty"` - ConfigurationUrl *string `json:"Configuration.Url,omitempty"` - Target *string `json:"Target,omitempty"` + ConfigurationFilters *[]string `json:"Configuration.Filters,omitempty"` + ConfigurationFlowSid *string `json:"Configuration.FlowSid,omitempty"` + ConfigurationMethod *string `json:"Configuration.Method,omitempty"` + ConfigurationReplayAfter *int32 `json:"Configuration.ReplayAfter,omitempty"` + ConfigurationTriggers *[]string `json:"Configuration.Triggers,omitempty"` + ConfigurationUrl *string `json:"Configuration.Url,omitempty"` + Target *string `json:"Target,omitempty"` } /* @@ -744,57 +750,57 @@ type CreateServiceConversationScopedWebhookParams struct { * @param "ConfigurationUrl" (string) - The absolute url the webhook request should be sent to. * @param "Target" (string) - The target of this webhook: `webhook`, `studio`, `trigger` * @return ConversationsV1ServiceServiceConversationServiceConversationScopedWebhook -*/ + */ func (c *DefaultApiService) CreateServiceConversationScopedWebhook(ChatServiceSid string, ConversationSid string, params *CreateServiceConversationScopedWebhookParams) (*ConversationsV1ServiceServiceConversationServiceConversationScopedWebhook, error) { - path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Webhooks" + path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Webhooks" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.ConfigurationFilters != nil { - data.Set("ConfigurationFilters", strings.Join(*params.ConfigurationFilters, ",")) -} - if params != nil && params.ConfigurationFlowSid != nil { - data.Set("ConfigurationFlowSid", *params.ConfigurationFlowSid) -} - if params != nil && params.ConfigurationMethod != nil { - data.Set("ConfigurationMethod", *params.ConfigurationMethod) -} - if params != nil && params.ConfigurationReplayAfter != nil { - data.Set("ConfigurationReplayAfter", fmt.Sprint(*params.ConfigurationReplayAfter)) -} - if params != nil && params.ConfigurationTriggers != nil { - data.Set("ConfigurationTriggers", strings.Join(*params.ConfigurationTriggers, ",")) -} - if params != nil && params.ConfigurationUrl != nil { - data.Set("ConfigurationUrl", *params.ConfigurationUrl) -} - if params != nil && params.Target != nil { - data.Set("Target", *params.Target) -} + data := url.Values{} + headers := 0 + if params != nil && params.ConfigurationFilters != nil { + data.Set("ConfigurationFilters", strings.Join(*params.ConfigurationFilters, ",")) + } + if params != nil && params.ConfigurationFlowSid != nil { + data.Set("ConfigurationFlowSid", *params.ConfigurationFlowSid) + } + if params != nil && params.ConfigurationMethod != nil { + data.Set("ConfigurationMethod", *params.ConfigurationMethod) + } + if params != nil && params.ConfigurationReplayAfter != nil { + data.Set("ConfigurationReplayAfter", fmt.Sprint(*params.ConfigurationReplayAfter)) + } + if params != nil && params.ConfigurationTriggers != nil { + data.Set("ConfigurationTriggers", strings.Join(*params.ConfigurationTriggers, ",")) + } + if params != nil && params.ConfigurationUrl != nil { + data.Set("ConfigurationUrl", *params.ConfigurationUrl) + } + if params != nil && params.Target != nil { + data.Set("Target", *params.Target) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ConversationsV1ServiceServiceConversationServiceConversationScopedWebhook{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ConversationsV1ServiceServiceConversationServiceConversationScopedWebhook{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateServiceRoleParams Optional parameters for the method 'CreateServiceRole' type CreateServiceRoleParams struct { - FriendlyName *string `json:"FriendlyName,omitempty"` - Permission *[]string `json:"Permission,omitempty"` - Type *string `json:"Type,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Permission *[]string `json:"Permission,omitempty"` + Type *string `json:"Type,omitempty"` } /* @@ -806,46 +812,46 @@ type CreateServiceRoleParams struct { * @param "Permission" ([]string) - A permission that you grant to the new role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. The values for this parameter depend on the role's `type`. * @param "Type" (string) - The type of role. Can be: `conversation` for [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) roles or `service` for [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) roles. * @return ConversationsV1ServiceServiceRole -*/ + */ func (c *DefaultApiService) CreateServiceRole(ChatServiceSid string, params *CreateServiceRoleParams) (*ConversationsV1ServiceServiceRole, error) { - path := "/v1/Services/{ChatServiceSid}/Roles" + path := "/v1/Services/{ChatServiceSid}/Roles" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.Permission != nil { - data.Set("Permission", strings.Join(*params.Permission, ",")) -} - if params != nil && params.Type != nil { - data.Set("Type", *params.Type) -} + data := url.Values{} + headers := 0 + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Permission != nil { + data.Set("Permission", strings.Join(*params.Permission, ",")) + } + if params != nil && params.Type != nil { + data.Set("Type", *params.Type) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ConversationsV1ServiceServiceRole{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ConversationsV1ServiceServiceRole{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateServiceUserParams Optional parameters for the method 'CreateServiceUser' type CreateServiceUserParams struct { XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Identity *string `json:"Identity,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Identity *string `json:"Identity,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` } /* @@ -859,52 +865,53 @@ type CreateServiceUserParams struct { * @param "Identity" (string) - The application-defined string that uniquely identifies the resource's User within the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource). This value is often a username or an email address, and is case-sensitive. * @param "RoleSid" (string) - The SID of a service-level [Role](https://www.twilio.com/docs/conversations/api/role-resource) to assign to the user. * @return ConversationsV1ServiceServiceUser -*/ + */ func (c *DefaultApiService) CreateServiceUser(ChatServiceSid string, params *CreateServiceUserParams) (*ConversationsV1ServiceServiceUser, error) { - path := "/v1/Services/{ChatServiceSid}/Users" + path := "/v1/Services/{ChatServiceSid}/Users" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.Identity != nil { - data.Set("Identity", *params.Identity) -} - if params != nil && params.RoleSid != nil { - data.Set("RoleSid", *params.RoleSid) -} + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Identity != nil { + data.Set("Identity", *params.Identity) + } + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) + } if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ConversationsV1ServiceServiceUser{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ConversationsV1ServiceServiceUser{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateUserParams Optional parameters for the method 'CreateUser' type CreateUserParams struct { XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Identity *string `json:"Identity,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Identity *string `json:"Identity,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` } /* @@ -917,44 +924,45 @@ type CreateUserParams struct { * @param "Identity" (string) - The application-defined string that uniquely identifies the resource's User within the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource). This value is often a username or an email address, and is case-sensitive. * @param "RoleSid" (string) - The SID of a service-level [Role](https://www.twilio.com/docs/conversations/api/role-resource) to assign to the user. * @return ConversationsV1User -*/ + */ func (c *DefaultApiService) CreateUser(params *CreateUserParams) (*ConversationsV1User, error) { - path := "/v1/Users" + path := "/v1/Users" - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.Identity != nil { - data.Set("Identity", *params.Identity) -} - if params != nil && params.RoleSid != nil { - data.Set("RoleSid", *params.RoleSid) -} + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Identity != nil { + data.Set("Identity", *params.Identity) + } + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) + } if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ConversationsV1User{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ConversationsV1User{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // DeleteConversationParams Optional parameters for the method 'DeleteConversation' type DeleteConversationParams struct { XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` @@ -966,28 +974,28 @@ type DeleteConversationParams struct { * @param Sid A 34 character string that uniquely identifies this resource. Can also be the `unique_name` of the Conversation. * @param optional nil or *DeleteConversationParams - Optional Parameters: * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header -*/ -func (c *DefaultApiService) DeleteConversation(Sid string, params *DeleteConversationParams) (error) { - path := "/v1/Conversations/{Sid}" + */ +func (c *DefaultApiService) DeleteConversation(Sid string, params *DeleteConversationParams) error { + path := "/v1/Conversations/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := make(map[string]interface{}) - + data := url.Values{} + headers := make(map[string]interface{}) if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } + // DeleteConversationMessageParams Optional parameters for the method 'DeleteConversationMessage' type DeleteConversationMessageParams struct { XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` @@ -1000,29 +1008,29 @@ type DeleteConversationMessageParams struct { * @param Sid A 34 character string that uniquely identifies this resource. * @param optional nil or *DeleteConversationMessageParams - Optional Parameters: * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header -*/ -func (c *DefaultApiService) DeleteConversationMessage(ConversationSid string, Sid string, params *DeleteConversationMessageParams) (error) { - path := "/v1/Conversations/{ConversationSid}/Messages/{Sid}" + */ +func (c *DefaultApiService) DeleteConversationMessage(ConversationSid string, Sid string, params *DeleteConversationMessageParams) error { + path := "/v1/Conversations/{ConversationSid}/Messages/{Sid}" path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := make(map[string]interface{}) - + data := url.Values{} + headers := make(map[string]interface{}) if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } + // DeleteConversationParticipantParams Optional parameters for the method 'DeleteConversationParticipant' type DeleteConversationParticipantParams struct { XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` @@ -1035,28 +1043,27 @@ type DeleteConversationParticipantParams struct { * @param Sid A 34 character string that uniquely identifies this resource. * @param optional nil or *DeleteConversationParticipantParams - Optional Parameters: * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header -*/ -func (c *DefaultApiService) DeleteConversationParticipant(ConversationSid string, Sid string, params *DeleteConversationParticipantParams) (error) { - path := "/v1/Conversations/{ConversationSid}/Participants/{Sid}" + */ +func (c *DefaultApiService) DeleteConversationParticipant(ConversationSid string, Sid string, params *DeleteConversationParticipantParams) error { + path := "/v1/Conversations/{ConversationSid}/Participants/{Sid}" path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := make(map[string]interface{}) - + data := url.Values{} + headers := make(map[string]interface{}) if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -1064,97 +1071,89 @@ func (c *DefaultApiService) DeleteConversationParticipant(ConversationSid string * Remove an existing webhook scoped to the conversation * @param ConversationSid The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this webhook. * @param Sid A 34 character string that uniquely identifies this resource. -*/ -func (c *DefaultApiService) DeleteConversationScopedWebhook(ConversationSid string, Sid string, ) (error) { - path := "/v1/Conversations/{ConversationSid}/Webhooks/{Sid}" + */ +func (c *DefaultApiService) DeleteConversationScopedWebhook(ConversationSid string, Sid string) error { + path := "/v1/Conversations/{ConversationSid}/Webhooks/{Sid}" path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* * DeleteCredential Method for DeleteCredential * Remove a push notification credential from your account * @param Sid A 34 character string that uniquely identifies this resource. -*/ -func (c *DefaultApiService) DeleteCredential(Sid string, ) (error) { - path := "/v1/Credentials/{Sid}" + */ +func (c *DefaultApiService) DeleteCredential(Sid string) error { + path := "/v1/Credentials/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* * DeleteRole Method for DeleteRole * Remove a user role from your account's default service * @param Sid The SID of the Role resource to delete. -*/ -func (c *DefaultApiService) DeleteRole(Sid string, ) (error) { - path := "/v1/Roles/{Sid}" + */ +func (c *DefaultApiService) DeleteRole(Sid string) error { + path := "/v1/Roles/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* * DeleteService Method for DeleteService * Remove a conversation service with all its nested resources from your account * @param Sid A 34 character string that uniquely identifies this resource. -*/ -func (c *DefaultApiService) DeleteService(Sid string, ) (error) { - path := "/v1/Services/{Sid}" + */ +func (c *DefaultApiService) DeleteService(Sid string) error { + path := "/v1/Services/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + defer resp.Body.Close() - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() - - return nil + return nil } /* @@ -1162,26 +1161,25 @@ func (c *DefaultApiService) DeleteService(Sid string, ) (error) { * Remove a push notification binding from the conversation service * @param ChatServiceSid The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) to delete the Binding resource from. * @param Sid The SID of the Binding resource to delete. -*/ -func (c *DefaultApiService) DeleteServiceBinding(ChatServiceSid string, Sid string, ) (error) { - path := "/v1/Services/{ChatServiceSid}/Bindings/{Sid}" + */ +func (c *DefaultApiService) DeleteServiceBinding(ChatServiceSid string, Sid string) error { + path := "/v1/Services/{ChatServiceSid}/Bindings/{Sid}" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } + // DeleteServiceConversationParams Optional parameters for the method 'DeleteServiceConversation' type DeleteServiceConversationParams struct { XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` @@ -1194,29 +1192,29 @@ type DeleteServiceConversationParams struct { * @param Sid A 34 character string that uniquely identifies this resource. Can also be the `unique_name` of the Conversation. * @param optional nil or *DeleteServiceConversationParams - Optional Parameters: * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header -*/ -func (c *DefaultApiService) DeleteServiceConversation(ChatServiceSid string, Sid string, params *DeleteServiceConversationParams) (error) { - path := "/v1/Services/{ChatServiceSid}/Conversations/{Sid}" + */ +func (c *DefaultApiService) DeleteServiceConversation(ChatServiceSid string, Sid string, params *DeleteServiceConversationParams) error { + path := "/v1/Services/{ChatServiceSid}/Conversations/{Sid}" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := make(map[string]interface{}) - + data := url.Values{} + headers := make(map[string]interface{}) if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } + // DeleteServiceConversationMessageParams Optional parameters for the method 'DeleteServiceConversationMessage' type DeleteServiceConversationMessageParams struct { XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` @@ -1230,30 +1228,30 @@ type DeleteServiceConversationMessageParams struct { * @param Sid A 34 character string that uniquely identifies this resource. * @param optional nil or *DeleteServiceConversationMessageParams - Optional Parameters: * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header -*/ -func (c *DefaultApiService) DeleteServiceConversationMessage(ChatServiceSid string, ConversationSid string, Sid string, params *DeleteServiceConversationMessageParams) (error) { - path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages/{Sid}" + */ +func (c *DefaultApiService) DeleteServiceConversationMessage(ChatServiceSid string, ConversationSid string, Sid string, params *DeleteServiceConversationMessageParams) error { + path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages/{Sid}" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := make(map[string]interface{}) - + data := url.Values{} + headers := make(map[string]interface{}) if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } + // DeleteServiceConversationParticipantParams Optional parameters for the method 'DeleteServiceConversationParticipant' type DeleteServiceConversationParticipantParams struct { XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` @@ -1267,29 +1265,28 @@ type DeleteServiceConversationParticipantParams struct { * @param Sid A 34 character string that uniquely identifies this resource. * @param optional nil or *DeleteServiceConversationParticipantParams - Optional Parameters: * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header -*/ -func (c *DefaultApiService) DeleteServiceConversationParticipant(ChatServiceSid string, ConversationSid string, Sid string, params *DeleteServiceConversationParticipantParams) (error) { - path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Participants/{Sid}" + */ +func (c *DefaultApiService) DeleteServiceConversationParticipant(ChatServiceSid string, ConversationSid string, Sid string, params *DeleteServiceConversationParticipantParams) error { + path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Participants/{Sid}" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := make(map[string]interface{}) - + data := url.Values{} + headers := make(map[string]interface{}) if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -1298,26 +1295,24 @@ func (c *DefaultApiService) DeleteServiceConversationParticipant(ChatServiceSid * @param ChatServiceSid The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Participant resource is associated with. * @param ConversationSid The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this webhook. * @param Sid A 34 character string that uniquely identifies this resource. -*/ -func (c *DefaultApiService) DeleteServiceConversationScopedWebhook(ChatServiceSid string, ConversationSid string, Sid string, ) (error) { - path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Webhooks/{Sid}" + */ +func (c *DefaultApiService) DeleteServiceConversationScopedWebhook(ChatServiceSid string, ConversationSid string, Sid string) error { + path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Webhooks/{Sid}" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -1325,26 +1320,25 @@ func (c *DefaultApiService) DeleteServiceConversationScopedWebhook(ChatServiceSi * Remove a user role from your service * @param ChatServiceSid The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) to delete the Role resource from. * @param Sid The SID of the Role resource to delete. -*/ -func (c *DefaultApiService) DeleteServiceRole(ChatServiceSid string, Sid string, ) (error) { - path := "/v1/Services/{ChatServiceSid}/Roles/{Sid}" + */ +func (c *DefaultApiService) DeleteServiceRole(ChatServiceSid string, Sid string) error { + path := "/v1/Services/{ChatServiceSid}/Roles/{Sid}" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } + // DeleteServiceUserParams Optional parameters for the method 'DeleteServiceUser' type DeleteServiceUserParams struct { XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` @@ -1357,29 +1351,29 @@ type DeleteServiceUserParams struct { * @param Sid The SID of the User resource to delete. This value can be either the `sid` or the `identity` of the User resource to delete. * @param optional nil or *DeleteServiceUserParams - Optional Parameters: * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header -*/ -func (c *DefaultApiService) DeleteServiceUser(ChatServiceSid string, Sid string, params *DeleteServiceUserParams) (error) { - path := "/v1/Services/{ChatServiceSid}/Users/{Sid}" + */ +func (c *DefaultApiService) DeleteServiceUser(ChatServiceSid string, Sid string, params *DeleteServiceUserParams) error { + path := "/v1/Services/{ChatServiceSid}/Users/{Sid}" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := make(map[string]interface{}) - + data := url.Values{} + headers := make(map[string]interface{}) if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } + // DeleteUserParams Optional parameters for the method 'DeleteUser' type DeleteUserParams struct { XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` @@ -1391,82 +1385,77 @@ type DeleteUserParams struct { * @param Sid The SID of the User resource to delete. This value can be either the `sid` or the `identity` of the User resource to delete. * @param optional nil or *DeleteUserParams - Optional Parameters: * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header -*/ -func (c *DefaultApiService) DeleteUser(Sid string, params *DeleteUserParams) (error) { - path := "/v1/Users/{Sid}" + */ +func (c *DefaultApiService) DeleteUser(Sid string, params *DeleteUserParams) error { + path := "/v1/Users/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := make(map[string]interface{}) - + data := url.Values{} + headers := make(map[string]interface{}) if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* * FetchConfiguration Method for FetchConfiguration * Fetch the global configuration of conversations on your account * @return ConversationsV1Configuration -*/ + */ func (c *DefaultApiService) FetchConfiguration() (*ConversationsV1Configuration, error) { - path := "/v1/Configuration" + path := "/v1/Configuration" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &ConversationsV1Configuration{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ConversationsV1Configuration{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * FetchConfigurationWebhook Method for FetchConfigurationWebhook * @return ConversationsV1ConfigurationConfigurationWebhook -*/ + */ func (c *DefaultApiService) FetchConfigurationWebhook() (*ConversationsV1ConfigurationConfigurationWebhook, error) { - path := "/v1/Configuration/Webhooks" + path := "/v1/Configuration/Webhooks" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &ConversationsV1ConfigurationConfigurationWebhook{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ConversationsV1ConfigurationConfigurationWebhook{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -1474,29 +1463,27 @@ func (c *DefaultApiService) FetchConfigurationWebhook() (*ConversationsV1Configu * Fetch a conversation from your account's default service * @param Sid A 34 character string that uniquely identifies this resource. Can also be the `unique_name` of the Conversation. * @return ConversationsV1Conversation -*/ -func (c *DefaultApiService) FetchConversation(Sid string, ) (*ConversationsV1Conversation, error) { - path := "/v1/Conversations/{Sid}" + */ +func (c *DefaultApiService) FetchConversation(Sid string) (*ConversationsV1Conversation, error) { + path := "/v1/Conversations/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &ConversationsV1Conversation{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ConversationsV1Conversation{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -1505,30 +1492,28 @@ func (c *DefaultApiService) FetchConversation(Sid string, ) (*ConversationsV1Con * @param ConversationSid The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this message. * @param Sid A 34 character string that uniquely identifies this resource. * @return ConversationsV1ConversationConversationMessage -*/ -func (c *DefaultApiService) FetchConversationMessage(ConversationSid string, Sid string, ) (*ConversationsV1ConversationConversationMessage, error) { - path := "/v1/Conversations/{ConversationSid}/Messages/{Sid}" + */ +func (c *DefaultApiService) FetchConversationMessage(ConversationSid string, Sid string) (*ConversationsV1ConversationConversationMessage, error) { + path := "/v1/Conversations/{ConversationSid}/Messages/{Sid}" path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ConversationsV1ConversationConversationMessage{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ConversationsV1ConversationConversationMessage{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -1538,31 +1523,29 @@ func (c *DefaultApiService) FetchConversationMessage(ConversationSid string, Sid * @param MessageSid The SID of the message within a [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) the delivery receipt belongs to. * @param Sid A 34 character string that uniquely identifies this resource. * @return ConversationsV1ConversationConversationMessageConversationMessageReceipt -*/ -func (c *DefaultApiService) FetchConversationMessageReceipt(ConversationSid string, MessageSid string, Sid string, ) (*ConversationsV1ConversationConversationMessageConversationMessageReceipt, error) { - path := "/v1/Conversations/{ConversationSid}/Messages/{MessageSid}/Receipts/{Sid}" + */ +func (c *DefaultApiService) FetchConversationMessageReceipt(ConversationSid string, MessageSid string, Sid string) (*ConversationsV1ConversationConversationMessageConversationMessageReceipt, error) { + path := "/v1/Conversations/{ConversationSid}/Messages/{MessageSid}/Receipts/{Sid}" path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) path = strings.Replace(path, "{"+"MessageSid"+"}", MessageSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ConversationsV1ConversationConversationMessageConversationMessageReceipt{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ConversationsV1ConversationConversationMessageConversationMessageReceipt{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -1571,30 +1554,28 @@ func (c *DefaultApiService) FetchConversationMessageReceipt(ConversationSid stri * @param ConversationSid The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this participant. * @param Sid A 34 character string that uniquely identifies this resource. * @return ConversationsV1ConversationConversationParticipant -*/ -func (c *DefaultApiService) FetchConversationParticipant(ConversationSid string, Sid string, ) (*ConversationsV1ConversationConversationParticipant, error) { - path := "/v1/Conversations/{ConversationSid}/Participants/{Sid}" + */ +func (c *DefaultApiService) FetchConversationParticipant(ConversationSid string, Sid string) (*ConversationsV1ConversationConversationParticipant, error) { + path := "/v1/Conversations/{ConversationSid}/Participants/{Sid}" path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ConversationsV1ConversationConversationParticipant{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ConversationsV1ConversationConversationParticipant{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -1603,30 +1584,28 @@ func (c *DefaultApiService) FetchConversationParticipant(ConversationSid string, * @param ConversationSid The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this webhook. * @param Sid A 34 character string that uniquely identifies this resource. * @return ConversationsV1ConversationConversationScopedWebhook -*/ -func (c *DefaultApiService) FetchConversationScopedWebhook(ConversationSid string, Sid string, ) (*ConversationsV1ConversationConversationScopedWebhook, error) { - path := "/v1/Conversations/{ConversationSid}/Webhooks/{Sid}" + */ +func (c *DefaultApiService) FetchConversationScopedWebhook(ConversationSid string, Sid string) (*ConversationsV1ConversationConversationScopedWebhook, error) { + path := "/v1/Conversations/{ConversationSid}/Webhooks/{Sid}" path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ConversationsV1ConversationConversationScopedWebhook{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ConversationsV1ConversationConversationScopedWebhook{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -1634,29 +1613,27 @@ func (c *DefaultApiService) FetchConversationScopedWebhook(ConversationSid strin * Fetch a push notification credential from your account * @param Sid A 34 character string that uniquely identifies this resource. * @return ConversationsV1Credential -*/ -func (c *DefaultApiService) FetchCredential(Sid string, ) (*ConversationsV1Credential, error) { - path := "/v1/Credentials/{Sid}" + */ +func (c *DefaultApiService) FetchCredential(Sid string) (*ConversationsV1Credential, error) { + path := "/v1/Credentials/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ConversationsV1Credential{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ConversationsV1Credential{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -1664,29 +1641,27 @@ func (c *DefaultApiService) FetchCredential(Sid string, ) (*ConversationsV1Crede * Fetch a user role from your account's default service * @param Sid The SID of the Role resource to fetch. * @return ConversationsV1Role -*/ -func (c *DefaultApiService) FetchRole(Sid string, ) (*ConversationsV1Role, error) { - path := "/v1/Roles/{Sid}" + */ +func (c *DefaultApiService) FetchRole(Sid string) (*ConversationsV1Role, error) { + path := "/v1/Roles/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ConversationsV1Role{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ConversationsV1Role{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -1694,29 +1669,27 @@ func (c *DefaultApiService) FetchRole(Sid string, ) (*ConversationsV1Role, error * Fetch a conversation service from your account * @param Sid A 34 character string that uniquely identifies this resource. * @return ConversationsV1Service -*/ -func (c *DefaultApiService) FetchService(Sid string, ) (*ConversationsV1Service, error) { - path := "/v1/Services/{Sid}" + */ +func (c *DefaultApiService) FetchService(Sid string) (*ConversationsV1Service, error) { + path := "/v1/Services/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ConversationsV1Service{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ConversationsV1Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -1725,30 +1698,28 @@ func (c *DefaultApiService) FetchService(Sid string, ) (*ConversationsV1Service, * @param ChatServiceSid The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Binding resource is associated with. * @param Sid A 34 character string that uniquely identifies this resource. * @return ConversationsV1ServiceServiceBinding -*/ -func (c *DefaultApiService) FetchServiceBinding(ChatServiceSid string, Sid string, ) (*ConversationsV1ServiceServiceBinding, error) { - path := "/v1/Services/{ChatServiceSid}/Bindings/{Sid}" + */ +func (c *DefaultApiService) FetchServiceBinding(ChatServiceSid string, Sid string) (*ConversationsV1ServiceServiceBinding, error) { + path := "/v1/Services/{ChatServiceSid}/Bindings/{Sid}" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &ConversationsV1ServiceServiceBinding{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ConversationsV1ServiceServiceBinding{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -1756,29 +1727,27 @@ func (c *DefaultApiService) FetchServiceBinding(ChatServiceSid string, Sid strin * Fetch the configuration of a conversation service * @param ChatServiceSid The SID of the Service configuration resource to fetch. * @return ConversationsV1ServiceServiceConfiguration -*/ -func (c *DefaultApiService) FetchServiceConfiguration(ChatServiceSid string, ) (*ConversationsV1ServiceServiceConfiguration, error) { - path := "/v1/Services/{ChatServiceSid}/Configuration" + */ +func (c *DefaultApiService) FetchServiceConfiguration(ChatServiceSid string) (*ConversationsV1ServiceServiceConfiguration, error) { + path := "/v1/Services/{ChatServiceSid}/Configuration" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &ConversationsV1ServiceServiceConfiguration{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ConversationsV1ServiceServiceConfiguration{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -1787,30 +1756,28 @@ func (c *DefaultApiService) FetchServiceConfiguration(ChatServiceSid string, ) ( * @param ChatServiceSid The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Conversation resource is associated with. * @param Sid A 34 character string that uniquely identifies this resource. Can also be the `unique_name` of the Conversation. * @return ConversationsV1ServiceServiceConversation -*/ -func (c *DefaultApiService) FetchServiceConversation(ChatServiceSid string, Sid string, ) (*ConversationsV1ServiceServiceConversation, error) { - path := "/v1/Services/{ChatServiceSid}/Conversations/{Sid}" + */ +func (c *DefaultApiService) FetchServiceConversation(ChatServiceSid string, Sid string) (*ConversationsV1ServiceServiceConversation, error) { + path := "/v1/Services/{ChatServiceSid}/Conversations/{Sid}" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &ConversationsV1ServiceServiceConversation{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ConversationsV1ServiceServiceConversation{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -1820,31 +1787,29 @@ func (c *DefaultApiService) FetchServiceConversation(ChatServiceSid string, Sid * @param ConversationSid The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this message. * @param Sid A 34 character string that uniquely identifies this resource. * @return ConversationsV1ServiceServiceConversationServiceConversationMessage -*/ -func (c *DefaultApiService) FetchServiceConversationMessage(ChatServiceSid string, ConversationSid string, Sid string, ) (*ConversationsV1ServiceServiceConversationServiceConversationMessage, error) { - path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages/{Sid}" + */ +func (c *DefaultApiService) FetchServiceConversationMessage(ChatServiceSid string, ConversationSid string, Sid string) (*ConversationsV1ServiceServiceConversationServiceConversationMessage, error) { + path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages/{Sid}" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &ConversationsV1ServiceServiceConversationServiceConversationMessage{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ConversationsV1ServiceServiceConversationServiceConversationMessage{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -1855,32 +1820,30 @@ func (c *DefaultApiService) FetchServiceConversationMessage(ChatServiceSid strin * @param MessageSid The SID of the message within a [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) the delivery receipt belongs to. * @param Sid A 34 character string that uniquely identifies this resource. * @return ConversationsV1ServiceServiceConversationServiceConversationMessageServiceConversationMessageReceipt -*/ -func (c *DefaultApiService) FetchServiceConversationMessageReceipt(ChatServiceSid string, ConversationSid string, MessageSid string, Sid string, ) (*ConversationsV1ServiceServiceConversationServiceConversationMessageServiceConversationMessageReceipt, error) { - path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages/{MessageSid}/Receipts/{Sid}" + */ +func (c *DefaultApiService) FetchServiceConversationMessageReceipt(ChatServiceSid string, ConversationSid string, MessageSid string, Sid string) (*ConversationsV1ServiceServiceConversationServiceConversationMessageServiceConversationMessageReceipt, error) { + path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages/{MessageSid}/Receipts/{Sid}" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) path = strings.Replace(path, "{"+"MessageSid"+"}", MessageSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ConversationsV1ServiceServiceConversationServiceConversationMessageServiceConversationMessageReceipt{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ConversationsV1ServiceServiceConversationServiceConversationMessageServiceConversationMessageReceipt{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -1890,31 +1853,29 @@ func (c *DefaultApiService) FetchServiceConversationMessageReceipt(ChatServiceSi * @param ConversationSid The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this participant. * @param Sid A 34 character string that uniquely identifies this resource. * @return ConversationsV1ServiceServiceConversationServiceConversationParticipant -*/ -func (c *DefaultApiService) FetchServiceConversationParticipant(ChatServiceSid string, ConversationSid string, Sid string, ) (*ConversationsV1ServiceServiceConversationServiceConversationParticipant, error) { - path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Participants/{Sid}" + */ +func (c *DefaultApiService) FetchServiceConversationParticipant(ChatServiceSid string, ConversationSid string, Sid string) (*ConversationsV1ServiceServiceConversationServiceConversationParticipant, error) { + path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Participants/{Sid}" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ConversationsV1ServiceServiceConversationServiceConversationParticipant{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ConversationsV1ServiceServiceConversationServiceConversationParticipant{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -1924,31 +1885,29 @@ func (c *DefaultApiService) FetchServiceConversationParticipant(ChatServiceSid s * @param ConversationSid The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this webhook. * @param Sid A 34 character string that uniquely identifies this resource. * @return ConversationsV1ServiceServiceConversationServiceConversationScopedWebhook -*/ -func (c *DefaultApiService) FetchServiceConversationScopedWebhook(ChatServiceSid string, ConversationSid string, Sid string, ) (*ConversationsV1ServiceServiceConversationServiceConversationScopedWebhook, error) { - path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Webhooks/{Sid}" + */ +func (c *DefaultApiService) FetchServiceConversationScopedWebhook(ChatServiceSid string, ConversationSid string, Sid string) (*ConversationsV1ServiceServiceConversationServiceConversationScopedWebhook, error) { + path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Webhooks/{Sid}" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ConversationsV1ServiceServiceConversationServiceConversationScopedWebhook{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ConversationsV1ServiceServiceConversationServiceConversationScopedWebhook{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -1956,29 +1915,27 @@ func (c *DefaultApiService) FetchServiceConversationScopedWebhook(ChatServiceSid * Fetch push notification service settings * @param ChatServiceSid The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Configuration applies to. * @return ConversationsV1ServiceServiceConfigurationServiceNotification -*/ -func (c *DefaultApiService) FetchServiceNotification(ChatServiceSid string, ) (*ConversationsV1ServiceServiceConfigurationServiceNotification, error) { - path := "/v1/Services/{ChatServiceSid}/Configuration/Notifications" + */ +func (c *DefaultApiService) FetchServiceNotification(ChatServiceSid string) (*ConversationsV1ServiceServiceConfigurationServiceNotification, error) { + path := "/v1/Services/{ChatServiceSid}/Configuration/Notifications" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ConversationsV1ServiceServiceConfigurationServiceNotification{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ConversationsV1ServiceServiceConfigurationServiceNotification{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -1987,30 +1944,28 @@ func (c *DefaultApiService) FetchServiceNotification(ChatServiceSid string, ) (* * @param ChatServiceSid The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) to fetch the Role resource from. * @param Sid The SID of the Role resource to fetch. * @return ConversationsV1ServiceServiceRole -*/ -func (c *DefaultApiService) FetchServiceRole(ChatServiceSid string, Sid string, ) (*ConversationsV1ServiceServiceRole, error) { - path := "/v1/Services/{ChatServiceSid}/Roles/{Sid}" + */ +func (c *DefaultApiService) FetchServiceRole(ChatServiceSid string, Sid string) (*ConversationsV1ServiceServiceRole, error) { + path := "/v1/Services/{ChatServiceSid}/Roles/{Sid}" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ConversationsV1ServiceServiceRole{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ConversationsV1ServiceServiceRole{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -2019,30 +1974,28 @@ func (c *DefaultApiService) FetchServiceRole(ChatServiceSid string, Sid string, * @param ChatServiceSid The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) to fetch the User resource from. * @param Sid The SID of the User resource to fetch. This value can be either the `sid` or the `identity` of the User resource to fetch. * @return ConversationsV1ServiceServiceUser -*/ -func (c *DefaultApiService) FetchServiceUser(ChatServiceSid string, Sid string, ) (*ConversationsV1ServiceServiceUser, error) { - path := "/v1/Services/{ChatServiceSid}/Users/{Sid}" + */ +func (c *DefaultApiService) FetchServiceUser(ChatServiceSid string, Sid string) (*ConversationsV1ServiceServiceUser, error) { + path := "/v1/Services/{ChatServiceSid}/Users/{Sid}" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ConversationsV1ServiceServiceUser{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ConversationsV1ServiceServiceUser{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -2050,30 +2003,29 @@ func (c *DefaultApiService) FetchServiceUser(ChatServiceSid string, Sid string, * Fetch a conversation user from your account's default service * @param Sid The SID of the User resource to fetch. This value can be either the `sid` or the `identity` of the User resource to fetch. * @return ConversationsV1User -*/ -func (c *DefaultApiService) FetchUser(Sid string, ) (*ConversationsV1User, error) { - path := "/v1/Users/{Sid}" + */ +func (c *DefaultApiService) FetchUser(Sid string) (*ConversationsV1User, error) { + path := "/v1/Users/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ConversationsV1User{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ConversationsV1User{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListConversationParams Optional parameters for the method 'ListConversation' type ListConversationParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -2085,32 +2037,32 @@ type ListConversationParams struct { * @param optional nil or *ListConversationParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListConversationResponse -*/ + */ func (c *DefaultApiService) ListConversation(params *ListConversationParams) (*ListConversationResponse, error) { - path := "/v1/Conversations" + path := "/v1/Conversations" - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListConversationResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListConversationResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListConversationMessageParams Optional parameters for the method 'ListConversationMessage' type ListConversationMessageParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -2123,33 +2075,33 @@ type ListConversationMessageParams struct { * @param optional nil or *ListConversationMessageParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListConversationMessageResponse -*/ + */ func (c *DefaultApiService) ListConversationMessage(ConversationSid string, params *ListConversationMessageParams) (*ListConversationMessageResponse, error) { - path := "/v1/Conversations/{ConversationSid}/Messages" + path := "/v1/Conversations/{ConversationSid}/Messages" path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListConversationMessageResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListConversationMessageResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListConversationMessageReceiptParams Optional parameters for the method 'ListConversationMessageReceipt' type ListConversationMessageReceiptParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -2163,34 +2115,34 @@ type ListConversationMessageReceiptParams struct { * @param optional nil or *ListConversationMessageReceiptParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListConversationMessageReceiptResponse -*/ + */ func (c *DefaultApiService) ListConversationMessageReceipt(ConversationSid string, MessageSid string, params *ListConversationMessageReceiptParams) (*ListConversationMessageReceiptResponse, error) { - path := "/v1/Conversations/{ConversationSid}/Messages/{MessageSid}/Receipts" + path := "/v1/Conversations/{ConversationSid}/Messages/{MessageSid}/Receipts" path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) path = strings.Replace(path, "{"+"MessageSid"+"}", MessageSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListConversationMessageReceiptResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListConversationMessageReceiptResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListConversationParticipantParams Optional parameters for the method 'ListConversationParticipant' type ListConversationParticipantParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -2203,33 +2155,33 @@ type ListConversationParticipantParams struct { * @param optional nil or *ListConversationParticipantParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListConversationParticipantResponse -*/ + */ func (c *DefaultApiService) ListConversationParticipant(ConversationSid string, params *ListConversationParticipantParams) (*ListConversationParticipantResponse, error) { - path := "/v1/Conversations/{ConversationSid}/Participants" + path := "/v1/Conversations/{ConversationSid}/Participants" path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListConversationParticipantResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListConversationParticipantResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListConversationScopedWebhookParams Optional parameters for the method 'ListConversationScopedWebhook' type ListConversationScopedWebhookParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -2242,33 +2194,33 @@ type ListConversationScopedWebhookParams struct { * @param optional nil or *ListConversationScopedWebhookParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListConversationScopedWebhookResponse -*/ + */ func (c *DefaultApiService) ListConversationScopedWebhook(ConversationSid string, params *ListConversationScopedWebhookParams) (*ListConversationScopedWebhookResponse, error) { - path := "/v1/Conversations/{ConversationSid}/Webhooks" + path := "/v1/Conversations/{ConversationSid}/Webhooks" path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListConversationScopedWebhookResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListConversationScopedWebhookResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListCredentialParams Optional parameters for the method 'ListCredential' type ListCredentialParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -2280,32 +2232,32 @@ type ListCredentialParams struct { * @param optional nil or *ListCredentialParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListCredentialResponse -*/ + */ func (c *DefaultApiService) ListCredential(params *ListCredentialParams) (*ListCredentialResponse, error) { - path := "/v1/Credentials" - - data := url.Values{} - headers := 0 + path := "/v1/Credentials" - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListCredentialResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListCredentialResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListRoleParams Optional parameters for the method 'ListRole' type ListRoleParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -2317,32 +2269,32 @@ type ListRoleParams struct { * @param optional nil or *ListRoleParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListRoleResponse -*/ + */ func (c *DefaultApiService) ListRole(params *ListRoleParams) (*ListRoleResponse, error) { - path := "/v1/Roles" + path := "/v1/Roles" - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListRoleResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListRoleResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListServiceParams Optional parameters for the method 'ListService' type ListServiceParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -2354,37 +2306,37 @@ type ListServiceParams struct { * @param optional nil or *ListServiceParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListServiceResponse -*/ + */ func (c *DefaultApiService) ListService(params *ListServiceParams) (*ListServiceResponse, error) { - path := "/v1/Services" - - data := url.Values{} - headers := 0 + path := "/v1/Services" - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListServiceResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListServiceResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListServiceBindingParams Optional parameters for the method 'ListServiceBinding' type ListServiceBindingParams struct { BindingType *[]string `json:"BindingType,omitempty"` - Identity *[]string `json:"Identity,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + Identity *[]string `json:"Identity,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -2396,39 +2348,39 @@ type ListServiceBindingParams struct { * @param "Identity" ([]string) - The identity of a [Conversation User](https://www.twilio.com/docs/conversations/api/user-resource) this binding belongs to. See [access tokens](https://www.twilio.com/docs/conversations/create-tokens) for more details. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListServiceBindingResponse -*/ + */ func (c *DefaultApiService) ListServiceBinding(ChatServiceSid string, params *ListServiceBindingParams) (*ListServiceBindingResponse, error) { - path := "/v1/Services/{ChatServiceSid}/Bindings" + path := "/v1/Services/{ChatServiceSid}/Bindings" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.BindingType != nil { - data.Set("BindingType", strings.Join(*params.BindingType, ",")) -} - if params != nil && params.Identity != nil { - data.Set("Identity", strings.Join(*params.Identity, ",")) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.BindingType != nil { + data.Set("BindingType", strings.Join(*params.BindingType, ",")) + } + if params != nil && params.Identity != nil { + data.Set("Identity", strings.Join(*params.Identity, ",")) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListServiceBindingResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListServiceBindingResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListServiceConversationParams Optional parameters for the method 'ListServiceConversation' type ListServiceConversationParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -2441,33 +2393,33 @@ type ListServiceConversationParams struct { * @param optional nil or *ListServiceConversationParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListServiceConversationResponse -*/ + */ func (c *DefaultApiService) ListServiceConversation(ChatServiceSid string, params *ListServiceConversationParams) (*ListServiceConversationResponse, error) { - path := "/v1/Services/{ChatServiceSid}/Conversations" + path := "/v1/Services/{ChatServiceSid}/Conversations" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListServiceConversationResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListServiceConversationResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListServiceConversationMessageParams Optional parameters for the method 'ListServiceConversationMessage' type ListServiceConversationMessageParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -2481,34 +2433,34 @@ type ListServiceConversationMessageParams struct { * @param optional nil or *ListServiceConversationMessageParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListServiceConversationMessageResponse -*/ + */ func (c *DefaultApiService) ListServiceConversationMessage(ChatServiceSid string, ConversationSid string, params *ListServiceConversationMessageParams) (*ListServiceConversationMessageResponse, error) { - path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages" + path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListServiceConversationMessageResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListServiceConversationMessageResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListServiceConversationMessageReceiptParams Optional parameters for the method 'ListServiceConversationMessageReceipt' type ListServiceConversationMessageReceiptParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -2523,35 +2475,35 @@ type ListServiceConversationMessageReceiptParams struct { * @param optional nil or *ListServiceConversationMessageReceiptParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListServiceConversationMessageReceiptResponse -*/ + */ func (c *DefaultApiService) ListServiceConversationMessageReceipt(ChatServiceSid string, ConversationSid string, MessageSid string, params *ListServiceConversationMessageReceiptParams) (*ListServiceConversationMessageReceiptResponse, error) { - path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages/{MessageSid}/Receipts" + path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages/{MessageSid}/Receipts" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) path = strings.Replace(path, "{"+"MessageSid"+"}", MessageSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListServiceConversationMessageReceiptResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListServiceConversationMessageReceiptResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListServiceConversationParticipantParams Optional parameters for the method 'ListServiceConversationParticipant' type ListServiceConversationParticipantParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -2565,34 +2517,34 @@ type ListServiceConversationParticipantParams struct { * @param optional nil or *ListServiceConversationParticipantParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListServiceConversationParticipantResponse -*/ + */ func (c *DefaultApiService) ListServiceConversationParticipant(ChatServiceSid string, ConversationSid string, params *ListServiceConversationParticipantParams) (*ListServiceConversationParticipantResponse, error) { - path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Participants" + path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Participants" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListServiceConversationParticipantResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListServiceConversationParticipantResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListServiceConversationScopedWebhookParams Optional parameters for the method 'ListServiceConversationScopedWebhook' type ListServiceConversationScopedWebhookParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -2606,34 +2558,34 @@ type ListServiceConversationScopedWebhookParams struct { * @param optional nil or *ListServiceConversationScopedWebhookParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListServiceConversationScopedWebhookResponse -*/ + */ func (c *DefaultApiService) ListServiceConversationScopedWebhook(ChatServiceSid string, ConversationSid string, params *ListServiceConversationScopedWebhookParams) (*ListServiceConversationScopedWebhookResponse, error) { - path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Webhooks" + path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Webhooks" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListServiceConversationScopedWebhookResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListServiceConversationScopedWebhookResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListServiceRoleParams Optional parameters for the method 'ListServiceRole' type ListServiceRoleParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -2646,33 +2598,33 @@ type ListServiceRoleParams struct { * @param optional nil or *ListServiceRoleParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListServiceRoleResponse -*/ + */ func (c *DefaultApiService) ListServiceRole(ChatServiceSid string, params *ListServiceRoleParams) (*ListServiceRoleResponse, error) { - path := "/v1/Services/{ChatServiceSid}/Roles" + path := "/v1/Services/{ChatServiceSid}/Roles" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListServiceRoleResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListServiceRoleResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListServiceUserParams Optional parameters for the method 'ListServiceUser' type ListServiceUserParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -2685,33 +2637,33 @@ type ListServiceUserParams struct { * @param optional nil or *ListServiceUserParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListServiceUserResponse -*/ + */ func (c *DefaultApiService) ListServiceUser(ChatServiceSid string, params *ListServiceUserParams) (*ListServiceUserResponse, error) { - path := "/v1/Services/{ChatServiceSid}/Users" + path := "/v1/Services/{ChatServiceSid}/Users" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListServiceUserResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListServiceUserResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListUserParams Optional parameters for the method 'ListUser' type ListUserParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -2723,37 +2675,37 @@ type ListUserParams struct { * @param optional nil or *ListUserParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListUserResponse -*/ + */ func (c *DefaultApiService) ListUser(params *ListUserParams) (*ListUserResponse, error) { - path := "/v1/Users" - - data := url.Values{} - headers := 0 + path := "/v1/Users" - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListUserResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListUserResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateConfigurationParams Optional parameters for the method 'UpdateConfiguration' type UpdateConfigurationParams struct { - DefaultChatServiceSid *string `json:"DefaultChatServiceSid,omitempty"` - DefaultClosedTimer *string `json:"DefaultClosedTimer,omitempty"` - DefaultInactiveTimer *string `json:"DefaultInactiveTimer,omitempty"` + DefaultChatServiceSid *string `json:"DefaultChatServiceSid,omitempty"` + DefaultClosedTimer *string `json:"DefaultClosedTimer,omitempty"` + DefaultInactiveTimer *string `json:"DefaultInactiveTimer,omitempty"` DefaultMessagingServiceSid *string `json:"DefaultMessagingServiceSid,omitempty"` } @@ -2766,48 +2718,48 @@ type UpdateConfigurationParams struct { * @param "DefaultInactiveTimer" (string) - Default ISO8601 duration when conversation will be switched to `inactive` state. Minimum value for this timer is 1 minute. * @param "DefaultMessagingServiceSid" (string) - The SID of the default [Messaging Service](https://www.twilio.com/docs/sms/services/api) to use when creating a conversation. * @return ConversationsV1Configuration -*/ + */ func (c *DefaultApiService) UpdateConfiguration(params *UpdateConfigurationParams) (*ConversationsV1Configuration, error) { - path := "/v1/Configuration" + path := "/v1/Configuration" - data := url.Values{} - headers := 0 - - if params != nil && params.DefaultChatServiceSid != nil { - data.Set("DefaultChatServiceSid", *params.DefaultChatServiceSid) -} - if params != nil && params.DefaultClosedTimer != nil { - data.Set("DefaultClosedTimer", *params.DefaultClosedTimer) -} - if params != nil && params.DefaultInactiveTimer != nil { - data.Set("DefaultInactiveTimer", *params.DefaultInactiveTimer) -} - if params != nil && params.DefaultMessagingServiceSid != nil { - data.Set("DefaultMessagingServiceSid", *params.DefaultMessagingServiceSid) -} + data := url.Values{} + headers := 0 + if params != nil && params.DefaultChatServiceSid != nil { + data.Set("DefaultChatServiceSid", *params.DefaultChatServiceSid) + } + if params != nil && params.DefaultClosedTimer != nil { + data.Set("DefaultClosedTimer", *params.DefaultClosedTimer) + } + if params != nil && params.DefaultInactiveTimer != nil { + data.Set("DefaultInactiveTimer", *params.DefaultInactiveTimer) + } + if params != nil && params.DefaultMessagingServiceSid != nil { + data.Set("DefaultMessagingServiceSid", *params.DefaultMessagingServiceSid) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ConversationsV1Configuration{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ConversationsV1Configuration{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateConfigurationWebhookParams Optional parameters for the method 'UpdateConfigurationWebhook' type UpdateConfigurationWebhookParams struct { - Filters *[]string `json:"Filters,omitempty"` - Method *string `json:"Method,omitempty"` - PostWebhookUrl *string `json:"PostWebhookUrl,omitempty"` - PreWebhookUrl *string `json:"PreWebhookUrl,omitempty"` - Target *string `json:"Target,omitempty"` + Filters *[]string `json:"Filters,omitempty"` + Method *string `json:"Method,omitempty"` + PostWebhookUrl *string `json:"PostWebhookUrl,omitempty"` + PreWebhookUrl *string `json:"PreWebhookUrl,omitempty"` + Target *string `json:"Target,omitempty"` } /* @@ -2819,56 +2771,56 @@ type UpdateConfigurationWebhookParams struct { * @param "PreWebhookUrl" (string) - The absolute url the pre-event webhook request should be sent to. * @param "Target" (string) - The routing target of the webhook. * @return ConversationsV1ConfigurationConfigurationWebhook -*/ + */ func (c *DefaultApiService) UpdateConfigurationWebhook(params *UpdateConfigurationWebhookParams) (*ConversationsV1ConfigurationConfigurationWebhook, error) { - path := "/v1/Configuration/Webhooks" + path := "/v1/Configuration/Webhooks" - data := url.Values{} - headers := 0 - - if params != nil && params.Filters != nil { - data.Set("Filters", strings.Join(*params.Filters, ",")) -} - if params != nil && params.Method != nil { - data.Set("Method", *params.Method) -} - if params != nil && params.PostWebhookUrl != nil { - data.Set("PostWebhookUrl", *params.PostWebhookUrl) -} - if params != nil && params.PreWebhookUrl != nil { - data.Set("PreWebhookUrl", *params.PreWebhookUrl) -} - if params != nil && params.Target != nil { - data.Set("Target", *params.Target) -} + data := url.Values{} + headers := 0 + if params != nil && params.Filters != nil { + data.Set("Filters", strings.Join(*params.Filters, ",")) + } + if params != nil && params.Method != nil { + data.Set("Method", *params.Method) + } + if params != nil && params.PostWebhookUrl != nil { + data.Set("PostWebhookUrl", *params.PostWebhookUrl) + } + if params != nil && params.PreWebhookUrl != nil { + data.Set("PreWebhookUrl", *params.PreWebhookUrl) + } + if params != nil && params.Target != nil { + data.Set("Target", *params.Target) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ConversationsV1ConfigurationConfigurationWebhook{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ConversationsV1ConfigurationConfigurationWebhook{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateConversationParams Optional parameters for the method 'UpdateConversation' type UpdateConversationParams struct { - XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - MessagingServiceSid *string `json:"MessagingServiceSid,omitempty"` - State *string `json:"State,omitempty"` - TimersClosed *string `json:"Timers.Closed,omitempty"` - TimersInactive *string `json:"Timers.Inactive,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + MessagingServiceSid *string `json:"MessagingServiceSid,omitempty"` + State *string `json:"State,omitempty"` + TimersClosed *string `json:"Timers.Closed,omitempty"` + TimersInactive *string `json:"Timers.Inactive,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` } /* @@ -2887,68 +2839,69 @@ type UpdateConversationParams struct { * @param "TimersInactive" (string) - ISO8601 duration when conversation will be switched to `inactive` state. Minimum value for this timer is 1 minute. * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. * @return ConversationsV1Conversation -*/ + */ func (c *DefaultApiService) UpdateConversation(Sid string, params *UpdateConversationParams) (*ConversationsV1Conversation, error) { - path := "/v1/Conversations/{Sid}" + path := "/v1/Conversations/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) -} - if params != nil && params.DateCreated != nil { - data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) -} - if params != nil && params.DateUpdated != nil { - data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.MessagingServiceSid != nil { - data.Set("MessagingServiceSid", *params.MessagingServiceSid) -} - if params != nil && params.State != nil { - data.Set("State", *params.State) -} - if params != nil && params.TimersClosed != nil { - data.Set("TimersClosed", *params.TimersClosed) -} - if params != nil && params.TimersInactive != nil { - data.Set("TimersInactive", *params.TimersInactive) -} - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) -} + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) + } + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.MessagingServiceSid != nil { + data.Set("MessagingServiceSid", *params.MessagingServiceSid) + } + if params != nil && params.State != nil { + data.Set("State", *params.State) + } + if params != nil && params.TimersClosed != nil { + data.Set("TimersClosed", *params.TimersClosed) + } + if params != nil && params.TimersInactive != nil { + data.Set("TimersInactive", *params.TimersInactive) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ConversationsV1Conversation{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ConversationsV1Conversation{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateConversationMessageParams Optional parameters for the method 'UpdateConversationMessage' type UpdateConversationMessageParams struct { - XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - Author *string `json:"Author,omitempty"` - Body *string `json:"Body,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + Author *string `json:"Author,omitempty"` + Body *string `json:"Body,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` } /* @@ -2964,61 +2917,62 @@ type UpdateConversationMessageParams struct { * @param "DateCreated" (time.Time) - The date that this resource was created. * @param "DateUpdated" (time.Time) - The date that this resource was last updated. `null` if the message has not been edited. * @return ConversationsV1ConversationConversationMessage -*/ + */ func (c *DefaultApiService) UpdateConversationMessage(ConversationSid string, Sid string, params *UpdateConversationMessageParams) (*ConversationsV1ConversationConversationMessage, error) { - path := "/v1/Conversations/{ConversationSid}/Messages/{Sid}" + path := "/v1/Conversations/{ConversationSid}/Messages/{Sid}" path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) -} - if params != nil && params.Author != nil { - data.Set("Author", *params.Author) -} - if params != nil && params.Body != nil { - data.Set("Body", *params.Body) -} - if params != nil && params.DateCreated != nil { - data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) -} - if params != nil && params.DateUpdated != nil { - data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) -} + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.Author != nil { + data.Set("Author", *params.Author) + } + if params != nil && params.Body != nil { + data.Set("Body", *params.Body) + } + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) + } + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) + } if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ConversationsV1ConversationConversationMessage{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ConversationsV1ConversationConversationMessage{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateConversationParticipantParams Optional parameters for the method 'UpdateConversationParticipant' type UpdateConversationParticipantParams struct { - XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Identity *string `json:"Identity,omitempty"` - LastReadMessageIndex *int32 `json:"LastReadMessageIndex,omitempty"` - LastReadTimestamp *string `json:"LastReadTimestamp,omitempty"` - MessagingBindingProjectedAddress *string `json:"MessagingBinding.ProjectedAddress,omitempty"` - MessagingBindingProxyAddress *string `json:"MessagingBinding.ProxyAddress,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + Identity *string `json:"Identity,omitempty"` + LastReadMessageIndex *int32 `json:"LastReadMessageIndex,omitempty"` + LastReadTimestamp *string `json:"LastReadTimestamp,omitempty"` + MessagingBindingProjectedAddress *string `json:"MessagingBinding.ProjectedAddress,omitempty"` + MessagingBindingProxyAddress *string `json:"MessagingBinding.ProxyAddress,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` } /* @@ -3038,68 +2992,69 @@ type UpdateConversationParticipantParams struct { * @param "MessagingBindingProxyAddress" (string) - The address of the Twilio phone number that the participant is in contact with. 'null' value will remove it. * @param "RoleSid" (string) - The SID of a conversation-level [Role](https://www.twilio.com/docs/conversations/api/role-resource) to assign to the participant. * @return ConversationsV1ConversationConversationParticipant -*/ + */ func (c *DefaultApiService) UpdateConversationParticipant(ConversationSid string, Sid string, params *UpdateConversationParticipantParams) (*ConversationsV1ConversationConversationParticipant, error) { - path := "/v1/Conversations/{ConversationSid}/Participants/{Sid}" + path := "/v1/Conversations/{ConversationSid}/Participants/{Sid}" path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) -} - if params != nil && params.DateCreated != nil { - data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) -} - if params != nil && params.DateUpdated != nil { - data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) -} - if params != nil && params.Identity != nil { - data.Set("Identity", *params.Identity) -} - if params != nil && params.LastReadMessageIndex != nil { - data.Set("LastReadMessageIndex", fmt.Sprint(*params.LastReadMessageIndex)) -} - if params != nil && params.LastReadTimestamp != nil { - data.Set("LastReadTimestamp", *params.LastReadTimestamp) -} - if params != nil && params.MessagingBindingProjectedAddress != nil { - data.Set("MessagingBindingProjectedAddress", *params.MessagingBindingProjectedAddress) -} - if params != nil && params.MessagingBindingProxyAddress != nil { - data.Set("MessagingBindingProxyAddress", *params.MessagingBindingProxyAddress) -} - if params != nil && params.RoleSid != nil { - data.Set("RoleSid", *params.RoleSid) -} + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) + } + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) + } + if params != nil && params.Identity != nil { + data.Set("Identity", *params.Identity) + } + if params != nil && params.LastReadMessageIndex != nil { + data.Set("LastReadMessageIndex", fmt.Sprint(*params.LastReadMessageIndex)) + } + if params != nil && params.LastReadTimestamp != nil { + data.Set("LastReadTimestamp", *params.LastReadTimestamp) + } + if params != nil && params.MessagingBindingProjectedAddress != nil { + data.Set("MessagingBindingProjectedAddress", *params.MessagingBindingProjectedAddress) + } + if params != nil && params.MessagingBindingProxyAddress != nil { + data.Set("MessagingBindingProxyAddress", *params.MessagingBindingProxyAddress) + } + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) + } if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ConversationsV1ConversationConversationParticipant{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ConversationsV1ConversationConversationParticipant{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateConversationScopedWebhookParams Optional parameters for the method 'UpdateConversationScopedWebhook' type UpdateConversationScopedWebhookParams struct { - ConfigurationFilters *[]string `json:"Configuration.Filters,omitempty"` - ConfigurationFlowSid *string `json:"Configuration.FlowSid,omitempty"` - ConfigurationMethod *string `json:"Configuration.Method,omitempty"` + ConfigurationFilters *[]string `json:"Configuration.Filters,omitempty"` + ConfigurationFlowSid *string `json:"Configuration.FlowSid,omitempty"` + ConfigurationMethod *string `json:"Configuration.Method,omitempty"` ConfigurationTriggers *[]string `json:"Configuration.Triggers,omitempty"` - ConfigurationUrl *string `json:"Configuration.Url,omitempty"` + ConfigurationUrl *string `json:"Configuration.Url,omitempty"` } /* @@ -3114,55 +3069,55 @@ type UpdateConversationScopedWebhookParams struct { * @param "ConfigurationTriggers" ([]string) - The list of keywords, firing webhook event for this Conversation. * @param "ConfigurationUrl" (string) - The absolute url the webhook request should be sent to. * @return ConversationsV1ConversationConversationScopedWebhook -*/ + */ func (c *DefaultApiService) UpdateConversationScopedWebhook(ConversationSid string, Sid string, params *UpdateConversationScopedWebhookParams) (*ConversationsV1ConversationConversationScopedWebhook, error) { - path := "/v1/Conversations/{ConversationSid}/Webhooks/{Sid}" + path := "/v1/Conversations/{ConversationSid}/Webhooks/{Sid}" path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.ConfigurationFilters != nil { - data.Set("ConfigurationFilters", strings.Join(*params.ConfigurationFilters, ",")) -} - if params != nil && params.ConfigurationFlowSid != nil { - data.Set("ConfigurationFlowSid", *params.ConfigurationFlowSid) -} - if params != nil && params.ConfigurationMethod != nil { - data.Set("ConfigurationMethod", *params.ConfigurationMethod) -} - if params != nil && params.ConfigurationTriggers != nil { - data.Set("ConfigurationTriggers", strings.Join(*params.ConfigurationTriggers, ",")) -} - if params != nil && params.ConfigurationUrl != nil { - data.Set("ConfigurationUrl", *params.ConfigurationUrl) -} + data := url.Values{} + headers := 0 + if params != nil && params.ConfigurationFilters != nil { + data.Set("ConfigurationFilters", strings.Join(*params.ConfigurationFilters, ",")) + } + if params != nil && params.ConfigurationFlowSid != nil { + data.Set("ConfigurationFlowSid", *params.ConfigurationFlowSid) + } + if params != nil && params.ConfigurationMethod != nil { + data.Set("ConfigurationMethod", *params.ConfigurationMethod) + } + if params != nil && params.ConfigurationTriggers != nil { + data.Set("ConfigurationTriggers", strings.Join(*params.ConfigurationTriggers, ",")) + } + if params != nil && params.ConfigurationUrl != nil { + data.Set("ConfigurationUrl", *params.ConfigurationUrl) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ConversationsV1ConversationConversationScopedWebhook{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ConversationsV1ConversationConversationScopedWebhook{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateCredentialParams Optional parameters for the method 'UpdateCredential' type UpdateCredentialParams struct { - ApiKey *string `json:"ApiKey,omitempty"` - Certificate *string `json:"Certificate,omitempty"` + ApiKey *string `json:"ApiKey,omitempty"` + Certificate *string `json:"Certificate,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` - PrivateKey *string `json:"PrivateKey,omitempty"` - Sandbox *bool `json:"Sandbox,omitempty"` - Secret *string `json:"Secret,omitempty"` - Type *string `json:"Type,omitempty"` + PrivateKey *string `json:"PrivateKey,omitempty"` + Sandbox *bool `json:"Sandbox,omitempty"` + Secret *string `json:"Secret,omitempty"` + Type *string `json:"Type,omitempty"` } /* @@ -3178,51 +3133,51 @@ type UpdateCredentialParams struct { * @param "Secret" (string) - [FCM only] The **Server key** of your project from the Firebase console, found under Settings / Cloud messaging. * @param "Type" (string) - The type of push-notification service the credential is for. Can be: `fcm`, `gcm`, or `apn`. * @return ConversationsV1Credential -*/ + */ func (c *DefaultApiService) UpdateCredential(Sid string, params *UpdateCredentialParams) (*ConversationsV1Credential, error) { - path := "/v1/Credentials/{Sid}" + path := "/v1/Credentials/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.ApiKey != nil { - data.Set("ApiKey", *params.ApiKey) -} - if params != nil && params.Certificate != nil { - data.Set("Certificate", *params.Certificate) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.PrivateKey != nil { - data.Set("PrivateKey", *params.PrivateKey) -} - if params != nil && params.Sandbox != nil { - data.Set("Sandbox", fmt.Sprint(*params.Sandbox)) -} - if params != nil && params.Secret != nil { - data.Set("Secret", *params.Secret) -} - if params != nil && params.Type != nil { - data.Set("Type", *params.Type) -} + data := url.Values{} + headers := 0 + if params != nil && params.ApiKey != nil { + data.Set("ApiKey", *params.ApiKey) + } + if params != nil && params.Certificate != nil { + data.Set("Certificate", *params.Certificate) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.PrivateKey != nil { + data.Set("PrivateKey", *params.PrivateKey) + } + if params != nil && params.Sandbox != nil { + data.Set("Sandbox", fmt.Sprint(*params.Sandbox)) + } + if params != nil && params.Secret != nil { + data.Set("Secret", *params.Secret) + } + if params != nil && params.Type != nil { + data.Set("Type", *params.Type) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ConversationsV1Credential{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ConversationsV1Credential{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateRoleParams Optional parameters for the method 'UpdateRole' type UpdateRoleParams struct { Permission *[]string `json:"Permission,omitempty"` @@ -3235,39 +3190,39 @@ type UpdateRoleParams struct { * @param optional nil or *UpdateRoleParams - Optional Parameters: * @param "Permission" ([]string) - A permission that you grant to the role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. Note that the update action replaces all previously assigned permissions with those defined in the update action. To remove a permission, do not include it in the subsequent update action. The values for this parameter depend on the role's `type`. * @return ConversationsV1Role -*/ + */ func (c *DefaultApiService) UpdateRole(Sid string, params *UpdateRoleParams) (*ConversationsV1Role, error) { - path := "/v1/Roles/{Sid}" + path := "/v1/Roles/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Permission != nil { - data.Set("Permission", strings.Join(*params.Permission, ",")) -} + data := url.Values{} + headers := 0 + if params != nil && params.Permission != nil { + data.Set("Permission", strings.Join(*params.Permission, ",")) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ConversationsV1Role{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ConversationsV1Role{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateServiceConfigurationParams Optional parameters for the method 'UpdateServiceConfiguration' type UpdateServiceConfigurationParams struct { - DefaultChatServiceRoleSid *string `json:"DefaultChatServiceRoleSid,omitempty"` + DefaultChatServiceRoleSid *string `json:"DefaultChatServiceRoleSid,omitempty"` DefaultConversationCreatorRoleSid *string `json:"DefaultConversationCreatorRoleSid,omitempty"` - DefaultConversationRoleSid *string `json:"DefaultConversationRoleSid,omitempty"` - ReachabilityEnabled *bool `json:"ReachabilityEnabled,omitempty"` + DefaultConversationRoleSid *string `json:"DefaultConversationRoleSid,omitempty"` + ReachabilityEnabled *bool `json:"ReachabilityEnabled,omitempty"` } /* @@ -3280,54 +3235,54 @@ type UpdateServiceConfigurationParams struct { * @param "DefaultConversationRoleSid" (string) - The conversation-level role assigned to users when they are added to a conversation. See the [Conversation Role](https://www.twilio.com/docs/conversations/api/role-resource) for more info about roles. * @param "ReachabilityEnabled" (bool) - Whether the [Reachability Indicator](https://www.twilio.com/docs/chat/reachability-indicator) is enabled for this Conversations Service. The default is `false`. * @return ConversationsV1ServiceServiceConfiguration -*/ + */ func (c *DefaultApiService) UpdateServiceConfiguration(ChatServiceSid string, params *UpdateServiceConfigurationParams) (*ConversationsV1ServiceServiceConfiguration, error) { - path := "/v1/Services/{ChatServiceSid}/Configuration" + path := "/v1/Services/{ChatServiceSid}/Configuration" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.DefaultChatServiceRoleSid != nil { - data.Set("DefaultChatServiceRoleSid", *params.DefaultChatServiceRoleSid) -} - if params != nil && params.DefaultConversationCreatorRoleSid != nil { - data.Set("DefaultConversationCreatorRoleSid", *params.DefaultConversationCreatorRoleSid) -} - if params != nil && params.DefaultConversationRoleSid != nil { - data.Set("DefaultConversationRoleSid", *params.DefaultConversationRoleSid) -} - if params != nil && params.ReachabilityEnabled != nil { - data.Set("ReachabilityEnabled", fmt.Sprint(*params.ReachabilityEnabled)) -} + data := url.Values{} + headers := 0 + if params != nil && params.DefaultChatServiceRoleSid != nil { + data.Set("DefaultChatServiceRoleSid", *params.DefaultChatServiceRoleSid) + } + if params != nil && params.DefaultConversationCreatorRoleSid != nil { + data.Set("DefaultConversationCreatorRoleSid", *params.DefaultConversationCreatorRoleSid) + } + if params != nil && params.DefaultConversationRoleSid != nil { + data.Set("DefaultConversationRoleSid", *params.DefaultConversationRoleSid) + } + if params != nil && params.ReachabilityEnabled != nil { + data.Set("ReachabilityEnabled", fmt.Sprint(*params.ReachabilityEnabled)) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ConversationsV1ServiceServiceConfiguration{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ConversationsV1ServiceServiceConfiguration{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateServiceConversationParams Optional parameters for the method 'UpdateServiceConversation' type UpdateServiceConversationParams struct { - XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - MessagingServiceSid *string `json:"MessagingServiceSid,omitempty"` - State *string `json:"State,omitempty"` - TimersClosed *string `json:"Timers.Closed,omitempty"` - TimersInactive *string `json:"Timers.Inactive,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + MessagingServiceSid *string `json:"MessagingServiceSid,omitempty"` + State *string `json:"State,omitempty"` + TimersClosed *string `json:"Timers.Closed,omitempty"` + TimersInactive *string `json:"Timers.Inactive,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` } /* @@ -3347,69 +3302,70 @@ type UpdateServiceConversationParams struct { * @param "TimersInactive" (string) - ISO8601 duration when conversation will be switched to `inactive` state. Minimum value for this timer is 1 minute. * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. * @return ConversationsV1ServiceServiceConversation -*/ + */ func (c *DefaultApiService) UpdateServiceConversation(ChatServiceSid string, Sid string, params *UpdateServiceConversationParams) (*ConversationsV1ServiceServiceConversation, error) { - path := "/v1/Services/{ChatServiceSid}/Conversations/{Sid}" + path := "/v1/Services/{ChatServiceSid}/Conversations/{Sid}" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) -} - if params != nil && params.DateCreated != nil { - data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) -} - if params != nil && params.DateUpdated != nil { - data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.MessagingServiceSid != nil { - data.Set("MessagingServiceSid", *params.MessagingServiceSid) -} - if params != nil && params.State != nil { - data.Set("State", *params.State) -} - if params != nil && params.TimersClosed != nil { - data.Set("TimersClosed", *params.TimersClosed) -} - if params != nil && params.TimersInactive != nil { - data.Set("TimersInactive", *params.TimersInactive) -} - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) -} + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) + } + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.MessagingServiceSid != nil { + data.Set("MessagingServiceSid", *params.MessagingServiceSid) + } + if params != nil && params.State != nil { + data.Set("State", *params.State) + } + if params != nil && params.TimersClosed != nil { + data.Set("TimersClosed", *params.TimersClosed) + } + if params != nil && params.TimersInactive != nil { + data.Set("TimersInactive", *params.TimersInactive) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ConversationsV1ServiceServiceConversation{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ConversationsV1ServiceServiceConversation{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateServiceConversationMessageParams Optional parameters for the method 'UpdateServiceConversationMessage' type UpdateServiceConversationMessageParams struct { - XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - Author *string `json:"Author,omitempty"` - Body *string `json:"Body,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + Author *string `json:"Author,omitempty"` + Body *string `json:"Body,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` } /* @@ -3426,62 +3382,63 @@ type UpdateServiceConversationMessageParams struct { * @param "DateCreated" (time.Time) - The date that this resource was created. * @param "DateUpdated" (time.Time) - The date that this resource was last updated. `null` if the message has not been edited. * @return ConversationsV1ServiceServiceConversationServiceConversationMessage -*/ + */ func (c *DefaultApiService) UpdateServiceConversationMessage(ChatServiceSid string, ConversationSid string, Sid string, params *UpdateServiceConversationMessageParams) (*ConversationsV1ServiceServiceConversationServiceConversationMessage, error) { - path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages/{Sid}" + path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages/{Sid}" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) -} - if params != nil && params.Author != nil { - data.Set("Author", *params.Author) -} - if params != nil && params.Body != nil { - data.Set("Body", *params.Body) -} - if params != nil && params.DateCreated != nil { - data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) -} - if params != nil && params.DateUpdated != nil { - data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) -} + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.Author != nil { + data.Set("Author", *params.Author) + } + if params != nil && params.Body != nil { + data.Set("Body", *params.Body) + } + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) + } + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) + } if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ConversationsV1ServiceServiceConversationServiceConversationMessage{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ConversationsV1ServiceServiceConversationServiceConversationMessage{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateServiceConversationParticipantParams Optional parameters for the method 'UpdateServiceConversationParticipant' type UpdateServiceConversationParticipantParams struct { - XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Identity *string `json:"Identity,omitempty"` - LastReadMessageIndex *int32 `json:"LastReadMessageIndex,omitempty"` - LastReadTimestamp *string `json:"LastReadTimestamp,omitempty"` - MessagingBindingProjectedAddress *string `json:"MessagingBinding.ProjectedAddress,omitempty"` - MessagingBindingProxyAddress *string `json:"MessagingBinding.ProxyAddress,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + Identity *string `json:"Identity,omitempty"` + LastReadMessageIndex *int32 `json:"LastReadMessageIndex,omitempty"` + LastReadTimestamp *string `json:"LastReadTimestamp,omitempty"` + MessagingBindingProjectedAddress *string `json:"MessagingBinding.ProjectedAddress,omitempty"` + MessagingBindingProxyAddress *string `json:"MessagingBinding.ProxyAddress,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` } /* @@ -3502,69 +3459,70 @@ type UpdateServiceConversationParticipantParams struct { * @param "MessagingBindingProxyAddress" (string) - The address of the Twilio phone number that the participant is in contact with. 'null' value will remove it. * @param "RoleSid" (string) - The SID of a conversation-level [Role](https://www.twilio.com/docs/conversations/api/role-resource) to assign to the participant. * @return ConversationsV1ServiceServiceConversationServiceConversationParticipant -*/ + */ func (c *DefaultApiService) UpdateServiceConversationParticipant(ChatServiceSid string, ConversationSid string, Sid string, params *UpdateServiceConversationParticipantParams) (*ConversationsV1ServiceServiceConversationServiceConversationParticipant, error) { - path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Participants/{Sid}" + path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Participants/{Sid}" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) -} - if params != nil && params.DateCreated != nil { - data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) -} - if params != nil && params.DateUpdated != nil { - data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) -} - if params != nil && params.Identity != nil { - data.Set("Identity", *params.Identity) -} - if params != nil && params.LastReadMessageIndex != nil { - data.Set("LastReadMessageIndex", fmt.Sprint(*params.LastReadMessageIndex)) -} - if params != nil && params.LastReadTimestamp != nil { - data.Set("LastReadTimestamp", *params.LastReadTimestamp) -} - if params != nil && params.MessagingBindingProjectedAddress != nil { - data.Set("MessagingBindingProjectedAddress", *params.MessagingBindingProjectedAddress) -} - if params != nil && params.MessagingBindingProxyAddress != nil { - data.Set("MessagingBindingProxyAddress", *params.MessagingBindingProxyAddress) -} - if params != nil && params.RoleSid != nil { - data.Set("RoleSid", *params.RoleSid) -} + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) + } + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) + } + if params != nil && params.Identity != nil { + data.Set("Identity", *params.Identity) + } + if params != nil && params.LastReadMessageIndex != nil { + data.Set("LastReadMessageIndex", fmt.Sprint(*params.LastReadMessageIndex)) + } + if params != nil && params.LastReadTimestamp != nil { + data.Set("LastReadTimestamp", *params.LastReadTimestamp) + } + if params != nil && params.MessagingBindingProjectedAddress != nil { + data.Set("MessagingBindingProjectedAddress", *params.MessagingBindingProjectedAddress) + } + if params != nil && params.MessagingBindingProxyAddress != nil { + data.Set("MessagingBindingProxyAddress", *params.MessagingBindingProxyAddress) + } + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) + } if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ConversationsV1ServiceServiceConversationServiceConversationParticipant{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ConversationsV1ServiceServiceConversationServiceConversationParticipant{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateServiceConversationScopedWebhookParams Optional parameters for the method 'UpdateServiceConversationScopedWebhook' type UpdateServiceConversationScopedWebhookParams struct { - ConfigurationFilters *[]string `json:"Configuration.Filters,omitempty"` - ConfigurationFlowSid *string `json:"Configuration.FlowSid,omitempty"` - ConfigurationMethod *string `json:"Configuration.Method,omitempty"` + ConfigurationFilters *[]string `json:"Configuration.Filters,omitempty"` + ConfigurationFlowSid *string `json:"Configuration.FlowSid,omitempty"` + ConfigurationMethod *string `json:"Configuration.Method,omitempty"` ConfigurationTriggers *[]string `json:"Configuration.Triggers,omitempty"` - ConfigurationUrl *string `json:"Configuration.Url,omitempty"` + ConfigurationUrl *string `json:"Configuration.Url,omitempty"` } /* @@ -3580,59 +3538,59 @@ type UpdateServiceConversationScopedWebhookParams struct { * @param "ConfigurationTriggers" ([]string) - The list of keywords, firing webhook event for this Conversation. * @param "ConfigurationUrl" (string) - The absolute url the webhook request should be sent to. * @return ConversationsV1ServiceServiceConversationServiceConversationScopedWebhook -*/ + */ func (c *DefaultApiService) UpdateServiceConversationScopedWebhook(ChatServiceSid string, ConversationSid string, Sid string, params *UpdateServiceConversationScopedWebhookParams) (*ConversationsV1ServiceServiceConversationServiceConversationScopedWebhook, error) { - path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Webhooks/{Sid}" + path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Webhooks/{Sid}" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.ConfigurationFilters != nil { - data.Set("ConfigurationFilters", strings.Join(*params.ConfigurationFilters, ",")) -} - if params != nil && params.ConfigurationFlowSid != nil { - data.Set("ConfigurationFlowSid", *params.ConfigurationFlowSid) -} - if params != nil && params.ConfigurationMethod != nil { - data.Set("ConfigurationMethod", *params.ConfigurationMethod) -} - if params != nil && params.ConfigurationTriggers != nil { - data.Set("ConfigurationTriggers", strings.Join(*params.ConfigurationTriggers, ",")) -} - if params != nil && params.ConfigurationUrl != nil { - data.Set("ConfigurationUrl", *params.ConfigurationUrl) -} + data := url.Values{} + headers := 0 + if params != nil && params.ConfigurationFilters != nil { + data.Set("ConfigurationFilters", strings.Join(*params.ConfigurationFilters, ",")) + } + if params != nil && params.ConfigurationFlowSid != nil { + data.Set("ConfigurationFlowSid", *params.ConfigurationFlowSid) + } + if params != nil && params.ConfigurationMethod != nil { + data.Set("ConfigurationMethod", *params.ConfigurationMethod) + } + if params != nil && params.ConfigurationTriggers != nil { + data.Set("ConfigurationTriggers", strings.Join(*params.ConfigurationTriggers, ",")) + } + if params != nil && params.ConfigurationUrl != nil { + data.Set("ConfigurationUrl", *params.ConfigurationUrl) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ConversationsV1ServiceServiceConversationServiceConversationScopedWebhook{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ConversationsV1ServiceServiceConversationServiceConversationScopedWebhook{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateServiceNotificationParams Optional parameters for the method 'UpdateServiceNotification' type UpdateServiceNotificationParams struct { - AddedToConversationEnabled *bool `json:"AddedToConversation.Enabled,omitempty"` - AddedToConversationSound *string `json:"AddedToConversation.Sound,omitempty"` - AddedToConversationTemplate *string `json:"AddedToConversation.Template,omitempty"` - LogEnabled *bool `json:"LogEnabled,omitempty"` - NewMessageBadgeCountEnabled *bool `json:"NewMessage.BadgeCountEnabled,omitempty"` - NewMessageEnabled *bool `json:"NewMessage.Enabled,omitempty"` - NewMessageSound *string `json:"NewMessage.Sound,omitempty"` - NewMessageTemplate *string `json:"NewMessage.Template,omitempty"` - RemovedFromConversationEnabled *bool `json:"RemovedFromConversation.Enabled,omitempty"` - RemovedFromConversationSound *string `json:"RemovedFromConversation.Sound,omitempty"` + AddedToConversationEnabled *bool `json:"AddedToConversation.Enabled,omitempty"` + AddedToConversationSound *string `json:"AddedToConversation.Sound,omitempty"` + AddedToConversationTemplate *string `json:"AddedToConversation.Template,omitempty"` + LogEnabled *bool `json:"LogEnabled,omitempty"` + NewMessageBadgeCountEnabled *bool `json:"NewMessage.BadgeCountEnabled,omitempty"` + NewMessageEnabled *bool `json:"NewMessage.Enabled,omitempty"` + NewMessageSound *string `json:"NewMessage.Sound,omitempty"` + NewMessageTemplate *string `json:"NewMessage.Template,omitempty"` + RemovedFromConversationEnabled *bool `json:"RemovedFromConversation.Enabled,omitempty"` + RemovedFromConversationSound *string `json:"RemovedFromConversation.Sound,omitempty"` RemovedFromConversationTemplate *string `json:"RemovedFromConversation.Template,omitempty"` } @@ -3653,63 +3611,63 @@ type UpdateServiceNotificationParams struct { * @param "RemovedFromConversationSound" (string) - The name of the sound to play to a user when they are removed from a conversation and `removed_from_conversation.enabled` is `true`. * @param "RemovedFromConversationTemplate" (string) - The template to use to create the notification text displayed to a user when they are removed from a conversation and `removed_from_conversation.enabled` is `true`. * @return ConversationsV1ServiceServiceConfigurationServiceNotification -*/ + */ func (c *DefaultApiService) UpdateServiceNotification(ChatServiceSid string, params *UpdateServiceNotificationParams) (*ConversationsV1ServiceServiceConfigurationServiceNotification, error) { - path := "/v1/Services/{ChatServiceSid}/Configuration/Notifications" + path := "/v1/Services/{ChatServiceSid}/Configuration/Notifications" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.AddedToConversationEnabled != nil { - data.Set("AddedToConversationEnabled", fmt.Sprint(*params.AddedToConversationEnabled)) -} - if params != nil && params.AddedToConversationSound != nil { - data.Set("AddedToConversationSound", *params.AddedToConversationSound) -} - if params != nil && params.AddedToConversationTemplate != nil { - data.Set("AddedToConversationTemplate", *params.AddedToConversationTemplate) -} - if params != nil && params.LogEnabled != nil { - data.Set("LogEnabled", fmt.Sprint(*params.LogEnabled)) -} - if params != nil && params.NewMessageBadgeCountEnabled != nil { - data.Set("NewMessageBadgeCountEnabled", fmt.Sprint(*params.NewMessageBadgeCountEnabled)) -} - if params != nil && params.NewMessageEnabled != nil { - data.Set("NewMessageEnabled", fmt.Sprint(*params.NewMessageEnabled)) -} - if params != nil && params.NewMessageSound != nil { - data.Set("NewMessageSound", *params.NewMessageSound) -} - if params != nil && params.NewMessageTemplate != nil { - data.Set("NewMessageTemplate", *params.NewMessageTemplate) -} - if params != nil && params.RemovedFromConversationEnabled != nil { - data.Set("RemovedFromConversationEnabled", fmt.Sprint(*params.RemovedFromConversationEnabled)) -} - if params != nil && params.RemovedFromConversationSound != nil { - data.Set("RemovedFromConversationSound", *params.RemovedFromConversationSound) -} - if params != nil && params.RemovedFromConversationTemplate != nil { - data.Set("RemovedFromConversationTemplate", *params.RemovedFromConversationTemplate) -} + data := url.Values{} + headers := 0 + if params != nil && params.AddedToConversationEnabled != nil { + data.Set("AddedToConversationEnabled", fmt.Sprint(*params.AddedToConversationEnabled)) + } + if params != nil && params.AddedToConversationSound != nil { + data.Set("AddedToConversationSound", *params.AddedToConversationSound) + } + if params != nil && params.AddedToConversationTemplate != nil { + data.Set("AddedToConversationTemplate", *params.AddedToConversationTemplate) + } + if params != nil && params.LogEnabled != nil { + data.Set("LogEnabled", fmt.Sprint(*params.LogEnabled)) + } + if params != nil && params.NewMessageBadgeCountEnabled != nil { + data.Set("NewMessageBadgeCountEnabled", fmt.Sprint(*params.NewMessageBadgeCountEnabled)) + } + if params != nil && params.NewMessageEnabled != nil { + data.Set("NewMessageEnabled", fmt.Sprint(*params.NewMessageEnabled)) + } + if params != nil && params.NewMessageSound != nil { + data.Set("NewMessageSound", *params.NewMessageSound) + } + if params != nil && params.NewMessageTemplate != nil { + data.Set("NewMessageTemplate", *params.NewMessageTemplate) + } + if params != nil && params.RemovedFromConversationEnabled != nil { + data.Set("RemovedFromConversationEnabled", fmt.Sprint(*params.RemovedFromConversationEnabled)) + } + if params != nil && params.RemovedFromConversationSound != nil { + data.Set("RemovedFromConversationSound", *params.RemovedFromConversationSound) + } + if params != nil && params.RemovedFromConversationTemplate != nil { + data.Set("RemovedFromConversationTemplate", *params.RemovedFromConversationTemplate) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ConversationsV1ServiceServiceConfigurationServiceNotification{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ConversationsV1ServiceServiceConfigurationServiceNotification{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateServiceRoleParams Optional parameters for the method 'UpdateServiceRole' type UpdateServiceRoleParams struct { Permission *[]string `json:"Permission,omitempty"` @@ -3723,40 +3681,40 @@ type UpdateServiceRoleParams struct { * @param optional nil or *UpdateServiceRoleParams - Optional Parameters: * @param "Permission" ([]string) - A permission that you grant to the role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. Note that the update action replaces all previously assigned permissions with those defined in the update action. To remove a permission, do not include it in the subsequent update action. The values for this parameter depend on the role's `type`. * @return ConversationsV1ServiceServiceRole -*/ + */ func (c *DefaultApiService) UpdateServiceRole(ChatServiceSid string, Sid string, params *UpdateServiceRoleParams) (*ConversationsV1ServiceServiceRole, error) { - path := "/v1/Services/{ChatServiceSid}/Roles/{Sid}" + path := "/v1/Services/{ChatServiceSid}/Roles/{Sid}" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Permission != nil { - data.Set("Permission", strings.Join(*params.Permission, ",")) -} + data := url.Values{} + headers := 0 + if params != nil && params.Permission != nil { + data.Set("Permission", strings.Join(*params.Permission, ",")) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ConversationsV1ServiceServiceRole{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ConversationsV1ServiceServiceRole{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateServiceUserParams Optional parameters for the method 'UpdateServiceUser' type UpdateServiceUserParams struct { XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` } /* @@ -3770,49 +3728,50 @@ type UpdateServiceUserParams struct { * @param "FriendlyName" (string) - The string that you assigned to describe the resource. * @param "RoleSid" (string) - The SID of a service-level [Role](https://www.twilio.com/docs/conversations/api/role-resource) to assign to the user. * @return ConversationsV1ServiceServiceUser -*/ + */ func (c *DefaultApiService) UpdateServiceUser(ChatServiceSid string, Sid string, params *UpdateServiceUserParams) (*ConversationsV1ServiceServiceUser, error) { - path := "/v1/Services/{ChatServiceSid}/Users/{Sid}" + path := "/v1/Services/{ChatServiceSid}/Users/{Sid}" path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.RoleSid != nil { - data.Set("RoleSid", *params.RoleSid) -} + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) + } if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ConversationsV1ServiceServiceUser{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ConversationsV1ServiceServiceUser{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateUserParams Optional parameters for the method 'UpdateUser' type UpdateUserParams struct { XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` } /* @@ -3825,39 +3784,39 @@ type UpdateUserParams struct { * @param "FriendlyName" (string) - The string that you assigned to describe the resource. * @param "RoleSid" (string) - The SID of a service-level [Role](https://www.twilio.com/docs/conversations/api/role-resource) to assign to the user. * @return ConversationsV1User -*/ + */ func (c *DefaultApiService) UpdateUser(Sid string, params *UpdateUserParams) (*ConversationsV1User, error) { - path := "/v1/Users/{Sid}" + path := "/v1/Users/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.RoleSid != nil { - data.Set("RoleSid", *params.RoleSid) -} + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) + } if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ConversationsV1User{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ConversationsV1User{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } diff --git a/twilio/rest/conversations/v1/model_conversations_v1_configuration.go b/twilio/rest/conversations/v1/model_conversations_v1_configuration.go index c429370f6..aa34120b8 100644 --- a/twilio/rest/conversations/v1/model_conversations_v1_configuration.go +++ b/twilio/rest/conversations/v1/model_conversations_v1_configuration.go @@ -1,15 +1,16 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ConversationsV1Configuration struct for ConversationsV1Configuration type ConversationsV1Configuration struct { // The SID of the Account responsible for this configuration. diff --git a/twilio/rest/conversations/v1/model_conversations_v1_configuration_configuration_webhook.go b/twilio/rest/conversations/v1/model_conversations_v1_configuration_configuration_webhook.go index f5cd9ed2e..e912125e2 100644 --- a/twilio/rest/conversations/v1/model_conversations_v1_configuration_configuration_webhook.go +++ b/twilio/rest/conversations/v1/model_conversations_v1_configuration_configuration_webhook.go @@ -1,15 +1,16 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ConversationsV1ConfigurationConfigurationWebhook struct for ConversationsV1ConfigurationConfigurationWebhook type ConversationsV1ConfigurationConfigurationWebhook struct { // The unique ID of the Account responsible for this conversation. diff --git a/twilio/rest/conversations/v1/model_conversations_v1_conversation.go b/twilio/rest/conversations/v1/model_conversations_v1_conversation.go index 15d185303..1672ff665 100644 --- a/twilio/rest/conversations/v1/model_conversations_v1_conversation.go +++ b/twilio/rest/conversations/v1/model_conversations_v1_conversation.go @@ -1,18 +1,20 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // ConversationsV1Conversation struct for ConversationsV1Conversation type ConversationsV1Conversation struct { // The unique ID of the Account responsible for this conversation. diff --git a/twilio/rest/conversations/v1/model_conversations_v1_conversation_conversation_message.go b/twilio/rest/conversations/v1/model_conversations_v1_conversation_conversation_message.go index 5c70998d7..faf0b770d 100644 --- a/twilio/rest/conversations/v1/model_conversations_v1_conversation_conversation_message.go +++ b/twilio/rest/conversations/v1/model_conversations_v1_conversation_conversation_message.go @@ -1,18 +1,20 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // ConversationsV1ConversationConversationMessage struct for ConversationsV1ConversationConversationMessage type ConversationsV1ConversationConversationMessage struct { // The unique ID of the Account responsible for this message. diff --git a/twilio/rest/conversations/v1/model_conversations_v1_conversation_conversation_message_conversation_message_receipt.go b/twilio/rest/conversations/v1/model_conversations_v1_conversation_conversation_message_conversation_message_receipt.go index 84a8d9de4..e938c6db1 100644 --- a/twilio/rest/conversations/v1/model_conversations_v1_conversation_conversation_message_conversation_message_receipt.go +++ b/twilio/rest/conversations/v1/model_conversations_v1_conversation_conversation_message_conversation_message_receipt.go @@ -1,18 +1,20 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // ConversationsV1ConversationConversationMessageConversationMessageReceipt struct for ConversationsV1ConversationConversationMessageConversationMessageReceipt type ConversationsV1ConversationConversationMessageConversationMessageReceipt struct { // The unique ID of the Account responsible for this participant. diff --git a/twilio/rest/conversations/v1/model_conversations_v1_conversation_conversation_participant.go b/twilio/rest/conversations/v1/model_conversations_v1_conversation_conversation_participant.go index 5c382aed2..329811ff7 100644 --- a/twilio/rest/conversations/v1/model_conversations_v1_conversation_conversation_participant.go +++ b/twilio/rest/conversations/v1/model_conversations_v1_conversation_conversation_participant.go @@ -1,18 +1,20 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // ConversationsV1ConversationConversationParticipant struct for ConversationsV1ConversationConversationParticipant type ConversationsV1ConversationConversationParticipant struct { // The unique ID of the Account responsible for this participant. diff --git a/twilio/rest/conversations/v1/model_conversations_v1_conversation_conversation_scoped_webhook.go b/twilio/rest/conversations/v1/model_conversations_v1_conversation_conversation_scoped_webhook.go index c00563d9a..29c79f140 100644 --- a/twilio/rest/conversations/v1/model_conversations_v1_conversation_conversation_scoped_webhook.go +++ b/twilio/rest/conversations/v1/model_conversations_v1_conversation_conversation_scoped_webhook.go @@ -1,18 +1,20 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // ConversationsV1ConversationConversationScopedWebhook struct for ConversationsV1ConversationConversationScopedWebhook type ConversationsV1ConversationConversationScopedWebhook struct { // The unique ID of the Account responsible for this conversation. diff --git a/twilio/rest/conversations/v1/model_conversations_v1_credential.go b/twilio/rest/conversations/v1/model_conversations_v1_credential.go index 1f0e93e75..d4b50aae4 100644 --- a/twilio/rest/conversations/v1/model_conversations_v1_credential.go +++ b/twilio/rest/conversations/v1/model_conversations_v1_credential.go @@ -1,18 +1,20 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // ConversationsV1Credential struct for ConversationsV1Credential type ConversationsV1Credential struct { // The unique ID of the Account responsible for this credential. diff --git a/twilio/rest/conversations/v1/model_conversations_v1_role.go b/twilio/rest/conversations/v1/model_conversations_v1_role.go index 39ac59675..45273ca81 100644 --- a/twilio/rest/conversations/v1/model_conversations_v1_role.go +++ b/twilio/rest/conversations/v1/model_conversations_v1_role.go @@ -1,18 +1,20 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // ConversationsV1Role struct for ConversationsV1Role type ConversationsV1Role struct { // The SID of the Account that created the resource diff --git a/twilio/rest/conversations/v1/model_conversations_v1_service.go b/twilio/rest/conversations/v1/model_conversations_v1_service.go index 4a79b961a..8c507161e 100644 --- a/twilio/rest/conversations/v1/model_conversations_v1_service.go +++ b/twilio/rest/conversations/v1/model_conversations_v1_service.go @@ -1,18 +1,20 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // ConversationsV1Service struct for ConversationsV1Service type ConversationsV1Service struct { // The unique ID of the Account responsible for this service. diff --git a/twilio/rest/conversations/v1/model_conversations_v1_service_service_binding.go b/twilio/rest/conversations/v1/model_conversations_v1_service_service_binding.go index c687a8078..b7614c707 100644 --- a/twilio/rest/conversations/v1/model_conversations_v1_service_service_binding.go +++ b/twilio/rest/conversations/v1/model_conversations_v1_service_service_binding.go @@ -1,18 +1,20 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // ConversationsV1ServiceServiceBinding struct for ConversationsV1ServiceServiceBinding type ConversationsV1ServiceServiceBinding struct { // The unique ID of the Account responsible for this binding. diff --git a/twilio/rest/conversations/v1/model_conversations_v1_service_service_configuration.go b/twilio/rest/conversations/v1/model_conversations_v1_service_service_configuration.go index 1aa0e5c48..840672011 100644 --- a/twilio/rest/conversations/v1/model_conversations_v1_service_service_configuration.go +++ b/twilio/rest/conversations/v1/model_conversations_v1_service_service_configuration.go @@ -1,15 +1,16 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ConversationsV1ServiceServiceConfiguration struct for ConversationsV1ServiceServiceConfiguration type ConversationsV1ServiceServiceConfiguration struct { // The unique string that identifies the resource diff --git a/twilio/rest/conversations/v1/model_conversations_v1_service_service_configuration_service_notification.go b/twilio/rest/conversations/v1/model_conversations_v1_service_service_configuration_service_notification.go index 8d72edbb0..cbad1d98b 100644 --- a/twilio/rest/conversations/v1/model_conversations_v1_service_service_configuration_service_notification.go +++ b/twilio/rest/conversations/v1/model_conversations_v1_service_service_configuration_service_notification.go @@ -1,15 +1,16 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ConversationsV1ServiceServiceConfigurationServiceNotification struct for ConversationsV1ServiceServiceConfigurationServiceNotification type ConversationsV1ServiceServiceConfigurationServiceNotification struct { // The unique ID of the Account responsible for this configuration. diff --git a/twilio/rest/conversations/v1/model_conversations_v1_service_service_conversation.go b/twilio/rest/conversations/v1/model_conversations_v1_service_service_conversation.go index ad38b47d8..31311dd22 100644 --- a/twilio/rest/conversations/v1/model_conversations_v1_service_service_conversation.go +++ b/twilio/rest/conversations/v1/model_conversations_v1_service_service_conversation.go @@ -1,18 +1,20 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // ConversationsV1ServiceServiceConversation struct for ConversationsV1ServiceServiceConversation type ConversationsV1ServiceServiceConversation struct { // The unique ID of the Account responsible for this conversation. diff --git a/twilio/rest/conversations/v1/model_conversations_v1_service_service_conversation_service_conversation_message.go b/twilio/rest/conversations/v1/model_conversations_v1_service_service_conversation_service_conversation_message.go index 5b0f7930d..4092f5a09 100644 --- a/twilio/rest/conversations/v1/model_conversations_v1_service_service_conversation_service_conversation_message.go +++ b/twilio/rest/conversations/v1/model_conversations_v1_service_service_conversation_service_conversation_message.go @@ -1,18 +1,20 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // ConversationsV1ServiceServiceConversationServiceConversationMessage struct for ConversationsV1ServiceServiceConversationServiceConversationMessage type ConversationsV1ServiceServiceConversationServiceConversationMessage struct { // The unique ID of the Account responsible for this message. diff --git a/twilio/rest/conversations/v1/model_conversations_v1_service_service_conversation_service_conversation_message_service_conversation_message_receipt.go b/twilio/rest/conversations/v1/model_conversations_v1_service_service_conversation_service_conversation_message_service_conversation_message_receipt.go index 0262a5b3d..022729c08 100644 --- a/twilio/rest/conversations/v1/model_conversations_v1_service_service_conversation_service_conversation_message_service_conversation_message_receipt.go +++ b/twilio/rest/conversations/v1/model_conversations_v1_service_service_conversation_service_conversation_message_service_conversation_message_receipt.go @@ -1,18 +1,20 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // ConversationsV1ServiceServiceConversationServiceConversationMessageServiceConversationMessageReceipt struct for ConversationsV1ServiceServiceConversationServiceConversationMessageServiceConversationMessageReceipt type ConversationsV1ServiceServiceConversationServiceConversationMessageServiceConversationMessageReceipt struct { // The unique ID of the Account responsible for this participant. diff --git a/twilio/rest/conversations/v1/model_conversations_v1_service_service_conversation_service_conversation_participant.go b/twilio/rest/conversations/v1/model_conversations_v1_service_service_conversation_service_conversation_participant.go index b8ec8ea62..e049ba7e0 100644 --- a/twilio/rest/conversations/v1/model_conversations_v1_service_service_conversation_service_conversation_participant.go +++ b/twilio/rest/conversations/v1/model_conversations_v1_service_service_conversation_service_conversation_participant.go @@ -1,18 +1,20 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // ConversationsV1ServiceServiceConversationServiceConversationParticipant struct for ConversationsV1ServiceServiceConversationServiceConversationParticipant type ConversationsV1ServiceServiceConversationServiceConversationParticipant struct { // The unique ID of the Account responsible for this participant. diff --git a/twilio/rest/conversations/v1/model_conversations_v1_service_service_conversation_service_conversation_scoped_webhook.go b/twilio/rest/conversations/v1/model_conversations_v1_service_service_conversation_service_conversation_scoped_webhook.go index 4b7125990..6a732617d 100644 --- a/twilio/rest/conversations/v1/model_conversations_v1_service_service_conversation_service_conversation_scoped_webhook.go +++ b/twilio/rest/conversations/v1/model_conversations_v1_service_service_conversation_service_conversation_scoped_webhook.go @@ -1,18 +1,20 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // ConversationsV1ServiceServiceConversationServiceConversationScopedWebhook struct for ConversationsV1ServiceServiceConversationServiceConversationScopedWebhook type ConversationsV1ServiceServiceConversationServiceConversationScopedWebhook struct { // The unique ID of the Account responsible for this conversation. diff --git a/twilio/rest/conversations/v1/model_conversations_v1_service_service_role.go b/twilio/rest/conversations/v1/model_conversations_v1_service_service_role.go index 0a7e0f36e..f5cd6baab 100644 --- a/twilio/rest/conversations/v1/model_conversations_v1_service_service_role.go +++ b/twilio/rest/conversations/v1/model_conversations_v1_service_service_role.go @@ -1,18 +1,20 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // ConversationsV1ServiceServiceRole struct for ConversationsV1ServiceServiceRole type ConversationsV1ServiceServiceRole struct { // The SID of the Account that created the resource diff --git a/twilio/rest/conversations/v1/model_conversations_v1_service_service_user.go b/twilio/rest/conversations/v1/model_conversations_v1_service_service_user.go index 97a4b1f71..e5faa0514 100644 --- a/twilio/rest/conversations/v1/model_conversations_v1_service_service_user.go +++ b/twilio/rest/conversations/v1/model_conversations_v1_service_service_user.go @@ -1,18 +1,20 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // ConversationsV1ServiceServiceUser struct for ConversationsV1ServiceServiceUser type ConversationsV1ServiceServiceUser struct { // The SID of the Account that created the resource diff --git a/twilio/rest/conversations/v1/model_conversations_v1_user.go b/twilio/rest/conversations/v1/model_conversations_v1_user.go index 08a74a71d..d5e7b146f 100644 --- a/twilio/rest/conversations/v1/model_conversations_v1_user.go +++ b/twilio/rest/conversations/v1/model_conversations_v1_user.go @@ -1,18 +1,20 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // ConversationsV1User struct for ConversationsV1User type ConversationsV1User struct { // The SID of the Account that created the resource diff --git a/twilio/rest/conversations/v1/model_list_conversation_message_receipt_response.go b/twilio/rest/conversations/v1/model_list_conversation_message_receipt_response.go index 0568331d2..a8b51f9b8 100644 --- a/twilio/rest/conversations/v1/model_list_conversation_message_receipt_response.go +++ b/twilio/rest/conversations/v1/model_list_conversation_message_receipt_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListConversationMessageReceiptResponse struct for ListConversationMessageReceiptResponse type ListConversationMessageReceiptResponse struct { DeliveryReceipts []ConversationsV1ConversationConversationMessageConversationMessageReceipt `json:"DeliveryReceipts,omitempty"` - Meta ListConversationResponseMeta `json:"Meta,omitempty"` + Meta ListConversationResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/conversations/v1/model_list_conversation_message_response.go b/twilio/rest/conversations/v1/model_list_conversation_message_response.go index 3bf0e87a1..b91592567 100644 --- a/twilio/rest/conversations/v1/model_list_conversation_message_response.go +++ b/twilio/rest/conversations/v1/model_list_conversation_message_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListConversationMessageResponse struct for ListConversationMessageResponse type ListConversationMessageResponse struct { Messages []ConversationsV1ConversationConversationMessage `json:"Messages,omitempty"` - Meta ListConversationResponseMeta `json:"Meta,omitempty"` + Meta ListConversationResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/conversations/v1/model_list_conversation_participant_response.go b/twilio/rest/conversations/v1/model_list_conversation_participant_response.go index ea8b31594..39be602b7 100644 --- a/twilio/rest/conversations/v1/model_list_conversation_participant_response.go +++ b/twilio/rest/conversations/v1/model_list_conversation_participant_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListConversationParticipantResponse struct for ListConversationParticipantResponse type ListConversationParticipantResponse struct { - Meta ListConversationResponseMeta `json:"Meta,omitempty"` + Meta ListConversationResponseMeta `json:"Meta,omitempty"` Participants []ConversationsV1ConversationConversationParticipant `json:"Participants,omitempty"` } diff --git a/twilio/rest/conversations/v1/model_list_conversation_response.go b/twilio/rest/conversations/v1/model_list_conversation_response.go index e46104c2f..c5f98796b 100644 --- a/twilio/rest/conversations/v1/model_list_conversation_response.go +++ b/twilio/rest/conversations/v1/model_list_conversation_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListConversationResponse struct for ListConversationResponse type ListConversationResponse struct { Conversations []ConversationsV1Conversation `json:"Conversations,omitempty"` - Meta ListConversationResponseMeta `json:"Meta,omitempty"` + Meta ListConversationResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/conversations/v1/model_list_conversation_response_meta.go b/twilio/rest/conversations/v1/model_list_conversation_response_meta.go index eb186c38a..82b60c3f4 100644 --- a/twilio/rest/conversations/v1/model_list_conversation_response_meta.go +++ b/twilio/rest/conversations/v1/model_list_conversation_response_meta.go @@ -1,22 +1,23 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListConversationResponseMeta struct for ListConversationResponseMeta type ListConversationResponseMeta struct { - FirstPageUrl string `json:"FirstPageUrl,omitempty"` - Key string `json:"Key,omitempty"` - NextPageUrl string `json:"NextPageUrl,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` - Url string `json:"Url,omitempty"` + Url string `json:"Url,omitempty"` } diff --git a/twilio/rest/conversations/v1/model_list_conversation_scoped_webhook_response.go b/twilio/rest/conversations/v1/model_list_conversation_scoped_webhook_response.go index 007aab467..67e05d9ed 100644 --- a/twilio/rest/conversations/v1/model_list_conversation_scoped_webhook_response.go +++ b/twilio/rest/conversations/v1/model_list_conversation_scoped_webhook_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListConversationScopedWebhookResponse struct for ListConversationScopedWebhookResponse type ListConversationScopedWebhookResponse struct { - Meta ListConversationResponseMeta `json:"Meta,omitempty"` + Meta ListConversationResponseMeta `json:"Meta,omitempty"` Webhooks []ConversationsV1ConversationConversationScopedWebhook `json:"Webhooks,omitempty"` } diff --git a/twilio/rest/conversations/v1/model_list_credential_response.go b/twilio/rest/conversations/v1/model_list_credential_response.go index fb3dfa83e..8ec0067c7 100644 --- a/twilio/rest/conversations/v1/model_list_credential_response.go +++ b/twilio/rest/conversations/v1/model_list_credential_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListCredentialResponse struct for ListCredentialResponse type ListCredentialResponse struct { - Credentials []ConversationsV1Credential `json:"Credentials,omitempty"` - Meta ListConversationResponseMeta `json:"Meta,omitempty"` + Credentials []ConversationsV1Credential `json:"Credentials,omitempty"` + Meta ListConversationResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/conversations/v1/model_list_role_response.go b/twilio/rest/conversations/v1/model_list_role_response.go index c40076d8f..155e8b329 100644 --- a/twilio/rest/conversations/v1/model_list_role_response.go +++ b/twilio/rest/conversations/v1/model_list_role_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListRoleResponse struct for ListRoleResponse type ListRoleResponse struct { - Meta ListConversationResponseMeta `json:"Meta,omitempty"` - Roles []ConversationsV1Role `json:"Roles,omitempty"` + Meta ListConversationResponseMeta `json:"Meta,omitempty"` + Roles []ConversationsV1Role `json:"Roles,omitempty"` } diff --git a/twilio/rest/conversations/v1/model_list_service_binding_response.go b/twilio/rest/conversations/v1/model_list_service_binding_response.go index 0704b8568..e5411ec57 100644 --- a/twilio/rest/conversations/v1/model_list_service_binding_response.go +++ b/twilio/rest/conversations/v1/model_list_service_binding_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListServiceBindingResponse struct for ListServiceBindingResponse type ListServiceBindingResponse struct { Bindings []ConversationsV1ServiceServiceBinding `json:"Bindings,omitempty"` - Meta ListConversationResponseMeta `json:"Meta,omitempty"` + Meta ListConversationResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/conversations/v1/model_list_service_conversation_message_receipt_response.go b/twilio/rest/conversations/v1/model_list_service_conversation_message_receipt_response.go index 4282c9559..82a8f25cb 100644 --- a/twilio/rest/conversations/v1/model_list_service_conversation_message_receipt_response.go +++ b/twilio/rest/conversations/v1/model_list_service_conversation_message_receipt_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListServiceConversationMessageReceiptResponse struct for ListServiceConversationMessageReceiptResponse type ListServiceConversationMessageReceiptResponse struct { DeliveryReceipts []ConversationsV1ServiceServiceConversationServiceConversationMessageServiceConversationMessageReceipt `json:"DeliveryReceipts,omitempty"` - Meta ListConversationResponseMeta `json:"Meta,omitempty"` + Meta ListConversationResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/conversations/v1/model_list_service_conversation_message_response.go b/twilio/rest/conversations/v1/model_list_service_conversation_message_response.go index 41729862c..9db562aae 100644 --- a/twilio/rest/conversations/v1/model_list_service_conversation_message_response.go +++ b/twilio/rest/conversations/v1/model_list_service_conversation_message_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListServiceConversationMessageResponse struct for ListServiceConversationMessageResponse type ListServiceConversationMessageResponse struct { Messages []ConversationsV1ServiceServiceConversationServiceConversationMessage `json:"Messages,omitempty"` - Meta ListConversationResponseMeta `json:"Meta,omitempty"` + Meta ListConversationResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/conversations/v1/model_list_service_conversation_participant_response.go b/twilio/rest/conversations/v1/model_list_service_conversation_participant_response.go index e31f0d820..da7fb9d18 100644 --- a/twilio/rest/conversations/v1/model_list_service_conversation_participant_response.go +++ b/twilio/rest/conversations/v1/model_list_service_conversation_participant_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListServiceConversationParticipantResponse struct for ListServiceConversationParticipantResponse type ListServiceConversationParticipantResponse struct { - Meta ListConversationResponseMeta `json:"Meta,omitempty"` + Meta ListConversationResponseMeta `json:"Meta,omitempty"` Participants []ConversationsV1ServiceServiceConversationServiceConversationParticipant `json:"Participants,omitempty"` } diff --git a/twilio/rest/conversations/v1/model_list_service_conversation_response.go b/twilio/rest/conversations/v1/model_list_service_conversation_response.go index f8e7c66f9..e1dc798e7 100644 --- a/twilio/rest/conversations/v1/model_list_service_conversation_response.go +++ b/twilio/rest/conversations/v1/model_list_service_conversation_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListServiceConversationResponse struct for ListServiceConversationResponse type ListServiceConversationResponse struct { Conversations []ConversationsV1ServiceServiceConversation `json:"Conversations,omitempty"` - Meta ListConversationResponseMeta `json:"Meta,omitempty"` + Meta ListConversationResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/conversations/v1/model_list_service_conversation_scoped_webhook_response.go b/twilio/rest/conversations/v1/model_list_service_conversation_scoped_webhook_response.go index 22f7cdc70..26212848d 100644 --- a/twilio/rest/conversations/v1/model_list_service_conversation_scoped_webhook_response.go +++ b/twilio/rest/conversations/v1/model_list_service_conversation_scoped_webhook_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListServiceConversationScopedWebhookResponse struct for ListServiceConversationScopedWebhookResponse type ListServiceConversationScopedWebhookResponse struct { - Meta ListConversationResponseMeta `json:"Meta,omitempty"` + Meta ListConversationResponseMeta `json:"Meta,omitempty"` Webhooks []ConversationsV1ServiceServiceConversationServiceConversationScopedWebhook `json:"Webhooks,omitempty"` } diff --git a/twilio/rest/conversations/v1/model_list_service_response.go b/twilio/rest/conversations/v1/model_list_service_response.go index bc722c0a6..b8c85a20c 100644 --- a/twilio/rest/conversations/v1/model_list_service_response.go +++ b/twilio/rest/conversations/v1/model_list_service_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListServiceResponse struct for ListServiceResponse type ListServiceResponse struct { - Meta ListConversationResponseMeta `json:"Meta,omitempty"` - Services []ConversationsV1Service `json:"Services,omitempty"` + Meta ListConversationResponseMeta `json:"Meta,omitempty"` + Services []ConversationsV1Service `json:"Services,omitempty"` } diff --git a/twilio/rest/conversations/v1/model_list_service_role_response.go b/twilio/rest/conversations/v1/model_list_service_role_response.go index fa24e0b36..6cf248f09 100644 --- a/twilio/rest/conversations/v1/model_list_service_role_response.go +++ b/twilio/rest/conversations/v1/model_list_service_role_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListServiceRoleResponse struct for ListServiceRoleResponse type ListServiceRoleResponse struct { - Meta ListConversationResponseMeta `json:"Meta,omitempty"` + Meta ListConversationResponseMeta `json:"Meta,omitempty"` Roles []ConversationsV1ServiceServiceRole `json:"Roles,omitempty"` } diff --git a/twilio/rest/conversations/v1/model_list_service_user_response.go b/twilio/rest/conversations/v1/model_list_service_user_response.go index 4b7653964..154b201e4 100644 --- a/twilio/rest/conversations/v1/model_list_service_user_response.go +++ b/twilio/rest/conversations/v1/model_list_service_user_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListServiceUserResponse struct for ListServiceUserResponse type ListServiceUserResponse struct { - Meta ListConversationResponseMeta `json:"Meta,omitempty"` + Meta ListConversationResponseMeta `json:"Meta,omitempty"` Users []ConversationsV1ServiceServiceUser `json:"Users,omitempty"` } diff --git a/twilio/rest/conversations/v1/model_list_user_response.go b/twilio/rest/conversations/v1/model_list_user_response.go index 5eb6f0b2f..4deab1b3e 100644 --- a/twilio/rest/conversations/v1/model_list_user_response.go +++ b/twilio/rest/conversations/v1/model_list_user_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Conversations - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListUserResponse struct for ListUserResponse type ListUserResponse struct { - Meta ListConversationResponseMeta `json:"Meta,omitempty"` - Users []ConversationsV1User `json:"Users,omitempty"` + Meta ListConversationResponseMeta `json:"Meta,omitempty"` + Users []ConversationsV1User `json:"Users,omitempty"` } diff --git a/twilio/rest/events/v1/api_default.go b/twilio/rest/events/v1/api_default.go index 6574dd567..75da51538 100644 --- a/twilio/rest/events/v1/api_default.go +++ b/twilio/rest/events/v1/api_default.go @@ -1,11 +1,11 @@ /* - * Twilio - Events - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Events + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,9 +14,10 @@ package openapi import ( "encoding/json" "fmt" - twilio "github.com/twilio/twilio-go/client" "net/url" - "strings" + "strings" + + twilio "github.com/twilio/twilio-go/client" ) type DefaultApiService struct { @@ -25,17 +26,17 @@ type DefaultApiService struct { } func NewDefaultApiService(client *twilio.Client) *DefaultApiService { - return &DefaultApiService { - client: client, + return &DefaultApiService{ + client: client, baseURL: "https://events.twilio.com", } } // CreateSinkParams Optional parameters for the method 'CreateSink' type CreateSinkParams struct { - Description *string `json:"Description,omitempty"` + Description *string `json:"Description,omitempty"` SinkConfiguration *map[string]interface{} `json:"SinkConfiguration,omitempty"` - SinkType *string `json:"SinkType,omitempty"` + SinkType *string `json:"SinkType,omitempty"` } /* @@ -46,43 +47,42 @@ type CreateSinkParams struct { * @param "SinkConfiguration" (map[string]interface{}) - The information required for Twilio to connect to the provided Sink encoded as JSON. * @param "SinkType" (string) - The Sink type. Can only be \\\"kinesis\\\" or \\\"webhook\\\" currently. * @return EventsV1Sink -*/ + */ func (c *DefaultApiService) CreateSink(params *CreateSinkParams) (*EventsV1Sink, error) { - path := "/v1/Sinks" + path := "/v1/Sinks" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Description != nil { - data.Set("Description", *params.Description) -} - if params != nil && params.SinkConfiguration != nil { - v, err := json.Marshal(params.SinkConfiguration) - - if err != nil { - return nil, err + if params != nil && params.Description != nil { + data.Set("Description", *params.Description) } + if params != nil && params.SinkConfiguration != nil { + v, err := json.Marshal(params.SinkConfiguration) - data.Set("SinkConfiguration", fmt.Sprint(v)) -} - if params != nil && params.SinkType != nil { - data.Set("SinkType", *params.SinkType) -} + if err != nil { + return nil, err + } + data.Set("SinkConfiguration", fmt.Sprint(v)) + } + if params != nil && params.SinkType != nil { + data.Set("SinkType", *params.SinkType) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &EventsV1Sink{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &EventsV1Sink{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -90,30 +90,29 @@ func (c *DefaultApiService) CreateSink(params *CreateSinkParams) (*EventsV1Sink, * Create a new Sink Test Event for the given Sink. * @param Sid A 34 character string that uniquely identifies the Sink to be Tested. * @return EventsV1SinkSinkTest -*/ -func (c *DefaultApiService) CreateSinkTest(Sid string, ) (*EventsV1SinkSinkTest, error) { - path := "/v1/Sinks/{Sid}/Test" + */ +func (c *DefaultApiService) CreateSinkTest(Sid string) (*EventsV1SinkSinkTest, error) { + path := "/v1/Sinks/{Sid}/Test" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &EventsV1SinkSinkTest{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &EventsV1SinkSinkTest{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateSinkValidateParams Optional parameters for the method 'CreateSinkValidate' type CreateSinkValidateParams struct { TestId *string `json:"TestId,omitempty"` @@ -126,38 +125,38 @@ type CreateSinkValidateParams struct { * @param optional nil or *CreateSinkValidateParams - Optional Parameters: * @param "TestId" (string) - A 34 character string that uniquely identifies the test event for a Sink being validated. * @return EventsV1SinkSinkValidate -*/ + */ func (c *DefaultApiService) CreateSinkValidate(Sid string, params *CreateSinkValidateParams) (*EventsV1SinkSinkValidate, error) { - path := "/v1/Sinks/{Sid}/Validate" + path := "/v1/Sinks/{Sid}/Validate" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.TestId != nil { - data.Set("TestId", *params.TestId) -} + data := url.Values{} + headers := 0 + if params != nil && params.TestId != nil { + data.Set("TestId", *params.TestId) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &EventsV1SinkSinkValidate{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &EventsV1SinkSinkValidate{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateSubscriptionParams Optional parameters for the method 'CreateSubscription' type CreateSubscriptionParams struct { - Description *string `json:"Description,omitempty"` - SinkSid *string `json:"SinkSid,omitempty"` - Types *[]map[string]interface{} `json:"Types,omitempty"` + Description *string `json:"Description,omitempty"` + SinkSid *string `json:"SinkSid,omitempty"` + Types *[]map[string]interface{} `json:"Types,omitempty"` } /* @@ -168,91 +167,86 @@ type CreateSubscriptionParams struct { * @param "SinkSid" (string) - The SID of the sink that events selected by this subscription should be sent to. Sink must be active for the subscription to be created. * @param "Types" ([]map[string]interface{}) - An array of objects containing the subscribed Event Types * @return EventsV1Subscription -*/ + */ func (c *DefaultApiService) CreateSubscription(params *CreateSubscriptionParams) (*EventsV1Subscription, error) { - path := "/v1/Subscriptions" + path := "/v1/Subscriptions" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Description != nil { - data.Set("Description", *params.Description) -} - if params != nil && params.SinkSid != nil { - data.Set("SinkSid", *params.SinkSid) -} - if params != nil && params.Types != nil { - v, err := json.Marshal(params.Types) - - if err != nil { - return nil, err + if params != nil && params.Description != nil { + data.Set("Description", *params.Description) } + if params != nil && params.SinkSid != nil { + data.Set("SinkSid", *params.SinkSid) + } + if params != nil && params.Types != nil { + v, err := json.Marshal(params.Types) - data.Set("Types", fmt.Sprint(v)) -} + if err != nil { + return nil, err + } + data.Set("Types", fmt.Sprint(v)) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &EventsV1Subscription{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &EventsV1Subscription{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * DeleteSink Method for DeleteSink * Delete a specific Sink. * @param Sid A 34 character string that uniquely identifies this Sink. -*/ -func (c *DefaultApiService) DeleteSink(Sid string, ) (error) { - path := "/v1/Sinks/{Sid}" + */ +func (c *DefaultApiService) DeleteSink(Sid string) error { + path := "/v1/Sinks/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + defer resp.Body.Close() - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() - - return nil + return nil } /* * DeleteSubscription Method for DeleteSubscription * Delete a specific Subscription. * @param Sid A 34 character string that uniquely identifies this Subscription. -*/ -func (c *DefaultApiService) DeleteSubscription(Sid string, ) (error) { - path := "/v1/Subscriptions/{Sid}" + */ +func (c *DefaultApiService) DeleteSubscription(Sid string) error { + path := "/v1/Subscriptions/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + defer resp.Body.Close() - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() - - return nil + return nil } /* @@ -260,29 +254,27 @@ func (c *DefaultApiService) DeleteSubscription(Sid string, ) (error) { * Fetch a specific Event Type. * @param Type A string that uniquely identifies this Event Type. * @return EventsV1EventType -*/ -func (c *DefaultApiService) FetchEventType(Type string, ) (*EventsV1EventType, error) { - path := "/v1/Types/{Type}" + */ +func (c *DefaultApiService) FetchEventType(Type string) (*EventsV1EventType, error) { + path := "/v1/Types/{Type}" path = strings.Replace(path, "{"+"Type"+"}", Type, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &EventsV1EventType{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &EventsV1EventType{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -290,29 +282,27 @@ func (c *DefaultApiService) FetchEventType(Type string, ) (*EventsV1EventType, e * Fetch a specific schema with its nested versions. * @param Id The unique identifier of the schema. Each schema can have multiple versions, that share the same id. * @return EventsV1Schema -*/ -func (c *DefaultApiService) FetchSchema(Id string, ) (*EventsV1Schema, error) { - path := "/v1/Schemas/{Id}" + */ +func (c *DefaultApiService) FetchSchema(Id string) (*EventsV1Schema, error) { + path := "/v1/Schemas/{Id}" path = strings.Replace(path, "{"+"Id"+"}", Id, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &EventsV1Schema{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &EventsV1Schema{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -320,29 +310,27 @@ func (c *DefaultApiService) FetchSchema(Id string, ) (*EventsV1Schema, error) { * Fetch a specific Sink. * @param Sid A 34 character string that uniquely identifies this Sink. * @return EventsV1Sink -*/ -func (c *DefaultApiService) FetchSink(Sid string, ) (*EventsV1Sink, error) { - path := "/v1/Sinks/{Sid}" + */ +func (c *DefaultApiService) FetchSink(Sid string) (*EventsV1Sink, error) { + path := "/v1/Sinks/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &EventsV1Sink{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &EventsV1Sink{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -350,29 +338,27 @@ func (c *DefaultApiService) FetchSink(Sid string, ) (*EventsV1Sink, error) { * Fetch a specific Subscription. * @param Sid A 34 character string that uniquely identifies this Subscription. * @return EventsV1Subscription -*/ -func (c *DefaultApiService) FetchSubscription(Sid string, ) (*EventsV1Subscription, error) { - path := "/v1/Subscriptions/{Sid}" + */ +func (c *DefaultApiService) FetchSubscription(Sid string) (*EventsV1Subscription, error) { + path := "/v1/Subscriptions/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &EventsV1Subscription{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &EventsV1Subscription{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -381,31 +367,30 @@ func (c *DefaultApiService) FetchSubscription(Sid string, ) (*EventsV1Subscripti * @param Id The unique identifier of the schema. Each schema can have multiple versions, that share the same id. * @param SchemaVersion The version of the schema * @return EventsV1SchemaVersion -*/ -func (c *DefaultApiService) FetchVersion(Id string, SchemaVersion int32, ) (*EventsV1SchemaVersion, error) { - path := "/v1/Schemas/{Id}/Versions/{SchemaVersion}" + */ +func (c *DefaultApiService) FetchVersion(Id string, SchemaVersion int32) (*EventsV1SchemaVersion, error) { + path := "/v1/Schemas/{Id}/Versions/{SchemaVersion}" path = strings.Replace(path, "{"+"Id"+"}", Id, -1) path = strings.Replace(path, "{"+"SchemaVersion"+"}", fmt.Sprint(SchemaVersion), -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &EventsV1SchemaVersion{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &EventsV1SchemaVersion{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListEventTypeParams Optional parameters for the method 'ListEventType' type ListEventTypeParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -417,32 +402,32 @@ type ListEventTypeParams struct { * @param optional nil or *ListEventTypeParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListEventTypeResponse -*/ + */ func (c *DefaultApiService) ListEventType(params *ListEventTypeParams) (*ListEventTypeResponse, error) { - path := "/v1/Types" - - data := url.Values{} - headers := 0 + path := "/v1/Types" - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListEventTypeResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListEventTypeResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListSinkParams Optional parameters for the method 'ListSink' type ListSinkParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -454,32 +439,32 @@ type ListSinkParams struct { * @param optional nil or *ListSinkParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListSinkResponse -*/ + */ func (c *DefaultApiService) ListSink(params *ListSinkParams) (*ListSinkResponse, error) { - path := "/v1/Sinks" - - data := url.Values{} - headers := 0 + path := "/v1/Sinks" - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListSinkResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListSinkResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListSubscribedEventParams Optional parameters for the method 'ListSubscribedEvent' type ListSubscribedEventParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -492,37 +477,37 @@ type ListSubscribedEventParams struct { * @param optional nil or *ListSubscribedEventParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListSubscribedEventResponse -*/ + */ func (c *DefaultApiService) ListSubscribedEvent(SubscriptionSid string, params *ListSubscribedEventParams) (*ListSubscribedEventResponse, error) { - path := "/v1/Subscriptions/{SubscriptionSid}/SubscribedEvents" + path := "/v1/Subscriptions/{SubscriptionSid}/SubscribedEvents" path = strings.Replace(path, "{"+"SubscriptionSid"+"}", SubscriptionSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListSubscribedEventResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListSubscribedEventResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListSubscriptionParams Optional parameters for the method 'ListSubscription' type ListSubscriptionParams struct { - SinkSid *string `json:"SinkSid,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + SinkSid *string `json:"SinkSid,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -532,35 +517,35 @@ type ListSubscriptionParams struct { * @param "SinkSid" (string) - The SID of the sink that the list of Subscriptions should be filtered by. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListSubscriptionResponse -*/ + */ func (c *DefaultApiService) ListSubscription(params *ListSubscriptionParams) (*ListSubscriptionResponse, error) { - path := "/v1/Subscriptions" - - data := url.Values{} - headers := 0 + path := "/v1/Subscriptions" - if params != nil && params.SinkSid != nil { - data.Set("SinkSid", *params.SinkSid) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.SinkSid != nil { + data.Set("SinkSid", *params.SinkSid) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListSubscriptionResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListSubscriptionResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListVersionParams Optional parameters for the method 'ListVersion' type ListVersionParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -573,37 +558,37 @@ type ListVersionParams struct { * @param optional nil or *ListVersionParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListVersionResponse -*/ + */ func (c *DefaultApiService) ListVersion(Id string, params *ListVersionParams) (*ListVersionResponse, error) { - path := "/v1/Schemas/{Id}/Versions" + path := "/v1/Schemas/{Id}/Versions" path = strings.Replace(path, "{"+"Id"+"}", Id, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListVersionResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListVersionResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateSubscriptionParams Optional parameters for the method 'UpdateSubscription' type UpdateSubscriptionParams struct { Description *string `json:"Description,omitempty"` - SinkSid *string `json:"SinkSid,omitempty"` + SinkSid *string `json:"SinkSid,omitempty"` } /* @@ -614,33 +599,32 @@ type UpdateSubscriptionParams struct { * @param "Description" (string) - A human readable description for the Subscription. * @param "SinkSid" (string) - The SID of the sink that events selected by this subscription should be sent to. Sink must be active for the subscription to be created. * @return EventsV1Subscription -*/ + */ func (c *DefaultApiService) UpdateSubscription(Sid string, params *UpdateSubscriptionParams) (*EventsV1Subscription, error) { - path := "/v1/Subscriptions/{Sid}" + path := "/v1/Subscriptions/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Description != nil { - data.Set("Description", *params.Description) -} - if params != nil && params.SinkSid != nil { - data.Set("SinkSid", *params.SinkSid) -} + data := url.Values{} + headers := 0 + if params != nil && params.Description != nil { + data.Set("Description", *params.Description) + } + if params != nil && params.SinkSid != nil { + data.Set("SinkSid", *params.SinkSid) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &EventsV1Subscription{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &EventsV1Subscription{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } diff --git a/twilio/rest/events/v1/model_events_v1_event_type.go b/twilio/rest/events/v1/model_events_v1_event_type.go index e79ea85c0..7f584f80f 100644 --- a/twilio/rest/events/v1/model_events_v1_event_type.go +++ b/twilio/rest/events/v1/model_events_v1_event_type.go @@ -1,18 +1,20 @@ /* - * Twilio - Events - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Events + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // EventsV1EventType struct for EventsV1EventType type EventsV1EventType struct { // The date this Event Type was created. @@ -20,8 +22,8 @@ type EventsV1EventType struct { // The date this Event Type was updated. DateUpdated *time.Time `json:"DateUpdated,omitempty"` // Event Type description. - Description *string `json:"Description,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` + Description *string `json:"Description,omitempty"` + Links *map[string]interface{} `json:"Links,omitempty"` // The Schema identifier for this Event Type. SchemaId *string `json:"SchemaId,omitempty"` // The Event Type identifier. diff --git a/twilio/rest/events/v1/model_events_v1_schema.go b/twilio/rest/events/v1/model_events_v1_schema.go index 8db77bdfc..099caf55d 100644 --- a/twilio/rest/events/v1/model_events_v1_schema.go +++ b/twilio/rest/events/v1/model_events_v1_schema.go @@ -1,18 +1,20 @@ /* - * Twilio - Events - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Events + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // EventsV1Schema struct for EventsV1Schema type EventsV1Schema struct { // Schema Identifier. diff --git a/twilio/rest/events/v1/model_events_v1_schema_version.go b/twilio/rest/events/v1/model_events_v1_schema_version.go index 4fc39ad70..c24bdc9a9 100644 --- a/twilio/rest/events/v1/model_events_v1_schema_version.go +++ b/twilio/rest/events/v1/model_events_v1_schema_version.go @@ -1,24 +1,26 @@ /* - * Twilio - Events - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Events + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // EventsV1SchemaVersion struct for EventsV1SchemaVersion type EventsV1SchemaVersion struct { // The date the schema version was created. DateCreated *time.Time `json:"DateCreated,omitempty"` // The unique identifier of the schema. - Id *string `json:"Id,omitempty"` + Id *string `json:"Id,omitempty"` Raw *string `json:"Raw,omitempty"` // The version of this schema. SchemaVersion *int32 `json:"SchemaVersion,omitempty"` diff --git a/twilio/rest/events/v1/model_events_v1_sink.go b/twilio/rest/events/v1/model_events_v1_sink.go index bd51d77b4..af2471c2c 100644 --- a/twilio/rest/events/v1/model_events_v1_sink.go +++ b/twilio/rest/events/v1/model_events_v1_sink.go @@ -1,18 +1,20 @@ /* - * Twilio - Events - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Events + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // EventsV1Sink struct for EventsV1Sink type EventsV1Sink struct { // The date this Sink was created diff --git a/twilio/rest/events/v1/model_events_v1_sink_sink_test_.go b/twilio/rest/events/v1/model_events_v1_sink_sink_test_.go index 04ad42091..0b1b9ab94 100644 --- a/twilio/rest/events/v1/model_events_v1_sink_sink_test_.go +++ b/twilio/rest/events/v1/model_events_v1_sink_sink_test_.go @@ -1,15 +1,16 @@ /* - * Twilio - Events - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Events + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // EventsV1SinkSinkTest struct for EventsV1SinkSinkTest type EventsV1SinkSinkTest struct { // Feedback indicating whether the test event was generated. diff --git a/twilio/rest/events/v1/model_events_v1_sink_sink_validate.go b/twilio/rest/events/v1/model_events_v1_sink_sink_validate.go index f8e032b83..cc1edc5dd 100644 --- a/twilio/rest/events/v1/model_events_v1_sink_sink_validate.go +++ b/twilio/rest/events/v1/model_events_v1_sink_sink_validate.go @@ -1,15 +1,16 @@ /* - * Twilio - Events - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Events + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // EventsV1SinkSinkValidate struct for EventsV1SinkSinkValidate type EventsV1SinkSinkValidate struct { // Feedback indicating whether the given Sink was validated. diff --git a/twilio/rest/events/v1/model_events_v1_subscription.go b/twilio/rest/events/v1/model_events_v1_subscription.go index 0830226d1..ff8845246 100644 --- a/twilio/rest/events/v1/model_events_v1_subscription.go +++ b/twilio/rest/events/v1/model_events_v1_subscription.go @@ -1,18 +1,20 @@ /* - * Twilio - Events - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Events + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // EventsV1Subscription struct for EventsV1Subscription type EventsV1Subscription struct { // Account SID. diff --git a/twilio/rest/events/v1/model_events_v1_subscription_subscribed_event.go b/twilio/rest/events/v1/model_events_v1_subscription_subscribed_event.go index 590175ba6..011122b6b 100644 --- a/twilio/rest/events/v1/model_events_v1_subscription_subscribed_event.go +++ b/twilio/rest/events/v1/model_events_v1_subscription_subscribed_event.go @@ -1,15 +1,16 @@ /* - * Twilio - Events - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Events + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // EventsV1SubscriptionSubscribedEvent struct for EventsV1SubscriptionSubscribedEvent type EventsV1SubscriptionSubscribedEvent struct { // Account SID. diff --git a/twilio/rest/events/v1/model_list_event_type_response.go b/twilio/rest/events/v1/model_list_event_type_response.go index 98592cd9b..52b44bc62 100644 --- a/twilio/rest/events/v1/model_list_event_type_response.go +++ b/twilio/rest/events/v1/model_list_event_type_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Events - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Events + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListEventTypeResponse struct for ListEventTypeResponse type ListEventTypeResponse struct { - Meta ListVersionResponseMeta `json:"Meta,omitempty"` - Types []EventsV1EventType `json:"Types,omitempty"` + Meta ListVersionResponseMeta `json:"Meta,omitempty"` + Types []EventsV1EventType `json:"Types,omitempty"` } diff --git a/twilio/rest/events/v1/model_list_sink_response.go b/twilio/rest/events/v1/model_list_sink_response.go index d4a62c9e4..f417f7041 100644 --- a/twilio/rest/events/v1/model_list_sink_response.go +++ b/twilio/rest/events/v1/model_list_sink_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Events - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Events + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListSinkResponse struct for ListSinkResponse type ListSinkResponse struct { - Meta ListVersionResponseMeta `json:"Meta,omitempty"` - Sinks []EventsV1Sink `json:"Sinks,omitempty"` + Meta ListVersionResponseMeta `json:"Meta,omitempty"` + Sinks []EventsV1Sink `json:"Sinks,omitempty"` } diff --git a/twilio/rest/events/v1/model_list_subscribed_event_response.go b/twilio/rest/events/v1/model_list_subscribed_event_response.go index 8d6f618e7..a62292231 100644 --- a/twilio/rest/events/v1/model_list_subscribed_event_response.go +++ b/twilio/rest/events/v1/model_list_subscribed_event_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Events - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Events + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListSubscribedEventResponse struct for ListSubscribedEventResponse type ListSubscribedEventResponse struct { - Meta ListVersionResponseMeta `json:"Meta,omitempty"` + Meta ListVersionResponseMeta `json:"Meta,omitempty"` Types []EventsV1SubscriptionSubscribedEvent `json:"Types,omitempty"` } diff --git a/twilio/rest/events/v1/model_list_subscription_response.go b/twilio/rest/events/v1/model_list_subscription_response.go index 94fd1af21..264350bfd 100644 --- a/twilio/rest/events/v1/model_list_subscription_response.go +++ b/twilio/rest/events/v1/model_list_subscription_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Events - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Events + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListSubscriptionResponse struct for ListSubscriptionResponse type ListSubscriptionResponse struct { - Meta ListVersionResponseMeta `json:"Meta,omitempty"` - Subscriptions []EventsV1Subscription `json:"Subscriptions,omitempty"` + Meta ListVersionResponseMeta `json:"Meta,omitempty"` + Subscriptions []EventsV1Subscription `json:"Subscriptions,omitempty"` } diff --git a/twilio/rest/events/v1/model_list_version_response.go b/twilio/rest/events/v1/model_list_version_response.go index 0e59276c0..8a1df167f 100644 --- a/twilio/rest/events/v1/model_list_version_response.go +++ b/twilio/rest/events/v1/model_list_version_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Events - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Events + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListVersionResponse struct for ListVersionResponse type ListVersionResponse struct { - Meta ListVersionResponseMeta `json:"Meta,omitempty"` + Meta ListVersionResponseMeta `json:"Meta,omitempty"` SchemaVersions []EventsV1SchemaVersion `json:"SchemaVersions,omitempty"` } diff --git a/twilio/rest/events/v1/model_list_version_response_meta.go b/twilio/rest/events/v1/model_list_version_response_meta.go index eeeb16b8f..54742c464 100644 --- a/twilio/rest/events/v1/model_list_version_response_meta.go +++ b/twilio/rest/events/v1/model_list_version_response_meta.go @@ -1,22 +1,23 @@ /* - * Twilio - Events - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Events + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListVersionResponseMeta struct for ListVersionResponseMeta type ListVersionResponseMeta struct { - FirstPageUrl string `json:"FirstPageUrl,omitempty"` - Key string `json:"Key,omitempty"` - NextPageUrl string `json:"NextPageUrl,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` - Url string `json:"Url,omitempty"` + Url string `json:"Url,omitempty"` } diff --git a/twilio/rest/fax/v1/api_default.go b/twilio/rest/fax/v1/api_default.go index c4cb994af..9b0f31d73 100644 --- a/twilio/rest/fax/v1/api_default.go +++ b/twilio/rest/fax/v1/api_default.go @@ -1,11 +1,11 @@ /* - * Twilio - Fax - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Fax + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,10 +14,11 @@ package openapi import ( "encoding/json" "fmt" - twilio "github.com/twilio/twilio-go/client" "net/url" - "strings" - "time" + "strings" + "time" + + twilio "github.com/twilio/twilio-go/client" ) type DefaultApiService struct { @@ -26,23 +27,23 @@ type DefaultApiService struct { } func NewDefaultApiService(client *twilio.Client) *DefaultApiService { - return &DefaultApiService { - client: client, + return &DefaultApiService{ + client: client, baseURL: "https://fax.twilio.com", } } // CreateFaxParams Optional parameters for the method 'CreateFax' type CreateFaxParams struct { - From *string `json:"From,omitempty"` - MediaUrl *string `json:"MediaUrl,omitempty"` - Quality *string `json:"Quality,omitempty"` + From *string `json:"From,omitempty"` + MediaUrl *string `json:"MediaUrl,omitempty"` + Quality *string `json:"Quality,omitempty"` SipAuthPassword *string `json:"SipAuthPassword,omitempty"` SipAuthUsername *string `json:"SipAuthUsername,omitempty"` - StatusCallback *string `json:"StatusCallback,omitempty"` - StoreMedia *bool `json:"StoreMedia,omitempty"` - To *string `json:"To,omitempty"` - Ttl *int32 `json:"Ttl,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` + StoreMedia *bool `json:"StoreMedia,omitempty"` + To *string `json:"To,omitempty"` + Ttl *int32 `json:"Ttl,omitempty"` } /* @@ -59,79 +60,76 @@ type CreateFaxParams struct { * @param "To" (string) - The phone number to receive the fax in [E.164](https://www.twilio.com/docs/glossary/what-e164) format or the recipient's SIP URI. * @param "Ttl" (int32) - How long in minutes from when the fax is initiated that we should try to send the fax. * @return FaxV1Fax -*/ + */ func (c *DefaultApiService) CreateFax(params *CreateFaxParams) (*FaxV1Fax, error) { - path := "/v1/Faxes" + path := "/v1/Faxes" - data := url.Values{} - headers := 0 - - if params != nil && params.From != nil { - data.Set("From", *params.From) -} - if params != nil && params.MediaUrl != nil { - data.Set("MediaUrl", *params.MediaUrl) -} - if params != nil && params.Quality != nil { - data.Set("Quality", *params.Quality) -} - if params != nil && params.SipAuthPassword != nil { - data.Set("SipAuthPassword", *params.SipAuthPassword) -} - if params != nil && params.SipAuthUsername != nil { - data.Set("SipAuthUsername", *params.SipAuthUsername) -} - if params != nil && params.StatusCallback != nil { - data.Set("StatusCallback", *params.StatusCallback) -} - if params != nil && params.StoreMedia != nil { - data.Set("StoreMedia", fmt.Sprint(*params.StoreMedia)) -} - if params != nil && params.To != nil { - data.Set("To", *params.To) -} - if params != nil && params.Ttl != nil { - data.Set("Ttl", fmt.Sprint(*params.Ttl)) -} + data := url.Values{} + headers := 0 + if params != nil && params.From != nil { + data.Set("From", *params.From) + } + if params != nil && params.MediaUrl != nil { + data.Set("MediaUrl", *params.MediaUrl) + } + if params != nil && params.Quality != nil { + data.Set("Quality", *params.Quality) + } + if params != nil && params.SipAuthPassword != nil { + data.Set("SipAuthPassword", *params.SipAuthPassword) + } + if params != nil && params.SipAuthUsername != nil { + data.Set("SipAuthUsername", *params.SipAuthUsername) + } + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) + } + if params != nil && params.StoreMedia != nil { + data.Set("StoreMedia", fmt.Sprint(*params.StoreMedia)) + } + if params != nil && params.To != nil { + data.Set("To", *params.To) + } + if params != nil && params.Ttl != nil { + data.Set("Ttl", fmt.Sprint(*params.Ttl)) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &FaxV1Fax{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &FaxV1Fax{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * DeleteFax Method for DeleteFax * Delete a specific fax and its associated media. * @param Sid The Twilio-provided string that uniquely identifies the Fax resource to delete. -*/ -func (c *DefaultApiService) DeleteFax(Sid string, ) (error) { - path := "/v1/Faxes/{Sid}" + */ +func (c *DefaultApiService) DeleteFax(Sid string) error { + path := "/v1/Faxes/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -139,25 +137,23 @@ func (c *DefaultApiService) DeleteFax(Sid string, ) (error) { * Delete a specific fax media instance. * @param FaxSid The SID of the fax with the FaxMedia resource to delete. * @param Sid The Twilio-provided string that uniquely identifies the FaxMedia resource to delete. -*/ -func (c *DefaultApiService) DeleteFaxMedia(FaxSid string, Sid string, ) (error) { - path := "/v1/Faxes/{FaxSid}/Media/{Sid}" + */ +func (c *DefaultApiService) DeleteFaxMedia(FaxSid string, Sid string) error { + path := "/v1/Faxes/{FaxSid}/Media/{Sid}" path = strings.Replace(path, "{"+"FaxSid"+"}", FaxSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -165,29 +161,27 @@ func (c *DefaultApiService) DeleteFaxMedia(FaxSid string, Sid string, ) (error) * Fetch a specific fax. * @param Sid The Twilio-provided string that uniquely identifies the Fax resource to fetch. * @return FaxV1Fax -*/ -func (c *DefaultApiService) FetchFax(Sid string, ) (*FaxV1Fax, error) { - path := "/v1/Faxes/{Sid}" + */ +func (c *DefaultApiService) FetchFax(Sid string) (*FaxV1Fax, error) { + path := "/v1/Faxes/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &FaxV1Fax{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &FaxV1Fax{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -196,38 +190,37 @@ func (c *DefaultApiService) FetchFax(Sid string, ) (*FaxV1Fax, error) { * @param FaxSid The SID of the fax with the FaxMedia resource to fetch. * @param Sid The Twilio-provided string that uniquely identifies the FaxMedia resource to fetch. * @return FaxV1FaxFaxMedia -*/ -func (c *DefaultApiService) FetchFaxMedia(FaxSid string, Sid string, ) (*FaxV1FaxFaxMedia, error) { - path := "/v1/Faxes/{FaxSid}/Media/{Sid}" + */ +func (c *DefaultApiService) FetchFaxMedia(FaxSid string, Sid string) (*FaxV1FaxFaxMedia, error) { + path := "/v1/Faxes/{FaxSid}/Media/{Sid}" path = strings.Replace(path, "{"+"FaxSid"+"}", FaxSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &FaxV1FaxFaxMedia{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &FaxV1FaxFaxMedia{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListFaxParams Optional parameters for the method 'ListFax' type ListFaxParams struct { - From *string `json:"From,omitempty"` - To *string `json:"To,omitempty"` + From *string `json:"From,omitempty"` + To *string `json:"To,omitempty"` DateCreatedOnOrBefore *time.Time `json:"DateCreatedOnOrBefore,omitempty"` - DateCreatedAfter *time.Time `json:"DateCreatedAfter,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + DateCreatedAfter *time.Time `json:"DateCreatedAfter,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -240,44 +233,44 @@ type ListFaxParams struct { * @param "DateCreatedAfter" (time.Time) - Retrieve only those faxes with a `date_created` that is later than this value, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListFaxResponse -*/ + */ func (c *DefaultApiService) ListFax(params *ListFaxParams) (*ListFaxResponse, error) { - path := "/v1/Faxes" - - data := url.Values{} - headers := 0 + path := "/v1/Faxes" - if params != nil && params.From != nil { - data.Set("From", *params.From) -} - if params != nil && params.To != nil { - data.Set("To", *params.To) -} - if params != nil && params.DateCreatedOnOrBefore != nil { - data.Set("DateCreatedOnOrBefore", fmt.Sprint(*params.DateCreatedOnOrBefore)) -} - if params != nil && params.DateCreatedAfter != nil { - data.Set("DateCreatedAfter", fmt.Sprint(*params.DateCreatedAfter)) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.From != nil { + data.Set("From", *params.From) + } + if params != nil && params.To != nil { + data.Set("To", *params.To) + } + if params != nil && params.DateCreatedOnOrBefore != nil { + data.Set("DateCreatedOnOrBefore", fmt.Sprint(*params.DateCreatedOnOrBefore)) + } + if params != nil && params.DateCreatedAfter != nil { + data.Set("DateCreatedAfter", fmt.Sprint(*params.DateCreatedAfter)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListFaxResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListFaxResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListFaxMediaParams Optional parameters for the method 'ListFaxMedia' type ListFaxMediaParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -290,33 +283,33 @@ type ListFaxMediaParams struct { * @param optional nil or *ListFaxMediaParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListFaxMediaResponse -*/ + */ func (c *DefaultApiService) ListFaxMedia(FaxSid string, params *ListFaxMediaParams) (*ListFaxMediaResponse, error) { - path := "/v1/Faxes/{FaxSid}/Media" + path := "/v1/Faxes/{FaxSid}/Media" path = strings.Replace(path, "{"+"FaxSid"+"}", FaxSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListFaxMediaResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListFaxMediaResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateFaxParams Optional parameters for the method 'UpdateFax' type UpdateFaxParams struct { Status *string `json:"Status,omitempty"` @@ -329,30 +322,29 @@ type UpdateFaxParams struct { * @param optional nil or *UpdateFaxParams - Optional Parameters: * @param "Status" (string) - The new [status](https://www.twilio.com/docs/fax/api/fax-resource#fax-status-values) of the resource. Can be only `canceled`. This may fail if transmission has already started. * @return FaxV1Fax -*/ + */ func (c *DefaultApiService) UpdateFax(Sid string, params *UpdateFaxParams) (*FaxV1Fax, error) { - path := "/v1/Faxes/{Sid}" + path := "/v1/Faxes/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) -} + data := url.Values{} + headers := 0 + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &FaxV1Fax{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &FaxV1Fax{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } diff --git a/twilio/rest/fax/v1/model_fax_v1_fax.go b/twilio/rest/fax/v1/model_fax_v1_fax.go index 87e9f5ea6..e865046c9 100644 --- a/twilio/rest/fax/v1/model_fax_v1_fax.go +++ b/twilio/rest/fax/v1/model_fax_v1_fax.go @@ -1,18 +1,20 @@ /* - * Twilio - Fax - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Fax + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // FaxV1Fax struct for FaxV1Fax type FaxV1Fax struct { // The SID of the Account that created the resource diff --git a/twilio/rest/fax/v1/model_fax_v1_fax_fax_media.go b/twilio/rest/fax/v1/model_fax_v1_fax_fax_media.go index 69641b669..efd90ac88 100644 --- a/twilio/rest/fax/v1/model_fax_v1_fax_fax_media.go +++ b/twilio/rest/fax/v1/model_fax_v1_fax_fax_media.go @@ -1,18 +1,20 @@ /* - * Twilio - Fax - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Fax + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // FaxV1FaxFaxMedia struct for FaxV1FaxFaxMedia type FaxV1FaxFaxMedia struct { // The SID of the Account that created the resource diff --git a/twilio/rest/fax/v1/model_list_fax_media_response.go b/twilio/rest/fax/v1/model_list_fax_media_response.go index 1a5f4717c..a98135d46 100644 --- a/twilio/rest/fax/v1/model_list_fax_media_response.go +++ b/twilio/rest/fax/v1/model_list_fax_media_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Fax - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Fax + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListFaxMediaResponse struct for ListFaxMediaResponse type ListFaxMediaResponse struct { - Media []FaxV1FaxFaxMedia `json:"Media,omitempty"` - Meta ListFaxResponseMeta `json:"Meta,omitempty"` + Media []FaxV1FaxFaxMedia `json:"Media,omitempty"` + Meta ListFaxResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/fax/v1/model_list_fax_response.go b/twilio/rest/fax/v1/model_list_fax_response.go index 33e9d6cf1..75429773d 100644 --- a/twilio/rest/fax/v1/model_list_fax_response.go +++ b/twilio/rest/fax/v1/model_list_fax_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Fax - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Fax + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListFaxResponse struct for ListFaxResponse type ListFaxResponse struct { - Faxes []FaxV1Fax `json:"Faxes,omitempty"` - Meta ListFaxResponseMeta `json:"Meta,omitempty"` + Faxes []FaxV1Fax `json:"Faxes,omitempty"` + Meta ListFaxResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/fax/v1/model_list_fax_response_meta.go b/twilio/rest/fax/v1/model_list_fax_response_meta.go index 3a975a222..1cf2f2409 100644 --- a/twilio/rest/fax/v1/model_list_fax_response_meta.go +++ b/twilio/rest/fax/v1/model_list_fax_response_meta.go @@ -1,22 +1,23 @@ /* - * Twilio - Fax - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Fax + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListFaxResponseMeta struct for ListFaxResponseMeta type ListFaxResponseMeta struct { - FirstPageUrl string `json:"FirstPageUrl,omitempty"` - Key string `json:"Key,omitempty"` - NextPageUrl string `json:"NextPageUrl,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` - Url string `json:"Url,omitempty"` + Url string `json:"Url,omitempty"` } diff --git a/twilio/rest/flex/v1/api_default.go b/twilio/rest/flex/v1/api_default.go index ca91efe63..e47382d31 100644 --- a/twilio/rest/flex/v1/api_default.go +++ b/twilio/rest/flex/v1/api_default.go @@ -1,11 +1,11 @@ /* - * Twilio - Flex - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Flex + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,9 +14,10 @@ package openapi import ( "encoding/json" "fmt" - twilio "github.com/twilio/twilio-go/client" "net/url" - "strings" + "strings" + + twilio "github.com/twilio/twilio-go/client" ) type DefaultApiService struct { @@ -25,24 +26,24 @@ type DefaultApiService struct { } func NewDefaultApiService(client *twilio.Client) *DefaultApiService { - return &DefaultApiService { - client: client, + return &DefaultApiService{ + client: client, baseURL: "https://flex-api.twilio.com", } } // CreateChannelParams Optional parameters for the method 'CreateChannel' type CreateChannelParams struct { - ChatFriendlyName *string `json:"ChatFriendlyName,omitempty"` - ChatUniqueName *string `json:"ChatUniqueName,omitempty"` + ChatFriendlyName *string `json:"ChatFriendlyName,omitempty"` + ChatUniqueName *string `json:"ChatUniqueName,omitempty"` ChatUserFriendlyName *string `json:"ChatUserFriendlyName,omitempty"` - FlexFlowSid *string `json:"FlexFlowSid,omitempty"` - Identity *string `json:"Identity,omitempty"` - LongLived *bool `json:"LongLived,omitempty"` - PreEngagementData *string `json:"PreEngagementData,omitempty"` - Target *string `json:"Target,omitempty"` - TaskAttributes *string `json:"TaskAttributes,omitempty"` - TaskSid *string `json:"TaskSid,omitempty"` + FlexFlowSid *string `json:"FlexFlowSid,omitempty"` + Identity *string `json:"Identity,omitempty"` + LongLived *bool `json:"LongLived,omitempty"` + PreEngagementData *string `json:"PreEngagementData,omitempty"` + Target *string `json:"Target,omitempty"` + TaskAttributes *string `json:"TaskAttributes,omitempty"` + TaskSid *string `json:"TaskSid,omitempty"` } /* @@ -59,78 +60,78 @@ type CreateChannelParams struct { * @param "TaskAttributes" (string) - The Task attributes to be added for the TaskRouter Task. * @param "TaskSid" (string) - The SID of the TaskRouter Task. Only valid when integration type is `task`. `null` for integration types `studio` & `external` * @return FlexV1Channel -*/ + */ func (c *DefaultApiService) CreateChannel(params *CreateChannelParams) (*FlexV1Channel, error) { - path := "/v1/Channels" + path := "/v1/Channels" - data := url.Values{} - headers := 0 - - if params != nil && params.ChatFriendlyName != nil { - data.Set("ChatFriendlyName", *params.ChatFriendlyName) -} - if params != nil && params.ChatUniqueName != nil { - data.Set("ChatUniqueName", *params.ChatUniqueName) -} - if params != nil && params.ChatUserFriendlyName != nil { - data.Set("ChatUserFriendlyName", *params.ChatUserFriendlyName) -} - if params != nil && params.FlexFlowSid != nil { - data.Set("FlexFlowSid", *params.FlexFlowSid) -} - if params != nil && params.Identity != nil { - data.Set("Identity", *params.Identity) -} - if params != nil && params.LongLived != nil { - data.Set("LongLived", fmt.Sprint(*params.LongLived)) -} - if params != nil && params.PreEngagementData != nil { - data.Set("PreEngagementData", *params.PreEngagementData) -} - if params != nil && params.Target != nil { - data.Set("Target", *params.Target) -} - if params != nil && params.TaskAttributes != nil { - data.Set("TaskAttributes", *params.TaskAttributes) -} - if params != nil && params.TaskSid != nil { - data.Set("TaskSid", *params.TaskSid) -} + data := url.Values{} + headers := 0 + if params != nil && params.ChatFriendlyName != nil { + data.Set("ChatFriendlyName", *params.ChatFriendlyName) + } + if params != nil && params.ChatUniqueName != nil { + data.Set("ChatUniqueName", *params.ChatUniqueName) + } + if params != nil && params.ChatUserFriendlyName != nil { + data.Set("ChatUserFriendlyName", *params.ChatUserFriendlyName) + } + if params != nil && params.FlexFlowSid != nil { + data.Set("FlexFlowSid", *params.FlexFlowSid) + } + if params != nil && params.Identity != nil { + data.Set("Identity", *params.Identity) + } + if params != nil && params.LongLived != nil { + data.Set("LongLived", fmt.Sprint(*params.LongLived)) + } + if params != nil && params.PreEngagementData != nil { + data.Set("PreEngagementData", *params.PreEngagementData) + } + if params != nil && params.Target != nil { + data.Set("Target", *params.Target) + } + if params != nil && params.TaskAttributes != nil { + data.Set("TaskAttributes", *params.TaskAttributes) + } + if params != nil && params.TaskSid != nil { + data.Set("TaskSid", *params.TaskSid) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &FlexV1Channel{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &FlexV1Channel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateFlexFlowParams Optional parameters for the method 'CreateFlexFlow' type CreateFlexFlowParams struct { - ChannelType *string `json:"ChannelType,omitempty"` - ChatServiceSid *string `json:"ChatServiceSid,omitempty"` - ContactIdentity *string `json:"ContactIdentity,omitempty"` - Enabled *bool `json:"Enabled,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - IntegrationChannel *string `json:"Integration.Channel,omitempty"` - IntegrationCreationOnMessage *bool `json:"Integration.CreationOnMessage,omitempty"` - IntegrationFlowSid *string `json:"Integration.FlowSid,omitempty"` - IntegrationPriority *int32 `json:"Integration.Priority,omitempty"` - IntegrationRetryCount *int32 `json:"Integration.RetryCount,omitempty"` - IntegrationTimeout *int32 `json:"Integration.Timeout,omitempty"` - IntegrationUrl *string `json:"Integration.Url,omitempty"` - IntegrationWorkflowSid *string `json:"Integration.WorkflowSid,omitempty"` - IntegrationWorkspaceSid *string `json:"Integration.WorkspaceSid,omitempty"` - IntegrationType *string `json:"IntegrationType,omitempty"` - JanitorEnabled *bool `json:"JanitorEnabled,omitempty"` - LongLived *bool `json:"LongLived,omitempty"` + ChannelType *string `json:"ChannelType,omitempty"` + ChatServiceSid *string `json:"ChatServiceSid,omitempty"` + ContactIdentity *string `json:"ContactIdentity,omitempty"` + Enabled *bool `json:"Enabled,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + IntegrationChannel *string `json:"Integration.Channel,omitempty"` + IntegrationCreationOnMessage *bool `json:"Integration.CreationOnMessage,omitempty"` + IntegrationFlowSid *string `json:"Integration.FlowSid,omitempty"` + IntegrationPriority *int32 `json:"Integration.Priority,omitempty"` + IntegrationRetryCount *int32 `json:"Integration.RetryCount,omitempty"` + IntegrationTimeout *int32 `json:"Integration.Timeout,omitempty"` + IntegrationUrl *string `json:"Integration.Url,omitempty"` + IntegrationWorkflowSid *string `json:"Integration.WorkflowSid,omitempty"` + IntegrationWorkspaceSid *string `json:"Integration.WorkspaceSid,omitempty"` + IntegrationType *string `json:"IntegrationType,omitempty"` + JanitorEnabled *bool `json:"JanitorEnabled,omitempty"` + LongLived *bool `json:"LongLived,omitempty"` } /* @@ -154,88 +155,88 @@ type CreateFlexFlowParams struct { * @param "JanitorEnabled" (bool) - When enabled, the Messaging Channel Janitor will remove active Proxy sessions if the associated Task is deleted outside of the Flex UI. Defaults to `false`. * @param "LongLived" (bool) - When enabled, Flex will keep the chat channel active so that it may be used for subsequent interactions with a contact identity. Defaults to `false`. * @return FlexV1FlexFlow -*/ + */ func (c *DefaultApiService) CreateFlexFlow(params *CreateFlexFlowParams) (*FlexV1FlexFlow, error) { - path := "/v1/FlexFlows" - - data := url.Values{} - headers := 0 + path := "/v1/FlexFlows" - if params != nil && params.ChannelType != nil { - data.Set("ChannelType", *params.ChannelType) -} - if params != nil && params.ChatServiceSid != nil { - data.Set("ChatServiceSid", *params.ChatServiceSid) -} - if params != nil && params.ContactIdentity != nil { - data.Set("ContactIdentity", *params.ContactIdentity) -} - if params != nil && params.Enabled != nil { - data.Set("Enabled", fmt.Sprint(*params.Enabled)) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.IntegrationChannel != nil { - data.Set("IntegrationChannel", *params.IntegrationChannel) -} - if params != nil && params.IntegrationCreationOnMessage != nil { - data.Set("IntegrationCreationOnMessage", fmt.Sprint(*params.IntegrationCreationOnMessage)) -} - if params != nil && params.IntegrationFlowSid != nil { - data.Set("IntegrationFlowSid", *params.IntegrationFlowSid) -} - if params != nil && params.IntegrationPriority != nil { - data.Set("IntegrationPriority", fmt.Sprint(*params.IntegrationPriority)) -} - if params != nil && params.IntegrationRetryCount != nil { - data.Set("IntegrationRetryCount", fmt.Sprint(*params.IntegrationRetryCount)) -} - if params != nil && params.IntegrationTimeout != nil { - data.Set("IntegrationTimeout", fmt.Sprint(*params.IntegrationTimeout)) -} - if params != nil && params.IntegrationUrl != nil { - data.Set("IntegrationUrl", *params.IntegrationUrl) -} - if params != nil && params.IntegrationWorkflowSid != nil { - data.Set("IntegrationWorkflowSid", *params.IntegrationWorkflowSid) -} - if params != nil && params.IntegrationWorkspaceSid != nil { - data.Set("IntegrationWorkspaceSid", *params.IntegrationWorkspaceSid) -} - if params != nil && params.IntegrationType != nil { - data.Set("IntegrationType", *params.IntegrationType) -} - if params != nil && params.JanitorEnabled != nil { - data.Set("JanitorEnabled", fmt.Sprint(*params.JanitorEnabled)) -} - if params != nil && params.LongLived != nil { - data.Set("LongLived", fmt.Sprint(*params.LongLived)) -} + data := url.Values{} + headers := 0 + if params != nil && params.ChannelType != nil { + data.Set("ChannelType", *params.ChannelType) + } + if params != nil && params.ChatServiceSid != nil { + data.Set("ChatServiceSid", *params.ChatServiceSid) + } + if params != nil && params.ContactIdentity != nil { + data.Set("ContactIdentity", *params.ContactIdentity) + } + if params != nil && params.Enabled != nil { + data.Set("Enabled", fmt.Sprint(*params.Enabled)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.IntegrationChannel != nil { + data.Set("IntegrationChannel", *params.IntegrationChannel) + } + if params != nil && params.IntegrationCreationOnMessage != nil { + data.Set("IntegrationCreationOnMessage", fmt.Sprint(*params.IntegrationCreationOnMessage)) + } + if params != nil && params.IntegrationFlowSid != nil { + data.Set("IntegrationFlowSid", *params.IntegrationFlowSid) + } + if params != nil && params.IntegrationPriority != nil { + data.Set("IntegrationPriority", fmt.Sprint(*params.IntegrationPriority)) + } + if params != nil && params.IntegrationRetryCount != nil { + data.Set("IntegrationRetryCount", fmt.Sprint(*params.IntegrationRetryCount)) + } + if params != nil && params.IntegrationTimeout != nil { + data.Set("IntegrationTimeout", fmt.Sprint(*params.IntegrationTimeout)) + } + if params != nil && params.IntegrationUrl != nil { + data.Set("IntegrationUrl", *params.IntegrationUrl) + } + if params != nil && params.IntegrationWorkflowSid != nil { + data.Set("IntegrationWorkflowSid", *params.IntegrationWorkflowSid) + } + if params != nil && params.IntegrationWorkspaceSid != nil { + data.Set("IntegrationWorkspaceSid", *params.IntegrationWorkspaceSid) + } + if params != nil && params.IntegrationType != nil { + data.Set("IntegrationType", *params.IntegrationType) + } + if params != nil && params.JanitorEnabled != nil { + data.Set("JanitorEnabled", fmt.Sprint(*params.JanitorEnabled)) + } + if params != nil && params.LongLived != nil { + data.Set("LongLived", fmt.Sprint(*params.LongLived)) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &FlexV1FlexFlow{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &FlexV1FlexFlow{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateWebChannelParams Optional parameters for the method 'CreateWebChannel' type CreateWebChannelParams struct { - ChatFriendlyName *string `json:"ChatFriendlyName,omitempty"` - ChatUniqueName *string `json:"ChatUniqueName,omitempty"` + ChatFriendlyName *string `json:"ChatFriendlyName,omitempty"` + ChatUniqueName *string `json:"ChatUniqueName,omitempty"` CustomerFriendlyName *string `json:"CustomerFriendlyName,omitempty"` - FlexFlowSid *string `json:"FlexFlowSid,omitempty"` - Identity *string `json:"Identity,omitempty"` - PreEngagementData *string `json:"PreEngagementData,omitempty"` + FlexFlowSid *string `json:"FlexFlowSid,omitempty"` + Identity *string `json:"Identity,omitempty"` + PreEngagementData *string `json:"PreEngagementData,omitempty"` } /* @@ -248,145 +249,137 @@ type CreateWebChannelParams struct { * @param "Identity" (string) - The chat identity. * @param "PreEngagementData" (string) - The pre-engagement data. * @return FlexV1WebChannel -*/ + */ func (c *DefaultApiService) CreateWebChannel(params *CreateWebChannelParams) (*FlexV1WebChannel, error) { - path := "/v1/WebChannels" + path := "/v1/WebChannels" - data := url.Values{} - headers := 0 - - if params != nil && params.ChatFriendlyName != nil { - data.Set("ChatFriendlyName", *params.ChatFriendlyName) -} - if params != nil && params.ChatUniqueName != nil { - data.Set("ChatUniqueName", *params.ChatUniqueName) -} - if params != nil && params.CustomerFriendlyName != nil { - data.Set("CustomerFriendlyName", *params.CustomerFriendlyName) -} - if params != nil && params.FlexFlowSid != nil { - data.Set("FlexFlowSid", *params.FlexFlowSid) -} - if params != nil && params.Identity != nil { - data.Set("Identity", *params.Identity) -} - if params != nil && params.PreEngagementData != nil { - data.Set("PreEngagementData", *params.PreEngagementData) -} + data := url.Values{} + headers := 0 + if params != nil && params.ChatFriendlyName != nil { + data.Set("ChatFriendlyName", *params.ChatFriendlyName) + } + if params != nil && params.ChatUniqueName != nil { + data.Set("ChatUniqueName", *params.ChatUniqueName) + } + if params != nil && params.CustomerFriendlyName != nil { + data.Set("CustomerFriendlyName", *params.CustomerFriendlyName) + } + if params != nil && params.FlexFlowSid != nil { + data.Set("FlexFlowSid", *params.FlexFlowSid) + } + if params != nil && params.Identity != nil { + data.Set("Identity", *params.Identity) + } + if params != nil && params.PreEngagementData != nil { + data.Set("PreEngagementData", *params.PreEngagementData) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &FlexV1WebChannel{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &FlexV1WebChannel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * DeleteChannel Method for DeleteChannel * @param Sid The SID of the Flex chat channel resource to delete. -*/ -func (c *DefaultApiService) DeleteChannel(Sid string, ) (error) { - path := "/v1/Channels/{Sid}" + */ +func (c *DefaultApiService) DeleteChannel(Sid string) error { + path := "/v1/Channels/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* * DeleteFlexFlow Method for DeleteFlexFlow * @param Sid The SID of the Flex Flow resource to delete. -*/ -func (c *DefaultApiService) DeleteFlexFlow(Sid string, ) (error) { - path := "/v1/FlexFlows/{Sid}" + */ +func (c *DefaultApiService) DeleteFlexFlow(Sid string) error { + path := "/v1/FlexFlows/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* * DeleteWebChannel Method for DeleteWebChannel * @param Sid The SID of the WebChannel resource to delete. -*/ -func (c *DefaultApiService) DeleteWebChannel(Sid string, ) (error) { - path := "/v1/WebChannels/{Sid}" + */ +func (c *DefaultApiService) DeleteWebChannel(Sid string) error { + path := "/v1/WebChannels/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* * FetchChannel Method for FetchChannel * @param Sid The SID of the Flex chat channel resource to fetch. * @return FlexV1Channel -*/ -func (c *DefaultApiService) FetchChannel(Sid string, ) (*FlexV1Channel, error) { - path := "/v1/Channels/{Sid}" + */ +func (c *DefaultApiService) FetchChannel(Sid string) (*FlexV1Channel, error) { + path := "/v1/Channels/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &FlexV1Channel{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &FlexV1Channel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // FetchConfigurationParams Optional parameters for the method 'FetchConfiguration' type FetchConfigurationParams struct { UiVersion *string `json:"UiVersion,omitempty"` @@ -397,90 +390,86 @@ type FetchConfigurationParams struct { * @param optional nil or *FetchConfigurationParams - Optional Parameters: * @param "UiVersion" (string) - The Pinned UI version of the Configuration resource to fetch. * @return FlexV1Configuration -*/ + */ func (c *DefaultApiService) FetchConfiguration(params *FetchConfigurationParams) (*FlexV1Configuration, error) { - path := "/v1/Configuration" - - data := url.Values{} - headers := 0 + path := "/v1/Configuration" - if params != nil && params.UiVersion != nil { - data.Set("UiVersion", *params.UiVersion) -} + data := url.Values{} + headers := 0 + if params != nil && params.UiVersion != nil { + data.Set("UiVersion", *params.UiVersion) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &FlexV1Configuration{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &FlexV1Configuration{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * FetchFlexFlow Method for FetchFlexFlow * @param Sid The SID of the Flex Flow resource to fetch. * @return FlexV1FlexFlow -*/ -func (c *DefaultApiService) FetchFlexFlow(Sid string, ) (*FlexV1FlexFlow, error) { - path := "/v1/FlexFlows/{Sid}" + */ +func (c *DefaultApiService) FetchFlexFlow(Sid string) (*FlexV1FlexFlow, error) { + path := "/v1/FlexFlows/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &FlexV1FlexFlow{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &FlexV1FlexFlow{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * FetchWebChannel Method for FetchWebChannel * @param Sid The SID of the WebChannel resource to fetch. * @return FlexV1WebChannel -*/ -func (c *DefaultApiService) FetchWebChannel(Sid string, ) (*FlexV1WebChannel, error) { - path := "/v1/WebChannels/{Sid}" + */ +func (c *DefaultApiService) FetchWebChannel(Sid string) (*FlexV1WebChannel, error) { + path := "/v1/WebChannels/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &FlexV1WebChannel{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &FlexV1WebChannel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListChannelParams Optional parameters for the method 'ListChannel' type ListChannelParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -491,36 +480,36 @@ type ListChannelParams struct { * @param optional nil or *ListChannelParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListChannelResponse -*/ + */ func (c *DefaultApiService) ListChannel(params *ListChannelParams) (*ListChannelResponse, error) { - path := "/v1/Channels" - - data := url.Values{} - headers := 0 + path := "/v1/Channels" - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListChannelResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListChannelResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListFlexFlowParams Optional parameters for the method 'ListFlexFlow' type ListFlexFlowParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -529,35 +518,35 @@ type ListFlexFlowParams struct { * @param "FriendlyName" (string) - The `friendly_name` of the Flex Flow resources to read. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListFlexFlowResponse -*/ + */ func (c *DefaultApiService) ListFlexFlow(params *ListFlexFlowParams) (*ListFlexFlowResponse, error) { - path := "/v1/FlexFlows" + path := "/v1/FlexFlows" - data := url.Values{} - headers := 0 - - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListFlexFlowResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListFlexFlowResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListWebChannelParams Optional parameters for the method 'ListWebChannel' type ListWebChannelParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -568,78 +557,76 @@ type ListWebChannelParams struct { * @param optional nil or *ListWebChannelParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListWebChannelResponse -*/ + */ func (c *DefaultApiService) ListWebChannel(params *ListWebChannelParams) (*ListWebChannelResponse, error) { - path := "/v1/WebChannels" + path := "/v1/WebChannels" - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListWebChannelResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListWebChannelResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * UpdateConfiguration Method for UpdateConfiguration * @return FlexV1Configuration -*/ + */ func (c *DefaultApiService) UpdateConfiguration() (*FlexV1Configuration, error) { - path := "/v1/Configuration" - - data := url.Values{} - headers := 0 + path := "/v1/Configuration" + data := url.Values{} + headers := 0 + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &FlexV1Configuration{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &FlexV1Configuration{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateFlexFlowParams Optional parameters for the method 'UpdateFlexFlow' type UpdateFlexFlowParams struct { - ChannelType *string `json:"ChannelType,omitempty"` - ChatServiceSid *string `json:"ChatServiceSid,omitempty"` - ContactIdentity *string `json:"ContactIdentity,omitempty"` - Enabled *bool `json:"Enabled,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - IntegrationChannel *string `json:"Integration.Channel,omitempty"` - IntegrationCreationOnMessage *bool `json:"Integration.CreationOnMessage,omitempty"` - IntegrationFlowSid *string `json:"Integration.FlowSid,omitempty"` - IntegrationPriority *int32 `json:"Integration.Priority,omitempty"` - IntegrationRetryCount *int32 `json:"Integration.RetryCount,omitempty"` - IntegrationTimeout *int32 `json:"Integration.Timeout,omitempty"` - IntegrationUrl *string `json:"Integration.Url,omitempty"` - IntegrationWorkflowSid *string `json:"Integration.WorkflowSid,omitempty"` - IntegrationWorkspaceSid *string `json:"Integration.WorkspaceSid,omitempty"` - IntegrationType *string `json:"IntegrationType,omitempty"` - JanitorEnabled *bool `json:"JanitorEnabled,omitempty"` - LongLived *bool `json:"LongLived,omitempty"` + ChannelType *string `json:"ChannelType,omitempty"` + ChatServiceSid *string `json:"ChatServiceSid,omitempty"` + ContactIdentity *string `json:"ContactIdentity,omitempty"` + Enabled *bool `json:"Enabled,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + IntegrationChannel *string `json:"Integration.Channel,omitempty"` + IntegrationCreationOnMessage *bool `json:"Integration.CreationOnMessage,omitempty"` + IntegrationFlowSid *string `json:"Integration.FlowSid,omitempty"` + IntegrationPriority *int32 `json:"Integration.Priority,omitempty"` + IntegrationRetryCount *int32 `json:"Integration.RetryCount,omitempty"` + IntegrationTimeout *int32 `json:"Integration.Timeout,omitempty"` + IntegrationUrl *string `json:"Integration.Url,omitempty"` + IntegrationWorkflowSid *string `json:"Integration.WorkflowSid,omitempty"` + IntegrationWorkspaceSid *string `json:"Integration.WorkspaceSid,omitempty"` + IntegrationType *string `json:"IntegrationType,omitempty"` + JanitorEnabled *bool `json:"JanitorEnabled,omitempty"` + LongLived *bool `json:"LongLived,omitempty"` } /* @@ -664,84 +651,84 @@ type UpdateFlexFlowParams struct { * @param "JanitorEnabled" (bool) - When enabled, the Messaging Channel Janitor will remove active Proxy sessions if the associated Task is deleted outside of the Flex UI. Defaults to `false`. * @param "LongLived" (bool) - When enabled, Flex will keep the chat channel active so that it may be used for subsequent interactions with a contact identity. Defaults to `false`. * @return FlexV1FlexFlow -*/ + */ func (c *DefaultApiService) UpdateFlexFlow(Sid string, params *UpdateFlexFlowParams) (*FlexV1FlexFlow, error) { - path := "/v1/FlexFlows/{Sid}" + path := "/v1/FlexFlows/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.ChannelType != nil { - data.Set("ChannelType", *params.ChannelType) -} - if params != nil && params.ChatServiceSid != nil { - data.Set("ChatServiceSid", *params.ChatServiceSid) -} - if params != nil && params.ContactIdentity != nil { - data.Set("ContactIdentity", *params.ContactIdentity) -} - if params != nil && params.Enabled != nil { - data.Set("Enabled", fmt.Sprint(*params.Enabled)) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.IntegrationChannel != nil { - data.Set("IntegrationChannel", *params.IntegrationChannel) -} - if params != nil && params.IntegrationCreationOnMessage != nil { - data.Set("IntegrationCreationOnMessage", fmt.Sprint(*params.IntegrationCreationOnMessage)) -} - if params != nil && params.IntegrationFlowSid != nil { - data.Set("IntegrationFlowSid", *params.IntegrationFlowSid) -} - if params != nil && params.IntegrationPriority != nil { - data.Set("IntegrationPriority", fmt.Sprint(*params.IntegrationPriority)) -} - if params != nil && params.IntegrationRetryCount != nil { - data.Set("IntegrationRetryCount", fmt.Sprint(*params.IntegrationRetryCount)) -} - if params != nil && params.IntegrationTimeout != nil { - data.Set("IntegrationTimeout", fmt.Sprint(*params.IntegrationTimeout)) -} - if params != nil && params.IntegrationUrl != nil { - data.Set("IntegrationUrl", *params.IntegrationUrl) -} - if params != nil && params.IntegrationWorkflowSid != nil { - data.Set("IntegrationWorkflowSid", *params.IntegrationWorkflowSid) -} - if params != nil && params.IntegrationWorkspaceSid != nil { - data.Set("IntegrationWorkspaceSid", *params.IntegrationWorkspaceSid) -} - if params != nil && params.IntegrationType != nil { - data.Set("IntegrationType", *params.IntegrationType) -} - if params != nil && params.JanitorEnabled != nil { - data.Set("JanitorEnabled", fmt.Sprint(*params.JanitorEnabled)) -} - if params != nil && params.LongLived != nil { - data.Set("LongLived", fmt.Sprint(*params.LongLived)) -} + data := url.Values{} + headers := 0 + if params != nil && params.ChannelType != nil { + data.Set("ChannelType", *params.ChannelType) + } + if params != nil && params.ChatServiceSid != nil { + data.Set("ChatServiceSid", *params.ChatServiceSid) + } + if params != nil && params.ContactIdentity != nil { + data.Set("ContactIdentity", *params.ContactIdentity) + } + if params != nil && params.Enabled != nil { + data.Set("Enabled", fmt.Sprint(*params.Enabled)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.IntegrationChannel != nil { + data.Set("IntegrationChannel", *params.IntegrationChannel) + } + if params != nil && params.IntegrationCreationOnMessage != nil { + data.Set("IntegrationCreationOnMessage", fmt.Sprint(*params.IntegrationCreationOnMessage)) + } + if params != nil && params.IntegrationFlowSid != nil { + data.Set("IntegrationFlowSid", *params.IntegrationFlowSid) + } + if params != nil && params.IntegrationPriority != nil { + data.Set("IntegrationPriority", fmt.Sprint(*params.IntegrationPriority)) + } + if params != nil && params.IntegrationRetryCount != nil { + data.Set("IntegrationRetryCount", fmt.Sprint(*params.IntegrationRetryCount)) + } + if params != nil && params.IntegrationTimeout != nil { + data.Set("IntegrationTimeout", fmt.Sprint(*params.IntegrationTimeout)) + } + if params != nil && params.IntegrationUrl != nil { + data.Set("IntegrationUrl", *params.IntegrationUrl) + } + if params != nil && params.IntegrationWorkflowSid != nil { + data.Set("IntegrationWorkflowSid", *params.IntegrationWorkflowSid) + } + if params != nil && params.IntegrationWorkspaceSid != nil { + data.Set("IntegrationWorkspaceSid", *params.IntegrationWorkspaceSid) + } + if params != nil && params.IntegrationType != nil { + data.Set("IntegrationType", *params.IntegrationType) + } + if params != nil && params.JanitorEnabled != nil { + data.Set("JanitorEnabled", fmt.Sprint(*params.JanitorEnabled)) + } + if params != nil && params.LongLived != nil { + data.Set("LongLived", fmt.Sprint(*params.LongLived)) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &FlexV1FlexFlow{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &FlexV1FlexFlow{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateWebChannelParams Optional parameters for the method 'UpdateWebChannel' type UpdateWebChannelParams struct { - ChatStatus *string `json:"ChatStatus,omitempty"` + ChatStatus *string `json:"ChatStatus,omitempty"` PostEngagementData *string `json:"PostEngagementData,omitempty"` } @@ -752,33 +739,32 @@ type UpdateWebChannelParams struct { * @param "ChatStatus" (string) - The chat status. Can only be `inactive`. * @param "PostEngagementData" (string) - The post-engagement data. * @return FlexV1WebChannel -*/ + */ func (c *DefaultApiService) UpdateWebChannel(Sid string, params *UpdateWebChannelParams) (*FlexV1WebChannel, error) { - path := "/v1/WebChannels/{Sid}" + path := "/v1/WebChannels/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.ChatStatus != nil { - data.Set("ChatStatus", *params.ChatStatus) -} - if params != nil && params.PostEngagementData != nil { - data.Set("PostEngagementData", *params.PostEngagementData) -} + data := url.Values{} + headers := 0 + if params != nil && params.ChatStatus != nil { + data.Set("ChatStatus", *params.ChatStatus) + } + if params != nil && params.PostEngagementData != nil { + data.Set("PostEngagementData", *params.PostEngagementData) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &FlexV1WebChannel{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &FlexV1WebChannel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } diff --git a/twilio/rest/flex/v1/model_flex_v1_channel.go b/twilio/rest/flex/v1/model_flex_v1_channel.go index e3fcb4c13..540a6f14b 100644 --- a/twilio/rest/flex/v1/model_flex_v1_channel.go +++ b/twilio/rest/flex/v1/model_flex_v1_channel.go @@ -1,18 +1,20 @@ /* - * Twilio - Flex - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Flex + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // FlexV1Channel struct for FlexV1Channel type FlexV1Channel struct { // The SID of the Account that created the resource and owns this Workflow diff --git a/twilio/rest/flex/v1/model_flex_v1_configuration.go b/twilio/rest/flex/v1/model_flex_v1_configuration.go index 24d937f53..cca75524f 100644 --- a/twilio/rest/flex/v1/model_flex_v1_configuration.go +++ b/twilio/rest/flex/v1/model_flex_v1_configuration.go @@ -1,18 +1,20 @@ /* - * Twilio - Flex - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Flex + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // FlexV1Configuration struct for FlexV1Configuration type FlexV1Configuration struct { // The SID of the Account that created the resource diff --git a/twilio/rest/flex/v1/model_flex_v1_flex_flow.go b/twilio/rest/flex/v1/model_flex_v1_flex_flow.go index 21aa72ec2..f21e4c781 100644 --- a/twilio/rest/flex/v1/model_flex_v1_flex_flow.go +++ b/twilio/rest/flex/v1/model_flex_v1_flex_flow.go @@ -1,18 +1,20 @@ /* - * Twilio - Flex - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Flex + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // FlexV1FlexFlow struct for FlexV1FlexFlow type FlexV1FlexFlow struct { // The SID of the Account that created the resource diff --git a/twilio/rest/flex/v1/model_flex_v1_web_channel.go b/twilio/rest/flex/v1/model_flex_v1_web_channel.go index 845e7b36d..f031c7d46 100644 --- a/twilio/rest/flex/v1/model_flex_v1_web_channel.go +++ b/twilio/rest/flex/v1/model_flex_v1_web_channel.go @@ -1,18 +1,20 @@ /* - * Twilio - Flex - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Flex + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // FlexV1WebChannel struct for FlexV1WebChannel type FlexV1WebChannel struct { // The SID of the Account that created the resource and owns this Workflow diff --git a/twilio/rest/flex/v1/model_list_channel_response.go b/twilio/rest/flex/v1/model_list_channel_response.go index 9db7f03f0..23dac0328 100644 --- a/twilio/rest/flex/v1/model_list_channel_response.go +++ b/twilio/rest/flex/v1/model_list_channel_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Flex - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Flex + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListChannelResponse struct for ListChannelResponse type ListChannelResponse struct { - FlexChatChannels []FlexV1Channel `json:"FlexChatChannels,omitempty"` - Meta ListChannelResponseMeta `json:"Meta,omitempty"` + FlexChatChannels []FlexV1Channel `json:"FlexChatChannels,omitempty"` + Meta ListChannelResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/flex/v1/model_list_channel_response_meta.go b/twilio/rest/flex/v1/model_list_channel_response_meta.go index 022721677..fa70d5cf5 100644 --- a/twilio/rest/flex/v1/model_list_channel_response_meta.go +++ b/twilio/rest/flex/v1/model_list_channel_response_meta.go @@ -1,22 +1,23 @@ /* - * Twilio - Flex - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Flex + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListChannelResponseMeta struct for ListChannelResponseMeta type ListChannelResponseMeta struct { - FirstPageUrl string `json:"FirstPageUrl,omitempty"` - Key string `json:"Key,omitempty"` - NextPageUrl string `json:"NextPageUrl,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` - Url string `json:"Url,omitempty"` + Url string `json:"Url,omitempty"` } diff --git a/twilio/rest/flex/v1/model_list_flex_flow_response.go b/twilio/rest/flex/v1/model_list_flex_flow_response.go index 25983f533..970124d46 100644 --- a/twilio/rest/flex/v1/model_list_flex_flow_response.go +++ b/twilio/rest/flex/v1/model_list_flex_flow_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Flex - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Flex + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListFlexFlowResponse struct for ListFlexFlowResponse type ListFlexFlowResponse struct { - FlexFlows []FlexV1FlexFlow `json:"FlexFlows,omitempty"` - Meta ListChannelResponseMeta `json:"Meta,omitempty"` + FlexFlows []FlexV1FlexFlow `json:"FlexFlows,omitempty"` + Meta ListChannelResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/flex/v1/model_list_web_channel_response.go b/twilio/rest/flex/v1/model_list_web_channel_response.go index 6856be1e3..f97b6d25c 100644 --- a/twilio/rest/flex/v1/model_list_web_channel_response.go +++ b/twilio/rest/flex/v1/model_list_web_channel_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Flex - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Flex + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListWebChannelResponse struct for ListWebChannelResponse type ListWebChannelResponse struct { - FlexChatChannels []FlexV1WebChannel `json:"FlexChatChannels,omitempty"` - Meta ListChannelResponseMeta `json:"Meta,omitempty"` + FlexChatChannels []FlexV1WebChannel `json:"FlexChatChannels,omitempty"` + Meta ListChannelResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/insights/v1/api_default.go b/twilio/rest/insights/v1/api_default.go index f5f7effa9..768a79177 100644 --- a/twilio/rest/insights/v1/api_default.go +++ b/twilio/rest/insights/v1/api_default.go @@ -1,11 +1,11 @@ /* - * Twilio - Insights - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Insights + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,11 +14,11 @@ package openapi import ( "encoding/json" "fmt" - twilio "github.com/twilio/twilio-go/client" "net/url" - "strings" - "reflect" - "time" + "strings" + "time" + + twilio "github.com/twilio/twilio-go/client" ) type DefaultApiService struct { @@ -27,41 +27,39 @@ type DefaultApiService struct { } func NewDefaultApiService(client *twilio.Client) *DefaultApiService { - return &DefaultApiService { - client: client, + return &DefaultApiService{ + client: client, baseURL: "https://insights.twilio.com", } } - /* * FetchCall Method for FetchCall * @param Sid * @return InsightsV1Call -*/ -func (c *DefaultApiService) FetchCall(Sid string, ) (*InsightsV1Call, error) { - path := "/v1/Voice/{Sid}" + */ +func (c *DefaultApiService) FetchCall(Sid string) (*InsightsV1Call, error) { + path := "/v1/Voice/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &InsightsV1Call{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &InsightsV1Call{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // FetchSummaryParams Optional parameters for the method 'FetchSummary' type FetchSummaryParams struct { ProcessingState *string `json:"ProcessingState,omitempty"` @@ -71,34 +69,33 @@ type FetchSummaryParams struct { * FetchSummary Method for FetchSummary * @param CallSid * @param optional nil or *FetchSummaryParams - Optional Parameters: -* @param "ProcessingState" (string) - +* @param "ProcessingState" (string) - * @return InsightsV1CallSummary -*/ + */ func (c *DefaultApiService) FetchSummary(CallSid string, params *FetchSummaryParams) (*InsightsV1CallSummary, error) { - path := "/v1/Voice/{CallSid}/Summary" + path := "/v1/Voice/{CallSid}/Summary" path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.ProcessingState != nil { - data.Set("ProcessingState", *params.ProcessingState) -} + data := url.Values{} + headers := 0 + if params != nil && params.ProcessingState != nil { + data.Set("ProcessingState", *params.ProcessingState) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &InsightsV1CallSummary{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &InsightsV1CallSummary{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -106,151 +103,148 @@ func (c *DefaultApiService) FetchSummary(CallSid string, params *FetchSummaryPar * @param RoomSid * @param ParticipantSid * @return InsightsV1VideoRoomSummaryVideoParticipantSummary -*/ -func (c *DefaultApiService) FetchVideoParticipantSummary(RoomSid string, ParticipantSid string, ) (*InsightsV1VideoRoomSummaryVideoParticipantSummary, error) { - path := "/v1/Video/Rooms/{RoomSid}/Participants/{ParticipantSid}" + */ +func (c *DefaultApiService) FetchVideoParticipantSummary(RoomSid string, ParticipantSid string) (*InsightsV1VideoRoomSummaryVideoParticipantSummary, error) { + path := "/v1/Video/Rooms/{RoomSid}/Participants/{ParticipantSid}" path = strings.Replace(path, "{"+"RoomSid"+"}", RoomSid, -1) path = strings.Replace(path, "{"+"ParticipantSid"+"}", ParticipantSid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &InsightsV1VideoRoomSummaryVideoParticipantSummary{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &InsightsV1VideoRoomSummaryVideoParticipantSummary{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * FetchVideoRoomSummary Method for FetchVideoRoomSummary * @param RoomSid * @return InsightsV1VideoRoomSummary -*/ -func (c *DefaultApiService) FetchVideoRoomSummary(RoomSid string, ) (*InsightsV1VideoRoomSummary, error) { - path := "/v1/Video/Rooms/{RoomSid}" + */ +func (c *DefaultApiService) FetchVideoRoomSummary(RoomSid string) (*InsightsV1VideoRoomSummary, error) { + path := "/v1/Video/Rooms/{RoomSid}" path = strings.Replace(path, "{"+"RoomSid"+"}", RoomSid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &InsightsV1VideoRoomSummary{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &InsightsV1VideoRoomSummary{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListEventParams Optional parameters for the method 'ListEvent' type ListEventParams struct { - Edge *string `json:"Edge,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + Edge *string `json:"Edge,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* * ListEvent Method for ListEvent * @param CallSid * @param optional nil or *ListEventParams - Optional Parameters: -* @param "Edge" (string) - +* @param "Edge" (string) - * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListEventResponse -*/ + */ func (c *DefaultApiService) ListEvent(CallSid string, params *ListEventParams) (*ListEventResponse, error) { - path := "/v1/Voice/{CallSid}/Events" + path := "/v1/Voice/{CallSid}/Events" path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Edge != nil { - data.Set("Edge", *params.Edge) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.Edge != nil { + data.Set("Edge", *params.Edge) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListEventResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListEventResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListMetricParams Optional parameters for the method 'ListMetric' type ListMetricParams struct { - Edge *string `json:"Edge,omitempty"` + Edge *string `json:"Edge,omitempty"` Direction *string `json:"Direction,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* * ListMetric Method for ListMetric * @param CallSid * @param optional nil or *ListMetricParams - Optional Parameters: -* @param "Edge" (string) - -* @param "Direction" (string) - +* @param "Edge" (string) - +* @param "Direction" (string) - * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListMetricResponse -*/ + */ func (c *DefaultApiService) ListMetric(CallSid string, params *ListMetricParams) (*ListMetricResponse, error) { - path := "/v1/Voice/{CallSid}/Metrics" + path := "/v1/Voice/{CallSid}/Metrics" path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Edge != nil { - data.Set("Edge", *params.Edge) -} - if params != nil && params.Direction != nil { - data.Set("Direction", *params.Direction) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.Edge != nil { + data.Set("Edge", *params.Edge) + } + if params != nil && params.Direction != nil { + data.Set("Direction", *params.Direction) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListMetricResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListMetricResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListVideoParticipantSummaryParams Optional parameters for the method 'ListVideoParticipantSummary' type ListVideoParticipantSummaryParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -262,91 +256,90 @@ type ListVideoParticipantSummaryParams struct { * @param optional nil or *ListVideoParticipantSummaryParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListVideoParticipantSummaryResponse -*/ + */ func (c *DefaultApiService) ListVideoParticipantSummary(RoomSid string, params *ListVideoParticipantSummaryParams) (*ListVideoParticipantSummaryResponse, error) { - path := "/v1/Video/Rooms/{RoomSid}/Participants" + path := "/v1/Video/Rooms/{RoomSid}/Participants" path = strings.Replace(path, "{"+"RoomSid"+"}", RoomSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListVideoParticipantSummaryResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListVideoParticipantSummaryResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListVideoRoomSummaryParams Optional parameters for the method 'ListVideoRoomSummary' type ListVideoRoomSummaryParams struct { - RoomType *[]string `json:"RoomType,omitempty"` - Codec *[]string `json:"Codec,omitempty"` - RoomName *string `json:"RoomName,omitempty"` - CreatedAfter *time.Time `json:"CreatedAfter,omitempty"` + RoomType *[]string `json:"RoomType,omitempty"` + Codec *[]string `json:"Codec,omitempty"` + RoomName *string `json:"RoomName,omitempty"` + CreatedAfter *time.Time `json:"CreatedAfter,omitempty"` CreatedBefore *time.Time `json:"CreatedBefore,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* * ListVideoRoomSummary Method for ListVideoRoomSummary * @param optional nil or *ListVideoRoomSummaryParams - Optional Parameters: -* @param "RoomType" ([]string) - -* @param "Codec" ([]string) - -* @param "RoomName" (string) - -* @param "CreatedAfter" (time.Time) - -* @param "CreatedBefore" (time.Time) - +* @param "RoomType" ([]string) - +* @param "Codec" ([]string) - +* @param "RoomName" (string) - +* @param "CreatedAfter" (time.Time) - +* @param "CreatedBefore" (time.Time) - * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListVideoRoomSummaryResponse -*/ + */ func (c *DefaultApiService) ListVideoRoomSummary(params *ListVideoRoomSummaryParams) (*ListVideoRoomSummaryResponse, error) { - path := "/v1/Video/Rooms" - - data := url.Values{} - headers := 0 + path := "/v1/Video/Rooms" - if params != nil && params.RoomType != nil { - data.Set("RoomType", strings.Join(*params.RoomType, ",")) -} - if params != nil && params.Codec != nil { - data.Set("Codec", strings.Join(*params.Codec, ",")) -} - if params != nil && params.RoomName != nil { - data.Set("RoomName", *params.RoomName) -} - if params != nil && params.CreatedAfter != nil { - data.Set("CreatedAfter", fmt.Sprint(*params.CreatedAfter)) -} - if params != nil && params.CreatedBefore != nil { - data.Set("CreatedBefore", fmt.Sprint(*params.CreatedBefore)) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.RoomType != nil { + data.Set("RoomType", strings.Join(*params.RoomType, ",")) + } + if params != nil && params.Codec != nil { + data.Set("Codec", strings.Join(*params.Codec, ",")) + } + if params != nil && params.RoomName != nil { + data.Set("RoomName", *params.RoomName) + } + if params != nil && params.CreatedAfter != nil { + data.Set("CreatedAfter", fmt.Sprint(*params.CreatedAfter)) + } + if params != nil && params.CreatedBefore != nil { + data.Set("CreatedBefore", fmt.Sprint(*params.CreatedBefore)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListVideoRoomSummaryResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListVideoRoomSummaryResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } diff --git a/twilio/rest/insights/v1/model_insights_v1_call.go b/twilio/rest/insights/v1/model_insights_v1_call.go index 94a34507b..c079bd63d 100644 --- a/twilio/rest/insights/v1/model_insights_v1_call.go +++ b/twilio/rest/insights/v1/model_insights_v1_call.go @@ -1,18 +1,19 @@ /* - * Twilio - Insights - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Insights + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // InsightsV1Call struct for InsightsV1Call type InsightsV1Call struct { Links *map[string]interface{} `json:"Links,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` + Sid *string `json:"Sid,omitempty"` + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/insights/v1/model_insights_v1_call_event.go b/twilio/rest/insights/v1/model_insights_v1_call_event.go index 42c89af4b..5b914a16e 100644 --- a/twilio/rest/insights/v1/model_insights_v1_call_event.go +++ b/twilio/rest/insights/v1/model_insights_v1_call_event.go @@ -1,26 +1,27 @@ /* - * Twilio - Insights - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Insights + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // InsightsV1CallEvent struct for InsightsV1CallEvent type InsightsV1CallEvent struct { - AccountSid *string `json:"AccountSid,omitempty"` - CallSid *string `json:"CallSid,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` + CallSid *string `json:"CallSid,omitempty"` CarrierEdge *map[string]interface{} `json:"CarrierEdge,omitempty"` - ClientEdge *map[string]interface{} `json:"ClientEdge,omitempty"` - Edge *string `json:"Edge,omitempty"` - Group *string `json:"Group,omitempty"` - Level *string `json:"Level,omitempty"` - Name *string `json:"Name,omitempty"` - SdkEdge *map[string]interface{} `json:"SdkEdge,omitempty"` - SipEdge *map[string]interface{} `json:"SipEdge,omitempty"` - Timestamp *string `json:"Timestamp,omitempty"` + ClientEdge *map[string]interface{} `json:"ClientEdge,omitempty"` + Edge *string `json:"Edge,omitempty"` + Group *string `json:"Group,omitempty"` + Level *string `json:"Level,omitempty"` + Name *string `json:"Name,omitempty"` + SdkEdge *map[string]interface{} `json:"SdkEdge,omitempty"` + SipEdge *map[string]interface{} `json:"SipEdge,omitempty"` + Timestamp *string `json:"Timestamp,omitempty"` } diff --git a/twilio/rest/insights/v1/model_insights_v1_call_metric.go b/twilio/rest/insights/v1/model_insights_v1_call_metric.go index d2a94106c..c6e293d40 100644 --- a/twilio/rest/insights/v1/model_insights_v1_call_metric.go +++ b/twilio/rest/insights/v1/model_insights_v1_call_metric.go @@ -1,24 +1,25 @@ /* - * Twilio - Insights - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Insights + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // InsightsV1CallMetric struct for InsightsV1CallMetric type InsightsV1CallMetric struct { - AccountSid *string `json:"AccountSid,omitempty"` - CallSid *string `json:"CallSid,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` + CallSid *string `json:"CallSid,omitempty"` CarrierEdge *map[string]interface{} `json:"CarrierEdge,omitempty"` - ClientEdge *map[string]interface{} `json:"ClientEdge,omitempty"` - Direction *string `json:"Direction,omitempty"` - Edge *string `json:"Edge,omitempty"` - SdkEdge *map[string]interface{} `json:"SdkEdge,omitempty"` - SipEdge *map[string]interface{} `json:"SipEdge,omitempty"` - Timestamp *string `json:"Timestamp,omitempty"` + ClientEdge *map[string]interface{} `json:"ClientEdge,omitempty"` + Direction *string `json:"Direction,omitempty"` + Edge *string `json:"Edge,omitempty"` + SdkEdge *map[string]interface{} `json:"SdkEdge,omitempty"` + SipEdge *map[string]interface{} `json:"SipEdge,omitempty"` + Timestamp *string `json:"Timestamp,omitempty"` } diff --git a/twilio/rest/insights/v1/model_insights_v1_call_summary.go b/twilio/rest/insights/v1/model_insights_v1_call_summary.go index d720fdd8b..faf5c3616 100644 --- a/twilio/rest/insights/v1/model_insights_v1_call_summary.go +++ b/twilio/rest/insights/v1/model_insights_v1_call_summary.go @@ -1,39 +1,41 @@ /* - * Twilio - Insights - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Insights + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // InsightsV1CallSummary struct for InsightsV1CallSummary type InsightsV1CallSummary struct { - AccountSid *string `json:"AccountSid,omitempty"` - Attributes *map[string]interface{} `json:"Attributes,omitempty"` - CallSid *string `json:"CallSid,omitempty"` - CallState *string `json:"CallState,omitempty"` - CallType *string `json:"CallType,omitempty"` - CarrierEdge *map[string]interface{} `json:"CarrierEdge,omitempty"` - ClientEdge *map[string]interface{} `json:"ClientEdge,omitempty"` - ConnectDuration *int32 `json:"ConnectDuration,omitempty"` - CreatedTime *time.Time `json:"CreatedTime,omitempty"` - Duration *int32 `json:"Duration,omitempty"` - EndTime *time.Time `json:"EndTime,omitempty"` - From *map[string]interface{} `json:"From,omitempty"` - ProcessingState *string `json:"ProcessingState,omitempty"` - Properties *map[string]interface{} `json:"Properties,omitempty"` - SdkEdge *map[string]interface{} `json:"SdkEdge,omitempty"` - SipEdge *map[string]interface{} `json:"SipEdge,omitempty"` - StartTime *time.Time `json:"StartTime,omitempty"` - Tags *[]string `json:"Tags,omitempty"` - To *map[string]interface{} `json:"To,omitempty"` - Trust *map[string]interface{} `json:"Trust,omitempty"` - Url *string `json:"Url,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` + Attributes *map[string]interface{} `json:"Attributes,omitempty"` + CallSid *string `json:"CallSid,omitempty"` + CallState *string `json:"CallState,omitempty"` + CallType *string `json:"CallType,omitempty"` + CarrierEdge *map[string]interface{} `json:"CarrierEdge,omitempty"` + ClientEdge *map[string]interface{} `json:"ClientEdge,omitempty"` + ConnectDuration *int32 `json:"ConnectDuration,omitempty"` + CreatedTime *time.Time `json:"CreatedTime,omitempty"` + Duration *int32 `json:"Duration,omitempty"` + EndTime *time.Time `json:"EndTime,omitempty"` + From *map[string]interface{} `json:"From,omitempty"` + ProcessingState *string `json:"ProcessingState,omitempty"` + Properties *map[string]interface{} `json:"Properties,omitempty"` + SdkEdge *map[string]interface{} `json:"SdkEdge,omitempty"` + SipEdge *map[string]interface{} `json:"SipEdge,omitempty"` + StartTime *time.Time `json:"StartTime,omitempty"` + Tags *[]string `json:"Tags,omitempty"` + To *map[string]interface{} `json:"To,omitempty"` + Trust *map[string]interface{} `json:"Trust,omitempty"` + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/insights/v1/model_insights_v1_video_room_summary.go b/twilio/rest/insights/v1/model_insights_v1_video_room_summary.go index 45cfbd371..7a78fc55e 100644 --- a/twilio/rest/insights/v1/model_insights_v1_video_room_summary.go +++ b/twilio/rest/insights/v1/model_insights_v1_video_room_summary.go @@ -1,44 +1,46 @@ /* - * Twilio - Insights - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Insights + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // InsightsV1VideoRoomSummary struct for InsightsV1VideoRoomSummary type InsightsV1VideoRoomSummary struct { - AccountSid *string `json:"AccountSid,omitempty"` - Codecs *[]string `json:"Codecs,omitempty"` - ConcurrentParticipants *int32 `json:"ConcurrentParticipants,omitempty"` - CreateTime *time.Time `json:"CreateTime,omitempty"` - CreatedMethod *string `json:"CreatedMethod,omitempty"` - DurationSec *int32 `json:"DurationSec,omitempty"` - EdgeLocation *string `json:"EdgeLocation,omitempty"` - EndReason *string `json:"EndReason,omitempty"` - EndTime *time.Time `json:"EndTime,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - MaxConcurrentParticipants *int32 `json:"MaxConcurrentParticipants,omitempty"` - MaxParticipants *int32 `json:"MaxParticipants,omitempty"` - MediaRegion *string `json:"MediaRegion,omitempty"` - ProcessingState *string `json:"ProcessingState,omitempty"` - RecordingEnabled *bool `json:"RecordingEnabled,omitempty"` - RoomName *string `json:"RoomName,omitempty"` - RoomSid *string `json:"RoomSid,omitempty"` - RoomStatus *string `json:"RoomStatus,omitempty"` - RoomType *string `json:"RoomType,omitempty"` - StatusCallback *string `json:"StatusCallback,omitempty"` - StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` - TotalParticipantDurationSec *int32 `json:"TotalParticipantDurationSec,omitempty"` - TotalRecordingDurationSec *int32 `json:"TotalRecordingDurationSec,omitempty"` - UniqueParticipantIdentities *int32 `json:"UniqueParticipantIdentities,omitempty"` - UniqueParticipants *int32 `json:"UniqueParticipants,omitempty"` - Url *string `json:"Url,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` + Codecs *[]string `json:"Codecs,omitempty"` + ConcurrentParticipants *int32 `json:"ConcurrentParticipants,omitempty"` + CreateTime *time.Time `json:"CreateTime,omitempty"` + CreatedMethod *string `json:"CreatedMethod,omitempty"` + DurationSec *int32 `json:"DurationSec,omitempty"` + EdgeLocation *string `json:"EdgeLocation,omitempty"` + EndReason *string `json:"EndReason,omitempty"` + EndTime *time.Time `json:"EndTime,omitempty"` + Links *map[string]interface{} `json:"Links,omitempty"` + MaxConcurrentParticipants *int32 `json:"MaxConcurrentParticipants,omitempty"` + MaxParticipants *int32 `json:"MaxParticipants,omitempty"` + MediaRegion *string `json:"MediaRegion,omitempty"` + ProcessingState *string `json:"ProcessingState,omitempty"` + RecordingEnabled *bool `json:"RecordingEnabled,omitempty"` + RoomName *string `json:"RoomName,omitempty"` + RoomSid *string `json:"RoomSid,omitempty"` + RoomStatus *string `json:"RoomStatus,omitempty"` + RoomType *string `json:"RoomType,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` + StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` + TotalParticipantDurationSec *int32 `json:"TotalParticipantDurationSec,omitempty"` + TotalRecordingDurationSec *int32 `json:"TotalRecordingDurationSec,omitempty"` + UniqueParticipantIdentities *int32 `json:"UniqueParticipantIdentities,omitempty"` + UniqueParticipants *int32 `json:"UniqueParticipants,omitempty"` + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/insights/v1/model_insights_v1_video_room_summary_video_participant_summary.go b/twilio/rest/insights/v1/model_insights_v1_video_room_summary_video_participant_summary.go index ad8829aa4..3da85601d 100644 --- a/twilio/rest/insights/v1/model_insights_v1_video_room_summary_video_participant_summary.go +++ b/twilio/rest/insights/v1/model_insights_v1_video_room_summary_video_participant_summary.go @@ -1,35 +1,37 @@ /* - * Twilio - Insights - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Insights + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // InsightsV1VideoRoomSummaryVideoParticipantSummary struct for InsightsV1VideoRoomSummaryVideoParticipantSummary type InsightsV1VideoRoomSummaryVideoParticipantSummary struct { - AccountSid *string `json:"AccountSid,omitempty"` - Codecs *[]string `json:"Codecs,omitempty"` - DurationSec *int32 `json:"DurationSec,omitempty"` - EdgeLocation *string `json:"EdgeLocation,omitempty"` - EndReason *string `json:"EndReason,omitempty"` - ErrorCode *int32 `json:"ErrorCode,omitempty"` - ErrorCodeUrl *string `json:"ErrorCodeUrl,omitempty"` - JoinTime *time.Time `json:"JoinTime,omitempty"` - LeaveTime *time.Time `json:"LeaveTime,omitempty"` - MediaRegion *string `json:"MediaRegion,omitempty"` - ParticipantIdentity *string `json:"ParticipantIdentity,omitempty"` - ParticipantSid *string `json:"ParticipantSid,omitempty"` - Properties *map[string]interface{} `json:"Properties,omitempty"` - PublisherInfo *map[string]interface{} `json:"PublisherInfo,omitempty"` - RoomSid *string `json:"RoomSid,omitempty"` - Status *string `json:"Status,omitempty"` - Url *string `json:"Url,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` + Codecs *[]string `json:"Codecs,omitempty"` + DurationSec *int32 `json:"DurationSec,omitempty"` + EdgeLocation *string `json:"EdgeLocation,omitempty"` + EndReason *string `json:"EndReason,omitempty"` + ErrorCode *int32 `json:"ErrorCode,omitempty"` + ErrorCodeUrl *string `json:"ErrorCodeUrl,omitempty"` + JoinTime *time.Time `json:"JoinTime,omitempty"` + LeaveTime *time.Time `json:"LeaveTime,omitempty"` + MediaRegion *string `json:"MediaRegion,omitempty"` + ParticipantIdentity *string `json:"ParticipantIdentity,omitempty"` + ParticipantSid *string `json:"ParticipantSid,omitempty"` + Properties *map[string]interface{} `json:"Properties,omitempty"` + PublisherInfo *map[string]interface{} `json:"PublisherInfo,omitempty"` + RoomSid *string `json:"RoomSid,omitempty"` + Status *string `json:"Status,omitempty"` + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/insights/v1/model_list_event_response.go b/twilio/rest/insights/v1/model_list_event_response.go index b8a6b6fc0..a4d853557 100644 --- a/twilio/rest/insights/v1/model_list_event_response.go +++ b/twilio/rest/insights/v1/model_list_event_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Insights - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Insights + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListEventResponse struct for ListEventResponse type ListEventResponse struct { - Events []InsightsV1CallEvent `json:"Events,omitempty"` - Meta ListVideoRoomSummaryResponseMeta `json:"Meta,omitempty"` + Events []InsightsV1CallEvent `json:"Events,omitempty"` + Meta ListVideoRoomSummaryResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/insights/v1/model_list_metric_response.go b/twilio/rest/insights/v1/model_list_metric_response.go index 70079ce26..40367251b 100644 --- a/twilio/rest/insights/v1/model_list_metric_response.go +++ b/twilio/rest/insights/v1/model_list_metric_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Insights - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Insights + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListMetricResponse struct for ListMetricResponse type ListMetricResponse struct { - Meta ListVideoRoomSummaryResponseMeta `json:"Meta,omitempty"` - Metrics []InsightsV1CallMetric `json:"Metrics,omitempty"` + Meta ListVideoRoomSummaryResponseMeta `json:"Meta,omitempty"` + Metrics []InsightsV1CallMetric `json:"Metrics,omitempty"` } diff --git a/twilio/rest/insights/v1/model_list_video_participant_summary_response.go b/twilio/rest/insights/v1/model_list_video_participant_summary_response.go index fbb55f417..2c367dbd8 100644 --- a/twilio/rest/insights/v1/model_list_video_participant_summary_response.go +++ b/twilio/rest/insights/v1/model_list_video_participant_summary_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Insights - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Insights + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListVideoParticipantSummaryResponse struct for ListVideoParticipantSummaryResponse type ListVideoParticipantSummaryResponse struct { - Meta ListVideoRoomSummaryResponseMeta `json:"Meta,omitempty"` + Meta ListVideoRoomSummaryResponseMeta `json:"Meta,omitempty"` Participants []InsightsV1VideoRoomSummaryVideoParticipantSummary `json:"Participants,omitempty"` } diff --git a/twilio/rest/insights/v1/model_list_video_room_summary_response.go b/twilio/rest/insights/v1/model_list_video_room_summary_response.go index 3068d31f8..ddcfcc4f0 100644 --- a/twilio/rest/insights/v1/model_list_video_room_summary_response.go +++ b/twilio/rest/insights/v1/model_list_video_room_summary_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Insights - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Insights + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListVideoRoomSummaryResponse struct for ListVideoRoomSummaryResponse type ListVideoRoomSummaryResponse struct { - Meta ListVideoRoomSummaryResponseMeta `json:"Meta,omitempty"` - Rooms []InsightsV1VideoRoomSummary `json:"Rooms,omitempty"` + Meta ListVideoRoomSummaryResponseMeta `json:"Meta,omitempty"` + Rooms []InsightsV1VideoRoomSummary `json:"Rooms,omitempty"` } diff --git a/twilio/rest/insights/v1/model_list_video_room_summary_response_meta.go b/twilio/rest/insights/v1/model_list_video_room_summary_response_meta.go index d5ace5062..9e5c33a7b 100644 --- a/twilio/rest/insights/v1/model_list_video_room_summary_response_meta.go +++ b/twilio/rest/insights/v1/model_list_video_room_summary_response_meta.go @@ -1,22 +1,23 @@ /* - * Twilio - Insights - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Insights + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListVideoRoomSummaryResponseMeta struct for ListVideoRoomSummaryResponseMeta type ListVideoRoomSummaryResponseMeta struct { - FirstPageUrl string `json:"FirstPageUrl,omitempty"` - Key string `json:"Key,omitempty"` - NextPageUrl string `json:"NextPageUrl,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` - Url string `json:"Url,omitempty"` + Url string `json:"Url,omitempty"` } diff --git a/twilio/rest/ip_messaging/v1/api_default.go b/twilio/rest/ip_messaging/v1/api_default.go index 2c550dfc6..bc44f9380 100644 --- a/twilio/rest/ip_messaging/v1/api_default.go +++ b/twilio/rest/ip_messaging/v1/api_default.go @@ -1,11 +1,11 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,10 +14,10 @@ package openapi import ( "encoding/json" "fmt" - twilio "github.com/twilio/twilio-go/client" "net/url" - "strings" - "reflect" + "strings" + + twilio "github.com/twilio/twilio-go/client" ) type DefaultApiService struct { @@ -26,135 +26,135 @@ type DefaultApiService struct { } func NewDefaultApiService(client *twilio.Client) *DefaultApiService { - return &DefaultApiService { - client: client, + return &DefaultApiService{ + client: client, baseURL: "https://ip-messaging.twilio.com", } } // CreateChannelParams Optional parameters for the method 'CreateChannel' type CreateChannelParams struct { - Attributes *string `json:"Attributes,omitempty"` + Attributes *string `json:"Attributes,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` - Type *string `json:"Type,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + Type *string `json:"Type,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` } /* * CreateChannel Method for CreateChannel * @param ServiceSid * @param optional nil or *CreateChannelParams - Optional Parameters: -* @param "Attributes" (string) - -* @param "FriendlyName" (string) - -* @param "Type" (string) - -* @param "UniqueName" (string) - +* @param "Attributes" (string) - +* @param "FriendlyName" (string) - +* @param "Type" (string) - +* @param "UniqueName" (string) - * @return IpMessagingV1ServiceChannel -*/ + */ func (c *DefaultApiService) CreateChannel(ServiceSid string, params *CreateChannelParams) (*IpMessagingV1ServiceChannel, error) { - path := "/v1/Services/{ServiceSid}/Channels" + path := "/v1/Services/{ServiceSid}/Channels" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.Type != nil { - data.Set("Type", *params.Type) -} - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) -} + data := url.Values{} + headers := 0 + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Type != nil { + data.Set("Type", *params.Type) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &IpMessagingV1ServiceChannel{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &IpMessagingV1ServiceChannel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateCredentialParams Optional parameters for the method 'CreateCredential' type CreateCredentialParams struct { - ApiKey *string `json:"ApiKey,omitempty"` - Certificate *string `json:"Certificate,omitempty"` + ApiKey *string `json:"ApiKey,omitempty"` + Certificate *string `json:"Certificate,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` - PrivateKey *string `json:"PrivateKey,omitempty"` - Sandbox *bool `json:"Sandbox,omitempty"` - Secret *string `json:"Secret,omitempty"` - Type *string `json:"Type,omitempty"` + PrivateKey *string `json:"PrivateKey,omitempty"` + Sandbox *bool `json:"Sandbox,omitempty"` + Secret *string `json:"Secret,omitempty"` + Type *string `json:"Type,omitempty"` } /* * CreateCredential Method for CreateCredential * @param optional nil or *CreateCredentialParams - Optional Parameters: -* @param "ApiKey" (string) - -* @param "Certificate" (string) - -* @param "FriendlyName" (string) - -* @param "PrivateKey" (string) - -* @param "Sandbox" (bool) - -* @param "Secret" (string) - -* @param "Type" (string) - +* @param "ApiKey" (string) - +* @param "Certificate" (string) - +* @param "FriendlyName" (string) - +* @param "PrivateKey" (string) - +* @param "Sandbox" (bool) - +* @param "Secret" (string) - +* @param "Type" (string) - * @return IpMessagingV1Credential -*/ + */ func (c *DefaultApiService) CreateCredential(params *CreateCredentialParams) (*IpMessagingV1Credential, error) { - path := "/v1/Credentials" + path := "/v1/Credentials" - data := url.Values{} - headers := 0 - - if params != nil && params.ApiKey != nil { - data.Set("ApiKey", *params.ApiKey) -} - if params != nil && params.Certificate != nil { - data.Set("Certificate", *params.Certificate) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.PrivateKey != nil { - data.Set("PrivateKey", *params.PrivateKey) -} - if params != nil && params.Sandbox != nil { - data.Set("Sandbox", fmt.Sprint(*params.Sandbox)) -} - if params != nil && params.Secret != nil { - data.Set("Secret", *params.Secret) -} - if params != nil && params.Type != nil { - data.Set("Type", *params.Type) -} + data := url.Values{} + headers := 0 + if params != nil && params.ApiKey != nil { + data.Set("ApiKey", *params.ApiKey) + } + if params != nil && params.Certificate != nil { + data.Set("Certificate", *params.Certificate) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.PrivateKey != nil { + data.Set("PrivateKey", *params.PrivateKey) + } + if params != nil && params.Sandbox != nil { + data.Set("Sandbox", fmt.Sprint(*params.Sandbox)) + } + if params != nil && params.Secret != nil { + data.Set("Secret", *params.Secret) + } + if params != nil && params.Type != nil { + data.Set("Type", *params.Type) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &IpMessagingV1Credential{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &IpMessagingV1Credential{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateInviteParams Optional parameters for the method 'CreateInvite' type CreateInviteParams struct { Identity *string `json:"Identity,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` } /* @@ -162,44 +162,44 @@ type CreateInviteParams struct { * @param ServiceSid * @param ChannelSid * @param optional nil or *CreateInviteParams - Optional Parameters: -* @param "Identity" (string) - -* @param "RoleSid" (string) - +* @param "Identity" (string) - +* @param "RoleSid" (string) - * @return IpMessagingV1ServiceChannelInvite -*/ + */ func (c *DefaultApiService) CreateInvite(ServiceSid string, ChannelSid string, params *CreateInviteParams) (*IpMessagingV1ServiceChannelInvite, error) { - path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Invites" + path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Invites" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Identity != nil { - data.Set("Identity", *params.Identity) -} - if params != nil && params.RoleSid != nil { - data.Set("RoleSid", *params.RoleSid) -} + data := url.Values{} + headers := 0 + if params != nil && params.Identity != nil { + data.Set("Identity", *params.Identity) + } + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &IpMessagingV1ServiceChannelInvite{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &IpMessagingV1ServiceChannelInvite{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateMemberParams Optional parameters for the method 'CreateMember' type CreateMemberParams struct { Identity *string `json:"Identity,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` } /* @@ -207,45 +207,45 @@ type CreateMemberParams struct { * @param ServiceSid * @param ChannelSid * @param optional nil or *CreateMemberParams - Optional Parameters: -* @param "Identity" (string) - -* @param "RoleSid" (string) - +* @param "Identity" (string) - +* @param "RoleSid" (string) - * @return IpMessagingV1ServiceChannelMember -*/ + */ func (c *DefaultApiService) CreateMember(ServiceSid string, ChannelSid string, params *CreateMemberParams) (*IpMessagingV1ServiceChannelMember, error) { - path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members" + path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Identity != nil { - data.Set("Identity", *params.Identity) -} - if params != nil && params.RoleSid != nil { - data.Set("RoleSid", *params.RoleSid) -} + data := url.Values{} + headers := 0 + if params != nil && params.Identity != nil { + data.Set("Identity", *params.Identity) + } + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &IpMessagingV1ServiceChannelMember{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &IpMessagingV1ServiceChannelMember{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateMessageParams Optional parameters for the method 'CreateMessage' type CreateMessageParams struct { Attributes *string `json:"Attributes,omitempty"` - Body *string `json:"Body,omitempty"` - From *string `json:"From,omitempty"` + Body *string `json:"Body,omitempty"` + From *string `json:"From,omitempty"` } /* @@ -253,92 +253,92 @@ type CreateMessageParams struct { * @param ServiceSid * @param ChannelSid * @param optional nil or *CreateMessageParams - Optional Parameters: -* @param "Attributes" (string) - -* @param "Body" (string) - -* @param "From" (string) - +* @param "Attributes" (string) - +* @param "Body" (string) - +* @param "From" (string) - * @return IpMessagingV1ServiceChannelMessage -*/ + */ func (c *DefaultApiService) CreateMessage(ServiceSid string, ChannelSid string, params *CreateMessageParams) (*IpMessagingV1ServiceChannelMessage, error) { - path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages" + path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) -} - if params != nil && params.Body != nil { - data.Set("Body", *params.Body) -} - if params != nil && params.From != nil { - data.Set("From", *params.From) -} + data := url.Values{} + headers := 0 + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.Body != nil { + data.Set("Body", *params.Body) + } + if params != nil && params.From != nil { + data.Set("From", *params.From) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &IpMessagingV1ServiceChannelMessage{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &IpMessagingV1ServiceChannelMessage{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateRoleParams Optional parameters for the method 'CreateRole' type CreateRoleParams struct { - FriendlyName *string `json:"FriendlyName,omitempty"` - Permission *[]string `json:"Permission,omitempty"` - Type *string `json:"Type,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Permission *[]string `json:"Permission,omitempty"` + Type *string `json:"Type,omitempty"` } /* * CreateRole Method for CreateRole * @param ServiceSid * @param optional nil or *CreateRoleParams - Optional Parameters: -* @param "FriendlyName" (string) - -* @param "Permission" ([]string) - -* @param "Type" (string) - +* @param "FriendlyName" (string) - +* @param "Permission" ([]string) - +* @param "Type" (string) - * @return IpMessagingV1ServiceRole -*/ + */ func (c *DefaultApiService) CreateRole(ServiceSid string, params *CreateRoleParams) (*IpMessagingV1ServiceRole, error) { - path := "/v1/Services/{ServiceSid}/Roles" + path := "/v1/Services/{ServiceSid}/Roles" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.Permission != nil { - data.Set("Permission", strings.Join(*params.Permission, ",")) -} - if params != nil && params.Type != nil { - data.Set("Type", *params.Type) -} + data := url.Values{} + headers := 0 + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Permission != nil { + data.Set("Permission", strings.Join(*params.Permission, ",")) + } + if params != nil && params.Type != nil { + data.Set("Type", *params.Type) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &IpMessagingV1ServiceRole{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &IpMessagingV1ServiceRole{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateServiceParams Optional parameters for the method 'CreateService' type CreateServiceParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` @@ -347,134 +347,129 @@ type CreateServiceParams struct { /* * CreateService Method for CreateService * @param optional nil or *CreateServiceParams - Optional Parameters: -* @param "FriendlyName" (string) - +* @param "FriendlyName" (string) - * @return IpMessagingV1Service -*/ + */ func (c *DefaultApiService) CreateService(params *CreateServiceParams) (*IpMessagingV1Service, error) { - path := "/v1/Services" - - data := url.Values{} - headers := 0 + path := "/v1/Services" - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} + data := url.Values{} + headers := 0 + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &IpMessagingV1Service{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &IpMessagingV1Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateUserParams Optional parameters for the method 'CreateUser' type CreateUserParams struct { - Attributes *string `json:"Attributes,omitempty"` + Attributes *string `json:"Attributes,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` - Identity *string `json:"Identity,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` + Identity *string `json:"Identity,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` } /* * CreateUser Method for CreateUser * @param ServiceSid * @param optional nil or *CreateUserParams - Optional Parameters: -* @param "Attributes" (string) - -* @param "FriendlyName" (string) - -* @param "Identity" (string) - -* @param "RoleSid" (string) - +* @param "Attributes" (string) - +* @param "FriendlyName" (string) - +* @param "Identity" (string) - +* @param "RoleSid" (string) - * @return IpMessagingV1ServiceUser -*/ + */ func (c *DefaultApiService) CreateUser(ServiceSid string, params *CreateUserParams) (*IpMessagingV1ServiceUser, error) { - path := "/v1/Services/{ServiceSid}/Users" + path := "/v1/Services/{ServiceSid}/Users" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.Identity != nil { - data.Set("Identity", *params.Identity) -} - if params != nil && params.RoleSid != nil { - data.Set("RoleSid", *params.RoleSid) -} + data := url.Values{} + headers := 0 + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Identity != nil { + data.Set("Identity", *params.Identity) + } + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &IpMessagingV1ServiceUser{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &IpMessagingV1ServiceUser{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * DeleteChannel Method for DeleteChannel * @param ServiceSid * @param Sid -*/ -func (c *DefaultApiService) DeleteChannel(ServiceSid string, Sid string, ) (error) { - path := "/v1/Services/{ServiceSid}/Channels/{Sid}" + */ +func (c *DefaultApiService) DeleteChannel(ServiceSid string, Sid string) error { + path := "/v1/Services/{ServiceSid}/Channels/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + defer resp.Body.Close() - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() - - return nil + return nil } /* * DeleteCredential Method for DeleteCredential * @param Sid -*/ -func (c *DefaultApiService) DeleteCredential(Sid string, ) (error) { - path := "/v1/Credentials/{Sid}" + */ +func (c *DefaultApiService) DeleteCredential(Sid string) error { + path := "/v1/Credentials/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + defer resp.Body.Close() - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() - - return nil + return nil } /* @@ -482,26 +477,24 @@ func (c *DefaultApiService) DeleteCredential(Sid string, ) (error) { * @param ServiceSid * @param ChannelSid * @param Sid -*/ -func (c *DefaultApiService) DeleteInvite(ServiceSid string, ChannelSid string, Sid string, ) (error) { - path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Invites/{Sid}" + */ +func (c *DefaultApiService) DeleteInvite(ServiceSid string, ChannelSid string, Sid string) error { + path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Invites/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + defer resp.Body.Close() - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() - - return nil + return nil } /* @@ -509,26 +502,24 @@ func (c *DefaultApiService) DeleteInvite(ServiceSid string, ChannelSid string, S * @param ServiceSid * @param ChannelSid * @param Sid -*/ -func (c *DefaultApiService) DeleteMember(ServiceSid string, ChannelSid string, Sid string, ) (error) { - path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}" + */ +func (c *DefaultApiService) DeleteMember(ServiceSid string, ChannelSid string, Sid string) error { + path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + defer resp.Body.Close() - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() - - return nil + return nil } /* @@ -536,99 +527,91 @@ func (c *DefaultApiService) DeleteMember(ServiceSid string, ChannelSid string, S * @param ServiceSid * @param ChannelSid * @param Sid -*/ -func (c *DefaultApiService) DeleteMessage(ServiceSid string, ChannelSid string, Sid string, ) (error) { - path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}" + */ +func (c *DefaultApiService) DeleteMessage(ServiceSid string, ChannelSid string, Sid string) error { + path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + defer resp.Body.Close() - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() - - return nil + return nil } /* * DeleteRole Method for DeleteRole * @param ServiceSid * @param Sid -*/ -func (c *DefaultApiService) DeleteRole(ServiceSid string, Sid string, ) (error) { - path := "/v1/Services/{ServiceSid}/Roles/{Sid}" + */ +func (c *DefaultApiService) DeleteRole(ServiceSid string, Sid string) error { + path := "/v1/Services/{ServiceSid}/Roles/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + defer resp.Body.Close() - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() - - return nil + return nil } /* * DeleteService Method for DeleteService * @param Sid -*/ -func (c *DefaultApiService) DeleteService(Sid string, ) (error) { - path := "/v1/Services/{Sid}" + */ +func (c *DefaultApiService) DeleteService(Sid string) error { + path := "/v1/Services/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + defer resp.Body.Close() - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() - - return nil + return nil } /* * DeleteUser Method for DeleteUser * @param ServiceSid * @param Sid -*/ -func (c *DefaultApiService) DeleteUser(ServiceSid string, Sid string, ) (error) { - path := "/v1/Services/{ServiceSid}/Users/{Sid}" + */ +func (c *DefaultApiService) DeleteUser(ServiceSid string, Sid string) error { + path := "/v1/Services/{ServiceSid}/Users/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + defer resp.Body.Close() - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() - - return nil + return nil } /* @@ -636,59 +619,55 @@ func (c *DefaultApiService) DeleteUser(ServiceSid string, Sid string, ) (error) * @param ServiceSid * @param Sid * @return IpMessagingV1ServiceChannel -*/ -func (c *DefaultApiService) FetchChannel(ServiceSid string, Sid string, ) (*IpMessagingV1ServiceChannel, error) { - path := "/v1/Services/{ServiceSid}/Channels/{Sid}" + */ +func (c *DefaultApiService) FetchChannel(ServiceSid string, Sid string) (*IpMessagingV1ServiceChannel, error) { + path := "/v1/Services/{ServiceSid}/Channels/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &IpMessagingV1ServiceChannel{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &IpMessagingV1ServiceChannel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * FetchCredential Method for FetchCredential * @param Sid * @return IpMessagingV1Credential -*/ -func (c *DefaultApiService) FetchCredential(Sid string, ) (*IpMessagingV1Credential, error) { - path := "/v1/Credentials/{Sid}" + */ +func (c *DefaultApiService) FetchCredential(Sid string) (*IpMessagingV1Credential, error) { + path := "/v1/Credentials/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &IpMessagingV1Credential{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &IpMessagingV1Credential{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -697,31 +676,29 @@ func (c *DefaultApiService) FetchCredential(Sid string, ) (*IpMessagingV1Credent * @param ChannelSid * @param Sid * @return IpMessagingV1ServiceChannelInvite -*/ -func (c *DefaultApiService) FetchInvite(ServiceSid string, ChannelSid string, Sid string, ) (*IpMessagingV1ServiceChannelInvite, error) { - path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Invites/{Sid}" + */ +func (c *DefaultApiService) FetchInvite(ServiceSid string, ChannelSid string, Sid string) (*IpMessagingV1ServiceChannelInvite, error) { + path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Invites/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &IpMessagingV1ServiceChannelInvite{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &IpMessagingV1ServiceChannelInvite{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -730,31 +707,29 @@ func (c *DefaultApiService) FetchInvite(ServiceSid string, ChannelSid string, Si * @param ChannelSid * @param Sid * @return IpMessagingV1ServiceChannelMember -*/ -func (c *DefaultApiService) FetchMember(ServiceSid string, ChannelSid string, Sid string, ) (*IpMessagingV1ServiceChannelMember, error) { - path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}" + */ +func (c *DefaultApiService) FetchMember(ServiceSid string, ChannelSid string, Sid string) (*IpMessagingV1ServiceChannelMember, error) { + path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &IpMessagingV1ServiceChannelMember{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &IpMessagingV1ServiceChannelMember{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -763,31 +738,29 @@ func (c *DefaultApiService) FetchMember(ServiceSid string, ChannelSid string, Si * @param ChannelSid * @param Sid * @return IpMessagingV1ServiceChannelMessage -*/ -func (c *DefaultApiService) FetchMessage(ServiceSid string, ChannelSid string, Sid string, ) (*IpMessagingV1ServiceChannelMessage, error) { - path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}" + */ +func (c *DefaultApiService) FetchMessage(ServiceSid string, ChannelSid string, Sid string) (*IpMessagingV1ServiceChannelMessage, error) { + path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &IpMessagingV1ServiceChannelMessage{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &IpMessagingV1ServiceChannelMessage{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -795,59 +768,55 @@ func (c *DefaultApiService) FetchMessage(ServiceSid string, ChannelSid string, S * @param ServiceSid * @param Sid * @return IpMessagingV1ServiceRole -*/ -func (c *DefaultApiService) FetchRole(ServiceSid string, Sid string, ) (*IpMessagingV1ServiceRole, error) { - path := "/v1/Services/{ServiceSid}/Roles/{Sid}" + */ +func (c *DefaultApiService) FetchRole(ServiceSid string, Sid string) (*IpMessagingV1ServiceRole, error) { + path := "/v1/Services/{ServiceSid}/Roles/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &IpMessagingV1ServiceRole{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &IpMessagingV1ServiceRole{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * FetchService Method for FetchService * @param Sid * @return IpMessagingV1Service -*/ -func (c *DefaultApiService) FetchService(Sid string, ) (*IpMessagingV1Service, error) { - path := "/v1/Services/{Sid}" + */ +func (c *DefaultApiService) FetchService(Sid string) (*IpMessagingV1Service, error) { + path := "/v1/Services/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &IpMessagingV1Service{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &IpMessagingV1Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -855,74 +824,73 @@ func (c *DefaultApiService) FetchService(Sid string, ) (*IpMessagingV1Service, e * @param ServiceSid * @param Sid * @return IpMessagingV1ServiceUser -*/ -func (c *DefaultApiService) FetchUser(ServiceSid string, Sid string, ) (*IpMessagingV1ServiceUser, error) { - path := "/v1/Services/{ServiceSid}/Users/{Sid}" + */ +func (c *DefaultApiService) FetchUser(ServiceSid string, Sid string) (*IpMessagingV1ServiceUser, error) { + path := "/v1/Services/{ServiceSid}/Users/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &IpMessagingV1ServiceUser{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &IpMessagingV1ServiceUser{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListChannelParams Optional parameters for the method 'ListChannel' type ListChannelParams struct { - Type *[]string `json:"Type,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + Type *[]string `json:"Type,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* * ListChannel Method for ListChannel * @param ServiceSid * @param optional nil or *ListChannelParams - Optional Parameters: -* @param "Type" ([]string) - +* @param "Type" ([]string) - * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListChannelResponse -*/ + */ func (c *DefaultApiService) ListChannel(ServiceSid string, params *ListChannelParams) (*ListChannelResponse, error) { - path := "/v1/Services/{ServiceSid}/Channels" + path := "/v1/Services/{ServiceSid}/Channels" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Type != nil { - data.Set("Type", strings.Join(*params.Type, ",")) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.Type != nil { + data.Set("Type", strings.Join(*params.Type, ",")) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListChannelResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListChannelResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListCredentialParams Optional parameters for the method 'ListCredential' type ListCredentialParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -933,36 +901,36 @@ type ListCredentialParams struct { * @param optional nil or *ListCredentialParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListCredentialResponse -*/ + */ func (c *DefaultApiService) ListCredential(params *ListCredentialParams) (*ListCredentialResponse, error) { - path := "/v1/Credentials" + path := "/v1/Credentials" - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListCredentialResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListCredentialResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListInviteParams Optional parameters for the method 'ListInvite' type ListInviteParams struct { Identity *[]string `json:"Identity,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -970,44 +938,44 @@ type ListInviteParams struct { * @param ServiceSid * @param ChannelSid * @param optional nil or *ListInviteParams - Optional Parameters: -* @param "Identity" ([]string) - +* @param "Identity" ([]string) - * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListInviteResponse -*/ + */ func (c *DefaultApiService) ListInvite(ServiceSid string, ChannelSid string, params *ListInviteParams) (*ListInviteResponse, error) { - path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Invites" + path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Invites" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Identity != nil { - data.Set("Identity", strings.Join(*params.Identity, ",")) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.Identity != nil { + data.Set("Identity", strings.Join(*params.Identity, ",")) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListInviteResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListInviteResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListMemberParams Optional parameters for the method 'ListMember' type ListMemberParams struct { Identity *[]string `json:"Identity,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -1015,44 +983,44 @@ type ListMemberParams struct { * @param ServiceSid * @param ChannelSid * @param optional nil or *ListMemberParams - Optional Parameters: -* @param "Identity" ([]string) - +* @param "Identity" ([]string) - * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListMemberResponse -*/ + */ func (c *DefaultApiService) ListMember(ServiceSid string, ChannelSid string, params *ListMemberParams) (*ListMemberResponse, error) { - path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members" + path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Identity != nil { - data.Set("Identity", strings.Join(*params.Identity, ",")) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.Identity != nil { + data.Set("Identity", strings.Join(*params.Identity, ",")) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListMemberResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListMemberResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListMessageParams Optional parameters for the method 'ListMessage' type ListMessageParams struct { - Order *string `json:"Order,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + Order *string `json:"Order,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -1060,40 +1028,40 @@ type ListMessageParams struct { * @param ServiceSid * @param ChannelSid * @param optional nil or *ListMessageParams - Optional Parameters: -* @param "Order" (string) - +* @param "Order" (string) - * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListMessageResponse -*/ + */ func (c *DefaultApiService) ListMessage(ServiceSid string, ChannelSid string, params *ListMessageParams) (*ListMessageResponse, error) { - path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages" + path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Order != nil { - data.Set("Order", *params.Order) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.Order != nil { + data.Set("Order", *params.Order) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListMessageResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListMessageResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListRoleParams Optional parameters for the method 'ListRole' type ListRoleParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1105,33 +1073,33 @@ type ListRoleParams struct { * @param optional nil or *ListRoleParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListRoleResponse -*/ + */ func (c *DefaultApiService) ListRole(ServiceSid string, params *ListRoleParams) (*ListRoleResponse, error) { - path := "/v1/Services/{ServiceSid}/Roles" + path := "/v1/Services/{ServiceSid}/Roles" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListRoleResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListRoleResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListServiceParams Optional parameters for the method 'ListService' type ListServiceParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1142,32 +1110,32 @@ type ListServiceParams struct { * @param optional nil or *ListServiceParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListServiceResponse -*/ + */ func (c *DefaultApiService) ListService(params *ListServiceParams) (*ListServiceResponse, error) { - path := "/v1/Services" + path := "/v1/Services" - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListServiceResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListServiceResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListUserParams Optional parameters for the method 'ListUser' type ListUserParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1179,33 +1147,33 @@ type ListUserParams struct { * @param optional nil or *ListUserParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListUserResponse -*/ + */ func (c *DefaultApiService) ListUser(ServiceSid string, params *ListUserParams) (*ListUserResponse, error) { - path := "/v1/Services/{ServiceSid}/Users" + path := "/v1/Services/{ServiceSid}/Users" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListUserResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListUserResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListUserChannelParams Optional parameters for the method 'ListUserChannel' type ListUserChannelParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1218,39 +1186,39 @@ type ListUserChannelParams struct { * @param optional nil or *ListUserChannelParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListUserChannelResponse -*/ + */ func (c *DefaultApiService) ListUserChannel(ServiceSid string, UserSid string, params *ListUserChannelParams) (*ListUserChannelResponse, error) { - path := "/v1/Services/{ServiceSid}/Users/{UserSid}/Channels" + path := "/v1/Services/{ServiceSid}/Users/{UserSid}/Channels" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"UserSid"+"}", UserSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListUserChannelResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListUserChannelResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateChannelParams Optional parameters for the method 'UpdateChannel' type UpdateChannelParams struct { - Attributes *string `json:"Attributes,omitempty"` + Attributes *string `json:"Attributes,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` } /* @@ -1258,111 +1226,111 @@ type UpdateChannelParams struct { * @param ServiceSid * @param Sid * @param optional nil or *UpdateChannelParams - Optional Parameters: -* @param "Attributes" (string) - -* @param "FriendlyName" (string) - -* @param "UniqueName" (string) - +* @param "Attributes" (string) - +* @param "FriendlyName" (string) - +* @param "UniqueName" (string) - * @return IpMessagingV1ServiceChannel -*/ + */ func (c *DefaultApiService) UpdateChannel(ServiceSid string, Sid string, params *UpdateChannelParams) (*IpMessagingV1ServiceChannel, error) { - path := "/v1/Services/{ServiceSid}/Channels/{Sid}" + path := "/v1/Services/{ServiceSid}/Channels/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) -} + data := url.Values{} + headers := 0 + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &IpMessagingV1ServiceChannel{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &IpMessagingV1ServiceChannel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateCredentialParams Optional parameters for the method 'UpdateCredential' type UpdateCredentialParams struct { - ApiKey *string `json:"ApiKey,omitempty"` - Certificate *string `json:"Certificate,omitempty"` + ApiKey *string `json:"ApiKey,omitempty"` + Certificate *string `json:"Certificate,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` - PrivateKey *string `json:"PrivateKey,omitempty"` - Sandbox *bool `json:"Sandbox,omitempty"` - Secret *string `json:"Secret,omitempty"` + PrivateKey *string `json:"PrivateKey,omitempty"` + Sandbox *bool `json:"Sandbox,omitempty"` + Secret *string `json:"Secret,omitempty"` } /* * UpdateCredential Method for UpdateCredential * @param Sid * @param optional nil or *UpdateCredentialParams - Optional Parameters: -* @param "ApiKey" (string) - -* @param "Certificate" (string) - -* @param "FriendlyName" (string) - -* @param "PrivateKey" (string) - -* @param "Sandbox" (bool) - -* @param "Secret" (string) - +* @param "ApiKey" (string) - +* @param "Certificate" (string) - +* @param "FriendlyName" (string) - +* @param "PrivateKey" (string) - +* @param "Sandbox" (bool) - +* @param "Secret" (string) - * @return IpMessagingV1Credential -*/ + */ func (c *DefaultApiService) UpdateCredential(Sid string, params *UpdateCredentialParams) (*IpMessagingV1Credential, error) { - path := "/v1/Credentials/{Sid}" + path := "/v1/Credentials/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.ApiKey != nil { - data.Set("ApiKey", *params.ApiKey) -} - if params != nil && params.Certificate != nil { - data.Set("Certificate", *params.Certificate) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.PrivateKey != nil { - data.Set("PrivateKey", *params.PrivateKey) -} - if params != nil && params.Sandbox != nil { - data.Set("Sandbox", fmt.Sprint(*params.Sandbox)) -} - if params != nil && params.Secret != nil { - data.Set("Secret", *params.Secret) -} + data := url.Values{} + headers := 0 + if params != nil && params.ApiKey != nil { + data.Set("ApiKey", *params.ApiKey) + } + if params != nil && params.Certificate != nil { + data.Set("Certificate", *params.Certificate) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.PrivateKey != nil { + data.Set("PrivateKey", *params.PrivateKey) + } + if params != nil && params.Sandbox != nil { + data.Set("Sandbox", fmt.Sprint(*params.Sandbox)) + } + if params != nil && params.Secret != nil { + data.Set("Secret", *params.Secret) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &IpMessagingV1Credential{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &IpMessagingV1Credential{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateMemberParams Optional parameters for the method 'UpdateMember' type UpdateMemberParams struct { - LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` + LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` } /* @@ -1371,45 +1339,45 @@ type UpdateMemberParams struct { * @param ChannelSid * @param Sid * @param optional nil or *UpdateMemberParams - Optional Parameters: -* @param "LastConsumedMessageIndex" (*int32) - -* @param "RoleSid" (string) - +* @param "LastConsumedMessageIndex" (*int32) - +* @param "RoleSid" (string) - * @return IpMessagingV1ServiceChannelMember -*/ + */ func (c *DefaultApiService) UpdateMember(ServiceSid string, ChannelSid string, Sid string, params *UpdateMemberParams) (*IpMessagingV1ServiceChannelMember, error) { - path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}" + path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.LastConsumedMessageIndex != nil { - data.Set("LastConsumedMessageIndex", fmt.Sprint(*params.LastConsumedMessageIndex)) -} - if params != nil && params.RoleSid != nil { - data.Set("RoleSid", *params.RoleSid) -} + data := url.Values{} + headers := 0 + if params != nil && params.LastConsumedMessageIndex != nil { + data.Set("LastConsumedMessageIndex", fmt.Sprint(*params.LastConsumedMessageIndex)) + } + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &IpMessagingV1ServiceChannelMember{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &IpMessagingV1ServiceChannelMember{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateMessageParams Optional parameters for the method 'UpdateMessage' type UpdateMessageParams struct { Attributes *string `json:"Attributes,omitempty"` - Body *string `json:"Body,omitempty"` + Body *string `json:"Body,omitempty"` } /* @@ -1418,41 +1386,41 @@ type UpdateMessageParams struct { * @param ChannelSid * @param Sid * @param optional nil or *UpdateMessageParams - Optional Parameters: -* @param "Attributes" (string) - -* @param "Body" (string) - +* @param "Attributes" (string) - +* @param "Body" (string) - * @return IpMessagingV1ServiceChannelMessage -*/ + */ func (c *DefaultApiService) UpdateMessage(ServiceSid string, ChannelSid string, Sid string, params *UpdateMessageParams) (*IpMessagingV1ServiceChannelMessage, error) { - path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}" + path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) -} - if params != nil && params.Body != nil { - data.Set("Body", *params.Body) -} + data := url.Values{} + headers := 0 + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.Body != nil { + data.Set("Body", *params.Body) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &IpMessagingV1ServiceChannelMessage{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &IpMessagingV1ServiceChannelMessage{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateRoleParams Optional parameters for the method 'UpdateRole' type UpdateRoleParams struct { Permission *[]string `json:"Permission,omitempty"` @@ -1463,344 +1431,344 @@ type UpdateRoleParams struct { * @param ServiceSid * @param Sid * @param optional nil or *UpdateRoleParams - Optional Parameters: -* @param "Permission" ([]string) - +* @param "Permission" ([]string) - * @return IpMessagingV1ServiceRole -*/ + */ func (c *DefaultApiService) UpdateRole(ServiceSid string, Sid string, params *UpdateRoleParams) (*IpMessagingV1ServiceRole, error) { - path := "/v1/Services/{ServiceSid}/Roles/{Sid}" + path := "/v1/Services/{ServiceSid}/Roles/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Permission != nil { - data.Set("Permission", strings.Join(*params.Permission, ",")) -} + data := url.Values{} + headers := 0 + if params != nil && params.Permission != nil { + data.Set("Permission", strings.Join(*params.Permission, ",")) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &IpMessagingV1ServiceRole{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &IpMessagingV1ServiceRole{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateServiceParams Optional parameters for the method 'UpdateService' type UpdateServiceParams struct { - ConsumptionReportInterval *int32 `json:"ConsumptionReportInterval,omitempty"` - DefaultChannelCreatorRoleSid *string `json:"DefaultChannelCreatorRoleSid,omitempty"` - DefaultChannelRoleSid *string `json:"DefaultChannelRoleSid,omitempty"` - DefaultServiceRoleSid *string `json:"DefaultServiceRoleSid,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - LimitsChannelMembers *int32 `json:"Limits.ChannelMembers,omitempty"` - LimitsUserChannels *int32 `json:"Limits.UserChannels,omitempty"` - NotificationsAddedToChannelEnabled *bool `json:"Notifications.AddedToChannel.Enabled,omitempty"` - NotificationsAddedToChannelTemplate *string `json:"Notifications.AddedToChannel.Template,omitempty"` - NotificationsInvitedToChannelEnabled *bool `json:"Notifications.InvitedToChannel.Enabled,omitempty"` - NotificationsInvitedToChannelTemplate *string `json:"Notifications.InvitedToChannel.Template,omitempty"` - NotificationsNewMessageEnabled *bool `json:"Notifications.NewMessage.Enabled,omitempty"` - NotificationsNewMessageTemplate *string `json:"Notifications.NewMessage.Template,omitempty"` - NotificationsRemovedFromChannelEnabled *bool `json:"Notifications.RemovedFromChannel.Enabled,omitempty"` - NotificationsRemovedFromChannelTemplate *string `json:"Notifications.RemovedFromChannel.Template,omitempty"` - PostWebhookUrl *string `json:"PostWebhookUrl,omitempty"` - PreWebhookUrl *string `json:"PreWebhookUrl,omitempty"` - ReachabilityEnabled *bool `json:"ReachabilityEnabled,omitempty"` - ReadStatusEnabled *bool `json:"ReadStatusEnabled,omitempty"` - TypingIndicatorTimeout *int32 `json:"TypingIndicatorTimeout,omitempty"` - WebhookFilters *[]string `json:"WebhookFilters,omitempty"` - WebhookMethod *string `json:"WebhookMethod,omitempty"` - WebhooksOnChannelAddMethod *string `json:"Webhooks.OnChannelAdd.Method,omitempty"` - WebhooksOnChannelAddUrl *string `json:"Webhooks.OnChannelAdd.Url,omitempty"` - WebhooksOnChannelAddedMethod *string `json:"Webhooks.OnChannelAdded.Method,omitempty"` - WebhooksOnChannelAddedUrl *string `json:"Webhooks.OnChannelAdded.Url,omitempty"` - WebhooksOnChannelDestroyMethod *string `json:"Webhooks.OnChannelDestroy.Method,omitempty"` - WebhooksOnChannelDestroyUrl *string `json:"Webhooks.OnChannelDestroy.Url,omitempty"` - WebhooksOnChannelDestroyedMethod *string `json:"Webhooks.OnChannelDestroyed.Method,omitempty"` - WebhooksOnChannelDestroyedUrl *string `json:"Webhooks.OnChannelDestroyed.Url,omitempty"` - WebhooksOnChannelUpdateMethod *string `json:"Webhooks.OnChannelUpdate.Method,omitempty"` - WebhooksOnChannelUpdateUrl *string `json:"Webhooks.OnChannelUpdate.Url,omitempty"` - WebhooksOnChannelUpdatedMethod *string `json:"Webhooks.OnChannelUpdated.Method,omitempty"` - WebhooksOnChannelUpdatedUrl *string `json:"Webhooks.OnChannelUpdated.Url,omitempty"` - WebhooksOnMemberAddMethod *string `json:"Webhooks.OnMemberAdd.Method,omitempty"` - WebhooksOnMemberAddUrl *string `json:"Webhooks.OnMemberAdd.Url,omitempty"` - WebhooksOnMemberAddedMethod *string `json:"Webhooks.OnMemberAdded.Method,omitempty"` - WebhooksOnMemberAddedUrl *string `json:"Webhooks.OnMemberAdded.Url,omitempty"` - WebhooksOnMemberRemoveMethod *string `json:"Webhooks.OnMemberRemove.Method,omitempty"` - WebhooksOnMemberRemoveUrl *string `json:"Webhooks.OnMemberRemove.Url,omitempty"` - WebhooksOnMemberRemovedMethod *string `json:"Webhooks.OnMemberRemoved.Method,omitempty"` - WebhooksOnMemberRemovedUrl *string `json:"Webhooks.OnMemberRemoved.Url,omitempty"` - WebhooksOnMessageRemoveMethod *string `json:"Webhooks.OnMessageRemove.Method,omitempty"` - WebhooksOnMessageRemoveUrl *string `json:"Webhooks.OnMessageRemove.Url,omitempty"` - WebhooksOnMessageRemovedMethod *string `json:"Webhooks.OnMessageRemoved.Method,omitempty"` - WebhooksOnMessageRemovedUrl *string `json:"Webhooks.OnMessageRemoved.Url,omitempty"` - WebhooksOnMessageSendMethod *string `json:"Webhooks.OnMessageSend.Method,omitempty"` - WebhooksOnMessageSendUrl *string `json:"Webhooks.OnMessageSend.Url,omitempty"` - WebhooksOnMessageSentMethod *string `json:"Webhooks.OnMessageSent.Method,omitempty"` - WebhooksOnMessageSentUrl *string `json:"Webhooks.OnMessageSent.Url,omitempty"` - WebhooksOnMessageUpdateMethod *string `json:"Webhooks.OnMessageUpdate.Method,omitempty"` - WebhooksOnMessageUpdateUrl *string `json:"Webhooks.OnMessageUpdate.Url,omitempty"` - WebhooksOnMessageUpdatedMethod *string `json:"Webhooks.OnMessageUpdated.Method,omitempty"` - WebhooksOnMessageUpdatedUrl *string `json:"Webhooks.OnMessageUpdated.Url,omitempty"` + ConsumptionReportInterval *int32 `json:"ConsumptionReportInterval,omitempty"` + DefaultChannelCreatorRoleSid *string `json:"DefaultChannelCreatorRoleSid,omitempty"` + DefaultChannelRoleSid *string `json:"DefaultChannelRoleSid,omitempty"` + DefaultServiceRoleSid *string `json:"DefaultServiceRoleSid,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + LimitsChannelMembers *int32 `json:"Limits.ChannelMembers,omitempty"` + LimitsUserChannels *int32 `json:"Limits.UserChannels,omitempty"` + NotificationsAddedToChannelEnabled *bool `json:"Notifications.AddedToChannel.Enabled,omitempty"` + NotificationsAddedToChannelTemplate *string `json:"Notifications.AddedToChannel.Template,omitempty"` + NotificationsInvitedToChannelEnabled *bool `json:"Notifications.InvitedToChannel.Enabled,omitempty"` + NotificationsInvitedToChannelTemplate *string `json:"Notifications.InvitedToChannel.Template,omitempty"` + NotificationsNewMessageEnabled *bool `json:"Notifications.NewMessage.Enabled,omitempty"` + NotificationsNewMessageTemplate *string `json:"Notifications.NewMessage.Template,omitempty"` + NotificationsRemovedFromChannelEnabled *bool `json:"Notifications.RemovedFromChannel.Enabled,omitempty"` + NotificationsRemovedFromChannelTemplate *string `json:"Notifications.RemovedFromChannel.Template,omitempty"` + PostWebhookUrl *string `json:"PostWebhookUrl,omitempty"` + PreWebhookUrl *string `json:"PreWebhookUrl,omitempty"` + ReachabilityEnabled *bool `json:"ReachabilityEnabled,omitempty"` + ReadStatusEnabled *bool `json:"ReadStatusEnabled,omitempty"` + TypingIndicatorTimeout *int32 `json:"TypingIndicatorTimeout,omitempty"` + WebhookFilters *[]string `json:"WebhookFilters,omitempty"` + WebhookMethod *string `json:"WebhookMethod,omitempty"` + WebhooksOnChannelAddMethod *string `json:"Webhooks.OnChannelAdd.Method,omitempty"` + WebhooksOnChannelAddUrl *string `json:"Webhooks.OnChannelAdd.Url,omitempty"` + WebhooksOnChannelAddedMethod *string `json:"Webhooks.OnChannelAdded.Method,omitempty"` + WebhooksOnChannelAddedUrl *string `json:"Webhooks.OnChannelAdded.Url,omitempty"` + WebhooksOnChannelDestroyMethod *string `json:"Webhooks.OnChannelDestroy.Method,omitempty"` + WebhooksOnChannelDestroyUrl *string `json:"Webhooks.OnChannelDestroy.Url,omitempty"` + WebhooksOnChannelDestroyedMethod *string `json:"Webhooks.OnChannelDestroyed.Method,omitempty"` + WebhooksOnChannelDestroyedUrl *string `json:"Webhooks.OnChannelDestroyed.Url,omitempty"` + WebhooksOnChannelUpdateMethod *string `json:"Webhooks.OnChannelUpdate.Method,omitempty"` + WebhooksOnChannelUpdateUrl *string `json:"Webhooks.OnChannelUpdate.Url,omitempty"` + WebhooksOnChannelUpdatedMethod *string `json:"Webhooks.OnChannelUpdated.Method,omitempty"` + WebhooksOnChannelUpdatedUrl *string `json:"Webhooks.OnChannelUpdated.Url,omitempty"` + WebhooksOnMemberAddMethod *string `json:"Webhooks.OnMemberAdd.Method,omitempty"` + WebhooksOnMemberAddUrl *string `json:"Webhooks.OnMemberAdd.Url,omitempty"` + WebhooksOnMemberAddedMethod *string `json:"Webhooks.OnMemberAdded.Method,omitempty"` + WebhooksOnMemberAddedUrl *string `json:"Webhooks.OnMemberAdded.Url,omitempty"` + WebhooksOnMemberRemoveMethod *string `json:"Webhooks.OnMemberRemove.Method,omitempty"` + WebhooksOnMemberRemoveUrl *string `json:"Webhooks.OnMemberRemove.Url,omitempty"` + WebhooksOnMemberRemovedMethod *string `json:"Webhooks.OnMemberRemoved.Method,omitempty"` + WebhooksOnMemberRemovedUrl *string `json:"Webhooks.OnMemberRemoved.Url,omitempty"` + WebhooksOnMessageRemoveMethod *string `json:"Webhooks.OnMessageRemove.Method,omitempty"` + WebhooksOnMessageRemoveUrl *string `json:"Webhooks.OnMessageRemove.Url,omitempty"` + WebhooksOnMessageRemovedMethod *string `json:"Webhooks.OnMessageRemoved.Method,omitempty"` + WebhooksOnMessageRemovedUrl *string `json:"Webhooks.OnMessageRemoved.Url,omitempty"` + WebhooksOnMessageSendMethod *string `json:"Webhooks.OnMessageSend.Method,omitempty"` + WebhooksOnMessageSendUrl *string `json:"Webhooks.OnMessageSend.Url,omitempty"` + WebhooksOnMessageSentMethod *string `json:"Webhooks.OnMessageSent.Method,omitempty"` + WebhooksOnMessageSentUrl *string `json:"Webhooks.OnMessageSent.Url,omitempty"` + WebhooksOnMessageUpdateMethod *string `json:"Webhooks.OnMessageUpdate.Method,omitempty"` + WebhooksOnMessageUpdateUrl *string `json:"Webhooks.OnMessageUpdate.Url,omitempty"` + WebhooksOnMessageUpdatedMethod *string `json:"Webhooks.OnMessageUpdated.Method,omitempty"` + WebhooksOnMessageUpdatedUrl *string `json:"Webhooks.OnMessageUpdated.Url,omitempty"` } /* * UpdateService Method for UpdateService * @param Sid * @param optional nil or *UpdateServiceParams - Optional Parameters: -* @param "ConsumptionReportInterval" (int32) - -* @param "DefaultChannelCreatorRoleSid" (string) - -* @param "DefaultChannelRoleSid" (string) - -* @param "DefaultServiceRoleSid" (string) - -* @param "FriendlyName" (string) - -* @param "LimitsChannelMembers" (int32) - -* @param "LimitsUserChannels" (int32) - -* @param "NotificationsAddedToChannelEnabled" (bool) - -* @param "NotificationsAddedToChannelTemplate" (string) - -* @param "NotificationsInvitedToChannelEnabled" (bool) - -* @param "NotificationsInvitedToChannelTemplate" (string) - -* @param "NotificationsNewMessageEnabled" (bool) - -* @param "NotificationsNewMessageTemplate" (string) - -* @param "NotificationsRemovedFromChannelEnabled" (bool) - -* @param "NotificationsRemovedFromChannelTemplate" (string) - -* @param "PostWebhookUrl" (string) - -* @param "PreWebhookUrl" (string) - -* @param "ReachabilityEnabled" (bool) - -* @param "ReadStatusEnabled" (bool) - -* @param "TypingIndicatorTimeout" (int32) - -* @param "WebhookFilters" ([]string) - -* @param "WebhookMethod" (string) - -* @param "WebhooksOnChannelAddMethod" (string) - -* @param "WebhooksOnChannelAddUrl" (string) - -* @param "WebhooksOnChannelAddedMethod" (string) - -* @param "WebhooksOnChannelAddedUrl" (string) - -* @param "WebhooksOnChannelDestroyMethod" (string) - -* @param "WebhooksOnChannelDestroyUrl" (string) - -* @param "WebhooksOnChannelDestroyedMethod" (string) - -* @param "WebhooksOnChannelDestroyedUrl" (string) - -* @param "WebhooksOnChannelUpdateMethod" (string) - -* @param "WebhooksOnChannelUpdateUrl" (string) - -* @param "WebhooksOnChannelUpdatedMethod" (string) - -* @param "WebhooksOnChannelUpdatedUrl" (string) - -* @param "WebhooksOnMemberAddMethod" (string) - -* @param "WebhooksOnMemberAddUrl" (string) - -* @param "WebhooksOnMemberAddedMethod" (string) - -* @param "WebhooksOnMemberAddedUrl" (string) - -* @param "WebhooksOnMemberRemoveMethod" (string) - -* @param "WebhooksOnMemberRemoveUrl" (string) - -* @param "WebhooksOnMemberRemovedMethod" (string) - -* @param "WebhooksOnMemberRemovedUrl" (string) - -* @param "WebhooksOnMessageRemoveMethod" (string) - -* @param "WebhooksOnMessageRemoveUrl" (string) - -* @param "WebhooksOnMessageRemovedMethod" (string) - -* @param "WebhooksOnMessageRemovedUrl" (string) - -* @param "WebhooksOnMessageSendMethod" (string) - -* @param "WebhooksOnMessageSendUrl" (string) - -* @param "WebhooksOnMessageSentMethod" (string) - -* @param "WebhooksOnMessageSentUrl" (string) - -* @param "WebhooksOnMessageUpdateMethod" (string) - -* @param "WebhooksOnMessageUpdateUrl" (string) - -* @param "WebhooksOnMessageUpdatedMethod" (string) - -* @param "WebhooksOnMessageUpdatedUrl" (string) - +* @param "ConsumptionReportInterval" (int32) - +* @param "DefaultChannelCreatorRoleSid" (string) - +* @param "DefaultChannelRoleSid" (string) - +* @param "DefaultServiceRoleSid" (string) - +* @param "FriendlyName" (string) - +* @param "LimitsChannelMembers" (int32) - +* @param "LimitsUserChannels" (int32) - +* @param "NotificationsAddedToChannelEnabled" (bool) - +* @param "NotificationsAddedToChannelTemplate" (string) - +* @param "NotificationsInvitedToChannelEnabled" (bool) - +* @param "NotificationsInvitedToChannelTemplate" (string) - +* @param "NotificationsNewMessageEnabled" (bool) - +* @param "NotificationsNewMessageTemplate" (string) - +* @param "NotificationsRemovedFromChannelEnabled" (bool) - +* @param "NotificationsRemovedFromChannelTemplate" (string) - +* @param "PostWebhookUrl" (string) - +* @param "PreWebhookUrl" (string) - +* @param "ReachabilityEnabled" (bool) - +* @param "ReadStatusEnabled" (bool) - +* @param "TypingIndicatorTimeout" (int32) - +* @param "WebhookFilters" ([]string) - +* @param "WebhookMethod" (string) - +* @param "WebhooksOnChannelAddMethod" (string) - +* @param "WebhooksOnChannelAddUrl" (string) - +* @param "WebhooksOnChannelAddedMethod" (string) - +* @param "WebhooksOnChannelAddedUrl" (string) - +* @param "WebhooksOnChannelDestroyMethod" (string) - +* @param "WebhooksOnChannelDestroyUrl" (string) - +* @param "WebhooksOnChannelDestroyedMethod" (string) - +* @param "WebhooksOnChannelDestroyedUrl" (string) - +* @param "WebhooksOnChannelUpdateMethod" (string) - +* @param "WebhooksOnChannelUpdateUrl" (string) - +* @param "WebhooksOnChannelUpdatedMethod" (string) - +* @param "WebhooksOnChannelUpdatedUrl" (string) - +* @param "WebhooksOnMemberAddMethod" (string) - +* @param "WebhooksOnMemberAddUrl" (string) - +* @param "WebhooksOnMemberAddedMethod" (string) - +* @param "WebhooksOnMemberAddedUrl" (string) - +* @param "WebhooksOnMemberRemoveMethod" (string) - +* @param "WebhooksOnMemberRemoveUrl" (string) - +* @param "WebhooksOnMemberRemovedMethod" (string) - +* @param "WebhooksOnMemberRemovedUrl" (string) - +* @param "WebhooksOnMessageRemoveMethod" (string) - +* @param "WebhooksOnMessageRemoveUrl" (string) - +* @param "WebhooksOnMessageRemovedMethod" (string) - +* @param "WebhooksOnMessageRemovedUrl" (string) - +* @param "WebhooksOnMessageSendMethod" (string) - +* @param "WebhooksOnMessageSendUrl" (string) - +* @param "WebhooksOnMessageSentMethod" (string) - +* @param "WebhooksOnMessageSentUrl" (string) - +* @param "WebhooksOnMessageUpdateMethod" (string) - +* @param "WebhooksOnMessageUpdateUrl" (string) - +* @param "WebhooksOnMessageUpdatedMethod" (string) - +* @param "WebhooksOnMessageUpdatedUrl" (string) - * @return IpMessagingV1Service -*/ + */ func (c *DefaultApiService) UpdateService(Sid string, params *UpdateServiceParams) (*IpMessagingV1Service, error) { - path := "/v1/Services/{Sid}" + path := "/v1/Services/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.ConsumptionReportInterval != nil { - data.Set("ConsumptionReportInterval", fmt.Sprint(*params.ConsumptionReportInterval)) -} - if params != nil && params.DefaultChannelCreatorRoleSid != nil { - data.Set("DefaultChannelCreatorRoleSid", *params.DefaultChannelCreatorRoleSid) -} - if params != nil && params.DefaultChannelRoleSid != nil { - data.Set("DefaultChannelRoleSid", *params.DefaultChannelRoleSid) -} - if params != nil && params.DefaultServiceRoleSid != nil { - data.Set("DefaultServiceRoleSid", *params.DefaultServiceRoleSid) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.LimitsChannelMembers != nil { - data.Set("LimitsChannelMembers", fmt.Sprint(*params.LimitsChannelMembers)) -} - if params != nil && params.LimitsUserChannels != nil { - data.Set("LimitsUserChannels", fmt.Sprint(*params.LimitsUserChannels)) -} - if params != nil && params.NotificationsAddedToChannelEnabled != nil { - data.Set("NotificationsAddedToChannelEnabled", fmt.Sprint(*params.NotificationsAddedToChannelEnabled)) -} - if params != nil && params.NotificationsAddedToChannelTemplate != nil { - data.Set("NotificationsAddedToChannelTemplate", *params.NotificationsAddedToChannelTemplate) -} - if params != nil && params.NotificationsInvitedToChannelEnabled != nil { - data.Set("NotificationsInvitedToChannelEnabled", fmt.Sprint(*params.NotificationsInvitedToChannelEnabled)) -} - if params != nil && params.NotificationsInvitedToChannelTemplate != nil { - data.Set("NotificationsInvitedToChannelTemplate", *params.NotificationsInvitedToChannelTemplate) -} - if params != nil && params.NotificationsNewMessageEnabled != nil { - data.Set("NotificationsNewMessageEnabled", fmt.Sprint(*params.NotificationsNewMessageEnabled)) -} - if params != nil && params.NotificationsNewMessageTemplate != nil { - data.Set("NotificationsNewMessageTemplate", *params.NotificationsNewMessageTemplate) -} - if params != nil && params.NotificationsRemovedFromChannelEnabled != nil { - data.Set("NotificationsRemovedFromChannelEnabled", fmt.Sprint(*params.NotificationsRemovedFromChannelEnabled)) -} - if params != nil && params.NotificationsRemovedFromChannelTemplate != nil { - data.Set("NotificationsRemovedFromChannelTemplate", *params.NotificationsRemovedFromChannelTemplate) -} - if params != nil && params.PostWebhookUrl != nil { - data.Set("PostWebhookUrl", *params.PostWebhookUrl) -} - if params != nil && params.PreWebhookUrl != nil { - data.Set("PreWebhookUrl", *params.PreWebhookUrl) -} - if params != nil && params.ReachabilityEnabled != nil { - data.Set("ReachabilityEnabled", fmt.Sprint(*params.ReachabilityEnabled)) -} - if params != nil && params.ReadStatusEnabled != nil { - data.Set("ReadStatusEnabled", fmt.Sprint(*params.ReadStatusEnabled)) -} - if params != nil && params.TypingIndicatorTimeout != nil { - data.Set("TypingIndicatorTimeout", fmt.Sprint(*params.TypingIndicatorTimeout)) -} - if params != nil && params.WebhookFilters != nil { - data.Set("WebhookFilters", strings.Join(*params.WebhookFilters, ",")) -} - if params != nil && params.WebhookMethod != nil { - data.Set("WebhookMethod", *params.WebhookMethod) -} - if params != nil && params.WebhooksOnChannelAddMethod != nil { - data.Set("WebhooksOnChannelAddMethod", *params.WebhooksOnChannelAddMethod) -} - if params != nil && params.WebhooksOnChannelAddUrl != nil { - data.Set("WebhooksOnChannelAddUrl", *params.WebhooksOnChannelAddUrl) -} - if params != nil && params.WebhooksOnChannelAddedMethod != nil { - data.Set("WebhooksOnChannelAddedMethod", *params.WebhooksOnChannelAddedMethod) -} - if params != nil && params.WebhooksOnChannelAddedUrl != nil { - data.Set("WebhooksOnChannelAddedUrl", *params.WebhooksOnChannelAddedUrl) -} - if params != nil && params.WebhooksOnChannelDestroyMethod != nil { - data.Set("WebhooksOnChannelDestroyMethod", *params.WebhooksOnChannelDestroyMethod) -} - if params != nil && params.WebhooksOnChannelDestroyUrl != nil { - data.Set("WebhooksOnChannelDestroyUrl", *params.WebhooksOnChannelDestroyUrl) -} - if params != nil && params.WebhooksOnChannelDestroyedMethod != nil { - data.Set("WebhooksOnChannelDestroyedMethod", *params.WebhooksOnChannelDestroyedMethod) -} - if params != nil && params.WebhooksOnChannelDestroyedUrl != nil { - data.Set("WebhooksOnChannelDestroyedUrl", *params.WebhooksOnChannelDestroyedUrl) -} - if params != nil && params.WebhooksOnChannelUpdateMethod != nil { - data.Set("WebhooksOnChannelUpdateMethod", *params.WebhooksOnChannelUpdateMethod) -} - if params != nil && params.WebhooksOnChannelUpdateUrl != nil { - data.Set("WebhooksOnChannelUpdateUrl", *params.WebhooksOnChannelUpdateUrl) -} - if params != nil && params.WebhooksOnChannelUpdatedMethod != nil { - data.Set("WebhooksOnChannelUpdatedMethod", *params.WebhooksOnChannelUpdatedMethod) -} - if params != nil && params.WebhooksOnChannelUpdatedUrl != nil { - data.Set("WebhooksOnChannelUpdatedUrl", *params.WebhooksOnChannelUpdatedUrl) -} - if params != nil && params.WebhooksOnMemberAddMethod != nil { - data.Set("WebhooksOnMemberAddMethod", *params.WebhooksOnMemberAddMethod) -} - if params != nil && params.WebhooksOnMemberAddUrl != nil { - data.Set("WebhooksOnMemberAddUrl", *params.WebhooksOnMemberAddUrl) -} - if params != nil && params.WebhooksOnMemberAddedMethod != nil { - data.Set("WebhooksOnMemberAddedMethod", *params.WebhooksOnMemberAddedMethod) -} - if params != nil && params.WebhooksOnMemberAddedUrl != nil { - data.Set("WebhooksOnMemberAddedUrl", *params.WebhooksOnMemberAddedUrl) -} - if params != nil && params.WebhooksOnMemberRemoveMethod != nil { - data.Set("WebhooksOnMemberRemoveMethod", *params.WebhooksOnMemberRemoveMethod) -} - if params != nil && params.WebhooksOnMemberRemoveUrl != nil { - data.Set("WebhooksOnMemberRemoveUrl", *params.WebhooksOnMemberRemoveUrl) -} - if params != nil && params.WebhooksOnMemberRemovedMethod != nil { - data.Set("WebhooksOnMemberRemovedMethod", *params.WebhooksOnMemberRemovedMethod) -} - if params != nil && params.WebhooksOnMemberRemovedUrl != nil { - data.Set("WebhooksOnMemberRemovedUrl", *params.WebhooksOnMemberRemovedUrl) -} - if params != nil && params.WebhooksOnMessageRemoveMethod != nil { - data.Set("WebhooksOnMessageRemoveMethod", *params.WebhooksOnMessageRemoveMethod) -} - if params != nil && params.WebhooksOnMessageRemoveUrl != nil { - data.Set("WebhooksOnMessageRemoveUrl", *params.WebhooksOnMessageRemoveUrl) -} - if params != nil && params.WebhooksOnMessageRemovedMethod != nil { - data.Set("WebhooksOnMessageRemovedMethod", *params.WebhooksOnMessageRemovedMethod) -} - if params != nil && params.WebhooksOnMessageRemovedUrl != nil { - data.Set("WebhooksOnMessageRemovedUrl", *params.WebhooksOnMessageRemovedUrl) -} - if params != nil && params.WebhooksOnMessageSendMethod != nil { - data.Set("WebhooksOnMessageSendMethod", *params.WebhooksOnMessageSendMethod) -} - if params != nil && params.WebhooksOnMessageSendUrl != nil { - data.Set("WebhooksOnMessageSendUrl", *params.WebhooksOnMessageSendUrl) -} - if params != nil && params.WebhooksOnMessageSentMethod != nil { - data.Set("WebhooksOnMessageSentMethod", *params.WebhooksOnMessageSentMethod) -} - if params != nil && params.WebhooksOnMessageSentUrl != nil { - data.Set("WebhooksOnMessageSentUrl", *params.WebhooksOnMessageSentUrl) -} - if params != nil && params.WebhooksOnMessageUpdateMethod != nil { - data.Set("WebhooksOnMessageUpdateMethod", *params.WebhooksOnMessageUpdateMethod) -} - if params != nil && params.WebhooksOnMessageUpdateUrl != nil { - data.Set("WebhooksOnMessageUpdateUrl", *params.WebhooksOnMessageUpdateUrl) -} - if params != nil && params.WebhooksOnMessageUpdatedMethod != nil { - data.Set("WebhooksOnMessageUpdatedMethod", *params.WebhooksOnMessageUpdatedMethod) -} - if params != nil && params.WebhooksOnMessageUpdatedUrl != nil { - data.Set("WebhooksOnMessageUpdatedUrl", *params.WebhooksOnMessageUpdatedUrl) -} + data := url.Values{} + headers := 0 + if params != nil && params.ConsumptionReportInterval != nil { + data.Set("ConsumptionReportInterval", fmt.Sprint(*params.ConsumptionReportInterval)) + } + if params != nil && params.DefaultChannelCreatorRoleSid != nil { + data.Set("DefaultChannelCreatorRoleSid", *params.DefaultChannelCreatorRoleSid) + } + if params != nil && params.DefaultChannelRoleSid != nil { + data.Set("DefaultChannelRoleSid", *params.DefaultChannelRoleSid) + } + if params != nil && params.DefaultServiceRoleSid != nil { + data.Set("DefaultServiceRoleSid", *params.DefaultServiceRoleSid) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.LimitsChannelMembers != nil { + data.Set("LimitsChannelMembers", fmt.Sprint(*params.LimitsChannelMembers)) + } + if params != nil && params.LimitsUserChannels != nil { + data.Set("LimitsUserChannels", fmt.Sprint(*params.LimitsUserChannels)) + } + if params != nil && params.NotificationsAddedToChannelEnabled != nil { + data.Set("NotificationsAddedToChannelEnabled", fmt.Sprint(*params.NotificationsAddedToChannelEnabled)) + } + if params != nil && params.NotificationsAddedToChannelTemplate != nil { + data.Set("NotificationsAddedToChannelTemplate", *params.NotificationsAddedToChannelTemplate) + } + if params != nil && params.NotificationsInvitedToChannelEnabled != nil { + data.Set("NotificationsInvitedToChannelEnabled", fmt.Sprint(*params.NotificationsInvitedToChannelEnabled)) + } + if params != nil && params.NotificationsInvitedToChannelTemplate != nil { + data.Set("NotificationsInvitedToChannelTemplate", *params.NotificationsInvitedToChannelTemplate) + } + if params != nil && params.NotificationsNewMessageEnabled != nil { + data.Set("NotificationsNewMessageEnabled", fmt.Sprint(*params.NotificationsNewMessageEnabled)) + } + if params != nil && params.NotificationsNewMessageTemplate != nil { + data.Set("NotificationsNewMessageTemplate", *params.NotificationsNewMessageTemplate) + } + if params != nil && params.NotificationsRemovedFromChannelEnabled != nil { + data.Set("NotificationsRemovedFromChannelEnabled", fmt.Sprint(*params.NotificationsRemovedFromChannelEnabled)) + } + if params != nil && params.NotificationsRemovedFromChannelTemplate != nil { + data.Set("NotificationsRemovedFromChannelTemplate", *params.NotificationsRemovedFromChannelTemplate) + } + if params != nil && params.PostWebhookUrl != nil { + data.Set("PostWebhookUrl", *params.PostWebhookUrl) + } + if params != nil && params.PreWebhookUrl != nil { + data.Set("PreWebhookUrl", *params.PreWebhookUrl) + } + if params != nil && params.ReachabilityEnabled != nil { + data.Set("ReachabilityEnabled", fmt.Sprint(*params.ReachabilityEnabled)) + } + if params != nil && params.ReadStatusEnabled != nil { + data.Set("ReadStatusEnabled", fmt.Sprint(*params.ReadStatusEnabled)) + } + if params != nil && params.TypingIndicatorTimeout != nil { + data.Set("TypingIndicatorTimeout", fmt.Sprint(*params.TypingIndicatorTimeout)) + } + if params != nil && params.WebhookFilters != nil { + data.Set("WebhookFilters", strings.Join(*params.WebhookFilters, ",")) + } + if params != nil && params.WebhookMethod != nil { + data.Set("WebhookMethod", *params.WebhookMethod) + } + if params != nil && params.WebhooksOnChannelAddMethod != nil { + data.Set("WebhooksOnChannelAddMethod", *params.WebhooksOnChannelAddMethod) + } + if params != nil && params.WebhooksOnChannelAddUrl != nil { + data.Set("WebhooksOnChannelAddUrl", *params.WebhooksOnChannelAddUrl) + } + if params != nil && params.WebhooksOnChannelAddedMethod != nil { + data.Set("WebhooksOnChannelAddedMethod", *params.WebhooksOnChannelAddedMethod) + } + if params != nil && params.WebhooksOnChannelAddedUrl != nil { + data.Set("WebhooksOnChannelAddedUrl", *params.WebhooksOnChannelAddedUrl) + } + if params != nil && params.WebhooksOnChannelDestroyMethod != nil { + data.Set("WebhooksOnChannelDestroyMethod", *params.WebhooksOnChannelDestroyMethod) + } + if params != nil && params.WebhooksOnChannelDestroyUrl != nil { + data.Set("WebhooksOnChannelDestroyUrl", *params.WebhooksOnChannelDestroyUrl) + } + if params != nil && params.WebhooksOnChannelDestroyedMethod != nil { + data.Set("WebhooksOnChannelDestroyedMethod", *params.WebhooksOnChannelDestroyedMethod) + } + if params != nil && params.WebhooksOnChannelDestroyedUrl != nil { + data.Set("WebhooksOnChannelDestroyedUrl", *params.WebhooksOnChannelDestroyedUrl) + } + if params != nil && params.WebhooksOnChannelUpdateMethod != nil { + data.Set("WebhooksOnChannelUpdateMethod", *params.WebhooksOnChannelUpdateMethod) + } + if params != nil && params.WebhooksOnChannelUpdateUrl != nil { + data.Set("WebhooksOnChannelUpdateUrl", *params.WebhooksOnChannelUpdateUrl) + } + if params != nil && params.WebhooksOnChannelUpdatedMethod != nil { + data.Set("WebhooksOnChannelUpdatedMethod", *params.WebhooksOnChannelUpdatedMethod) + } + if params != nil && params.WebhooksOnChannelUpdatedUrl != nil { + data.Set("WebhooksOnChannelUpdatedUrl", *params.WebhooksOnChannelUpdatedUrl) + } + if params != nil && params.WebhooksOnMemberAddMethod != nil { + data.Set("WebhooksOnMemberAddMethod", *params.WebhooksOnMemberAddMethod) + } + if params != nil && params.WebhooksOnMemberAddUrl != nil { + data.Set("WebhooksOnMemberAddUrl", *params.WebhooksOnMemberAddUrl) + } + if params != nil && params.WebhooksOnMemberAddedMethod != nil { + data.Set("WebhooksOnMemberAddedMethod", *params.WebhooksOnMemberAddedMethod) + } + if params != nil && params.WebhooksOnMemberAddedUrl != nil { + data.Set("WebhooksOnMemberAddedUrl", *params.WebhooksOnMemberAddedUrl) + } + if params != nil && params.WebhooksOnMemberRemoveMethod != nil { + data.Set("WebhooksOnMemberRemoveMethod", *params.WebhooksOnMemberRemoveMethod) + } + if params != nil && params.WebhooksOnMemberRemoveUrl != nil { + data.Set("WebhooksOnMemberRemoveUrl", *params.WebhooksOnMemberRemoveUrl) + } + if params != nil && params.WebhooksOnMemberRemovedMethod != nil { + data.Set("WebhooksOnMemberRemovedMethod", *params.WebhooksOnMemberRemovedMethod) + } + if params != nil && params.WebhooksOnMemberRemovedUrl != nil { + data.Set("WebhooksOnMemberRemovedUrl", *params.WebhooksOnMemberRemovedUrl) + } + if params != nil && params.WebhooksOnMessageRemoveMethod != nil { + data.Set("WebhooksOnMessageRemoveMethod", *params.WebhooksOnMessageRemoveMethod) + } + if params != nil && params.WebhooksOnMessageRemoveUrl != nil { + data.Set("WebhooksOnMessageRemoveUrl", *params.WebhooksOnMessageRemoveUrl) + } + if params != nil && params.WebhooksOnMessageRemovedMethod != nil { + data.Set("WebhooksOnMessageRemovedMethod", *params.WebhooksOnMessageRemovedMethod) + } + if params != nil && params.WebhooksOnMessageRemovedUrl != nil { + data.Set("WebhooksOnMessageRemovedUrl", *params.WebhooksOnMessageRemovedUrl) + } + if params != nil && params.WebhooksOnMessageSendMethod != nil { + data.Set("WebhooksOnMessageSendMethod", *params.WebhooksOnMessageSendMethod) + } + if params != nil && params.WebhooksOnMessageSendUrl != nil { + data.Set("WebhooksOnMessageSendUrl", *params.WebhooksOnMessageSendUrl) + } + if params != nil && params.WebhooksOnMessageSentMethod != nil { + data.Set("WebhooksOnMessageSentMethod", *params.WebhooksOnMessageSentMethod) + } + if params != nil && params.WebhooksOnMessageSentUrl != nil { + data.Set("WebhooksOnMessageSentUrl", *params.WebhooksOnMessageSentUrl) + } + if params != nil && params.WebhooksOnMessageUpdateMethod != nil { + data.Set("WebhooksOnMessageUpdateMethod", *params.WebhooksOnMessageUpdateMethod) + } + if params != nil && params.WebhooksOnMessageUpdateUrl != nil { + data.Set("WebhooksOnMessageUpdateUrl", *params.WebhooksOnMessageUpdateUrl) + } + if params != nil && params.WebhooksOnMessageUpdatedMethod != nil { + data.Set("WebhooksOnMessageUpdatedMethod", *params.WebhooksOnMessageUpdatedMethod) + } + if params != nil && params.WebhooksOnMessageUpdatedUrl != nil { + data.Set("WebhooksOnMessageUpdatedUrl", *params.WebhooksOnMessageUpdatedUrl) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &IpMessagingV1Service{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &IpMessagingV1Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateUserParams Optional parameters for the method 'UpdateUser' type UpdateUserParams struct { - Attributes *string `json:"Attributes,omitempty"` + Attributes *string `json:"Attributes,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` } /* @@ -1808,41 +1776,40 @@ type UpdateUserParams struct { * @param ServiceSid * @param Sid * @param optional nil or *UpdateUserParams - Optional Parameters: -* @param "Attributes" (string) - -* @param "FriendlyName" (string) - -* @param "RoleSid" (string) - +* @param "Attributes" (string) - +* @param "FriendlyName" (string) - +* @param "RoleSid" (string) - * @return IpMessagingV1ServiceUser -*/ + */ func (c *DefaultApiService) UpdateUser(ServiceSid string, Sid string, params *UpdateUserParams) (*IpMessagingV1ServiceUser, error) { - path := "/v1/Services/{ServiceSid}/Users/{Sid}" + path := "/v1/Services/{ServiceSid}/Users/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.RoleSid != nil { - data.Set("RoleSid", *params.RoleSid) -} + data := url.Values{} + headers := 0 + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &IpMessagingV1ServiceUser{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &IpMessagingV1ServiceUser{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } diff --git a/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_credential.go b/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_credential.go index 296e20f80..b7f6a9ea2 100644 --- a/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_credential.go +++ b/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_credential.go @@ -1,26 +1,28 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // IpMessagingV1Credential struct for IpMessagingV1Credential type IpMessagingV1Credential struct { - AccountSid *string `json:"AccountSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Sandbox *string `json:"Sandbox,omitempty"` - Sid *string `json:"Sid,omitempty"` - Type *string `json:"Type,omitempty"` - Url *string `json:"Url,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Sandbox *string `json:"Sandbox,omitempty"` + Sid *string `json:"Sid,omitempty"` + Type *string `json:"Type,omitempty"` + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service.go b/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service.go index 7d39834ba..a43267d51 100644 --- a/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service.go +++ b/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service.go @@ -1,39 +1,41 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // IpMessagingV1Service struct for IpMessagingV1Service type IpMessagingV1Service struct { - AccountSid *string `json:"AccountSid,omitempty"` - ConsumptionReportInterval *int32 `json:"ConsumptionReportInterval,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - DefaultChannelCreatorRoleSid *string `json:"DefaultChannelCreatorRoleSid,omitempty"` - DefaultChannelRoleSid *string `json:"DefaultChannelRoleSid,omitempty"` - DefaultServiceRoleSid *string `json:"DefaultServiceRoleSid,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Limits *map[string]interface{} `json:"Limits,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - Notifications *map[string]interface{} `json:"Notifications,omitempty"` - PostWebhookUrl *string `json:"PostWebhookUrl,omitempty"` - PreWebhookUrl *string `json:"PreWebhookUrl,omitempty"` - ReachabilityEnabled *bool `json:"ReachabilityEnabled,omitempty"` - ReadStatusEnabled *bool `json:"ReadStatusEnabled,omitempty"` - Sid *string `json:"Sid,omitempty"` - TypingIndicatorTimeout *int32 `json:"TypingIndicatorTimeout,omitempty"` - Url *string `json:"Url,omitempty"` - WebhookFilters *[]string `json:"WebhookFilters,omitempty"` - WebhookMethod *string `json:"WebhookMethod,omitempty"` - Webhooks *map[string]interface{} `json:"Webhooks,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` + ConsumptionReportInterval *int32 `json:"ConsumptionReportInterval,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + DefaultChannelCreatorRoleSid *string `json:"DefaultChannelCreatorRoleSid,omitempty"` + DefaultChannelRoleSid *string `json:"DefaultChannelRoleSid,omitempty"` + DefaultServiceRoleSid *string `json:"DefaultServiceRoleSid,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Limits *map[string]interface{} `json:"Limits,omitempty"` + Links *map[string]interface{} `json:"Links,omitempty"` + Notifications *map[string]interface{} `json:"Notifications,omitempty"` + PostWebhookUrl *string `json:"PostWebhookUrl,omitempty"` + PreWebhookUrl *string `json:"PreWebhookUrl,omitempty"` + ReachabilityEnabled *bool `json:"ReachabilityEnabled,omitempty"` + ReadStatusEnabled *bool `json:"ReadStatusEnabled,omitempty"` + Sid *string `json:"Sid,omitempty"` + TypingIndicatorTimeout *int32 `json:"TypingIndicatorTimeout,omitempty"` + Url *string `json:"Url,omitempty"` + WebhookFilters *[]string `json:"WebhookFilters,omitempty"` + WebhookMethod *string `json:"WebhookMethod,omitempty"` + Webhooks *map[string]interface{} `json:"Webhooks,omitempty"` } diff --git a/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service_channel.go b/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service_channel.go index 2c9998d17..34c6e7ba0 100644 --- a/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service_channel.go +++ b/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service_channel.go @@ -1,32 +1,34 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // IpMessagingV1ServiceChannel struct for IpMessagingV1ServiceChannel type IpMessagingV1ServiceChannel struct { - AccountSid *string `json:"AccountSid,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - CreatedBy *string `json:"CreatedBy,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - MembersCount *int32 `json:"MembersCount,omitempty"` - MessagesCount *int32 `json:"MessagesCount,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Type *string `json:"Type,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` - Url *string `json:"Url,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + CreatedBy *string `json:"CreatedBy,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Links *map[string]interface{} `json:"Links,omitempty"` + MembersCount *int32 `json:"MembersCount,omitempty"` + MessagesCount *int32 `json:"MessagesCount,omitempty"` + ServiceSid *string `json:"ServiceSid,omitempty"` + Sid *string `json:"Sid,omitempty"` + Type *string `json:"Type,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service_channel_invite.go b/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service_channel_invite.go index a122784f6..ef305a131 100644 --- a/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service_channel_invite.go +++ b/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service_channel_invite.go @@ -1,28 +1,30 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // IpMessagingV1ServiceChannelInvite struct for IpMessagingV1ServiceChannelInvite type IpMessagingV1ServiceChannelInvite struct { - AccountSid *string `json:"AccountSid,omitempty"` - ChannelSid *string `json:"ChannelSid,omitempty"` - CreatedBy *string `json:"CreatedBy,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` + ChannelSid *string `json:"ChannelSid,omitempty"` + CreatedBy *string `json:"CreatedBy,omitempty"` DateCreated *time.Time `json:"DateCreated,omitempty"` DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Identity *string `json:"Identity,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` + Identity *string `json:"Identity,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` + ServiceSid *string `json:"ServiceSid,omitempty"` + Sid *string `json:"Sid,omitempty"` + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service_channel_member.go b/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service_channel_member.go index c8fa172b8..7581ecd55 100644 --- a/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service_channel_member.go +++ b/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service_channel_member.go @@ -1,29 +1,31 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // IpMessagingV1ServiceChannelMember struct for IpMessagingV1ServiceChannelMember type IpMessagingV1ServiceChannelMember struct { - AccountSid *string `json:"AccountSid,omitempty"` - ChannelSid *string `json:"ChannelSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Identity *string `json:"Identity,omitempty"` - LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` + ChannelSid *string `json:"ChannelSid,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + Identity *string `json:"Identity,omitempty"` + LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` LastConsumptionTimestamp *time.Time `json:"LastConsumptionTimestamp,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` + ServiceSid *string `json:"ServiceSid,omitempty"` + Sid *string `json:"Sid,omitempty"` + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service_channel_message.go b/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service_channel_message.go index 0b798d061..717c9b616 100644 --- a/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service_channel_message.go +++ b/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service_channel_message.go @@ -1,31 +1,33 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // IpMessagingV1ServiceChannelMessage struct for IpMessagingV1ServiceChannelMessage type IpMessagingV1ServiceChannelMessage struct { - AccountSid *string `json:"AccountSid,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - Body *string `json:"Body,omitempty"` - ChannelSid *string `json:"ChannelSid,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + Body *string `json:"Body,omitempty"` + ChannelSid *string `json:"ChannelSid,omitempty"` DateCreated *time.Time `json:"DateCreated,omitempty"` DateUpdated *time.Time `json:"DateUpdated,omitempty"` - From *string `json:"From,omitempty"` - Index *int32 `json:"Index,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - To *string `json:"To,omitempty"` - Url *string `json:"Url,omitempty"` - WasEdited *bool `json:"WasEdited,omitempty"` + From *string `json:"From,omitempty"` + Index *int32 `json:"Index,omitempty"` + ServiceSid *string `json:"ServiceSid,omitempty"` + Sid *string `json:"Sid,omitempty"` + To *string `json:"To,omitempty"` + Url *string `json:"Url,omitempty"` + WasEdited *bool `json:"WasEdited,omitempty"` } diff --git a/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service_role.go b/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service_role.go index fdb581c28..c3719e5cf 100644 --- a/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service_role.go +++ b/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service_role.go @@ -1,27 +1,29 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // IpMessagingV1ServiceRole struct for IpMessagingV1ServiceRole type IpMessagingV1ServiceRole struct { - AccountSid *string `json:"AccountSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Permissions *[]string `json:"Permissions,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Type *string `json:"Type,omitempty"` - Url *string `json:"Url,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Permissions *[]string `json:"Permissions,omitempty"` + ServiceSid *string `json:"ServiceSid,omitempty"` + Sid *string `json:"Sid,omitempty"` + Type *string `json:"Type,omitempty"` + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service_user.go b/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service_user.go index 1dc9772b8..581e22ea8 100644 --- a/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service_user.go +++ b/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service_user.go @@ -1,32 +1,34 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // IpMessagingV1ServiceUser struct for IpMessagingV1ServiceUser type IpMessagingV1ServiceUser struct { - AccountSid *string `json:"AccountSid,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Identity *string `json:"Identity,omitempty"` - IsNotifiable *bool `json:"IsNotifiable,omitempty"` - IsOnline *bool `json:"IsOnline,omitempty"` - JoinedChannelsCount *int32 `json:"JoinedChannelsCount,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Identity *string `json:"Identity,omitempty"` + IsNotifiable *bool `json:"IsNotifiable,omitempty"` + IsOnline *bool `json:"IsOnline,omitempty"` + JoinedChannelsCount *int32 `json:"JoinedChannelsCount,omitempty"` + Links *map[string]interface{} `json:"Links,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` + ServiceSid *string `json:"ServiceSid,omitempty"` + Sid *string `json:"Sid,omitempty"` + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service_user_user_channel.go b/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service_user_user_channel.go index 815149d96..05f8e57ba 100644 --- a/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service_user_user_channel.go +++ b/twilio/rest/ip_messaging/v1/model_ip_messaging_v1_service_user_user_channel.go @@ -1,23 +1,24 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // IpMessagingV1ServiceUserUserChannel struct for IpMessagingV1ServiceUserUserChannel type IpMessagingV1ServiceUserUserChannel struct { - AccountSid *string `json:"AccountSid,omitempty"` - ChannelSid *string `json:"ChannelSid,omitempty"` - LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - MemberSid *string `json:"MemberSid,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Status *string `json:"Status,omitempty"` - UnreadMessagesCount *int32 `json:"UnreadMessagesCount,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` + ChannelSid *string `json:"ChannelSid,omitempty"` + LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` + Links *map[string]interface{} `json:"Links,omitempty"` + MemberSid *string `json:"MemberSid,omitempty"` + ServiceSid *string `json:"ServiceSid,omitempty"` + Status *string `json:"Status,omitempty"` + UnreadMessagesCount *int32 `json:"UnreadMessagesCount,omitempty"` } diff --git a/twilio/rest/ip_messaging/v1/model_list_channel_response.go b/twilio/rest/ip_messaging/v1/model_list_channel_response.go index 163e4c852..d3432b2df 100644 --- a/twilio/rest/ip_messaging/v1/model_list_channel_response.go +++ b/twilio/rest/ip_messaging/v1/model_list_channel_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListChannelResponse struct for ListChannelResponse type ListChannelResponse struct { Channels []IpMessagingV1ServiceChannel `json:"Channels,omitempty"` - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/ip_messaging/v1/model_list_credential_response.go b/twilio/rest/ip_messaging/v1/model_list_credential_response.go index 733be1d18..c4fb177a3 100644 --- a/twilio/rest/ip_messaging/v1/model_list_credential_response.go +++ b/twilio/rest/ip_messaging/v1/model_list_credential_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListCredentialResponse struct for ListCredentialResponse type ListCredentialResponse struct { - Credentials []IpMessagingV1Credential `json:"Credentials,omitempty"` - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Credentials []IpMessagingV1Credential `json:"Credentials,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/ip_messaging/v1/model_list_credential_response_meta.go b/twilio/rest/ip_messaging/v1/model_list_credential_response_meta.go index 64bed8506..87cc4ce5e 100644 --- a/twilio/rest/ip_messaging/v1/model_list_credential_response_meta.go +++ b/twilio/rest/ip_messaging/v1/model_list_credential_response_meta.go @@ -1,22 +1,23 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListCredentialResponseMeta struct for ListCredentialResponseMeta type ListCredentialResponseMeta struct { - FirstPageUrl string `json:"FirstPageUrl,omitempty"` - Key string `json:"Key,omitempty"` - NextPageUrl string `json:"NextPageUrl,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` - Url string `json:"Url,omitempty"` + Url string `json:"Url,omitempty"` } diff --git a/twilio/rest/ip_messaging/v1/model_list_invite_response.go b/twilio/rest/ip_messaging/v1/model_list_invite_response.go index 508907738..cee98afd8 100644 --- a/twilio/rest/ip_messaging/v1/model_list_invite_response.go +++ b/twilio/rest/ip_messaging/v1/model_list_invite_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListInviteResponse struct for ListInviteResponse type ListInviteResponse struct { Invites []IpMessagingV1ServiceChannelInvite `json:"Invites,omitempty"` - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/ip_messaging/v1/model_list_member_response.go b/twilio/rest/ip_messaging/v1/model_list_member_response.go index a19306b21..2b0726639 100644 --- a/twilio/rest/ip_messaging/v1/model_list_member_response.go +++ b/twilio/rest/ip_messaging/v1/model_list_member_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListMemberResponse struct for ListMemberResponse type ListMemberResponse struct { Members []IpMessagingV1ServiceChannelMember `json:"Members,omitempty"` - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/ip_messaging/v1/model_list_message_response.go b/twilio/rest/ip_messaging/v1/model_list_message_response.go index aba54b946..03fd62305 100644 --- a/twilio/rest/ip_messaging/v1/model_list_message_response.go +++ b/twilio/rest/ip_messaging/v1/model_list_message_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListMessageResponse struct for ListMessageResponse type ListMessageResponse struct { Messages []IpMessagingV1ServiceChannelMessage `json:"Messages,omitempty"` - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/ip_messaging/v1/model_list_role_response.go b/twilio/rest/ip_messaging/v1/model_list_role_response.go index 785a8a54e..557def78f 100644 --- a/twilio/rest/ip_messaging/v1/model_list_role_response.go +++ b/twilio/rest/ip_messaging/v1/model_list_role_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListRoleResponse struct for ListRoleResponse type ListRoleResponse struct { - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` Roles []IpMessagingV1ServiceRole `json:"Roles,omitempty"` } diff --git a/twilio/rest/ip_messaging/v1/model_list_service_response.go b/twilio/rest/ip_messaging/v1/model_list_service_response.go index 000fb8ef8..07249d437 100644 --- a/twilio/rest/ip_messaging/v1/model_list_service_response.go +++ b/twilio/rest/ip_messaging/v1/model_list_service_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListServiceResponse struct for ListServiceResponse type ListServiceResponse struct { - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` - Services []IpMessagingV1Service `json:"Services,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Services []IpMessagingV1Service `json:"Services,omitempty"` } diff --git a/twilio/rest/ip_messaging/v1/model_list_user_channel_response.go b/twilio/rest/ip_messaging/v1/model_list_user_channel_response.go index 5974f35b5..b3552c85e 100644 --- a/twilio/rest/ip_messaging/v1/model_list_user_channel_response.go +++ b/twilio/rest/ip_messaging/v1/model_list_user_channel_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListUserChannelResponse struct for ListUserChannelResponse type ListUserChannelResponse struct { Channels []IpMessagingV1ServiceUserUserChannel `json:"Channels,omitempty"` - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/ip_messaging/v1/model_list_user_response.go b/twilio/rest/ip_messaging/v1/model_list_user_response.go index 6a7881a9c..d316d0ed6 100644 --- a/twilio/rest/ip_messaging/v1/model_list_user_response.go +++ b/twilio/rest/ip_messaging/v1/model_list_user_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListUserResponse struct for ListUserResponse type ListUserResponse struct { - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` Users []IpMessagingV1ServiceUser `json:"Users,omitempty"` } diff --git a/twilio/rest/ip_messaging/v2/api_default.go b/twilio/rest/ip_messaging/v2/api_default.go index bc2ea3f27..5b92d5204 100644 --- a/twilio/rest/ip_messaging/v2/api_default.go +++ b/twilio/rest/ip_messaging/v2/api_default.go @@ -1,11 +1,11 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,11 +14,11 @@ package openapi import ( "encoding/json" "fmt" - twilio "github.com/twilio/twilio-go/client" "net/url" - "strings" - "time" - "reflect" + "strings" + "time" + + twilio "github.com/twilio/twilio-go/client" ) type DefaultApiService struct { @@ -27,22 +27,22 @@ type DefaultApiService struct { } func NewDefaultApiService(client *twilio.Client) *DefaultApiService { - return &DefaultApiService { - client: client, + return &DefaultApiService{ + client: client, baseURL: "https://ip-messaging.twilio.com", } } // CreateChannelParams Optional parameters for the method 'CreateChannel' type CreateChannelParams struct { - XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - CreatedBy *string `json:"CreatedBy,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Type *string `json:"Type,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + CreatedBy *string `json:"CreatedBy,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Type *string `json:"Type,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` } /* @@ -50,71 +50,72 @@ type CreateChannelParams struct { * @param ServiceSid * @param optional nil or *CreateChannelParams - Optional Parameters: * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header -* @param "Attributes" (string) - -* @param "CreatedBy" (string) - -* @param "DateCreated" (time.Time) - -* @param "DateUpdated" (time.Time) - -* @param "FriendlyName" (string) - -* @param "Type" (string) - -* @param "UniqueName" (string) - +* @param "Attributes" (string) - +* @param "CreatedBy" (string) - +* @param "DateCreated" (time.Time) - +* @param "DateUpdated" (time.Time) - +* @param "FriendlyName" (string) - +* @param "Type" (string) - +* @param "UniqueName" (string) - * @return IpMessagingV2ServiceChannel -*/ + */ func (c *DefaultApiService) CreateChannel(ServiceSid string, params *CreateChannelParams) (*IpMessagingV2ServiceChannel, error) { - path := "/v2/Services/{ServiceSid}/Channels" + path := "/v2/Services/{ServiceSid}/Channels" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) -} - if params != nil && params.CreatedBy != nil { - data.Set("CreatedBy", *params.CreatedBy) -} - if params != nil && params.DateCreated != nil { - data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) -} - if params != nil && params.DateUpdated != nil { - data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.Type != nil { - data.Set("Type", *params.Type) -} - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) -} + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.CreatedBy != nil { + data.Set("CreatedBy", *params.CreatedBy) + } + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) + } + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Type != nil { + data.Set("Type", *params.Type) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &IpMessagingV2ServiceChannel{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &IpMessagingV2ServiceChannel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateChannelWebhookParams Optional parameters for the method 'CreateChannelWebhook' type CreateChannelWebhookParams struct { - ConfigurationFilters *[]string `json:"Configuration.Filters,omitempty"` - ConfigurationFlowSid *string `json:"Configuration.FlowSid,omitempty"` - ConfigurationMethod *string `json:"Configuration.Method,omitempty"` - ConfigurationRetryCount *int32 `json:"Configuration.RetryCount,omitempty"` - ConfigurationTriggers *[]string `json:"Configuration.Triggers,omitempty"` - ConfigurationUrl *string `json:"Configuration.Url,omitempty"` - Type *string `json:"Type,omitempty"` + ConfigurationFilters *[]string `json:"Configuration.Filters,omitempty"` + ConfigurationFlowSid *string `json:"Configuration.FlowSid,omitempty"` + ConfigurationMethod *string `json:"Configuration.Method,omitempty"` + ConfigurationRetryCount *int32 `json:"Configuration.RetryCount,omitempty"` + ConfigurationTriggers *[]string `json:"Configuration.Triggers,omitempty"` + ConfigurationUrl *string `json:"Configuration.Url,omitempty"` + Type *string `json:"Type,omitempty"` } /* @@ -122,130 +123,130 @@ type CreateChannelWebhookParams struct { * @param ServiceSid * @param ChannelSid * @param optional nil or *CreateChannelWebhookParams - Optional Parameters: -* @param "ConfigurationFilters" ([]string) - -* @param "ConfigurationFlowSid" (string) - -* @param "ConfigurationMethod" (string) - -* @param "ConfigurationRetryCount" (int32) - -* @param "ConfigurationTriggers" ([]string) - -* @param "ConfigurationUrl" (string) - -* @param "Type" (string) - +* @param "ConfigurationFilters" ([]string) - +* @param "ConfigurationFlowSid" (string) - +* @param "ConfigurationMethod" (string) - +* @param "ConfigurationRetryCount" (int32) - +* @param "ConfigurationTriggers" ([]string) - +* @param "ConfigurationUrl" (string) - +* @param "Type" (string) - * @return IpMessagingV2ServiceChannelChannelWebhook -*/ + */ func (c *DefaultApiService) CreateChannelWebhook(ServiceSid string, ChannelSid string, params *CreateChannelWebhookParams) (*IpMessagingV2ServiceChannelChannelWebhook, error) { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks" + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.ConfigurationFilters != nil { - data.Set("ConfigurationFilters", strings.Join(*params.ConfigurationFilters, ",")) -} - if params != nil && params.ConfigurationFlowSid != nil { - data.Set("ConfigurationFlowSid", *params.ConfigurationFlowSid) -} - if params != nil && params.ConfigurationMethod != nil { - data.Set("ConfigurationMethod", *params.ConfigurationMethod) -} - if params != nil && params.ConfigurationRetryCount != nil { - data.Set("ConfigurationRetryCount", fmt.Sprint(*params.ConfigurationRetryCount)) -} - if params != nil && params.ConfigurationTriggers != nil { - data.Set("ConfigurationTriggers", strings.Join(*params.ConfigurationTriggers, ",")) -} - if params != nil && params.ConfigurationUrl != nil { - data.Set("ConfigurationUrl", *params.ConfigurationUrl) -} - if params != nil && params.Type != nil { - data.Set("Type", *params.Type) -} + data := url.Values{} + headers := 0 + if params != nil && params.ConfigurationFilters != nil { + data.Set("ConfigurationFilters", strings.Join(*params.ConfigurationFilters, ",")) + } + if params != nil && params.ConfigurationFlowSid != nil { + data.Set("ConfigurationFlowSid", *params.ConfigurationFlowSid) + } + if params != nil && params.ConfigurationMethod != nil { + data.Set("ConfigurationMethod", *params.ConfigurationMethod) + } + if params != nil && params.ConfigurationRetryCount != nil { + data.Set("ConfigurationRetryCount", fmt.Sprint(*params.ConfigurationRetryCount)) + } + if params != nil && params.ConfigurationTriggers != nil { + data.Set("ConfigurationTriggers", strings.Join(*params.ConfigurationTriggers, ",")) + } + if params != nil && params.ConfigurationUrl != nil { + data.Set("ConfigurationUrl", *params.ConfigurationUrl) + } + if params != nil && params.Type != nil { + data.Set("Type", *params.Type) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &IpMessagingV2ServiceChannelChannelWebhook{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &IpMessagingV2ServiceChannelChannelWebhook{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateCredentialParams Optional parameters for the method 'CreateCredential' type CreateCredentialParams struct { - ApiKey *string `json:"ApiKey,omitempty"` - Certificate *string `json:"Certificate,omitempty"` + ApiKey *string `json:"ApiKey,omitempty"` + Certificate *string `json:"Certificate,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` - PrivateKey *string `json:"PrivateKey,omitempty"` - Sandbox *bool `json:"Sandbox,omitempty"` - Secret *string `json:"Secret,omitempty"` - Type *string `json:"Type,omitempty"` + PrivateKey *string `json:"PrivateKey,omitempty"` + Sandbox *bool `json:"Sandbox,omitempty"` + Secret *string `json:"Secret,omitempty"` + Type *string `json:"Type,omitempty"` } /* * CreateCredential Method for CreateCredential * @param optional nil or *CreateCredentialParams - Optional Parameters: -* @param "ApiKey" (string) - -* @param "Certificate" (string) - -* @param "FriendlyName" (string) - -* @param "PrivateKey" (string) - -* @param "Sandbox" (bool) - -* @param "Secret" (string) - -* @param "Type" (string) - +* @param "ApiKey" (string) - +* @param "Certificate" (string) - +* @param "FriendlyName" (string) - +* @param "PrivateKey" (string) - +* @param "Sandbox" (bool) - +* @param "Secret" (string) - +* @param "Type" (string) - * @return IpMessagingV2Credential -*/ + */ func (c *DefaultApiService) CreateCredential(params *CreateCredentialParams) (*IpMessagingV2Credential, error) { - path := "/v2/Credentials" - - data := url.Values{} - headers := 0 + path := "/v2/Credentials" - if params != nil && params.ApiKey != nil { - data.Set("ApiKey", *params.ApiKey) -} - if params != nil && params.Certificate != nil { - data.Set("Certificate", *params.Certificate) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.PrivateKey != nil { - data.Set("PrivateKey", *params.PrivateKey) -} - if params != nil && params.Sandbox != nil { - data.Set("Sandbox", fmt.Sprint(*params.Sandbox)) -} - if params != nil && params.Secret != nil { - data.Set("Secret", *params.Secret) -} - if params != nil && params.Type != nil { - data.Set("Type", *params.Type) -} + data := url.Values{} + headers := 0 + if params != nil && params.ApiKey != nil { + data.Set("ApiKey", *params.ApiKey) + } + if params != nil && params.Certificate != nil { + data.Set("Certificate", *params.Certificate) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.PrivateKey != nil { + data.Set("PrivateKey", *params.PrivateKey) + } + if params != nil && params.Sandbox != nil { + data.Set("Sandbox", fmt.Sprint(*params.Sandbox)) + } + if params != nil && params.Secret != nil { + data.Set("Secret", *params.Secret) + } + if params != nil && params.Type != nil { + data.Set("Type", *params.Type) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &IpMessagingV2Credential{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &IpMessagingV2Credential{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateInviteParams Optional parameters for the method 'CreateInvite' type CreateInviteParams struct { Identity *string `json:"Identity,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` } /* @@ -253,50 +254,50 @@ type CreateInviteParams struct { * @param ServiceSid * @param ChannelSid * @param optional nil or *CreateInviteParams - Optional Parameters: -* @param "Identity" (string) - -* @param "RoleSid" (string) - +* @param "Identity" (string) - +* @param "RoleSid" (string) - * @return IpMessagingV2ServiceChannelInvite -*/ + */ func (c *DefaultApiService) CreateInvite(ServiceSid string, ChannelSid string, params *CreateInviteParams) (*IpMessagingV2ServiceChannelInvite, error) { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Invites" + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Invites" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Identity != nil { - data.Set("Identity", *params.Identity) -} - if params != nil && params.RoleSid != nil { - data.Set("RoleSid", *params.RoleSid) -} + data := url.Values{} + headers := 0 + if params != nil && params.Identity != nil { + data.Set("Identity", *params.Identity) + } + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &IpMessagingV2ServiceChannelInvite{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &IpMessagingV2ServiceChannelInvite{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateMemberParams Optional parameters for the method 'CreateMember' type CreateMemberParams struct { - XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Identity *string `json:"Identity,omitempty"` - LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + Identity *string `json:"Identity,omitempty"` + LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` LastConsumptionTimestamp *time.Time `json:"LastConsumptionTimestamp,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` } /* @@ -305,73 +306,74 @@ type CreateMemberParams struct { * @param ChannelSid * @param optional nil or *CreateMemberParams - Optional Parameters: * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header -* @param "Attributes" (string) - -* @param "DateCreated" (time.Time) - -* @param "DateUpdated" (time.Time) - -* @param "Identity" (string) - -* @param "LastConsumedMessageIndex" (*int32) - -* @param "LastConsumptionTimestamp" (time.Time) - -* @param "RoleSid" (string) - +* @param "Attributes" (string) - +* @param "DateCreated" (time.Time) - +* @param "DateUpdated" (time.Time) - +* @param "Identity" (string) - +* @param "LastConsumedMessageIndex" (*int32) - +* @param "LastConsumptionTimestamp" (time.Time) - +* @param "RoleSid" (string) - * @return IpMessagingV2ServiceChannelMember -*/ + */ func (c *DefaultApiService) CreateMember(ServiceSid string, ChannelSid string, params *CreateMemberParams) (*IpMessagingV2ServiceChannelMember, error) { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members" + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) -} - if params != nil && params.DateCreated != nil { - data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) -} - if params != nil && params.DateUpdated != nil { - data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) -} - if params != nil && params.Identity != nil { - data.Set("Identity", *params.Identity) -} - if params != nil && params.LastConsumedMessageIndex != nil { - data.Set("LastConsumedMessageIndex", fmt.Sprint(*params.LastConsumedMessageIndex)) -} - if params != nil && params.LastConsumptionTimestamp != nil { - data.Set("LastConsumptionTimestamp", fmt.Sprint(*params.LastConsumptionTimestamp)) -} - if params != nil && params.RoleSid != nil { - data.Set("RoleSid", *params.RoleSid) -} + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) + } + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) + } + if params != nil && params.Identity != nil { + data.Set("Identity", *params.Identity) + } + if params != nil && params.LastConsumedMessageIndex != nil { + data.Set("LastConsumedMessageIndex", fmt.Sprint(*params.LastConsumedMessageIndex)) + } + if params != nil && params.LastConsumptionTimestamp != nil { + data.Set("LastConsumptionTimestamp", fmt.Sprint(*params.LastConsumptionTimestamp)) + } + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) + } if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &IpMessagingV2ServiceChannelMember{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &IpMessagingV2ServiceChannelMember{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateMessageParams Optional parameters for the method 'CreateMessage' type CreateMessageParams struct { - XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - Body *string `json:"Body,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - From *string `json:"From,omitempty"` - LastUpdatedBy *string `json:"LastUpdatedBy,omitempty"` - MediaSid *string `json:"MediaSid,omitempty"` + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + Body *string `json:"Body,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + From *string `json:"From,omitempty"` + LastUpdatedBy *string `json:"LastUpdatedBy,omitempty"` + MediaSid *string `json:"MediaSid,omitempty"` } /* @@ -380,111 +382,112 @@ type CreateMessageParams struct { * @param ChannelSid * @param optional nil or *CreateMessageParams - Optional Parameters: * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header -* @param "Attributes" (string) - -* @param "Body" (string) - -* @param "DateCreated" (time.Time) - -* @param "DateUpdated" (time.Time) - -* @param "From" (string) - -* @param "LastUpdatedBy" (string) - -* @param "MediaSid" (string) - +* @param "Attributes" (string) - +* @param "Body" (string) - +* @param "DateCreated" (time.Time) - +* @param "DateUpdated" (time.Time) - +* @param "From" (string) - +* @param "LastUpdatedBy" (string) - +* @param "MediaSid" (string) - * @return IpMessagingV2ServiceChannelMessage -*/ + */ func (c *DefaultApiService) CreateMessage(ServiceSid string, ChannelSid string, params *CreateMessageParams) (*IpMessagingV2ServiceChannelMessage, error) { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages" + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) -} - if params != nil && params.Body != nil { - data.Set("Body", *params.Body) -} - if params != nil && params.DateCreated != nil { - data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) -} - if params != nil && params.DateUpdated != nil { - data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) -} - if params != nil && params.From != nil { - data.Set("From", *params.From) -} - if params != nil && params.LastUpdatedBy != nil { - data.Set("LastUpdatedBy", *params.LastUpdatedBy) -} - if params != nil && params.MediaSid != nil { - data.Set("MediaSid", *params.MediaSid) -} + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.Body != nil { + data.Set("Body", *params.Body) + } + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) + } + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) + } + if params != nil && params.From != nil { + data.Set("From", *params.From) + } + if params != nil && params.LastUpdatedBy != nil { + data.Set("LastUpdatedBy", *params.LastUpdatedBy) + } + if params != nil && params.MediaSid != nil { + data.Set("MediaSid", *params.MediaSid) + } if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &IpMessagingV2ServiceChannelMessage{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &IpMessagingV2ServiceChannelMessage{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateRoleParams Optional parameters for the method 'CreateRole' type CreateRoleParams struct { - FriendlyName *string `json:"FriendlyName,omitempty"` - Permission *[]string `json:"Permission,omitempty"` - Type *string `json:"Type,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Permission *[]string `json:"Permission,omitempty"` + Type *string `json:"Type,omitempty"` } /* * CreateRole Method for CreateRole * @param ServiceSid * @param optional nil or *CreateRoleParams - Optional Parameters: -* @param "FriendlyName" (string) - -* @param "Permission" ([]string) - -* @param "Type" (string) - +* @param "FriendlyName" (string) - +* @param "Permission" ([]string) - +* @param "Type" (string) - * @return IpMessagingV2ServiceRole -*/ + */ func (c *DefaultApiService) CreateRole(ServiceSid string, params *CreateRoleParams) (*IpMessagingV2ServiceRole, error) { - path := "/v2/Services/{ServiceSid}/Roles" + path := "/v2/Services/{ServiceSid}/Roles" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.Permission != nil { - data.Set("Permission", strings.Join(*params.Permission, ",")) -} - if params != nil && params.Type != nil { - data.Set("Type", *params.Type) -} + data := url.Values{} + headers := 0 + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Permission != nil { + data.Set("Permission", strings.Join(*params.Permission, ",")) + } + if params != nil && params.Type != nil { + data.Set("Type", *params.Type) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &IpMessagingV2ServiceRole{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &IpMessagingV2ServiceRole{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateServiceParams Optional parameters for the method 'CreateService' type CreateServiceParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` @@ -493,41 +496,41 @@ type CreateServiceParams struct { /* * CreateService Method for CreateService * @param optional nil or *CreateServiceParams - Optional Parameters: -* @param "FriendlyName" (string) - +* @param "FriendlyName" (string) - * @return IpMessagingV2Service -*/ + */ func (c *DefaultApiService) CreateService(params *CreateServiceParams) (*IpMessagingV2Service, error) { - path := "/v2/Services" - - data := url.Values{} - headers := 0 + path := "/v2/Services" - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} + data := url.Values{} + headers := 0 + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &IpMessagingV2Service{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &IpMessagingV2Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateUserParams Optional parameters for the method 'CreateUser' type CreateUserParams struct { XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Identity *string `json:"Identity,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Identity *string `json:"Identity,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` } /* @@ -535,75 +538,74 @@ type CreateUserParams struct { * @param ServiceSid * @param optional nil or *CreateUserParams - Optional Parameters: * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header -* @param "Attributes" (string) - -* @param "FriendlyName" (string) - -* @param "Identity" (string) - -* @param "RoleSid" (string) - +* @param "Attributes" (string) - +* @param "FriendlyName" (string) - +* @param "Identity" (string) - +* @param "RoleSid" (string) - * @return IpMessagingV2ServiceUser -*/ + */ func (c *DefaultApiService) CreateUser(ServiceSid string, params *CreateUserParams) (*IpMessagingV2ServiceUser, error) { - path := "/v2/Services/{ServiceSid}/Users" + path := "/v2/Services/{ServiceSid}/Users" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.Identity != nil { - data.Set("Identity", *params.Identity) -} - if params != nil && params.RoleSid != nil { - data.Set("RoleSid", *params.RoleSid) -} + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Identity != nil { + data.Set("Identity", *params.Identity) + } + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) + } if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &IpMessagingV2ServiceUser{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &IpMessagingV2ServiceUser{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * DeleteBinding Method for DeleteBinding * @param ServiceSid * @param Sid -*/ -func (c *DefaultApiService) DeleteBinding(ServiceSid string, Sid string, ) (error) { - path := "/v2/Services/{ServiceSid}/Bindings/{Sid}" + */ +func (c *DefaultApiService) DeleteBinding(ServiceSid string, Sid string) error { + path := "/v2/Services/{ServiceSid}/Bindings/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + defer resp.Body.Close() - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() - - return nil + return nil } + // DeleteChannelParams Optional parameters for the method 'DeleteChannel' type DeleteChannelParams struct { XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` @@ -615,28 +617,27 @@ type DeleteChannelParams struct { * @param Sid * @param optional nil or *DeleteChannelParams - Optional Parameters: * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header -*/ -func (c *DefaultApiService) DeleteChannel(ServiceSid string, Sid string, params *DeleteChannelParams) (error) { - path := "/v2/Services/{ServiceSid}/Channels/{Sid}" + */ +func (c *DefaultApiService) DeleteChannel(ServiceSid string, Sid string, params *DeleteChannelParams) error { + path := "/v2/Services/{ServiceSid}/Channels/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := make(map[string]interface{}) - + data := url.Values{} + headers := make(map[string]interface{}) if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -644,49 +645,45 @@ func (c *DefaultApiService) DeleteChannel(ServiceSid string, Sid string, params * @param ServiceSid * @param ChannelSid * @param Sid -*/ -func (c *DefaultApiService) DeleteChannelWebhook(ServiceSid string, ChannelSid string, Sid string, ) (error) { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks/{Sid}" + */ +func (c *DefaultApiService) DeleteChannelWebhook(ServiceSid string, ChannelSid string, Sid string) error { + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* * DeleteCredential Method for DeleteCredential * @param Sid -*/ -func (c *DefaultApiService) DeleteCredential(Sid string, ) (error) { - path := "/v2/Credentials/{Sid}" + */ +func (c *DefaultApiService) DeleteCredential(Sid string) error { + path := "/v2/Credentials/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -694,27 +691,26 @@ func (c *DefaultApiService) DeleteCredential(Sid string, ) (error) { * @param ServiceSid * @param ChannelSid * @param Sid -*/ -func (c *DefaultApiService) DeleteInvite(ServiceSid string, ChannelSid string, Sid string, ) (error) { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Invites/{Sid}" + */ +func (c *DefaultApiService) DeleteInvite(ServiceSid string, ChannelSid string, Sid string) error { + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Invites/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + defer resp.Body.Close() - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() - - return nil + return nil } + // DeleteMemberParams Optional parameters for the method 'DeleteMember' type DeleteMemberParams struct { XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` @@ -727,30 +723,30 @@ type DeleteMemberParams struct { * @param Sid * @param optional nil or *DeleteMemberParams - Optional Parameters: * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header -*/ -func (c *DefaultApiService) DeleteMember(ServiceSid string, ChannelSid string, Sid string, params *DeleteMemberParams) (error) { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}" + */ +func (c *DefaultApiService) DeleteMember(ServiceSid string, ChannelSid string, Sid string, params *DeleteMemberParams) error { + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := make(map[string]interface{}) - + data := url.Values{} + headers := make(map[string]interface{}) if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } + // DeleteMessageParams Optional parameters for the method 'DeleteMessage' type DeleteMessageParams struct { XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` @@ -763,102 +759,95 @@ type DeleteMessageParams struct { * @param Sid * @param optional nil or *DeleteMessageParams - Optional Parameters: * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header -*/ -func (c *DefaultApiService) DeleteMessage(ServiceSid string, ChannelSid string, Sid string, params *DeleteMessageParams) (error) { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}" + */ +func (c *DefaultApiService) DeleteMessage(ServiceSid string, ChannelSid string, Sid string, params *DeleteMessageParams) error { + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := make(map[string]interface{}) - + data := url.Values{} + headers := make(map[string]interface{}) if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* * DeleteRole Method for DeleteRole * @param ServiceSid * @param Sid -*/ -func (c *DefaultApiService) DeleteRole(ServiceSid string, Sid string, ) (error) { - path := "/v2/Services/{ServiceSid}/Roles/{Sid}" + */ +func (c *DefaultApiService) DeleteRole(ServiceSid string, Sid string) error { + path := "/v2/Services/{ServiceSid}/Roles/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* * DeleteService Method for DeleteService * @param Sid -*/ -func (c *DefaultApiService) DeleteService(Sid string, ) (error) { - path := "/v2/Services/{Sid}" + */ +func (c *DefaultApiService) DeleteService(Sid string) error { + path := "/v2/Services/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* * DeleteUser Method for DeleteUser * @param ServiceSid * @param Sid -*/ -func (c *DefaultApiService) DeleteUser(ServiceSid string, Sid string, ) (error) { - path := "/v2/Services/{ServiceSid}/Users/{Sid}" + */ +func (c *DefaultApiService) DeleteUser(ServiceSid string, Sid string) error { + path := "/v2/Services/{ServiceSid}/Users/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + defer resp.Body.Close() - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() - - return nil + return nil } /* @@ -866,26 +855,24 @@ func (c *DefaultApiService) DeleteUser(ServiceSid string, Sid string, ) (error) * @param ServiceSid * @param UserSid * @param Sid -*/ -func (c *DefaultApiService) DeleteUserBinding(ServiceSid string, UserSid string, Sid string, ) (error) { - path := "/v2/Services/{ServiceSid}/Users/{UserSid}/Bindings/{Sid}" + */ +func (c *DefaultApiService) DeleteUserBinding(ServiceSid string, UserSid string, Sid string) error { + path := "/v2/Services/{ServiceSid}/Users/{UserSid}/Bindings/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"UserSid"+"}", UserSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -893,26 +880,24 @@ func (c *DefaultApiService) DeleteUserBinding(ServiceSid string, UserSid string, * @param ServiceSid * @param UserSid * @param ChannelSid -*/ -func (c *DefaultApiService) DeleteUserChannel(ServiceSid string, UserSid string, ChannelSid string, ) (error) { - path := "/v2/Services/{ServiceSid}/Users/{UserSid}/Channels/{ChannelSid}" + */ +func (c *DefaultApiService) DeleteUserChannel(ServiceSid string, UserSid string, ChannelSid string) error { + path := "/v2/Services/{ServiceSid}/Users/{UserSid}/Channels/{ChannelSid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"UserSid"+"}", UserSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -920,30 +905,28 @@ func (c *DefaultApiService) DeleteUserChannel(ServiceSid string, UserSid string, * @param ServiceSid * @param Sid * @return IpMessagingV2ServiceBinding -*/ -func (c *DefaultApiService) FetchBinding(ServiceSid string, Sid string, ) (*IpMessagingV2ServiceBinding, error) { - path := "/v2/Services/{ServiceSid}/Bindings/{Sid}" + */ +func (c *DefaultApiService) FetchBinding(ServiceSid string, Sid string) (*IpMessagingV2ServiceBinding, error) { + path := "/v2/Services/{ServiceSid}/Bindings/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &IpMessagingV2ServiceBinding{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &IpMessagingV2ServiceBinding{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -951,30 +934,28 @@ func (c *DefaultApiService) FetchBinding(ServiceSid string, Sid string, ) (*IpMe * @param ServiceSid * @param Sid * @return IpMessagingV2ServiceChannel -*/ -func (c *DefaultApiService) FetchChannel(ServiceSid string, Sid string, ) (*IpMessagingV2ServiceChannel, error) { - path := "/v2/Services/{ServiceSid}/Channels/{Sid}" + */ +func (c *DefaultApiService) FetchChannel(ServiceSid string, Sid string) (*IpMessagingV2ServiceChannel, error) { + path := "/v2/Services/{ServiceSid}/Channels/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &IpMessagingV2ServiceChannel{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &IpMessagingV2ServiceChannel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -983,60 +964,56 @@ func (c *DefaultApiService) FetchChannel(ServiceSid string, Sid string, ) (*IpMe * @param ChannelSid * @param Sid * @return IpMessagingV2ServiceChannelChannelWebhook -*/ -func (c *DefaultApiService) FetchChannelWebhook(ServiceSid string, ChannelSid string, Sid string, ) (*IpMessagingV2ServiceChannelChannelWebhook, error) { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks/{Sid}" + */ +func (c *DefaultApiService) FetchChannelWebhook(ServiceSid string, ChannelSid string, Sid string) (*IpMessagingV2ServiceChannelChannelWebhook, error) { + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &IpMessagingV2ServiceChannelChannelWebhook{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &IpMessagingV2ServiceChannelChannelWebhook{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * FetchCredential Method for FetchCredential * @param Sid * @return IpMessagingV2Credential -*/ -func (c *DefaultApiService) FetchCredential(Sid string, ) (*IpMessagingV2Credential, error) { - path := "/v2/Credentials/{Sid}" + */ +func (c *DefaultApiService) FetchCredential(Sid string) (*IpMessagingV2Credential, error) { + path := "/v2/Credentials/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &IpMessagingV2Credential{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &IpMessagingV2Credential{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -1045,31 +1022,29 @@ func (c *DefaultApiService) FetchCredential(Sid string, ) (*IpMessagingV2Credent * @param ChannelSid * @param Sid * @return IpMessagingV2ServiceChannelInvite -*/ -func (c *DefaultApiService) FetchInvite(ServiceSid string, ChannelSid string, Sid string, ) (*IpMessagingV2ServiceChannelInvite, error) { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Invites/{Sid}" + */ +func (c *DefaultApiService) FetchInvite(ServiceSid string, ChannelSid string, Sid string) (*IpMessagingV2ServiceChannelInvite, error) { + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Invites/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &IpMessagingV2ServiceChannelInvite{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &IpMessagingV2ServiceChannelInvite{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -1078,31 +1053,29 @@ func (c *DefaultApiService) FetchInvite(ServiceSid string, ChannelSid string, Si * @param ChannelSid * @param Sid * @return IpMessagingV2ServiceChannelMember -*/ -func (c *DefaultApiService) FetchMember(ServiceSid string, ChannelSid string, Sid string, ) (*IpMessagingV2ServiceChannelMember, error) { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}" + */ +func (c *DefaultApiService) FetchMember(ServiceSid string, ChannelSid string, Sid string) (*IpMessagingV2ServiceChannelMember, error) { + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &IpMessagingV2ServiceChannelMember{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &IpMessagingV2ServiceChannelMember{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -1111,31 +1084,29 @@ func (c *DefaultApiService) FetchMember(ServiceSid string, ChannelSid string, Si * @param ChannelSid * @param Sid * @return IpMessagingV2ServiceChannelMessage -*/ -func (c *DefaultApiService) FetchMessage(ServiceSid string, ChannelSid string, Sid string, ) (*IpMessagingV2ServiceChannelMessage, error) { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}" + */ +func (c *DefaultApiService) FetchMessage(ServiceSid string, ChannelSid string, Sid string) (*IpMessagingV2ServiceChannelMessage, error) { + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &IpMessagingV2ServiceChannelMessage{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &IpMessagingV2ServiceChannelMessage{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -1143,59 +1114,55 @@ func (c *DefaultApiService) FetchMessage(ServiceSid string, ChannelSid string, S * @param ServiceSid * @param Sid * @return IpMessagingV2ServiceRole -*/ -func (c *DefaultApiService) FetchRole(ServiceSid string, Sid string, ) (*IpMessagingV2ServiceRole, error) { - path := "/v2/Services/{ServiceSid}/Roles/{Sid}" + */ +func (c *DefaultApiService) FetchRole(ServiceSid string, Sid string) (*IpMessagingV2ServiceRole, error) { + path := "/v2/Services/{ServiceSid}/Roles/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &IpMessagingV2ServiceRole{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &IpMessagingV2ServiceRole{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * FetchService Method for FetchService * @param Sid * @return IpMessagingV2Service -*/ -func (c *DefaultApiService) FetchService(Sid string, ) (*IpMessagingV2Service, error) { - path := "/v2/Services/{Sid}" + */ +func (c *DefaultApiService) FetchService(Sid string) (*IpMessagingV2Service, error) { + path := "/v2/Services/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &IpMessagingV2Service{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &IpMessagingV2Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -1203,30 +1170,28 @@ func (c *DefaultApiService) FetchService(Sid string, ) (*IpMessagingV2Service, e * @param ServiceSid * @param Sid * @return IpMessagingV2ServiceUser -*/ -func (c *DefaultApiService) FetchUser(ServiceSid string, Sid string, ) (*IpMessagingV2ServiceUser, error) { - path := "/v2/Services/{ServiceSid}/Users/{Sid}" + */ +func (c *DefaultApiService) FetchUser(ServiceSid string, Sid string) (*IpMessagingV2ServiceUser, error) { + path := "/v2/Services/{ServiceSid}/Users/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &IpMessagingV2ServiceUser{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &IpMessagingV2ServiceUser{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -1235,31 +1200,29 @@ func (c *DefaultApiService) FetchUser(ServiceSid string, Sid string, ) (*IpMessa * @param UserSid * @param Sid * @return IpMessagingV2ServiceUserUserBinding -*/ -func (c *DefaultApiService) FetchUserBinding(ServiceSid string, UserSid string, Sid string, ) (*IpMessagingV2ServiceUserUserBinding, error) { - path := "/v2/Services/{ServiceSid}/Users/{UserSid}/Bindings/{Sid}" + */ +func (c *DefaultApiService) FetchUserBinding(ServiceSid string, UserSid string, Sid string) (*IpMessagingV2ServiceUserUserBinding, error) { + path := "/v2/Services/{ServiceSid}/Users/{UserSid}/Bindings/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"UserSid"+"}", UserSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &IpMessagingV2ServiceUserUserBinding{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &IpMessagingV2ServiceUserUserBinding{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -1268,123 +1231,122 @@ func (c *DefaultApiService) FetchUserBinding(ServiceSid string, UserSid string, * @param UserSid * @param ChannelSid * @return IpMessagingV2ServiceUserUserChannel -*/ -func (c *DefaultApiService) FetchUserChannel(ServiceSid string, UserSid string, ChannelSid string, ) (*IpMessagingV2ServiceUserUserChannel, error) { - path := "/v2/Services/{ServiceSid}/Users/{UserSid}/Channels/{ChannelSid}" + */ +func (c *DefaultApiService) FetchUserChannel(ServiceSid string, UserSid string, ChannelSid string) (*IpMessagingV2ServiceUserUserChannel, error) { + path := "/v2/Services/{ServiceSid}/Users/{UserSid}/Channels/{ChannelSid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"UserSid"+"}", UserSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &IpMessagingV2ServiceUserUserChannel{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &IpMessagingV2ServiceUserUserChannel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListBindingParams Optional parameters for the method 'ListBinding' type ListBindingParams struct { BindingType *[]string `json:"BindingType,omitempty"` - Identity *[]string `json:"Identity,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + Identity *[]string `json:"Identity,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* * ListBinding Method for ListBinding * @param ServiceSid * @param optional nil or *ListBindingParams - Optional Parameters: -* @param "BindingType" ([]string) - -* @param "Identity" ([]string) - +* @param "BindingType" ([]string) - +* @param "Identity" ([]string) - * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListBindingResponse -*/ + */ func (c *DefaultApiService) ListBinding(ServiceSid string, params *ListBindingParams) (*ListBindingResponse, error) { - path := "/v2/Services/{ServiceSid}/Bindings" + path := "/v2/Services/{ServiceSid}/Bindings" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.BindingType != nil { - data.Set("BindingType", strings.Join(*params.BindingType, ",")) -} - if params != nil && params.Identity != nil { - data.Set("Identity", strings.Join(*params.Identity, ",")) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.BindingType != nil { + data.Set("BindingType", strings.Join(*params.BindingType, ",")) + } + if params != nil && params.Identity != nil { + data.Set("Identity", strings.Join(*params.Identity, ",")) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListBindingResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListBindingResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListChannelParams Optional parameters for the method 'ListChannel' type ListChannelParams struct { - Type *[]string `json:"Type,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + Type *[]string `json:"Type,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* * ListChannel Method for ListChannel * @param ServiceSid * @param optional nil or *ListChannelParams - Optional Parameters: -* @param "Type" ([]string) - +* @param "Type" ([]string) - * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListChannelResponse -*/ + */ func (c *DefaultApiService) ListChannel(ServiceSid string, params *ListChannelParams) (*ListChannelResponse, error) { - path := "/v2/Services/{ServiceSid}/Channels" + path := "/v2/Services/{ServiceSid}/Channels" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Type != nil { - data.Set("Type", strings.Join(*params.Type, ",")) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.Type != nil { + data.Set("Type", strings.Join(*params.Type, ",")) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListChannelResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListChannelResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListChannelWebhookParams Optional parameters for the method 'ListChannelWebhook' type ListChannelWebhookParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1397,34 +1359,34 @@ type ListChannelWebhookParams struct { * @param optional nil or *ListChannelWebhookParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListChannelWebhookResponse -*/ + */ func (c *DefaultApiService) ListChannelWebhook(ServiceSid string, ChannelSid string, params *ListChannelWebhookParams) (*ListChannelWebhookResponse, error) { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks" + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListChannelWebhookResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListChannelWebhookResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListCredentialParams Optional parameters for the method 'ListCredential' type ListCredentialParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1435,36 +1397,36 @@ type ListCredentialParams struct { * @param optional nil or *ListCredentialParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListCredentialResponse -*/ + */ func (c *DefaultApiService) ListCredential(params *ListCredentialParams) (*ListCredentialResponse, error) { - path := "/v2/Credentials" - - data := url.Values{} - headers := 0 + path := "/v2/Credentials" - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListCredentialResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListCredentialResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListInviteParams Optional parameters for the method 'ListInvite' type ListInviteParams struct { Identity *[]string `json:"Identity,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -1472,44 +1434,44 @@ type ListInviteParams struct { * @param ServiceSid * @param ChannelSid * @param optional nil or *ListInviteParams - Optional Parameters: -* @param "Identity" ([]string) - +* @param "Identity" ([]string) - * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListInviteResponse -*/ + */ func (c *DefaultApiService) ListInvite(ServiceSid string, ChannelSid string, params *ListInviteParams) (*ListInviteResponse, error) { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Invites" + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Invites" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Identity != nil { - data.Set("Identity", strings.Join(*params.Identity, ",")) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.Identity != nil { + data.Set("Identity", strings.Join(*params.Identity, ",")) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListInviteResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListInviteResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListMemberParams Optional parameters for the method 'ListMember' type ListMemberParams struct { Identity *[]string `json:"Identity,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -1517,44 +1479,44 @@ type ListMemberParams struct { * @param ServiceSid * @param ChannelSid * @param optional nil or *ListMemberParams - Optional Parameters: -* @param "Identity" ([]string) - +* @param "Identity" ([]string) - * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListMemberResponse -*/ + */ func (c *DefaultApiService) ListMember(ServiceSid string, ChannelSid string, params *ListMemberParams) (*ListMemberResponse, error) { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members" + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Identity != nil { - data.Set("Identity", strings.Join(*params.Identity, ",")) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.Identity != nil { + data.Set("Identity", strings.Join(*params.Identity, ",")) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListMemberResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListMemberResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListMessageParams Optional parameters for the method 'ListMessage' type ListMessageParams struct { - Order *string `json:"Order,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + Order *string `json:"Order,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -1562,40 +1524,40 @@ type ListMessageParams struct { * @param ServiceSid * @param ChannelSid * @param optional nil or *ListMessageParams - Optional Parameters: -* @param "Order" (string) - +* @param "Order" (string) - * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListMessageResponse -*/ + */ func (c *DefaultApiService) ListMessage(ServiceSid string, ChannelSid string, params *ListMessageParams) (*ListMessageResponse, error) { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages" + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Order != nil { - data.Set("Order", *params.Order) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.Order != nil { + data.Set("Order", *params.Order) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListMessageResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListMessageResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListRoleParams Optional parameters for the method 'ListRole' type ListRoleParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1607,33 +1569,33 @@ type ListRoleParams struct { * @param optional nil or *ListRoleParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListRoleResponse -*/ + */ func (c *DefaultApiService) ListRole(ServiceSid string, params *ListRoleParams) (*ListRoleResponse, error) { - path := "/v2/Services/{ServiceSid}/Roles" + path := "/v2/Services/{ServiceSid}/Roles" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListRoleResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListRoleResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListServiceParams Optional parameters for the method 'ListService' type ListServiceParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1644,32 +1606,32 @@ type ListServiceParams struct { * @param optional nil or *ListServiceParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListServiceResponse -*/ + */ func (c *DefaultApiService) ListService(params *ListServiceParams) (*ListServiceResponse, error) { - path := "/v2/Services" + path := "/v2/Services" - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListServiceResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListServiceResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListUserParams Optional parameters for the method 'ListUser' type ListUserParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1681,37 +1643,37 @@ type ListUserParams struct { * @param optional nil or *ListUserParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListUserResponse -*/ + */ func (c *DefaultApiService) ListUser(ServiceSid string, params *ListUserParams) (*ListUserResponse, error) { - path := "/v2/Services/{ServiceSid}/Users" + path := "/v2/Services/{ServiceSid}/Users" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListUserResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListUserResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListUserBindingParams Optional parameters for the method 'ListUserBinding' type ListUserBindingParams struct { BindingType *[]string `json:"BindingType,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -1719,40 +1681,40 @@ type ListUserBindingParams struct { * @param ServiceSid * @param UserSid * @param optional nil or *ListUserBindingParams - Optional Parameters: -* @param "BindingType" ([]string) - +* @param "BindingType" ([]string) - * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListUserBindingResponse -*/ + */ func (c *DefaultApiService) ListUserBinding(ServiceSid string, UserSid string, params *ListUserBindingParams) (*ListUserBindingResponse, error) { - path := "/v2/Services/{ServiceSid}/Users/{UserSid}/Bindings" + path := "/v2/Services/{ServiceSid}/Users/{UserSid}/Bindings" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"UserSid"+"}", UserSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.BindingType != nil { - data.Set("BindingType", strings.Join(*params.BindingType, ",")) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.BindingType != nil { + data.Set("BindingType", strings.Join(*params.BindingType, ",")) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListUserBindingResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListUserBindingResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListUserChannelParams Optional parameters for the method 'ListUserChannel' type ListUserChannelParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1765,43 +1727,43 @@ type ListUserChannelParams struct { * @param optional nil or *ListUserChannelParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListUserChannelResponse -*/ + */ func (c *DefaultApiService) ListUserChannel(ServiceSid string, UserSid string, params *ListUserChannelParams) (*ListUserChannelResponse, error) { - path := "/v2/Services/{ServiceSid}/Users/{UserSid}/Channels" + path := "/v2/Services/{ServiceSid}/Users/{UserSid}/Channels" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"UserSid"+"}", UserSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListUserChannelResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListUserChannelResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateChannelParams Optional parameters for the method 'UpdateChannel' type UpdateChannelParams struct { - XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - CreatedBy *string `json:"CreatedBy,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + CreatedBy *string `json:"CreatedBy,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` } /* @@ -1810,67 +1772,68 @@ type UpdateChannelParams struct { * @param Sid * @param optional nil or *UpdateChannelParams - Optional Parameters: * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header -* @param "Attributes" (string) - -* @param "CreatedBy" (string) - -* @param "DateCreated" (time.Time) - -* @param "DateUpdated" (time.Time) - -* @param "FriendlyName" (string) - -* @param "UniqueName" (string) - +* @param "Attributes" (string) - +* @param "CreatedBy" (string) - +* @param "DateCreated" (time.Time) - +* @param "DateUpdated" (time.Time) - +* @param "FriendlyName" (string) - +* @param "UniqueName" (string) - * @return IpMessagingV2ServiceChannel -*/ + */ func (c *DefaultApiService) UpdateChannel(ServiceSid string, Sid string, params *UpdateChannelParams) (*IpMessagingV2ServiceChannel, error) { - path := "/v2/Services/{ServiceSid}/Channels/{Sid}" + path := "/v2/Services/{ServiceSid}/Channels/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) -} - if params != nil && params.CreatedBy != nil { - data.Set("CreatedBy", *params.CreatedBy) -} - if params != nil && params.DateCreated != nil { - data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) -} - if params != nil && params.DateUpdated != nil { - data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) -} + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.CreatedBy != nil { + data.Set("CreatedBy", *params.CreatedBy) + } + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) + } + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &IpMessagingV2ServiceChannel{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &IpMessagingV2ServiceChannel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateChannelWebhookParams Optional parameters for the method 'UpdateChannelWebhook' type UpdateChannelWebhookParams struct { - ConfigurationFilters *[]string `json:"Configuration.Filters,omitempty"` - ConfigurationFlowSid *string `json:"Configuration.FlowSid,omitempty"` - ConfigurationMethod *string `json:"Configuration.Method,omitempty"` - ConfigurationRetryCount *int32 `json:"Configuration.RetryCount,omitempty"` - ConfigurationTriggers *[]string `json:"Configuration.Triggers,omitempty"` - ConfigurationUrl *string `json:"Configuration.Url,omitempty"` + ConfigurationFilters *[]string `json:"Configuration.Filters,omitempty"` + ConfigurationFlowSid *string `json:"Configuration.FlowSid,omitempty"` + ConfigurationMethod *string `json:"Configuration.Method,omitempty"` + ConfigurationRetryCount *int32 `json:"Configuration.RetryCount,omitempty"` + ConfigurationTriggers *[]string `json:"Configuration.Triggers,omitempty"` + ConfigurationUrl *string `json:"Configuration.Url,omitempty"` } /* @@ -1879,129 +1842,129 @@ type UpdateChannelWebhookParams struct { * @param ChannelSid * @param Sid * @param optional nil or *UpdateChannelWebhookParams - Optional Parameters: -* @param "ConfigurationFilters" ([]string) - -* @param "ConfigurationFlowSid" (string) - -* @param "ConfigurationMethod" (string) - -* @param "ConfigurationRetryCount" (int32) - -* @param "ConfigurationTriggers" ([]string) - -* @param "ConfigurationUrl" (string) - +* @param "ConfigurationFilters" ([]string) - +* @param "ConfigurationFlowSid" (string) - +* @param "ConfigurationMethod" (string) - +* @param "ConfigurationRetryCount" (int32) - +* @param "ConfigurationTriggers" ([]string) - +* @param "ConfigurationUrl" (string) - * @return IpMessagingV2ServiceChannelChannelWebhook -*/ + */ func (c *DefaultApiService) UpdateChannelWebhook(ServiceSid string, ChannelSid string, Sid string, params *UpdateChannelWebhookParams) (*IpMessagingV2ServiceChannelChannelWebhook, error) { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks/{Sid}" + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.ConfigurationFilters != nil { - data.Set("ConfigurationFilters", strings.Join(*params.ConfigurationFilters, ",")) -} - if params != nil && params.ConfigurationFlowSid != nil { - data.Set("ConfigurationFlowSid", *params.ConfigurationFlowSid) -} - if params != nil && params.ConfigurationMethod != nil { - data.Set("ConfigurationMethod", *params.ConfigurationMethod) -} - if params != nil && params.ConfigurationRetryCount != nil { - data.Set("ConfigurationRetryCount", fmt.Sprint(*params.ConfigurationRetryCount)) -} - if params != nil && params.ConfigurationTriggers != nil { - data.Set("ConfigurationTriggers", strings.Join(*params.ConfigurationTriggers, ",")) -} - if params != nil && params.ConfigurationUrl != nil { - data.Set("ConfigurationUrl", *params.ConfigurationUrl) -} + data := url.Values{} + headers := 0 + if params != nil && params.ConfigurationFilters != nil { + data.Set("ConfigurationFilters", strings.Join(*params.ConfigurationFilters, ",")) + } + if params != nil && params.ConfigurationFlowSid != nil { + data.Set("ConfigurationFlowSid", *params.ConfigurationFlowSid) + } + if params != nil && params.ConfigurationMethod != nil { + data.Set("ConfigurationMethod", *params.ConfigurationMethod) + } + if params != nil && params.ConfigurationRetryCount != nil { + data.Set("ConfigurationRetryCount", fmt.Sprint(*params.ConfigurationRetryCount)) + } + if params != nil && params.ConfigurationTriggers != nil { + data.Set("ConfigurationTriggers", strings.Join(*params.ConfigurationTriggers, ",")) + } + if params != nil && params.ConfigurationUrl != nil { + data.Set("ConfigurationUrl", *params.ConfigurationUrl) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &IpMessagingV2ServiceChannelChannelWebhook{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &IpMessagingV2ServiceChannelChannelWebhook{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateCredentialParams Optional parameters for the method 'UpdateCredential' type UpdateCredentialParams struct { - ApiKey *string `json:"ApiKey,omitempty"` - Certificate *string `json:"Certificate,omitempty"` + ApiKey *string `json:"ApiKey,omitempty"` + Certificate *string `json:"Certificate,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` - PrivateKey *string `json:"PrivateKey,omitempty"` - Sandbox *bool `json:"Sandbox,omitempty"` - Secret *string `json:"Secret,omitempty"` + PrivateKey *string `json:"PrivateKey,omitempty"` + Sandbox *bool `json:"Sandbox,omitempty"` + Secret *string `json:"Secret,omitempty"` } /* * UpdateCredential Method for UpdateCredential * @param Sid * @param optional nil or *UpdateCredentialParams - Optional Parameters: -* @param "ApiKey" (string) - -* @param "Certificate" (string) - -* @param "FriendlyName" (string) - -* @param "PrivateKey" (string) - -* @param "Sandbox" (bool) - -* @param "Secret" (string) - +* @param "ApiKey" (string) - +* @param "Certificate" (string) - +* @param "FriendlyName" (string) - +* @param "PrivateKey" (string) - +* @param "Sandbox" (bool) - +* @param "Secret" (string) - * @return IpMessagingV2Credential -*/ + */ func (c *DefaultApiService) UpdateCredential(Sid string, params *UpdateCredentialParams) (*IpMessagingV2Credential, error) { - path := "/v2/Credentials/{Sid}" + path := "/v2/Credentials/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.ApiKey != nil { - data.Set("ApiKey", *params.ApiKey) -} - if params != nil && params.Certificate != nil { - data.Set("Certificate", *params.Certificate) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.PrivateKey != nil { - data.Set("PrivateKey", *params.PrivateKey) -} - if params != nil && params.Sandbox != nil { - data.Set("Sandbox", fmt.Sprint(*params.Sandbox)) -} - if params != nil && params.Secret != nil { - data.Set("Secret", *params.Secret) -} + data := url.Values{} + headers := 0 + if params != nil && params.ApiKey != nil { + data.Set("ApiKey", *params.ApiKey) + } + if params != nil && params.Certificate != nil { + data.Set("Certificate", *params.Certificate) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.PrivateKey != nil { + data.Set("PrivateKey", *params.PrivateKey) + } + if params != nil && params.Sandbox != nil { + data.Set("Sandbox", fmt.Sprint(*params.Sandbox)) + } + if params != nil && params.Secret != nil { + data.Set("Secret", *params.Secret) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &IpMessagingV2Credential{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &IpMessagingV2Credential{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateMemberParams Optional parameters for the method 'UpdateMember' type UpdateMemberParams struct { - XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` LastConsumptionTimestamp *time.Time `json:"LastConsumptionTimestamp,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` } /* @@ -2011,69 +1974,70 @@ type UpdateMemberParams struct { * @param Sid * @param optional nil or *UpdateMemberParams - Optional Parameters: * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header -* @param "Attributes" (string) - -* @param "DateCreated" (time.Time) - -* @param "DateUpdated" (time.Time) - -* @param "LastConsumedMessageIndex" (*int32) - -* @param "LastConsumptionTimestamp" (time.Time) - -* @param "RoleSid" (string) - +* @param "Attributes" (string) - +* @param "DateCreated" (time.Time) - +* @param "DateUpdated" (time.Time) - +* @param "LastConsumedMessageIndex" (*int32) - +* @param "LastConsumptionTimestamp" (time.Time) - +* @param "RoleSid" (string) - * @return IpMessagingV2ServiceChannelMember -*/ + */ func (c *DefaultApiService) UpdateMember(ServiceSid string, ChannelSid string, Sid string, params *UpdateMemberParams) (*IpMessagingV2ServiceChannelMember, error) { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}" + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) -} - if params != nil && params.DateCreated != nil { - data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) -} - if params != nil && params.DateUpdated != nil { - data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) -} - if params != nil && params.LastConsumedMessageIndex != nil { - data.Set("LastConsumedMessageIndex", fmt.Sprint(*params.LastConsumedMessageIndex)) -} - if params != nil && params.LastConsumptionTimestamp != nil { - data.Set("LastConsumptionTimestamp", fmt.Sprint(*params.LastConsumptionTimestamp)) -} - if params != nil && params.RoleSid != nil { - data.Set("RoleSid", *params.RoleSid) -} + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) + } + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) + } + if params != nil && params.LastConsumedMessageIndex != nil { + data.Set("LastConsumedMessageIndex", fmt.Sprint(*params.LastConsumedMessageIndex)) + } + if params != nil && params.LastConsumptionTimestamp != nil { + data.Set("LastConsumptionTimestamp", fmt.Sprint(*params.LastConsumptionTimestamp)) + } + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) + } if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &IpMessagingV2ServiceChannelMember{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &IpMessagingV2ServiceChannelMember{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateMessageParams Optional parameters for the method 'UpdateMessage' type UpdateMessageParams struct { - XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - Body *string `json:"Body,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - From *string `json:"From,omitempty"` - LastUpdatedBy *string `json:"LastUpdatedBy,omitempty"` + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + Body *string `json:"Body,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + From *string `json:"From,omitempty"` + LastUpdatedBy *string `json:"LastUpdatedBy,omitempty"` } /* @@ -2083,60 +2047,61 @@ type UpdateMessageParams struct { * @param Sid * @param optional nil or *UpdateMessageParams - Optional Parameters: * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header -* @param "Attributes" (string) - -* @param "Body" (string) - -* @param "DateCreated" (time.Time) - -* @param "DateUpdated" (time.Time) - -* @param "From" (string) - -* @param "LastUpdatedBy" (string) - +* @param "Attributes" (string) - +* @param "Body" (string) - +* @param "DateCreated" (time.Time) - +* @param "DateUpdated" (time.Time) - +* @param "From" (string) - +* @param "LastUpdatedBy" (string) - * @return IpMessagingV2ServiceChannelMessage -*/ + */ func (c *DefaultApiService) UpdateMessage(ServiceSid string, ChannelSid string, Sid string, params *UpdateMessageParams) (*IpMessagingV2ServiceChannelMessage, error) { - path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}" + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) -} - if params != nil && params.Body != nil { - data.Set("Body", *params.Body) -} - if params != nil && params.DateCreated != nil { - data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) -} - if params != nil && params.DateUpdated != nil { - data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) -} - if params != nil && params.From != nil { - data.Set("From", *params.From) -} - if params != nil && params.LastUpdatedBy != nil { - data.Set("LastUpdatedBy", *params.LastUpdatedBy) -} + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.Body != nil { + data.Set("Body", *params.Body) + } + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) + } + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) + } + if params != nil && params.From != nil { + data.Set("From", *params.From) + } + if params != nil && params.LastUpdatedBy != nil { + data.Set("LastUpdatedBy", *params.LastUpdatedBy) + } if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &IpMessagingV2ServiceChannelMessage{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &IpMessagingV2ServiceChannelMessage{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateRoleParams Optional parameters for the method 'UpdateRole' type UpdateRoleParams struct { Permission *[]string `json:"Permission,omitempty"` @@ -2147,230 +2112,230 @@ type UpdateRoleParams struct { * @param ServiceSid * @param Sid * @param optional nil or *UpdateRoleParams - Optional Parameters: -* @param "Permission" ([]string) - +* @param "Permission" ([]string) - * @return IpMessagingV2ServiceRole -*/ + */ func (c *DefaultApiService) UpdateRole(ServiceSid string, Sid string, params *UpdateRoleParams) (*IpMessagingV2ServiceRole, error) { - path := "/v2/Services/{ServiceSid}/Roles/{Sid}" + path := "/v2/Services/{ServiceSid}/Roles/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Permission != nil { - data.Set("Permission", strings.Join(*params.Permission, ",")) -} + data := url.Values{} + headers := 0 + if params != nil && params.Permission != nil { + data.Set("Permission", strings.Join(*params.Permission, ",")) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &IpMessagingV2ServiceRole{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &IpMessagingV2ServiceRole{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateServiceParams Optional parameters for the method 'UpdateService' type UpdateServiceParams struct { - ConsumptionReportInterval *int32 `json:"ConsumptionReportInterval,omitempty"` - DefaultChannelCreatorRoleSid *string `json:"DefaultChannelCreatorRoleSid,omitempty"` - DefaultChannelRoleSid *string `json:"DefaultChannelRoleSid,omitempty"` - DefaultServiceRoleSid *string `json:"DefaultServiceRoleSid,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - LimitsChannelMembers *int32 `json:"Limits.ChannelMembers,omitempty"` - LimitsUserChannels *int32 `json:"Limits.UserChannels,omitempty"` - MediaCompatibilityMessage *string `json:"Media.CompatibilityMessage,omitempty"` - NotificationsAddedToChannelEnabled *bool `json:"Notifications.AddedToChannel.Enabled,omitempty"` - NotificationsAddedToChannelSound *string `json:"Notifications.AddedToChannel.Sound,omitempty"` - NotificationsAddedToChannelTemplate *string `json:"Notifications.AddedToChannel.Template,omitempty"` - NotificationsInvitedToChannelEnabled *bool `json:"Notifications.InvitedToChannel.Enabled,omitempty"` - NotificationsInvitedToChannelSound *string `json:"Notifications.InvitedToChannel.Sound,omitempty"` - NotificationsInvitedToChannelTemplate *string `json:"Notifications.InvitedToChannel.Template,omitempty"` - NotificationsLogEnabled *bool `json:"Notifications.LogEnabled,omitempty"` - NotificationsNewMessageBadgeCountEnabled *bool `json:"Notifications.NewMessage.BadgeCountEnabled,omitempty"` - NotificationsNewMessageEnabled *bool `json:"Notifications.NewMessage.Enabled,omitempty"` - NotificationsNewMessageSound *string `json:"Notifications.NewMessage.Sound,omitempty"` - NotificationsNewMessageTemplate *string `json:"Notifications.NewMessage.Template,omitempty"` - NotificationsRemovedFromChannelEnabled *bool `json:"Notifications.RemovedFromChannel.Enabled,omitempty"` - NotificationsRemovedFromChannelSound *string `json:"Notifications.RemovedFromChannel.Sound,omitempty"` - NotificationsRemovedFromChannelTemplate *string `json:"Notifications.RemovedFromChannel.Template,omitempty"` - PostWebhookRetryCount *int32 `json:"PostWebhookRetryCount,omitempty"` - PostWebhookUrl *string `json:"PostWebhookUrl,omitempty"` - PreWebhookRetryCount *int32 `json:"PreWebhookRetryCount,omitempty"` - PreWebhookUrl *string `json:"PreWebhookUrl,omitempty"` - ReachabilityEnabled *bool `json:"ReachabilityEnabled,omitempty"` - ReadStatusEnabled *bool `json:"ReadStatusEnabled,omitempty"` - TypingIndicatorTimeout *int32 `json:"TypingIndicatorTimeout,omitempty"` - WebhookFilters *[]string `json:"WebhookFilters,omitempty"` - WebhookMethod *string `json:"WebhookMethod,omitempty"` + ConsumptionReportInterval *int32 `json:"ConsumptionReportInterval,omitempty"` + DefaultChannelCreatorRoleSid *string `json:"DefaultChannelCreatorRoleSid,omitempty"` + DefaultChannelRoleSid *string `json:"DefaultChannelRoleSid,omitempty"` + DefaultServiceRoleSid *string `json:"DefaultServiceRoleSid,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + LimitsChannelMembers *int32 `json:"Limits.ChannelMembers,omitempty"` + LimitsUserChannels *int32 `json:"Limits.UserChannels,omitempty"` + MediaCompatibilityMessage *string `json:"Media.CompatibilityMessage,omitempty"` + NotificationsAddedToChannelEnabled *bool `json:"Notifications.AddedToChannel.Enabled,omitempty"` + NotificationsAddedToChannelSound *string `json:"Notifications.AddedToChannel.Sound,omitempty"` + NotificationsAddedToChannelTemplate *string `json:"Notifications.AddedToChannel.Template,omitempty"` + NotificationsInvitedToChannelEnabled *bool `json:"Notifications.InvitedToChannel.Enabled,omitempty"` + NotificationsInvitedToChannelSound *string `json:"Notifications.InvitedToChannel.Sound,omitempty"` + NotificationsInvitedToChannelTemplate *string `json:"Notifications.InvitedToChannel.Template,omitempty"` + NotificationsLogEnabled *bool `json:"Notifications.LogEnabled,omitempty"` + NotificationsNewMessageBadgeCountEnabled *bool `json:"Notifications.NewMessage.BadgeCountEnabled,omitempty"` + NotificationsNewMessageEnabled *bool `json:"Notifications.NewMessage.Enabled,omitempty"` + NotificationsNewMessageSound *string `json:"Notifications.NewMessage.Sound,omitempty"` + NotificationsNewMessageTemplate *string `json:"Notifications.NewMessage.Template,omitempty"` + NotificationsRemovedFromChannelEnabled *bool `json:"Notifications.RemovedFromChannel.Enabled,omitempty"` + NotificationsRemovedFromChannelSound *string `json:"Notifications.RemovedFromChannel.Sound,omitempty"` + NotificationsRemovedFromChannelTemplate *string `json:"Notifications.RemovedFromChannel.Template,omitempty"` + PostWebhookRetryCount *int32 `json:"PostWebhookRetryCount,omitempty"` + PostWebhookUrl *string `json:"PostWebhookUrl,omitempty"` + PreWebhookRetryCount *int32 `json:"PreWebhookRetryCount,omitempty"` + PreWebhookUrl *string `json:"PreWebhookUrl,omitempty"` + ReachabilityEnabled *bool `json:"ReachabilityEnabled,omitempty"` + ReadStatusEnabled *bool `json:"ReadStatusEnabled,omitempty"` + TypingIndicatorTimeout *int32 `json:"TypingIndicatorTimeout,omitempty"` + WebhookFilters *[]string `json:"WebhookFilters,omitempty"` + WebhookMethod *string `json:"WebhookMethod,omitempty"` } /* * UpdateService Method for UpdateService * @param Sid * @param optional nil or *UpdateServiceParams - Optional Parameters: -* @param "ConsumptionReportInterval" (int32) - -* @param "DefaultChannelCreatorRoleSid" (string) - -* @param "DefaultChannelRoleSid" (string) - -* @param "DefaultServiceRoleSid" (string) - -* @param "FriendlyName" (string) - -* @param "LimitsChannelMembers" (int32) - -* @param "LimitsUserChannels" (int32) - -* @param "MediaCompatibilityMessage" (string) - -* @param "NotificationsAddedToChannelEnabled" (bool) - -* @param "NotificationsAddedToChannelSound" (string) - -* @param "NotificationsAddedToChannelTemplate" (string) - -* @param "NotificationsInvitedToChannelEnabled" (bool) - -* @param "NotificationsInvitedToChannelSound" (string) - -* @param "NotificationsInvitedToChannelTemplate" (string) - -* @param "NotificationsLogEnabled" (bool) - -* @param "NotificationsNewMessageBadgeCountEnabled" (bool) - -* @param "NotificationsNewMessageEnabled" (bool) - -* @param "NotificationsNewMessageSound" (string) - -* @param "NotificationsNewMessageTemplate" (string) - -* @param "NotificationsRemovedFromChannelEnabled" (bool) - -* @param "NotificationsRemovedFromChannelSound" (string) - -* @param "NotificationsRemovedFromChannelTemplate" (string) - -* @param "PostWebhookRetryCount" (int32) - -* @param "PostWebhookUrl" (string) - -* @param "PreWebhookRetryCount" (int32) - -* @param "PreWebhookUrl" (string) - -* @param "ReachabilityEnabled" (bool) - -* @param "ReadStatusEnabled" (bool) - -* @param "TypingIndicatorTimeout" (int32) - -* @param "WebhookFilters" ([]string) - -* @param "WebhookMethod" (string) - +* @param "ConsumptionReportInterval" (int32) - +* @param "DefaultChannelCreatorRoleSid" (string) - +* @param "DefaultChannelRoleSid" (string) - +* @param "DefaultServiceRoleSid" (string) - +* @param "FriendlyName" (string) - +* @param "LimitsChannelMembers" (int32) - +* @param "LimitsUserChannels" (int32) - +* @param "MediaCompatibilityMessage" (string) - +* @param "NotificationsAddedToChannelEnabled" (bool) - +* @param "NotificationsAddedToChannelSound" (string) - +* @param "NotificationsAddedToChannelTemplate" (string) - +* @param "NotificationsInvitedToChannelEnabled" (bool) - +* @param "NotificationsInvitedToChannelSound" (string) - +* @param "NotificationsInvitedToChannelTemplate" (string) - +* @param "NotificationsLogEnabled" (bool) - +* @param "NotificationsNewMessageBadgeCountEnabled" (bool) - +* @param "NotificationsNewMessageEnabled" (bool) - +* @param "NotificationsNewMessageSound" (string) - +* @param "NotificationsNewMessageTemplate" (string) - +* @param "NotificationsRemovedFromChannelEnabled" (bool) - +* @param "NotificationsRemovedFromChannelSound" (string) - +* @param "NotificationsRemovedFromChannelTemplate" (string) - +* @param "PostWebhookRetryCount" (int32) - +* @param "PostWebhookUrl" (string) - +* @param "PreWebhookRetryCount" (int32) - +* @param "PreWebhookUrl" (string) - +* @param "ReachabilityEnabled" (bool) - +* @param "ReadStatusEnabled" (bool) - +* @param "TypingIndicatorTimeout" (int32) - +* @param "WebhookFilters" ([]string) - +* @param "WebhookMethod" (string) - * @return IpMessagingV2Service -*/ + */ func (c *DefaultApiService) UpdateService(Sid string, params *UpdateServiceParams) (*IpMessagingV2Service, error) { - path := "/v2/Services/{Sid}" + path := "/v2/Services/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.ConsumptionReportInterval != nil { - data.Set("ConsumptionReportInterval", fmt.Sprint(*params.ConsumptionReportInterval)) -} - if params != nil && params.DefaultChannelCreatorRoleSid != nil { - data.Set("DefaultChannelCreatorRoleSid", *params.DefaultChannelCreatorRoleSid) -} - if params != nil && params.DefaultChannelRoleSid != nil { - data.Set("DefaultChannelRoleSid", *params.DefaultChannelRoleSid) -} - if params != nil && params.DefaultServiceRoleSid != nil { - data.Set("DefaultServiceRoleSid", *params.DefaultServiceRoleSid) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.LimitsChannelMembers != nil { - data.Set("LimitsChannelMembers", fmt.Sprint(*params.LimitsChannelMembers)) -} - if params != nil && params.LimitsUserChannels != nil { - data.Set("LimitsUserChannels", fmt.Sprint(*params.LimitsUserChannels)) -} - if params != nil && params.MediaCompatibilityMessage != nil { - data.Set("MediaCompatibilityMessage", *params.MediaCompatibilityMessage) -} - if params != nil && params.NotificationsAddedToChannelEnabled != nil { - data.Set("NotificationsAddedToChannelEnabled", fmt.Sprint(*params.NotificationsAddedToChannelEnabled)) -} - if params != nil && params.NotificationsAddedToChannelSound != nil { - data.Set("NotificationsAddedToChannelSound", *params.NotificationsAddedToChannelSound) -} - if params != nil && params.NotificationsAddedToChannelTemplate != nil { - data.Set("NotificationsAddedToChannelTemplate", *params.NotificationsAddedToChannelTemplate) -} - if params != nil && params.NotificationsInvitedToChannelEnabled != nil { - data.Set("NotificationsInvitedToChannelEnabled", fmt.Sprint(*params.NotificationsInvitedToChannelEnabled)) -} - if params != nil && params.NotificationsInvitedToChannelSound != nil { - data.Set("NotificationsInvitedToChannelSound", *params.NotificationsInvitedToChannelSound) -} - if params != nil && params.NotificationsInvitedToChannelTemplate != nil { - data.Set("NotificationsInvitedToChannelTemplate", *params.NotificationsInvitedToChannelTemplate) -} - if params != nil && params.NotificationsLogEnabled != nil { - data.Set("NotificationsLogEnabled", fmt.Sprint(*params.NotificationsLogEnabled)) -} - if params != nil && params.NotificationsNewMessageBadgeCountEnabled != nil { - data.Set("NotificationsNewMessageBadgeCountEnabled", fmt.Sprint(*params.NotificationsNewMessageBadgeCountEnabled)) -} - if params != nil && params.NotificationsNewMessageEnabled != nil { - data.Set("NotificationsNewMessageEnabled", fmt.Sprint(*params.NotificationsNewMessageEnabled)) -} - if params != nil && params.NotificationsNewMessageSound != nil { - data.Set("NotificationsNewMessageSound", *params.NotificationsNewMessageSound) -} - if params != nil && params.NotificationsNewMessageTemplate != nil { - data.Set("NotificationsNewMessageTemplate", *params.NotificationsNewMessageTemplate) -} - if params != nil && params.NotificationsRemovedFromChannelEnabled != nil { - data.Set("NotificationsRemovedFromChannelEnabled", fmt.Sprint(*params.NotificationsRemovedFromChannelEnabled)) -} - if params != nil && params.NotificationsRemovedFromChannelSound != nil { - data.Set("NotificationsRemovedFromChannelSound", *params.NotificationsRemovedFromChannelSound) -} - if params != nil && params.NotificationsRemovedFromChannelTemplate != nil { - data.Set("NotificationsRemovedFromChannelTemplate", *params.NotificationsRemovedFromChannelTemplate) -} - if params != nil && params.PostWebhookRetryCount != nil { - data.Set("PostWebhookRetryCount", fmt.Sprint(*params.PostWebhookRetryCount)) -} - if params != nil && params.PostWebhookUrl != nil { - data.Set("PostWebhookUrl", *params.PostWebhookUrl) -} - if params != nil && params.PreWebhookRetryCount != nil { - data.Set("PreWebhookRetryCount", fmt.Sprint(*params.PreWebhookRetryCount)) -} - if params != nil && params.PreWebhookUrl != nil { - data.Set("PreWebhookUrl", *params.PreWebhookUrl) -} - if params != nil && params.ReachabilityEnabled != nil { - data.Set("ReachabilityEnabled", fmt.Sprint(*params.ReachabilityEnabled)) -} - if params != nil && params.ReadStatusEnabled != nil { - data.Set("ReadStatusEnabled", fmt.Sprint(*params.ReadStatusEnabled)) -} - if params != nil && params.TypingIndicatorTimeout != nil { - data.Set("TypingIndicatorTimeout", fmt.Sprint(*params.TypingIndicatorTimeout)) -} - if params != nil && params.WebhookFilters != nil { - data.Set("WebhookFilters", strings.Join(*params.WebhookFilters, ",")) -} - if params != nil && params.WebhookMethod != nil { - data.Set("WebhookMethod", *params.WebhookMethod) -} + data := url.Values{} + headers := 0 + if params != nil && params.ConsumptionReportInterval != nil { + data.Set("ConsumptionReportInterval", fmt.Sprint(*params.ConsumptionReportInterval)) + } + if params != nil && params.DefaultChannelCreatorRoleSid != nil { + data.Set("DefaultChannelCreatorRoleSid", *params.DefaultChannelCreatorRoleSid) + } + if params != nil && params.DefaultChannelRoleSid != nil { + data.Set("DefaultChannelRoleSid", *params.DefaultChannelRoleSid) + } + if params != nil && params.DefaultServiceRoleSid != nil { + data.Set("DefaultServiceRoleSid", *params.DefaultServiceRoleSid) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.LimitsChannelMembers != nil { + data.Set("LimitsChannelMembers", fmt.Sprint(*params.LimitsChannelMembers)) + } + if params != nil && params.LimitsUserChannels != nil { + data.Set("LimitsUserChannels", fmt.Sprint(*params.LimitsUserChannels)) + } + if params != nil && params.MediaCompatibilityMessage != nil { + data.Set("MediaCompatibilityMessage", *params.MediaCompatibilityMessage) + } + if params != nil && params.NotificationsAddedToChannelEnabled != nil { + data.Set("NotificationsAddedToChannelEnabled", fmt.Sprint(*params.NotificationsAddedToChannelEnabled)) + } + if params != nil && params.NotificationsAddedToChannelSound != nil { + data.Set("NotificationsAddedToChannelSound", *params.NotificationsAddedToChannelSound) + } + if params != nil && params.NotificationsAddedToChannelTemplate != nil { + data.Set("NotificationsAddedToChannelTemplate", *params.NotificationsAddedToChannelTemplate) + } + if params != nil && params.NotificationsInvitedToChannelEnabled != nil { + data.Set("NotificationsInvitedToChannelEnabled", fmt.Sprint(*params.NotificationsInvitedToChannelEnabled)) + } + if params != nil && params.NotificationsInvitedToChannelSound != nil { + data.Set("NotificationsInvitedToChannelSound", *params.NotificationsInvitedToChannelSound) + } + if params != nil && params.NotificationsInvitedToChannelTemplate != nil { + data.Set("NotificationsInvitedToChannelTemplate", *params.NotificationsInvitedToChannelTemplate) + } + if params != nil && params.NotificationsLogEnabled != nil { + data.Set("NotificationsLogEnabled", fmt.Sprint(*params.NotificationsLogEnabled)) + } + if params != nil && params.NotificationsNewMessageBadgeCountEnabled != nil { + data.Set("NotificationsNewMessageBadgeCountEnabled", fmt.Sprint(*params.NotificationsNewMessageBadgeCountEnabled)) + } + if params != nil && params.NotificationsNewMessageEnabled != nil { + data.Set("NotificationsNewMessageEnabled", fmt.Sprint(*params.NotificationsNewMessageEnabled)) + } + if params != nil && params.NotificationsNewMessageSound != nil { + data.Set("NotificationsNewMessageSound", *params.NotificationsNewMessageSound) + } + if params != nil && params.NotificationsNewMessageTemplate != nil { + data.Set("NotificationsNewMessageTemplate", *params.NotificationsNewMessageTemplate) + } + if params != nil && params.NotificationsRemovedFromChannelEnabled != nil { + data.Set("NotificationsRemovedFromChannelEnabled", fmt.Sprint(*params.NotificationsRemovedFromChannelEnabled)) + } + if params != nil && params.NotificationsRemovedFromChannelSound != nil { + data.Set("NotificationsRemovedFromChannelSound", *params.NotificationsRemovedFromChannelSound) + } + if params != nil && params.NotificationsRemovedFromChannelTemplate != nil { + data.Set("NotificationsRemovedFromChannelTemplate", *params.NotificationsRemovedFromChannelTemplate) + } + if params != nil && params.PostWebhookRetryCount != nil { + data.Set("PostWebhookRetryCount", fmt.Sprint(*params.PostWebhookRetryCount)) + } + if params != nil && params.PostWebhookUrl != nil { + data.Set("PostWebhookUrl", *params.PostWebhookUrl) + } + if params != nil && params.PreWebhookRetryCount != nil { + data.Set("PreWebhookRetryCount", fmt.Sprint(*params.PreWebhookRetryCount)) + } + if params != nil && params.PreWebhookUrl != nil { + data.Set("PreWebhookUrl", *params.PreWebhookUrl) + } + if params != nil && params.ReachabilityEnabled != nil { + data.Set("ReachabilityEnabled", fmt.Sprint(*params.ReachabilityEnabled)) + } + if params != nil && params.ReadStatusEnabled != nil { + data.Set("ReadStatusEnabled", fmt.Sprint(*params.ReadStatusEnabled)) + } + if params != nil && params.TypingIndicatorTimeout != nil { + data.Set("TypingIndicatorTimeout", fmt.Sprint(*params.TypingIndicatorTimeout)) + } + if params != nil && params.WebhookFilters != nil { + data.Set("WebhookFilters", strings.Join(*params.WebhookFilters, ",")) + } + if params != nil && params.WebhookMethod != nil { + data.Set("WebhookMethod", *params.WebhookMethod) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &IpMessagingV2Service{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &IpMessagingV2Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateUserParams Optional parameters for the method 'UpdateUser' type UpdateUserParams struct { XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` } /* @@ -2379,52 +2344,53 @@ type UpdateUserParams struct { * @param Sid * @param optional nil or *UpdateUserParams - Optional Parameters: * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header -* @param "Attributes" (string) - -* @param "FriendlyName" (string) - -* @param "RoleSid" (string) - +* @param "Attributes" (string) - +* @param "FriendlyName" (string) - +* @param "RoleSid" (string) - * @return IpMessagingV2ServiceUser -*/ + */ func (c *DefaultApiService) UpdateUser(ServiceSid string, Sid string, params *UpdateUserParams) (*IpMessagingV2ServiceUser, error) { - path := "/v2/Services/{ServiceSid}/Users/{Sid}" + path := "/v2/Services/{ServiceSid}/Users/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.RoleSid != nil { - data.Set("RoleSid", *params.RoleSid) -} + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) + } if params != nil && params.XTwilioWebhookEnabled != nil { headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &IpMessagingV2ServiceUser{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &IpMessagingV2ServiceUser{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateUserChannelParams Optional parameters for the method 'UpdateUserChannel' type UpdateUserChannelParams struct { - LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` + LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` LastConsumptionTimestamp *time.Time `json:"LastConsumptionTimestamp,omitempty"` - NotificationLevel *string `json:"NotificationLevel,omitempty"` + NotificationLevel *string `json:"NotificationLevel,omitempty"` } /* @@ -2433,42 +2399,41 @@ type UpdateUserChannelParams struct { * @param UserSid * @param ChannelSid * @param optional nil or *UpdateUserChannelParams - Optional Parameters: -* @param "LastConsumedMessageIndex" (*int32) - -* @param "LastConsumptionTimestamp" (time.Time) - -* @param "NotificationLevel" (string) - +* @param "LastConsumedMessageIndex" (*int32) - +* @param "LastConsumptionTimestamp" (time.Time) - +* @param "NotificationLevel" (string) - * @return IpMessagingV2ServiceUserUserChannel -*/ + */ func (c *DefaultApiService) UpdateUserChannel(ServiceSid string, UserSid string, ChannelSid string, params *UpdateUserChannelParams) (*IpMessagingV2ServiceUserUserChannel, error) { - path := "/v2/Services/{ServiceSid}/Users/{UserSid}/Channels/{ChannelSid}" + path := "/v2/Services/{ServiceSid}/Users/{UserSid}/Channels/{ChannelSid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"UserSid"+"}", UserSid, -1) path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.LastConsumedMessageIndex != nil { - data.Set("LastConsumedMessageIndex", fmt.Sprint(*params.LastConsumedMessageIndex)) -} - if params != nil && params.LastConsumptionTimestamp != nil { - data.Set("LastConsumptionTimestamp", fmt.Sprint(*params.LastConsumptionTimestamp)) -} - if params != nil && params.NotificationLevel != nil { - data.Set("NotificationLevel", *params.NotificationLevel) -} + data := url.Values{} + headers := 0 + if params != nil && params.LastConsumedMessageIndex != nil { + data.Set("LastConsumedMessageIndex", fmt.Sprint(*params.LastConsumedMessageIndex)) + } + if params != nil && params.LastConsumptionTimestamp != nil { + data.Set("LastConsumptionTimestamp", fmt.Sprint(*params.LastConsumptionTimestamp)) + } + if params != nil && params.NotificationLevel != nil { + data.Set("NotificationLevel", *params.NotificationLevel) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &IpMessagingV2ServiceUserUserChannel{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &IpMessagingV2ServiceUserUserChannel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } diff --git a/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_credential.go b/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_credential.go index c4b0a832a..640604592 100644 --- a/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_credential.go +++ b/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_credential.go @@ -1,26 +1,28 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // IpMessagingV2Credential struct for IpMessagingV2Credential type IpMessagingV2Credential struct { - AccountSid *string `json:"AccountSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Sandbox *string `json:"Sandbox,omitempty"` - Sid *string `json:"Sid,omitempty"` - Type *string `json:"Type,omitempty"` - Url *string `json:"Url,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Sandbox *string `json:"Sandbox,omitempty"` + Sid *string `json:"Sid,omitempty"` + Type *string `json:"Type,omitempty"` + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service.go b/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service.go index bad97024b..54f7021fc 100644 --- a/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service.go +++ b/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service.go @@ -1,41 +1,43 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // IpMessagingV2Service struct for IpMessagingV2Service type IpMessagingV2Service struct { - AccountSid *string `json:"AccountSid,omitempty"` - ConsumptionReportInterval *int32 `json:"ConsumptionReportInterval,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - DefaultChannelCreatorRoleSid *string `json:"DefaultChannelCreatorRoleSid,omitempty"` - DefaultChannelRoleSid *string `json:"DefaultChannelRoleSid,omitempty"` - DefaultServiceRoleSid *string `json:"DefaultServiceRoleSid,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Limits *map[string]interface{} `json:"Limits,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - Media *map[string]interface{} `json:"Media,omitempty"` - Notifications *map[string]interface{} `json:"Notifications,omitempty"` - PostWebhookRetryCount *int32 `json:"PostWebhookRetryCount,omitempty"` - PostWebhookUrl *string `json:"PostWebhookUrl,omitempty"` - PreWebhookRetryCount *int32 `json:"PreWebhookRetryCount,omitempty"` - PreWebhookUrl *string `json:"PreWebhookUrl,omitempty"` - ReachabilityEnabled *bool `json:"ReachabilityEnabled,omitempty"` - ReadStatusEnabled *bool `json:"ReadStatusEnabled,omitempty"` - Sid *string `json:"Sid,omitempty"` - TypingIndicatorTimeout *int32 `json:"TypingIndicatorTimeout,omitempty"` - Url *string `json:"Url,omitempty"` - WebhookFilters *[]string `json:"WebhookFilters,omitempty"` - WebhookMethod *string `json:"WebhookMethod,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` + ConsumptionReportInterval *int32 `json:"ConsumptionReportInterval,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + DefaultChannelCreatorRoleSid *string `json:"DefaultChannelCreatorRoleSid,omitempty"` + DefaultChannelRoleSid *string `json:"DefaultChannelRoleSid,omitempty"` + DefaultServiceRoleSid *string `json:"DefaultServiceRoleSid,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Limits *map[string]interface{} `json:"Limits,omitempty"` + Links *map[string]interface{} `json:"Links,omitempty"` + Media *map[string]interface{} `json:"Media,omitempty"` + Notifications *map[string]interface{} `json:"Notifications,omitempty"` + PostWebhookRetryCount *int32 `json:"PostWebhookRetryCount,omitempty"` + PostWebhookUrl *string `json:"PostWebhookUrl,omitempty"` + PreWebhookRetryCount *int32 `json:"PreWebhookRetryCount,omitempty"` + PreWebhookUrl *string `json:"PreWebhookUrl,omitempty"` + ReachabilityEnabled *bool `json:"ReachabilityEnabled,omitempty"` + ReadStatusEnabled *bool `json:"ReadStatusEnabled,omitempty"` + Sid *string `json:"Sid,omitempty"` + TypingIndicatorTimeout *int32 `json:"TypingIndicatorTimeout,omitempty"` + Url *string `json:"Url,omitempty"` + WebhookFilters *[]string `json:"WebhookFilters,omitempty"` + WebhookMethod *string `json:"WebhookMethod,omitempty"` } diff --git a/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_binding.go b/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_binding.go index 101adc23b..cac16feda 100644 --- a/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_binding.go +++ b/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_binding.go @@ -1,30 +1,32 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // IpMessagingV2ServiceBinding struct for IpMessagingV2ServiceBinding type IpMessagingV2ServiceBinding struct { - AccountSid *string `json:"AccountSid,omitempty"` - BindingType *string `json:"BindingType,omitempty"` - CredentialSid *string `json:"CredentialSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Endpoint *string `json:"Endpoint,omitempty"` - Identity *string `json:"Identity,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - MessageTypes *[]string `json:"MessageTypes,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` + BindingType *string `json:"BindingType,omitempty"` + CredentialSid *string `json:"CredentialSid,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + Endpoint *string `json:"Endpoint,omitempty"` + Identity *string `json:"Identity,omitempty"` + Links *map[string]interface{} `json:"Links,omitempty"` + MessageTypes *[]string `json:"MessageTypes,omitempty"` + ServiceSid *string `json:"ServiceSid,omitempty"` + Sid *string `json:"Sid,omitempty"` + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_channel.go b/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_channel.go index c6a2607bf..372267ec5 100644 --- a/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_channel.go +++ b/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_channel.go @@ -1,32 +1,34 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // IpMessagingV2ServiceChannel struct for IpMessagingV2ServiceChannel type IpMessagingV2ServiceChannel struct { - AccountSid *string `json:"AccountSid,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - CreatedBy *string `json:"CreatedBy,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - MembersCount *int32 `json:"MembersCount,omitempty"` - MessagesCount *int32 `json:"MessagesCount,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Type *string `json:"Type,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` - Url *string `json:"Url,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + CreatedBy *string `json:"CreatedBy,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Links *map[string]interface{} `json:"Links,omitempty"` + MembersCount *int32 `json:"MembersCount,omitempty"` + MessagesCount *int32 `json:"MessagesCount,omitempty"` + ServiceSid *string `json:"ServiceSid,omitempty"` + Sid *string `json:"Sid,omitempty"` + Type *string `json:"Type,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_channel_channel_webhook.go b/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_channel_channel_webhook.go index 03122da47..7af76adcc 100644 --- a/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_channel_channel_webhook.go +++ b/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_channel_channel_webhook.go @@ -1,27 +1,29 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // IpMessagingV2ServiceChannelChannelWebhook struct for IpMessagingV2ServiceChannelChannelWebhook type IpMessagingV2ServiceChannelChannelWebhook struct { - AccountSid *string `json:"AccountSid,omitempty"` - ChannelSid *string `json:"ChannelSid,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` + ChannelSid *string `json:"ChannelSid,omitempty"` Configuration *map[string]interface{} `json:"Configuration,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Type *string `json:"Type,omitempty"` - Url *string `json:"Url,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + ServiceSid *string `json:"ServiceSid,omitempty"` + Sid *string `json:"Sid,omitempty"` + Type *string `json:"Type,omitempty"` + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_channel_invite.go b/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_channel_invite.go index ea287ac70..a8f469083 100644 --- a/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_channel_invite.go +++ b/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_channel_invite.go @@ -1,28 +1,30 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // IpMessagingV2ServiceChannelInvite struct for IpMessagingV2ServiceChannelInvite type IpMessagingV2ServiceChannelInvite struct { - AccountSid *string `json:"AccountSid,omitempty"` - ChannelSid *string `json:"ChannelSid,omitempty"` - CreatedBy *string `json:"CreatedBy,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` + ChannelSid *string `json:"ChannelSid,omitempty"` + CreatedBy *string `json:"CreatedBy,omitempty"` DateCreated *time.Time `json:"DateCreated,omitempty"` DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Identity *string `json:"Identity,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` + Identity *string `json:"Identity,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` + ServiceSid *string `json:"ServiceSid,omitempty"` + Sid *string `json:"Sid,omitempty"` + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_channel_member.go b/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_channel_member.go index 4f4124965..e0aca20e8 100644 --- a/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_channel_member.go +++ b/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_channel_member.go @@ -1,30 +1,32 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // IpMessagingV2ServiceChannelMember struct for IpMessagingV2ServiceChannelMember type IpMessagingV2ServiceChannelMember struct { - AccountSid *string `json:"AccountSid,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - ChannelSid *string `json:"ChannelSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Identity *string `json:"Identity,omitempty"` - LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + ChannelSid *string `json:"ChannelSid,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + Identity *string `json:"Identity,omitempty"` + LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` LastConsumptionTimestamp *time.Time `json:"LastConsumptionTimestamp,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` + ServiceSid *string `json:"ServiceSid,omitempty"` + Sid *string `json:"Sid,omitempty"` + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_channel_message.go b/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_channel_message.go index c4ceef32e..1ed268652 100644 --- a/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_channel_message.go +++ b/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_channel_message.go @@ -1,34 +1,36 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // IpMessagingV2ServiceChannelMessage struct for IpMessagingV2ServiceChannelMessage type IpMessagingV2ServiceChannelMessage struct { - AccountSid *string `json:"AccountSid,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - Body *string `json:"Body,omitempty"` - ChannelSid *string `json:"ChannelSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - From *string `json:"From,omitempty"` - Index *int32 `json:"Index,omitempty"` - LastUpdatedBy *string `json:"LastUpdatedBy,omitempty"` - Media *map[string]interface{} `json:"Media,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - To *string `json:"To,omitempty"` - Type *string `json:"Type,omitempty"` - Url *string `json:"Url,omitempty"` - WasEdited *bool `json:"WasEdited,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + Body *string `json:"Body,omitempty"` + ChannelSid *string `json:"ChannelSid,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + From *string `json:"From,omitempty"` + Index *int32 `json:"Index,omitempty"` + LastUpdatedBy *string `json:"LastUpdatedBy,omitempty"` + Media *map[string]interface{} `json:"Media,omitempty"` + ServiceSid *string `json:"ServiceSid,omitempty"` + Sid *string `json:"Sid,omitempty"` + To *string `json:"To,omitempty"` + Type *string `json:"Type,omitempty"` + Url *string `json:"Url,omitempty"` + WasEdited *bool `json:"WasEdited,omitempty"` } diff --git a/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_role.go b/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_role.go index 65ea834c1..9b0f5ca1d 100644 --- a/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_role.go +++ b/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_role.go @@ -1,27 +1,29 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // IpMessagingV2ServiceRole struct for IpMessagingV2ServiceRole type IpMessagingV2ServiceRole struct { - AccountSid *string `json:"AccountSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Permissions *[]string `json:"Permissions,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Type *string `json:"Type,omitempty"` - Url *string `json:"Url,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Permissions *[]string `json:"Permissions,omitempty"` + ServiceSid *string `json:"ServiceSid,omitempty"` + Sid *string `json:"Sid,omitempty"` + Type *string `json:"Type,omitempty"` + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_user.go b/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_user.go index 3598084d0..4d85c43a7 100644 --- a/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_user.go +++ b/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_user.go @@ -1,32 +1,34 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // IpMessagingV2ServiceUser struct for IpMessagingV2ServiceUser type IpMessagingV2ServiceUser struct { - AccountSid *string `json:"AccountSid,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Identity *string `json:"Identity,omitempty"` - IsNotifiable *bool `json:"IsNotifiable,omitempty"` - IsOnline *bool `json:"IsOnline,omitempty"` - JoinedChannelsCount *int32 `json:"JoinedChannelsCount,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - RoleSid *string `json:"RoleSid,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Identity *string `json:"Identity,omitempty"` + IsNotifiable *bool `json:"IsNotifiable,omitempty"` + IsOnline *bool `json:"IsOnline,omitempty"` + JoinedChannelsCount *int32 `json:"JoinedChannelsCount,omitempty"` + Links *map[string]interface{} `json:"Links,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` + ServiceSid *string `json:"ServiceSid,omitempty"` + Sid *string `json:"Sid,omitempty"` + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_user_user_binding.go b/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_user_user_binding.go index 3dc0fffc0..dc540913f 100644 --- a/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_user_user_binding.go +++ b/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_user_user_binding.go @@ -1,30 +1,32 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // IpMessagingV2ServiceUserUserBinding struct for IpMessagingV2ServiceUserUserBinding type IpMessagingV2ServiceUserUserBinding struct { - AccountSid *string `json:"AccountSid,omitempty"` - BindingType *string `json:"BindingType,omitempty"` - CredentialSid *string `json:"CredentialSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Endpoint *string `json:"Endpoint,omitempty"` - Identity *string `json:"Identity,omitempty"` - MessageTypes *[]string `json:"MessageTypes,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Sid *string `json:"Sid,omitempty"` - Url *string `json:"Url,omitempty"` - UserSid *string `json:"UserSid,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` + BindingType *string `json:"BindingType,omitempty"` + CredentialSid *string `json:"CredentialSid,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + Endpoint *string `json:"Endpoint,omitempty"` + Identity *string `json:"Identity,omitempty"` + MessageTypes *[]string `json:"MessageTypes,omitempty"` + ServiceSid *string `json:"ServiceSid,omitempty"` + Sid *string `json:"Sid,omitempty"` + Url *string `json:"Url,omitempty"` + UserSid *string `json:"UserSid,omitempty"` } diff --git a/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_user_user_channel.go b/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_user_user_channel.go index 324902da2..74c0d7f6c 100644 --- a/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_user_user_channel.go +++ b/twilio/rest/ip_messaging/v2/model_ip_messaging_v2_service_user_user_channel.go @@ -1,26 +1,27 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // IpMessagingV2ServiceUserUserChannel struct for IpMessagingV2ServiceUserUserChannel type IpMessagingV2ServiceUserUserChannel struct { - AccountSid *string `json:"AccountSid,omitempty"` - ChannelSid *string `json:"ChannelSid,omitempty"` - LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` - MemberSid *string `json:"MemberSid,omitempty"` - NotificationLevel *string `json:"NotificationLevel,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` - Status *string `json:"Status,omitempty"` - UnreadMessagesCount *int32 `json:"UnreadMessagesCount,omitempty"` - Url *string `json:"Url,omitempty"` - UserSid *string `json:"UserSid,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` + ChannelSid *string `json:"ChannelSid,omitempty"` + LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` + Links *map[string]interface{} `json:"Links,omitempty"` + MemberSid *string `json:"MemberSid,omitempty"` + NotificationLevel *string `json:"NotificationLevel,omitempty"` + ServiceSid *string `json:"ServiceSid,omitempty"` + Status *string `json:"Status,omitempty"` + UnreadMessagesCount *int32 `json:"UnreadMessagesCount,omitempty"` + Url *string `json:"Url,omitempty"` + UserSid *string `json:"UserSid,omitempty"` } diff --git a/twilio/rest/ip_messaging/v2/model_list_binding_response.go b/twilio/rest/ip_messaging/v2/model_list_binding_response.go index 55f9d4aa9..9b092965e 100644 --- a/twilio/rest/ip_messaging/v2/model_list_binding_response.go +++ b/twilio/rest/ip_messaging/v2/model_list_binding_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListBindingResponse struct for ListBindingResponse type ListBindingResponse struct { Bindings []IpMessagingV2ServiceBinding `json:"Bindings,omitempty"` - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/ip_messaging/v2/model_list_channel_response.go b/twilio/rest/ip_messaging/v2/model_list_channel_response.go index d5325b0d3..1204553ff 100644 --- a/twilio/rest/ip_messaging/v2/model_list_channel_response.go +++ b/twilio/rest/ip_messaging/v2/model_list_channel_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListChannelResponse struct for ListChannelResponse type ListChannelResponse struct { Channels []IpMessagingV2ServiceChannel `json:"Channels,omitempty"` - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/ip_messaging/v2/model_list_channel_webhook_response.go b/twilio/rest/ip_messaging/v2/model_list_channel_webhook_response.go index 9ceb0c04d..1c826e0e6 100644 --- a/twilio/rest/ip_messaging/v2/model_list_channel_webhook_response.go +++ b/twilio/rest/ip_messaging/v2/model_list_channel_webhook_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListChannelWebhookResponse struct for ListChannelWebhookResponse type ListChannelWebhookResponse struct { - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` Webhooks []IpMessagingV2ServiceChannelChannelWebhook `json:"Webhooks,omitempty"` } diff --git a/twilio/rest/ip_messaging/v2/model_list_credential_response.go b/twilio/rest/ip_messaging/v2/model_list_credential_response.go index 836f1296e..bc1448450 100644 --- a/twilio/rest/ip_messaging/v2/model_list_credential_response.go +++ b/twilio/rest/ip_messaging/v2/model_list_credential_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListCredentialResponse struct for ListCredentialResponse type ListCredentialResponse struct { - Credentials []IpMessagingV2Credential `json:"Credentials,omitempty"` - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Credentials []IpMessagingV2Credential `json:"Credentials,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/ip_messaging/v2/model_list_credential_response_meta.go b/twilio/rest/ip_messaging/v2/model_list_credential_response_meta.go index 64bed8506..87cc4ce5e 100644 --- a/twilio/rest/ip_messaging/v2/model_list_credential_response_meta.go +++ b/twilio/rest/ip_messaging/v2/model_list_credential_response_meta.go @@ -1,22 +1,23 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListCredentialResponseMeta struct for ListCredentialResponseMeta type ListCredentialResponseMeta struct { - FirstPageUrl string `json:"FirstPageUrl,omitempty"` - Key string `json:"Key,omitempty"` - NextPageUrl string `json:"NextPageUrl,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` - Url string `json:"Url,omitempty"` + Url string `json:"Url,omitempty"` } diff --git a/twilio/rest/ip_messaging/v2/model_list_invite_response.go b/twilio/rest/ip_messaging/v2/model_list_invite_response.go index 65cdbf5ae..1b6266363 100644 --- a/twilio/rest/ip_messaging/v2/model_list_invite_response.go +++ b/twilio/rest/ip_messaging/v2/model_list_invite_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListInviteResponse struct for ListInviteResponse type ListInviteResponse struct { Invites []IpMessagingV2ServiceChannelInvite `json:"Invites,omitempty"` - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/ip_messaging/v2/model_list_member_response.go b/twilio/rest/ip_messaging/v2/model_list_member_response.go index b5857edaf..cf887d3f6 100644 --- a/twilio/rest/ip_messaging/v2/model_list_member_response.go +++ b/twilio/rest/ip_messaging/v2/model_list_member_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListMemberResponse struct for ListMemberResponse type ListMemberResponse struct { Members []IpMessagingV2ServiceChannelMember `json:"Members,omitempty"` - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/ip_messaging/v2/model_list_message_response.go b/twilio/rest/ip_messaging/v2/model_list_message_response.go index c6615d839..8d42969a9 100644 --- a/twilio/rest/ip_messaging/v2/model_list_message_response.go +++ b/twilio/rest/ip_messaging/v2/model_list_message_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListMessageResponse struct for ListMessageResponse type ListMessageResponse struct { Messages []IpMessagingV2ServiceChannelMessage `json:"Messages,omitempty"` - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/ip_messaging/v2/model_list_role_response.go b/twilio/rest/ip_messaging/v2/model_list_role_response.go index a32cff6cd..240561e07 100644 --- a/twilio/rest/ip_messaging/v2/model_list_role_response.go +++ b/twilio/rest/ip_messaging/v2/model_list_role_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListRoleResponse struct for ListRoleResponse type ListRoleResponse struct { - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` Roles []IpMessagingV2ServiceRole `json:"Roles,omitempty"` } diff --git a/twilio/rest/ip_messaging/v2/model_list_service_response.go b/twilio/rest/ip_messaging/v2/model_list_service_response.go index 35c36ef30..271999b7c 100644 --- a/twilio/rest/ip_messaging/v2/model_list_service_response.go +++ b/twilio/rest/ip_messaging/v2/model_list_service_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListServiceResponse struct for ListServiceResponse type ListServiceResponse struct { - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` - Services []IpMessagingV2Service `json:"Services,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Services []IpMessagingV2Service `json:"Services,omitempty"` } diff --git a/twilio/rest/ip_messaging/v2/model_list_user_binding_response.go b/twilio/rest/ip_messaging/v2/model_list_user_binding_response.go index 5e39a2a72..2042517d4 100644 --- a/twilio/rest/ip_messaging/v2/model_list_user_binding_response.go +++ b/twilio/rest/ip_messaging/v2/model_list_user_binding_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListUserBindingResponse struct for ListUserBindingResponse type ListUserBindingResponse struct { Bindings []IpMessagingV2ServiceUserUserBinding `json:"Bindings,omitempty"` - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/ip_messaging/v2/model_list_user_channel_response.go b/twilio/rest/ip_messaging/v2/model_list_user_channel_response.go index 9a231381a..22a096e5c 100644 --- a/twilio/rest/ip_messaging/v2/model_list_user_channel_response.go +++ b/twilio/rest/ip_messaging/v2/model_list_user_channel_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListUserChannelResponse struct for ListUserChannelResponse type ListUserChannelResponse struct { Channels []IpMessagingV2ServiceUserUserChannel `json:"Channels,omitempty"` - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/ip_messaging/v2/model_list_user_response.go b/twilio/rest/ip_messaging/v2/model_list_user_response.go index 1a3ad7d35..6a86ca912 100644 --- a/twilio/rest/ip_messaging/v2/model_list_user_response.go +++ b/twilio/rest/ip_messaging/v2/model_list_user_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Ip_messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListUserResponse struct for ListUserResponse type ListUserResponse struct { - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` Users []IpMessagingV2ServiceUser `json:"Users,omitempty"` } diff --git a/twilio/rest/lookups/v1/api_default.go b/twilio/rest/lookups/v1/api_default.go index d6156847f..ec5a54700 100644 --- a/twilio/rest/lookups/v1/api_default.go +++ b/twilio/rest/lookups/v1/api_default.go @@ -1,11 +1,11 @@ /* - * Twilio - Lookups - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Lookups + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,10 +14,10 @@ package openapi import ( "encoding/json" "fmt" - twilio "github.com/twilio/twilio-go/client" "net/url" - "strings" - "reflect" + "strings" + + twilio "github.com/twilio/twilio-go/client" ) type DefaultApiService struct { @@ -26,18 +26,18 @@ type DefaultApiService struct { } func NewDefaultApiService(client *twilio.Client) *DefaultApiService { - return &DefaultApiService { - client: client, + return &DefaultApiService{ + client: client, baseURL: "https://lookups.twilio.com", } } // FetchPhoneNumberParams Optional parameters for the method 'FetchPhoneNumber' type FetchPhoneNumberParams struct { - CountryCode *string `json:"CountryCode,omitempty"` - Type *[]string `json:"Type,omitempty"` - AddOns *[]string `json:"AddOns,omitempty"` - AddOnsData *map[string]interface{} `json:"AddOnsData,omitempty"` + CountryCode *string `json:"CountryCode,omitempty"` + Type *[]string `json:"Type,omitempty"` + AddOns *[]string `json:"AddOns,omitempty"` + AddOnsData *map[string]interface{} `json:"AddOnsData,omitempty"` } /* @@ -49,45 +49,44 @@ type FetchPhoneNumberParams struct { * @param "AddOns" ([]string) - The `unique_name` of an Add-on you would like to invoke. Can be the `unique_name` of an Add-on that is installed on your account. You can specify multiple instances of this parameter to invoke multiple Add-ons. For more information about Add-ons, see the [Add-ons documentation](https://www.twilio.com/docs/add-ons). * @param "AddOnsData" (map[string]interface{}) - Data specific to the add-on you would like to invoke. The content and format of this value depends on the add-on. * @return LookupsV1PhoneNumber -*/ + */ func (c *DefaultApiService) FetchPhoneNumber(PhoneNumber string, params *FetchPhoneNumberParams) (*LookupsV1PhoneNumber, error) { - path := "/v1/PhoneNumbers/{PhoneNumber}" + path := "/v1/PhoneNumbers/{PhoneNumber}" path = strings.Replace(path, "{"+"PhoneNumber"+"}", PhoneNumber, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.CountryCode != nil { - data.Set("CountryCode", *params.CountryCode) -} - if params != nil && params.Type != nil { - data.Set("Type", strings.Join(*params.Type, ",")) -} - if params != nil && params.AddOns != nil { - data.Set("AddOns", strings.Join(*params.AddOns, ",")) -} - if params != nil && params.AddOnsData != nil { - v, err := json.Marshal(params.AddOnsData) + data := url.Values{} + headers := 0 - if err != nil { - return nil, err + if params != nil && params.CountryCode != nil { + data.Set("CountryCode", *params.CountryCode) } + if params != nil && params.Type != nil { + data.Set("Type", strings.Join(*params.Type, ",")) + } + if params != nil && params.AddOns != nil { + data.Set("AddOns", strings.Join(*params.AddOns, ",")) + } + if params != nil && params.AddOnsData != nil { + v, err := json.Marshal(params.AddOnsData) - data.Set("AddOnsData", fmt.Sprint(v)) -} + if err != nil { + return nil, err + } + data.Set("AddOnsData", fmt.Sprint(v)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &LookupsV1PhoneNumber{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &LookupsV1PhoneNumber{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } diff --git a/twilio/rest/lookups/v1/model_lookups_v1_phone_number.go b/twilio/rest/lookups/v1/model_lookups_v1_phone_number.go index 80bac1cdd..86ce02bfe 100644 --- a/twilio/rest/lookups/v1/model_lookups_v1_phone_number.go +++ b/twilio/rest/lookups/v1/model_lookups_v1_phone_number.go @@ -1,15 +1,16 @@ /* - * Twilio - Lookups - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Lookups + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // LookupsV1PhoneNumber struct for LookupsV1PhoneNumber type LookupsV1PhoneNumber struct { // A JSON string with the results of the Add-ons you specified diff --git a/twilio/rest/messaging/v1/api_default.go b/twilio/rest/messaging/v1/api_default.go index 8689d63f9..707139f7c 100644 --- a/twilio/rest/messaging/v1/api_default.go +++ b/twilio/rest/messaging/v1/api_default.go @@ -1,11 +1,11 @@ /* - * Twilio - Messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,10 +14,11 @@ package openapi import ( "encoding/json" "fmt" - twilio "github.com/twilio/twilio-go/client" "net/url" - "strings" - "time" + "strings" + "time" + + twilio "github.com/twilio/twilio-go/client" ) type DefaultApiService struct { @@ -26,8 +27,8 @@ type DefaultApiService struct { } func NewDefaultApiService(client *twilio.Client) *DefaultApiService { - return &DefaultApiService { - client: client, + return &DefaultApiService{ + client: client, baseURL: "https://messaging.twilio.com", } } @@ -43,36 +44,36 @@ type CreateAlphaSenderParams struct { * @param optional nil or *CreateAlphaSenderParams - Optional Parameters: * @param "AlphaSender" (string) - The Alphanumeric Sender ID string. Can be up to 11 characters long. Valid characters are A-Z, a-z, 0-9, space, and hyphen `-`. This value cannot contain only numbers. * @return MessagingV1ServiceAlphaSender -*/ + */ func (c *DefaultApiService) CreateAlphaSender(ServiceSid string, params *CreateAlphaSenderParams) (*MessagingV1ServiceAlphaSender, error) { - path := "/v1/Services/{ServiceSid}/AlphaSenders" + path := "/v1/Services/{ServiceSid}/AlphaSenders" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.AlphaSender != nil { - data.Set("AlphaSender", *params.AlphaSender) -} + data := url.Values{} + headers := 0 + if params != nil && params.AlphaSender != nil { + data.Set("AlphaSender", *params.AlphaSender) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &MessagingV1ServiceAlphaSender{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &MessagingV1ServiceAlphaSender{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateBrandRegistrationsParams Optional parameters for the method 'CreateBrandRegistrations' type CreateBrandRegistrationsParams struct { - A2pProfileBundleSid *string `json:"A2pProfileBundleSid,omitempty"` + A2pProfileBundleSid *string `json:"A2pProfileBundleSid,omitempty"` CustomerProfileBundleSid *string `json:"CustomerProfileBundleSid,omitempty"` } @@ -82,35 +83,35 @@ type CreateBrandRegistrationsParams struct { * @param "A2pProfileBundleSid" (string) - A2P Messaging Profile Bundle Sid. * @param "CustomerProfileBundleSid" (string) - Customer Profile Bundle Sid. * @return MessagingV1BrandRegistrations -*/ + */ func (c *DefaultApiService) CreateBrandRegistrations(params *CreateBrandRegistrationsParams) (*MessagingV1BrandRegistrations, error) { - path := "/v1/a2p/BrandRegistrations" - - data := url.Values{} - headers := 0 + path := "/v1/a2p/BrandRegistrations" - if params != nil && params.A2pProfileBundleSid != nil { - data.Set("A2pProfileBundleSid", *params.A2pProfileBundleSid) -} - if params != nil && params.CustomerProfileBundleSid != nil { - data.Set("CustomerProfileBundleSid", *params.CustomerProfileBundleSid) -} + data := url.Values{} + headers := 0 + if params != nil && params.A2pProfileBundleSid != nil { + data.Set("A2pProfileBundleSid", *params.A2pProfileBundleSid) + } + if params != nil && params.CustomerProfileBundleSid != nil { + data.Set("CustomerProfileBundleSid", *params.CustomerProfileBundleSid) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &MessagingV1BrandRegistrations{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &MessagingV1BrandRegistrations{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreatePhoneNumberParams Optional parameters for the method 'CreatePhoneNumber' type CreatePhoneNumberParams struct { PhoneNumberSid *string `json:"PhoneNumberSid,omitempty"` @@ -122,49 +123,49 @@ type CreatePhoneNumberParams struct { * @param optional nil or *CreatePhoneNumberParams - Optional Parameters: * @param "PhoneNumberSid" (string) - The SID of the Phone Number being added to the Service. * @return MessagingV1ServicePhoneNumber -*/ + */ func (c *DefaultApiService) CreatePhoneNumber(ServiceSid string, params *CreatePhoneNumberParams) (*MessagingV1ServicePhoneNumber, error) { - path := "/v1/Services/{ServiceSid}/PhoneNumbers" + path := "/v1/Services/{ServiceSid}/PhoneNumbers" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PhoneNumberSid != nil { - data.Set("PhoneNumberSid", *params.PhoneNumberSid) -} + data := url.Values{} + headers := 0 + if params != nil && params.PhoneNumberSid != nil { + data.Set("PhoneNumberSid", *params.PhoneNumberSid) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &MessagingV1ServicePhoneNumber{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &MessagingV1ServicePhoneNumber{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateServiceParams Optional parameters for the method 'CreateService' type CreateServiceParams struct { - AreaCodeGeomatch *bool `json:"AreaCodeGeomatch,omitempty"` - FallbackMethod *string `json:"FallbackMethod,omitempty"` - FallbackToLongCode *bool `json:"FallbackToLongCode,omitempty"` - FallbackUrl *string `json:"FallbackUrl,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - InboundMethod *string `json:"InboundMethod,omitempty"` - InboundRequestUrl *string `json:"InboundRequestUrl,omitempty"` - MmsConverter *bool `json:"MmsConverter,omitempty"` - ScanMessageContent *string `json:"ScanMessageContent,omitempty"` - SmartEncoding *bool `json:"SmartEncoding,omitempty"` - StatusCallback *string `json:"StatusCallback,omitempty"` - StickySender *bool `json:"StickySender,omitempty"` - SynchronousValidation *bool `json:"SynchronousValidation,omitempty"` - ValidityPeriod *int32 `json:"ValidityPeriod,omitempty"` + AreaCodeGeomatch *bool `json:"AreaCodeGeomatch,omitempty"` + FallbackMethod *string `json:"FallbackMethod,omitempty"` + FallbackToLongCode *bool `json:"FallbackToLongCode,omitempty"` + FallbackUrl *string `json:"FallbackUrl,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + InboundMethod *string `json:"InboundMethod,omitempty"` + InboundRequestUrl *string `json:"InboundRequestUrl,omitempty"` + MmsConverter *bool `json:"MmsConverter,omitempty"` + ScanMessageContent *string `json:"ScanMessageContent,omitempty"` + SmartEncoding *bool `json:"SmartEncoding,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` + StickySender *bool `json:"StickySender,omitempty"` + SynchronousValidation *bool `json:"SynchronousValidation,omitempty"` + ValidityPeriod *int32 `json:"ValidityPeriod,omitempty"` } /* @@ -185,71 +186,71 @@ type CreateServiceParams struct { * @param "SynchronousValidation" (bool) - Reserved. * @param "ValidityPeriod" (int32) - How long, in seconds, messages sent from the Service are valid. Can be an integer from `1` to `14,400`. * @return MessagingV1Service -*/ + */ func (c *DefaultApiService) CreateService(params *CreateServiceParams) (*MessagingV1Service, error) { - path := "/v1/Services" + path := "/v1/Services" - data := url.Values{} - headers := 0 - - if params != nil && params.AreaCodeGeomatch != nil { - data.Set("AreaCodeGeomatch", fmt.Sprint(*params.AreaCodeGeomatch)) -} - if params != nil && params.FallbackMethod != nil { - data.Set("FallbackMethod", *params.FallbackMethod) -} - if params != nil && params.FallbackToLongCode != nil { - data.Set("FallbackToLongCode", fmt.Sprint(*params.FallbackToLongCode)) -} - if params != nil && params.FallbackUrl != nil { - data.Set("FallbackUrl", *params.FallbackUrl) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.InboundMethod != nil { - data.Set("InboundMethod", *params.InboundMethod) -} - if params != nil && params.InboundRequestUrl != nil { - data.Set("InboundRequestUrl", *params.InboundRequestUrl) -} - if params != nil && params.MmsConverter != nil { - data.Set("MmsConverter", fmt.Sprint(*params.MmsConverter)) -} - if params != nil && params.ScanMessageContent != nil { - data.Set("ScanMessageContent", *params.ScanMessageContent) -} - if params != nil && params.SmartEncoding != nil { - data.Set("SmartEncoding", fmt.Sprint(*params.SmartEncoding)) -} - if params != nil && params.StatusCallback != nil { - data.Set("StatusCallback", *params.StatusCallback) -} - if params != nil && params.StickySender != nil { - data.Set("StickySender", fmt.Sprint(*params.StickySender)) -} - if params != nil && params.SynchronousValidation != nil { - data.Set("SynchronousValidation", fmt.Sprint(*params.SynchronousValidation)) -} - if params != nil && params.ValidityPeriod != nil { - data.Set("ValidityPeriod", fmt.Sprint(*params.ValidityPeriod)) -} + data := url.Values{} + headers := 0 + if params != nil && params.AreaCodeGeomatch != nil { + data.Set("AreaCodeGeomatch", fmt.Sprint(*params.AreaCodeGeomatch)) + } + if params != nil && params.FallbackMethod != nil { + data.Set("FallbackMethod", *params.FallbackMethod) + } + if params != nil && params.FallbackToLongCode != nil { + data.Set("FallbackToLongCode", fmt.Sprint(*params.FallbackToLongCode)) + } + if params != nil && params.FallbackUrl != nil { + data.Set("FallbackUrl", *params.FallbackUrl) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.InboundMethod != nil { + data.Set("InboundMethod", *params.InboundMethod) + } + if params != nil && params.InboundRequestUrl != nil { + data.Set("InboundRequestUrl", *params.InboundRequestUrl) + } + if params != nil && params.MmsConverter != nil { + data.Set("MmsConverter", fmt.Sprint(*params.MmsConverter)) + } + if params != nil && params.ScanMessageContent != nil { + data.Set("ScanMessageContent", *params.ScanMessageContent) + } + if params != nil && params.SmartEncoding != nil { + data.Set("SmartEncoding", fmt.Sprint(*params.SmartEncoding)) + } + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) + } + if params != nil && params.StickySender != nil { + data.Set("StickySender", fmt.Sprint(*params.StickySender)) + } + if params != nil && params.SynchronousValidation != nil { + data.Set("SynchronousValidation", fmt.Sprint(*params.SynchronousValidation)) + } + if params != nil && params.ValidityPeriod != nil { + data.Set("ValidityPeriod", fmt.Sprint(*params.ValidityPeriod)) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &MessagingV1Service{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &MessagingV1Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateShortCodeParams Optional parameters for the method 'CreateShortCode' type CreateShortCodeParams struct { ShortCodeSid *string `json:"ShortCodeSid,omitempty"` @@ -261,130 +262,121 @@ type CreateShortCodeParams struct { * @param optional nil or *CreateShortCodeParams - Optional Parameters: * @param "ShortCodeSid" (string) - The SID of the ShortCode resource being added to the Service. * @return MessagingV1ServiceShortCode -*/ + */ func (c *DefaultApiService) CreateShortCode(ServiceSid string, params *CreateShortCodeParams) (*MessagingV1ServiceShortCode, error) { - path := "/v1/Services/{ServiceSid}/ShortCodes" + path := "/v1/Services/{ServiceSid}/ShortCodes" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.ShortCodeSid != nil { - data.Set("ShortCodeSid", *params.ShortCodeSid) -} + data := url.Values{} + headers := 0 + if params != nil && params.ShortCodeSid != nil { + data.Set("ShortCodeSid", *params.ShortCodeSid) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &MessagingV1ServiceShortCode{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &MessagingV1ServiceShortCode{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * DeleteAlphaSender Method for DeleteAlphaSender * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to delete the resource from. * @param Sid The SID of the AlphaSender resource to delete. -*/ -func (c *DefaultApiService) DeleteAlphaSender(ServiceSid string, Sid string, ) (error) { - path := "/v1/Services/{ServiceSid}/AlphaSenders/{Sid}" + */ +func (c *DefaultApiService) DeleteAlphaSender(ServiceSid string, Sid string) error { + path := "/v1/Services/{ServiceSid}/AlphaSenders/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + defer resp.Body.Close() - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() - - return nil + return nil } /* * DeletePhoneNumber Method for DeletePhoneNumber * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to delete the resource from. * @param Sid The SID of the PhoneNumber resource to delete. -*/ -func (c *DefaultApiService) DeletePhoneNumber(ServiceSid string, Sid string, ) (error) { - path := "/v1/Services/{ServiceSid}/PhoneNumbers/{Sid}" + */ +func (c *DefaultApiService) DeletePhoneNumber(ServiceSid string, Sid string) error { + path := "/v1/Services/{ServiceSid}/PhoneNumbers/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* * DeleteService Method for DeleteService * @param Sid The SID of the Service resource to delete. -*/ -func (c *DefaultApiService) DeleteService(Sid string, ) (error) { - path := "/v1/Services/{Sid}" + */ +func (c *DefaultApiService) DeleteService(Sid string) error { + path := "/v1/Services/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* * DeleteShortCode Method for DeleteShortCode * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to delete the resource from. * @param Sid The SID of the ShortCode resource to delete. -*/ -func (c *DefaultApiService) DeleteShortCode(ServiceSid string, Sid string, ) (error) { - path := "/v1/Services/{ServiceSid}/ShortCodes/{Sid}" + */ +func (c *DefaultApiService) DeleteShortCode(ServiceSid string, Sid string) error { + path := "/v1/Services/{ServiceSid}/ShortCodes/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -392,60 +384,57 @@ func (c *DefaultApiService) DeleteShortCode(ServiceSid string, Sid string, ) (er * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to fetch the resource from. * @param Sid The SID of the AlphaSender resource to fetch. * @return MessagingV1ServiceAlphaSender -*/ -func (c *DefaultApiService) FetchAlphaSender(ServiceSid string, Sid string, ) (*MessagingV1ServiceAlphaSender, error) { - path := "/v1/Services/{ServiceSid}/AlphaSenders/{Sid}" + */ +func (c *DefaultApiService) FetchAlphaSender(ServiceSid string, Sid string) (*MessagingV1ServiceAlphaSender, error) { + path := "/v1/Services/{ServiceSid}/AlphaSenders/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &MessagingV1ServiceAlphaSender{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &MessagingV1ServiceAlphaSender{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * FetchBrandRegistrations Method for FetchBrandRegistrations * @param Sid The SID of the Brand Registration resource to fetch. * @return MessagingV1BrandRegistrations -*/ -func (c *DefaultApiService) FetchBrandRegistrations(Sid string, ) (*MessagingV1BrandRegistrations, error) { - path := "/v1/a2p/BrandRegistrations/{Sid}" + */ +func (c *DefaultApiService) FetchBrandRegistrations(Sid string) (*MessagingV1BrandRegistrations, error) { + path := "/v1/a2p/BrandRegistrations/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &MessagingV1BrandRegistrations{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &MessagingV1BrandRegistrations{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // FetchDeactivationParams Optional parameters for the method 'FetchDeactivation' type FetchDeactivationParams struct { Date *time.Time `json:"Date,omitempty"` @@ -456,26 +445,25 @@ type FetchDeactivationParams struct { * Fetch a list of all United States numbers that have been deactivated on a specific date. * @param optional nil or *FetchDeactivationParams - Optional Parameters: * @param "Date" (time.Time) - The request will return a list of all United States Phone Numbers that were deactivated on the day specified by this parameter. This date should be specified in YYYY-MM-DD format. -*/ -func (c *DefaultApiService) FetchDeactivation(params *FetchDeactivationParams) (error) { - path := "/v1/Deactivations" - - data := url.Values{} - headers := 0 + */ +func (c *DefaultApiService) FetchDeactivation(params *FetchDeactivationParams) error { + path := "/v1/Deactivations" - if params != nil && params.Date != nil { - data.Set("Date", fmt.Sprint(*params.Date)) -} + data := url.Values{} + headers := 0 + if params != nil && params.Date != nil { + data.Set("Date", fmt.Sprint(*params.Date)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -483,59 +471,55 @@ func (c *DefaultApiService) FetchDeactivation(params *FetchDeactivationParams) ( * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to fetch the resource from. * @param Sid The SID of the PhoneNumber resource to fetch. * @return MessagingV1ServicePhoneNumber -*/ -func (c *DefaultApiService) FetchPhoneNumber(ServiceSid string, Sid string, ) (*MessagingV1ServicePhoneNumber, error) { - path := "/v1/Services/{ServiceSid}/PhoneNumbers/{Sid}" + */ +func (c *DefaultApiService) FetchPhoneNumber(ServiceSid string, Sid string) (*MessagingV1ServicePhoneNumber, error) { + path := "/v1/Services/{ServiceSid}/PhoneNumbers/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &MessagingV1ServicePhoneNumber{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &MessagingV1ServicePhoneNumber{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * FetchService Method for FetchService * @param Sid The SID of the Service resource to fetch. * @return MessagingV1Service -*/ -func (c *DefaultApiService) FetchService(Sid string, ) (*MessagingV1Service, error) { - path := "/v1/Services/{Sid}" + */ +func (c *DefaultApiService) FetchService(Sid string) (*MessagingV1Service, error) { + path := "/v1/Services/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &MessagingV1Service{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &MessagingV1Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -543,31 +527,30 @@ func (c *DefaultApiService) FetchService(Sid string, ) (*MessagingV1Service, err * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to fetch the resource from. * @param Sid The SID of the ShortCode resource to fetch. * @return MessagingV1ServiceShortCode -*/ -func (c *DefaultApiService) FetchShortCode(ServiceSid string, Sid string, ) (*MessagingV1ServiceShortCode, error) { - path := "/v1/Services/{ServiceSid}/ShortCodes/{Sid}" + */ +func (c *DefaultApiService) FetchShortCode(ServiceSid string, Sid string) (*MessagingV1ServiceShortCode, error) { + path := "/v1/Services/{ServiceSid}/ShortCodes/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &MessagingV1ServiceShortCode{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &MessagingV1ServiceShortCode{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListAlphaSenderParams Optional parameters for the method 'ListAlphaSender' type ListAlphaSenderParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -579,33 +562,33 @@ type ListAlphaSenderParams struct { * @param optional nil or *ListAlphaSenderParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListAlphaSenderResponse -*/ + */ func (c *DefaultApiService) ListAlphaSender(ServiceSid string, params *ListAlphaSenderParams) (*ListAlphaSenderResponse, error) { - path := "/v1/Services/{ServiceSid}/AlphaSenders" + path := "/v1/Services/{ServiceSid}/AlphaSenders" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListAlphaSenderResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListAlphaSenderResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListBrandRegistrationsParams Optional parameters for the method 'ListBrandRegistrations' type ListBrandRegistrationsParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -616,32 +599,32 @@ type ListBrandRegistrationsParams struct { * @param optional nil or *ListBrandRegistrationsParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListBrandRegistrationsResponse -*/ + */ func (c *DefaultApiService) ListBrandRegistrations(params *ListBrandRegistrationsParams) (*ListBrandRegistrationsResponse, error) { - path := "/v1/a2p/BrandRegistrations" - - data := url.Values{} - headers := 0 + path := "/v1/a2p/BrandRegistrations" - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListBrandRegistrationsResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListBrandRegistrationsResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListPhoneNumberParams Optional parameters for the method 'ListPhoneNumber' type ListPhoneNumberParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -653,33 +636,33 @@ type ListPhoneNumberParams struct { * @param optional nil or *ListPhoneNumberParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListPhoneNumberResponse -*/ + */ func (c *DefaultApiService) ListPhoneNumber(ServiceSid string, params *ListPhoneNumberParams) (*ListPhoneNumberResponse, error) { - path := "/v1/Services/{ServiceSid}/PhoneNumbers" + path := "/v1/Services/{ServiceSid}/PhoneNumbers" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListPhoneNumberResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListPhoneNumberResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListServiceParams Optional parameters for the method 'ListService' type ListServiceParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -690,32 +673,32 @@ type ListServiceParams struct { * @param optional nil or *ListServiceParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListServiceResponse -*/ + */ func (c *DefaultApiService) ListService(params *ListServiceParams) (*ListServiceResponse, error) { - path := "/v1/Services" - - data := url.Values{} - headers := 0 + path := "/v1/Services" - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListServiceResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListServiceResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListShortCodeParams Optional parameters for the method 'ListShortCode' type ListShortCodeParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -727,49 +710,49 @@ type ListShortCodeParams struct { * @param optional nil or *ListShortCodeParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListShortCodeResponse -*/ + */ func (c *DefaultApiService) ListShortCode(ServiceSid string, params *ListShortCodeParams) (*ListShortCodeResponse, error) { - path := "/v1/Services/{ServiceSid}/ShortCodes" + path := "/v1/Services/{ServiceSid}/ShortCodes" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListShortCodeResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListShortCodeResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateServiceParams Optional parameters for the method 'UpdateService' type UpdateServiceParams struct { - AreaCodeGeomatch *bool `json:"AreaCodeGeomatch,omitempty"` - FallbackMethod *string `json:"FallbackMethod,omitempty"` - FallbackToLongCode *bool `json:"FallbackToLongCode,omitempty"` - FallbackUrl *string `json:"FallbackUrl,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - InboundMethod *string `json:"InboundMethod,omitempty"` - InboundRequestUrl *string `json:"InboundRequestUrl,omitempty"` - MmsConverter *bool `json:"MmsConverter,omitempty"` - ScanMessageContent *string `json:"ScanMessageContent,omitempty"` - SmartEncoding *bool `json:"SmartEncoding,omitempty"` - StatusCallback *string `json:"StatusCallback,omitempty"` - StickySender *bool `json:"StickySender,omitempty"` - SynchronousValidation *bool `json:"SynchronousValidation,omitempty"` - ValidityPeriod *int32 `json:"ValidityPeriod,omitempty"` + AreaCodeGeomatch *bool `json:"AreaCodeGeomatch,omitempty"` + FallbackMethod *string `json:"FallbackMethod,omitempty"` + FallbackToLongCode *bool `json:"FallbackToLongCode,omitempty"` + FallbackUrl *string `json:"FallbackUrl,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + InboundMethod *string `json:"InboundMethod,omitempty"` + InboundRequestUrl *string `json:"InboundRequestUrl,omitempty"` + MmsConverter *bool `json:"MmsConverter,omitempty"` + ScanMessageContent *string `json:"ScanMessageContent,omitempty"` + SmartEncoding *bool `json:"SmartEncoding,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` + StickySender *bool `json:"StickySender,omitempty"` + SynchronousValidation *bool `json:"SynchronousValidation,omitempty"` + ValidityPeriod *int32 `json:"ValidityPeriod,omitempty"` } /* @@ -791,69 +774,68 @@ type UpdateServiceParams struct { * @param "SynchronousValidation" (bool) - Reserved. * @param "ValidityPeriod" (int32) - How long, in seconds, messages sent from the Service are valid. Can be an integer from `1` to `14,400`. * @return MessagingV1Service -*/ + */ func (c *DefaultApiService) UpdateService(Sid string, params *UpdateServiceParams) (*MessagingV1Service, error) { - path := "/v1/Services/{Sid}" + path := "/v1/Services/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.AreaCodeGeomatch != nil { - data.Set("AreaCodeGeomatch", fmt.Sprint(*params.AreaCodeGeomatch)) -} - if params != nil && params.FallbackMethod != nil { - data.Set("FallbackMethod", *params.FallbackMethod) -} - if params != nil && params.FallbackToLongCode != nil { - data.Set("FallbackToLongCode", fmt.Sprint(*params.FallbackToLongCode)) -} - if params != nil && params.FallbackUrl != nil { - data.Set("FallbackUrl", *params.FallbackUrl) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.InboundMethod != nil { - data.Set("InboundMethod", *params.InboundMethod) -} - if params != nil && params.InboundRequestUrl != nil { - data.Set("InboundRequestUrl", *params.InboundRequestUrl) -} - if params != nil && params.MmsConverter != nil { - data.Set("MmsConverter", fmt.Sprint(*params.MmsConverter)) -} - if params != nil && params.ScanMessageContent != nil { - data.Set("ScanMessageContent", *params.ScanMessageContent) -} - if params != nil && params.SmartEncoding != nil { - data.Set("SmartEncoding", fmt.Sprint(*params.SmartEncoding)) -} - if params != nil && params.StatusCallback != nil { - data.Set("StatusCallback", *params.StatusCallback) -} - if params != nil && params.StickySender != nil { - data.Set("StickySender", fmt.Sprint(*params.StickySender)) -} - if params != nil && params.SynchronousValidation != nil { - data.Set("SynchronousValidation", fmt.Sprint(*params.SynchronousValidation)) -} - if params != nil && params.ValidityPeriod != nil { - data.Set("ValidityPeriod", fmt.Sprint(*params.ValidityPeriod)) -} + data := url.Values{} + headers := 0 + if params != nil && params.AreaCodeGeomatch != nil { + data.Set("AreaCodeGeomatch", fmt.Sprint(*params.AreaCodeGeomatch)) + } + if params != nil && params.FallbackMethod != nil { + data.Set("FallbackMethod", *params.FallbackMethod) + } + if params != nil && params.FallbackToLongCode != nil { + data.Set("FallbackToLongCode", fmt.Sprint(*params.FallbackToLongCode)) + } + if params != nil && params.FallbackUrl != nil { + data.Set("FallbackUrl", *params.FallbackUrl) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.InboundMethod != nil { + data.Set("InboundMethod", *params.InboundMethod) + } + if params != nil && params.InboundRequestUrl != nil { + data.Set("InboundRequestUrl", *params.InboundRequestUrl) + } + if params != nil && params.MmsConverter != nil { + data.Set("MmsConverter", fmt.Sprint(*params.MmsConverter)) + } + if params != nil && params.ScanMessageContent != nil { + data.Set("ScanMessageContent", *params.ScanMessageContent) + } + if params != nil && params.SmartEncoding != nil { + data.Set("SmartEncoding", fmt.Sprint(*params.SmartEncoding)) + } + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) + } + if params != nil && params.StickySender != nil { + data.Set("StickySender", fmt.Sprint(*params.StickySender)) + } + if params != nil && params.SynchronousValidation != nil { + data.Set("SynchronousValidation", fmt.Sprint(*params.SynchronousValidation)) + } + if params != nil && params.ValidityPeriod != nil { + data.Set("ValidityPeriod", fmt.Sprint(*params.ValidityPeriod)) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &MessagingV1Service{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &MessagingV1Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } diff --git a/twilio/rest/messaging/v1/model_list_alpha_sender_response.go b/twilio/rest/messaging/v1/model_list_alpha_sender_response.go index 25ecfcf31..b0eb4742e 100644 --- a/twilio/rest/messaging/v1/model_list_alpha_sender_response.go +++ b/twilio/rest/messaging/v1/model_list_alpha_sender_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListAlphaSenderResponse struct for ListAlphaSenderResponse type ListAlphaSenderResponse struct { AlphaSenders []MessagingV1ServiceAlphaSender `json:"AlphaSenders,omitempty"` - Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/messaging/v1/model_list_brand_registrations_response.go b/twilio/rest/messaging/v1/model_list_brand_registrations_response.go index 4227e057d..266b23fe1 100644 --- a/twilio/rest/messaging/v1/model_list_brand_registrations_response.go +++ b/twilio/rest/messaging/v1/model_list_brand_registrations_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListBrandRegistrationsResponse struct for ListBrandRegistrationsResponse type ListBrandRegistrationsResponse struct { Data []MessagingV1BrandRegistrations `json:"Data,omitempty"` - Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/messaging/v1/model_list_phone_number_response.go b/twilio/rest/messaging/v1/model_list_phone_number_response.go index 87b3ce9c5..d1889ff47 100644 --- a/twilio/rest/messaging/v1/model_list_phone_number_response.go +++ b/twilio/rest/messaging/v1/model_list_phone_number_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListPhoneNumberResponse struct for ListPhoneNumberResponse type ListPhoneNumberResponse struct { - Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` PhoneNumbers []MessagingV1ServicePhoneNumber `json:"PhoneNumbers,omitempty"` } diff --git a/twilio/rest/messaging/v1/model_list_service_response.go b/twilio/rest/messaging/v1/model_list_service_response.go index 21bc3707b..f581bd901 100644 --- a/twilio/rest/messaging/v1/model_list_service_response.go +++ b/twilio/rest/messaging/v1/model_list_service_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListServiceResponse struct for ListServiceResponse type ListServiceResponse struct { - Meta ListServiceResponseMeta `json:"Meta,omitempty"` - Services []MessagingV1Service `json:"Services,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Services []MessagingV1Service `json:"Services,omitempty"` } diff --git a/twilio/rest/messaging/v1/model_list_service_response_meta.go b/twilio/rest/messaging/v1/model_list_service_response_meta.go index 249441ff4..a73887a0d 100644 --- a/twilio/rest/messaging/v1/model_list_service_response_meta.go +++ b/twilio/rest/messaging/v1/model_list_service_response_meta.go @@ -1,22 +1,23 @@ /* - * Twilio - Messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListServiceResponseMeta struct for ListServiceResponseMeta type ListServiceResponseMeta struct { - FirstPageUrl string `json:"FirstPageUrl,omitempty"` - Key string `json:"Key,omitempty"` - NextPageUrl string `json:"NextPageUrl,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` - Url string `json:"Url,omitempty"` + Url string `json:"Url,omitempty"` } diff --git a/twilio/rest/messaging/v1/model_list_short_code_response.go b/twilio/rest/messaging/v1/model_list_short_code_response.go index 575ee6f3d..e967f58c7 100644 --- a/twilio/rest/messaging/v1/model_list_short_code_response.go +++ b/twilio/rest/messaging/v1/model_list_short_code_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListShortCodeResponse struct for ListShortCodeResponse type ListShortCodeResponse struct { - Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` ShortCodes []MessagingV1ServiceShortCode `json:"ShortCodes,omitempty"` } diff --git a/twilio/rest/messaging/v1/model_messaging_v1_brand_registrations.go b/twilio/rest/messaging/v1/model_messaging_v1_brand_registrations.go index 48b98e9bd..0bd2b5c0e 100644 --- a/twilio/rest/messaging/v1/model_messaging_v1_brand_registrations.go +++ b/twilio/rest/messaging/v1/model_messaging_v1_brand_registrations.go @@ -1,18 +1,20 @@ /* - * Twilio - Messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // MessagingV1BrandRegistrations struct for MessagingV1BrandRegistrations type MessagingV1BrandRegistrations struct { // A2P Messaging Profile Bundle BundleSid diff --git a/twilio/rest/messaging/v1/model_messaging_v1_deactivation.go b/twilio/rest/messaging/v1/model_messaging_v1_deactivation.go index d400a4a1a..2fbe36298 100644 --- a/twilio/rest/messaging/v1/model_messaging_v1_deactivation.go +++ b/twilio/rest/messaging/v1/model_messaging_v1_deactivation.go @@ -1,15 +1,16 @@ /* - * Twilio - Messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // MessagingV1Deactivation struct for MessagingV1Deactivation type MessagingV1Deactivation struct { // Redirect url to the list of deactivated numbers. diff --git a/twilio/rest/messaging/v1/model_messaging_v1_service.go b/twilio/rest/messaging/v1/model_messaging_v1_service.go index 362481619..b844a93fd 100644 --- a/twilio/rest/messaging/v1/model_messaging_v1_service.go +++ b/twilio/rest/messaging/v1/model_messaging_v1_service.go @@ -1,18 +1,20 @@ /* - * Twilio - Messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // MessagingV1Service struct for MessagingV1Service type MessagingV1Service struct { // The SID of the Account that created the resource diff --git a/twilio/rest/messaging/v1/model_messaging_v1_service_alpha_sender.go b/twilio/rest/messaging/v1/model_messaging_v1_service_alpha_sender.go index 4cefdd449..c3b694996 100644 --- a/twilio/rest/messaging/v1/model_messaging_v1_service_alpha_sender.go +++ b/twilio/rest/messaging/v1/model_messaging_v1_service_alpha_sender.go @@ -1,18 +1,20 @@ /* - * Twilio - Messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // MessagingV1ServiceAlphaSender struct for MessagingV1ServiceAlphaSender type MessagingV1ServiceAlphaSender struct { // The SID of the Account that created the resource diff --git a/twilio/rest/messaging/v1/model_messaging_v1_service_phone_number.go b/twilio/rest/messaging/v1/model_messaging_v1_service_phone_number.go index 14dba5f68..528255668 100644 --- a/twilio/rest/messaging/v1/model_messaging_v1_service_phone_number.go +++ b/twilio/rest/messaging/v1/model_messaging_v1_service_phone_number.go @@ -1,18 +1,20 @@ /* - * Twilio - Messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // MessagingV1ServicePhoneNumber struct for MessagingV1ServicePhoneNumber type MessagingV1ServicePhoneNumber struct { // The SID of the Account that created the resource diff --git a/twilio/rest/messaging/v1/model_messaging_v1_service_short_code.go b/twilio/rest/messaging/v1/model_messaging_v1_service_short_code.go index 80ccefa87..409f85468 100644 --- a/twilio/rest/messaging/v1/model_messaging_v1_service_short_code.go +++ b/twilio/rest/messaging/v1/model_messaging_v1_service_short_code.go @@ -1,18 +1,20 @@ /* - * Twilio - Messaging - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Messaging + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // MessagingV1ServiceShortCode struct for MessagingV1ServiceShortCode type MessagingV1ServiceShortCode struct { // The SID of the Account that created the resource diff --git a/twilio/rest/monitor/v1/api_default.go b/twilio/rest/monitor/v1/api_default.go index 75a502b00..75912db79 100644 --- a/twilio/rest/monitor/v1/api_default.go +++ b/twilio/rest/monitor/v1/api_default.go @@ -1,11 +1,11 @@ /* - * Twilio - Monitor - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Monitor + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,10 +14,11 @@ package openapi import ( "encoding/json" "fmt" - twilio "github.com/twilio/twilio-go/client" "net/url" - "strings" - "time" + "strings" + "time" + + twilio "github.com/twilio/twilio-go/client" ) type DefaultApiService struct { @@ -26,76 +27,72 @@ type DefaultApiService struct { } func NewDefaultApiService(client *twilio.Client) *DefaultApiService { - return &DefaultApiService { - client: client, + return &DefaultApiService{ + client: client, baseURL: "https://monitor.twilio.com", } } - /* * FetchAlert Method for FetchAlert * @param Sid The SID of the Alert resource to fetch. * @return MonitorV1AlertInstance -*/ -func (c *DefaultApiService) FetchAlert(Sid string, ) (*MonitorV1AlertInstance, error) { - path := "/v1/Alerts/{Sid}" + */ +func (c *DefaultApiService) FetchAlert(Sid string) (*MonitorV1AlertInstance, error) { + path := "/v1/Alerts/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &MonitorV1AlertInstance{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &MonitorV1AlertInstance{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * FetchEvent Method for FetchEvent * @param Sid The SID of the Event resource to fetch. * @return MonitorV1Event -*/ -func (c *DefaultApiService) FetchEvent(Sid string, ) (*MonitorV1Event, error) { - path := "/v1/Events/{Sid}" + */ +func (c *DefaultApiService) FetchEvent(Sid string) (*MonitorV1Event, error) { + path := "/v1/Events/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &MonitorV1Event{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &MonitorV1Event{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListAlertParams Optional parameters for the method 'ListAlert' type ListAlertParams struct { - LogLevel *string `json:"LogLevel,omitempty"` + LogLevel *string `json:"LogLevel,omitempty"` StartDate *time.Time `json:"StartDate,omitempty"` - EndDate *time.Time `json:"EndDate,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + EndDate *time.Time `json:"EndDate,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -106,50 +103,50 @@ type ListAlertParams struct { * @param "EndDate" (time.Time) - Only include alerts that occurred on or before this date and time. Specify the date and time in GMT and format as `YYYY-MM-DD` or `YYYY-MM-DDThh:mm:ssZ`. Queries for alerts older than 30 days are not supported. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListAlertResponse -*/ + */ func (c *DefaultApiService) ListAlert(params *ListAlertParams) (*ListAlertResponse, error) { - path := "/v1/Alerts" + path := "/v1/Alerts" - data := url.Values{} - headers := 0 - - if params != nil && params.LogLevel != nil { - data.Set("LogLevel", *params.LogLevel) -} - if params != nil && params.StartDate != nil { - data.Set("StartDate", fmt.Sprint(*params.StartDate)) -} - if params != nil && params.EndDate != nil { - data.Set("EndDate", fmt.Sprint(*params.EndDate)) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.LogLevel != nil { + data.Set("LogLevel", *params.LogLevel) + } + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) + } + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListAlertResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListAlertResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListEventParams Optional parameters for the method 'ListEvent' type ListEventParams struct { - ActorSid *string `json:"ActorSid,omitempty"` - EventType *string `json:"EventType,omitempty"` - ResourceSid *string `json:"ResourceSid,omitempty"` - SourceIpAddress *string `json:"SourceIpAddress,omitempty"` - StartDate *time.Time `json:"StartDate,omitempty"` - EndDate *time.Time `json:"EndDate,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + ActorSid *string `json:"ActorSid,omitempty"` + EventType *string `json:"EventType,omitempty"` + ResourceSid *string `json:"ResourceSid,omitempty"` + SourceIpAddress *string `json:"SourceIpAddress,omitempty"` + StartDate *time.Time `json:"StartDate,omitempty"` + EndDate *time.Time `json:"EndDate,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -164,47 +161,46 @@ type ListEventParams struct { * @param "EndDate" (time.Time) - Only include events that occurred on or before this date. Specify the date in GMT and [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListEventResponse -*/ + */ func (c *DefaultApiService) ListEvent(params *ListEventParams) (*ListEventResponse, error) { - path := "/v1/Events" + path := "/v1/Events" - data := url.Values{} - headers := 0 - - if params != nil && params.ActorSid != nil { - data.Set("ActorSid", *params.ActorSid) -} - if params != nil && params.EventType != nil { - data.Set("EventType", *params.EventType) -} - if params != nil && params.ResourceSid != nil { - data.Set("ResourceSid", *params.ResourceSid) -} - if params != nil && params.SourceIpAddress != nil { - data.Set("SourceIpAddress", *params.SourceIpAddress) -} - if params != nil && params.StartDate != nil { - data.Set("StartDate", fmt.Sprint(*params.StartDate)) -} - if params != nil && params.EndDate != nil { - data.Set("EndDate", fmt.Sprint(*params.EndDate)) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.ActorSid != nil { + data.Set("ActorSid", *params.ActorSid) + } + if params != nil && params.EventType != nil { + data.Set("EventType", *params.EventType) + } + if params != nil && params.ResourceSid != nil { + data.Set("ResourceSid", *params.ResourceSid) + } + if params != nil && params.SourceIpAddress != nil { + data.Set("SourceIpAddress", *params.SourceIpAddress) + } + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) + } + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListEventResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListEventResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } diff --git a/twilio/rest/monitor/v1/model_list_alert_response.go b/twilio/rest/monitor/v1/model_list_alert_response.go index e96e4b32a..c56b6f5c9 100644 --- a/twilio/rest/monitor/v1/model_list_alert_response.go +++ b/twilio/rest/monitor/v1/model_list_alert_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Monitor - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Monitor + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListAlertResponse struct for ListAlertResponse type ListAlertResponse struct { - Alerts []MonitorV1Alert `json:"Alerts,omitempty"` - Meta ListAlertResponseMeta `json:"Meta,omitempty"` + Alerts []MonitorV1Alert `json:"Alerts,omitempty"` + Meta ListAlertResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/monitor/v1/model_list_alert_response_meta.go b/twilio/rest/monitor/v1/model_list_alert_response_meta.go index bd39253f2..eb6982988 100644 --- a/twilio/rest/monitor/v1/model_list_alert_response_meta.go +++ b/twilio/rest/monitor/v1/model_list_alert_response_meta.go @@ -1,22 +1,23 @@ /* - * Twilio - Monitor - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Monitor + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListAlertResponseMeta struct for ListAlertResponseMeta type ListAlertResponseMeta struct { - FirstPageUrl string `json:"FirstPageUrl,omitempty"` - Key string `json:"Key,omitempty"` - NextPageUrl string `json:"NextPageUrl,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` - Url string `json:"Url,omitempty"` + Url string `json:"Url,omitempty"` } diff --git a/twilio/rest/monitor/v1/model_list_event_response.go b/twilio/rest/monitor/v1/model_list_event_response.go index 459737454..d450c95c7 100644 --- a/twilio/rest/monitor/v1/model_list_event_response.go +++ b/twilio/rest/monitor/v1/model_list_event_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Monitor - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Monitor + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListEventResponse struct for ListEventResponse type ListEventResponse struct { - Events []MonitorV1Event `json:"Events,omitempty"` - Meta ListAlertResponseMeta `json:"Meta,omitempty"` + Events []MonitorV1Event `json:"Events,omitempty"` + Meta ListAlertResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/monitor/v1/model_monitor_v1_alert.go b/twilio/rest/monitor/v1/model_monitor_v1_alert.go index 2c9f78cd0..afa5a531a 100644 --- a/twilio/rest/monitor/v1/model_monitor_v1_alert.go +++ b/twilio/rest/monitor/v1/model_monitor_v1_alert.go @@ -1,18 +1,20 @@ /* - * Twilio - Monitor - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Monitor + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // MonitorV1Alert struct for MonitorV1Alert type MonitorV1Alert struct { // The SID of the Account that created the resource diff --git a/twilio/rest/monitor/v1/model_monitor_v1_alert_instance.go b/twilio/rest/monitor/v1/model_monitor_v1_alert_instance.go index 95cf6ab03..c81a94feb 100644 --- a/twilio/rest/monitor/v1/model_monitor_v1_alert_instance.go +++ b/twilio/rest/monitor/v1/model_monitor_v1_alert_instance.go @@ -1,18 +1,20 @@ /* - * Twilio - Monitor - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Monitor + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // MonitorV1AlertInstance struct for MonitorV1AlertInstance type MonitorV1AlertInstance struct { // The SID of the Account that created the resource diff --git a/twilio/rest/monitor/v1/model_monitor_v1_event.go b/twilio/rest/monitor/v1/model_monitor_v1_event.go index acb3f87c9..6a9087130 100644 --- a/twilio/rest/monitor/v1/model_monitor_v1_event.go +++ b/twilio/rest/monitor/v1/model_monitor_v1_event.go @@ -1,18 +1,20 @@ /* - * Twilio - Monitor - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Monitor + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // MonitorV1Event struct for MonitorV1Event type MonitorV1Event struct { // The SID of the Account that created the resource diff --git a/twilio/rest/notify/v1/api_default.go b/twilio/rest/notify/v1/api_default.go index a2d9bc94a..2482879cb 100644 --- a/twilio/rest/notify/v1/api_default.go +++ b/twilio/rest/notify/v1/api_default.go @@ -1,11 +1,11 @@ /* - * Twilio - Notify - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Notify + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,11 +14,11 @@ package openapi import ( "encoding/json" "fmt" - twilio "github.com/twilio/twilio-go/client" "net/url" - "strings" - "time" - "reflect" + "strings" + "time" + + twilio "github.com/twilio/twilio-go/client" ) type DefaultApiService struct { @@ -27,21 +27,21 @@ type DefaultApiService struct { } func NewDefaultApiService(client *twilio.Client) *DefaultApiService { - return &DefaultApiService { - client: client, + return &DefaultApiService{ + client: client, baseURL: "https://notify.twilio.com", } } // CreateBindingParams Optional parameters for the method 'CreateBinding' type CreateBindingParams struct { - Address *string `json:"Address,omitempty"` - BindingType *string `json:"BindingType,omitempty"` - CredentialSid *string `json:"CredentialSid,omitempty"` - Endpoint *string `json:"Endpoint,omitempty"` - Identity *string `json:"Identity,omitempty"` - NotificationProtocolVersion *string `json:"NotificationProtocolVersion,omitempty"` - Tag *[]string `json:"Tag,omitempty"` + Address *string `json:"Address,omitempty"` + BindingType *string `json:"BindingType,omitempty"` + CredentialSid *string `json:"CredentialSid,omitempty"` + Endpoint *string `json:"Endpoint,omitempty"` + Identity *string `json:"Identity,omitempty"` + NotificationProtocolVersion *string `json:"NotificationProtocolVersion,omitempty"` + Tag *[]string `json:"Tag,omitempty"` } /* @@ -56,60 +56,60 @@ type CreateBindingParams struct { * @param "NotificationProtocolVersion" (string) - The protocol version to use to send the notification. This defaults to the value of `default_xxxx_notification_protocol_version` for the protocol in the [Service](https://www.twilio.com/docs/notify/api/service-resource). The current version is `\\\"3\\\"` for `apn`, `fcm`, and `gcm` type Bindings. The parameter is not applicable to `sms` and `facebook-messenger` type Bindings as the data format is fixed. * @param "Tag" ([]string) - A tag that can be used to select the Bindings to notify. Repeat this parameter to specify more than one tag, up to a total of 20 tags. * @return NotifyV1ServiceBinding -*/ + */ func (c *DefaultApiService) CreateBinding(ServiceSid string, params *CreateBindingParams) (*NotifyV1ServiceBinding, error) { - path := "/v1/Services/{ServiceSid}/Bindings" + path := "/v1/Services/{ServiceSid}/Bindings" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Address != nil { - data.Set("Address", *params.Address) -} - if params != nil && params.BindingType != nil { - data.Set("BindingType", *params.BindingType) -} - if params != nil && params.CredentialSid != nil { - data.Set("CredentialSid", *params.CredentialSid) -} - if params != nil && params.Endpoint != nil { - data.Set("Endpoint", *params.Endpoint) -} - if params != nil && params.Identity != nil { - data.Set("Identity", *params.Identity) -} - if params != nil && params.NotificationProtocolVersion != nil { - data.Set("NotificationProtocolVersion", *params.NotificationProtocolVersion) -} - if params != nil && params.Tag != nil { - data.Set("Tag", strings.Join(*params.Tag, ",")) -} + data := url.Values{} + headers := 0 + if params != nil && params.Address != nil { + data.Set("Address", *params.Address) + } + if params != nil && params.BindingType != nil { + data.Set("BindingType", *params.BindingType) + } + if params != nil && params.CredentialSid != nil { + data.Set("CredentialSid", *params.CredentialSid) + } + if params != nil && params.Endpoint != nil { + data.Set("Endpoint", *params.Endpoint) + } + if params != nil && params.Identity != nil { + data.Set("Identity", *params.Identity) + } + if params != nil && params.NotificationProtocolVersion != nil { + data.Set("NotificationProtocolVersion", *params.NotificationProtocolVersion) + } + if params != nil && params.Tag != nil { + data.Set("Tag", strings.Join(*params.Tag, ",")) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &NotifyV1ServiceBinding{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &NotifyV1ServiceBinding{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateCredentialParams Optional parameters for the method 'CreateCredential' type CreateCredentialParams struct { - ApiKey *string `json:"ApiKey,omitempty"` - Certificate *string `json:"Certificate,omitempty"` + ApiKey *string `json:"ApiKey,omitempty"` + Certificate *string `json:"Certificate,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` - PrivateKey *string `json:"PrivateKey,omitempty"` - Sandbox *bool `json:"Sandbox,omitempty"` - Secret *string `json:"Secret,omitempty"` - Type *string `json:"Type,omitempty"` + PrivateKey *string `json:"PrivateKey,omitempty"` + Sandbox *bool `json:"Sandbox,omitempty"` + Secret *string `json:"Secret,omitempty"` + Type *string `json:"Type,omitempty"` } /* @@ -123,70 +123,70 @@ type CreateCredentialParams struct { * @param "Secret" (string) - [FCM only] The `Server key` of your project from Firebase console under Settings / Cloud messaging. * @param "Type" (string) - The Credential type. Can be: `gcm`, `fcm`, or `apn`. * @return NotifyV1Credential -*/ + */ func (c *DefaultApiService) CreateCredential(params *CreateCredentialParams) (*NotifyV1Credential, error) { - path := "/v1/Credentials" + path := "/v1/Credentials" - data := url.Values{} - headers := 0 - - if params != nil && params.ApiKey != nil { - data.Set("ApiKey", *params.ApiKey) -} - if params != nil && params.Certificate != nil { - data.Set("Certificate", *params.Certificate) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.PrivateKey != nil { - data.Set("PrivateKey", *params.PrivateKey) -} - if params != nil && params.Sandbox != nil { - data.Set("Sandbox", fmt.Sprint(*params.Sandbox)) -} - if params != nil && params.Secret != nil { - data.Set("Secret", *params.Secret) -} - if params != nil && params.Type != nil { - data.Set("Type", *params.Type) -} + data := url.Values{} + headers := 0 + if params != nil && params.ApiKey != nil { + data.Set("ApiKey", *params.ApiKey) + } + if params != nil && params.Certificate != nil { + data.Set("Certificate", *params.Certificate) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.PrivateKey != nil { + data.Set("PrivateKey", *params.PrivateKey) + } + if params != nil && params.Sandbox != nil { + data.Set("Sandbox", fmt.Sprint(*params.Sandbox)) + } + if params != nil && params.Secret != nil { + data.Set("Secret", *params.Secret) + } + if params != nil && params.Type != nil { + data.Set("Type", *params.Type) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &NotifyV1Credential{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &NotifyV1Credential{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateNotificationParams Optional parameters for the method 'CreateNotification' type CreateNotificationParams struct { - Action *string `json:"Action,omitempty"` - Alexa *map[string]interface{} `json:"Alexa,omitempty"` - Apn *map[string]interface{} `json:"Apn,omitempty"` - Body *string `json:"Body,omitempty"` - Data *map[string]interface{} `json:"Data,omitempty"` - DeliveryCallbackUrl *string `json:"DeliveryCallbackUrl,omitempty"` - FacebookMessenger *map[string]interface{} `json:"FacebookMessenger,omitempty"` - Fcm *map[string]interface{} `json:"Fcm,omitempty"` - Gcm *map[string]interface{} `json:"Gcm,omitempty"` - Identity *[]string `json:"Identity,omitempty"` - Priority *string `json:"Priority,omitempty"` - Segment *[]string `json:"Segment,omitempty"` - Sms *map[string]interface{} `json:"Sms,omitempty"` - Sound *string `json:"Sound,omitempty"` - Tag *[]string `json:"Tag,omitempty"` - Title *string `json:"Title,omitempty"` - ToBinding *[]string `json:"ToBinding,omitempty"` - Ttl *int32 `json:"Ttl,omitempty"` + Action *string `json:"Action,omitempty"` + Alexa *map[string]interface{} `json:"Alexa,omitempty"` + Apn *map[string]interface{} `json:"Apn,omitempty"` + Body *string `json:"Body,omitempty"` + Data *map[string]interface{} `json:"Data,omitempty"` + DeliveryCallbackUrl *string `json:"DeliveryCallbackUrl,omitempty"` + FacebookMessenger *map[string]interface{} `json:"FacebookMessenger,omitempty"` + Fcm *map[string]interface{} `json:"Fcm,omitempty"` + Gcm *map[string]interface{} `json:"Gcm,omitempty"` + Identity *[]string `json:"Identity,omitempty"` + Priority *string `json:"Priority,omitempty"` + Segment *[]string `json:"Segment,omitempty"` + Sms *map[string]interface{} `json:"Sms,omitempty"` + Sound *string `json:"Sound,omitempty"` + Tag *[]string `json:"Tag,omitempty"` + Title *string `json:"Title,omitempty"` + ToBinding *[]string `json:"ToBinding,omitempty"` + Ttl *int32 `json:"Ttl,omitempty"` } /* @@ -212,142 +212,142 @@ type CreateNotificationParams struct { * @param "ToBinding" ([]string) - The destination address specified as a JSON string. Multiple `to_binding` parameters can be included but the total size of the request entity should not exceed 1MB. This is typically sufficient for 10,000 phone numbers. * @param "Ttl" (int32) - How long, in seconds, the notification is valid. Can be an integer between 0 and 2,419,200, which is 4 weeks, the default and the maximum supported time to live (TTL). Delivery should be attempted if the device is offline until the TTL elapses. Zero means that the notification delivery is attempted immediately, only once, and is not stored for future delivery. SMS does not support this property. * @return NotifyV1ServiceNotification -*/ + */ func (c *DefaultApiService) CreateNotification(ServiceSid string, params *CreateNotificationParams) (*NotifyV1ServiceNotification, error) { - path := "/v1/Services/{ServiceSid}/Notifications" + path := "/v1/Services/{ServiceSid}/Notifications" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Action != nil { - data.Set("Action", *params.Action) -} - if params != nil && params.Alexa != nil { - v, err := json.Marshal(params.Alexa) + data := url.Values{} + headers := 0 - if err != nil { - return nil, err + if params != nil && params.Action != nil { + data.Set("Action", *params.Action) } + if params != nil && params.Alexa != nil { + v, err := json.Marshal(params.Alexa) - data.Set("Alexa", fmt.Sprint(v)) -} - if params != nil && params.Apn != nil { - v, err := json.Marshal(params.Apn) + if err != nil { + return nil, err + } - if err != nil { - return nil, err + data.Set("Alexa", fmt.Sprint(v)) } + if params != nil && params.Apn != nil { + v, err := json.Marshal(params.Apn) - data.Set("Apn", fmt.Sprint(v)) -} - if params != nil && params.Body != nil { - data.Set("Body", *params.Body) -} - if params != nil && params.Data != nil { - v, err := json.Marshal(params.Data) + if err != nil { + return nil, err + } - if err != nil { - return nil, err + data.Set("Apn", fmt.Sprint(v)) + } + if params != nil && params.Body != nil { + data.Set("Body", *params.Body) } + if params != nil && params.Data != nil { + v, err := json.Marshal(params.Data) - data.Set("Data", fmt.Sprint(v)) -} - if params != nil && params.DeliveryCallbackUrl != nil { - data.Set("DeliveryCallbackUrl", *params.DeliveryCallbackUrl) -} - if params != nil && params.FacebookMessenger != nil { - v, err := json.Marshal(params.FacebookMessenger) + if err != nil { + return nil, err + } - if err != nil { - return nil, err + data.Set("Data", fmt.Sprint(v)) + } + if params != nil && params.DeliveryCallbackUrl != nil { + data.Set("DeliveryCallbackUrl", *params.DeliveryCallbackUrl) } + if params != nil && params.FacebookMessenger != nil { + v, err := json.Marshal(params.FacebookMessenger) - data.Set("FacebookMessenger", fmt.Sprint(v)) -} - if params != nil && params.Fcm != nil { - v, err := json.Marshal(params.Fcm) + if err != nil { + return nil, err + } - if err != nil { - return nil, err + data.Set("FacebookMessenger", fmt.Sprint(v)) } + if params != nil && params.Fcm != nil { + v, err := json.Marshal(params.Fcm) - data.Set("Fcm", fmt.Sprint(v)) -} - if params != nil && params.Gcm != nil { - v, err := json.Marshal(params.Gcm) + if err != nil { + return nil, err + } - if err != nil { - return nil, err + data.Set("Fcm", fmt.Sprint(v)) } + if params != nil && params.Gcm != nil { + v, err := json.Marshal(params.Gcm) - data.Set("Gcm", fmt.Sprint(v)) -} - if params != nil && params.Identity != nil { - data.Set("Identity", strings.Join(*params.Identity, ",")) -} - if params != nil && params.Priority != nil { - data.Set("Priority", *params.Priority) -} - if params != nil && params.Segment != nil { - data.Set("Segment", strings.Join(*params.Segment, ",")) -} - if params != nil && params.Sms != nil { - v, err := json.Marshal(params.Sms) + if err != nil { + return nil, err + } - if err != nil { - return nil, err + data.Set("Gcm", fmt.Sprint(v)) + } + if params != nil && params.Identity != nil { + data.Set("Identity", strings.Join(*params.Identity, ",")) } + if params != nil && params.Priority != nil { + data.Set("Priority", *params.Priority) + } + if params != nil && params.Segment != nil { + data.Set("Segment", strings.Join(*params.Segment, ",")) + } + if params != nil && params.Sms != nil { + v, err := json.Marshal(params.Sms) - data.Set("Sms", fmt.Sprint(v)) -} - if params != nil && params.Sound != nil { - data.Set("Sound", *params.Sound) -} - if params != nil && params.Tag != nil { - data.Set("Tag", strings.Join(*params.Tag, ",")) -} - if params != nil && params.Title != nil { - data.Set("Title", *params.Title) -} - if params != nil && params.ToBinding != nil { - data.Set("ToBinding", strings.Join(*params.ToBinding, ",")) -} - if params != nil && params.Ttl != nil { - data.Set("Ttl", fmt.Sprint(*params.Ttl)) -} + if err != nil { + return nil, err + } + data.Set("Sms", fmt.Sprint(v)) + } + if params != nil && params.Sound != nil { + data.Set("Sound", *params.Sound) + } + if params != nil && params.Tag != nil { + data.Set("Tag", strings.Join(*params.Tag, ",")) + } + if params != nil && params.Title != nil { + data.Set("Title", *params.Title) + } + if params != nil && params.ToBinding != nil { + data.Set("ToBinding", strings.Join(*params.ToBinding, ",")) + } + if params != nil && params.Ttl != nil { + data.Set("Ttl", fmt.Sprint(*params.Ttl)) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &NotifyV1ServiceNotification{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &NotifyV1ServiceNotification{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateServiceParams Optional parameters for the method 'CreateService' type CreateServiceParams struct { - AlexaSkillId *string `json:"AlexaSkillId,omitempty"` - ApnCredentialSid *string `json:"ApnCredentialSid,omitempty"` + AlexaSkillId *string `json:"AlexaSkillId,omitempty"` + ApnCredentialSid *string `json:"ApnCredentialSid,omitempty"` DefaultAlexaNotificationProtocolVersion *string `json:"DefaultAlexaNotificationProtocolVersion,omitempty"` - DefaultApnNotificationProtocolVersion *string `json:"DefaultApnNotificationProtocolVersion,omitempty"` - DefaultFcmNotificationProtocolVersion *string `json:"DefaultFcmNotificationProtocolVersion,omitempty"` - DefaultGcmNotificationProtocolVersion *string `json:"DefaultGcmNotificationProtocolVersion,omitempty"` - DeliveryCallbackEnabled *bool `json:"DeliveryCallbackEnabled,omitempty"` - DeliveryCallbackUrl *string `json:"DeliveryCallbackUrl,omitempty"` - FacebookMessengerPageId *string `json:"FacebookMessengerPageId,omitempty"` - FcmCredentialSid *string `json:"FcmCredentialSid,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - GcmCredentialSid *string `json:"GcmCredentialSid,omitempty"` - LogEnabled *bool `json:"LogEnabled,omitempty"` - MessagingServiceSid *string `json:"MessagingServiceSid,omitempty"` + DefaultApnNotificationProtocolVersion *string `json:"DefaultApnNotificationProtocolVersion,omitempty"` + DefaultFcmNotificationProtocolVersion *string `json:"DefaultFcmNotificationProtocolVersion,omitempty"` + DefaultGcmNotificationProtocolVersion *string `json:"DefaultGcmNotificationProtocolVersion,omitempty"` + DeliveryCallbackEnabled *bool `json:"DeliveryCallbackEnabled,omitempty"` + DeliveryCallbackUrl *string `json:"DeliveryCallbackUrl,omitempty"` + FacebookMessengerPageId *string `json:"FacebookMessengerPageId,omitempty"` + FcmCredentialSid *string `json:"FcmCredentialSid,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + GcmCredentialSid *string `json:"GcmCredentialSid,omitempty"` + LogEnabled *bool `json:"LogEnabled,omitempty"` + MessagingServiceSid *string `json:"MessagingServiceSid,omitempty"` } /* @@ -368,141 +368,134 @@ type CreateServiceParams struct { * @param "LogEnabled" (bool) - Whether to log notifications. Can be: `true` or `false` and the default is `true`. * @param "MessagingServiceSid" (string) - The SID of the [Messaging Service](https://www.twilio.com/docs/sms/send-messages#messaging-services) to use for SMS Bindings. This parameter must be set in order to send SMS notifications. * @return NotifyV1Service -*/ + */ func (c *DefaultApiService) CreateService(params *CreateServiceParams) (*NotifyV1Service, error) { - path := "/v1/Services" - - data := url.Values{} - headers := 0 + path := "/v1/Services" - if params != nil && params.AlexaSkillId != nil { - data.Set("AlexaSkillId", *params.AlexaSkillId) -} - if params != nil && params.ApnCredentialSid != nil { - data.Set("ApnCredentialSid", *params.ApnCredentialSid) -} - if params != nil && params.DefaultAlexaNotificationProtocolVersion != nil { - data.Set("DefaultAlexaNotificationProtocolVersion", *params.DefaultAlexaNotificationProtocolVersion) -} - if params != nil && params.DefaultApnNotificationProtocolVersion != nil { - data.Set("DefaultApnNotificationProtocolVersion", *params.DefaultApnNotificationProtocolVersion) -} - if params != nil && params.DefaultFcmNotificationProtocolVersion != nil { - data.Set("DefaultFcmNotificationProtocolVersion", *params.DefaultFcmNotificationProtocolVersion) -} - if params != nil && params.DefaultGcmNotificationProtocolVersion != nil { - data.Set("DefaultGcmNotificationProtocolVersion", *params.DefaultGcmNotificationProtocolVersion) -} - if params != nil && params.DeliveryCallbackEnabled != nil { - data.Set("DeliveryCallbackEnabled", fmt.Sprint(*params.DeliveryCallbackEnabled)) -} - if params != nil && params.DeliveryCallbackUrl != nil { - data.Set("DeliveryCallbackUrl", *params.DeliveryCallbackUrl) -} - if params != nil && params.FacebookMessengerPageId != nil { - data.Set("FacebookMessengerPageId", *params.FacebookMessengerPageId) -} - if params != nil && params.FcmCredentialSid != nil { - data.Set("FcmCredentialSid", *params.FcmCredentialSid) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.GcmCredentialSid != nil { - data.Set("GcmCredentialSid", *params.GcmCredentialSid) -} - if params != nil && params.LogEnabled != nil { - data.Set("LogEnabled", fmt.Sprint(*params.LogEnabled)) -} - if params != nil && params.MessagingServiceSid != nil { - data.Set("MessagingServiceSid", *params.MessagingServiceSid) -} + data := url.Values{} + headers := 0 + if params != nil && params.AlexaSkillId != nil { + data.Set("AlexaSkillId", *params.AlexaSkillId) + } + if params != nil && params.ApnCredentialSid != nil { + data.Set("ApnCredentialSid", *params.ApnCredentialSid) + } + if params != nil && params.DefaultAlexaNotificationProtocolVersion != nil { + data.Set("DefaultAlexaNotificationProtocolVersion", *params.DefaultAlexaNotificationProtocolVersion) + } + if params != nil && params.DefaultApnNotificationProtocolVersion != nil { + data.Set("DefaultApnNotificationProtocolVersion", *params.DefaultApnNotificationProtocolVersion) + } + if params != nil && params.DefaultFcmNotificationProtocolVersion != nil { + data.Set("DefaultFcmNotificationProtocolVersion", *params.DefaultFcmNotificationProtocolVersion) + } + if params != nil && params.DefaultGcmNotificationProtocolVersion != nil { + data.Set("DefaultGcmNotificationProtocolVersion", *params.DefaultGcmNotificationProtocolVersion) + } + if params != nil && params.DeliveryCallbackEnabled != nil { + data.Set("DeliveryCallbackEnabled", fmt.Sprint(*params.DeliveryCallbackEnabled)) + } + if params != nil && params.DeliveryCallbackUrl != nil { + data.Set("DeliveryCallbackUrl", *params.DeliveryCallbackUrl) + } + if params != nil && params.FacebookMessengerPageId != nil { + data.Set("FacebookMessengerPageId", *params.FacebookMessengerPageId) + } + if params != nil && params.FcmCredentialSid != nil { + data.Set("FcmCredentialSid", *params.FcmCredentialSid) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.GcmCredentialSid != nil { + data.Set("GcmCredentialSid", *params.GcmCredentialSid) + } + if params != nil && params.LogEnabled != nil { + data.Set("LogEnabled", fmt.Sprint(*params.LogEnabled)) + } + if params != nil && params.MessagingServiceSid != nil { + data.Set("MessagingServiceSid", *params.MessagingServiceSid) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &NotifyV1Service{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &NotifyV1Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * DeleteBinding Method for DeleteBinding * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/notify/api/service-resource) to delete the resource from. * @param Sid The Twilio-provided string that uniquely identifies the Binding resource to delete. -*/ -func (c *DefaultApiService) DeleteBinding(ServiceSid string, Sid string, ) (error) { - path := "/v1/Services/{ServiceSid}/Bindings/{Sid}" + */ +func (c *DefaultApiService) DeleteBinding(ServiceSid string, Sid string) error { + path := "/v1/Services/{ServiceSid}/Bindings/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* * DeleteCredential Method for DeleteCredential * @param Sid The Twilio-provided string that uniquely identifies the Credential resource to delete. -*/ -func (c *DefaultApiService) DeleteCredential(Sid string, ) (error) { - path := "/v1/Credentials/{Sid}" + */ +func (c *DefaultApiService) DeleteCredential(Sid string) error { + path := "/v1/Credentials/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* * DeleteService Method for DeleteService * @param Sid The Twilio-provided string that uniquely identifies the Service resource to delete. -*/ -func (c *DefaultApiService) DeleteService(Sid string, ) (error) { - path := "/v1/Services/{Sid}" + */ +func (c *DefaultApiService) DeleteService(Sid string) error { + path := "/v1/Services/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -510,96 +503,91 @@ func (c *DefaultApiService) DeleteService(Sid string, ) (error) { * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/notify/api/service-resource) to fetch the resource from. * @param Sid The Twilio-provided string that uniquely identifies the Binding resource to fetch. * @return NotifyV1ServiceBinding -*/ -func (c *DefaultApiService) FetchBinding(ServiceSid string, Sid string, ) (*NotifyV1ServiceBinding, error) { - path := "/v1/Services/{ServiceSid}/Bindings/{Sid}" + */ +func (c *DefaultApiService) FetchBinding(ServiceSid string, Sid string) (*NotifyV1ServiceBinding, error) { + path := "/v1/Services/{ServiceSid}/Bindings/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &NotifyV1ServiceBinding{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &NotifyV1ServiceBinding{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * FetchCredential Method for FetchCredential * @param Sid The Twilio-provided string that uniquely identifies the Credential resource to fetch. * @return NotifyV1Credential -*/ -func (c *DefaultApiService) FetchCredential(Sid string, ) (*NotifyV1Credential, error) { - path := "/v1/Credentials/{Sid}" + */ +func (c *DefaultApiService) FetchCredential(Sid string) (*NotifyV1Credential, error) { + path := "/v1/Credentials/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &NotifyV1Credential{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &NotifyV1Credential{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * FetchService Method for FetchService * @param Sid The Twilio-provided string that uniquely identifies the Service resource to fetch. * @return NotifyV1Service -*/ -func (c *DefaultApiService) FetchService(Sid string, ) (*NotifyV1Service, error) { - path := "/v1/Services/{Sid}" + */ +func (c *DefaultApiService) FetchService(Sid string) (*NotifyV1Service, error) { + path := "/v1/Services/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &NotifyV1Service{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &NotifyV1Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListBindingParams Optional parameters for the method 'ListBinding' type ListBindingParams struct { StartDate *time.Time `json:"StartDate,omitempty"` - EndDate *time.Time `json:"EndDate,omitempty"` - Identity *[]string `json:"Identity,omitempty"` - Tag *[]string `json:"Tag,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + EndDate *time.Time `json:"EndDate,omitempty"` + Identity *[]string `json:"Identity,omitempty"` + Tag *[]string `json:"Tag,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -612,45 +600,45 @@ type ListBindingParams struct { * @param "Tag" ([]string) - Only list Bindings that have all of the specified Tags. The following implicit tags are available: `all`, `apn`, `fcm`, `gcm`, `sms`, `facebook-messenger`. Up to 5 tags are allowed. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListBindingResponse -*/ + */ func (c *DefaultApiService) ListBinding(ServiceSid string, params *ListBindingParams) (*ListBindingResponse, error) { - path := "/v1/Services/{ServiceSid}/Bindings" + path := "/v1/Services/{ServiceSid}/Bindings" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.StartDate != nil { - data.Set("StartDate", fmt.Sprint(*params.StartDate)) -} - if params != nil && params.EndDate != nil { - data.Set("EndDate", fmt.Sprint(*params.EndDate)) -} - if params != nil && params.Identity != nil { - data.Set("Identity", strings.Join(*params.Identity, ",")) -} - if params != nil && params.Tag != nil { - data.Set("Tag", strings.Join(*params.Tag, ",")) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) + } + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) + } + if params != nil && params.Identity != nil { + data.Set("Identity", strings.Join(*params.Identity, ",")) + } + if params != nil && params.Tag != nil { + data.Set("Tag", strings.Join(*params.Tag, ",")) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListBindingResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListBindingResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListCredentialParams Optional parameters for the method 'ListCredential' type ListCredentialParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -661,36 +649,36 @@ type ListCredentialParams struct { * @param optional nil or *ListCredentialParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListCredentialResponse -*/ + */ func (c *DefaultApiService) ListCredential(params *ListCredentialParams) (*ListCredentialResponse, error) { - path := "/v1/Credentials" + path := "/v1/Credentials" - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListCredentialResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListCredentialResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListServiceParams Optional parameters for the method 'ListService' type ListServiceParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -699,43 +687,43 @@ type ListServiceParams struct { * @param "FriendlyName" (string) - The string that identifies the Service resources to read. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListServiceResponse -*/ + */ func (c *DefaultApiService) ListService(params *ListServiceParams) (*ListServiceResponse, error) { - path := "/v1/Services" + path := "/v1/Services" - data := url.Values{} - headers := 0 - - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListServiceResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListServiceResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateCredentialParams Optional parameters for the method 'UpdateCredential' type UpdateCredentialParams struct { - ApiKey *string `json:"ApiKey,omitempty"` - Certificate *string `json:"Certificate,omitempty"` + ApiKey *string `json:"ApiKey,omitempty"` + Certificate *string `json:"Certificate,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` - PrivateKey *string `json:"PrivateKey,omitempty"` - Sandbox *bool `json:"Sandbox,omitempty"` - Secret *string `json:"Secret,omitempty"` + PrivateKey *string `json:"PrivateKey,omitempty"` + Sandbox *bool `json:"Sandbox,omitempty"` + Secret *string `json:"Secret,omitempty"` } /* @@ -749,64 +737,64 @@ type UpdateCredentialParams struct { * @param "Sandbox" (bool) - [APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production. * @param "Secret" (string) - [FCM only] The `Server key` of your project from Firebase console under Settings / Cloud messaging. * @return NotifyV1Credential -*/ + */ func (c *DefaultApiService) UpdateCredential(Sid string, params *UpdateCredentialParams) (*NotifyV1Credential, error) { - path := "/v1/Credentials/{Sid}" + path := "/v1/Credentials/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.ApiKey != nil { - data.Set("ApiKey", *params.ApiKey) -} - if params != nil && params.Certificate != nil { - data.Set("Certificate", *params.Certificate) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.PrivateKey != nil { - data.Set("PrivateKey", *params.PrivateKey) -} - if params != nil && params.Sandbox != nil { - data.Set("Sandbox", fmt.Sprint(*params.Sandbox)) -} - if params != nil && params.Secret != nil { - data.Set("Secret", *params.Secret) -} + data := url.Values{} + headers := 0 + if params != nil && params.ApiKey != nil { + data.Set("ApiKey", *params.ApiKey) + } + if params != nil && params.Certificate != nil { + data.Set("Certificate", *params.Certificate) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.PrivateKey != nil { + data.Set("PrivateKey", *params.PrivateKey) + } + if params != nil && params.Sandbox != nil { + data.Set("Sandbox", fmt.Sprint(*params.Sandbox)) + } + if params != nil && params.Secret != nil { + data.Set("Secret", *params.Secret) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &NotifyV1Credential{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &NotifyV1Credential{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateServiceParams Optional parameters for the method 'UpdateService' type UpdateServiceParams struct { - AlexaSkillId *string `json:"AlexaSkillId,omitempty"` - ApnCredentialSid *string `json:"ApnCredentialSid,omitempty"` + AlexaSkillId *string `json:"AlexaSkillId,omitempty"` + ApnCredentialSid *string `json:"ApnCredentialSid,omitempty"` DefaultAlexaNotificationProtocolVersion *string `json:"DefaultAlexaNotificationProtocolVersion,omitempty"` - DefaultApnNotificationProtocolVersion *string `json:"DefaultApnNotificationProtocolVersion,omitempty"` - DefaultFcmNotificationProtocolVersion *string `json:"DefaultFcmNotificationProtocolVersion,omitempty"` - DefaultGcmNotificationProtocolVersion *string `json:"DefaultGcmNotificationProtocolVersion,omitempty"` - DeliveryCallbackEnabled *bool `json:"DeliveryCallbackEnabled,omitempty"` - DeliveryCallbackUrl *string `json:"DeliveryCallbackUrl,omitempty"` - FacebookMessengerPageId *string `json:"FacebookMessengerPageId,omitempty"` - FcmCredentialSid *string `json:"FcmCredentialSid,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - GcmCredentialSid *string `json:"GcmCredentialSid,omitempty"` - LogEnabled *bool `json:"LogEnabled,omitempty"` - MessagingServiceSid *string `json:"MessagingServiceSid,omitempty"` + DefaultApnNotificationProtocolVersion *string `json:"DefaultApnNotificationProtocolVersion,omitempty"` + DefaultFcmNotificationProtocolVersion *string `json:"DefaultFcmNotificationProtocolVersion,omitempty"` + DefaultGcmNotificationProtocolVersion *string `json:"DefaultGcmNotificationProtocolVersion,omitempty"` + DeliveryCallbackEnabled *bool `json:"DeliveryCallbackEnabled,omitempty"` + DeliveryCallbackUrl *string `json:"DeliveryCallbackUrl,omitempty"` + FacebookMessengerPageId *string `json:"FacebookMessengerPageId,omitempty"` + FcmCredentialSid *string `json:"FcmCredentialSid,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + GcmCredentialSid *string `json:"GcmCredentialSid,omitempty"` + LogEnabled *bool `json:"LogEnabled,omitempty"` + MessagingServiceSid *string `json:"MessagingServiceSid,omitempty"` } /* @@ -828,69 +816,68 @@ type UpdateServiceParams struct { * @param "LogEnabled" (bool) - Whether to log notifications. Can be: `true` or `false` and the default is `true`. * @param "MessagingServiceSid" (string) - The SID of the [Messaging Service](https://www.twilio.com/docs/sms/send-messages#messaging-services) to use for SMS Bindings. This parameter must be set in order to send SMS notifications. * @return NotifyV1Service -*/ + */ func (c *DefaultApiService) UpdateService(Sid string, params *UpdateServiceParams) (*NotifyV1Service, error) { - path := "/v1/Services/{Sid}" + path := "/v1/Services/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.AlexaSkillId != nil { - data.Set("AlexaSkillId", *params.AlexaSkillId) -} - if params != nil && params.ApnCredentialSid != nil { - data.Set("ApnCredentialSid", *params.ApnCredentialSid) -} - if params != nil && params.DefaultAlexaNotificationProtocolVersion != nil { - data.Set("DefaultAlexaNotificationProtocolVersion", *params.DefaultAlexaNotificationProtocolVersion) -} - if params != nil && params.DefaultApnNotificationProtocolVersion != nil { - data.Set("DefaultApnNotificationProtocolVersion", *params.DefaultApnNotificationProtocolVersion) -} - if params != nil && params.DefaultFcmNotificationProtocolVersion != nil { - data.Set("DefaultFcmNotificationProtocolVersion", *params.DefaultFcmNotificationProtocolVersion) -} - if params != nil && params.DefaultGcmNotificationProtocolVersion != nil { - data.Set("DefaultGcmNotificationProtocolVersion", *params.DefaultGcmNotificationProtocolVersion) -} - if params != nil && params.DeliveryCallbackEnabled != nil { - data.Set("DeliveryCallbackEnabled", fmt.Sprint(*params.DeliveryCallbackEnabled)) -} - if params != nil && params.DeliveryCallbackUrl != nil { - data.Set("DeliveryCallbackUrl", *params.DeliveryCallbackUrl) -} - if params != nil && params.FacebookMessengerPageId != nil { - data.Set("FacebookMessengerPageId", *params.FacebookMessengerPageId) -} - if params != nil && params.FcmCredentialSid != nil { - data.Set("FcmCredentialSid", *params.FcmCredentialSid) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.GcmCredentialSid != nil { - data.Set("GcmCredentialSid", *params.GcmCredentialSid) -} - if params != nil && params.LogEnabled != nil { - data.Set("LogEnabled", fmt.Sprint(*params.LogEnabled)) -} - if params != nil && params.MessagingServiceSid != nil { - data.Set("MessagingServiceSid", *params.MessagingServiceSid) -} + data := url.Values{} + headers := 0 + if params != nil && params.AlexaSkillId != nil { + data.Set("AlexaSkillId", *params.AlexaSkillId) + } + if params != nil && params.ApnCredentialSid != nil { + data.Set("ApnCredentialSid", *params.ApnCredentialSid) + } + if params != nil && params.DefaultAlexaNotificationProtocolVersion != nil { + data.Set("DefaultAlexaNotificationProtocolVersion", *params.DefaultAlexaNotificationProtocolVersion) + } + if params != nil && params.DefaultApnNotificationProtocolVersion != nil { + data.Set("DefaultApnNotificationProtocolVersion", *params.DefaultApnNotificationProtocolVersion) + } + if params != nil && params.DefaultFcmNotificationProtocolVersion != nil { + data.Set("DefaultFcmNotificationProtocolVersion", *params.DefaultFcmNotificationProtocolVersion) + } + if params != nil && params.DefaultGcmNotificationProtocolVersion != nil { + data.Set("DefaultGcmNotificationProtocolVersion", *params.DefaultGcmNotificationProtocolVersion) + } + if params != nil && params.DeliveryCallbackEnabled != nil { + data.Set("DeliveryCallbackEnabled", fmt.Sprint(*params.DeliveryCallbackEnabled)) + } + if params != nil && params.DeliveryCallbackUrl != nil { + data.Set("DeliveryCallbackUrl", *params.DeliveryCallbackUrl) + } + if params != nil && params.FacebookMessengerPageId != nil { + data.Set("FacebookMessengerPageId", *params.FacebookMessengerPageId) + } + if params != nil && params.FcmCredentialSid != nil { + data.Set("FcmCredentialSid", *params.FcmCredentialSid) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.GcmCredentialSid != nil { + data.Set("GcmCredentialSid", *params.GcmCredentialSid) + } + if params != nil && params.LogEnabled != nil { + data.Set("LogEnabled", fmt.Sprint(*params.LogEnabled)) + } + if params != nil && params.MessagingServiceSid != nil { + data.Set("MessagingServiceSid", *params.MessagingServiceSid) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &NotifyV1Service{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &NotifyV1Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } diff --git a/twilio/rest/notify/v1/model_list_binding_response.go b/twilio/rest/notify/v1/model_list_binding_response.go index 6303c4875..f281fc3aa 100644 --- a/twilio/rest/notify/v1/model_list_binding_response.go +++ b/twilio/rest/notify/v1/model_list_binding_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Notify - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Notify + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListBindingResponse struct for ListBindingResponse type ListBindingResponse struct { - Bindings []NotifyV1ServiceBinding `json:"Bindings,omitempty"` - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Bindings []NotifyV1ServiceBinding `json:"Bindings,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/notify/v1/model_list_credential_response.go b/twilio/rest/notify/v1/model_list_credential_response.go index d9f2bc6e4..26d054fd1 100644 --- a/twilio/rest/notify/v1/model_list_credential_response.go +++ b/twilio/rest/notify/v1/model_list_credential_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Notify - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Notify + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListCredentialResponse struct for ListCredentialResponse type ListCredentialResponse struct { - Credentials []NotifyV1Credential `json:"Credentials,omitempty"` - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Credentials []NotifyV1Credential `json:"Credentials,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/notify/v1/model_list_credential_response_meta.go b/twilio/rest/notify/v1/model_list_credential_response_meta.go index 5ba9eca9e..df339dd71 100644 --- a/twilio/rest/notify/v1/model_list_credential_response_meta.go +++ b/twilio/rest/notify/v1/model_list_credential_response_meta.go @@ -1,22 +1,23 @@ /* - * Twilio - Notify - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Notify + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListCredentialResponseMeta struct for ListCredentialResponseMeta type ListCredentialResponseMeta struct { - FirstPageUrl string `json:"FirstPageUrl,omitempty"` - Key string `json:"Key,omitempty"` - NextPageUrl string `json:"NextPageUrl,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` - Url string `json:"Url,omitempty"` + Url string `json:"Url,omitempty"` } diff --git a/twilio/rest/notify/v1/model_list_service_response.go b/twilio/rest/notify/v1/model_list_service_response.go index 375c97391..9794d4300 100644 --- a/twilio/rest/notify/v1/model_list_service_response.go +++ b/twilio/rest/notify/v1/model_list_service_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Notify - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Notify + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListServiceResponse struct for ListServiceResponse type ListServiceResponse struct { - Meta ListCredentialResponseMeta `json:"Meta,omitempty"` - Services []NotifyV1Service `json:"Services,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Services []NotifyV1Service `json:"Services,omitempty"` } diff --git a/twilio/rest/notify/v1/model_notify_v1_credential.go b/twilio/rest/notify/v1/model_notify_v1_credential.go index ddfc8005c..45708b33d 100644 --- a/twilio/rest/notify/v1/model_notify_v1_credential.go +++ b/twilio/rest/notify/v1/model_notify_v1_credential.go @@ -1,18 +1,20 @@ /* - * Twilio - Notify - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Notify + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // NotifyV1Credential struct for NotifyV1Credential type NotifyV1Credential struct { // The SID of the Account that created the resource diff --git a/twilio/rest/notify/v1/model_notify_v1_service.go b/twilio/rest/notify/v1/model_notify_v1_service.go index d53716c42..69dd55901 100644 --- a/twilio/rest/notify/v1/model_notify_v1_service.go +++ b/twilio/rest/notify/v1/model_notify_v1_service.go @@ -1,18 +1,20 @@ /* - * Twilio - Notify - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Notify + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // NotifyV1Service struct for NotifyV1Service type NotifyV1Service struct { // The SID of the Account that created the resource diff --git a/twilio/rest/notify/v1/model_notify_v1_service_binding.go b/twilio/rest/notify/v1/model_notify_v1_service_binding.go index a9088a58a..6e051ba70 100644 --- a/twilio/rest/notify/v1/model_notify_v1_service_binding.go +++ b/twilio/rest/notify/v1/model_notify_v1_service_binding.go @@ -1,18 +1,20 @@ /* - * Twilio - Notify - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Notify + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // NotifyV1ServiceBinding struct for NotifyV1ServiceBinding type NotifyV1ServiceBinding struct { // The SID of the Account that created the resource diff --git a/twilio/rest/notify/v1/model_notify_v1_service_notification.go b/twilio/rest/notify/v1/model_notify_v1_service_notification.go index e72be4d0b..402a73940 100644 --- a/twilio/rest/notify/v1/model_notify_v1_service_notification.go +++ b/twilio/rest/notify/v1/model_notify_v1_service_notification.go @@ -1,18 +1,20 @@ /* - * Twilio - Notify - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Notify + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // NotifyV1ServiceNotification struct for NotifyV1ServiceNotification type NotifyV1ServiceNotification struct { // The SID of the Account that created the resource diff --git a/twilio/rest/numbers/v2/api_default.go b/twilio/rest/numbers/v2/api_default.go index e2170fe73..9c2a0046a 100644 --- a/twilio/rest/numbers/v2/api_default.go +++ b/twilio/rest/numbers/v2/api_default.go @@ -1,11 +1,11 @@ /* - * Twilio - Numbers - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Numbers + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,9 +14,10 @@ package openapi import ( "encoding/json" "fmt" - twilio "github.com/twilio/twilio-go/client" "net/url" - "strings" + "strings" + + twilio "github.com/twilio/twilio-go/client" ) type DefaultApiService struct { @@ -25,20 +26,20 @@ type DefaultApiService struct { } func NewDefaultApiService(client *twilio.Client) *DefaultApiService { - return &DefaultApiService { - client: client, + return &DefaultApiService{ + client: client, baseURL: "https://numbers.twilio.com", } } // CreateBundleParams Optional parameters for the method 'CreateBundle' type CreateBundleParams struct { - Email *string `json:"Email,omitempty"` - EndUserType *string `json:"EndUserType,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - IsoCountry *string `json:"IsoCountry,omitempty"` - NumberType *string `json:"NumberType,omitempty"` - RegulationSid *string `json:"RegulationSid,omitempty"` + Email *string `json:"Email,omitempty"` + EndUserType *string `json:"EndUserType,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + IsoCountry *string `json:"IsoCountry,omitempty"` + NumberType *string `json:"NumberType,omitempty"` + RegulationSid *string `json:"RegulationSid,omitempty"` StatusCallback *string `json:"StatusCallback,omitempty"` } @@ -54,55 +55,55 @@ type CreateBundleParams struct { * @param "RegulationSid" (string) - The unique string of a regulation that is associated to the Bundle resource. * @param "StatusCallback" (string) - The URL we call to inform your application of status changes. * @return NumbersV2RegulatoryComplianceBundle -*/ + */ func (c *DefaultApiService) CreateBundle(params *CreateBundleParams) (*NumbersV2RegulatoryComplianceBundle, error) { - path := "/v2/RegulatoryCompliance/Bundles" + path := "/v2/RegulatoryCompliance/Bundles" - data := url.Values{} - headers := 0 - - if params != nil && params.Email != nil { - data.Set("Email", *params.Email) -} - if params != nil && params.EndUserType != nil { - data.Set("EndUserType", *params.EndUserType) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.IsoCountry != nil { - data.Set("IsoCountry", *params.IsoCountry) -} - if params != nil && params.NumberType != nil { - data.Set("NumberType", *params.NumberType) -} - if params != nil && params.RegulationSid != nil { - data.Set("RegulationSid", *params.RegulationSid) -} - if params != nil && params.StatusCallback != nil { - data.Set("StatusCallback", *params.StatusCallback) -} + data := url.Values{} + headers := 0 + if params != nil && params.Email != nil { + data.Set("Email", *params.Email) + } + if params != nil && params.EndUserType != nil { + data.Set("EndUserType", *params.EndUserType) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.IsoCountry != nil { + data.Set("IsoCountry", *params.IsoCountry) + } + if params != nil && params.NumberType != nil { + data.Set("NumberType", *params.NumberType) + } + if params != nil && params.RegulationSid != nil { + data.Set("RegulationSid", *params.RegulationSid) + } + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &NumbersV2RegulatoryComplianceBundle{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &NumbersV2RegulatoryComplianceBundle{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateEndUserParams Optional parameters for the method 'CreateEndUser' type CreateEndUserParams struct { - Attributes *map[string]interface{} `json:"Attributes,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Type *string `json:"Type,omitempty"` + Attributes *map[string]interface{} `json:"Attributes,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Type *string `json:"Type,omitempty"` } /* @@ -113,73 +114,71 @@ type CreateEndUserParams struct { * @param "FriendlyName" (string) - The string that you assigned to describe the resource. * @param "Type" (string) - The type of end user of the Bundle resource - can be `individual` or `business`. * @return NumbersV2RegulatoryComplianceEndUser -*/ + */ func (c *DefaultApiService) CreateEndUser(params *CreateEndUserParams) (*NumbersV2RegulatoryComplianceEndUser, error) { - path := "/v2/RegulatoryCompliance/EndUsers" + path := "/v2/RegulatoryCompliance/EndUsers" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Attributes != nil { - v, err := json.Marshal(params.Attributes) + if params != nil && params.Attributes != nil { + v, err := json.Marshal(params.Attributes) - if err != nil { - return nil, err - } - - data.Set("Attributes", fmt.Sprint(v)) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.Type != nil { - data.Set("Type", *params.Type) -} + if err != nil { + return nil, err + } + data.Set("Attributes", fmt.Sprint(v)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Type != nil { + data.Set("Type", *params.Type) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &NumbersV2RegulatoryComplianceEndUser{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &NumbersV2RegulatoryComplianceEndUser{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * CreateEvaluation Method for CreateEvaluation * @param BundleSid * @return NumbersV2RegulatoryComplianceBundleEvaluation -*/ -func (c *DefaultApiService) CreateEvaluation(BundleSid string, ) (*NumbersV2RegulatoryComplianceBundleEvaluation, error) { - path := "/v2/RegulatoryCompliance/Bundles/{BundleSid}/Evaluations" + */ +func (c *DefaultApiService) CreateEvaluation(BundleSid string) (*NumbersV2RegulatoryComplianceBundleEvaluation, error) { + path := "/v2/RegulatoryCompliance/Bundles/{BundleSid}/Evaluations" path = strings.Replace(path, "{"+"BundleSid"+"}", BundleSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &NumbersV2RegulatoryComplianceBundleEvaluation{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &NumbersV2RegulatoryComplianceBundleEvaluation{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateItemAssignmentParams Optional parameters for the method 'CreateItemAssignment' type CreateItemAssignmentParams struct { ObjectSid *string `json:"ObjectSid,omitempty"` @@ -192,38 +191,38 @@ type CreateItemAssignmentParams struct { * @param optional nil or *CreateItemAssignmentParams - Optional Parameters: * @param "ObjectSid" (string) - The SID of an object bag that holds information of the different items. * @return NumbersV2RegulatoryComplianceBundleItemAssignment -*/ + */ func (c *DefaultApiService) CreateItemAssignment(BundleSid string, params *CreateItemAssignmentParams) (*NumbersV2RegulatoryComplianceBundleItemAssignment, error) { - path := "/v2/RegulatoryCompliance/Bundles/{BundleSid}/ItemAssignments" + path := "/v2/RegulatoryCompliance/Bundles/{BundleSid}/ItemAssignments" path = strings.Replace(path, "{"+"BundleSid"+"}", BundleSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.ObjectSid != nil { - data.Set("ObjectSid", *params.ObjectSid) -} + data := url.Values{} + headers := 0 + if params != nil && params.ObjectSid != nil { + data.Set("ObjectSid", *params.ObjectSid) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &NumbersV2RegulatoryComplianceBundleItemAssignment{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &NumbersV2RegulatoryComplianceBundleItemAssignment{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateSupportingDocumentParams Optional parameters for the method 'CreateSupportingDocument' type CreateSupportingDocumentParams struct { - Attributes *map[string]interface{} `json:"Attributes,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Type *string `json:"Type,omitempty"` + Attributes *map[string]interface{} `json:"Attributes,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Type *string `json:"Type,omitempty"` } /* @@ -234,91 +233,86 @@ type CreateSupportingDocumentParams struct { * @param "FriendlyName" (string) - The string that you assigned to describe the resource. * @param "Type" (string) - The type of the Supporting Document. * @return NumbersV2RegulatoryComplianceSupportingDocument -*/ + */ func (c *DefaultApiService) CreateSupportingDocument(params *CreateSupportingDocumentParams) (*NumbersV2RegulatoryComplianceSupportingDocument, error) { - path := "/v2/RegulatoryCompliance/SupportingDocuments" - - data := url.Values{} - headers := 0 + path := "/v2/RegulatoryCompliance/SupportingDocuments" - if params != nil && params.Attributes != nil { - v, err := json.Marshal(params.Attributes) + data := url.Values{} + headers := 0 - if err != nil { - return nil, err - } + if params != nil && params.Attributes != nil { + v, err := json.Marshal(params.Attributes) - data.Set("Attributes", fmt.Sprint(v)) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.Type != nil { - data.Set("Type", *params.Type) -} + if err != nil { + return nil, err + } + data.Set("Attributes", fmt.Sprint(v)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Type != nil { + data.Set("Type", *params.Type) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &NumbersV2RegulatoryComplianceSupportingDocument{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &NumbersV2RegulatoryComplianceSupportingDocument{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * DeleteBundle Method for DeleteBundle * Delete a specific Bundle. * @param Sid The unique string that we created to identify the Bundle resource. -*/ -func (c *DefaultApiService) DeleteBundle(Sid string, ) (error) { - path := "/v2/RegulatoryCompliance/Bundles/{Sid}" + */ +func (c *DefaultApiService) DeleteBundle(Sid string) error { + path := "/v2/RegulatoryCompliance/Bundles/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + defer resp.Body.Close() - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() - - return nil + return nil } /* * DeleteEndUser Method for DeleteEndUser * Delete a specific End User. * @param Sid The unique string created by Twilio to identify the End User resource. -*/ -func (c *DefaultApiService) DeleteEndUser(Sid string, ) (error) { - path := "/v2/RegulatoryCompliance/EndUsers/{Sid}" + */ +func (c *DefaultApiService) DeleteEndUser(Sid string) error { + path := "/v2/RegulatoryCompliance/EndUsers/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -326,49 +320,45 @@ func (c *DefaultApiService) DeleteEndUser(Sid string, ) (error) { * Remove an Assignment Item Instance. * @param BundleSid The unique string that we created to identify the Bundle resource. * @param Sid The unique string that we created to identify the Identity resource. -*/ -func (c *DefaultApiService) DeleteItemAssignment(BundleSid string, Sid string, ) (error) { - path := "/v2/RegulatoryCompliance/Bundles/{BundleSid}/ItemAssignments/{Sid}" + */ +func (c *DefaultApiService) DeleteItemAssignment(BundleSid string, Sid string) error { + path := "/v2/RegulatoryCompliance/Bundles/{BundleSid}/ItemAssignments/{Sid}" path = strings.Replace(path, "{"+"BundleSid"+"}", BundleSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* * DeleteSupportingDocument Method for DeleteSupportingDocument * Delete a specific Supporting Document. * @param Sid The unique string created by Twilio to identify the Supporting Document resource. -*/ -func (c *DefaultApiService) DeleteSupportingDocument(Sid string, ) (error) { - path := "/v2/RegulatoryCompliance/SupportingDocuments/{Sid}" + */ +func (c *DefaultApiService) DeleteSupportingDocument(Sid string) error { + path := "/v2/RegulatoryCompliance/SupportingDocuments/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -376,29 +366,27 @@ func (c *DefaultApiService) DeleteSupportingDocument(Sid string, ) (error) { * Fetch a specific Bundle instance. * @param Sid The unique string that we created to identify the Bundle resource. * @return NumbersV2RegulatoryComplianceBundle -*/ -func (c *DefaultApiService) FetchBundle(Sid string, ) (*NumbersV2RegulatoryComplianceBundle, error) { - path := "/v2/RegulatoryCompliance/Bundles/{Sid}" + */ +func (c *DefaultApiService) FetchBundle(Sid string) (*NumbersV2RegulatoryComplianceBundle, error) { + path := "/v2/RegulatoryCompliance/Bundles/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &NumbersV2RegulatoryComplianceBundle{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &NumbersV2RegulatoryComplianceBundle{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -406,29 +394,27 @@ func (c *DefaultApiService) FetchBundle(Sid string, ) (*NumbersV2RegulatoryCompl * Fetch specific End User Instance. * @param Sid The unique string created by Twilio to identify the End User resource. * @return NumbersV2RegulatoryComplianceEndUser -*/ -func (c *DefaultApiService) FetchEndUser(Sid string, ) (*NumbersV2RegulatoryComplianceEndUser, error) { - path := "/v2/RegulatoryCompliance/EndUsers/{Sid}" + */ +func (c *DefaultApiService) FetchEndUser(Sid string) (*NumbersV2RegulatoryComplianceEndUser, error) { + path := "/v2/RegulatoryCompliance/EndUsers/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &NumbersV2RegulatoryComplianceEndUser{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &NumbersV2RegulatoryComplianceEndUser{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -436,29 +422,27 @@ func (c *DefaultApiService) FetchEndUser(Sid string, ) (*NumbersV2RegulatoryComp * Fetch a specific End-User Type Instance. * @param Sid The unique string that identifies the End-User Type resource. * @return NumbersV2RegulatoryComplianceEndUserType -*/ -func (c *DefaultApiService) FetchEndUserType(Sid string, ) (*NumbersV2RegulatoryComplianceEndUserType, error) { - path := "/v2/RegulatoryCompliance/EndUserTypes/{Sid}" + */ +func (c *DefaultApiService) FetchEndUserType(Sid string) (*NumbersV2RegulatoryComplianceEndUserType, error) { + path := "/v2/RegulatoryCompliance/EndUserTypes/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &NumbersV2RegulatoryComplianceEndUserType{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &NumbersV2RegulatoryComplianceEndUserType{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -467,30 +451,28 @@ func (c *DefaultApiService) FetchEndUserType(Sid string, ) (*NumbersV2Regulatory * @param BundleSid The unique string that we created to identify the Bundle resource. * @param Sid The unique string that identifies the Evaluation resource. * @return NumbersV2RegulatoryComplianceBundleEvaluation -*/ -func (c *DefaultApiService) FetchEvaluation(BundleSid string, Sid string, ) (*NumbersV2RegulatoryComplianceBundleEvaluation, error) { - path := "/v2/RegulatoryCompliance/Bundles/{BundleSid}/Evaluations/{Sid}" + */ +func (c *DefaultApiService) FetchEvaluation(BundleSid string, Sid string) (*NumbersV2RegulatoryComplianceBundleEvaluation, error) { + path := "/v2/RegulatoryCompliance/Bundles/{BundleSid}/Evaluations/{Sid}" path = strings.Replace(path, "{"+"BundleSid"+"}", BundleSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &NumbersV2RegulatoryComplianceBundleEvaluation{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &NumbersV2RegulatoryComplianceBundleEvaluation{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -499,30 +481,28 @@ func (c *DefaultApiService) FetchEvaluation(BundleSid string, Sid string, ) (*Nu * @param BundleSid The unique string that we created to identify the Bundle resource. * @param Sid The unique string that we created to identify the Identity resource. * @return NumbersV2RegulatoryComplianceBundleItemAssignment -*/ -func (c *DefaultApiService) FetchItemAssignment(BundleSid string, Sid string, ) (*NumbersV2RegulatoryComplianceBundleItemAssignment, error) { - path := "/v2/RegulatoryCompliance/Bundles/{BundleSid}/ItemAssignments/{Sid}" + */ +func (c *DefaultApiService) FetchItemAssignment(BundleSid string, Sid string) (*NumbersV2RegulatoryComplianceBundleItemAssignment, error) { + path := "/v2/RegulatoryCompliance/Bundles/{BundleSid}/ItemAssignments/{Sid}" path = strings.Replace(path, "{"+"BundleSid"+"}", BundleSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &NumbersV2RegulatoryComplianceBundleItemAssignment{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &NumbersV2RegulatoryComplianceBundleItemAssignment{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -530,29 +510,27 @@ func (c *DefaultApiService) FetchItemAssignment(BundleSid string, Sid string, ) * Fetch specific Regulation Instance. * @param Sid The unique string that identifies the Regulation resource. * @return NumbersV2RegulatoryComplianceRegulation -*/ -func (c *DefaultApiService) FetchRegulation(Sid string, ) (*NumbersV2RegulatoryComplianceRegulation, error) { - path := "/v2/RegulatoryCompliance/Regulations/{Sid}" + */ +func (c *DefaultApiService) FetchRegulation(Sid string) (*NumbersV2RegulatoryComplianceRegulation, error) { + path := "/v2/RegulatoryCompliance/Regulations/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &NumbersV2RegulatoryComplianceRegulation{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &NumbersV2RegulatoryComplianceRegulation{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -560,29 +538,27 @@ func (c *DefaultApiService) FetchRegulation(Sid string, ) (*NumbersV2RegulatoryC * Fetch specific Supporting Document Instance. * @param Sid The unique string created by Twilio to identify the Supporting Document resource. * @return NumbersV2RegulatoryComplianceSupportingDocument -*/ -func (c *DefaultApiService) FetchSupportingDocument(Sid string, ) (*NumbersV2RegulatoryComplianceSupportingDocument, error) { - path := "/v2/RegulatoryCompliance/SupportingDocuments/{Sid}" + */ +func (c *DefaultApiService) FetchSupportingDocument(Sid string) (*NumbersV2RegulatoryComplianceSupportingDocument, error) { + path := "/v2/RegulatoryCompliance/SupportingDocuments/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &NumbersV2RegulatoryComplianceSupportingDocument{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &NumbersV2RegulatoryComplianceSupportingDocument{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -590,38 +566,37 @@ func (c *DefaultApiService) FetchSupportingDocument(Sid string, ) (*NumbersV2Reg * Fetch a specific Supporting Document Type Instance. * @param Sid The unique string that identifies the Supporting Document Type resource. * @return NumbersV2RegulatoryComplianceSupportingDocumentType -*/ -func (c *DefaultApiService) FetchSupportingDocumentType(Sid string, ) (*NumbersV2RegulatoryComplianceSupportingDocumentType, error) { - path := "/v2/RegulatoryCompliance/SupportingDocumentTypes/{Sid}" + */ +func (c *DefaultApiService) FetchSupportingDocumentType(Sid string) (*NumbersV2RegulatoryComplianceSupportingDocumentType, error) { + path := "/v2/RegulatoryCompliance/SupportingDocumentTypes/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &NumbersV2RegulatoryComplianceSupportingDocumentType{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &NumbersV2RegulatoryComplianceSupportingDocumentType{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListBundleParams Optional parameters for the method 'ListBundle' type ListBundleParams struct { - Status *string `json:"Status,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` + Status *string `json:"Status,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` RegulationSid *string `json:"RegulationSid,omitempty"` - IsoCountry *string `json:"IsoCountry,omitempty"` - NumberType *string `json:"NumberType,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + IsoCountry *string `json:"IsoCountry,omitempty"` + NumberType *string `json:"NumberType,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -635,47 +610,47 @@ type ListBundleParams struct { * @param "NumberType" (string) - The type of phone number of the Bundle's ownership request. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListBundleResponse -*/ + */ func (c *DefaultApiService) ListBundle(params *ListBundleParams) (*ListBundleResponse, error) { - path := "/v2/RegulatoryCompliance/Bundles" + path := "/v2/RegulatoryCompliance/Bundles" - data := url.Values{} - headers := 0 - - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.RegulationSid != nil { - data.Set("RegulationSid", *params.RegulationSid) -} - if params != nil && params.IsoCountry != nil { - data.Set("IsoCountry", *params.IsoCountry) -} - if params != nil && params.NumberType != nil { - data.Set("NumberType", *params.NumberType) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.RegulationSid != nil { + data.Set("RegulationSid", *params.RegulationSid) + } + if params != nil && params.IsoCountry != nil { + data.Set("IsoCountry", *params.IsoCountry) + } + if params != nil && params.NumberType != nil { + data.Set("NumberType", *params.NumberType) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListBundleResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListBundleResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListEndUserParams Optional parameters for the method 'ListEndUser' type ListEndUserParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -687,32 +662,32 @@ type ListEndUserParams struct { * @param optional nil or *ListEndUserParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListEndUserResponse -*/ + */ func (c *DefaultApiService) ListEndUser(params *ListEndUserParams) (*ListEndUserResponse, error) { - path := "/v2/RegulatoryCompliance/EndUsers" - - data := url.Values{} - headers := 0 + path := "/v2/RegulatoryCompliance/EndUsers" - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListEndUserResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListEndUserResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListEndUserTypeParams Optional parameters for the method 'ListEndUserType' type ListEndUserTypeParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -724,32 +699,32 @@ type ListEndUserTypeParams struct { * @param optional nil or *ListEndUserTypeParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListEndUserTypeResponse -*/ + */ func (c *DefaultApiService) ListEndUserType(params *ListEndUserTypeParams) (*ListEndUserTypeResponse, error) { - path := "/v2/RegulatoryCompliance/EndUserTypes" - - data := url.Values{} - headers := 0 + path := "/v2/RegulatoryCompliance/EndUserTypes" - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListEndUserTypeResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListEndUserTypeResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListEvaluationParams Optional parameters for the method 'ListEvaluation' type ListEvaluationParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -762,33 +737,33 @@ type ListEvaluationParams struct { * @param optional nil or *ListEvaluationParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListEvaluationResponse -*/ + */ func (c *DefaultApiService) ListEvaluation(BundleSid string, params *ListEvaluationParams) (*ListEvaluationResponse, error) { - path := "/v2/RegulatoryCompliance/Bundles/{BundleSid}/Evaluations" + path := "/v2/RegulatoryCompliance/Bundles/{BundleSid}/Evaluations" path = strings.Replace(path, "{"+"BundleSid"+"}", BundleSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListEvaluationResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListEvaluationResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListItemAssignmentParams Optional parameters for the method 'ListItemAssignment' type ListItemAssignmentParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -801,39 +776,39 @@ type ListItemAssignmentParams struct { * @param optional nil or *ListItemAssignmentParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListItemAssignmentResponse -*/ + */ func (c *DefaultApiService) ListItemAssignment(BundleSid string, params *ListItemAssignmentParams) (*ListItemAssignmentResponse, error) { - path := "/v2/RegulatoryCompliance/Bundles/{BundleSid}/ItemAssignments" + path := "/v2/RegulatoryCompliance/Bundles/{BundleSid}/ItemAssignments" path = strings.Replace(path, "{"+"BundleSid"+"}", BundleSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListItemAssignmentResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListItemAssignmentResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListRegulationParams Optional parameters for the method 'ListRegulation' type ListRegulationParams struct { EndUserType *string `json:"EndUserType,omitempty"` - IsoCountry *string `json:"IsoCountry,omitempty"` - NumberType *string `json:"NumberType,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + IsoCountry *string `json:"IsoCountry,omitempty"` + NumberType *string `json:"NumberType,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -845,41 +820,41 @@ type ListRegulationParams struct { * @param "NumberType" (string) - The type of phone number that the regulatory requiremnt is restricting. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListRegulationResponse -*/ + */ func (c *DefaultApiService) ListRegulation(params *ListRegulationParams) (*ListRegulationResponse, error) { - path := "/v2/RegulatoryCompliance/Regulations" + path := "/v2/RegulatoryCompliance/Regulations" - data := url.Values{} - headers := 0 - - if params != nil && params.EndUserType != nil { - data.Set("EndUserType", *params.EndUserType) -} - if params != nil && params.IsoCountry != nil { - data.Set("IsoCountry", *params.IsoCountry) -} - if params != nil && params.NumberType != nil { - data.Set("NumberType", *params.NumberType) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.EndUserType != nil { + data.Set("EndUserType", *params.EndUserType) + } + if params != nil && params.IsoCountry != nil { + data.Set("IsoCountry", *params.IsoCountry) + } + if params != nil && params.NumberType != nil { + data.Set("NumberType", *params.NumberType) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListRegulationResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListRegulationResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListSupportingDocumentParams Optional parameters for the method 'ListSupportingDocument' type ListSupportingDocumentParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -891,32 +866,32 @@ type ListSupportingDocumentParams struct { * @param optional nil or *ListSupportingDocumentParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListSupportingDocumentResponse -*/ + */ func (c *DefaultApiService) ListSupportingDocument(params *ListSupportingDocumentParams) (*ListSupportingDocumentResponse, error) { - path := "/v2/RegulatoryCompliance/SupportingDocuments" - - data := url.Values{} - headers := 0 + path := "/v2/RegulatoryCompliance/SupportingDocuments" - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListSupportingDocumentResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListSupportingDocumentResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListSupportingDocumentTypeParams Optional parameters for the method 'ListSupportingDocumentType' type ListSupportingDocumentTypeParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -928,37 +903,37 @@ type ListSupportingDocumentTypeParams struct { * @param optional nil or *ListSupportingDocumentTypeParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListSupportingDocumentTypeResponse -*/ + */ func (c *DefaultApiService) ListSupportingDocumentType(params *ListSupportingDocumentTypeParams) (*ListSupportingDocumentTypeResponse, error) { - path := "/v2/RegulatoryCompliance/SupportingDocumentTypes" - - data := url.Values{} - headers := 0 + path := "/v2/RegulatoryCompliance/SupportingDocumentTypes" - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListSupportingDocumentTypeResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListSupportingDocumentTypeResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateBundleParams Optional parameters for the method 'UpdateBundle' type UpdateBundleParams struct { - Email *string `json:"Email,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Status *string `json:"Status,omitempty"` + Email *string `json:"Email,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Status *string `json:"Status,omitempty"` StatusCallback *string `json:"StatusCallback,omitempty"` } @@ -972,46 +947,46 @@ type UpdateBundleParams struct { * @param "Status" (string) - The verification status of the Bundle resource. * @param "StatusCallback" (string) - The URL we call to inform your application of status changes. * @return NumbersV2RegulatoryComplianceBundle -*/ + */ func (c *DefaultApiService) UpdateBundle(Sid string, params *UpdateBundleParams) (*NumbersV2RegulatoryComplianceBundle, error) { - path := "/v2/RegulatoryCompliance/Bundles/{Sid}" + path := "/v2/RegulatoryCompliance/Bundles/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Email != nil { - data.Set("Email", *params.Email) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) -} - if params != nil && params.StatusCallback != nil { - data.Set("StatusCallback", *params.StatusCallback) -} + data := url.Values{} + headers := 0 + if params != nil && params.Email != nil { + data.Set("Email", *params.Email) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &NumbersV2RegulatoryComplianceBundle{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &NumbersV2RegulatoryComplianceBundle{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateEndUserParams Optional parameters for the method 'UpdateEndUser' type UpdateEndUserParams struct { - Attributes *map[string]interface{} `json:"Attributes,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` + Attributes *map[string]interface{} `json:"Attributes,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` } /* @@ -1022,46 +997,46 @@ type UpdateEndUserParams struct { * @param "Attributes" (map[string]interface{}) - The set of parameters that are the attributes of the End User resource which are derived End User Types. * @param "FriendlyName" (string) - The string that you assigned to describe the resource. * @return NumbersV2RegulatoryComplianceEndUser -*/ + */ func (c *DefaultApiService) UpdateEndUser(Sid string, params *UpdateEndUserParams) (*NumbersV2RegulatoryComplianceEndUser, error) { - path := "/v2/RegulatoryCompliance/EndUsers/{Sid}" + path := "/v2/RegulatoryCompliance/EndUsers/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Attributes != nil { - v, err := json.Marshal(params.Attributes) + if params != nil && params.Attributes != nil { + v, err := json.Marshal(params.Attributes) - if err != nil { - return nil, err - } - - data.Set("Attributes", fmt.Sprint(v)) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} + if err != nil { + return nil, err + } + data.Set("Attributes", fmt.Sprint(v)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &NumbersV2RegulatoryComplianceEndUser{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &NumbersV2RegulatoryComplianceEndUser{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateSupportingDocumentParams Optional parameters for the method 'UpdateSupportingDocument' type UpdateSupportingDocumentParams struct { - Attributes *map[string]interface{} `json:"Attributes,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` + Attributes *map[string]interface{} `json:"Attributes,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` } /* @@ -1072,39 +1047,38 @@ type UpdateSupportingDocumentParams struct { * @param "Attributes" (map[string]interface{}) - The set of parameters that are the attributes of the Supporting Document resource which are derived Supporting Document Types. * @param "FriendlyName" (string) - The string that you assigned to describe the resource. * @return NumbersV2RegulatoryComplianceSupportingDocument -*/ + */ func (c *DefaultApiService) UpdateSupportingDocument(Sid string, params *UpdateSupportingDocumentParams) (*NumbersV2RegulatoryComplianceSupportingDocument, error) { - path := "/v2/RegulatoryCompliance/SupportingDocuments/{Sid}" + path := "/v2/RegulatoryCompliance/SupportingDocuments/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Attributes != nil { - v, err := json.Marshal(params.Attributes) - - if err != nil { - return nil, err - } + if params != nil && params.Attributes != nil { + v, err := json.Marshal(params.Attributes) - data.Set("Attributes", fmt.Sprint(v)) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} + if err != nil { + return nil, err + } + data.Set("Attributes", fmt.Sprint(v)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &NumbersV2RegulatoryComplianceSupportingDocument{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &NumbersV2RegulatoryComplianceSupportingDocument{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } diff --git a/twilio/rest/numbers/v2/model_list_bundle_response.go b/twilio/rest/numbers/v2/model_list_bundle_response.go index 6680ec50b..a1e35a94e 100644 --- a/twilio/rest/numbers/v2/model_list_bundle_response.go +++ b/twilio/rest/numbers/v2/model_list_bundle_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Numbers - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Numbers + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListBundleResponse struct for ListBundleResponse type ListBundleResponse struct { - Meta ListBundleResponseMeta `json:"Meta,omitempty"` + Meta ListBundleResponseMeta `json:"Meta,omitempty"` Results []NumbersV2RegulatoryComplianceBundle `json:"Results,omitempty"` } diff --git a/twilio/rest/numbers/v2/model_list_bundle_response_meta.go b/twilio/rest/numbers/v2/model_list_bundle_response_meta.go index be4e3c018..0e7a76039 100644 --- a/twilio/rest/numbers/v2/model_list_bundle_response_meta.go +++ b/twilio/rest/numbers/v2/model_list_bundle_response_meta.go @@ -1,22 +1,23 @@ /* - * Twilio - Numbers - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Numbers + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListBundleResponseMeta struct for ListBundleResponseMeta type ListBundleResponseMeta struct { - FirstPageUrl string `json:"FirstPageUrl,omitempty"` - Key string `json:"Key,omitempty"` - NextPageUrl string `json:"NextPageUrl,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` - Url string `json:"Url,omitempty"` + Url string `json:"Url,omitempty"` } diff --git a/twilio/rest/numbers/v2/model_list_end_user_response.go b/twilio/rest/numbers/v2/model_list_end_user_response.go index 0bad695e0..bc956cf85 100644 --- a/twilio/rest/numbers/v2/model_list_end_user_response.go +++ b/twilio/rest/numbers/v2/model_list_end_user_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Numbers - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Numbers + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListEndUserResponse struct for ListEndUserResponse type ListEndUserResponse struct { - Meta ListBundleResponseMeta `json:"Meta,omitempty"` + Meta ListBundleResponseMeta `json:"Meta,omitempty"` Results []NumbersV2RegulatoryComplianceEndUser `json:"Results,omitempty"` } diff --git a/twilio/rest/numbers/v2/model_list_end_user_type_response.go b/twilio/rest/numbers/v2/model_list_end_user_type_response.go index 81b367ef5..242c9aab5 100644 --- a/twilio/rest/numbers/v2/model_list_end_user_type_response.go +++ b/twilio/rest/numbers/v2/model_list_end_user_type_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Numbers - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Numbers + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListEndUserTypeResponse struct for ListEndUserTypeResponse type ListEndUserTypeResponse struct { EndUserTypes []NumbersV2RegulatoryComplianceEndUserType `json:"EndUserTypes,omitempty"` - Meta ListBundleResponseMeta `json:"Meta,omitempty"` + Meta ListBundleResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/numbers/v2/model_list_evaluation_response.go b/twilio/rest/numbers/v2/model_list_evaluation_response.go index 39d824d6a..4a7d0498d 100644 --- a/twilio/rest/numbers/v2/model_list_evaluation_response.go +++ b/twilio/rest/numbers/v2/model_list_evaluation_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Numbers - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Numbers + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListEvaluationResponse struct for ListEvaluationResponse type ListEvaluationResponse struct { - Meta ListBundleResponseMeta `json:"Meta,omitempty"` + Meta ListBundleResponseMeta `json:"Meta,omitempty"` Results []NumbersV2RegulatoryComplianceBundleEvaluation `json:"Results,omitempty"` } diff --git a/twilio/rest/numbers/v2/model_list_item_assignment_response.go b/twilio/rest/numbers/v2/model_list_item_assignment_response.go index 4086bcd19..8270be244 100644 --- a/twilio/rest/numbers/v2/model_list_item_assignment_response.go +++ b/twilio/rest/numbers/v2/model_list_item_assignment_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Numbers - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Numbers + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListItemAssignmentResponse struct for ListItemAssignmentResponse type ListItemAssignmentResponse struct { - Meta ListBundleResponseMeta `json:"Meta,omitempty"` + Meta ListBundleResponseMeta `json:"Meta,omitempty"` Results []NumbersV2RegulatoryComplianceBundleItemAssignment `json:"Results,omitempty"` } diff --git a/twilio/rest/numbers/v2/model_list_regulation_response.go b/twilio/rest/numbers/v2/model_list_regulation_response.go index 0300ae22b..8c1506687 100644 --- a/twilio/rest/numbers/v2/model_list_regulation_response.go +++ b/twilio/rest/numbers/v2/model_list_regulation_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Numbers - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Numbers + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListRegulationResponse struct for ListRegulationResponse type ListRegulationResponse struct { - Meta ListBundleResponseMeta `json:"Meta,omitempty"` + Meta ListBundleResponseMeta `json:"Meta,omitempty"` Results []NumbersV2RegulatoryComplianceRegulation `json:"Results,omitempty"` } diff --git a/twilio/rest/numbers/v2/model_list_supporting_document_response.go b/twilio/rest/numbers/v2/model_list_supporting_document_response.go index 1823ba133..8c1f42798 100644 --- a/twilio/rest/numbers/v2/model_list_supporting_document_response.go +++ b/twilio/rest/numbers/v2/model_list_supporting_document_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Numbers - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Numbers + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListSupportingDocumentResponse struct for ListSupportingDocumentResponse type ListSupportingDocumentResponse struct { - Meta ListBundleResponseMeta `json:"Meta,omitempty"` + Meta ListBundleResponseMeta `json:"Meta,omitempty"` Results []NumbersV2RegulatoryComplianceSupportingDocument `json:"Results,omitempty"` } diff --git a/twilio/rest/numbers/v2/model_list_supporting_document_type_response.go b/twilio/rest/numbers/v2/model_list_supporting_document_type_response.go index 650c83529..4ef13f718 100644 --- a/twilio/rest/numbers/v2/model_list_supporting_document_type_response.go +++ b/twilio/rest/numbers/v2/model_list_supporting_document_type_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Numbers - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Numbers + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListSupportingDocumentTypeResponse struct for ListSupportingDocumentTypeResponse type ListSupportingDocumentTypeResponse struct { - Meta ListBundleResponseMeta `json:"Meta,omitempty"` + Meta ListBundleResponseMeta `json:"Meta,omitempty"` SupportingDocumentTypes []NumbersV2RegulatoryComplianceSupportingDocumentType `json:"SupportingDocumentTypes,omitempty"` } diff --git a/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_bundle.go b/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_bundle.go index 9cc585ec2..bdf7e9547 100644 --- a/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_bundle.go +++ b/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_bundle.go @@ -1,18 +1,20 @@ /* - * Twilio - Numbers - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Numbers + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // NumbersV2RegulatoryComplianceBundle struct for NumbersV2RegulatoryComplianceBundle type NumbersV2RegulatoryComplianceBundle struct { // The SID of the Account that created the resource diff --git a/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_bundle_evaluation.go b/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_bundle_evaluation.go index 0b4c9e581..2db73e245 100644 --- a/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_bundle_evaluation.go +++ b/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_bundle_evaluation.go @@ -1,24 +1,26 @@ /* - * Twilio - Numbers - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Numbers + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // NumbersV2RegulatoryComplianceBundleEvaluation struct for NumbersV2RegulatoryComplianceBundleEvaluation type NumbersV2RegulatoryComplianceBundleEvaluation struct { // The SID of the Account that created the resource AccountSid *string `json:"AccountSid,omitempty"` // The unique string that identifies the resource - BundleSid *string `json:"BundleSid,omitempty"` + BundleSid *string `json:"BundleSid,omitempty"` DateCreated *time.Time `json:"DateCreated,omitempty"` // The unique string of a regulation RegulationSid *string `json:"RegulationSid,omitempty"` @@ -28,5 +30,5 @@ type NumbersV2RegulatoryComplianceBundleEvaluation struct { Sid *string `json:"Sid,omitempty"` // The compliance status of the Evaluation resource Status *string `json:"Status,omitempty"` - Url *string `json:"Url,omitempty"` + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_bundle_item_assignment.go b/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_bundle_item_assignment.go index a43e6c307..baebc8887 100644 --- a/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_bundle_item_assignment.go +++ b/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_bundle_item_assignment.go @@ -1,18 +1,20 @@ /* - * Twilio - Numbers - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Numbers + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // NumbersV2RegulatoryComplianceBundleItemAssignment struct for NumbersV2RegulatoryComplianceBundleItemAssignment type NumbersV2RegulatoryComplianceBundleItemAssignment struct { // The SID of the Account that created the resource diff --git a/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_end_user.go b/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_end_user.go index 9bcdb0eb4..fad844f70 100644 --- a/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_end_user.go +++ b/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_end_user.go @@ -1,18 +1,20 @@ /* - * Twilio - Numbers - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Numbers + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // NumbersV2RegulatoryComplianceEndUser struct for NumbersV2RegulatoryComplianceEndUser type NumbersV2RegulatoryComplianceEndUser struct { // The SID of the Account that created the resource diff --git a/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_end_user_type.go b/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_end_user_type.go index f8e13b6ad..ed40740ff 100644 --- a/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_end_user_type.go +++ b/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_end_user_type.go @@ -1,15 +1,16 @@ /* - * Twilio - Numbers - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Numbers + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // NumbersV2RegulatoryComplianceEndUserType struct for NumbersV2RegulatoryComplianceEndUserType type NumbersV2RegulatoryComplianceEndUserType struct { // The required information for creating an End-User. diff --git a/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_regulation.go b/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_regulation.go index 58a07e342..a0e9df577 100644 --- a/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_regulation.go +++ b/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_regulation.go @@ -1,15 +1,16 @@ /* - * Twilio - Numbers - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Numbers + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // NumbersV2RegulatoryComplianceRegulation struct for NumbersV2RegulatoryComplianceRegulation type NumbersV2RegulatoryComplianceRegulation struct { // The type of End User of the Regulation resource diff --git a/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_supporting_document.go b/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_supporting_document.go index 52c261e3c..4c5dd75fe 100644 --- a/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_supporting_document.go +++ b/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_supporting_document.go @@ -1,18 +1,20 @@ /* - * Twilio - Numbers - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Numbers + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // NumbersV2RegulatoryComplianceSupportingDocument struct for NumbersV2RegulatoryComplianceSupportingDocument type NumbersV2RegulatoryComplianceSupportingDocument struct { // The SID of the Account that created the resource diff --git a/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_supporting_document_type.go b/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_supporting_document_type.go index ba003e0af..53b8665eb 100644 --- a/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_supporting_document_type.go +++ b/twilio/rest/numbers/v2/model_numbers_v2_regulatory_compliance_supporting_document_type.go @@ -1,15 +1,16 @@ /* - * Twilio - Numbers - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Numbers + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // NumbersV2RegulatoryComplianceSupportingDocumentType struct for NumbersV2RegulatoryComplianceSupportingDocumentType type NumbersV2RegulatoryComplianceSupportingDocumentType struct { // The required information for creating a Supporting Document diff --git a/twilio/rest/pricing/v1/api_default.go b/twilio/rest/pricing/v1/api_default.go index 7c8ed438d..344c8bdb6 100644 --- a/twilio/rest/pricing/v1/api_default.go +++ b/twilio/rest/pricing/v1/api_default.go @@ -1,11 +1,11 @@ /* - * Twilio - Pricing - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,9 +14,10 @@ package openapi import ( "encoding/json" "fmt" - twilio "github.com/twilio/twilio-go/client" "net/url" - "strings" + "strings" + + twilio "github.com/twilio/twilio-go/client" ) type DefaultApiService struct { @@ -25,128 +26,120 @@ type DefaultApiService struct { } func NewDefaultApiService(client *twilio.Client) *DefaultApiService { - return &DefaultApiService { - client: client, + return &DefaultApiService{ + client: client, baseURL: "https://pricing.twilio.com", } } - /* * FetchMessagingCountry Method for FetchMessagingCountry * @param IsoCountry The [ISO country code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the pricing information to fetch. * @return PricingV1MessagingMessagingCountryInstance -*/ -func (c *DefaultApiService) FetchMessagingCountry(IsoCountry string, ) (*PricingV1MessagingMessagingCountryInstance, error) { - path := "/v1/Messaging/Countries/{IsoCountry}" + */ +func (c *DefaultApiService) FetchMessagingCountry(IsoCountry string) (*PricingV1MessagingMessagingCountryInstance, error) { + path := "/v1/Messaging/Countries/{IsoCountry}" path = strings.Replace(path, "{"+"IsoCountry"+"}", IsoCountry, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &PricingV1MessagingMessagingCountryInstance{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &PricingV1MessagingMessagingCountryInstance{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * FetchPhoneNumberCountry Method for FetchPhoneNumberCountry * @param IsoCountry The [ISO country code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the pricing information to fetch. * @return PricingV1PhoneNumberPhoneNumberCountryInstance -*/ -func (c *DefaultApiService) FetchPhoneNumberCountry(IsoCountry string, ) (*PricingV1PhoneNumberPhoneNumberCountryInstance, error) { - path := "/v1/PhoneNumbers/Countries/{IsoCountry}" + */ +func (c *DefaultApiService) FetchPhoneNumberCountry(IsoCountry string) (*PricingV1PhoneNumberPhoneNumberCountryInstance, error) { + path := "/v1/PhoneNumbers/Countries/{IsoCountry}" path = strings.Replace(path, "{"+"IsoCountry"+"}", IsoCountry, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &PricingV1PhoneNumberPhoneNumberCountryInstance{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &PricingV1PhoneNumberPhoneNumberCountryInstance{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * FetchVoiceCountry Method for FetchVoiceCountry * @param IsoCountry The [ISO country code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the pricing information to fetch. * @return PricingV1VoiceVoiceCountryInstance -*/ -func (c *DefaultApiService) FetchVoiceCountry(IsoCountry string, ) (*PricingV1VoiceVoiceCountryInstance, error) { - path := "/v1/Voice/Countries/{IsoCountry}" + */ +func (c *DefaultApiService) FetchVoiceCountry(IsoCountry string) (*PricingV1VoiceVoiceCountryInstance, error) { + path := "/v1/Voice/Countries/{IsoCountry}" path = strings.Replace(path, "{"+"IsoCountry"+"}", IsoCountry, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &PricingV1VoiceVoiceCountryInstance{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &PricingV1VoiceVoiceCountryInstance{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * FetchVoiceNumber Method for FetchVoiceNumber * @param Number The phone number to fetch. * @return PricingV1VoiceVoiceNumber -*/ -func (c *DefaultApiService) FetchVoiceNumber(Number string, ) (*PricingV1VoiceVoiceNumber, error) { - path := "/v1/Voice/Numbers/{Number}" + */ +func (c *DefaultApiService) FetchVoiceNumber(Number string) (*PricingV1VoiceVoiceNumber, error) { + path := "/v1/Voice/Numbers/{Number}" path = strings.Replace(path, "{"+"Number"+"}", Number, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &PricingV1VoiceVoiceNumber{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &PricingV1VoiceVoiceNumber{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListMessagingCountryParams Optional parameters for the method 'ListMessagingCountry' type ListMessagingCountryParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -157,32 +150,32 @@ type ListMessagingCountryParams struct { * @param optional nil or *ListMessagingCountryParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListMessagingCountryResponse -*/ + */ func (c *DefaultApiService) ListMessagingCountry(params *ListMessagingCountryParams) (*ListMessagingCountryResponse, error) { - path := "/v1/Messaging/Countries" + path := "/v1/Messaging/Countries" - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListMessagingCountryResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListMessagingCountryResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListPhoneNumberCountryParams Optional parameters for the method 'ListPhoneNumberCountry' type ListPhoneNumberCountryParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -193,32 +186,32 @@ type ListPhoneNumberCountryParams struct { * @param optional nil or *ListPhoneNumberCountryParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListPhoneNumberCountryResponse -*/ + */ func (c *DefaultApiService) ListPhoneNumberCountry(params *ListPhoneNumberCountryParams) (*ListPhoneNumberCountryResponse, error) { - path := "/v1/PhoneNumbers/Countries" + path := "/v1/PhoneNumbers/Countries" - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListPhoneNumberCountryResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListPhoneNumberCountryResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListVoiceCountryParams Optional parameters for the method 'ListVoiceCountry' type ListVoiceCountryParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -229,29 +222,28 @@ type ListVoiceCountryParams struct { * @param optional nil or *ListVoiceCountryParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListVoiceCountryResponse -*/ + */ func (c *DefaultApiService) ListVoiceCountry(params *ListVoiceCountryParams) (*ListVoiceCountryResponse, error) { - path := "/v1/Voice/Countries" + path := "/v1/Voice/Countries" - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListVoiceCountryResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListVoiceCountryResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } diff --git a/twilio/rest/pricing/v1/model_list_messaging_country_response.go b/twilio/rest/pricing/v1/model_list_messaging_country_response.go index fe8fab607..11d718486 100644 --- a/twilio/rest/pricing/v1/model_list_messaging_country_response.go +++ b/twilio/rest/pricing/v1/model_list_messaging_country_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Pricing - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListMessagingCountryResponse struct for ListMessagingCountryResponse type ListMessagingCountryResponse struct { Countries []PricingV1MessagingMessagingCountry `json:"Countries,omitempty"` - Meta ListMessagingCountryResponseMeta `json:"Meta,omitempty"` + Meta ListMessagingCountryResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/pricing/v1/model_list_messaging_country_response_meta.go b/twilio/rest/pricing/v1/model_list_messaging_country_response_meta.go index 6920911ea..f4f5fd118 100644 --- a/twilio/rest/pricing/v1/model_list_messaging_country_response_meta.go +++ b/twilio/rest/pricing/v1/model_list_messaging_country_response_meta.go @@ -1,22 +1,23 @@ /* - * Twilio - Pricing - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListMessagingCountryResponseMeta struct for ListMessagingCountryResponseMeta type ListMessagingCountryResponseMeta struct { - FirstPageUrl string `json:"FirstPageUrl,omitempty"` - Key string `json:"Key,omitempty"` - NextPageUrl string `json:"NextPageUrl,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` - Url string `json:"Url,omitempty"` + Url string `json:"Url,omitempty"` } diff --git a/twilio/rest/pricing/v1/model_list_phone_number_country_response.go b/twilio/rest/pricing/v1/model_list_phone_number_country_response.go index 14f0946a9..4210d2b6f 100644 --- a/twilio/rest/pricing/v1/model_list_phone_number_country_response.go +++ b/twilio/rest/pricing/v1/model_list_phone_number_country_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Pricing - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListPhoneNumberCountryResponse struct for ListPhoneNumberCountryResponse type ListPhoneNumberCountryResponse struct { Countries []PricingV1PhoneNumberPhoneNumberCountry `json:"Countries,omitempty"` - Meta ListMessagingCountryResponseMeta `json:"Meta,omitempty"` + Meta ListMessagingCountryResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/pricing/v1/model_list_voice_country_response.go b/twilio/rest/pricing/v1/model_list_voice_country_response.go index 2af159c75..0da901612 100644 --- a/twilio/rest/pricing/v1/model_list_voice_country_response.go +++ b/twilio/rest/pricing/v1/model_list_voice_country_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Pricing - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListVoiceCountryResponse struct for ListVoiceCountryResponse type ListVoiceCountryResponse struct { - Countries []PricingV1VoiceVoiceCountry `json:"Countries,omitempty"` - Meta ListMessagingCountryResponseMeta `json:"Meta,omitempty"` + Countries []PricingV1VoiceVoiceCountry `json:"Countries,omitempty"` + Meta ListMessagingCountryResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/pricing/v1/model_pricing_v1_messaging.go b/twilio/rest/pricing/v1/model_pricing_v1_messaging.go index 0da347218..90c6a6fd6 100644 --- a/twilio/rest/pricing/v1/model_pricing_v1_messaging.go +++ b/twilio/rest/pricing/v1/model_pricing_v1_messaging.go @@ -1,18 +1,19 @@ /* - * Twilio - Pricing - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // PricingV1Messaging struct for PricingV1Messaging type PricingV1Messaging struct { Links *map[string]interface{} `json:"Links,omitempty"` - Name *string `json:"Name,omitempty"` - Url *string `json:"Url,omitempty"` + Name *string `json:"Name,omitempty"` + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/pricing/v1/model_pricing_v1_messaging_messaging_country.go b/twilio/rest/pricing/v1/model_pricing_v1_messaging_messaging_country.go index f69597a00..7aa303631 100644 --- a/twilio/rest/pricing/v1/model_pricing_v1_messaging_messaging_country.go +++ b/twilio/rest/pricing/v1/model_pricing_v1_messaging_messaging_country.go @@ -1,15 +1,16 @@ /* - * Twilio - Pricing - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // PricingV1MessagingMessagingCountry struct for PricingV1MessagingMessagingCountry type PricingV1MessagingMessagingCountry struct { // The name of the country diff --git a/twilio/rest/pricing/v1/model_pricing_v1_messaging_messaging_country_instance.go b/twilio/rest/pricing/v1/model_pricing_v1_messaging_messaging_country_instance.go index 0e984ef26..319631551 100644 --- a/twilio/rest/pricing/v1/model_pricing_v1_messaging_messaging_country_instance.go +++ b/twilio/rest/pricing/v1/model_pricing_v1_messaging_messaging_country_instance.go @@ -1,15 +1,16 @@ /* - * Twilio - Pricing - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // PricingV1MessagingMessagingCountryInstance struct for PricingV1MessagingMessagingCountryInstance type PricingV1MessagingMessagingCountryInstance struct { // The name of the country diff --git a/twilio/rest/pricing/v1/model_pricing_v1_messaging_messaging_country_instance_inbound_sms_prices.go b/twilio/rest/pricing/v1/model_pricing_v1_messaging_messaging_country_instance_inbound_sms_prices.go index 7b5ca563f..12a393e15 100644 --- a/twilio/rest/pricing/v1/model_pricing_v1_messaging_messaging_country_instance_inbound_sms_prices.go +++ b/twilio/rest/pricing/v1/model_pricing_v1_messaging_messaging_country_instance_inbound_sms_prices.go @@ -1,18 +1,19 @@ /* - * Twilio - Pricing - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // PricingV1MessagingMessagingCountryInstanceInboundSmsPrices struct for PricingV1MessagingMessagingCountryInstanceInboundSmsPrices type PricingV1MessagingMessagingCountryInstanceInboundSmsPrices struct { - BasePrice float32 `json:"BasePrice,omitempty"` + BasePrice float32 `json:"BasePrice,omitempty"` CurrentPrice float32 `json:"CurrentPrice,omitempty"` - NumberType string `json:"NumberType,omitempty"` + NumberType string `json:"NumberType,omitempty"` } diff --git a/twilio/rest/pricing/v1/model_pricing_v1_messaging_messaging_country_instance_outbound_sms_prices.go b/twilio/rest/pricing/v1/model_pricing_v1_messaging_messaging_country_instance_outbound_sms_prices.go index d126cf9e0..5211bf193 100644 --- a/twilio/rest/pricing/v1/model_pricing_v1_messaging_messaging_country_instance_outbound_sms_prices.go +++ b/twilio/rest/pricing/v1/model_pricing_v1_messaging_messaging_country_instance_outbound_sms_prices.go @@ -1,19 +1,20 @@ /* - * Twilio - Pricing - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // PricingV1MessagingMessagingCountryInstanceOutboundSmsPrices struct for PricingV1MessagingMessagingCountryInstanceOutboundSmsPrices type PricingV1MessagingMessagingCountryInstanceOutboundSmsPrices struct { - Carrier string `json:"Carrier,omitempty"` - Mcc string `json:"Mcc,omitempty"` - Mnc string `json:"Mnc,omitempty"` - Prices []PricingV1MessagingMessagingCountryInstanceInboundSmsPrices `json:"Prices,omitempty"` + Carrier string `json:"Carrier,omitempty"` + Mcc string `json:"Mcc,omitempty"` + Mnc string `json:"Mnc,omitempty"` + Prices []PricingV1MessagingMessagingCountryInstanceInboundSmsPrices `json:"Prices,omitempty"` } diff --git a/twilio/rest/pricing/v1/model_pricing_v1_phone_number.go b/twilio/rest/pricing/v1/model_pricing_v1_phone_number.go index e414c9b8e..1623695fd 100644 --- a/twilio/rest/pricing/v1/model_pricing_v1_phone_number.go +++ b/twilio/rest/pricing/v1/model_pricing_v1_phone_number.go @@ -1,18 +1,19 @@ /* - * Twilio - Pricing - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // PricingV1PhoneNumber struct for PricingV1PhoneNumber type PricingV1PhoneNumber struct { Links *map[string]interface{} `json:"Links,omitempty"` - Name *string `json:"Name,omitempty"` - Url *string `json:"Url,omitempty"` + Name *string `json:"Name,omitempty"` + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/pricing/v1/model_pricing_v1_phone_number_phone_number_country.go b/twilio/rest/pricing/v1/model_pricing_v1_phone_number_phone_number_country.go index a8c216cb3..5f0a46886 100644 --- a/twilio/rest/pricing/v1/model_pricing_v1_phone_number_phone_number_country.go +++ b/twilio/rest/pricing/v1/model_pricing_v1_phone_number_phone_number_country.go @@ -1,20 +1,21 @@ /* - * Twilio - Pricing - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // PricingV1PhoneNumberPhoneNumberCountry struct for PricingV1PhoneNumberPhoneNumberCountry type PricingV1PhoneNumberPhoneNumberCountry struct { // The name of the country Country *string `json:"Country,omitempty"` - // The ISO country code + // The ISO country code IsoCountry *string `json:"IsoCountry,omitempty"` // The absolute URL of the resource Url *string `json:"Url,omitempty"` diff --git a/twilio/rest/pricing/v1/model_pricing_v1_phone_number_phone_number_country_instance.go b/twilio/rest/pricing/v1/model_pricing_v1_phone_number_phone_number_country_instance.go index 8a4ad7c67..339b12d8b 100644 --- a/twilio/rest/pricing/v1/model_pricing_v1_phone_number_phone_number_country_instance.go +++ b/twilio/rest/pricing/v1/model_pricing_v1_phone_number_phone_number_country_instance.go @@ -1,20 +1,21 @@ /* - * Twilio - Pricing - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // PricingV1PhoneNumberPhoneNumberCountryInstance struct for PricingV1PhoneNumberPhoneNumberCountryInstance type PricingV1PhoneNumberPhoneNumberCountryInstance struct { // The name of the country Country *string `json:"Country,omitempty"` - // The ISO country code + // The ISO country code IsoCountry *string `json:"IsoCountry,omitempty"` // The list of PhoneNumberPrices records PhoneNumberPrices *[]PricingV1MessagingMessagingCountryInstanceInboundSmsPrices `json:"PhoneNumberPrices,omitempty"` diff --git a/twilio/rest/pricing/v1/model_pricing_v1_voice.go b/twilio/rest/pricing/v1/model_pricing_v1_voice.go index 9cf8b9aab..b47d27235 100644 --- a/twilio/rest/pricing/v1/model_pricing_v1_voice.go +++ b/twilio/rest/pricing/v1/model_pricing_v1_voice.go @@ -1,18 +1,19 @@ /* - * Twilio - Pricing - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // PricingV1Voice struct for PricingV1Voice type PricingV1Voice struct { Links *map[string]interface{} `json:"Links,omitempty"` - Name *string `json:"Name,omitempty"` - Url *string `json:"Url,omitempty"` + Name *string `json:"Name,omitempty"` + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/pricing/v1/model_pricing_v1_voice_voice_country.go b/twilio/rest/pricing/v1/model_pricing_v1_voice_voice_country.go index c4e868223..10fc21bdb 100644 --- a/twilio/rest/pricing/v1/model_pricing_v1_voice_voice_country.go +++ b/twilio/rest/pricing/v1/model_pricing_v1_voice_voice_country.go @@ -1,15 +1,16 @@ /* - * Twilio - Pricing - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // PricingV1VoiceVoiceCountry struct for PricingV1VoiceVoiceCountry type PricingV1VoiceVoiceCountry struct { // The name of the country diff --git a/twilio/rest/pricing/v1/model_pricing_v1_voice_voice_country_instance.go b/twilio/rest/pricing/v1/model_pricing_v1_voice_voice_country_instance.go index fcd1182b9..ad10a94d1 100644 --- a/twilio/rest/pricing/v1/model_pricing_v1_voice_voice_country_instance.go +++ b/twilio/rest/pricing/v1/model_pricing_v1_voice_voice_country_instance.go @@ -1,15 +1,16 @@ /* - * Twilio - Pricing - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // PricingV1VoiceVoiceCountryInstance struct for PricingV1VoiceVoiceCountryInstance type PricingV1VoiceVoiceCountryInstance struct { // The name of the country diff --git a/twilio/rest/pricing/v1/model_pricing_v1_voice_voice_country_instance_outbound_prefix_prices.go b/twilio/rest/pricing/v1/model_pricing_v1_voice_voice_country_instance_outbound_prefix_prices.go index 73ca55909..c084c649e 100644 --- a/twilio/rest/pricing/v1/model_pricing_v1_voice_voice_country_instance_outbound_prefix_prices.go +++ b/twilio/rest/pricing/v1/model_pricing_v1_voice_voice_country_instance_outbound_prefix_prices.go @@ -1,19 +1,20 @@ /* - * Twilio - Pricing - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // PricingV1VoiceVoiceCountryInstanceOutboundPrefixPrices struct for PricingV1VoiceVoiceCountryInstanceOutboundPrefixPrices type PricingV1VoiceVoiceCountryInstanceOutboundPrefixPrices struct { - BasePrice float32 `json:"BasePrice,omitempty"` - CurrentPrice float32 `json:"CurrentPrice,omitempty"` - FriendlyName string `json:"FriendlyName,omitempty"` - Prefixes []string `json:"Prefixes,omitempty"` + BasePrice float32 `json:"BasePrice,omitempty"` + CurrentPrice float32 `json:"CurrentPrice,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Prefixes []string `json:"Prefixes,omitempty"` } diff --git a/twilio/rest/pricing/v1/model_pricing_v1_voice_voice_number.go b/twilio/rest/pricing/v1/model_pricing_v1_voice_voice_number.go index 9c42c3793..200cb9f4b 100644 --- a/twilio/rest/pricing/v1/model_pricing_v1_voice_voice_number.go +++ b/twilio/rest/pricing/v1/model_pricing_v1_voice_voice_number.go @@ -1,24 +1,25 @@ /* - * Twilio - Pricing - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // PricingV1VoiceVoiceNumber struct for PricingV1VoiceVoiceNumber type PricingV1VoiceVoiceNumber struct { // The name of the country - Country *string `json:"Country,omitempty"` + Country *string `json:"Country,omitempty"` InboundCallPrice *PricingV1VoiceVoiceNumberInboundCallPrice `json:"InboundCallPrice,omitempty"` // The ISO country code IsoCountry *string `json:"IsoCountry,omitempty"` // The phone number - Number *string `json:"Number,omitempty"` + Number *string `json:"Number,omitempty"` OutboundCallPrice *PricingV1VoiceVoiceNumberOutboundCallPrice `json:"OutboundCallPrice,omitempty"` // The currency in which prices are measured, in ISO 4127 format (e.g. usd, eur, jpy) PriceUnit *string `json:"PriceUnit,omitempty"` diff --git a/twilio/rest/pricing/v1/model_pricing_v1_voice_voice_number_inbound_call_price.go b/twilio/rest/pricing/v1/model_pricing_v1_voice_voice_number_inbound_call_price.go index 9ec912dbe..340823499 100644 --- a/twilio/rest/pricing/v1/model_pricing_v1_voice_voice_number_inbound_call_price.go +++ b/twilio/rest/pricing/v1/model_pricing_v1_voice_voice_number_inbound_call_price.go @@ -1,18 +1,19 @@ /* - * Twilio - Pricing - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // PricingV1VoiceVoiceNumberInboundCallPrice The InboundCallPrice record type PricingV1VoiceVoiceNumberInboundCallPrice struct { - BasePrice float32 `json:"BasePrice,omitempty"` + BasePrice float32 `json:"BasePrice,omitempty"` CurrentPrice float32 `json:"CurrentPrice,omitempty"` - NumberType string `json:"NumberType,omitempty"` + NumberType string `json:"NumberType,omitempty"` } diff --git a/twilio/rest/pricing/v1/model_pricing_v1_voice_voice_number_outbound_call_price.go b/twilio/rest/pricing/v1/model_pricing_v1_voice_voice_number_outbound_call_price.go index f7afe9e93..ba708dc2a 100644 --- a/twilio/rest/pricing/v1/model_pricing_v1_voice_voice_number_outbound_call_price.go +++ b/twilio/rest/pricing/v1/model_pricing_v1_voice_voice_number_outbound_call_price.go @@ -1,17 +1,18 @@ /* - * Twilio - Pricing - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // PricingV1VoiceVoiceNumberOutboundCallPrice The OutboundCallPrice record type PricingV1VoiceVoiceNumberOutboundCallPrice struct { - BasePrice float32 `json:"BasePrice,omitempty"` + BasePrice float32 `json:"BasePrice,omitempty"` CurrentPrice float32 `json:"CurrentPrice,omitempty"` } diff --git a/twilio/rest/pricing/v2/api_default.go b/twilio/rest/pricing/v2/api_default.go index 95233f660..ab3329bd0 100644 --- a/twilio/rest/pricing/v2/api_default.go +++ b/twilio/rest/pricing/v2/api_default.go @@ -1,11 +1,11 @@ /* - * Twilio - Pricing - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,9 +14,10 @@ package openapi import ( "encoding/json" "fmt" - twilio "github.com/twilio/twilio-go/client" "net/url" - "strings" + "strings" + + twilio "github.com/twilio/twilio-go/client" ) type DefaultApiService struct { @@ -25,42 +26,40 @@ type DefaultApiService struct { } func NewDefaultApiService(client *twilio.Client) *DefaultApiService { - return &DefaultApiService { - client: client, + return &DefaultApiService{ + client: client, baseURL: "https://pricing.twilio.com", } } - /* * FetchVoiceCountry Method for FetchVoiceCountry * Fetch a specific Country. * @param IsoCountry The [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the origin-based voice pricing information to fetch. * @return PricingV2VoiceVoiceCountryInstance -*/ -func (c *DefaultApiService) FetchVoiceCountry(IsoCountry string, ) (*PricingV2VoiceVoiceCountryInstance, error) { - path := "/v2/Voice/Countries/{IsoCountry}" + */ +func (c *DefaultApiService) FetchVoiceCountry(IsoCountry string) (*PricingV2VoiceVoiceCountryInstance, error) { + path := "/v2/Voice/Countries/{IsoCountry}" path = strings.Replace(path, "{"+"IsoCountry"+"}", IsoCountry, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &PricingV2VoiceVoiceCountryInstance{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &PricingV2VoiceVoiceCountryInstance{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // FetchVoiceNumberParams Optional parameters for the method 'FetchVoiceNumber' type FetchVoiceNumberParams struct { OriginationNumber *string `json:"OriginationNumber,omitempty"` @@ -73,33 +72,33 @@ type FetchVoiceNumberParams struct { * @param optional nil or *FetchVoiceNumberParams - Optional Parameters: * @param "OriginationNumber" (string) - The origination phone number, in [E.164](https://www.twilio.com/docs/glossary/what-e164) format, for which to fetch the origin-based voice pricing information. E.164 format consists of a + followed by the country code and subscriber number. * @return PricingV2VoiceVoiceNumber -*/ + */ func (c *DefaultApiService) FetchVoiceNumber(DestinationNumber string, params *FetchVoiceNumberParams) (*PricingV2VoiceVoiceNumber, error) { - path := "/v2/Voice/Numbers/{DestinationNumber}" + path := "/v2/Voice/Numbers/{DestinationNumber}" path = strings.Replace(path, "{"+"DestinationNumber"+"}", DestinationNumber, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.OriginationNumber != nil { - data.Set("OriginationNumber", *params.OriginationNumber) -} + data := url.Values{} + headers := 0 + if params != nil && params.OriginationNumber != nil { + data.Set("OriginationNumber", *params.OriginationNumber) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &PricingV2VoiceVoiceNumber{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &PricingV2VoiceVoiceNumber{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListVoiceCountryParams Optional parameters for the method 'ListVoiceCountry' type ListVoiceCountryParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -110,29 +109,28 @@ type ListVoiceCountryParams struct { * @param optional nil or *ListVoiceCountryParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListVoiceCountryResponse -*/ + */ func (c *DefaultApiService) ListVoiceCountry(params *ListVoiceCountryParams) (*ListVoiceCountryResponse, error) { - path := "/v2/Voice/Countries" + path := "/v2/Voice/Countries" - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListVoiceCountryResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListVoiceCountryResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } diff --git a/twilio/rest/pricing/v2/model_list_voice_country_response.go b/twilio/rest/pricing/v2/model_list_voice_country_response.go index 6f9bc0ebc..3b5d5cc3d 100644 --- a/twilio/rest/pricing/v2/model_list_voice_country_response.go +++ b/twilio/rest/pricing/v2/model_list_voice_country_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Pricing - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListVoiceCountryResponse struct for ListVoiceCountryResponse type ListVoiceCountryResponse struct { Countries []PricingV2VoiceVoiceCountry `json:"Countries,omitempty"` - Meta ListVoiceCountryResponseMeta `json:"Meta,omitempty"` + Meta ListVoiceCountryResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/pricing/v2/model_list_voice_country_response_meta.go b/twilio/rest/pricing/v2/model_list_voice_country_response_meta.go index 76a0f64e3..82ae32642 100644 --- a/twilio/rest/pricing/v2/model_list_voice_country_response_meta.go +++ b/twilio/rest/pricing/v2/model_list_voice_country_response_meta.go @@ -1,22 +1,23 @@ /* - * Twilio - Pricing - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListVoiceCountryResponseMeta struct for ListVoiceCountryResponseMeta type ListVoiceCountryResponseMeta struct { - FirstPageUrl string `json:"FirstPageUrl,omitempty"` - Key string `json:"Key,omitempty"` - NextPageUrl string `json:"NextPageUrl,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` - Url string `json:"Url,omitempty"` + Url string `json:"Url,omitempty"` } diff --git a/twilio/rest/pricing/v2/model_pricing_v2_voice.go b/twilio/rest/pricing/v2/model_pricing_v2_voice.go index 89c664a79..a595d69dc 100644 --- a/twilio/rest/pricing/v2/model_pricing_v2_voice.go +++ b/twilio/rest/pricing/v2/model_pricing_v2_voice.go @@ -1,15 +1,16 @@ /* - * Twilio - Pricing - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // PricingV2Voice struct for PricingV2Voice type PricingV2Voice struct { // The URLs of the related Countries and Numbers resources diff --git a/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_country.go b/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_country.go index 968bff234..cee3cb968 100644 --- a/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_country.go +++ b/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_country.go @@ -1,15 +1,16 @@ /* - * Twilio - Pricing - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // PricingV2VoiceVoiceCountry struct for PricingV2VoiceVoiceCountry type PricingV2VoiceVoiceCountry struct { // The name of the country diff --git a/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_country_instance.go b/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_country_instance.go index b29818cf0..4085704b4 100644 --- a/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_country_instance.go +++ b/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_country_instance.go @@ -1,15 +1,16 @@ /* - * Twilio - Pricing - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // PricingV2VoiceVoiceCountryInstance struct for PricingV2VoiceVoiceCountryInstance type PricingV2VoiceVoiceCountryInstance struct { // The name of the country diff --git a/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_country_instance_inbound_call_prices.go b/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_country_instance_inbound_call_prices.go index c40ec1348..4c9fc3138 100644 --- a/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_country_instance_inbound_call_prices.go +++ b/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_country_instance_inbound_call_prices.go @@ -1,18 +1,19 @@ /* - * Twilio - Pricing - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // PricingV2VoiceVoiceCountryInstanceInboundCallPrices struct for PricingV2VoiceVoiceCountryInstanceInboundCallPrices type PricingV2VoiceVoiceCountryInstanceInboundCallPrices struct { - BasePrice float32 `json:"BasePrice,omitempty"` + BasePrice float32 `json:"BasePrice,omitempty"` CurrentPrice float32 `json:"CurrentPrice,omitempty"` - NumberType string `json:"NumberType,omitempty"` + NumberType string `json:"NumberType,omitempty"` } diff --git a/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_country_instance_outbound_prefix_prices.go b/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_country_instance_outbound_prefix_prices.go index 0df5a9f1b..52842775d 100644 --- a/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_country_instance_outbound_prefix_prices.go +++ b/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_country_instance_outbound_prefix_prices.go @@ -1,20 +1,21 @@ /* - * Twilio - Pricing - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // PricingV2VoiceVoiceCountryInstanceOutboundPrefixPrices struct for PricingV2VoiceVoiceCountryInstanceOutboundPrefixPrices type PricingV2VoiceVoiceCountryInstanceOutboundPrefixPrices struct { - BasePrice float32 `json:"BasePrice,omitempty"` - CurrentPrice float32 `json:"CurrentPrice,omitempty"` + BasePrice float32 `json:"BasePrice,omitempty"` + CurrentPrice float32 `json:"CurrentPrice,omitempty"` DestinationPrefixes []string `json:"DestinationPrefixes,omitempty"` - FriendlyName string `json:"FriendlyName,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` OriginationPrefixes []string `json:"OriginationPrefixes,omitempty"` } diff --git a/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_number.go b/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_number.go index 99fa21749..0afead333 100644 --- a/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_number.go +++ b/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_number.go @@ -1,22 +1,23 @@ /* - * Twilio - Pricing - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // PricingV2VoiceVoiceNumber struct for PricingV2VoiceVoiceNumber type PricingV2VoiceVoiceNumber struct { // The name of the country Country *string `json:"Country,omitempty"` // The destination phone number, in E.164 format - DestinationNumber *string `json:"DestinationNumber,omitempty"` - InboundCallPrice *PricingV2VoiceVoiceNumberInboundCallPrice `json:"InboundCallPrice,omitempty"` + DestinationNumber *string `json:"DestinationNumber,omitempty"` + InboundCallPrice *PricingV2VoiceVoiceNumberInboundCallPrice `json:"InboundCallPrice,omitempty"` // The ISO country code IsoCountry *string `json:"IsoCountry,omitempty"` // The origination phone number, in E.164 format diff --git a/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_number_inbound_call_price.go b/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_number_inbound_call_price.go index ae3ea090e..da9db3ec0 100644 --- a/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_number_inbound_call_price.go +++ b/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_number_inbound_call_price.go @@ -1,18 +1,19 @@ /* - * Twilio - Pricing - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // PricingV2VoiceVoiceNumberInboundCallPrice The InboundCallPrice record type PricingV2VoiceVoiceNumberInboundCallPrice struct { - BasePrice float32 `json:"BasePrice,omitempty"` + BasePrice float32 `json:"BasePrice,omitempty"` CurrentPrice float32 `json:"CurrentPrice,omitempty"` - NumberType string `json:"NumberType,omitempty"` + NumberType string `json:"NumberType,omitempty"` } diff --git a/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_number_outbound_call_prices.go b/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_number_outbound_call_prices.go index 58a4a11b4..08855a660 100644 --- a/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_number_outbound_call_prices.go +++ b/twilio/rest/pricing/v2/model_pricing_v2_voice_voice_number_outbound_call_prices.go @@ -1,18 +1,19 @@ /* - * Twilio - Pricing - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // PricingV2VoiceVoiceNumberOutboundCallPrices struct for PricingV2VoiceVoiceNumberOutboundCallPrices type PricingV2VoiceVoiceNumberOutboundCallPrices struct { - BasePrice float32 `json:"BasePrice,omitempty"` - CurrentPrice float32 `json:"CurrentPrice,omitempty"` + BasePrice float32 `json:"BasePrice,omitempty"` + CurrentPrice float32 `json:"CurrentPrice,omitempty"` OriginationPrefixes []string `json:"OriginationPrefixes,omitempty"` } diff --git a/twilio/rest/proxy/v1/api_default.go b/twilio/rest/proxy/v1/api_default.go index 7649c1a81..5a389f026 100644 --- a/twilio/rest/proxy/v1/api_default.go +++ b/twilio/rest/proxy/v1/api_default.go @@ -1,11 +1,11 @@ /* - * Twilio - Proxy - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Proxy + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,10 +14,11 @@ package openapi import ( "encoding/json" "fmt" - twilio "github.com/twilio/twilio-go/client" "net/url" - "strings" - "time" + "strings" + "time" + + twilio "github.com/twilio/twilio-go/client" ) type DefaultApiService struct { @@ -26,15 +27,15 @@ type DefaultApiService struct { } func NewDefaultApiService(client *twilio.Client) *DefaultApiService { - return &DefaultApiService { - client: client, + return &DefaultApiService{ + client: client, baseURL: "https://proxy.twilio.com", } } // CreateMessageInteractionParams Optional parameters for the method 'CreateMessageInteraction' type CreateMessageInteractionParams struct { - Body *string `json:"Body,omitempty"` + Body *string `json:"Body,omitempty"` MediaUrl *[]string `json:"MediaUrl,omitempty"` } @@ -48,45 +49,45 @@ type CreateMessageInteractionParams struct { * @param "Body" (string) - The message to send to the participant * @param "MediaUrl" ([]string) - Reserved. Not currently supported. * @return ProxyV1ServiceSessionParticipantMessageInteraction -*/ + */ func (c *DefaultApiService) CreateMessageInteraction(ServiceSid string, SessionSid string, ParticipantSid string, params *CreateMessageInteractionParams) (*ProxyV1ServiceSessionParticipantMessageInteraction, error) { - path := "/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants/{ParticipantSid}/MessageInteractions" + path := "/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants/{ParticipantSid}/MessageInteractions" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"SessionSid"+"}", SessionSid, -1) path = strings.Replace(path, "{"+"ParticipantSid"+"}", ParticipantSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Body != nil { - data.Set("Body", *params.Body) -} - if params != nil && params.MediaUrl != nil { - data.Set("MediaUrl", strings.Join(*params.MediaUrl, ",")) -} + data := url.Values{} + headers := 0 + if params != nil && params.Body != nil { + data.Set("Body", *params.Body) + } + if params != nil && params.MediaUrl != nil { + data.Set("MediaUrl", strings.Join(*params.MediaUrl, ",")) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ProxyV1ServiceSessionParticipantMessageInteraction{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ProxyV1ServiceSessionParticipantMessageInteraction{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateParticipantParams Optional parameters for the method 'CreateParticipant' type CreateParticipantParams struct { - FailOnParticipantConflict *bool `json:"FailOnParticipantConflict,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Identifier *string `json:"Identifier,omitempty"` - ProxyIdentifier *string `json:"ProxyIdentifier,omitempty"` - ProxyIdentifierSid *string `json:"ProxyIdentifierSid,omitempty"` + FailOnParticipantConflict *bool `json:"FailOnParticipantConflict,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Identifier *string `json:"Identifier,omitempty"` + ProxyIdentifier *string `json:"ProxyIdentifier,omitempty"` + ProxyIdentifierSid *string `json:"ProxyIdentifierSid,omitempty"` } /* @@ -101,51 +102,51 @@ type CreateParticipantParams struct { * @param "ProxyIdentifier" (string) - The proxy phone number to use for the Participant. If not specified, Proxy will select a number from the pool. * @param "ProxyIdentifierSid" (string) - The SID of the Proxy Identifier to assign to the Participant. * @return ProxyV1ServiceSessionParticipant -*/ + */ func (c *DefaultApiService) CreateParticipant(ServiceSid string, SessionSid string, params *CreateParticipantParams) (*ProxyV1ServiceSessionParticipant, error) { - path := "/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants" + path := "/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"SessionSid"+"}", SessionSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.FailOnParticipantConflict != nil { - data.Set("FailOnParticipantConflict", fmt.Sprint(*params.FailOnParticipantConflict)) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.Identifier != nil { - data.Set("Identifier", *params.Identifier) -} - if params != nil && params.ProxyIdentifier != nil { - data.Set("ProxyIdentifier", *params.ProxyIdentifier) -} - if params != nil && params.ProxyIdentifierSid != nil { - data.Set("ProxyIdentifierSid", *params.ProxyIdentifierSid) -} + data := url.Values{} + headers := 0 + if params != nil && params.FailOnParticipantConflict != nil { + data.Set("FailOnParticipantConflict", fmt.Sprint(*params.FailOnParticipantConflict)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Identifier != nil { + data.Set("Identifier", *params.Identifier) + } + if params != nil && params.ProxyIdentifier != nil { + data.Set("ProxyIdentifier", *params.ProxyIdentifier) + } + if params != nil && params.ProxyIdentifierSid != nil { + data.Set("ProxyIdentifierSid", *params.ProxyIdentifierSid) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ProxyV1ServiceSessionParticipant{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ProxyV1ServiceSessionParticipant{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreatePhoneNumberParams Optional parameters for the method 'CreatePhoneNumber' type CreatePhoneNumberParams struct { - IsReserved *bool `json:"IsReserved,omitempty"` + IsReserved *bool `json:"IsReserved,omitempty"` PhoneNumber *string `json:"PhoneNumber,omitempty"` - Sid *string `json:"Sid,omitempty"` + Sid *string `json:"Sid,omitempty"` } /* @@ -157,49 +158,49 @@ type CreatePhoneNumberParams struct { * @param "PhoneNumber" (string) - The phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format. E.164 phone numbers consist of a + followed by the country code and subscriber number without punctuation characters. For example, +14155551234. * @param "Sid" (string) - The SID of a Twilio [IncomingPhoneNumber](https://www.twilio.com/docs/phone-numbers/api/incomingphonenumber-resource) resource that represents the Twilio Number you would like to assign to your Proxy Service. * @return ProxyV1ServicePhoneNumber -*/ + */ func (c *DefaultApiService) CreatePhoneNumber(ServiceSid string, params *CreatePhoneNumberParams) (*ProxyV1ServicePhoneNumber, error) { - path := "/v1/Services/{ServiceSid}/PhoneNumbers" + path := "/v1/Services/{ServiceSid}/PhoneNumbers" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.IsReserved != nil { - data.Set("IsReserved", fmt.Sprint(*params.IsReserved)) -} - if params != nil && params.PhoneNumber != nil { - data.Set("PhoneNumber", *params.PhoneNumber) -} - if params != nil && params.Sid != nil { - data.Set("Sid", *params.Sid) -} + data := url.Values{} + headers := 0 + if params != nil && params.IsReserved != nil { + data.Set("IsReserved", fmt.Sprint(*params.IsReserved)) + } + if params != nil && params.PhoneNumber != nil { + data.Set("PhoneNumber", *params.PhoneNumber) + } + if params != nil && params.Sid != nil { + data.Set("Sid", *params.Sid) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ProxyV1ServicePhoneNumber{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ProxyV1ServicePhoneNumber{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateServiceParams Optional parameters for the method 'CreateService' type CreateServiceParams struct { - CallbackUrl *string `json:"CallbackUrl,omitempty"` - ChatInstanceSid *string `json:"ChatInstanceSid,omitempty"` - DefaultTtl *int32 `json:"DefaultTtl,omitempty"` - GeoMatchLevel *string `json:"GeoMatchLevel,omitempty"` - InterceptCallbackUrl *string `json:"InterceptCallbackUrl,omitempty"` + CallbackUrl *string `json:"CallbackUrl,omitempty"` + ChatInstanceSid *string `json:"ChatInstanceSid,omitempty"` + DefaultTtl *int32 `json:"DefaultTtl,omitempty"` + GeoMatchLevel *string `json:"GeoMatchLevel,omitempty"` + InterceptCallbackUrl *string `json:"InterceptCallbackUrl,omitempty"` NumberSelectionBehavior *string `json:"NumberSelectionBehavior,omitempty"` OutOfSessionCallbackUrl *string `json:"OutOfSessionCallbackUrl,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` } /* @@ -215,62 +216,62 @@ type CreateServiceParams struct { * @param "OutOfSessionCallbackUrl" (string) - The URL we should call when an inbound call or SMS action occurs on a closed or non-existent Session. If your server (or a Twilio [function](https://www.twilio.com/functions)) responds with valid [TwiML](https://www.twilio.com/docs/voice/twiml), we will process it. This means it is possible, for example, to play a message for a call, send an automated text message response, or redirect a call to another Phone Number. See [Out-of-Session Callback Response Guide](https://www.twilio.com/docs/proxy/out-session-callback-response-guide) for more information. * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. This value must be 191 characters or fewer in length and be unique. **This value should not have PII.** * @return ProxyV1Service -*/ + */ func (c *DefaultApiService) CreateService(params *CreateServiceParams) (*ProxyV1Service, error) { - path := "/v1/Services" - - data := url.Values{} - headers := 0 + path := "/v1/Services" - if params != nil && params.CallbackUrl != nil { - data.Set("CallbackUrl", *params.CallbackUrl) -} - if params != nil && params.ChatInstanceSid != nil { - data.Set("ChatInstanceSid", *params.ChatInstanceSid) -} - if params != nil && params.DefaultTtl != nil { - data.Set("DefaultTtl", fmt.Sprint(*params.DefaultTtl)) -} - if params != nil && params.GeoMatchLevel != nil { - data.Set("GeoMatchLevel", *params.GeoMatchLevel) -} - if params != nil && params.InterceptCallbackUrl != nil { - data.Set("InterceptCallbackUrl", *params.InterceptCallbackUrl) -} - if params != nil && params.NumberSelectionBehavior != nil { - data.Set("NumberSelectionBehavior", *params.NumberSelectionBehavior) -} - if params != nil && params.OutOfSessionCallbackUrl != nil { - data.Set("OutOfSessionCallbackUrl", *params.OutOfSessionCallbackUrl) -} - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) -} + data := url.Values{} + headers := 0 + if params != nil && params.CallbackUrl != nil { + data.Set("CallbackUrl", *params.CallbackUrl) + } + if params != nil && params.ChatInstanceSid != nil { + data.Set("ChatInstanceSid", *params.ChatInstanceSid) + } + if params != nil && params.DefaultTtl != nil { + data.Set("DefaultTtl", fmt.Sprint(*params.DefaultTtl)) + } + if params != nil && params.GeoMatchLevel != nil { + data.Set("GeoMatchLevel", *params.GeoMatchLevel) + } + if params != nil && params.InterceptCallbackUrl != nil { + data.Set("InterceptCallbackUrl", *params.InterceptCallbackUrl) + } + if params != nil && params.NumberSelectionBehavior != nil { + data.Set("NumberSelectionBehavior", *params.NumberSelectionBehavior) + } + if params != nil && params.OutOfSessionCallbackUrl != nil { + data.Set("OutOfSessionCallbackUrl", *params.OutOfSessionCallbackUrl) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ProxyV1Service{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ProxyV1Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateSessionParams Optional parameters for the method 'CreateSession' type CreateSessionParams struct { - DateExpiry *time.Time `json:"DateExpiry,omitempty"` - FailOnParticipantConflict *bool `json:"FailOnParticipantConflict,omitempty"` - Mode *string `json:"Mode,omitempty"` - Participants *[]map[string]interface{} `json:"Participants,omitempty"` - Status *string `json:"Status,omitempty"` - Ttl *int32 `json:"Ttl,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + DateExpiry *time.Time `json:"DateExpiry,omitempty"` + FailOnParticipantConflict *bool `json:"FailOnParticipantConflict,omitempty"` + Mode *string `json:"Mode,omitempty"` + Participants *[]map[string]interface{} `json:"Participants,omitempty"` + Status *string `json:"Status,omitempty"` + Ttl *int32 `json:"Ttl,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` } /* @@ -286,57 +287,57 @@ type CreateSessionParams struct { * @param "Ttl" (int32) - The time, in seconds, when the session will expire. The time is measured from the last Session create or the Session's last Interaction. * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. This value must be 191 characters or fewer in length and be unique. **This value should not have PII.** * @return ProxyV1ServiceSession -*/ + */ func (c *DefaultApiService) CreateSession(ServiceSid string, params *CreateSessionParams) (*ProxyV1ServiceSession, error) { - path := "/v1/Services/{ServiceSid}/Sessions" + path := "/v1/Services/{ServiceSid}/Sessions" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.DateExpiry != nil { - data.Set("DateExpiry", fmt.Sprint(*params.DateExpiry)) -} - if params != nil && params.FailOnParticipantConflict != nil { - data.Set("FailOnParticipantConflict", fmt.Sprint(*params.FailOnParticipantConflict)) -} - if params != nil && params.Mode != nil { - data.Set("Mode", *params.Mode) -} - if params != nil && params.Participants != nil { - v, err := json.Marshal(params.Participants) - - if err != nil { - return nil, err + if params != nil && params.DateExpiry != nil { + data.Set("DateExpiry", fmt.Sprint(*params.DateExpiry)) + } + if params != nil && params.FailOnParticipantConflict != nil { + data.Set("FailOnParticipantConflict", fmt.Sprint(*params.FailOnParticipantConflict)) } + if params != nil && params.Mode != nil { + data.Set("Mode", *params.Mode) + } + if params != nil && params.Participants != nil { + v, err := json.Marshal(params.Participants) - data.Set("Participants", fmt.Sprint(v)) -} - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) -} - if params != nil && params.Ttl != nil { - data.Set("Ttl", fmt.Sprint(*params.Ttl)) -} - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) -} + if err != nil { + return nil, err + } + data.Set("Participants", fmt.Sprint(v)) + } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + if params != nil && params.Ttl != nil { + data.Set("Ttl", fmt.Sprint(*params.Ttl)) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ProxyV1ServiceSession{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ProxyV1ServiceSession{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateShortCodeParams Optional parameters for the method 'CreateShortCode' type CreateShortCodeParams struct { Sid *string `json:"Sid,omitempty"` @@ -349,32 +350,31 @@ type CreateShortCodeParams struct { * @param optional nil or *CreateShortCodeParams - Optional Parameters: * @param "Sid" (string) - The SID of a Twilio [ShortCode](https://www.twilio.com/docs/sms/api/short-code) resource that represents the short code you would like to assign to your Proxy Service. * @return ProxyV1ServiceShortCode -*/ + */ func (c *DefaultApiService) CreateShortCode(ServiceSid string, params *CreateShortCodeParams) (*ProxyV1ServiceShortCode, error) { - path := "/v1/Services/{ServiceSid}/ShortCodes" + path := "/v1/Services/{ServiceSid}/ShortCodes" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Sid != nil { - data.Set("Sid", *params.Sid) -} + data := url.Values{} + headers := 0 + if params != nil && params.Sid != nil { + data.Set("Sid", *params.Sid) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ProxyV1ServiceShortCode{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ProxyV1ServiceShortCode{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -383,26 +383,24 @@ func (c *DefaultApiService) CreateShortCode(ServiceSid string, params *CreateSho * @param ServiceSid The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) of the resource to delete. * @param SessionSid The SID of the parent [Session](https://www.twilio.com/docs/proxy/api/session) of the resource to delete. * @param Sid The Twilio-provided string that uniquely identifies the Interaction resource to delete. -*/ -func (c *DefaultApiService) DeleteInteraction(ServiceSid string, SessionSid string, Sid string, ) (error) { - path := "/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Interactions/{Sid}" + */ +func (c *DefaultApiService) DeleteInteraction(ServiceSid string, SessionSid string, Sid string) error { + path := "/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Interactions/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"SessionSid"+"}", SessionSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -411,26 +409,24 @@ func (c *DefaultApiService) DeleteInteraction(ServiceSid string, SessionSid stri * @param ServiceSid The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) of the resource to delete. * @param SessionSid The SID of the parent [Session](https://www.twilio.com/docs/proxy/api/session) of the resource to delete. * @param Sid The Twilio-provided string that uniquely identifies the Participant resource to delete. -*/ -func (c *DefaultApiService) DeleteParticipant(ServiceSid string, SessionSid string, Sid string, ) (error) { - path := "/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants/{Sid}" + */ +func (c *DefaultApiService) DeleteParticipant(ServiceSid string, SessionSid string, Sid string) error { + path := "/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"SessionSid"+"}", SessionSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -438,49 +434,45 @@ func (c *DefaultApiService) DeleteParticipant(ServiceSid string, SessionSid stri * Delete a specific Phone Number from a Service. * @param ServiceSid The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) of the PhoneNumber resource to delete. * @param Sid The Twilio-provided string that uniquely identifies the PhoneNumber resource to delete. -*/ -func (c *DefaultApiService) DeletePhoneNumber(ServiceSid string, Sid string, ) (error) { - path := "/v1/Services/{ServiceSid}/PhoneNumbers/{Sid}" + */ +func (c *DefaultApiService) DeletePhoneNumber(ServiceSid string, Sid string) error { + path := "/v1/Services/{ServiceSid}/PhoneNumbers/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* * DeleteService Method for DeleteService * Delete a specific Service. * @param Sid The Twilio-provided string that uniquely identifies the Service resource to delete. -*/ -func (c *DefaultApiService) DeleteService(Sid string, ) (error) { - path := "/v1/Services/{Sid}" + */ +func (c *DefaultApiService) DeleteService(Sid string) error { + path := "/v1/Services/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -488,25 +480,23 @@ func (c *DefaultApiService) DeleteService(Sid string, ) (error) { * Delete a specific Session. * @param ServiceSid The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) of the resource to delete. * @param Sid The Twilio-provided string that uniquely identifies the Session resource to delete. -*/ -func (c *DefaultApiService) DeleteSession(ServiceSid string, Sid string, ) (error) { - path := "/v1/Services/{ServiceSid}/Sessions/{Sid}" + */ +func (c *DefaultApiService) DeleteSession(ServiceSid string, Sid string) error { + path := "/v1/Services/{ServiceSid}/Sessions/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -514,25 +504,23 @@ func (c *DefaultApiService) DeleteSession(ServiceSid string, Sid string, ) (erro * Delete a specific Short Code from a Service. * @param ServiceSid The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) resource to delete the ShortCode resource from. * @param Sid The Twilio-provided string that uniquely identifies the ShortCode resource to delete. -*/ -func (c *DefaultApiService) DeleteShortCode(ServiceSid string, Sid string, ) (error) { - path := "/v1/Services/{ServiceSid}/ShortCodes/{Sid}" + */ +func (c *DefaultApiService) DeleteShortCode(ServiceSid string, Sid string) error { + path := "/v1/Services/{ServiceSid}/ShortCodes/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + defer resp.Body.Close() - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() - - return nil + return nil } /* @@ -542,31 +530,29 @@ func (c *DefaultApiService) DeleteShortCode(ServiceSid string, Sid string, ) (er * @param SessionSid The SID of the parent [Session](https://www.twilio.com/docs/proxy/api/session) of the resource to fetch. * @param Sid The Twilio-provided string that uniquely identifies the Interaction resource to fetch. * @return ProxyV1ServiceSessionInteraction -*/ -func (c *DefaultApiService) FetchInteraction(ServiceSid string, SessionSid string, Sid string, ) (*ProxyV1ServiceSessionInteraction, error) { - path := "/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Interactions/{Sid}" + */ +func (c *DefaultApiService) FetchInteraction(ServiceSid string, SessionSid string, Sid string) (*ProxyV1ServiceSessionInteraction, error) { + path := "/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Interactions/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"SessionSid"+"}", SessionSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &ProxyV1ServiceSessionInteraction{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ProxyV1ServiceSessionInteraction{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -576,32 +562,30 @@ func (c *DefaultApiService) FetchInteraction(ServiceSid string, SessionSid strin * @param ParticipantSid The SID of the [Participant](https://www.twilio.com/docs/proxy/api/participant) resource. * @param Sid The Twilio-provided string that uniquely identifies the MessageInteraction resource to fetch. * @return ProxyV1ServiceSessionParticipantMessageInteraction -*/ -func (c *DefaultApiService) FetchMessageInteraction(ServiceSid string, SessionSid string, ParticipantSid string, Sid string, ) (*ProxyV1ServiceSessionParticipantMessageInteraction, error) { - path := "/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants/{ParticipantSid}/MessageInteractions/{Sid}" + */ +func (c *DefaultApiService) FetchMessageInteraction(ServiceSid string, SessionSid string, ParticipantSid string, Sid string) (*ProxyV1ServiceSessionParticipantMessageInteraction, error) { + path := "/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants/{ParticipantSid}/MessageInteractions/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"SessionSid"+"}", SessionSid, -1) path = strings.Replace(path, "{"+"ParticipantSid"+"}", ParticipantSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ProxyV1ServiceSessionParticipantMessageInteraction{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ProxyV1ServiceSessionParticipantMessageInteraction{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -611,31 +595,29 @@ func (c *DefaultApiService) FetchMessageInteraction(ServiceSid string, SessionSi * @param SessionSid The SID of the parent [Session](https://www.twilio.com/docs/proxy/api/session) of the resource to fetch. * @param Sid The Twilio-provided string that uniquely identifies the Participant resource to fetch. * @return ProxyV1ServiceSessionParticipant -*/ -func (c *DefaultApiService) FetchParticipant(ServiceSid string, SessionSid string, Sid string, ) (*ProxyV1ServiceSessionParticipant, error) { - path := "/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants/{Sid}" + */ +func (c *DefaultApiService) FetchParticipant(ServiceSid string, SessionSid string, Sid string) (*ProxyV1ServiceSessionParticipant, error) { + path := "/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"SessionSid"+"}", SessionSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ProxyV1ServiceSessionParticipant{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ProxyV1ServiceSessionParticipant{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -644,30 +626,28 @@ func (c *DefaultApiService) FetchParticipant(ServiceSid string, SessionSid strin * @param ServiceSid The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) of the PhoneNumber resource to fetch. * @param Sid The Twilio-provided string that uniquely identifies the PhoneNumber resource to fetch. * @return ProxyV1ServicePhoneNumber -*/ -func (c *DefaultApiService) FetchPhoneNumber(ServiceSid string, Sid string, ) (*ProxyV1ServicePhoneNumber, error) { - path := "/v1/Services/{ServiceSid}/PhoneNumbers/{Sid}" + */ +func (c *DefaultApiService) FetchPhoneNumber(ServiceSid string, Sid string) (*ProxyV1ServicePhoneNumber, error) { + path := "/v1/Services/{ServiceSid}/PhoneNumbers/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &ProxyV1ServicePhoneNumber{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ProxyV1ServicePhoneNumber{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -675,29 +655,27 @@ func (c *DefaultApiService) FetchPhoneNumber(ServiceSid string, Sid string, ) (* * Fetch a specific Service. * @param Sid The Twilio-provided string that uniquely identifies the Service resource to fetch. * @return ProxyV1Service -*/ -func (c *DefaultApiService) FetchService(Sid string, ) (*ProxyV1Service, error) { - path := "/v1/Services/{Sid}" + */ +func (c *DefaultApiService) FetchService(Sid string) (*ProxyV1Service, error) { + path := "/v1/Services/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ProxyV1Service{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ProxyV1Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -706,30 +684,28 @@ func (c *DefaultApiService) FetchService(Sid string, ) (*ProxyV1Service, error) * @param ServiceSid The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) of the resource to fetch. * @param Sid The Twilio-provided string that uniquely identifies the Session resource to fetch. * @return ProxyV1ServiceSession -*/ -func (c *DefaultApiService) FetchSession(ServiceSid string, Sid string, ) (*ProxyV1ServiceSession, error) { - path := "/v1/Services/{ServiceSid}/Sessions/{Sid}" + */ +func (c *DefaultApiService) FetchSession(ServiceSid string, Sid string) (*ProxyV1ServiceSession, error) { + path := "/v1/Services/{ServiceSid}/Sessions/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ProxyV1ServiceSession{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ProxyV1ServiceSession{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -738,31 +714,30 @@ func (c *DefaultApiService) FetchSession(ServiceSid string, Sid string, ) (*Prox * @param ServiceSid The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) to fetch the resource from. * @param Sid The Twilio-provided string that uniquely identifies the ShortCode resource to fetch. * @return ProxyV1ServiceShortCode -*/ -func (c *DefaultApiService) FetchShortCode(ServiceSid string, Sid string, ) (*ProxyV1ServiceShortCode, error) { - path := "/v1/Services/{ServiceSid}/ShortCodes/{Sid}" + */ +func (c *DefaultApiService) FetchShortCode(ServiceSid string, Sid string) (*ProxyV1ServiceShortCode, error) { + path := "/v1/Services/{ServiceSid}/ShortCodes/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ProxyV1ServiceShortCode{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ProxyV1ServiceShortCode{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListInteractionParams Optional parameters for the method 'ListInteraction' type ListInteractionParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -776,34 +751,34 @@ type ListInteractionParams struct { * @param optional nil or *ListInteractionParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListInteractionResponse -*/ + */ func (c *DefaultApiService) ListInteraction(ServiceSid string, SessionSid string, params *ListInteractionParams) (*ListInteractionResponse, error) { - path := "/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Interactions" + path := "/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Interactions" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"SessionSid"+"}", SessionSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListInteractionResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListInteractionResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListMessageInteractionParams Optional parameters for the method 'ListMessageInteraction' type ListMessageInteractionParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -817,35 +792,35 @@ type ListMessageInteractionParams struct { * @param optional nil or *ListMessageInteractionParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListMessageInteractionResponse -*/ + */ func (c *DefaultApiService) ListMessageInteraction(ServiceSid string, SessionSid string, ParticipantSid string, params *ListMessageInteractionParams) (*ListMessageInteractionResponse, error) { - path := "/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants/{ParticipantSid}/MessageInteractions" + path := "/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants/{ParticipantSid}/MessageInteractions" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"SessionSid"+"}", SessionSid, -1) path = strings.Replace(path, "{"+"ParticipantSid"+"}", ParticipantSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListMessageInteractionResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListMessageInteractionResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListParticipantParams Optional parameters for the method 'ListParticipant' type ListParticipantParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -859,34 +834,34 @@ type ListParticipantParams struct { * @param optional nil or *ListParticipantParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListParticipantResponse -*/ + */ func (c *DefaultApiService) ListParticipant(ServiceSid string, SessionSid string, params *ListParticipantParams) (*ListParticipantResponse, error) { - path := "/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants" + path := "/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"SessionSid"+"}", SessionSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListParticipantResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListParticipantResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListPhoneNumberParams Optional parameters for the method 'ListPhoneNumber' type ListPhoneNumberParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -899,33 +874,33 @@ type ListPhoneNumberParams struct { * @param optional nil or *ListPhoneNumberParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListPhoneNumberResponse -*/ + */ func (c *DefaultApiService) ListPhoneNumber(ServiceSid string, params *ListPhoneNumberParams) (*ListPhoneNumberResponse, error) { - path := "/v1/Services/{ServiceSid}/PhoneNumbers" + path := "/v1/Services/{ServiceSid}/PhoneNumbers" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListPhoneNumberResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListPhoneNumberResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListServiceParams Optional parameters for the method 'ListService' type ListServiceParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -937,32 +912,32 @@ type ListServiceParams struct { * @param optional nil or *ListServiceParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListServiceResponse -*/ + */ func (c *DefaultApiService) ListService(params *ListServiceParams) (*ListServiceResponse, error) { - path := "/v1/Services" + path := "/v1/Services" - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListServiceResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListServiceResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListSessionParams Optional parameters for the method 'ListSession' type ListSessionParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -975,33 +950,33 @@ type ListSessionParams struct { * @param optional nil or *ListSessionParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListSessionResponse -*/ + */ func (c *DefaultApiService) ListSession(ServiceSid string, params *ListSessionParams) (*ListSessionResponse, error) { - path := "/v1/Services/{ServiceSid}/Sessions" + path := "/v1/Services/{ServiceSid}/Sessions" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListSessionResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListSessionResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListShortCodeParams Optional parameters for the method 'ListShortCode' type ListShortCodeParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1014,33 +989,33 @@ type ListShortCodeParams struct { * @param optional nil or *ListShortCodeParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListShortCodeResponse -*/ + */ func (c *DefaultApiService) ListShortCode(ServiceSid string, params *ListShortCodeParams) (*ListShortCodeResponse, error) { - path := "/v1/Services/{ServiceSid}/ShortCodes" + path := "/v1/Services/{ServiceSid}/ShortCodes" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListShortCodeResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListShortCodeResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdatePhoneNumberParams Optional parameters for the method 'UpdatePhoneNumber' type UpdatePhoneNumberParams struct { IsReserved *bool `json:"IsReserved,omitempty"` @@ -1054,44 +1029,44 @@ type UpdatePhoneNumberParams struct { * @param optional nil or *UpdatePhoneNumberParams - Optional Parameters: * @param "IsReserved" (bool) - Whether the phone number should be reserved and not be assigned to a participant using proxy pool logic. See [Reserved Phone Numbers](https://www.twilio.com/docs/proxy/reserved-phone-numbers) for more information. * @return ProxyV1ServicePhoneNumber -*/ + */ func (c *DefaultApiService) UpdatePhoneNumber(ServiceSid string, Sid string, params *UpdatePhoneNumberParams) (*ProxyV1ServicePhoneNumber, error) { - path := "/v1/Services/{ServiceSid}/PhoneNumbers/{Sid}" + path := "/v1/Services/{ServiceSid}/PhoneNumbers/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.IsReserved != nil { - data.Set("IsReserved", fmt.Sprint(*params.IsReserved)) -} + data := url.Values{} + headers := 0 + if params != nil && params.IsReserved != nil { + data.Set("IsReserved", fmt.Sprint(*params.IsReserved)) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ProxyV1ServicePhoneNumber{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ProxyV1ServicePhoneNumber{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateServiceParams Optional parameters for the method 'UpdateService' type UpdateServiceParams struct { - CallbackUrl *string `json:"CallbackUrl,omitempty"` - ChatInstanceSid *string `json:"ChatInstanceSid,omitempty"` - DefaultTtl *int32 `json:"DefaultTtl,omitempty"` - GeoMatchLevel *string `json:"GeoMatchLevel,omitempty"` - InterceptCallbackUrl *string `json:"InterceptCallbackUrl,omitempty"` + CallbackUrl *string `json:"CallbackUrl,omitempty"` + ChatInstanceSid *string `json:"ChatInstanceSid,omitempty"` + DefaultTtl *int32 `json:"DefaultTtl,omitempty"` + GeoMatchLevel *string `json:"GeoMatchLevel,omitempty"` + InterceptCallbackUrl *string `json:"InterceptCallbackUrl,omitempty"` NumberSelectionBehavior *string `json:"NumberSelectionBehavior,omitempty"` OutOfSessionCallbackUrl *string `json:"OutOfSessionCallbackUrl,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` } /* @@ -1108,60 +1083,60 @@ type UpdateServiceParams struct { * @param "OutOfSessionCallbackUrl" (string) - The URL we should call when an inbound call or SMS action occurs on a closed or non-existent Session. If your server (or a Twilio [function](https://www.twilio.com/functions)) responds with valid [TwiML](https://www.twilio.com/docs/voice/twiml), we will process it. This means it is possible, for example, to play a message for a call, send an automated text message response, or redirect a call to another Phone Number. See [Out-of-Session Callback Response Guide](https://www.twilio.com/docs/proxy/out-session-callback-response-guide) for more information. * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. This value must be 191 characters or fewer in length and be unique. **This value should not have PII.** * @return ProxyV1Service -*/ + */ func (c *DefaultApiService) UpdateService(Sid string, params *UpdateServiceParams) (*ProxyV1Service, error) { - path := "/v1/Services/{Sid}" + path := "/v1/Services/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.CallbackUrl != nil { - data.Set("CallbackUrl", *params.CallbackUrl) -} - if params != nil && params.ChatInstanceSid != nil { - data.Set("ChatInstanceSid", *params.ChatInstanceSid) -} - if params != nil && params.DefaultTtl != nil { - data.Set("DefaultTtl", fmt.Sprint(*params.DefaultTtl)) -} - if params != nil && params.GeoMatchLevel != nil { - data.Set("GeoMatchLevel", *params.GeoMatchLevel) -} - if params != nil && params.InterceptCallbackUrl != nil { - data.Set("InterceptCallbackUrl", *params.InterceptCallbackUrl) -} - if params != nil && params.NumberSelectionBehavior != nil { - data.Set("NumberSelectionBehavior", *params.NumberSelectionBehavior) -} - if params != nil && params.OutOfSessionCallbackUrl != nil { - data.Set("OutOfSessionCallbackUrl", *params.OutOfSessionCallbackUrl) -} - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) -} + data := url.Values{} + headers := 0 + if params != nil && params.CallbackUrl != nil { + data.Set("CallbackUrl", *params.CallbackUrl) + } + if params != nil && params.ChatInstanceSid != nil { + data.Set("ChatInstanceSid", *params.ChatInstanceSid) + } + if params != nil && params.DefaultTtl != nil { + data.Set("DefaultTtl", fmt.Sprint(*params.DefaultTtl)) + } + if params != nil && params.GeoMatchLevel != nil { + data.Set("GeoMatchLevel", *params.GeoMatchLevel) + } + if params != nil && params.InterceptCallbackUrl != nil { + data.Set("InterceptCallbackUrl", *params.InterceptCallbackUrl) + } + if params != nil && params.NumberSelectionBehavior != nil { + data.Set("NumberSelectionBehavior", *params.NumberSelectionBehavior) + } + if params != nil && params.OutOfSessionCallbackUrl != nil { + data.Set("OutOfSessionCallbackUrl", *params.OutOfSessionCallbackUrl) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ProxyV1Service{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ProxyV1Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateSessionParams Optional parameters for the method 'UpdateSession' type UpdateSessionParams struct { - DateExpiry *time.Time `json:"DateExpiry,omitempty"` - FailOnParticipantConflict *bool `json:"FailOnParticipantConflict,omitempty"` - Status *string `json:"Status,omitempty"` - Ttl *int32 `json:"Ttl,omitempty"` + DateExpiry *time.Time `json:"DateExpiry,omitempty"` + FailOnParticipantConflict *bool `json:"FailOnParticipantConflict,omitempty"` + Status *string `json:"Status,omitempty"` + Ttl *int32 `json:"Ttl,omitempty"` } /* @@ -1175,43 +1150,43 @@ type UpdateSessionParams struct { * @param "Status" (string) - The new status of the resource. Can be: `in-progress` to re-open a session or `closed` to close a session. * @param "Ttl" (int32) - The time, in seconds, when the session will expire. The time is measured from the last Session create or the Session's last Interaction. * @return ProxyV1ServiceSession -*/ + */ func (c *DefaultApiService) UpdateSession(ServiceSid string, Sid string, params *UpdateSessionParams) (*ProxyV1ServiceSession, error) { - path := "/v1/Services/{ServiceSid}/Sessions/{Sid}" + path := "/v1/Services/{ServiceSid}/Sessions/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.DateExpiry != nil { - data.Set("DateExpiry", fmt.Sprint(*params.DateExpiry)) -} - if params != nil && params.FailOnParticipantConflict != nil { - data.Set("FailOnParticipantConflict", fmt.Sprint(*params.FailOnParticipantConflict)) -} - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) -} - if params != nil && params.Ttl != nil { - data.Set("Ttl", fmt.Sprint(*params.Ttl)) -} + data := url.Values{} + headers := 0 + if params != nil && params.DateExpiry != nil { + data.Set("DateExpiry", fmt.Sprint(*params.DateExpiry)) + } + if params != nil && params.FailOnParticipantConflict != nil { + data.Set("FailOnParticipantConflict", fmt.Sprint(*params.FailOnParticipantConflict)) + } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + if params != nil && params.Ttl != nil { + data.Set("Ttl", fmt.Sprint(*params.Ttl)) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ProxyV1ServiceSession{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ProxyV1ServiceSession{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateShortCodeParams Optional parameters for the method 'UpdateShortCode' type UpdateShortCodeParams struct { IsReserved *bool `json:"IsReserved,omitempty"` @@ -1225,31 +1200,30 @@ type UpdateShortCodeParams struct { * @param optional nil or *UpdateShortCodeParams - Optional Parameters: * @param "IsReserved" (bool) - Whether the short code should be reserved and not be assigned to a participant using proxy pool logic. See [Reserved Phone Numbers](https://www.twilio.com/docs/proxy/reserved-phone-numbers) for more information. * @return ProxyV1ServiceShortCode -*/ + */ func (c *DefaultApiService) UpdateShortCode(ServiceSid string, Sid string, params *UpdateShortCodeParams) (*ProxyV1ServiceShortCode, error) { - path := "/v1/Services/{ServiceSid}/ShortCodes/{Sid}" + path := "/v1/Services/{ServiceSid}/ShortCodes/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.IsReserved != nil { - data.Set("IsReserved", fmt.Sprint(*params.IsReserved)) -} + data := url.Values{} + headers := 0 + if params != nil && params.IsReserved != nil { + data.Set("IsReserved", fmt.Sprint(*params.IsReserved)) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ProxyV1ServiceShortCode{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ProxyV1ServiceShortCode{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } diff --git a/twilio/rest/proxy/v1/model_list_interaction_response.go b/twilio/rest/proxy/v1/model_list_interaction_response.go index b0fbf39c2..582269de5 100644 --- a/twilio/rest/proxy/v1/model_list_interaction_response.go +++ b/twilio/rest/proxy/v1/model_list_interaction_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Proxy - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Proxy + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListInteractionResponse struct for ListInteractionResponse type ListInteractionResponse struct { Interactions []ProxyV1ServiceSessionInteraction `json:"Interactions,omitempty"` - Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/proxy/v1/model_list_message_interaction_response.go b/twilio/rest/proxy/v1/model_list_message_interaction_response.go index 957e13eaf..56fed4a7f 100644 --- a/twilio/rest/proxy/v1/model_list_message_interaction_response.go +++ b/twilio/rest/proxy/v1/model_list_message_interaction_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Proxy - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Proxy + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListMessageInteractionResponse struct for ListMessageInteractionResponse type ListMessageInteractionResponse struct { Interactions []ProxyV1ServiceSessionParticipantMessageInteraction `json:"Interactions,omitempty"` - Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/proxy/v1/model_list_participant_response.go b/twilio/rest/proxy/v1/model_list_participant_response.go index 21c99528d..9aa265431 100644 --- a/twilio/rest/proxy/v1/model_list_participant_response.go +++ b/twilio/rest/proxy/v1/model_list_participant_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Proxy - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Proxy + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListParticipantResponse struct for ListParticipantResponse type ListParticipantResponse struct { - Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` Participants []ProxyV1ServiceSessionParticipant `json:"Participants,omitempty"` } diff --git a/twilio/rest/proxy/v1/model_list_phone_number_response.go b/twilio/rest/proxy/v1/model_list_phone_number_response.go index 942d3e507..a8782c891 100644 --- a/twilio/rest/proxy/v1/model_list_phone_number_response.go +++ b/twilio/rest/proxy/v1/model_list_phone_number_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Proxy - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Proxy + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListPhoneNumberResponse struct for ListPhoneNumberResponse type ListPhoneNumberResponse struct { - Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` PhoneNumbers []ProxyV1ServicePhoneNumber `json:"PhoneNumbers,omitempty"` } diff --git a/twilio/rest/proxy/v1/model_list_service_response.go b/twilio/rest/proxy/v1/model_list_service_response.go index 4af1daffa..d47ad23f6 100644 --- a/twilio/rest/proxy/v1/model_list_service_response.go +++ b/twilio/rest/proxy/v1/model_list_service_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Proxy - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Proxy + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListServiceResponse struct for ListServiceResponse type ListServiceResponse struct { - Meta ListServiceResponseMeta `json:"Meta,omitempty"` - Services []ProxyV1Service `json:"Services,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Services []ProxyV1Service `json:"Services,omitempty"` } diff --git a/twilio/rest/proxy/v1/model_list_service_response_meta.go b/twilio/rest/proxy/v1/model_list_service_response_meta.go index 7e6c1356c..9524b1da5 100644 --- a/twilio/rest/proxy/v1/model_list_service_response_meta.go +++ b/twilio/rest/proxy/v1/model_list_service_response_meta.go @@ -1,22 +1,23 @@ /* - * Twilio - Proxy - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Proxy + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListServiceResponseMeta struct for ListServiceResponseMeta type ListServiceResponseMeta struct { - FirstPageUrl string `json:"FirstPageUrl,omitempty"` - Key string `json:"Key,omitempty"` - NextPageUrl string `json:"NextPageUrl,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` - Url string `json:"Url,omitempty"` + Url string `json:"Url,omitempty"` } diff --git a/twilio/rest/proxy/v1/model_list_session_response.go b/twilio/rest/proxy/v1/model_list_session_response.go index 6aa5f0446..c64a404bd 100644 --- a/twilio/rest/proxy/v1/model_list_session_response.go +++ b/twilio/rest/proxy/v1/model_list_session_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Proxy - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Proxy + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListSessionResponse struct for ListSessionResponse type ListSessionResponse struct { - Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` Sessions []ProxyV1ServiceSession `json:"Sessions,omitempty"` } diff --git a/twilio/rest/proxy/v1/model_list_short_code_response.go b/twilio/rest/proxy/v1/model_list_short_code_response.go index dbcb94c0f..1ace03c82 100644 --- a/twilio/rest/proxy/v1/model_list_short_code_response.go +++ b/twilio/rest/proxy/v1/model_list_short_code_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Proxy - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Proxy + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListShortCodeResponse struct for ListShortCodeResponse type ListShortCodeResponse struct { - Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` ShortCodes []ProxyV1ServiceShortCode `json:"ShortCodes,omitempty"` } diff --git a/twilio/rest/proxy/v1/model_proxy_v1_service.go b/twilio/rest/proxy/v1/model_proxy_v1_service.go index b6be76bde..2bd02c8d8 100644 --- a/twilio/rest/proxy/v1/model_proxy_v1_service.go +++ b/twilio/rest/proxy/v1/model_proxy_v1_service.go @@ -1,18 +1,20 @@ /* - * Twilio - Proxy - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Proxy + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // ProxyV1Service struct for ProxyV1Service type ProxyV1Service struct { // The SID of the Account that created the resource diff --git a/twilio/rest/proxy/v1/model_proxy_v1_service_phone_number.go b/twilio/rest/proxy/v1/model_proxy_v1_service_phone_number.go index 8b22fb588..6a90f910c 100644 --- a/twilio/rest/proxy/v1/model_proxy_v1_service_phone_number.go +++ b/twilio/rest/proxy/v1/model_proxy_v1_service_phone_number.go @@ -1,22 +1,24 @@ /* - * Twilio - Proxy - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Proxy + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // ProxyV1ServicePhoneNumber struct for ProxyV1ServicePhoneNumber type ProxyV1ServicePhoneNumber struct { // The SID of the Account that created the resource - AccountSid *string `json:"AccountSid,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` Capabilities *ProxyV1ServicePhoneNumberCapabilities `json:"Capabilities,omitempty"` // The ISO 8601 date and time in GMT when the resource was created DateCreated *time.Time `json:"DateCreated,omitempty"` diff --git a/twilio/rest/proxy/v1/model_proxy_v1_service_phone_number_capabilities.go b/twilio/rest/proxy/v1/model_proxy_v1_service_phone_number_capabilities.go index e99b3b3f9..666f614d5 100644 --- a/twilio/rest/proxy/v1/model_proxy_v1_service_phone_number_capabilities.go +++ b/twilio/rest/proxy/v1/model_proxy_v1_service_phone_number_capabilities.go @@ -1,19 +1,20 @@ /* - * Twilio - Proxy - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Proxy + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ProxyV1ServicePhoneNumberCapabilities The capabilities of the phone number type ProxyV1ServicePhoneNumberCapabilities struct { - Fax bool `json:"Fax,omitempty"` - Mms bool `json:"Mms,omitempty"` - Sms bool `json:"Sms,omitempty"` + Fax bool `json:"Fax,omitempty"` + Mms bool `json:"Mms,omitempty"` + Sms bool `json:"Sms,omitempty"` Voice bool `json:"Voice,omitempty"` } diff --git a/twilio/rest/proxy/v1/model_proxy_v1_service_session.go b/twilio/rest/proxy/v1/model_proxy_v1_service_session.go index 79e6e2052..e4c6c3a09 100644 --- a/twilio/rest/proxy/v1/model_proxy_v1_service_session.go +++ b/twilio/rest/proxy/v1/model_proxy_v1_service_session.go @@ -1,18 +1,20 @@ /* - * Twilio - Proxy - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Proxy + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // ProxyV1ServiceSession struct for ProxyV1ServiceSession type ProxyV1ServiceSession struct { // The SID of the Account that created the resource diff --git a/twilio/rest/proxy/v1/model_proxy_v1_service_session_interaction.go b/twilio/rest/proxy/v1/model_proxy_v1_service_session_interaction.go index cc95e4243..23b30e212 100644 --- a/twilio/rest/proxy/v1/model_proxy_v1_service_session_interaction.go +++ b/twilio/rest/proxy/v1/model_proxy_v1_service_session_interaction.go @@ -1,18 +1,20 @@ /* - * Twilio - Proxy - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Proxy + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // ProxyV1ServiceSessionInteraction struct for ProxyV1ServiceSessionInteraction type ProxyV1ServiceSessionInteraction struct { // The SID of the Account that created the resource diff --git a/twilio/rest/proxy/v1/model_proxy_v1_service_session_participant.go b/twilio/rest/proxy/v1/model_proxy_v1_service_session_participant.go index c13becf70..01862d695 100644 --- a/twilio/rest/proxy/v1/model_proxy_v1_service_session_participant.go +++ b/twilio/rest/proxy/v1/model_proxy_v1_service_session_participant.go @@ -1,18 +1,20 @@ /* - * Twilio - Proxy - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Proxy + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // ProxyV1ServiceSessionParticipant struct for ProxyV1ServiceSessionParticipant type ProxyV1ServiceSessionParticipant struct { // The SID of the Account that created the resource diff --git a/twilio/rest/proxy/v1/model_proxy_v1_service_session_participant_message_interaction.go b/twilio/rest/proxy/v1/model_proxy_v1_service_session_participant_message_interaction.go index b6b29b363..fee12332b 100644 --- a/twilio/rest/proxy/v1/model_proxy_v1_service_session_participant_message_interaction.go +++ b/twilio/rest/proxy/v1/model_proxy_v1_service_session_participant_message_interaction.go @@ -1,18 +1,20 @@ /* - * Twilio - Proxy - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Proxy + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // ProxyV1ServiceSessionParticipantMessageInteraction struct for ProxyV1ServiceSessionParticipantMessageInteraction type ProxyV1ServiceSessionParticipantMessageInteraction struct { // The SID of the Account that created the resource diff --git a/twilio/rest/proxy/v1/model_proxy_v1_service_short_code.go b/twilio/rest/proxy/v1/model_proxy_v1_service_short_code.go index f987ed3b6..e2a78f985 100644 --- a/twilio/rest/proxy/v1/model_proxy_v1_service_short_code.go +++ b/twilio/rest/proxy/v1/model_proxy_v1_service_short_code.go @@ -1,22 +1,24 @@ /* - * Twilio - Proxy - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Proxy + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // ProxyV1ServiceShortCode struct for ProxyV1ServiceShortCode type ProxyV1ServiceShortCode struct { // The SID of the Account that created the resource - AccountSid *string `json:"AccountSid,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` Capabilities *ProxyV1ServiceShortCodeCapabilities `json:"Capabilities,omitempty"` // The ISO 8601 date and time in GMT when the resource was created DateCreated *time.Time `json:"DateCreated,omitempty"` diff --git a/twilio/rest/proxy/v1/model_proxy_v1_service_short_code_capabilities.go b/twilio/rest/proxy/v1/model_proxy_v1_service_short_code_capabilities.go index 18332e03e..8a43f4e2d 100644 --- a/twilio/rest/proxy/v1/model_proxy_v1_service_short_code_capabilities.go +++ b/twilio/rest/proxy/v1/model_proxy_v1_service_short_code_capabilities.go @@ -1,19 +1,20 @@ /* - * Twilio - Proxy - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Proxy + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ProxyV1ServiceShortCodeCapabilities The capabilities of the short code type ProxyV1ServiceShortCodeCapabilities struct { - Fax bool `json:"Fax,omitempty"` - Mms bool `json:"Mms,omitempty"` - Sms bool `json:"Sms,omitempty"` + Fax bool `json:"Fax,omitempty"` + Mms bool `json:"Mms,omitempty"` + Sms bool `json:"Sms,omitempty"` Voice bool `json:"Voice,omitempty"` } diff --git a/twilio/rest/serverless/v1/api_default.go b/twilio/rest/serverless/v1/api_default.go index f138f6f8e..115541cfa 100644 --- a/twilio/rest/serverless/v1/api_default.go +++ b/twilio/rest/serverless/v1/api_default.go @@ -1,11 +1,11 @@ /* - * Twilio - Serverless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,10 +14,11 @@ package openapi import ( "encoding/json" "fmt" - twilio "github.com/twilio/twilio-go/client" "net/url" - "strings" - "time" + "strings" + "time" + + twilio "github.com/twilio/twilio-go/client" ) type DefaultApiService struct { @@ -26,8 +27,8 @@ type DefaultApiService struct { } func NewDefaultApiService(client *twilio.Client) *DefaultApiService { - return &DefaultApiService { - client: client, + return &DefaultApiService{ + client: client, baseURL: "https://serverless.twilio.com", } } @@ -44,39 +45,39 @@ type CreateAssetParams struct { * @param optional nil or *CreateAssetParams - Optional Parameters: * @param "FriendlyName" (string) - A descriptive string that you create to describe the Asset resource. It can be a maximum of 255 characters. * @return ServerlessV1ServiceAsset -*/ + */ func (c *DefaultApiService) CreateAsset(ServiceSid string, params *CreateAssetParams) (*ServerlessV1ServiceAsset, error) { - path := "/v1/Services/{ServiceSid}/Assets" + path := "/v1/Services/{ServiceSid}/Assets" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} + data := url.Values{} + headers := 0 + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ServerlessV1ServiceAsset{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ServerlessV1ServiceAsset{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateBuildParams Optional parameters for the method 'CreateBuild' type CreateBuildParams struct { - AssetVersions *[]string `json:"AssetVersions,omitempty"` - Dependencies *string `json:"Dependencies,omitempty"` + AssetVersions *[]string `json:"AssetVersions,omitempty"` + Dependencies *string `json:"Dependencies,omitempty"` FunctionVersions *[]string `json:"FunctionVersions,omitempty"` - Runtime *string `json:"Runtime,omitempty"` + Runtime *string `json:"Runtime,omitempty"` } /* @@ -89,42 +90,42 @@ type CreateBuildParams struct { * @param "FunctionVersions" ([]string) - The list of the Function Version resource SIDs to include in the Build. * @param "Runtime" (string) - The Runtime version that will be used to run the Build resource when it is deployed. * @return ServerlessV1ServiceBuild -*/ + */ func (c *DefaultApiService) CreateBuild(ServiceSid string, params *CreateBuildParams) (*ServerlessV1ServiceBuild, error) { - path := "/v1/Services/{ServiceSid}/Builds" + path := "/v1/Services/{ServiceSid}/Builds" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.AssetVersions != nil { - data.Set("AssetVersions", strings.Join(*params.AssetVersions, ",")) -} - if params != nil && params.Dependencies != nil { - data.Set("Dependencies", *params.Dependencies) -} - if params != nil && params.FunctionVersions != nil { - data.Set("FunctionVersions", strings.Join(*params.FunctionVersions, ",")) -} - if params != nil && params.Runtime != nil { - data.Set("Runtime", *params.Runtime) -} + data := url.Values{} + headers := 0 + if params != nil && params.AssetVersions != nil { + data.Set("AssetVersions", strings.Join(*params.AssetVersions, ",")) + } + if params != nil && params.Dependencies != nil { + data.Set("Dependencies", *params.Dependencies) + } + if params != nil && params.FunctionVersions != nil { + data.Set("FunctionVersions", strings.Join(*params.FunctionVersions, ",")) + } + if params != nil && params.Runtime != nil { + data.Set("Runtime", *params.Runtime) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ServerlessV1ServiceBuild{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ServerlessV1ServiceBuild{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateDeploymentParams Optional parameters for the method 'CreateDeployment' type CreateDeploymentParams struct { BuildSid *string `json:"BuildSid,omitempty"` @@ -138,38 +139,38 @@ type CreateDeploymentParams struct { * @param optional nil or *CreateDeploymentParams - Optional Parameters: * @param "BuildSid" (string) - The SID of the Build for the Deployment. * @return ServerlessV1ServiceEnvironmentDeployment -*/ + */ func (c *DefaultApiService) CreateDeployment(ServiceSid string, EnvironmentSid string, params *CreateDeploymentParams) (*ServerlessV1ServiceEnvironmentDeployment, error) { - path := "/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Deployments" + path := "/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Deployments" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"EnvironmentSid"+"}", EnvironmentSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.BuildSid != nil { - data.Set("BuildSid", *params.BuildSid) -} + data := url.Values{} + headers := 0 + if params != nil && params.BuildSid != nil { + data.Set("BuildSid", *params.BuildSid) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ServerlessV1ServiceEnvironmentDeployment{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ServerlessV1ServiceEnvironmentDeployment{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateEnvironmentParams Optional parameters for the method 'CreateEnvironment' type CreateEnvironmentParams struct { DomainSuffix *string `json:"DomainSuffix,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` } /* @@ -180,36 +181,36 @@ type CreateEnvironmentParams struct { * @param "DomainSuffix" (string) - A URL-friendly name that represents the environment and forms part of the domain name. It can be a maximum of 16 characters. * @param "UniqueName" (string) - A user-defined string that uniquely identifies the Environment resource. It can be a maximum of 100 characters. * @return ServerlessV1ServiceEnvironment -*/ + */ func (c *DefaultApiService) CreateEnvironment(ServiceSid string, params *CreateEnvironmentParams) (*ServerlessV1ServiceEnvironment, error) { - path := "/v1/Services/{ServiceSid}/Environments" + path := "/v1/Services/{ServiceSid}/Environments" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.DomainSuffix != nil { - data.Set("DomainSuffix", *params.DomainSuffix) -} - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) -} + data := url.Values{} + headers := 0 + if params != nil && params.DomainSuffix != nil { + data.Set("DomainSuffix", *params.DomainSuffix) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ServerlessV1ServiceEnvironment{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ServerlessV1ServiceEnvironment{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateFunctionParams Optional parameters for the method 'CreateFunction' type CreateFunctionParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` @@ -222,39 +223,39 @@ type CreateFunctionParams struct { * @param optional nil or *CreateFunctionParams - Optional Parameters: * @param "FriendlyName" (string) - A descriptive string that you create to describe the Function resource. It can be a maximum of 255 characters. * @return ServerlessV1ServiceFunction -*/ + */ func (c *DefaultApiService) CreateFunction(ServiceSid string, params *CreateFunctionParams) (*ServerlessV1ServiceFunction, error) { - path := "/v1/Services/{ServiceSid}/Functions" + path := "/v1/Services/{ServiceSid}/Functions" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} + data := url.Values{} + headers := 0 + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ServerlessV1ServiceFunction{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ServerlessV1ServiceFunction{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateServiceParams Optional parameters for the method 'CreateService' type CreateServiceParams struct { - FriendlyName *string `json:"FriendlyName,omitempty"` - IncludeCredentials *bool `json:"IncludeCredentials,omitempty"` - UiEditable *bool `json:"UiEditable,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + IncludeCredentials *bool `json:"IncludeCredentials,omitempty"` + UiEditable *bool `json:"UiEditable,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` } /* @@ -266,44 +267,44 @@ type CreateServiceParams struct { * @param "UiEditable" (bool) - Whether the Service's properties and subresources can be edited via the UI. The default value is `false`. * @param "UniqueName" (string) - A user-defined string that uniquely identifies the Service resource. It can be used as an alternative to the `sid` in the URL path to address the Service resource. This value must be 50 characters or less in length and be unique. * @return ServerlessV1Service -*/ + */ func (c *DefaultApiService) CreateService(params *CreateServiceParams) (*ServerlessV1Service, error) { - path := "/v1/Services" - - data := url.Values{} - headers := 0 + path := "/v1/Services" - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.IncludeCredentials != nil { - data.Set("IncludeCredentials", fmt.Sprint(*params.IncludeCredentials)) -} - if params != nil && params.UiEditable != nil { - data.Set("UiEditable", fmt.Sprint(*params.UiEditable)) -} - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) -} + data := url.Values{} + headers := 0 + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.IncludeCredentials != nil { + data.Set("IncludeCredentials", fmt.Sprint(*params.IncludeCredentials)) + } + if params != nil && params.UiEditable != nil { + data.Set("UiEditable", fmt.Sprint(*params.UiEditable)) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ServerlessV1Service{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ServerlessV1Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateVariableParams Optional parameters for the method 'CreateVariable' type CreateVariableParams struct { - Key *string `json:"Key,omitempty"` + Key *string `json:"Key,omitempty"` Value *string `json:"Value,omitempty"` } @@ -316,36 +317,35 @@ type CreateVariableParams struct { * @param "Key" (string) - A string by which the Variable resource can be referenced. It can be a maximum of 128 characters. * @param "Value" (string) - A string that contains the actual value of the Variable. It can be a maximum of 450 bytes in size. * @return ServerlessV1ServiceEnvironmentVariable -*/ + */ func (c *DefaultApiService) CreateVariable(ServiceSid string, EnvironmentSid string, params *CreateVariableParams) (*ServerlessV1ServiceEnvironmentVariable, error) { - path := "/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Variables" + path := "/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Variables" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"EnvironmentSid"+"}", EnvironmentSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Key != nil { - data.Set("Key", *params.Key) -} - if params != nil && params.Value != nil { - data.Set("Value", *params.Value) -} + data := url.Values{} + headers := 0 + if params != nil && params.Key != nil { + data.Set("Key", *params.Key) + } + if params != nil && params.Value != nil { + data.Set("Value", *params.Value) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ServerlessV1ServiceEnvironmentVariable{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ServerlessV1ServiceEnvironmentVariable{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -353,25 +353,23 @@ func (c *DefaultApiService) CreateVariable(ServiceSid string, EnvironmentSid str * Delete an Asset resource. * @param ServiceSid The SID of the Service to delete the Asset resource from. * @param Sid The SID that identifies the Asset resource to delete. -*/ -func (c *DefaultApiService) DeleteAsset(ServiceSid string, Sid string, ) (error) { - path := "/v1/Services/{ServiceSid}/Assets/{Sid}" + */ +func (c *DefaultApiService) DeleteAsset(ServiceSid string, Sid string) error { + path := "/v1/Services/{ServiceSid}/Assets/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + defer resp.Body.Close() - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() - - return nil + return nil } /* @@ -379,25 +377,23 @@ func (c *DefaultApiService) DeleteAsset(ServiceSid string, Sid string, ) (error) * Delete a Build resource. * @param ServiceSid The SID of the Service to delete the Build resource from. * @param Sid The SID of the Build resource to delete. -*/ -func (c *DefaultApiService) DeleteBuild(ServiceSid string, Sid string, ) (error) { - path := "/v1/Services/{ServiceSid}/Builds/{Sid}" + */ +func (c *DefaultApiService) DeleteBuild(ServiceSid string, Sid string) error { + path := "/v1/Services/{ServiceSid}/Builds/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + defer resp.Body.Close() - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() - - return nil + return nil } /* @@ -405,25 +401,23 @@ func (c *DefaultApiService) DeleteBuild(ServiceSid string, Sid string, ) (error) * Delete a specific environment. * @param ServiceSid The SID of the Service to delete the Environment resource from. * @param Sid The SID of the Environment resource to delete. -*/ -func (c *DefaultApiService) DeleteEnvironment(ServiceSid string, Sid string, ) (error) { - path := "/v1/Services/{ServiceSid}/Environments/{Sid}" + */ +func (c *DefaultApiService) DeleteEnvironment(ServiceSid string, Sid string) error { + path := "/v1/Services/{ServiceSid}/Environments/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -431,49 +425,45 @@ func (c *DefaultApiService) DeleteEnvironment(ServiceSid string, Sid string, ) ( * Delete a Function resource. * @param ServiceSid The SID of the Service to delete the Function resource from. * @param Sid The SID of the Function resource to delete. -*/ -func (c *DefaultApiService) DeleteFunction(ServiceSid string, Sid string, ) (error) { - path := "/v1/Services/{ServiceSid}/Functions/{Sid}" + */ +func (c *DefaultApiService) DeleteFunction(ServiceSid string, Sid string) error { + path := "/v1/Services/{ServiceSid}/Functions/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* * DeleteService Method for DeleteService * Delete a Service resource. * @param Sid The `sid` or `unique_name` of the Service resource to delete. -*/ -func (c *DefaultApiService) DeleteService(Sid string, ) (error) { - path := "/v1/Services/{Sid}" + */ +func (c *DefaultApiService) DeleteService(Sid string) error { + path := "/v1/Services/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -482,26 +472,24 @@ func (c *DefaultApiService) DeleteService(Sid string, ) (error) { * @param ServiceSid The SID of the Service to delete the Variable resource from. * @param EnvironmentSid The SID of the Environment with the Variables to delete. * @param Sid The SID of the Variable resource to delete. -*/ -func (c *DefaultApiService) DeleteVariable(ServiceSid string, EnvironmentSid string, Sid string, ) (error) { - path := "/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Variables/{Sid}" + */ +func (c *DefaultApiService) DeleteVariable(ServiceSid string, EnvironmentSid string, Sid string) error { + path := "/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Variables/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"EnvironmentSid"+"}", EnvironmentSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -510,30 +498,28 @@ func (c *DefaultApiService) DeleteVariable(ServiceSid string, EnvironmentSid str * @param ServiceSid The SID of the Service to fetch the Asset resource from. * @param Sid The SID that identifies the Asset resource to fetch. * @return ServerlessV1ServiceAsset -*/ -func (c *DefaultApiService) FetchAsset(ServiceSid string, Sid string, ) (*ServerlessV1ServiceAsset, error) { - path := "/v1/Services/{ServiceSid}/Assets/{Sid}" + */ +func (c *DefaultApiService) FetchAsset(ServiceSid string, Sid string) (*ServerlessV1ServiceAsset, error) { + path := "/v1/Services/{ServiceSid}/Assets/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ServerlessV1ServiceAsset{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ServerlessV1ServiceAsset{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -543,31 +529,29 @@ func (c *DefaultApiService) FetchAsset(ServiceSid string, Sid string, ) (*Server * @param AssetSid The SID of the Asset resource that is the parent of the Asset Version resource to fetch. * @param Sid The SID of the Asset Version resource to fetch. * @return ServerlessV1ServiceAssetAssetVersion -*/ -func (c *DefaultApiService) FetchAssetVersion(ServiceSid string, AssetSid string, Sid string, ) (*ServerlessV1ServiceAssetAssetVersion, error) { - path := "/v1/Services/{ServiceSid}/Assets/{AssetSid}/Versions/{Sid}" + */ +func (c *DefaultApiService) FetchAssetVersion(ServiceSid string, AssetSid string, Sid string) (*ServerlessV1ServiceAssetAssetVersion, error) { + path := "/v1/Services/{ServiceSid}/Assets/{AssetSid}/Versions/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"AssetSid"+"}", AssetSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ServerlessV1ServiceAssetAssetVersion{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ServerlessV1ServiceAssetAssetVersion{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -576,30 +560,28 @@ func (c *DefaultApiService) FetchAssetVersion(ServiceSid string, AssetSid string * @param ServiceSid The SID of the Service to fetch the Build resource from. * @param Sid The SID of the Build resource to fetch. * @return ServerlessV1ServiceBuild -*/ -func (c *DefaultApiService) FetchBuild(ServiceSid string, Sid string, ) (*ServerlessV1ServiceBuild, error) { - path := "/v1/Services/{ServiceSid}/Builds/{Sid}" + */ +func (c *DefaultApiService) FetchBuild(ServiceSid string, Sid string) (*ServerlessV1ServiceBuild, error) { + path := "/v1/Services/{ServiceSid}/Builds/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ServerlessV1ServiceBuild{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ServerlessV1ServiceBuild{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -608,30 +590,28 @@ func (c *DefaultApiService) FetchBuild(ServiceSid string, Sid string, ) (*Server * @param ServiceSid The SID of the Service to fetch the Build resource from. * @param Sid The SID of the Build resource to fetch. * @return ServerlessV1ServiceBuildBuildStatus -*/ -func (c *DefaultApiService) FetchBuildStatus(ServiceSid string, Sid string, ) (*ServerlessV1ServiceBuildBuildStatus, error) { - path := "/v1/Services/{ServiceSid}/Builds/{Sid}/Status" + */ +func (c *DefaultApiService) FetchBuildStatus(ServiceSid string, Sid string) (*ServerlessV1ServiceBuildBuildStatus, error) { + path := "/v1/Services/{ServiceSid}/Builds/{Sid}/Status" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ServerlessV1ServiceBuildBuildStatus{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ServerlessV1ServiceBuildBuildStatus{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -641,31 +621,29 @@ func (c *DefaultApiService) FetchBuildStatus(ServiceSid string, Sid string, ) (* * @param EnvironmentSid The SID of the Environment used by the Deployment to fetch. * @param Sid The SID that identifies the Deployment resource to fetch. * @return ServerlessV1ServiceEnvironmentDeployment -*/ -func (c *DefaultApiService) FetchDeployment(ServiceSid string, EnvironmentSid string, Sid string, ) (*ServerlessV1ServiceEnvironmentDeployment, error) { - path := "/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Deployments/{Sid}" + */ +func (c *DefaultApiService) FetchDeployment(ServiceSid string, EnvironmentSid string, Sid string) (*ServerlessV1ServiceEnvironmentDeployment, error) { + path := "/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Deployments/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"EnvironmentSid"+"}", EnvironmentSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ServerlessV1ServiceEnvironmentDeployment{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ServerlessV1ServiceEnvironmentDeployment{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -674,30 +652,28 @@ func (c *DefaultApiService) FetchDeployment(ServiceSid string, EnvironmentSid st * @param ServiceSid The SID of the Service to fetch the Environment resource from. * @param Sid The SID of the Environment resource to fetch. * @return ServerlessV1ServiceEnvironment -*/ -func (c *DefaultApiService) FetchEnvironment(ServiceSid string, Sid string, ) (*ServerlessV1ServiceEnvironment, error) { - path := "/v1/Services/{ServiceSid}/Environments/{Sid}" + */ +func (c *DefaultApiService) FetchEnvironment(ServiceSid string, Sid string) (*ServerlessV1ServiceEnvironment, error) { + path := "/v1/Services/{ServiceSid}/Environments/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &ServerlessV1ServiceEnvironment{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ServerlessV1ServiceEnvironment{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -706,30 +682,28 @@ func (c *DefaultApiService) FetchEnvironment(ServiceSid string, Sid string, ) (* * @param ServiceSid The SID of the Service to fetch the Function resource from. * @param Sid The SID of the Function resource to fetch. * @return ServerlessV1ServiceFunction -*/ -func (c *DefaultApiService) FetchFunction(ServiceSid string, Sid string, ) (*ServerlessV1ServiceFunction, error) { - path := "/v1/Services/{ServiceSid}/Functions/{Sid}" + */ +func (c *DefaultApiService) FetchFunction(ServiceSid string, Sid string) (*ServerlessV1ServiceFunction, error) { + path := "/v1/Services/{ServiceSid}/Functions/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &ServerlessV1ServiceFunction{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ServerlessV1ServiceFunction{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -739,31 +713,29 @@ func (c *DefaultApiService) FetchFunction(ServiceSid string, Sid string, ) (*Ser * @param FunctionSid The SID of the function that is the parent of the Function Version resource to fetch. * @param Sid The SID of the Function Version resource to fetch. * @return ServerlessV1ServiceFunctionFunctionVersion -*/ -func (c *DefaultApiService) FetchFunctionVersion(ServiceSid string, FunctionSid string, Sid string, ) (*ServerlessV1ServiceFunctionFunctionVersion, error) { - path := "/v1/Services/{ServiceSid}/Functions/{FunctionSid}/Versions/{Sid}" + */ +func (c *DefaultApiService) FetchFunctionVersion(ServiceSid string, FunctionSid string, Sid string) (*ServerlessV1ServiceFunctionFunctionVersion, error) { + path := "/v1/Services/{ServiceSid}/Functions/{FunctionSid}/Versions/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"FunctionSid"+"}", FunctionSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ServerlessV1ServiceFunctionFunctionVersion{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ServerlessV1ServiceFunctionFunctionVersion{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -773,31 +745,29 @@ func (c *DefaultApiService) FetchFunctionVersion(ServiceSid string, FunctionSid * @param FunctionSid The SID of the Function that is the parent of the Function Version content to fetch. * @param Sid The SID of the Function Version content to fetch. * @return ServerlessV1ServiceFunctionFunctionVersionFunctionVersionContent -*/ -func (c *DefaultApiService) FetchFunctionVersionContent(ServiceSid string, FunctionSid string, Sid string, ) (*ServerlessV1ServiceFunctionFunctionVersionFunctionVersionContent, error) { - path := "/v1/Services/{ServiceSid}/Functions/{FunctionSid}/Versions/{Sid}/Content" + */ +func (c *DefaultApiService) FetchFunctionVersionContent(ServiceSid string, FunctionSid string, Sid string) (*ServerlessV1ServiceFunctionFunctionVersionFunctionVersionContent, error) { + path := "/v1/Services/{ServiceSid}/Functions/{FunctionSid}/Versions/{Sid}/Content" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"FunctionSid"+"}", FunctionSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ServerlessV1ServiceFunctionFunctionVersionFunctionVersionContent{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ServerlessV1ServiceFunctionFunctionVersionFunctionVersionContent{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -807,31 +777,29 @@ func (c *DefaultApiService) FetchFunctionVersionContent(ServiceSid string, Funct * @param EnvironmentSid The SID of the environment with the Log resource to fetch. * @param Sid The SID of the Log resource to fetch. * @return ServerlessV1ServiceEnvironmentLog -*/ -func (c *DefaultApiService) FetchLog(ServiceSid string, EnvironmentSid string, Sid string, ) (*ServerlessV1ServiceEnvironmentLog, error) { - path := "/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Logs/{Sid}" + */ +func (c *DefaultApiService) FetchLog(ServiceSid string, EnvironmentSid string, Sid string) (*ServerlessV1ServiceEnvironmentLog, error) { + path := "/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Logs/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"EnvironmentSid"+"}", EnvironmentSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ServerlessV1ServiceEnvironmentLog{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ServerlessV1ServiceEnvironmentLog{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -839,29 +807,27 @@ func (c *DefaultApiService) FetchLog(ServiceSid string, EnvironmentSid string, S * Retrieve a specific Service resource. * @param Sid The `sid` or `unique_name` of the Service resource to fetch. * @return ServerlessV1Service -*/ -func (c *DefaultApiService) FetchService(Sid string, ) (*ServerlessV1Service, error) { - path := "/v1/Services/{Sid}" + */ +func (c *DefaultApiService) FetchService(Sid string) (*ServerlessV1Service, error) { + path := "/v1/Services/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ServerlessV1Service{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ServerlessV1Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -871,32 +837,31 @@ func (c *DefaultApiService) FetchService(Sid string, ) (*ServerlessV1Service, er * @param EnvironmentSid The SID of the Environment with the Variable resource to fetch. * @param Sid The SID of the Variable resource to fetch. * @return ServerlessV1ServiceEnvironmentVariable -*/ -func (c *DefaultApiService) FetchVariable(ServiceSid string, EnvironmentSid string, Sid string, ) (*ServerlessV1ServiceEnvironmentVariable, error) { - path := "/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Variables/{Sid}" + */ +func (c *DefaultApiService) FetchVariable(ServiceSid string, EnvironmentSid string, Sid string) (*ServerlessV1ServiceEnvironmentVariable, error) { + path := "/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Variables/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"EnvironmentSid"+"}", EnvironmentSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ServerlessV1ServiceEnvironmentVariable{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ServerlessV1ServiceEnvironmentVariable{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListAssetParams Optional parameters for the method 'ListAsset' type ListAssetParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -909,33 +874,33 @@ type ListAssetParams struct { * @param optional nil or *ListAssetParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListAssetResponse -*/ + */ func (c *DefaultApiService) ListAsset(ServiceSid string, params *ListAssetParams) (*ListAssetResponse, error) { - path := "/v1/Services/{ServiceSid}/Assets" + path := "/v1/Services/{ServiceSid}/Assets" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListAssetResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListAssetResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListAssetVersionParams Optional parameters for the method 'ListAssetVersion' type ListAssetVersionParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -949,34 +914,34 @@ type ListAssetVersionParams struct { * @param optional nil or *ListAssetVersionParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListAssetVersionResponse -*/ + */ func (c *DefaultApiService) ListAssetVersion(ServiceSid string, AssetSid string, params *ListAssetVersionParams) (*ListAssetVersionResponse, error) { - path := "/v1/Services/{ServiceSid}/Assets/{AssetSid}/Versions" + path := "/v1/Services/{ServiceSid}/Assets/{AssetSid}/Versions" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"AssetSid"+"}", AssetSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListAssetVersionResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListAssetVersionResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListBuildParams Optional parameters for the method 'ListBuild' type ListBuildParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -989,33 +954,33 @@ type ListBuildParams struct { * @param optional nil or *ListBuildParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListBuildResponse -*/ + */ func (c *DefaultApiService) ListBuild(ServiceSid string, params *ListBuildParams) (*ListBuildResponse, error) { - path := "/v1/Services/{ServiceSid}/Builds" + path := "/v1/Services/{ServiceSid}/Builds" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListBuildResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListBuildResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListDeploymentParams Optional parameters for the method 'ListDeployment' type ListDeploymentParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1029,34 +994,34 @@ type ListDeploymentParams struct { * @param optional nil or *ListDeploymentParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListDeploymentResponse -*/ + */ func (c *DefaultApiService) ListDeployment(ServiceSid string, EnvironmentSid string, params *ListDeploymentParams) (*ListDeploymentResponse, error) { - path := "/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Deployments" + path := "/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Deployments" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"EnvironmentSid"+"}", EnvironmentSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListDeploymentResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListDeploymentResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListEnvironmentParams Optional parameters for the method 'ListEnvironment' type ListEnvironmentParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1069,33 +1034,33 @@ type ListEnvironmentParams struct { * @param optional nil or *ListEnvironmentParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListEnvironmentResponse -*/ + */ func (c *DefaultApiService) ListEnvironment(ServiceSid string, params *ListEnvironmentParams) (*ListEnvironmentResponse, error) { - path := "/v1/Services/{ServiceSid}/Environments" + path := "/v1/Services/{ServiceSid}/Environments" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListEnvironmentResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListEnvironmentResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListFunctionParams Optional parameters for the method 'ListFunction' type ListFunctionParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1108,33 +1073,33 @@ type ListFunctionParams struct { * @param optional nil or *ListFunctionParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListFunctionResponse -*/ + */ func (c *DefaultApiService) ListFunction(ServiceSid string, params *ListFunctionParams) (*ListFunctionResponse, error) { - path := "/v1/Services/{ServiceSid}/Functions" + path := "/v1/Services/{ServiceSid}/Functions" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListFunctionResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListFunctionResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListFunctionVersionParams Optional parameters for the method 'ListFunctionVersion' type ListFunctionVersionParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1148,40 +1113,40 @@ type ListFunctionVersionParams struct { * @param optional nil or *ListFunctionVersionParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListFunctionVersionResponse -*/ + */ func (c *DefaultApiService) ListFunctionVersion(ServiceSid string, FunctionSid string, params *ListFunctionVersionParams) (*ListFunctionVersionResponse, error) { - path := "/v1/Services/{ServiceSid}/Functions/{FunctionSid}/Versions" + path := "/v1/Services/{ServiceSid}/Functions/{FunctionSid}/Versions" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"FunctionSid"+"}", FunctionSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListFunctionVersionResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListFunctionVersionResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListLogParams Optional parameters for the method 'ListLog' type ListLogParams struct { - FunctionSid *string `json:"FunctionSid,omitempty"` - StartDate *time.Time `json:"StartDate,omitempty"` - EndDate *time.Time `json:"EndDate,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + FunctionSid *string `json:"FunctionSid,omitempty"` + StartDate *time.Time `json:"StartDate,omitempty"` + EndDate *time.Time `json:"EndDate,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -1195,43 +1160,43 @@ type ListLogParams struct { * @param "EndDate" (time.Time) - The date/time (in GMT, ISO 8601) before which the Log resources must have been created. Defaults to current date/time. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListLogResponse -*/ + */ func (c *DefaultApiService) ListLog(ServiceSid string, EnvironmentSid string, params *ListLogParams) (*ListLogResponse, error) { - path := "/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Logs" + path := "/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Logs" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"EnvironmentSid"+"}", EnvironmentSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.FunctionSid != nil { - data.Set("FunctionSid", *params.FunctionSid) -} - if params != nil && params.StartDate != nil { - data.Set("StartDate", fmt.Sprint(*params.StartDate)) -} - if params != nil && params.EndDate != nil { - data.Set("EndDate", fmt.Sprint(*params.EndDate)) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.FunctionSid != nil { + data.Set("FunctionSid", *params.FunctionSid) + } + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) + } + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListLogResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListLogResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListServiceParams Optional parameters for the method 'ListService' type ListServiceParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1243,32 +1208,32 @@ type ListServiceParams struct { * @param optional nil or *ListServiceParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListServiceResponse -*/ + */ func (c *DefaultApiService) ListService(params *ListServiceParams) (*ListServiceResponse, error) { - path := "/v1/Services" + path := "/v1/Services" - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListServiceResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListServiceResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListVariableParams Optional parameters for the method 'ListVariable' type ListVariableParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1282,34 +1247,34 @@ type ListVariableParams struct { * @param optional nil or *ListVariableParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListVariableResponse -*/ + */ func (c *DefaultApiService) ListVariable(ServiceSid string, EnvironmentSid string, params *ListVariableParams) (*ListVariableResponse, error) { - path := "/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Variables" + path := "/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Variables" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"EnvironmentSid"+"}", EnvironmentSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListVariableResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListVariableResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateAssetParams Optional parameters for the method 'UpdateAsset' type UpdateAssetParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` @@ -1323,34 +1288,34 @@ type UpdateAssetParams struct { * @param optional nil or *UpdateAssetParams - Optional Parameters: * @param "FriendlyName" (string) - A descriptive string that you create to describe the Asset resource. It can be a maximum of 255 characters. * @return ServerlessV1ServiceAsset -*/ + */ func (c *DefaultApiService) UpdateAsset(ServiceSid string, Sid string, params *UpdateAssetParams) (*ServerlessV1ServiceAsset, error) { - path := "/v1/Services/{ServiceSid}/Assets/{Sid}" + path := "/v1/Services/{ServiceSid}/Assets/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} + data := url.Values{} + headers := 0 + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ServerlessV1ServiceAsset{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ServerlessV1ServiceAsset{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateFunctionParams Optional parameters for the method 'UpdateFunction' type UpdateFunctionParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` @@ -1364,39 +1329,39 @@ type UpdateFunctionParams struct { * @param optional nil or *UpdateFunctionParams - Optional Parameters: * @param "FriendlyName" (string) - A descriptive string that you create to describe the Function resource. It can be a maximum of 255 characters. * @return ServerlessV1ServiceFunction -*/ + */ func (c *DefaultApiService) UpdateFunction(ServiceSid string, Sid string, params *UpdateFunctionParams) (*ServerlessV1ServiceFunction, error) { - path := "/v1/Services/{ServiceSid}/Functions/{Sid}" + path := "/v1/Services/{ServiceSid}/Functions/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} + data := url.Values{} + headers := 0 + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ServerlessV1ServiceFunction{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ServerlessV1ServiceFunction{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateServiceParams Optional parameters for the method 'UpdateService' type UpdateServiceParams struct { - FriendlyName *string `json:"FriendlyName,omitempty"` - IncludeCredentials *bool `json:"IncludeCredentials,omitempty"` - UiEditable *bool `json:"UiEditable,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + IncludeCredentials *bool `json:"IncludeCredentials,omitempty"` + UiEditable *bool `json:"UiEditable,omitempty"` } /* @@ -1408,42 +1373,42 @@ type UpdateServiceParams struct { * @param "IncludeCredentials" (bool) - Whether to inject Account credentials into a function invocation context. * @param "UiEditable" (bool) - Whether the Service resource's properties and subresources can be edited via the UI. The default value is `false`. * @return ServerlessV1Service -*/ + */ func (c *DefaultApiService) UpdateService(Sid string, params *UpdateServiceParams) (*ServerlessV1Service, error) { - path := "/v1/Services/{Sid}" + path := "/v1/Services/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.IncludeCredentials != nil { - data.Set("IncludeCredentials", fmt.Sprint(*params.IncludeCredentials)) -} - if params != nil && params.UiEditable != nil { - data.Set("UiEditable", fmt.Sprint(*params.UiEditable)) -} + data := url.Values{} + headers := 0 + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.IncludeCredentials != nil { + data.Set("IncludeCredentials", fmt.Sprint(*params.IncludeCredentials)) + } + if params != nil && params.UiEditable != nil { + data.Set("UiEditable", fmt.Sprint(*params.UiEditable)) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ServerlessV1Service{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ServerlessV1Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateVariableParams Optional parameters for the method 'UpdateVariable' type UpdateVariableParams struct { - Key *string `json:"Key,omitempty"` + Key *string `json:"Key,omitempty"` Value *string `json:"Value,omitempty"` } @@ -1457,35 +1422,34 @@ type UpdateVariableParams struct { * @param "Key" (string) - A string by which the Variable resource can be referenced. It can be a maximum of 128 characters. * @param "Value" (string) - A string that contains the actual value of the Variable. It can be a maximum of 450 bytes in size. * @return ServerlessV1ServiceEnvironmentVariable -*/ + */ func (c *DefaultApiService) UpdateVariable(ServiceSid string, EnvironmentSid string, Sid string, params *UpdateVariableParams) (*ServerlessV1ServiceEnvironmentVariable, error) { - path := "/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Variables/{Sid}" + path := "/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Variables/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"EnvironmentSid"+"}", EnvironmentSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Key != nil { - data.Set("Key", *params.Key) -} - if params != nil && params.Value != nil { - data.Set("Value", *params.Value) -} + data := url.Values{} + headers := 0 + if params != nil && params.Key != nil { + data.Set("Key", *params.Key) + } + if params != nil && params.Value != nil { + data.Set("Value", *params.Value) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ServerlessV1ServiceEnvironmentVariable{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ServerlessV1ServiceEnvironmentVariable{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } diff --git a/twilio/rest/serverless/v1/model_list_asset_response.go b/twilio/rest/serverless/v1/model_list_asset_response.go index e5537cd92..90b98ca94 100644 --- a/twilio/rest/serverless/v1/model_list_asset_response.go +++ b/twilio/rest/serverless/v1/model_list_asset_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Serverless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListAssetResponse struct for ListAssetResponse type ListAssetResponse struct { Assets []ServerlessV1ServiceAsset `json:"Assets,omitempty"` - Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/serverless/v1/model_list_asset_version_response.go b/twilio/rest/serverless/v1/model_list_asset_version_response.go index 082af3690..398df5d3d 100644 --- a/twilio/rest/serverless/v1/model_list_asset_version_response.go +++ b/twilio/rest/serverless/v1/model_list_asset_version_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Serverless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListAssetVersionResponse struct for ListAssetVersionResponse type ListAssetVersionResponse struct { AssetVersions []ServerlessV1ServiceAssetAssetVersion `json:"AssetVersions,omitempty"` - Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/serverless/v1/model_list_build_response.go b/twilio/rest/serverless/v1/model_list_build_response.go index 6f8ca89da..b2630f5e0 100644 --- a/twilio/rest/serverless/v1/model_list_build_response.go +++ b/twilio/rest/serverless/v1/model_list_build_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Serverless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListBuildResponse struct for ListBuildResponse type ListBuildResponse struct { Builds []ServerlessV1ServiceBuild `json:"Builds,omitempty"` - Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/serverless/v1/model_list_deployment_response.go b/twilio/rest/serverless/v1/model_list_deployment_response.go index 7045aeac4..ea6b602e9 100644 --- a/twilio/rest/serverless/v1/model_list_deployment_response.go +++ b/twilio/rest/serverless/v1/model_list_deployment_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Serverless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListDeploymentResponse struct for ListDeploymentResponse type ListDeploymentResponse struct { Deployments []ServerlessV1ServiceEnvironmentDeployment `json:"Deployments,omitempty"` - Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/serverless/v1/model_list_environment_response.go b/twilio/rest/serverless/v1/model_list_environment_response.go index 138d8e2e7..2e333d54d 100644 --- a/twilio/rest/serverless/v1/model_list_environment_response.go +++ b/twilio/rest/serverless/v1/model_list_environment_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Serverless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListEnvironmentResponse struct for ListEnvironmentResponse type ListEnvironmentResponse struct { Environments []ServerlessV1ServiceEnvironment `json:"Environments,omitempty"` - Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/serverless/v1/model_list_function_response.go b/twilio/rest/serverless/v1/model_list_function_response.go index 838efb211..b3a2a435f 100644 --- a/twilio/rest/serverless/v1/model_list_function_response.go +++ b/twilio/rest/serverless/v1/model_list_function_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Serverless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListFunctionResponse struct for ListFunctionResponse type ListFunctionResponse struct { Functions []ServerlessV1ServiceFunction `json:"Functions,omitempty"` - Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/serverless/v1/model_list_function_version_response.go b/twilio/rest/serverless/v1/model_list_function_version_response.go index 65f69de70..3f86bd50e 100644 --- a/twilio/rest/serverless/v1/model_list_function_version_response.go +++ b/twilio/rest/serverless/v1/model_list_function_version_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Serverless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListFunctionVersionResponse struct for ListFunctionVersionResponse type ListFunctionVersionResponse struct { FunctionVersions []ServerlessV1ServiceFunctionFunctionVersion `json:"FunctionVersions,omitempty"` - Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/serverless/v1/model_list_log_response.go b/twilio/rest/serverless/v1/model_list_log_response.go index 9e578f228..4ae0c8eb6 100644 --- a/twilio/rest/serverless/v1/model_list_log_response.go +++ b/twilio/rest/serverless/v1/model_list_log_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Serverless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListLogResponse struct for ListLogResponse type ListLogResponse struct { Logs []ServerlessV1ServiceEnvironmentLog `json:"Logs,omitempty"` - Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/serverless/v1/model_list_service_response.go b/twilio/rest/serverless/v1/model_list_service_response.go index a5f62ec90..380ed6719 100644 --- a/twilio/rest/serverless/v1/model_list_service_response.go +++ b/twilio/rest/serverless/v1/model_list_service_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Serverless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListServiceResponse struct for ListServiceResponse type ListServiceResponse struct { - Meta ListServiceResponseMeta `json:"Meta,omitempty"` - Services []ServerlessV1Service `json:"Services,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Services []ServerlessV1Service `json:"Services,omitempty"` } diff --git a/twilio/rest/serverless/v1/model_list_service_response_meta.go b/twilio/rest/serverless/v1/model_list_service_response_meta.go index e4490875d..9902b68c7 100644 --- a/twilio/rest/serverless/v1/model_list_service_response_meta.go +++ b/twilio/rest/serverless/v1/model_list_service_response_meta.go @@ -1,22 +1,23 @@ /* - * Twilio - Serverless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListServiceResponseMeta struct for ListServiceResponseMeta type ListServiceResponseMeta struct { - FirstPageUrl string `json:"FirstPageUrl,omitempty"` - Key string `json:"Key,omitempty"` - NextPageUrl string `json:"NextPageUrl,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` - Url string `json:"Url,omitempty"` + Url string `json:"Url,omitempty"` } diff --git a/twilio/rest/serverless/v1/model_list_variable_response.go b/twilio/rest/serverless/v1/model_list_variable_response.go index 556ac9f6c..53ae649e1 100644 --- a/twilio/rest/serverless/v1/model_list_variable_response.go +++ b/twilio/rest/serverless/v1/model_list_variable_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Serverless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListVariableResponse struct for ListVariableResponse type ListVariableResponse struct { - Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` Variables []ServerlessV1ServiceEnvironmentVariable `json:"Variables,omitempty"` } diff --git a/twilio/rest/serverless/v1/model_serverless_v1_service.go b/twilio/rest/serverless/v1/model_serverless_v1_service.go index 356cea9eb..f0cdf88d7 100644 --- a/twilio/rest/serverless/v1/model_serverless_v1_service.go +++ b/twilio/rest/serverless/v1/model_serverless_v1_service.go @@ -1,18 +1,20 @@ /* - * Twilio - Serverless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // ServerlessV1Service struct for ServerlessV1Service type ServerlessV1Service struct { // The SID of the Account that created the Service resource diff --git a/twilio/rest/serverless/v1/model_serverless_v1_service_asset.go b/twilio/rest/serverless/v1/model_serverless_v1_service_asset.go index 2888f920e..f4c4fe47d 100644 --- a/twilio/rest/serverless/v1/model_serverless_v1_service_asset.go +++ b/twilio/rest/serverless/v1/model_serverless_v1_service_asset.go @@ -1,18 +1,20 @@ /* - * Twilio - Serverless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // ServerlessV1ServiceAsset struct for ServerlessV1ServiceAsset type ServerlessV1ServiceAsset struct { // The SID of the Account that created the Asset resource diff --git a/twilio/rest/serverless/v1/model_serverless_v1_service_asset_asset_version.go b/twilio/rest/serverless/v1/model_serverless_v1_service_asset_asset_version.go index 11839d955..426d20729 100644 --- a/twilio/rest/serverless/v1/model_serverless_v1_service_asset_asset_version.go +++ b/twilio/rest/serverless/v1/model_serverless_v1_service_asset_asset_version.go @@ -1,18 +1,20 @@ /* - * Twilio - Serverless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // ServerlessV1ServiceAssetAssetVersion struct for ServerlessV1ServiceAssetAssetVersion type ServerlessV1ServiceAssetAssetVersion struct { // The SID of the Account that created the Asset Version resource diff --git a/twilio/rest/serverless/v1/model_serverless_v1_service_build.go b/twilio/rest/serverless/v1/model_serverless_v1_service_build.go index 1840adc0d..4d0e5569f 100644 --- a/twilio/rest/serverless/v1/model_serverless_v1_service_build.go +++ b/twilio/rest/serverless/v1/model_serverless_v1_service_build.go @@ -1,18 +1,20 @@ /* - * Twilio - Serverless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // ServerlessV1ServiceBuild struct for ServerlessV1ServiceBuild type ServerlessV1ServiceBuild struct { // The SID of the Account that created the Build resource @@ -27,7 +29,7 @@ type ServerlessV1ServiceBuild struct { Dependencies *[]map[string]interface{} `json:"Dependencies,omitempty"` // The list of Function Version resource SIDs that are included in the Build FunctionVersions *[]map[string]interface{} `json:"FunctionVersions,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` + Links *map[string]interface{} `json:"Links,omitempty"` // The Runtime version that will be used to run the Build. Runtime *string `json:"Runtime,omitempty"` // The SID of the Service that the Build resource is associated with diff --git a/twilio/rest/serverless/v1/model_serverless_v1_service_build_build_status.go b/twilio/rest/serverless/v1/model_serverless_v1_service_build_build_status.go index 10be53ecd..3d44319b2 100644 --- a/twilio/rest/serverless/v1/model_serverless_v1_service_build_build_status.go +++ b/twilio/rest/serverless/v1/model_serverless_v1_service_build_build_status.go @@ -1,15 +1,16 @@ /* - * Twilio - Serverless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ServerlessV1ServiceBuildBuildStatus struct for ServerlessV1ServiceBuildBuildStatus type ServerlessV1ServiceBuildBuildStatus struct { // The SID of the Account that created the Build resource diff --git a/twilio/rest/serverless/v1/model_serverless_v1_service_environment.go b/twilio/rest/serverless/v1/model_serverless_v1_service_environment.go index 0459e12b8..de25f2828 100644 --- a/twilio/rest/serverless/v1/model_serverless_v1_service_environment.go +++ b/twilio/rest/serverless/v1/model_serverless_v1_service_environment.go @@ -1,18 +1,20 @@ /* - * Twilio - Serverless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // ServerlessV1ServiceEnvironment struct for ServerlessV1ServiceEnvironment type ServerlessV1ServiceEnvironment struct { // The SID of the Account that created the Environment resource diff --git a/twilio/rest/serverless/v1/model_serverless_v1_service_environment_deployment.go b/twilio/rest/serverless/v1/model_serverless_v1_service_environment_deployment.go index 1fe03387d..d12841f3d 100644 --- a/twilio/rest/serverless/v1/model_serverless_v1_service_environment_deployment.go +++ b/twilio/rest/serverless/v1/model_serverless_v1_service_environment_deployment.go @@ -1,18 +1,20 @@ /* - * Twilio - Serverless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // ServerlessV1ServiceEnvironmentDeployment struct for ServerlessV1ServiceEnvironmentDeployment type ServerlessV1ServiceEnvironmentDeployment struct { // The SID of the Account that created the Deployment resource diff --git a/twilio/rest/serverless/v1/model_serverless_v1_service_environment_log.go b/twilio/rest/serverless/v1/model_serverless_v1_service_environment_log.go index 0f2253e3f..407e22ac4 100644 --- a/twilio/rest/serverless/v1/model_serverless_v1_service_environment_log.go +++ b/twilio/rest/serverless/v1/model_serverless_v1_service_environment_log.go @@ -1,18 +1,20 @@ /* - * Twilio - Serverless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // ServerlessV1ServiceEnvironmentLog struct for ServerlessV1ServiceEnvironmentLog type ServerlessV1ServiceEnvironmentLog struct { // The SID of the Account that created the Log resource diff --git a/twilio/rest/serverless/v1/model_serverless_v1_service_environment_variable.go b/twilio/rest/serverless/v1/model_serverless_v1_service_environment_variable.go index 9132a13e6..f1f2e08a3 100644 --- a/twilio/rest/serverless/v1/model_serverless_v1_service_environment_variable.go +++ b/twilio/rest/serverless/v1/model_serverless_v1_service_environment_variable.go @@ -1,18 +1,20 @@ /* - * Twilio - Serverless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // ServerlessV1ServiceEnvironmentVariable struct for ServerlessV1ServiceEnvironmentVariable type ServerlessV1ServiceEnvironmentVariable struct { // The SID of the Account that created the Variable resource diff --git a/twilio/rest/serverless/v1/model_serverless_v1_service_function.go b/twilio/rest/serverless/v1/model_serverless_v1_service_function.go index f7dbfb0ce..0fb500e90 100644 --- a/twilio/rest/serverless/v1/model_serverless_v1_service_function.go +++ b/twilio/rest/serverless/v1/model_serverless_v1_service_function.go @@ -1,18 +1,20 @@ /* - * Twilio - Serverless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // ServerlessV1ServiceFunction struct for ServerlessV1ServiceFunction type ServerlessV1ServiceFunction struct { // The SID of the Account that created the Function resource diff --git a/twilio/rest/serverless/v1/model_serverless_v1_service_function_function_version.go b/twilio/rest/serverless/v1/model_serverless_v1_service_function_function_version.go index 3e14aad5c..a541e9ff1 100644 --- a/twilio/rest/serverless/v1/model_serverless_v1_service_function_function_version.go +++ b/twilio/rest/serverless/v1/model_serverless_v1_service_function_function_version.go @@ -1,18 +1,20 @@ /* - * Twilio - Serverless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // ServerlessV1ServiceFunctionFunctionVersion struct for ServerlessV1ServiceFunctionFunctionVersion type ServerlessV1ServiceFunctionFunctionVersion struct { // The SID of the Account that created the Function Version resource @@ -20,8 +22,8 @@ type ServerlessV1ServiceFunctionFunctionVersion struct { // The ISO 8601 date and time in GMT when the Function Version resource was created DateCreated *time.Time `json:"DateCreated,omitempty"` // The SID of the Function resource that is the parent of the Function Version resource - FunctionSid *string `json:"FunctionSid,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` + FunctionSid *string `json:"FunctionSid,omitempty"` + Links *map[string]interface{} `json:"Links,omitempty"` // The URL-friendly string by which the Function Version resource can be referenced Path *string `json:"Path,omitempty"` // The SID of the Service that the Function Version resource is associated with diff --git a/twilio/rest/serverless/v1/model_serverless_v1_service_function_function_version_function_version_content.go b/twilio/rest/serverless/v1/model_serverless_v1_service_function_function_version_function_version_content.go index 755f8f35d..b1656394d 100644 --- a/twilio/rest/serverless/v1/model_serverless_v1_service_function_function_version_function_version_content.go +++ b/twilio/rest/serverless/v1/model_serverless_v1_service_function_function_version_function_version_content.go @@ -1,15 +1,16 @@ /* - * Twilio - Serverless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ServerlessV1ServiceFunctionFunctionVersionFunctionVersionContent struct for ServerlessV1ServiceFunctionFunctionVersionFunctionVersionContent type ServerlessV1ServiceFunctionFunctionVersionFunctionVersionContent struct { // The SID of the Account that created the Function Version resource diff --git a/twilio/rest/studio/v1/api_default.go b/twilio/rest/studio/v1/api_default.go index 03dfbbf4b..a130162a4 100644 --- a/twilio/rest/studio/v1/api_default.go +++ b/twilio/rest/studio/v1/api_default.go @@ -1,11 +1,11 @@ /* - * Twilio - Studio - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,10 +14,11 @@ package openapi import ( "encoding/json" "fmt" - twilio "github.com/twilio/twilio-go/client" "net/url" - "strings" - "time" + "strings" + "time" + + twilio "github.com/twilio/twilio-go/client" ) type DefaultApiService struct { @@ -26,17 +27,17 @@ type DefaultApiService struct { } func NewDefaultApiService(client *twilio.Client) *DefaultApiService { - return &DefaultApiService { - client: client, + return &DefaultApiService{ + client: client, baseURL: "https://studio.twilio.com", } } // CreateEngagementParams Optional parameters for the method 'CreateEngagement' type CreateEngagementParams struct { - From *string `json:"From,omitempty"` + From *string `json:"From,omitempty"` Parameters *map[string]interface{} `json:"Parameters,omitempty"` - To *string `json:"To,omitempty"` + To *string `json:"To,omitempty"` } /* @@ -48,50 +49,50 @@ type CreateEngagementParams struct { * @param "Parameters" (map[string]interface{}) - A JSON string we will add to your flow's context and that you can access as variables inside your flow. For example, if you pass in `Parameters={'name':'Zeke'}` then inside a widget you can reference the variable `{{flow.data.name}}` which will return the string 'Zeke'. Note: the JSON value must explicitly be passed as a string, not as a hash object. Depending on your particular HTTP library, you may need to add quotes or URL encode your JSON string. * @param "To" (string) - The Contact phone number to start a Studio Flow Engagement, available as variable `{{contact.channel.address}}`. * @return StudioV1FlowEngagement -*/ + */ func (c *DefaultApiService) CreateEngagement(FlowSid string, params *CreateEngagementParams) (*StudioV1FlowEngagement, error) { - path := "/v1/Flows/{FlowSid}/Engagements" + path := "/v1/Flows/{FlowSid}/Engagements" path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.From != nil { - data.Set("From", *params.From) -} - if params != nil && params.Parameters != nil { - v, err := json.Marshal(params.Parameters) + data := url.Values{} + headers := 0 - if err != nil { - return nil, err + if params != nil && params.From != nil { + data.Set("From", *params.From) } + if params != nil && params.Parameters != nil { + v, err := json.Marshal(params.Parameters) - data.Set("Parameters", fmt.Sprint(v)) -} - if params != nil && params.To != nil { - data.Set("To", *params.To) -} + if err != nil { + return nil, err + } + data.Set("Parameters", fmt.Sprint(v)) + } + if params != nil && params.To != nil { + data.Set("To", *params.To) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &StudioV1FlowEngagement{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &StudioV1FlowEngagement{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateExecutionParams Optional parameters for the method 'CreateExecution' type CreateExecutionParams struct { - From *string `json:"From,omitempty"` + From *string `json:"From,omitempty"` Parameters *map[string]interface{} `json:"Parameters,omitempty"` - To *string `json:"To,omitempty"` + To *string `json:"To,omitempty"` } /* @@ -103,44 +104,43 @@ type CreateExecutionParams struct { * @param "Parameters" (map[string]interface{}) - JSON data that will be added to the Flow's context and that can be accessed as variables inside your Flow. For example, if you pass in `Parameters={\\\"name\\\":\\\"Zeke\\\"}`, a widget in your Flow can reference the variable `{{flow.data.name}}`, which returns \\\"Zeke\\\". Note: the JSON value must explicitly be passed as a string, not as a hash object. Depending on your particular HTTP library, you may need to add quotes or URL encode the JSON string. * @param "To" (string) - The Contact phone number to start a Studio Flow Execution, available as variable `{{contact.channel.address}}`. * @return StudioV1FlowExecution -*/ + */ func (c *DefaultApiService) CreateExecution(FlowSid string, params *CreateExecutionParams) (*StudioV1FlowExecution, error) { - path := "/v1/Flows/{FlowSid}/Executions" + path := "/v1/Flows/{FlowSid}/Executions" path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.From != nil { - data.Set("From", *params.From) -} - if params != nil && params.Parameters != nil { - v, err := json.Marshal(params.Parameters) + data := url.Values{} + headers := 0 - if err != nil { - return nil, err + if params != nil && params.From != nil { + data.Set("From", *params.From) } + if params != nil && params.Parameters != nil { + v, err := json.Marshal(params.Parameters) - data.Set("Parameters", fmt.Sprint(v)) -} - if params != nil && params.To != nil { - data.Set("To", *params.To) -} + if err != nil { + return nil, err + } + data.Set("Parameters", fmt.Sprint(v)) + } + if params != nil && params.To != nil { + data.Set("To", *params.To) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &StudioV1FlowExecution{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &StudioV1FlowExecution{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -148,25 +148,23 @@ func (c *DefaultApiService) CreateExecution(FlowSid string, params *CreateExecut * Delete this Engagement and all Steps relating to it. * @param FlowSid The SID of the Flow to delete Engagements from. * @param Sid The SID of the Engagement resource to delete. -*/ -func (c *DefaultApiService) DeleteEngagement(FlowSid string, Sid string, ) (error) { - path := "/v1/Flows/{FlowSid}/Engagements/{Sid}" + */ +func (c *DefaultApiService) DeleteEngagement(FlowSid string, Sid string) error { + path := "/v1/Flows/{FlowSid}/Engagements/{Sid}" path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + defer resp.Body.Close() - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() - - return nil + return nil } /* @@ -174,49 +172,45 @@ func (c *DefaultApiService) DeleteEngagement(FlowSid string, Sid string, ) (erro * Delete the Execution and all Steps relating to it. * @param FlowSid The SID of the Flow with the Execution resources to delete. * @param Sid The SID of the Execution resource to delete. -*/ -func (c *DefaultApiService) DeleteExecution(FlowSid string, Sid string, ) (error) { - path := "/v1/Flows/{FlowSid}/Executions/{Sid}" + */ +func (c *DefaultApiService) DeleteExecution(FlowSid string, Sid string) error { + path := "/v1/Flows/{FlowSid}/Executions/{Sid}" path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + defer resp.Body.Close() - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() - - return nil + return nil } /* * DeleteFlow Method for DeleteFlow * Delete a specific Flow. * @param Sid The SID of the Flow resource to delete. -*/ -func (c *DefaultApiService) DeleteFlow(Sid string, ) (error) { - path := "/v1/Flows/{Sid}" + */ +func (c *DefaultApiService) DeleteFlow(Sid string) error { + path := "/v1/Flows/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + defer resp.Body.Close() - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() - - return nil + return nil } /* @@ -225,30 +219,28 @@ func (c *DefaultApiService) DeleteFlow(Sid string, ) (error) { * @param FlowSid The SID of the Flow. * @param Sid The SID of the Engagement resource to fetch. * @return StudioV1FlowEngagement -*/ -func (c *DefaultApiService) FetchEngagement(FlowSid string, Sid string, ) (*StudioV1FlowEngagement, error) { - path := "/v1/Flows/{FlowSid}/Engagements/{Sid}" + */ +func (c *DefaultApiService) FetchEngagement(FlowSid string, Sid string) (*StudioV1FlowEngagement, error) { + path := "/v1/Flows/{FlowSid}/Engagements/{Sid}" path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &StudioV1FlowEngagement{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &StudioV1FlowEngagement{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -257,30 +249,28 @@ func (c *DefaultApiService) FetchEngagement(FlowSid string, Sid string, ) (*Stud * @param FlowSid The SID of the Flow. * @param EngagementSid The SID of the Engagement. * @return StudioV1FlowEngagementEngagementContext -*/ -func (c *DefaultApiService) FetchEngagementContext(FlowSid string, EngagementSid string, ) (*StudioV1FlowEngagementEngagementContext, error) { - path := "/v1/Flows/{FlowSid}/Engagements/{EngagementSid}/Context" + */ +func (c *DefaultApiService) FetchEngagementContext(FlowSid string, EngagementSid string) (*StudioV1FlowEngagementEngagementContext, error) { + path := "/v1/Flows/{FlowSid}/Engagements/{EngagementSid}/Context" path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) path = strings.Replace(path, "{"+"EngagementSid"+"}", EngagementSid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &StudioV1FlowEngagementEngagementContext{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &StudioV1FlowEngagementEngagementContext{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -289,30 +279,28 @@ func (c *DefaultApiService) FetchEngagementContext(FlowSid string, EngagementSid * @param FlowSid The SID of the Flow with the Execution resource to fetch * @param Sid The SID of the Execution resource to fetch. * @return StudioV1FlowExecution -*/ -func (c *DefaultApiService) FetchExecution(FlowSid string, Sid string, ) (*StudioV1FlowExecution, error) { - path := "/v1/Flows/{FlowSid}/Executions/{Sid}" + */ +func (c *DefaultApiService) FetchExecution(FlowSid string, Sid string) (*StudioV1FlowExecution, error) { + path := "/v1/Flows/{FlowSid}/Executions/{Sid}" path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &StudioV1FlowExecution{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &StudioV1FlowExecution{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -321,30 +309,28 @@ func (c *DefaultApiService) FetchExecution(FlowSid string, Sid string, ) (*Studi * @param FlowSid The SID of the Flow with the Execution context to fetch. * @param ExecutionSid The SID of the Execution context to fetch. * @return StudioV1FlowExecutionExecutionContext -*/ -func (c *DefaultApiService) FetchExecutionContext(FlowSid string, ExecutionSid string, ) (*StudioV1FlowExecutionExecutionContext, error) { - path := "/v1/Flows/{FlowSid}/Executions/{ExecutionSid}/Context" + */ +func (c *DefaultApiService) FetchExecutionContext(FlowSid string, ExecutionSid string) (*StudioV1FlowExecutionExecutionContext, error) { + path := "/v1/Flows/{FlowSid}/Executions/{ExecutionSid}/Context" path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) path = strings.Replace(path, "{"+"ExecutionSid"+"}", ExecutionSid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &StudioV1FlowExecutionExecutionContext{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &StudioV1FlowExecutionExecutionContext{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -354,31 +340,29 @@ func (c *DefaultApiService) FetchExecutionContext(FlowSid string, ExecutionSid s * @param ExecutionSid The SID of the Execution resource with the Step to fetch. * @param Sid The SID of the ExecutionStep resource to fetch. * @return StudioV1FlowExecutionExecutionStep -*/ -func (c *DefaultApiService) FetchExecutionStep(FlowSid string, ExecutionSid string, Sid string, ) (*StudioV1FlowExecutionExecutionStep, error) { - path := "/v1/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps/{Sid}" + */ +func (c *DefaultApiService) FetchExecutionStep(FlowSid string, ExecutionSid string, Sid string) (*StudioV1FlowExecutionExecutionStep, error) { + path := "/v1/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps/{Sid}" path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) path = strings.Replace(path, "{"+"ExecutionSid"+"}", ExecutionSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &StudioV1FlowExecutionExecutionStep{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &StudioV1FlowExecutionExecutionStep{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -388,31 +372,29 @@ func (c *DefaultApiService) FetchExecutionStep(FlowSid string, ExecutionSid stri * @param ExecutionSid The SID of the Execution resource with the Step to fetch. * @param StepSid The SID of the Step to fetch. * @return StudioV1FlowExecutionExecutionStepExecutionStepContext -*/ -func (c *DefaultApiService) FetchExecutionStepContext(FlowSid string, ExecutionSid string, StepSid string, ) (*StudioV1FlowExecutionExecutionStepExecutionStepContext, error) { - path := "/v1/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps/{StepSid}/Context" + */ +func (c *DefaultApiService) FetchExecutionStepContext(FlowSid string, ExecutionSid string, StepSid string) (*StudioV1FlowExecutionExecutionStepExecutionStepContext, error) { + path := "/v1/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps/{StepSid}/Context" path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) path = strings.Replace(path, "{"+"ExecutionSid"+"}", ExecutionSid, -1) path = strings.Replace(path, "{"+"StepSid"+"}", StepSid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &StudioV1FlowExecutionExecutionStepExecutionStepContext{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &StudioV1FlowExecutionExecutionStepExecutionStepContext{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -420,29 +402,27 @@ func (c *DefaultApiService) FetchExecutionStepContext(FlowSid string, ExecutionS * Retrieve a specific Flow. * @param Sid The SID of the Flow resource to fetch. * @return StudioV1Flow -*/ -func (c *DefaultApiService) FetchFlow(Sid string, ) (*StudioV1Flow, error) { - path := "/v1/Flows/{Sid}" + */ +func (c *DefaultApiService) FetchFlow(Sid string) (*StudioV1Flow, error) { + path := "/v1/Flows/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &StudioV1Flow{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &StudioV1Flow{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -452,31 +432,29 @@ func (c *DefaultApiService) FetchFlow(Sid string, ) (*StudioV1Flow, error) { * @param EngagementSid The SID of the Engagement with the Step to fetch. * @param Sid The SID of the Step resource to fetch. * @return StudioV1FlowEngagementStep -*/ -func (c *DefaultApiService) FetchStep(FlowSid string, EngagementSid string, Sid string, ) (*StudioV1FlowEngagementStep, error) { - path := "/v1/Flows/{FlowSid}/Engagements/{EngagementSid}/Steps/{Sid}" + */ +func (c *DefaultApiService) FetchStep(FlowSid string, EngagementSid string, Sid string) (*StudioV1FlowEngagementStep, error) { + path := "/v1/Flows/{FlowSid}/Engagements/{EngagementSid}/Steps/{Sid}" path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) path = strings.Replace(path, "{"+"EngagementSid"+"}", EngagementSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &StudioV1FlowEngagementStep{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &StudioV1FlowEngagementStep{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -486,32 +464,31 @@ func (c *DefaultApiService) FetchStep(FlowSid string, EngagementSid string, Sid * @param EngagementSid The SID of the Engagement with the Step to fetch. * @param StepSid The SID of the Step to fetch * @return StudioV1FlowEngagementStepStepContext -*/ -func (c *DefaultApiService) FetchStepContext(FlowSid string, EngagementSid string, StepSid string, ) (*StudioV1FlowEngagementStepStepContext, error) { - path := "/v1/Flows/{FlowSid}/Engagements/{EngagementSid}/Steps/{StepSid}/Context" + */ +func (c *DefaultApiService) FetchStepContext(FlowSid string, EngagementSid string, StepSid string) (*StudioV1FlowEngagementStepStepContext, error) { + path := "/v1/Flows/{FlowSid}/Engagements/{EngagementSid}/Steps/{StepSid}/Context" path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) path = strings.Replace(path, "{"+"EngagementSid"+"}", EngagementSid, -1) path = strings.Replace(path, "{"+"StepSid"+"}", StepSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &StudioV1FlowEngagementStepStepContext{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &StudioV1FlowEngagementStepStepContext{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListEngagementParams Optional parameters for the method 'ListEngagement' type ListEngagementParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -524,38 +501,38 @@ type ListEngagementParams struct { * @param optional nil or *ListEngagementParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListEngagementResponse -*/ + */ func (c *DefaultApiService) ListEngagement(FlowSid string, params *ListEngagementParams) (*ListEngagementResponse, error) { - path := "/v1/Flows/{FlowSid}/Engagements" + path := "/v1/Flows/{FlowSid}/Engagements" path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListEngagementResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListEngagementResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListExecutionParams Optional parameters for the method 'ListExecution' type ListExecutionParams struct { DateCreatedFrom *time.Time `json:"DateCreatedFrom,omitempty"` - DateCreatedTo *time.Time `json:"DateCreatedTo,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + DateCreatedTo *time.Time `json:"DateCreatedTo,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -567,39 +544,39 @@ type ListExecutionParams struct { * @param "DateCreatedTo" (time.Time) - Only show Execution resources starting before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time, given as `YYYY-MM-DDThh:mm:ss-hh:mm`. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListExecutionResponse -*/ + */ func (c *DefaultApiService) ListExecution(FlowSid string, params *ListExecutionParams) (*ListExecutionResponse, error) { - path := "/v1/Flows/{FlowSid}/Executions" + path := "/v1/Flows/{FlowSid}/Executions" path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.DateCreatedFrom != nil { - data.Set("DateCreatedFrom", fmt.Sprint(*params.DateCreatedFrom)) -} - if params != nil && params.DateCreatedTo != nil { - data.Set("DateCreatedTo", fmt.Sprint(*params.DateCreatedTo)) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.DateCreatedFrom != nil { + data.Set("DateCreatedFrom", fmt.Sprint(*params.DateCreatedFrom)) + } + if params != nil && params.DateCreatedTo != nil { + data.Set("DateCreatedTo", fmt.Sprint(*params.DateCreatedTo)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListExecutionResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListExecutionResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListExecutionStepParams Optional parameters for the method 'ListExecutionStep' type ListExecutionStepParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -613,34 +590,34 @@ type ListExecutionStepParams struct { * @param optional nil or *ListExecutionStepParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListExecutionStepResponse -*/ + */ func (c *DefaultApiService) ListExecutionStep(FlowSid string, ExecutionSid string, params *ListExecutionStepParams) (*ListExecutionStepResponse, error) { - path := "/v1/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps" + path := "/v1/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps" path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) path = strings.Replace(path, "{"+"ExecutionSid"+"}", ExecutionSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListExecutionStepResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListExecutionStepResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListFlowParams Optional parameters for the method 'ListFlow' type ListFlowParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -652,32 +629,32 @@ type ListFlowParams struct { * @param optional nil or *ListFlowParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListFlowResponse -*/ + */ func (c *DefaultApiService) ListFlow(params *ListFlowParams) (*ListFlowResponse, error) { - path := "/v1/Flows" + path := "/v1/Flows" - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListFlowResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListFlowResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListStepParams Optional parameters for the method 'ListStep' type ListStepParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -691,34 +668,34 @@ type ListStepParams struct { * @param optional nil or *ListStepParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListStepResponse -*/ + */ func (c *DefaultApiService) ListStep(FlowSid string, EngagementSid string, params *ListStepParams) (*ListStepResponse, error) { - path := "/v1/Flows/{FlowSid}/Engagements/{EngagementSid}/Steps" + path := "/v1/Flows/{FlowSid}/Engagements/{EngagementSid}/Steps" path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) path = strings.Replace(path, "{"+"EngagementSid"+"}", EngagementSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListStepResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListStepResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateExecutionParams Optional parameters for the method 'UpdateExecution' type UpdateExecutionParams struct { Status *string `json:"Status,omitempty"` @@ -732,31 +709,30 @@ type UpdateExecutionParams struct { * @param optional nil or *UpdateExecutionParams - Optional Parameters: * @param "Status" (string) - The status of the Execution. Can only be `ended`. * @return StudioV1FlowExecution -*/ + */ func (c *DefaultApiService) UpdateExecution(FlowSid string, Sid string, params *UpdateExecutionParams) (*StudioV1FlowExecution, error) { - path := "/v1/Flows/{FlowSid}/Executions/{Sid}" + path := "/v1/Flows/{FlowSid}/Executions/{Sid}" path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) -} + data := url.Values{} + headers := 0 + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &StudioV1FlowExecution{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &StudioV1FlowExecution{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } diff --git a/twilio/rest/studio/v1/model_list_engagement_response.go b/twilio/rest/studio/v1/model_list_engagement_response.go index e0c39a157..13cd983dc 100644 --- a/twilio/rest/studio/v1/model_list_engagement_response.go +++ b/twilio/rest/studio/v1/model_list_engagement_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Studio - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListEngagementResponse struct for ListEngagementResponse type ListEngagementResponse struct { Engagements []StudioV1FlowEngagement `json:"Engagements,omitempty"` - Meta ListFlowResponseMeta `json:"Meta,omitempty"` + Meta ListFlowResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/studio/v1/model_list_execution_response.go b/twilio/rest/studio/v1/model_list_execution_response.go index 79f8fca8f..f2745c552 100644 --- a/twilio/rest/studio/v1/model_list_execution_response.go +++ b/twilio/rest/studio/v1/model_list_execution_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Studio - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListExecutionResponse struct for ListExecutionResponse type ListExecutionResponse struct { Executions []StudioV1FlowExecution `json:"Executions,omitempty"` - Meta ListFlowResponseMeta `json:"Meta,omitempty"` + Meta ListFlowResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/studio/v1/model_list_execution_step_response.go b/twilio/rest/studio/v1/model_list_execution_step_response.go index bb61fc348..33fdd1d18 100644 --- a/twilio/rest/studio/v1/model_list_execution_step_response.go +++ b/twilio/rest/studio/v1/model_list_execution_step_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Studio - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListExecutionStepResponse struct for ListExecutionStepResponse type ListExecutionStepResponse struct { - Meta ListFlowResponseMeta `json:"Meta,omitempty"` + Meta ListFlowResponseMeta `json:"Meta,omitempty"` Steps []StudioV1FlowExecutionExecutionStep `json:"Steps,omitempty"` } diff --git a/twilio/rest/studio/v1/model_list_flow_response.go b/twilio/rest/studio/v1/model_list_flow_response.go index ff61e78a1..da7c22848 100644 --- a/twilio/rest/studio/v1/model_list_flow_response.go +++ b/twilio/rest/studio/v1/model_list_flow_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Studio - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListFlowResponse struct for ListFlowResponse type ListFlowResponse struct { - Flows []StudioV1Flow `json:"Flows,omitempty"` - Meta ListFlowResponseMeta `json:"Meta,omitempty"` + Flows []StudioV1Flow `json:"Flows,omitempty"` + Meta ListFlowResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/studio/v1/model_list_flow_response_meta.go b/twilio/rest/studio/v1/model_list_flow_response_meta.go index 5a4c17878..17cc8ee47 100644 --- a/twilio/rest/studio/v1/model_list_flow_response_meta.go +++ b/twilio/rest/studio/v1/model_list_flow_response_meta.go @@ -1,22 +1,23 @@ /* - * Twilio - Studio - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListFlowResponseMeta struct for ListFlowResponseMeta type ListFlowResponseMeta struct { - FirstPageUrl string `json:"FirstPageUrl,omitempty"` - Key string `json:"Key,omitempty"` - NextPageUrl string `json:"NextPageUrl,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` - Url string `json:"Url,omitempty"` + Url string `json:"Url,omitempty"` } diff --git a/twilio/rest/studio/v1/model_list_step_response.go b/twilio/rest/studio/v1/model_list_step_response.go index e8b43fbf7..214e7413e 100644 --- a/twilio/rest/studio/v1/model_list_step_response.go +++ b/twilio/rest/studio/v1/model_list_step_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Studio - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListStepResponse struct for ListStepResponse type ListStepResponse struct { - Meta ListFlowResponseMeta `json:"Meta,omitempty"` + Meta ListFlowResponseMeta `json:"Meta,omitempty"` Steps []StudioV1FlowEngagementStep `json:"Steps,omitempty"` } diff --git a/twilio/rest/studio/v1/model_studio_v1_flow.go b/twilio/rest/studio/v1/model_studio_v1_flow.go index a7269aac0..49599f861 100644 --- a/twilio/rest/studio/v1/model_studio_v1_flow.go +++ b/twilio/rest/studio/v1/model_studio_v1_flow.go @@ -1,18 +1,20 @@ /* - * Twilio - Studio - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // StudioV1Flow struct for StudioV1Flow type StudioV1Flow struct { // The SID of the Account that created the resource diff --git a/twilio/rest/studio/v1/model_studio_v1_flow_engagement.go b/twilio/rest/studio/v1/model_studio_v1_flow_engagement.go index d8572315e..3353f429e 100644 --- a/twilio/rest/studio/v1/model_studio_v1_flow_engagement.go +++ b/twilio/rest/studio/v1/model_studio_v1_flow_engagement.go @@ -1,18 +1,20 @@ /* - * Twilio - Studio - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // StudioV1FlowEngagement struct for StudioV1FlowEngagement type StudioV1FlowEngagement struct { // The SID of the Account that created the resource diff --git a/twilio/rest/studio/v1/model_studio_v1_flow_engagement_engagement_context.go b/twilio/rest/studio/v1/model_studio_v1_flow_engagement_engagement_context.go index 6b43fb43d..535f5b93f 100644 --- a/twilio/rest/studio/v1/model_studio_v1_flow_engagement_engagement_context.go +++ b/twilio/rest/studio/v1/model_studio_v1_flow_engagement_engagement_context.go @@ -1,15 +1,16 @@ /* - * Twilio - Studio - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // StudioV1FlowEngagementEngagementContext struct for StudioV1FlowEngagementEngagementContext type StudioV1FlowEngagementEngagementContext struct { // Account SID diff --git a/twilio/rest/studio/v1/model_studio_v1_flow_engagement_step.go b/twilio/rest/studio/v1/model_studio_v1_flow_engagement_step.go index 8b0f2cff2..960e75c2f 100644 --- a/twilio/rest/studio/v1/model_studio_v1_flow_engagement_step.go +++ b/twilio/rest/studio/v1/model_studio_v1_flow_engagement_step.go @@ -1,18 +1,20 @@ /* - * Twilio - Studio - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // StudioV1FlowEngagementStep struct for StudioV1FlowEngagementStep type StudioV1FlowEngagementStep struct { // The SID of the Account that created the resource diff --git a/twilio/rest/studio/v1/model_studio_v1_flow_engagement_step_step_context.go b/twilio/rest/studio/v1/model_studio_v1_flow_engagement_step_step_context.go index fd1077309..4b27cb7d6 100644 --- a/twilio/rest/studio/v1/model_studio_v1_flow_engagement_step_step_context.go +++ b/twilio/rest/studio/v1/model_studio_v1_flow_engagement_step_step_context.go @@ -1,15 +1,16 @@ /* - * Twilio - Studio - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // StudioV1FlowEngagementStepStepContext struct for StudioV1FlowEngagementStepStepContext type StudioV1FlowEngagementStepStepContext struct { // The SID of the Account that created the resource diff --git a/twilio/rest/studio/v1/model_studio_v1_flow_execution.go b/twilio/rest/studio/v1/model_studio_v1_flow_execution.go index 0d1a7d500..f2015cb47 100644 --- a/twilio/rest/studio/v1/model_studio_v1_flow_execution.go +++ b/twilio/rest/studio/v1/model_studio_v1_flow_execution.go @@ -1,18 +1,20 @@ /* - * Twilio - Studio - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // StudioV1FlowExecution struct for StudioV1FlowExecution type StudioV1FlowExecution struct { // The SID of the Account that created the resource diff --git a/twilio/rest/studio/v1/model_studio_v1_flow_execution_execution_context.go b/twilio/rest/studio/v1/model_studio_v1_flow_execution_execution_context.go index 7a8e05abe..266978753 100644 --- a/twilio/rest/studio/v1/model_studio_v1_flow_execution_execution_context.go +++ b/twilio/rest/studio/v1/model_studio_v1_flow_execution_execution_context.go @@ -1,15 +1,16 @@ /* - * Twilio - Studio - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // StudioV1FlowExecutionExecutionContext struct for StudioV1FlowExecutionExecutionContext type StudioV1FlowExecutionExecutionContext struct { // The SID of the Account that created the resource diff --git a/twilio/rest/studio/v1/model_studio_v1_flow_execution_execution_step.go b/twilio/rest/studio/v1/model_studio_v1_flow_execution_execution_step.go index 946ad9057..517cb9454 100644 --- a/twilio/rest/studio/v1/model_studio_v1_flow_execution_execution_step.go +++ b/twilio/rest/studio/v1/model_studio_v1_flow_execution_execution_step.go @@ -1,18 +1,20 @@ /* - * Twilio - Studio - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // StudioV1FlowExecutionExecutionStep struct for StudioV1FlowExecutionExecutionStep type StudioV1FlowExecutionExecutionStep struct { // The SID of the Account that created the resource diff --git a/twilio/rest/studio/v1/model_studio_v1_flow_execution_execution_step_execution_step_context.go b/twilio/rest/studio/v1/model_studio_v1_flow_execution_execution_step_execution_step_context.go index a5990e7f6..e5fceb9ef 100644 --- a/twilio/rest/studio/v1/model_studio_v1_flow_execution_execution_step_execution_step_context.go +++ b/twilio/rest/studio/v1/model_studio_v1_flow_execution_execution_step_execution_step_context.go @@ -1,15 +1,16 @@ /* - * Twilio - Studio - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // StudioV1FlowExecutionExecutionStepExecutionStepContext struct for StudioV1FlowExecutionExecutionStepExecutionStepContext type StudioV1FlowExecutionExecutionStepExecutionStepContext struct { // The SID of the Account that created the resource diff --git a/twilio/rest/studio/v2/api_default.go b/twilio/rest/studio/v2/api_default.go index 297925091..f2533dd5c 100644 --- a/twilio/rest/studio/v2/api_default.go +++ b/twilio/rest/studio/v2/api_default.go @@ -1,11 +1,11 @@ /* - * Twilio - Studio - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,10 +14,11 @@ package openapi import ( "encoding/json" "fmt" - twilio "github.com/twilio/twilio-go/client" "net/url" - "strings" - "time" + "strings" + "time" + + twilio "github.com/twilio/twilio-go/client" ) type DefaultApiService struct { @@ -26,17 +27,17 @@ type DefaultApiService struct { } func NewDefaultApiService(client *twilio.Client) *DefaultApiService { - return &DefaultApiService { - client: client, + return &DefaultApiService{ + client: client, baseURL: "https://studio.twilio.com", } } // CreateExecutionParams Optional parameters for the method 'CreateExecution' type CreateExecutionParams struct { - From *string `json:"From,omitempty"` + From *string `json:"From,omitempty"` Parameters *map[string]interface{} `json:"Parameters,omitempty"` - To *string `json:"To,omitempty"` + To *string `json:"To,omitempty"` } /* @@ -48,51 +49,51 @@ type CreateExecutionParams struct { * @param "Parameters" (map[string]interface{}) - JSON data that will be added to the Flow's context and that can be accessed as variables inside your Flow. For example, if you pass in `Parameters={\\\"name\\\":\\\"Zeke\\\"}`, a widget in your Flow can reference the variable `{{flow.data.name}}`, which returns \\\"Zeke\\\". Note: the JSON value must explicitly be passed as a string, not as a hash object. Depending on your particular HTTP library, you may need to add quotes or URL encode the JSON string. * @param "To" (string) - The Contact phone number to start a Studio Flow Execution, available as variable `{{contact.channel.address}}`. * @return StudioV2FlowExecution -*/ + */ func (c *DefaultApiService) CreateExecution(FlowSid string, params *CreateExecutionParams) (*StudioV2FlowExecution, error) { - path := "/v2/Flows/{FlowSid}/Executions" + path := "/v2/Flows/{FlowSid}/Executions" path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.From != nil { - data.Set("From", *params.From) -} - if params != nil && params.Parameters != nil { - v, err := json.Marshal(params.Parameters) + data := url.Values{} + headers := 0 - if err != nil { - return nil, err + if params != nil && params.From != nil { + data.Set("From", *params.From) } + if params != nil && params.Parameters != nil { + v, err := json.Marshal(params.Parameters) - data.Set("Parameters", fmt.Sprint(v)) -} - if params != nil && params.To != nil { - data.Set("To", *params.To) -} + if err != nil { + return nil, err + } + data.Set("Parameters", fmt.Sprint(v)) + } + if params != nil && params.To != nil { + data.Set("To", *params.To) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &StudioV2FlowExecution{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &StudioV2FlowExecution{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateFlowParams Optional parameters for the method 'CreateFlow' type CreateFlowParams struct { - CommitMessage *string `json:"CommitMessage,omitempty"` - Definition *map[string]interface{} `json:"Definition,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Status *string `json:"Status,omitempty"` + CommitMessage *string `json:"CommitMessage,omitempty"` + Definition *map[string]interface{} `json:"Definition,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Status *string `json:"Status,omitempty"` } /* @@ -104,46 +105,45 @@ type CreateFlowParams struct { * @param "FriendlyName" (string) - The string that you assigned to describe the Flow. * @param "Status" (string) - The status of the Flow. Can be: `draft` or `published`. * @return StudioV2Flow -*/ + */ func (c *DefaultApiService) CreateFlow(params *CreateFlowParams) (*StudioV2Flow, error) { - path := "/v2/Flows" + path := "/v2/Flows" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.CommitMessage != nil { - data.Set("CommitMessage", *params.CommitMessage) -} - if params != nil && params.Definition != nil { - v, err := json.Marshal(params.Definition) - - if err != nil { - return nil, err + if params != nil && params.CommitMessage != nil { + data.Set("CommitMessage", *params.CommitMessage) } + if params != nil && params.Definition != nil { + v, err := json.Marshal(params.Definition) - data.Set("Definition", fmt.Sprint(v)) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) -} + if err != nil { + return nil, err + } + data.Set("Definition", fmt.Sprint(v)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &StudioV2Flow{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &StudioV2Flow{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -151,49 +151,45 @@ func (c *DefaultApiService) CreateFlow(params *CreateFlowParams) (*StudioV2Flow, * Delete the Execution and all Steps relating to it. * @param FlowSid The SID of the Flow with the Execution resources to delete. * @param Sid The SID of the Execution resource to delete. -*/ -func (c *DefaultApiService) DeleteExecution(FlowSid string, Sid string, ) (error) { - path := "/v2/Flows/{FlowSid}/Executions/{Sid}" + */ +func (c *DefaultApiService) DeleteExecution(FlowSid string, Sid string) error { + path := "/v2/Flows/{FlowSid}/Executions/{Sid}" path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* * DeleteFlow Method for DeleteFlow * Delete a specific Flow. * @param Sid The SID of the Flow resource to delete. -*/ -func (c *DefaultApiService) DeleteFlow(Sid string, ) (error) { - path := "/v2/Flows/{Sid}" + */ +func (c *DefaultApiService) DeleteFlow(Sid string) error { + path := "/v2/Flows/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -202,30 +198,28 @@ func (c *DefaultApiService) DeleteFlow(Sid string, ) (error) { * @param FlowSid The SID of the Flow with the Execution resource to fetch * @param Sid The SID of the Execution resource to fetch. * @return StudioV2FlowExecution -*/ -func (c *DefaultApiService) FetchExecution(FlowSid string, Sid string, ) (*StudioV2FlowExecution, error) { - path := "/v2/Flows/{FlowSid}/Executions/{Sid}" + */ +func (c *DefaultApiService) FetchExecution(FlowSid string, Sid string) (*StudioV2FlowExecution, error) { + path := "/v2/Flows/{FlowSid}/Executions/{Sid}" path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &StudioV2FlowExecution{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &StudioV2FlowExecution{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -234,30 +228,28 @@ func (c *DefaultApiService) FetchExecution(FlowSid string, Sid string, ) (*Studi * @param FlowSid The SID of the Flow with the Execution context to fetch. * @param ExecutionSid The SID of the Execution context to fetch. * @return StudioV2FlowExecutionExecutionContext -*/ -func (c *DefaultApiService) FetchExecutionContext(FlowSid string, ExecutionSid string, ) (*StudioV2FlowExecutionExecutionContext, error) { - path := "/v2/Flows/{FlowSid}/Executions/{ExecutionSid}/Context" + */ +func (c *DefaultApiService) FetchExecutionContext(FlowSid string, ExecutionSid string) (*StudioV2FlowExecutionExecutionContext, error) { + path := "/v2/Flows/{FlowSid}/Executions/{ExecutionSid}/Context" path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) path = strings.Replace(path, "{"+"ExecutionSid"+"}", ExecutionSid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &StudioV2FlowExecutionExecutionContext{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &StudioV2FlowExecutionExecutionContext{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -267,31 +259,29 @@ func (c *DefaultApiService) FetchExecutionContext(FlowSid string, ExecutionSid s * @param ExecutionSid The SID of the Execution resource with the Step to fetch. * @param Sid The SID of the ExecutionStep resource to fetch. * @return StudioV2FlowExecutionExecutionStep -*/ -func (c *DefaultApiService) FetchExecutionStep(FlowSid string, ExecutionSid string, Sid string, ) (*StudioV2FlowExecutionExecutionStep, error) { - path := "/v2/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps/{Sid}" + */ +func (c *DefaultApiService) FetchExecutionStep(FlowSid string, ExecutionSid string, Sid string) (*StudioV2FlowExecutionExecutionStep, error) { + path := "/v2/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps/{Sid}" path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) path = strings.Replace(path, "{"+"ExecutionSid"+"}", ExecutionSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &StudioV2FlowExecutionExecutionStep{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &StudioV2FlowExecutionExecutionStep{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -301,31 +291,29 @@ func (c *DefaultApiService) FetchExecutionStep(FlowSid string, ExecutionSid stri * @param ExecutionSid The SID of the Execution resource with the Step to fetch. * @param StepSid The SID of the Step to fetch. * @return StudioV2FlowExecutionExecutionStepExecutionStepContext -*/ -func (c *DefaultApiService) FetchExecutionStepContext(FlowSid string, ExecutionSid string, StepSid string, ) (*StudioV2FlowExecutionExecutionStepExecutionStepContext, error) { - path := "/v2/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps/{StepSid}/Context" + */ +func (c *DefaultApiService) FetchExecutionStepContext(FlowSid string, ExecutionSid string, StepSid string) (*StudioV2FlowExecutionExecutionStepExecutionStepContext, error) { + path := "/v2/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps/{StepSid}/Context" path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) path = strings.Replace(path, "{"+"ExecutionSid"+"}", ExecutionSid, -1) path = strings.Replace(path, "{"+"StepSid"+"}", StepSid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &StudioV2FlowExecutionExecutionStepExecutionStepContext{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &StudioV2FlowExecutionExecutionStepExecutionStepContext{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -333,29 +321,27 @@ func (c *DefaultApiService) FetchExecutionStepContext(FlowSid string, ExecutionS * Retrieve a specific Flow. * @param Sid The SID of the Flow resource to fetch. * @return StudioV2Flow -*/ -func (c *DefaultApiService) FetchFlow(Sid string, ) (*StudioV2Flow, error) { - path := "/v2/Flows/{Sid}" + */ +func (c *DefaultApiService) FetchFlow(Sid string) (*StudioV2Flow, error) { + path := "/v2/Flows/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &StudioV2Flow{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &StudioV2Flow{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -364,30 +350,28 @@ func (c *DefaultApiService) FetchFlow(Sid string, ) (*StudioV2Flow, error) { * @param Sid The SID of the Flow resource to fetch. * @param Revision Specific Revision number or can be `LatestPublished` and `LatestRevision`. * @return StudioV2FlowFlowRevision -*/ -func (c *DefaultApiService) FetchFlowRevision(Sid string, Revision string, ) (*StudioV2FlowFlowRevision, error) { - path := "/v2/Flows/{Sid}/Revisions/{Revision}" + */ +func (c *DefaultApiService) FetchFlowRevision(Sid string, Revision string) (*StudioV2FlowFlowRevision, error) { + path := "/v2/Flows/{Sid}/Revisions/{Revision}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) path = strings.Replace(path, "{"+"Revision"+"}", Revision, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &StudioV2FlowFlowRevision{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &StudioV2FlowFlowRevision{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -395,35 +379,34 @@ func (c *DefaultApiService) FetchFlowRevision(Sid string, Revision string, ) (*S * Fetch flow test users * @param Sid Unique identifier of the flow. * @return StudioV2FlowTestUser -*/ -func (c *DefaultApiService) FetchTestUser(Sid string, ) (*StudioV2FlowTestUser, error) { - path := "/v2/Flows/{Sid}/TestUsers" + */ +func (c *DefaultApiService) FetchTestUser(Sid string) (*StudioV2FlowTestUser, error) { + path := "/v2/Flows/{Sid}/TestUsers" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &StudioV2FlowTestUser{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &StudioV2FlowTestUser{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListExecutionParams Optional parameters for the method 'ListExecution' type ListExecutionParams struct { DateCreatedFrom *time.Time `json:"DateCreatedFrom,omitempty"` - DateCreatedTo *time.Time `json:"DateCreatedTo,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + DateCreatedTo *time.Time `json:"DateCreatedTo,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -435,39 +418,39 @@ type ListExecutionParams struct { * @param "DateCreatedTo" (time.Time) - Only show Execution resources starting before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time, given as `YYYY-MM-DDThh:mm:ss-hh:mm`. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListExecutionResponse -*/ + */ func (c *DefaultApiService) ListExecution(FlowSid string, params *ListExecutionParams) (*ListExecutionResponse, error) { - path := "/v2/Flows/{FlowSid}/Executions" + path := "/v2/Flows/{FlowSid}/Executions" path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.DateCreatedFrom != nil { - data.Set("DateCreatedFrom", fmt.Sprint(*params.DateCreatedFrom)) -} - if params != nil && params.DateCreatedTo != nil { - data.Set("DateCreatedTo", fmt.Sprint(*params.DateCreatedTo)) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.DateCreatedFrom != nil { + data.Set("DateCreatedFrom", fmt.Sprint(*params.DateCreatedFrom)) + } + if params != nil && params.DateCreatedTo != nil { + data.Set("DateCreatedTo", fmt.Sprint(*params.DateCreatedTo)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListExecutionResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListExecutionResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListExecutionStepParams Optional parameters for the method 'ListExecutionStep' type ListExecutionStepParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -481,34 +464,34 @@ type ListExecutionStepParams struct { * @param optional nil or *ListExecutionStepParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListExecutionStepResponse -*/ + */ func (c *DefaultApiService) ListExecutionStep(FlowSid string, ExecutionSid string, params *ListExecutionStepParams) (*ListExecutionStepResponse, error) { - path := "/v2/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps" + path := "/v2/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps" path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) path = strings.Replace(path, "{"+"ExecutionSid"+"}", ExecutionSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListExecutionStepResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListExecutionStepResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListFlowParams Optional parameters for the method 'ListFlow' type ListFlowParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -520,32 +503,32 @@ type ListFlowParams struct { * @param optional nil or *ListFlowParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListFlowResponse -*/ + */ func (c *DefaultApiService) ListFlow(params *ListFlowParams) (*ListFlowResponse, error) { - path := "/v2/Flows" - - data := url.Values{} - headers := 0 + path := "/v2/Flows" - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListFlowResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListFlowResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListFlowRevisionParams Optional parameters for the method 'ListFlowRevision' type ListFlowRevisionParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -558,33 +541,33 @@ type ListFlowRevisionParams struct { * @param optional nil or *ListFlowRevisionParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListFlowRevisionResponse -*/ + */ func (c *DefaultApiService) ListFlowRevision(Sid string, params *ListFlowRevisionParams) (*ListFlowRevisionResponse, error) { - path := "/v2/Flows/{Sid}/Revisions" + path := "/v2/Flows/{Sid}/Revisions" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListFlowRevisionResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListFlowRevisionResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateExecutionParams Optional parameters for the method 'UpdateExecution' type UpdateExecutionParams struct { Status *string `json:"Status,omitempty"` @@ -598,40 +581,40 @@ type UpdateExecutionParams struct { * @param optional nil or *UpdateExecutionParams - Optional Parameters: * @param "Status" (string) - The status of the Execution. Can only be `ended`. * @return StudioV2FlowExecution -*/ + */ func (c *DefaultApiService) UpdateExecution(FlowSid string, Sid string, params *UpdateExecutionParams) (*StudioV2FlowExecution, error) { - path := "/v2/Flows/{FlowSid}/Executions/{Sid}" + path := "/v2/Flows/{FlowSid}/Executions/{Sid}" path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) -} + data := url.Values{} + headers := 0 + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &StudioV2FlowExecution{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &StudioV2FlowExecution{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateFlowParams Optional parameters for the method 'UpdateFlow' type UpdateFlowParams struct { - CommitMessage *string `json:"CommitMessage,omitempty"` - Definition *map[string]interface{} `json:"Definition,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Status *string `json:"Status,omitempty"` + CommitMessage *string `json:"CommitMessage,omitempty"` + Definition *map[string]interface{} `json:"Definition,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Status *string `json:"Status,omitempty"` } /* @@ -644,54 +627,54 @@ type UpdateFlowParams struct { * @param "FriendlyName" (string) - The string that you assigned to describe the Flow. * @param "Status" (string) - The status of the Flow. Can be: `draft` or `published`. * @return StudioV2Flow -*/ + */ func (c *DefaultApiService) UpdateFlow(Sid string, params *UpdateFlowParams) (*StudioV2Flow, error) { - path := "/v2/Flows/{Sid}" + path := "/v2/Flows/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.CommitMessage != nil { - data.Set("CommitMessage", *params.CommitMessage) -} - if params != nil && params.Definition != nil { - v, err := json.Marshal(params.Definition) + data := url.Values{} + headers := 0 - if err != nil { - return nil, err + if params != nil && params.CommitMessage != nil { + data.Set("CommitMessage", *params.CommitMessage) } + if params != nil && params.Definition != nil { + v, err := json.Marshal(params.Definition) - data.Set("Definition", fmt.Sprint(v)) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) -} + if err != nil { + return nil, err + } + data.Set("Definition", fmt.Sprint(v)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &StudioV2Flow{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &StudioV2Flow{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateFlowValidateParams Optional parameters for the method 'UpdateFlowValidate' type UpdateFlowValidateParams struct { - CommitMessage *string `json:"CommitMessage,omitempty"` - Definition *map[string]interface{} `json:"Definition,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Status *string `json:"Status,omitempty"` + CommitMessage *string `json:"CommitMessage,omitempty"` + Definition *map[string]interface{} `json:"Definition,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Status *string `json:"Status,omitempty"` } /* @@ -703,47 +686,47 @@ type UpdateFlowValidateParams struct { * @param "FriendlyName" (string) - The string that you assigned to describe the Flow. * @param "Status" (string) - The status of the Flow. Can be: `draft` or `published`. * @return StudioV2FlowValidate -*/ + */ func (c *DefaultApiService) UpdateFlowValidate(params *UpdateFlowValidateParams) (*StudioV2FlowValidate, error) { - path := "/v2/Flows/Validate" - - data := url.Values{} - headers := 0 + path := "/v2/Flows/Validate" - if params != nil && params.CommitMessage != nil { - data.Set("CommitMessage", *params.CommitMessage) -} - if params != nil && params.Definition != nil { - v, err := json.Marshal(params.Definition) + data := url.Values{} + headers := 0 - if err != nil { - return nil, err + if params != nil && params.CommitMessage != nil { + data.Set("CommitMessage", *params.CommitMessage) } + if params != nil && params.Definition != nil { + v, err := json.Marshal(params.Definition) - data.Set("Definition", fmt.Sprint(v)) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) -} + if err != nil { + return nil, err + } + data.Set("Definition", fmt.Sprint(v)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &StudioV2FlowValidate{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &StudioV2FlowValidate{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateTestUserParams Optional parameters for the method 'UpdateTestUser' type UpdateTestUserParams struct { TestUsers *[]string `json:"TestUsers,omitempty"` @@ -756,30 +739,29 @@ type UpdateTestUserParams struct { * @param optional nil or *UpdateTestUserParams - Optional Parameters: * @param "TestUsers" ([]string) - List of test user identities that can test draft versions of the flow. * @return StudioV2FlowTestUser -*/ + */ func (c *DefaultApiService) UpdateTestUser(Sid string, params *UpdateTestUserParams) (*StudioV2FlowTestUser, error) { - path := "/v2/Flows/{Sid}/TestUsers" + path := "/v2/Flows/{Sid}/TestUsers" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.TestUsers != nil { - data.Set("TestUsers", strings.Join(*params.TestUsers, ",")) -} + data := url.Values{} + headers := 0 + if params != nil && params.TestUsers != nil { + data.Set("TestUsers", strings.Join(*params.TestUsers, ",")) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &StudioV2FlowTestUser{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &StudioV2FlowTestUser{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } diff --git a/twilio/rest/studio/v2/model_list_execution_response.go b/twilio/rest/studio/v2/model_list_execution_response.go index f361ba428..61126ffa8 100644 --- a/twilio/rest/studio/v2/model_list_execution_response.go +++ b/twilio/rest/studio/v2/model_list_execution_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Studio - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListExecutionResponse struct for ListExecutionResponse type ListExecutionResponse struct { Executions []StudioV2FlowExecution `json:"Executions,omitempty"` - Meta ListFlowResponseMeta `json:"Meta,omitempty"` + Meta ListFlowResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/studio/v2/model_list_execution_step_response.go b/twilio/rest/studio/v2/model_list_execution_step_response.go index 4cccb2756..72b346f2e 100644 --- a/twilio/rest/studio/v2/model_list_execution_step_response.go +++ b/twilio/rest/studio/v2/model_list_execution_step_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Studio - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListExecutionStepResponse struct for ListExecutionStepResponse type ListExecutionStepResponse struct { - Meta ListFlowResponseMeta `json:"Meta,omitempty"` + Meta ListFlowResponseMeta `json:"Meta,omitempty"` Steps []StudioV2FlowExecutionExecutionStep `json:"Steps,omitempty"` } diff --git a/twilio/rest/studio/v2/model_list_flow_response.go b/twilio/rest/studio/v2/model_list_flow_response.go index f4831fe0e..5f92f613c 100644 --- a/twilio/rest/studio/v2/model_list_flow_response.go +++ b/twilio/rest/studio/v2/model_list_flow_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Studio - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListFlowResponse struct for ListFlowResponse type ListFlowResponse struct { - Flows []StudioV2Flow `json:"Flows,omitempty"` - Meta ListFlowResponseMeta `json:"Meta,omitempty"` + Flows []StudioV2Flow `json:"Flows,omitempty"` + Meta ListFlowResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/studio/v2/model_list_flow_response_meta.go b/twilio/rest/studio/v2/model_list_flow_response_meta.go index 5a4c17878..17cc8ee47 100644 --- a/twilio/rest/studio/v2/model_list_flow_response_meta.go +++ b/twilio/rest/studio/v2/model_list_flow_response_meta.go @@ -1,22 +1,23 @@ /* - * Twilio - Studio - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListFlowResponseMeta struct for ListFlowResponseMeta type ListFlowResponseMeta struct { - FirstPageUrl string `json:"FirstPageUrl,omitempty"` - Key string `json:"Key,omitempty"` - NextPageUrl string `json:"NextPageUrl,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` - Url string `json:"Url,omitempty"` + Url string `json:"Url,omitempty"` } diff --git a/twilio/rest/studio/v2/model_list_flow_revision_response.go b/twilio/rest/studio/v2/model_list_flow_revision_response.go index 890432a56..f1916fd6e 100644 --- a/twilio/rest/studio/v2/model_list_flow_revision_response.go +++ b/twilio/rest/studio/v2/model_list_flow_revision_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Studio - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListFlowRevisionResponse struct for ListFlowRevisionResponse type ListFlowRevisionResponse struct { - Meta ListFlowResponseMeta `json:"Meta,omitempty"` + Meta ListFlowResponseMeta `json:"Meta,omitempty"` Revisions []StudioV2FlowFlowRevision `json:"Revisions,omitempty"` } diff --git a/twilio/rest/studio/v2/model_studio_v2_flow.go b/twilio/rest/studio/v2/model_studio_v2_flow.go index 69dee9783..b5a82970b 100644 --- a/twilio/rest/studio/v2/model_studio_v2_flow.go +++ b/twilio/rest/studio/v2/model_studio_v2_flow.go @@ -1,18 +1,20 @@ /* - * Twilio - Studio - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // StudioV2Flow struct for StudioV2Flow type StudioV2Flow struct { // The SID of the Account that created the resource @@ -42,6 +44,6 @@ type StudioV2Flow struct { // Boolean if the flow definition is valid Valid *bool `json:"Valid,omitempty"` // List of warnings in the flow definition - Warnings *[]map[string]interface{} `json:"Warnings,omitempty"` - WebhookUrl *string `json:"WebhookUrl,omitempty"` + Warnings *[]map[string]interface{} `json:"Warnings,omitempty"` + WebhookUrl *string `json:"WebhookUrl,omitempty"` } diff --git a/twilio/rest/studio/v2/model_studio_v2_flow_execution.go b/twilio/rest/studio/v2/model_studio_v2_flow_execution.go index 4320c6f4d..894df521b 100644 --- a/twilio/rest/studio/v2/model_studio_v2_flow_execution.go +++ b/twilio/rest/studio/v2/model_studio_v2_flow_execution.go @@ -1,18 +1,20 @@ /* - * Twilio - Studio - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // StudioV2FlowExecution struct for StudioV2FlowExecution type StudioV2FlowExecution struct { // The SID of the Account that created the resource diff --git a/twilio/rest/studio/v2/model_studio_v2_flow_execution_execution_context.go b/twilio/rest/studio/v2/model_studio_v2_flow_execution_execution_context.go index de3a4a1a2..3d74c5537 100644 --- a/twilio/rest/studio/v2/model_studio_v2_flow_execution_execution_context.go +++ b/twilio/rest/studio/v2/model_studio_v2_flow_execution_execution_context.go @@ -1,15 +1,16 @@ /* - * Twilio - Studio - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // StudioV2FlowExecutionExecutionContext struct for StudioV2FlowExecutionExecutionContext type StudioV2FlowExecutionExecutionContext struct { // The SID of the Account that created the resource diff --git a/twilio/rest/studio/v2/model_studio_v2_flow_execution_execution_step.go b/twilio/rest/studio/v2/model_studio_v2_flow_execution_execution_step.go index a8596816f..307f7c077 100644 --- a/twilio/rest/studio/v2/model_studio_v2_flow_execution_execution_step.go +++ b/twilio/rest/studio/v2/model_studio_v2_flow_execution_execution_step.go @@ -1,18 +1,20 @@ /* - * Twilio - Studio - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // StudioV2FlowExecutionExecutionStep struct for StudioV2FlowExecutionExecutionStep type StudioV2FlowExecutionExecutionStep struct { // The SID of the Account that created the resource diff --git a/twilio/rest/studio/v2/model_studio_v2_flow_execution_execution_step_execution_step_context.go b/twilio/rest/studio/v2/model_studio_v2_flow_execution_execution_step_execution_step_context.go index 350509f77..bc4aff514 100644 --- a/twilio/rest/studio/v2/model_studio_v2_flow_execution_execution_step_execution_step_context.go +++ b/twilio/rest/studio/v2/model_studio_v2_flow_execution_execution_step_execution_step_context.go @@ -1,15 +1,16 @@ /* - * Twilio - Studio - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // StudioV2FlowExecutionExecutionStepExecutionStepContext struct for StudioV2FlowExecutionExecutionStepExecutionStepContext type StudioV2FlowExecutionExecutionStepExecutionStepContext struct { // The SID of the Account that created the resource diff --git a/twilio/rest/studio/v2/model_studio_v2_flow_flow_revision.go b/twilio/rest/studio/v2/model_studio_v2_flow_flow_revision.go index 1b07169e3..3a5d305de 100644 --- a/twilio/rest/studio/v2/model_studio_v2_flow_flow_revision.go +++ b/twilio/rest/studio/v2/model_studio_v2_flow_flow_revision.go @@ -1,18 +1,20 @@ /* - * Twilio - Studio - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // StudioV2FlowFlowRevision struct for StudioV2FlowFlowRevision type StudioV2FlowFlowRevision struct { // The SID of the Account that created the resource diff --git a/twilio/rest/studio/v2/model_studio_v2_flow_test_user.go b/twilio/rest/studio/v2/model_studio_v2_flow_test_user.go index bd5f6e85f..efa0a555a 100644 --- a/twilio/rest/studio/v2/model_studio_v2_flow_test_user.go +++ b/twilio/rest/studio/v2/model_studio_v2_flow_test_user.go @@ -1,15 +1,16 @@ /* - * Twilio - Studio - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // StudioV2FlowTestUser struct for StudioV2FlowTestUser type StudioV2FlowTestUser struct { // Unique identifier of the flow. diff --git a/twilio/rest/studio/v2/model_studio_v2_flow_validate.go b/twilio/rest/studio/v2/model_studio_v2_flow_validate.go index 739df7c72..efad64eb0 100644 --- a/twilio/rest/studio/v2/model_studio_v2_flow_validate.go +++ b/twilio/rest/studio/v2/model_studio_v2_flow_validate.go @@ -1,15 +1,16 @@ /* - * Twilio - Studio - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // StudioV2FlowValidate struct for StudioV2FlowValidate type StudioV2FlowValidate struct { // Boolean if the flow definition is valid diff --git a/twilio/rest/supersim/v1/api_default.go b/twilio/rest/supersim/v1/api_default.go index 0e67e011c..9f9038e53 100644 --- a/twilio/rest/supersim/v1/api_default.go +++ b/twilio/rest/supersim/v1/api_default.go @@ -1,11 +1,11 @@ /* - * Twilio - Supersim - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Supersim + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,10 +14,11 @@ package openapi import ( "encoding/json" "fmt" - twilio "github.com/twilio/twilio-go/client" "net/url" - "strings" - "time" + "strings" + "time" + + twilio "github.com/twilio/twilio-go/client" ) type DefaultApiService struct { @@ -26,8 +27,8 @@ type DefaultApiService struct { } func NewDefaultApiService(client *twilio.Client) *DefaultApiService { - return &DefaultApiService { - client: client, + return &DefaultApiService{ + client: client, baseURL: "https://supersim.twilio.com", } } @@ -35,9 +36,9 @@ func NewDefaultApiService(client *twilio.Client) *DefaultApiService { // CreateCommandParams Optional parameters for the method 'CreateCommand' type CreateCommandParams struct { CallbackMethod *string `json:"CallbackMethod,omitempty"` - CallbackUrl *string `json:"CallbackUrl,omitempty"` - Command *string `json:"Command,omitempty"` - Sim *string `json:"Sim,omitempty"` + CallbackUrl *string `json:"CallbackUrl,omitempty"` + Command *string `json:"Command,omitempty"` + Sim *string `json:"Sim,omitempty"` } /* @@ -49,50 +50,50 @@ type CreateCommandParams struct { * @param "Command" (string) - The message body of the command. * @param "Sim" (string) - The `sid` or `unique_name` of the [SIM](https://www.twilio.com/docs/wireless/api/sim-resource) to send the Command to. * @return SupersimV1Command -*/ + */ func (c *DefaultApiService) CreateCommand(params *CreateCommandParams) (*SupersimV1Command, error) { - path := "/v1/Commands" + path := "/v1/Commands" - data := url.Values{} - headers := 0 - - if params != nil && params.CallbackMethod != nil { - data.Set("CallbackMethod", *params.CallbackMethod) -} - if params != nil && params.CallbackUrl != nil { - data.Set("CallbackUrl", *params.CallbackUrl) -} - if params != nil && params.Command != nil { - data.Set("Command", *params.Command) -} - if params != nil && params.Sim != nil { - data.Set("Sim", *params.Sim) -} + data := url.Values{} + headers := 0 + if params != nil && params.CallbackMethod != nil { + data.Set("CallbackMethod", *params.CallbackMethod) + } + if params != nil && params.CallbackUrl != nil { + data.Set("CallbackUrl", *params.CallbackUrl) + } + if params != nil && params.Command != nil { + data.Set("Command", *params.Command) + } + if params != nil && params.Sim != nil { + data.Set("Sim", *params.Sim) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &SupersimV1Command{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &SupersimV1Command{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateFleetParams Optional parameters for the method 'CreateFleet' type CreateFleetParams struct { - CommandsEnabled *bool `json:"CommandsEnabled,omitempty"` - CommandsMethod *string `json:"CommandsMethod,omitempty"` - CommandsUrl *string `json:"CommandsUrl,omitempty"` - DataEnabled *bool `json:"DataEnabled,omitempty"` - DataLimit *int32 `json:"DataLimit,omitempty"` + CommandsEnabled *bool `json:"CommandsEnabled,omitempty"` + CommandsMethod *string `json:"CommandsMethod,omitempty"` + CommandsUrl *string `json:"CommandsUrl,omitempty"` + DataEnabled *bool `json:"DataEnabled,omitempty"` + DataLimit *int32 `json:"DataLimit,omitempty"` NetworkAccessProfile *string `json:"NetworkAccessProfile,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` } /* @@ -107,54 +108,54 @@ type CreateFleetParams struct { * @param "NetworkAccessProfile" (string) - The SID or unique name of the Network Access Profile that will control which cellular networks the Fleet's SIMs can connect to. * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. It can be used in place of the resource's `sid` in the URL to address the resource. * @return SupersimV1Fleet -*/ + */ func (c *DefaultApiService) CreateFleet(params *CreateFleetParams) (*SupersimV1Fleet, error) { - path := "/v1/Fleets" + path := "/v1/Fleets" - data := url.Values{} - headers := 0 - - if params != nil && params.CommandsEnabled != nil { - data.Set("CommandsEnabled", fmt.Sprint(*params.CommandsEnabled)) -} - if params != nil && params.CommandsMethod != nil { - data.Set("CommandsMethod", *params.CommandsMethod) -} - if params != nil && params.CommandsUrl != nil { - data.Set("CommandsUrl", *params.CommandsUrl) -} - if params != nil && params.DataEnabled != nil { - data.Set("DataEnabled", fmt.Sprint(*params.DataEnabled)) -} - if params != nil && params.DataLimit != nil { - data.Set("DataLimit", fmt.Sprint(*params.DataLimit)) -} - if params != nil && params.NetworkAccessProfile != nil { - data.Set("NetworkAccessProfile", *params.NetworkAccessProfile) -} - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) -} + data := url.Values{} + headers := 0 + if params != nil && params.CommandsEnabled != nil { + data.Set("CommandsEnabled", fmt.Sprint(*params.CommandsEnabled)) + } + if params != nil && params.CommandsMethod != nil { + data.Set("CommandsMethod", *params.CommandsMethod) + } + if params != nil && params.CommandsUrl != nil { + data.Set("CommandsUrl", *params.CommandsUrl) + } + if params != nil && params.DataEnabled != nil { + data.Set("DataEnabled", fmt.Sprint(*params.DataEnabled)) + } + if params != nil && params.DataLimit != nil { + data.Set("DataLimit", fmt.Sprint(*params.DataLimit)) + } + if params != nil && params.NetworkAccessProfile != nil { + data.Set("NetworkAccessProfile", *params.NetworkAccessProfile) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &SupersimV1Fleet{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &SupersimV1Fleet{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateNetworkAccessProfileParams Optional parameters for the method 'CreateNetworkAccessProfile' type CreateNetworkAccessProfileParams struct { - Networks *[]string `json:"Networks,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + Networks *[]string `json:"Networks,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` } /* @@ -164,35 +165,35 @@ type CreateNetworkAccessProfileParams struct { * @param "Networks" ([]string) - List of Network SIDs that this Network Access Profile will allow connections to. * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. It can be used in place of the resource's `sid` in the URL to address the resource. * @return SupersimV1NetworkAccessProfile -*/ + */ func (c *DefaultApiService) CreateNetworkAccessProfile(params *CreateNetworkAccessProfileParams) (*SupersimV1NetworkAccessProfile, error) { - path := "/v1/NetworkAccessProfiles" - - data := url.Values{} - headers := 0 + path := "/v1/NetworkAccessProfiles" - if params != nil && params.Networks != nil { - data.Set("Networks", strings.Join(*params.Networks, ",")) -} - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) -} + data := url.Values{} + headers := 0 + if params != nil && params.Networks != nil { + data.Set("Networks", strings.Join(*params.Networks, ",")) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &SupersimV1NetworkAccessProfile{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &SupersimV1NetworkAccessProfile{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateNetworkAccessProfileNetworkParams Optional parameters for the method 'CreateNetworkAccessProfileNetwork' type CreateNetworkAccessProfileNetworkParams struct { Network *string `json:"Network,omitempty"` @@ -205,32 +206,31 @@ type CreateNetworkAccessProfileNetworkParams struct { * @param optional nil or *CreateNetworkAccessProfileNetworkParams - Optional Parameters: * @param "Network" (string) - The SID of the Network resource to be added to the Network Access Profile resource. * @return SupersimV1NetworkAccessProfileNetworkAccessProfileNetwork -*/ + */ func (c *DefaultApiService) CreateNetworkAccessProfileNetwork(NetworkAccessProfileSid string, params *CreateNetworkAccessProfileNetworkParams) (*SupersimV1NetworkAccessProfileNetworkAccessProfileNetwork, error) { - path := "/v1/NetworkAccessProfiles/{NetworkAccessProfileSid}/Networks" + path := "/v1/NetworkAccessProfiles/{NetworkAccessProfileSid}/Networks" path = strings.Replace(path, "{"+"NetworkAccessProfileSid"+"}", NetworkAccessProfileSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Network != nil { - data.Set("Network", *params.Network) -} + data := url.Values{} + headers := 0 + if params != nil && params.Network != nil { + data.Set("Network", *params.Network) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &SupersimV1NetworkAccessProfileNetworkAccessProfileNetwork{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &SupersimV1NetworkAccessProfileNetworkAccessProfileNetwork{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -238,25 +238,23 @@ func (c *DefaultApiService) CreateNetworkAccessProfileNetwork(NetworkAccessProfi * Remove a Network resource from the Network Access Profile resource's. * @param NetworkAccessProfileSid The unique string that identifies the Network Access Profile resource. * @param Sid The SID of the Network resource to be removed from the Network Access Profile resource. -*/ -func (c *DefaultApiService) DeleteNetworkAccessProfileNetwork(NetworkAccessProfileSid string, Sid string, ) (error) { - path := "/v1/NetworkAccessProfiles/{NetworkAccessProfileSid}/Networks/{Sid}" + */ +func (c *DefaultApiService) DeleteNetworkAccessProfileNetwork(NetworkAccessProfileSid string, Sid string) error { + path := "/v1/NetworkAccessProfiles/{NetworkAccessProfileSid}/Networks/{Sid}" path = strings.Replace(path, "{"+"NetworkAccessProfileSid"+"}", NetworkAccessProfileSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -264,29 +262,27 @@ func (c *DefaultApiService) DeleteNetworkAccessProfileNetwork(NetworkAccessProfi * Fetch a Command instance from your account. * @param Sid The SID of the Command resource to fetch. * @return SupersimV1Command -*/ -func (c *DefaultApiService) FetchCommand(Sid string, ) (*SupersimV1Command, error) { - path := "/v1/Commands/{Sid}" + */ +func (c *DefaultApiService) FetchCommand(Sid string) (*SupersimV1Command, error) { + path := "/v1/Commands/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &SupersimV1Command{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &SupersimV1Command{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -294,29 +290,27 @@ func (c *DefaultApiService) FetchCommand(Sid string, ) (*SupersimV1Command, erro * Fetch a Fleet instance from your account. * @param Sid The SID of the Fleet resource to fetch. * @return SupersimV1Fleet -*/ -func (c *DefaultApiService) FetchFleet(Sid string, ) (*SupersimV1Fleet, error) { - path := "/v1/Fleets/{Sid}" + */ +func (c *DefaultApiService) FetchFleet(Sid string) (*SupersimV1Fleet, error) { + path := "/v1/Fleets/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &SupersimV1Fleet{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &SupersimV1Fleet{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -324,29 +318,27 @@ func (c *DefaultApiService) FetchFleet(Sid string, ) (*SupersimV1Fleet, error) { * Fetch a Network resource. * @param Sid The SID of the Network resource to fetch. * @return SupersimV1Network -*/ -func (c *DefaultApiService) FetchNetwork(Sid string, ) (*SupersimV1Network, error) { - path := "/v1/Networks/{Sid}" + */ +func (c *DefaultApiService) FetchNetwork(Sid string) (*SupersimV1Network, error) { + path := "/v1/Networks/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &SupersimV1Network{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &SupersimV1Network{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -354,29 +346,27 @@ func (c *DefaultApiService) FetchNetwork(Sid string, ) (*SupersimV1Network, erro * Fetch a Network Access Profile instance from your account. * @param Sid The SID of the Network Access Profile resource to fetch. * @return SupersimV1NetworkAccessProfile -*/ -func (c *DefaultApiService) FetchNetworkAccessProfile(Sid string, ) (*SupersimV1NetworkAccessProfile, error) { - path := "/v1/NetworkAccessProfiles/{Sid}" + */ +func (c *DefaultApiService) FetchNetworkAccessProfile(Sid string) (*SupersimV1NetworkAccessProfile, error) { + path := "/v1/NetworkAccessProfiles/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &SupersimV1NetworkAccessProfile{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &SupersimV1NetworkAccessProfile{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -385,30 +375,28 @@ func (c *DefaultApiService) FetchNetworkAccessProfile(Sid string, ) (*SupersimV1 * @param NetworkAccessProfileSid The unique string that identifies the Network Access Profile resource. * @param Sid The SID of the Network resource to fetch. * @return SupersimV1NetworkAccessProfileNetworkAccessProfileNetwork -*/ -func (c *DefaultApiService) FetchNetworkAccessProfileNetwork(NetworkAccessProfileSid string, Sid string, ) (*SupersimV1NetworkAccessProfileNetworkAccessProfileNetwork, error) { - path := "/v1/NetworkAccessProfiles/{NetworkAccessProfileSid}/Networks/{Sid}" + */ +func (c *DefaultApiService) FetchNetworkAccessProfileNetwork(NetworkAccessProfileSid string, Sid string) (*SupersimV1NetworkAccessProfileNetworkAccessProfileNetwork, error) { + path := "/v1/NetworkAccessProfiles/{NetworkAccessProfileSid}/Networks/{Sid}" path = strings.Replace(path, "{"+"NetworkAccessProfileSid"+"}", NetworkAccessProfileSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &SupersimV1NetworkAccessProfileNetworkAccessProfileNetwork{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &SupersimV1NetworkAccessProfileNetworkAccessProfileNetwork{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -416,36 +404,35 @@ func (c *DefaultApiService) FetchNetworkAccessProfileNetwork(NetworkAccessProfil * Fetch a Super SIM instance from your account. * @param Sid The SID of the Sim resource to fetch. * @return SupersimV1Sim -*/ -func (c *DefaultApiService) FetchSim(Sid string, ) (*SupersimV1Sim, error) { - path := "/v1/Sims/{Sid}" + */ +func (c *DefaultApiService) FetchSim(Sid string) (*SupersimV1Sim, error) { + path := "/v1/Sims/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &SupersimV1Sim{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &SupersimV1Sim{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListCommandParams Optional parameters for the method 'ListCommand' type ListCommandParams struct { - Sim *string `json:"Sim,omitempty"` - Status *string `json:"Status,omitempty"` + Sim *string `json:"Sim,omitempty"` + Status *string `json:"Status,omitempty"` Direction *string `json:"Direction,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -457,45 +444,45 @@ type ListCommandParams struct { * @param "Direction" (string) - The direction of the Command. Can be `to_sim` or `from_sim`. The value of `to_sim` is synonymous with the term `mobile terminated`, and `from_sim` is synonymous with the term `mobile originated`. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListCommandResponse -*/ + */ func (c *DefaultApiService) ListCommand(params *ListCommandParams) (*ListCommandResponse, error) { - path := "/v1/Commands" + path := "/v1/Commands" - data := url.Values{} - headers := 0 - - if params != nil && params.Sim != nil { - data.Set("Sim", *params.Sim) -} - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) -} - if params != nil && params.Direction != nil { - data.Set("Direction", *params.Direction) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.Sim != nil { + data.Set("Sim", *params.Sim) + } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + if params != nil && params.Direction != nil { + data.Set("Direction", *params.Direction) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListCommandResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListCommandResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListFleetParams Optional parameters for the method 'ListFleet' type ListFleetParams struct { NetworkAccessProfile *string `json:"NetworkAccessProfile,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -505,41 +492,41 @@ type ListFleetParams struct { * @param "NetworkAccessProfile" (string) - The SID or unique name of the Network Access Profile that controls which cellular networks the Fleet's SIMs can connect to. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListFleetResponse -*/ + */ func (c *DefaultApiService) ListFleet(params *ListFleetParams) (*ListFleetResponse, error) { - path := "/v1/Fleets" - - data := url.Values{} - headers := 0 + path := "/v1/Fleets" - if params != nil && params.NetworkAccessProfile != nil { - data.Set("NetworkAccessProfile", *params.NetworkAccessProfile) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.NetworkAccessProfile != nil { + data.Set("NetworkAccessProfile", *params.NetworkAccessProfile) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListFleetResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListFleetResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListNetworkParams Optional parameters for the method 'ListNetwork' type ListNetworkParams struct { IsoCountry *string `json:"IsoCountry,omitempty"` - Mcc *string `json:"Mcc,omitempty"` - Mnc *string `json:"Mnc,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + Mcc *string `json:"Mcc,omitempty"` + Mnc *string `json:"Mnc,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -551,41 +538,41 @@ type ListNetworkParams struct { * @param "Mnc" (string) - The 'mobile network code' of a mobile operator network. Network resources with this `mnc` in their `identifiers` will be read. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListNetworkResponse -*/ + */ func (c *DefaultApiService) ListNetwork(params *ListNetworkParams) (*ListNetworkResponse, error) { - path := "/v1/Networks" + path := "/v1/Networks" - data := url.Values{} - headers := 0 - - if params != nil && params.IsoCountry != nil { - data.Set("IsoCountry", *params.IsoCountry) -} - if params != nil && params.Mcc != nil { - data.Set("Mcc", *params.Mcc) -} - if params != nil && params.Mnc != nil { - data.Set("Mnc", *params.Mnc) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.IsoCountry != nil { + data.Set("IsoCountry", *params.IsoCountry) + } + if params != nil && params.Mcc != nil { + data.Set("Mcc", *params.Mcc) + } + if params != nil && params.Mnc != nil { + data.Set("Mnc", *params.Mnc) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListNetworkResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListNetworkResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListNetworkAccessProfileParams Optional parameters for the method 'ListNetworkAccessProfile' type ListNetworkAccessProfileParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -597,32 +584,32 @@ type ListNetworkAccessProfileParams struct { * @param optional nil or *ListNetworkAccessProfileParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListNetworkAccessProfileResponse -*/ + */ func (c *DefaultApiService) ListNetworkAccessProfile(params *ListNetworkAccessProfileParams) (*ListNetworkAccessProfileResponse, error) { - path := "/v1/NetworkAccessProfiles" + path := "/v1/NetworkAccessProfiles" - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListNetworkAccessProfileResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListNetworkAccessProfileResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListNetworkAccessProfileNetworkParams Optional parameters for the method 'ListNetworkAccessProfileNetwork' type ListNetworkAccessProfileNetworkParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -635,39 +622,39 @@ type ListNetworkAccessProfileNetworkParams struct { * @param optional nil or *ListNetworkAccessProfileNetworkParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListNetworkAccessProfileNetworkResponse -*/ + */ func (c *DefaultApiService) ListNetworkAccessProfileNetwork(NetworkAccessProfileSid string, params *ListNetworkAccessProfileNetworkParams) (*ListNetworkAccessProfileNetworkResponse, error) { - path := "/v1/NetworkAccessProfiles/{NetworkAccessProfileSid}/Networks" + path := "/v1/NetworkAccessProfiles/{NetworkAccessProfileSid}/Networks" path = strings.Replace(path, "{"+"NetworkAccessProfileSid"+"}", NetworkAccessProfileSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListNetworkAccessProfileNetworkResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListNetworkAccessProfileNetworkResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListSimParams Optional parameters for the method 'ListSim' type ListSimParams struct { - Status *string `json:"Status,omitempty"` - Fleet *string `json:"Fleet,omitempty"` - Iccid *string `json:"Iccid,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + Status *string `json:"Status,omitempty"` + Fleet *string `json:"Fleet,omitempty"` + Iccid *string `json:"Iccid,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -679,52 +666,52 @@ type ListSimParams struct { * @param "Iccid" (string) - The [ICCID](https://en.wikipedia.org/wiki/Subscriber_identity_module#ICCID) associated with a Super SIM to filter the list by. Passing this parameter will always return a list containing zero or one SIMs. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListSimResponse -*/ + */ func (c *DefaultApiService) ListSim(params *ListSimParams) (*ListSimResponse, error) { - path := "/v1/Sims" - - data := url.Values{} - headers := 0 + path := "/v1/Sims" - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) -} - if params != nil && params.Fleet != nil { - data.Set("Fleet", *params.Fleet) -} - if params != nil && params.Iccid != nil { - data.Set("Iccid", *params.Iccid) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + if params != nil && params.Fleet != nil { + data.Set("Fleet", *params.Fleet) + } + if params != nil && params.Iccid != nil { + data.Set("Iccid", *params.Iccid) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListSimResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListSimResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListUsageRecordParams Optional parameters for the method 'ListUsageRecord' type ListUsageRecordParams struct { - Sim *string `json:"Sim,omitempty"` - Fleet *string `json:"Fleet,omitempty"` - Network *string `json:"Network,omitempty"` - IsoCountry *string `json:"IsoCountry,omitempty"` - Group *string `json:"Group,omitempty"` - Granularity *string `json:"Granularity,omitempty"` - StartTime *time.Time `json:"StartTime,omitempty"` - EndTime *time.Time `json:"EndTime,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + Sim *string `json:"Sim,omitempty"` + Fleet *string `json:"Fleet,omitempty"` + Network *string `json:"Network,omitempty"` + IsoCountry *string `json:"IsoCountry,omitempty"` + Group *string `json:"Group,omitempty"` + Granularity *string `json:"Granularity,omitempty"` + StartTime *time.Time `json:"StartTime,omitempty"` + EndTime *time.Time `json:"EndTime,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -741,62 +728,62 @@ type ListUsageRecordParams struct { * @param "EndTime" (time.Time) - Only include usage that occurred before this time, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. Default is the current time. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListUsageRecordResponse -*/ + */ func (c *DefaultApiService) ListUsageRecord(params *ListUsageRecordParams) (*ListUsageRecordResponse, error) { - path := "/v1/UsageRecords" - - data := url.Values{} - headers := 0 + path := "/v1/UsageRecords" - if params != nil && params.Sim != nil { - data.Set("Sim", *params.Sim) -} - if params != nil && params.Fleet != nil { - data.Set("Fleet", *params.Fleet) -} - if params != nil && params.Network != nil { - data.Set("Network", *params.Network) -} - if params != nil && params.IsoCountry != nil { - data.Set("IsoCountry", *params.IsoCountry) -} - if params != nil && params.Group != nil { - data.Set("Group", *params.Group) -} - if params != nil && params.Granularity != nil { - data.Set("Granularity", *params.Granularity) -} - if params != nil && params.StartTime != nil { - data.Set("StartTime", fmt.Sprint(*params.StartTime)) -} - if params != nil && params.EndTime != nil { - data.Set("EndTime", fmt.Sprint(*params.EndTime)) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.Sim != nil { + data.Set("Sim", *params.Sim) + } + if params != nil && params.Fleet != nil { + data.Set("Fleet", *params.Fleet) + } + if params != nil && params.Network != nil { + data.Set("Network", *params.Network) + } + if params != nil && params.IsoCountry != nil { + data.Set("IsoCountry", *params.IsoCountry) + } + if params != nil && params.Group != nil { + data.Set("Group", *params.Group) + } + if params != nil && params.Granularity != nil { + data.Set("Granularity", *params.Granularity) + } + if params != nil && params.StartTime != nil { + data.Set("StartTime", fmt.Sprint(*params.StartTime)) + } + if params != nil && params.EndTime != nil { + data.Set("EndTime", fmt.Sprint(*params.EndTime)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListUsageRecordResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListUsageRecordResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateFleetParams Optional parameters for the method 'UpdateFleet' type UpdateFleetParams struct { - CommandsMethod *string `json:"CommandsMethod,omitempty"` - CommandsUrl *string `json:"CommandsUrl,omitempty"` + CommandsMethod *string `json:"CommandsMethod,omitempty"` + CommandsUrl *string `json:"CommandsUrl,omitempty"` NetworkAccessProfile *string `json:"NetworkAccessProfile,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` } /* @@ -809,42 +796,42 @@ type UpdateFleetParams struct { * @param "NetworkAccessProfile" (string) - The SID or unique name of the Network Access Profile that will control which cellular networks the Fleet's SIMs can connect to. * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. It can be used in place of the resource's `sid` in the URL to address the resource. * @return SupersimV1Fleet -*/ + */ func (c *DefaultApiService) UpdateFleet(Sid string, params *UpdateFleetParams) (*SupersimV1Fleet, error) { - path := "/v1/Fleets/{Sid}" + path := "/v1/Fleets/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.CommandsMethod != nil { - data.Set("CommandsMethod", *params.CommandsMethod) -} - if params != nil && params.CommandsUrl != nil { - data.Set("CommandsUrl", *params.CommandsUrl) -} - if params != nil && params.NetworkAccessProfile != nil { - data.Set("NetworkAccessProfile", *params.NetworkAccessProfile) -} - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) -} + data := url.Values{} + headers := 0 + if params != nil && params.CommandsMethod != nil { + data.Set("CommandsMethod", *params.CommandsMethod) + } + if params != nil && params.CommandsUrl != nil { + data.Set("CommandsUrl", *params.CommandsUrl) + } + if params != nil && params.NetworkAccessProfile != nil { + data.Set("NetworkAccessProfile", *params.NetworkAccessProfile) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &SupersimV1Fleet{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &SupersimV1Fleet{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateNetworkAccessProfileParams Optional parameters for the method 'UpdateNetworkAccessProfile' type UpdateNetworkAccessProfileParams struct { UniqueName *string `json:"UniqueName,omitempty"` @@ -857,41 +844,41 @@ type UpdateNetworkAccessProfileParams struct { * @param optional nil or *UpdateNetworkAccessProfileParams - Optional Parameters: * @param "UniqueName" (string) - The new unique name of the Network Access Profile. * @return SupersimV1NetworkAccessProfile -*/ + */ func (c *DefaultApiService) UpdateNetworkAccessProfile(Sid string, params *UpdateNetworkAccessProfileParams) (*SupersimV1NetworkAccessProfile, error) { - path := "/v1/NetworkAccessProfiles/{Sid}" + path := "/v1/NetworkAccessProfiles/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) -} + data := url.Values{} + headers := 0 + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &SupersimV1NetworkAccessProfile{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &SupersimV1NetworkAccessProfile{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateSimParams Optional parameters for the method 'UpdateSim' type UpdateSimParams struct { - AccountSid *string `json:"AccountSid,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` CallbackMethod *string `json:"CallbackMethod,omitempty"` - CallbackUrl *string `json:"CallbackUrl,omitempty"` - Fleet *string `json:"Fleet,omitempty"` - Status *string `json:"Status,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + CallbackUrl *string `json:"CallbackUrl,omitempty"` + Fleet *string `json:"Fleet,omitempty"` + Status *string `json:"Status,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` } /* @@ -906,45 +893,44 @@ type UpdateSimParams struct { * @param "Status" (string) - The new status of the resource. Can be: `ready`, `active`, or `inactive`. See the [Super SIM Status Values](https://www.twilio.com/docs/iot/supersim/api/sim-resource#status-values) for more info. * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. It can be used in place of the resource's `sid` in the URL to address the resource. * @return SupersimV1Sim -*/ + */ func (c *DefaultApiService) UpdateSim(Sid string, params *UpdateSimParams) (*SupersimV1Sim, error) { - path := "/v1/Sims/{Sid}" + path := "/v1/Sims/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.AccountSid != nil { - data.Set("AccountSid", *params.AccountSid) -} - if params != nil && params.CallbackMethod != nil { - data.Set("CallbackMethod", *params.CallbackMethod) -} - if params != nil && params.CallbackUrl != nil { - data.Set("CallbackUrl", *params.CallbackUrl) -} - if params != nil && params.Fleet != nil { - data.Set("Fleet", *params.Fleet) -} - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) -} - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) -} + data := url.Values{} + headers := 0 + if params != nil && params.AccountSid != nil { + data.Set("AccountSid", *params.AccountSid) + } + if params != nil && params.CallbackMethod != nil { + data.Set("CallbackMethod", *params.CallbackMethod) + } + if params != nil && params.CallbackUrl != nil { + data.Set("CallbackUrl", *params.CallbackUrl) + } + if params != nil && params.Fleet != nil { + data.Set("Fleet", *params.Fleet) + } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &SupersimV1Sim{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &SupersimV1Sim{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } diff --git a/twilio/rest/supersim/v1/model_list_command_response.go b/twilio/rest/supersim/v1/model_list_command_response.go index e20f1ecc0..90ca50390 100644 --- a/twilio/rest/supersim/v1/model_list_command_response.go +++ b/twilio/rest/supersim/v1/model_list_command_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Supersim - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Supersim + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListCommandResponse struct for ListCommandResponse type ListCommandResponse struct { - Commands []SupersimV1Command `json:"Commands,omitempty"` - Meta ListCommandResponseMeta `json:"Meta,omitempty"` + Commands []SupersimV1Command `json:"Commands,omitempty"` + Meta ListCommandResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/supersim/v1/model_list_command_response_meta.go b/twilio/rest/supersim/v1/model_list_command_response_meta.go index 9e8bace93..95f5c0556 100644 --- a/twilio/rest/supersim/v1/model_list_command_response_meta.go +++ b/twilio/rest/supersim/v1/model_list_command_response_meta.go @@ -1,22 +1,23 @@ /* - * Twilio - Supersim - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Supersim + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListCommandResponseMeta struct for ListCommandResponseMeta type ListCommandResponseMeta struct { - FirstPageUrl string `json:"FirstPageUrl,omitempty"` - Key string `json:"Key,omitempty"` - NextPageUrl string `json:"NextPageUrl,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` - Url string `json:"Url,omitempty"` + Url string `json:"Url,omitempty"` } diff --git a/twilio/rest/supersim/v1/model_list_fleet_response.go b/twilio/rest/supersim/v1/model_list_fleet_response.go index 23ea363be..f6407a327 100644 --- a/twilio/rest/supersim/v1/model_list_fleet_response.go +++ b/twilio/rest/supersim/v1/model_list_fleet_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Supersim - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Supersim + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListFleetResponse struct for ListFleetResponse type ListFleetResponse struct { - Fleets []SupersimV1Fleet `json:"Fleets,omitempty"` - Meta ListCommandResponseMeta `json:"Meta,omitempty"` + Fleets []SupersimV1Fleet `json:"Fleets,omitempty"` + Meta ListCommandResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/supersim/v1/model_list_network_access_profile_network_response.go b/twilio/rest/supersim/v1/model_list_network_access_profile_network_response.go index 397a93c2b..4a79343d5 100644 --- a/twilio/rest/supersim/v1/model_list_network_access_profile_network_response.go +++ b/twilio/rest/supersim/v1/model_list_network_access_profile_network_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Supersim - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Supersim + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListNetworkAccessProfileNetworkResponse struct for ListNetworkAccessProfileNetworkResponse type ListNetworkAccessProfileNetworkResponse struct { - Meta ListCommandResponseMeta `json:"Meta,omitempty"` + Meta ListCommandResponseMeta `json:"Meta,omitempty"` Networks []SupersimV1NetworkAccessProfileNetworkAccessProfileNetwork `json:"Networks,omitempty"` } diff --git a/twilio/rest/supersim/v1/model_list_network_access_profile_response.go b/twilio/rest/supersim/v1/model_list_network_access_profile_response.go index 60622fdc2..002122a4b 100644 --- a/twilio/rest/supersim/v1/model_list_network_access_profile_response.go +++ b/twilio/rest/supersim/v1/model_list_network_access_profile_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Supersim - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Supersim + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListNetworkAccessProfileResponse struct for ListNetworkAccessProfileResponse type ListNetworkAccessProfileResponse struct { - Meta ListCommandResponseMeta `json:"Meta,omitempty"` + Meta ListCommandResponseMeta `json:"Meta,omitempty"` NetworkAccessProfiles []SupersimV1NetworkAccessProfile `json:"NetworkAccessProfiles,omitempty"` } diff --git a/twilio/rest/supersim/v1/model_list_network_response.go b/twilio/rest/supersim/v1/model_list_network_response.go index 96cac3be4..f46f8ea55 100644 --- a/twilio/rest/supersim/v1/model_list_network_response.go +++ b/twilio/rest/supersim/v1/model_list_network_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Supersim - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Supersim + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListNetworkResponse struct for ListNetworkResponse type ListNetworkResponse struct { - Meta ListCommandResponseMeta `json:"Meta,omitempty"` - Networks []SupersimV1Network `json:"Networks,omitempty"` + Meta ListCommandResponseMeta `json:"Meta,omitempty"` + Networks []SupersimV1Network `json:"Networks,omitempty"` } diff --git a/twilio/rest/supersim/v1/model_list_sim_response.go b/twilio/rest/supersim/v1/model_list_sim_response.go index d0f370ac7..782c498aa 100644 --- a/twilio/rest/supersim/v1/model_list_sim_response.go +++ b/twilio/rest/supersim/v1/model_list_sim_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Supersim - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Supersim + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListSimResponse struct for ListSimResponse type ListSimResponse struct { Meta ListCommandResponseMeta `json:"Meta,omitempty"` - Sims []SupersimV1Sim `json:"Sims,omitempty"` + Sims []SupersimV1Sim `json:"Sims,omitempty"` } diff --git a/twilio/rest/supersim/v1/model_list_usage_record_response.go b/twilio/rest/supersim/v1/model_list_usage_record_response.go index 6edec2166..462991cb6 100644 --- a/twilio/rest/supersim/v1/model_list_usage_record_response.go +++ b/twilio/rest/supersim/v1/model_list_usage_record_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Supersim - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Supersim + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListUsageRecordResponse struct for ListUsageRecordResponse type ListUsageRecordResponse struct { - Meta ListCommandResponseMeta `json:"Meta,omitempty"` + Meta ListCommandResponseMeta `json:"Meta,omitempty"` UsageRecords []SupersimV1UsageRecord `json:"UsageRecords,omitempty"` } diff --git a/twilio/rest/supersim/v1/model_supersim_v1_command.go b/twilio/rest/supersim/v1/model_supersim_v1_command.go index 8594aeff9..01b6fd38b 100644 --- a/twilio/rest/supersim/v1/model_supersim_v1_command.go +++ b/twilio/rest/supersim/v1/model_supersim_v1_command.go @@ -1,18 +1,20 @@ /* - * Twilio - Supersim - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Supersim + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // SupersimV1Command struct for SupersimV1Command type SupersimV1Command struct { // The SID of the Account that created the resource diff --git a/twilio/rest/supersim/v1/model_supersim_v1_fleet.go b/twilio/rest/supersim/v1/model_supersim_v1_fleet.go index cc4a6351c..5238bc900 100644 --- a/twilio/rest/supersim/v1/model_supersim_v1_fleet.go +++ b/twilio/rest/supersim/v1/model_supersim_v1_fleet.go @@ -1,18 +1,20 @@ /* - * Twilio - Supersim - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Supersim + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // SupersimV1Fleet struct for SupersimV1Fleet type SupersimV1Fleet struct { // The SID of the Account that created the resource diff --git a/twilio/rest/supersim/v1/model_supersim_v1_network.go b/twilio/rest/supersim/v1/model_supersim_v1_network.go index fc2fe01a2..a1261cb2c 100644 --- a/twilio/rest/supersim/v1/model_supersim_v1_network.go +++ b/twilio/rest/supersim/v1/model_supersim_v1_network.go @@ -1,15 +1,16 @@ /* - * Twilio - Supersim - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Supersim + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // SupersimV1Network struct for SupersimV1Network type SupersimV1Network struct { // A human readable identifier of this resource diff --git a/twilio/rest/supersim/v1/model_supersim_v1_network_access_profile.go b/twilio/rest/supersim/v1/model_supersim_v1_network_access_profile.go index 97b1383cd..d10d9d6f0 100644 --- a/twilio/rest/supersim/v1/model_supersim_v1_network_access_profile.go +++ b/twilio/rest/supersim/v1/model_supersim_v1_network_access_profile.go @@ -1,18 +1,20 @@ /* - * Twilio - Supersim - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Supersim + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // SupersimV1NetworkAccessProfile struct for SupersimV1NetworkAccessProfile type SupersimV1NetworkAccessProfile struct { // The SID of the Account that the Network Access Profile belongs to @@ -20,8 +22,8 @@ type SupersimV1NetworkAccessProfile struct { // The ISO 8601 date and time in GMT when the resource was created DateCreated *time.Time `json:"DateCreated,omitempty"` // The ISO 8601 date and time in GMT when the resource was last updated - DateUpdated *time.Time `json:"DateUpdated,omitempty"` - Links *map[string]interface{} `json:"Links,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + Links *map[string]interface{} `json:"Links,omitempty"` // The unique string that identifies the resource Sid *string `json:"Sid,omitempty"` // An application-defined string that uniquely identifies the resource diff --git a/twilio/rest/supersim/v1/model_supersim_v1_network_access_profile_network_access_profile_network.go b/twilio/rest/supersim/v1/model_supersim_v1_network_access_profile_network_access_profile_network.go index 224e6f7a1..475a10894 100644 --- a/twilio/rest/supersim/v1/model_supersim_v1_network_access_profile_network_access_profile_network.go +++ b/twilio/rest/supersim/v1/model_supersim_v1_network_access_profile_network_access_profile_network.go @@ -1,15 +1,16 @@ /* - * Twilio - Supersim - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Supersim + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // SupersimV1NetworkAccessProfileNetworkAccessProfileNetwork struct for SupersimV1NetworkAccessProfileNetworkAccessProfileNetwork type SupersimV1NetworkAccessProfileNetworkAccessProfileNetwork struct { // A human readable identifier of this resource diff --git a/twilio/rest/supersim/v1/model_supersim_v1_sim.go b/twilio/rest/supersim/v1/model_supersim_v1_sim.go index 61a6e653c..bc437849f 100644 --- a/twilio/rest/supersim/v1/model_supersim_v1_sim.go +++ b/twilio/rest/supersim/v1/model_supersim_v1_sim.go @@ -1,18 +1,20 @@ /* - * Twilio - Supersim - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Supersim + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // SupersimV1Sim struct for SupersimV1Sim type SupersimV1Sim struct { // The SID of the Account that the Super SIM belongs to diff --git a/twilio/rest/supersim/v1/model_supersim_v1_usage_record.go b/twilio/rest/supersim/v1/model_supersim_v1_usage_record.go index bb7e53146..354d67e99 100644 --- a/twilio/rest/supersim/v1/model_supersim_v1_usage_record.go +++ b/twilio/rest/supersim/v1/model_supersim_v1_usage_record.go @@ -1,15 +1,16 @@ /* - * Twilio - Supersim - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Supersim + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // SupersimV1UsageRecord struct for SupersimV1UsageRecord type SupersimV1UsageRecord struct { // The SID of the Account that incurred the usage. diff --git a/twilio/rest/sync/v1/api_default.go b/twilio/rest/sync/v1/api_default.go index 66c83a7d0..f62448643 100644 --- a/twilio/rest/sync/v1/api_default.go +++ b/twilio/rest/sync/v1/api_default.go @@ -1,11 +1,11 @@ /* - * Twilio - Sync - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,9 +14,10 @@ package openapi import ( "encoding/json" "fmt" - twilio "github.com/twilio/twilio-go/client" "net/url" - "strings" + "strings" + + twilio "github.com/twilio/twilio-go/client" ) type DefaultApiService struct { @@ -25,17 +26,17 @@ type DefaultApiService struct { } func NewDefaultApiService(client *twilio.Client) *DefaultApiService { - return &DefaultApiService { - client: client, + return &DefaultApiService{ + client: client, baseURL: "https://sync.twilio.com", } } // CreateDocumentParams Optional parameters for the method 'CreateDocument' type CreateDocumentParams struct { - Data *map[string]interface{} `json:"Data,omitempty"` - Ttl *int32 `json:"Ttl,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + Data *map[string]interface{} `json:"Data,omitempty"` + Ttl *int32 `json:"Ttl,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` } /* @@ -46,54 +47,54 @@ type CreateDocumentParams struct { * @param "Ttl" (int32) - How long, in seconds, before the Sync Document expires and is deleted (the Sync Document's time-to-live). Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the Sync Document does not expire. The Sync Document will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. * @param "UniqueName" (string) - An application-defined string that uniquely identifies the Sync Document * @return SyncV1ServiceDocument -*/ + */ func (c *DefaultApiService) CreateDocument(ServiceSid string, params *CreateDocumentParams) (*SyncV1ServiceDocument, error) { - path := "/v1/Services/{ServiceSid}/Documents" + path := "/v1/Services/{ServiceSid}/Documents" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Data != nil { - v, err := json.Marshal(params.Data) + data := url.Values{} + headers := 0 - if err != nil { - return nil, err - } + if params != nil && params.Data != nil { + v, err := json.Marshal(params.Data) - data.Set("Data", fmt.Sprint(v)) -} - if params != nil && params.Ttl != nil { - data.Set("Ttl", fmt.Sprint(*params.Ttl)) -} - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) -} + if err != nil { + return nil, err + } + data.Set("Data", fmt.Sprint(v)) + } + if params != nil && params.Ttl != nil { + data.Set("Ttl", fmt.Sprint(*params.Ttl)) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &SyncV1ServiceDocument{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &SyncV1ServiceDocument{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateServiceParams Optional parameters for the method 'CreateService' type CreateServiceParams struct { - AclEnabled *bool `json:"AclEnabled,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - ReachabilityDebouncingEnabled *bool `json:"ReachabilityDebouncingEnabled,omitempty"` - ReachabilityDebouncingWindow *int32 `json:"ReachabilityDebouncingWindow,omitempty"` - ReachabilityWebhooksEnabled *bool `json:"ReachabilityWebhooksEnabled,omitempty"` - WebhookUrl *string `json:"WebhookUrl,omitempty"` - WebhooksFromRestEnabled *bool `json:"WebhooksFromRestEnabled,omitempty"` + AclEnabled *bool `json:"AclEnabled,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + ReachabilityDebouncingEnabled *bool `json:"ReachabilityDebouncingEnabled,omitempty"` + ReachabilityDebouncingWindow *int32 `json:"ReachabilityDebouncingWindow,omitempty"` + ReachabilityWebhooksEnabled *bool `json:"ReachabilityWebhooksEnabled,omitempty"` + WebhookUrl *string `json:"WebhookUrl,omitempty"` + WebhooksFromRestEnabled *bool `json:"WebhooksFromRestEnabled,omitempty"` } /* @@ -107,50 +108,50 @@ type CreateServiceParams struct { * @param "WebhookUrl" (string) - The URL we should call when Sync objects are manipulated. * @param "WebhooksFromRestEnabled" (bool) - Whether the Service instance should call `webhook_url` when the REST API is used to update Sync objects. The default is `false`. * @return SyncV1Service -*/ + */ func (c *DefaultApiService) CreateService(params *CreateServiceParams) (*SyncV1Service, error) { - path := "/v1/Services" - - data := url.Values{} - headers := 0 + path := "/v1/Services" - if params != nil && params.AclEnabled != nil { - data.Set("AclEnabled", fmt.Sprint(*params.AclEnabled)) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.ReachabilityDebouncingEnabled != nil { - data.Set("ReachabilityDebouncingEnabled", fmt.Sprint(*params.ReachabilityDebouncingEnabled)) -} - if params != nil && params.ReachabilityDebouncingWindow != nil { - data.Set("ReachabilityDebouncingWindow", fmt.Sprint(*params.ReachabilityDebouncingWindow)) -} - if params != nil && params.ReachabilityWebhooksEnabled != nil { - data.Set("ReachabilityWebhooksEnabled", fmt.Sprint(*params.ReachabilityWebhooksEnabled)) -} - if params != nil && params.WebhookUrl != nil { - data.Set("WebhookUrl", *params.WebhookUrl) -} - if params != nil && params.WebhooksFromRestEnabled != nil { - data.Set("WebhooksFromRestEnabled", fmt.Sprint(*params.WebhooksFromRestEnabled)) -} + data := url.Values{} + headers := 0 + if params != nil && params.AclEnabled != nil { + data.Set("AclEnabled", fmt.Sprint(*params.AclEnabled)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.ReachabilityDebouncingEnabled != nil { + data.Set("ReachabilityDebouncingEnabled", fmt.Sprint(*params.ReachabilityDebouncingEnabled)) + } + if params != nil && params.ReachabilityDebouncingWindow != nil { + data.Set("ReachabilityDebouncingWindow", fmt.Sprint(*params.ReachabilityDebouncingWindow)) + } + if params != nil && params.ReachabilityWebhooksEnabled != nil { + data.Set("ReachabilityWebhooksEnabled", fmt.Sprint(*params.ReachabilityWebhooksEnabled)) + } + if params != nil && params.WebhookUrl != nil { + data.Set("WebhookUrl", *params.WebhookUrl) + } + if params != nil && params.WebhooksFromRestEnabled != nil { + data.Set("WebhooksFromRestEnabled", fmt.Sprint(*params.WebhooksFromRestEnabled)) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &SyncV1Service{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &SyncV1Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateStreamMessageParams Optional parameters for the method 'CreateStreamMessage' type CreateStreamMessageParams struct { Data *map[string]interface{} `json:"Data,omitempty"` @@ -164,45 +165,45 @@ type CreateStreamMessageParams struct { * @param optional nil or *CreateStreamMessageParams - Optional Parameters: * @param "Data" (map[string]interface{}) - A JSON string that represents an arbitrary, schema-less object that makes up the Stream Message body. Can be up to 4 KiB in length. * @return SyncV1ServiceSyncStreamStreamMessage -*/ + */ func (c *DefaultApiService) CreateStreamMessage(ServiceSid string, StreamSid string, params *CreateStreamMessageParams) (*SyncV1ServiceSyncStreamStreamMessage, error) { - path := "/v1/Services/{ServiceSid}/Streams/{StreamSid}/Messages" + path := "/v1/Services/{ServiceSid}/Streams/{StreamSid}/Messages" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"StreamSid"+"}", StreamSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Data != nil { - v, err := json.Marshal(params.Data) + data := url.Values{} + headers := 0 - if err != nil { - return nil, err - } + if params != nil && params.Data != nil { + v, err := json.Marshal(params.Data) - data.Set("Data", fmt.Sprint(v)) -} + if err != nil { + return nil, err + } + data.Set("Data", fmt.Sprint(v)) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &SyncV1ServiceSyncStreamStreamMessage{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &SyncV1ServiceSyncStreamStreamMessage{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateSyncListParams Optional parameters for the method 'CreateSyncList' type CreateSyncListParams struct { - CollectionTtl *int32 `json:"CollectionTtl,omitempty"` - Ttl *int32 `json:"Ttl,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + CollectionTtl *int32 `json:"CollectionTtl,omitempty"` + Ttl *int32 `json:"Ttl,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` } /* @@ -213,45 +214,45 @@ type CreateSyncListParams struct { * @param "Ttl" (int32) - Alias for collection_ttl. If both are provided, this value is ignored. * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. This value must be unique within its Service and it can be up to 320 characters long. The `unique_name` value can be used as an alternative to the `sid` in the URL path to address the resource. * @return SyncV1ServiceSyncList -*/ + */ func (c *DefaultApiService) CreateSyncList(ServiceSid string, params *CreateSyncListParams) (*SyncV1ServiceSyncList, error) { - path := "/v1/Services/{ServiceSid}/Lists" + path := "/v1/Services/{ServiceSid}/Lists" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.CollectionTtl != nil { - data.Set("CollectionTtl", fmt.Sprint(*params.CollectionTtl)) -} - if params != nil && params.Ttl != nil { - data.Set("Ttl", fmt.Sprint(*params.Ttl)) -} - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) -} + data := url.Values{} + headers := 0 + if params != nil && params.CollectionTtl != nil { + data.Set("CollectionTtl", fmt.Sprint(*params.CollectionTtl)) + } + if params != nil && params.Ttl != nil { + data.Set("Ttl", fmt.Sprint(*params.Ttl)) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &SyncV1ServiceSyncList{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &SyncV1ServiceSyncList{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateSyncListItemParams Optional parameters for the method 'CreateSyncListItem' type CreateSyncListItemParams struct { - CollectionTtl *int32 `json:"CollectionTtl,omitempty"` - Data *map[string]interface{} `json:"Data,omitempty"` - ItemTtl *int32 `json:"ItemTtl,omitempty"` - Ttl *int32 `json:"Ttl,omitempty"` + CollectionTtl *int32 `json:"CollectionTtl,omitempty"` + Data *map[string]interface{} `json:"Data,omitempty"` + ItemTtl *int32 `json:"ItemTtl,omitempty"` + Ttl *int32 `json:"Ttl,omitempty"` } /* @@ -264,54 +265,54 @@ type CreateSyncListItemParams struct { * @param "ItemTtl" (int32) - How long, in seconds, before the List Item expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the List Item does not expire. The List Item will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. * @param "Ttl" (int32) - An alias for `item_ttl`. If both parameters are provided, this value is ignored. * @return SyncV1ServiceSyncListSyncListItem -*/ + */ func (c *DefaultApiService) CreateSyncListItem(ServiceSid string, ListSid string, params *CreateSyncListItemParams) (*SyncV1ServiceSyncListSyncListItem, error) { - path := "/v1/Services/{ServiceSid}/Lists/{ListSid}/Items" + path := "/v1/Services/{ServiceSid}/Lists/{ListSid}/Items" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ListSid"+"}", ListSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.CollectionTtl != nil { - data.Set("CollectionTtl", fmt.Sprint(*params.CollectionTtl)) -} - if params != nil && params.Data != nil { - v, err := json.Marshal(params.Data) + data := url.Values{} + headers := 0 - if err != nil { - return nil, err + if params != nil && params.CollectionTtl != nil { + data.Set("CollectionTtl", fmt.Sprint(*params.CollectionTtl)) } + if params != nil && params.Data != nil { + v, err := json.Marshal(params.Data) - data.Set("Data", fmt.Sprint(v)) -} - if params != nil && params.ItemTtl != nil { - data.Set("ItemTtl", fmt.Sprint(*params.ItemTtl)) -} - if params != nil && params.Ttl != nil { - data.Set("Ttl", fmt.Sprint(*params.Ttl)) -} + if err != nil { + return nil, err + } + data.Set("Data", fmt.Sprint(v)) + } + if params != nil && params.ItemTtl != nil { + data.Set("ItemTtl", fmt.Sprint(*params.ItemTtl)) + } + if params != nil && params.Ttl != nil { + data.Set("Ttl", fmt.Sprint(*params.Ttl)) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &SyncV1ServiceSyncListSyncListItem{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &SyncV1ServiceSyncListSyncListItem{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateSyncMapParams Optional parameters for the method 'CreateSyncMap' type CreateSyncMapParams struct { - CollectionTtl *int32 `json:"CollectionTtl,omitempty"` - Ttl *int32 `json:"Ttl,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + CollectionTtl *int32 `json:"CollectionTtl,omitempty"` + Ttl *int32 `json:"Ttl,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` } /* @@ -322,46 +323,46 @@ type CreateSyncMapParams struct { * @param "Ttl" (int32) - An alias for `collection_ttl`. If both parameters are provided, this value is ignored. * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. It can be used as an alternative to the `sid` in the URL path to address the resource. * @return SyncV1ServiceSyncMap -*/ + */ func (c *DefaultApiService) CreateSyncMap(ServiceSid string, params *CreateSyncMapParams) (*SyncV1ServiceSyncMap, error) { - path := "/v1/Services/{ServiceSid}/Maps" + path := "/v1/Services/{ServiceSid}/Maps" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.CollectionTtl != nil { - data.Set("CollectionTtl", fmt.Sprint(*params.CollectionTtl)) -} - if params != nil && params.Ttl != nil { - data.Set("Ttl", fmt.Sprint(*params.Ttl)) -} - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) -} + data := url.Values{} + headers := 0 + if params != nil && params.CollectionTtl != nil { + data.Set("CollectionTtl", fmt.Sprint(*params.CollectionTtl)) + } + if params != nil && params.Ttl != nil { + data.Set("Ttl", fmt.Sprint(*params.Ttl)) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &SyncV1ServiceSyncMap{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &SyncV1ServiceSyncMap{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateSyncMapItemParams Optional parameters for the method 'CreateSyncMapItem' type CreateSyncMapItemParams struct { - CollectionTtl *int32 `json:"CollectionTtl,omitempty"` - Data *map[string]interface{} `json:"Data,omitempty"` - ItemTtl *int32 `json:"ItemTtl,omitempty"` - Key *string `json:"Key,omitempty"` - Ttl *int32 `json:"Ttl,omitempty"` + CollectionTtl *int32 `json:"CollectionTtl,omitempty"` + Data *map[string]interface{} `json:"Data,omitempty"` + ItemTtl *int32 `json:"ItemTtl,omitempty"` + Key *string `json:"Key,omitempty"` + Ttl *int32 `json:"Ttl,omitempty"` } /* @@ -375,55 +376,55 @@ type CreateSyncMapItemParams struct { * @param "Key" (string) - The unique, user-defined key for the Map Item. Can be up to 320 characters long. * @param "Ttl" (int32) - An alias for `item_ttl`. If both parameters are provided, this value is ignored. * @return SyncV1ServiceSyncMapSyncMapItem -*/ + */ func (c *DefaultApiService) CreateSyncMapItem(ServiceSid string, MapSid string, params *CreateSyncMapItemParams) (*SyncV1ServiceSyncMapSyncMapItem, error) { - path := "/v1/Services/{ServiceSid}/Maps/{MapSid}/Items" + path := "/v1/Services/{ServiceSid}/Maps/{MapSid}/Items" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"MapSid"+"}", MapSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.CollectionTtl != nil { - data.Set("CollectionTtl", fmt.Sprint(*params.CollectionTtl)) -} - if params != nil && params.Data != nil { - v, err := json.Marshal(params.Data) + data := url.Values{} + headers := 0 - if err != nil { - return nil, err + if params != nil && params.CollectionTtl != nil { + data.Set("CollectionTtl", fmt.Sprint(*params.CollectionTtl)) } + if params != nil && params.Data != nil { + v, err := json.Marshal(params.Data) - data.Set("Data", fmt.Sprint(v)) -} - if params != nil && params.ItemTtl != nil { - data.Set("ItemTtl", fmt.Sprint(*params.ItemTtl)) -} - if params != nil && params.Key != nil { - data.Set("Key", *params.Key) -} - if params != nil && params.Ttl != nil { - data.Set("Ttl", fmt.Sprint(*params.Ttl)) -} + if err != nil { + return nil, err + } + data.Set("Data", fmt.Sprint(v)) + } + if params != nil && params.ItemTtl != nil { + data.Set("ItemTtl", fmt.Sprint(*params.ItemTtl)) + } + if params != nil && params.Key != nil { + data.Set("Key", *params.Key) + } + if params != nil && params.Ttl != nil { + data.Set("Ttl", fmt.Sprint(*params.Ttl)) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &SyncV1ServiceSyncMapSyncMapItem{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &SyncV1ServiceSyncMapSyncMapItem{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateSyncStreamParams Optional parameters for the method 'CreateSyncStream' type CreateSyncStreamParams struct { - Ttl *int32 `json:"Ttl,omitempty"` + Ttl *int32 `json:"Ttl,omitempty"` UniqueName *string `json:"UniqueName,omitempty"` } @@ -435,60 +436,57 @@ type CreateSyncStreamParams struct { * @param "Ttl" (int32) - How long, in seconds, before the Stream expires and is deleted (time-to-live). Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the Stream does not expire. The Stream will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. This value must be unique within its Service and it can be up to 320 characters long. The `unique_name` value can be used as an alternative to the `sid` in the URL path to address the resource. * @return SyncV1ServiceSyncStream -*/ + */ func (c *DefaultApiService) CreateSyncStream(ServiceSid string, params *CreateSyncStreamParams) (*SyncV1ServiceSyncStream, error) { - path := "/v1/Services/{ServiceSid}/Streams" + path := "/v1/Services/{ServiceSid}/Streams" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Ttl != nil { - data.Set("Ttl", fmt.Sprint(*params.Ttl)) -} - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) -} + data := url.Values{} + headers := 0 + if params != nil && params.Ttl != nil { + data.Set("Ttl", fmt.Sprint(*params.Ttl)) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &SyncV1ServiceSyncStream{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &SyncV1ServiceSyncStream{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * DeleteDocument Method for DeleteDocument * @param ServiceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Document resource to delete. * @param Sid The SID of the Document resource to delete. Can be the Document resource's `sid` or its `unique_name`. -*/ -func (c *DefaultApiService) DeleteDocument(ServiceSid string, Sid string, ) (error) { - path := "/v1/Services/{ServiceSid}/Documents/{Sid}" + */ +func (c *DefaultApiService) DeleteDocument(ServiceSid string, Sid string) error { + path := "/v1/Services/{ServiceSid}/Documents/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -497,75 +495,70 @@ func (c *DefaultApiService) DeleteDocument(ServiceSid string, Sid string, ) (err * @param ServiceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Document Permission resource to delete. * @param DocumentSid The SID of the Sync Document with the Document Permission resource to delete. Can be the Document resource's `sid` or its `unique_name`. * @param Identity The application-defined string that uniquely identifies the User's Document Permission resource to delete. -*/ -func (c *DefaultApiService) DeleteDocumentPermission(ServiceSid string, DocumentSid string, Identity string, ) (error) { - path := "/v1/Services/{ServiceSid}/Documents/{DocumentSid}/Permissions/{Identity}" + */ +func (c *DefaultApiService) DeleteDocumentPermission(ServiceSid string, DocumentSid string, Identity string) error { + path := "/v1/Services/{ServiceSid}/Documents/{DocumentSid}/Permissions/{Identity}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"DocumentSid"+"}", DocumentSid, -1) path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* * DeleteService Method for DeleteService * @param Sid The SID of the Service resource to delete. -*/ -func (c *DefaultApiService) DeleteService(Sid string, ) (error) { - path := "/v1/Services/{Sid}" + */ +func (c *DefaultApiService) DeleteService(Sid string) error { + path := "/v1/Services/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + defer resp.Body.Close() - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() - - return nil + return nil } /* * DeleteSyncList Method for DeleteSyncList * @param ServiceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync List resource to delete. * @param Sid The SID of the Sync List resource to delete. Can be the Sync List resource's `sid` or its `unique_name`. -*/ -func (c *DefaultApiService) DeleteSyncList(ServiceSid string, Sid string, ) (error) { - path := "/v1/Services/{ServiceSid}/Lists/{Sid}" + */ +func (c *DefaultApiService) DeleteSyncList(ServiceSid string, Sid string) error { + path := "/v1/Services/{ServiceSid}/Lists/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } + // DeleteSyncListItemParams Optional parameters for the method 'DeleteSyncListItem' type DeleteSyncListItemParams struct { IfMatch *string `json:"If-Match,omitempty"` @@ -578,29 +571,28 @@ type DeleteSyncListItemParams struct { * @param Index The index of the Sync List Item resource to delete. * @param optional nil or *DeleteSyncListItemParams - Optional Parameters: * @param "IfMatch" (string) - If provided, applies this mutation if (and only if) the “revision” field of this [map item] matches the provided value. This matches the semantics of (and is implemented with) the HTTP [If-Match header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Match). -*/ -func (c *DefaultApiService) DeleteSyncListItem(ServiceSid string, ListSid string, Index int32, params *DeleteSyncListItemParams) (error) { - path := "/v1/Services/{ServiceSid}/Lists/{ListSid}/Items/{Index}" + */ +func (c *DefaultApiService) DeleteSyncListItem(ServiceSid string, ListSid string, Index int32, params *DeleteSyncListItemParams) error { + path := "/v1/Services/{ServiceSid}/Lists/{ListSid}/Items/{Index}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ListSid"+"}", ListSid, -1) path = strings.Replace(path, "{"+"Index"+"}", fmt.Sprint(Index), -1) - data := url.Values{} - headers := make(map[string]interface{}) - + data := url.Values{} + headers := make(map[string]interface{}) if params != nil && params.IfMatch != nil { headers["IfMatch"] = *params.IfMatch } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -609,52 +601,49 @@ func (c *DefaultApiService) DeleteSyncListItem(ServiceSid string, ListSid string * @param ServiceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync List Permission resource to delete. * @param ListSid The SID of the Sync List with the Sync List Permission resource to delete. Can be the Sync List resource's `sid` or its `unique_name`. * @param Identity The application-defined string that uniquely identifies the User's Sync List Permission resource to delete. -*/ -func (c *DefaultApiService) DeleteSyncListPermission(ServiceSid string, ListSid string, Identity string, ) (error) { - path := "/v1/Services/{ServiceSid}/Lists/{ListSid}/Permissions/{Identity}" + */ +func (c *DefaultApiService) DeleteSyncListPermission(ServiceSid string, ListSid string, Identity string) error { + path := "/v1/Services/{ServiceSid}/Lists/{ListSid}/Permissions/{Identity}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ListSid"+"}", ListSid, -1) path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* * DeleteSyncMap Method for DeleteSyncMap * @param ServiceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync Map resource to delete. * @param Sid The SID of the Sync Map resource to delete. Can be the Sync Map's `sid` or its `unique_name`. -*/ -func (c *DefaultApiService) DeleteSyncMap(ServiceSid string, Sid string, ) (error) { - path := "/v1/Services/{ServiceSid}/Maps/{Sid}" + */ +func (c *DefaultApiService) DeleteSyncMap(ServiceSid string, Sid string) error { + path := "/v1/Services/{ServiceSid}/Maps/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + defer resp.Body.Close() - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() - - return nil + return nil } + // DeleteSyncMapItemParams Optional parameters for the method 'DeleteSyncMapItem' type DeleteSyncMapItemParams struct { IfMatch *string `json:"If-Match,omitempty"` @@ -667,29 +656,28 @@ type DeleteSyncMapItemParams struct { * @param Key The `key` value of the Sync Map Item resource to delete. * @param optional nil or *DeleteSyncMapItemParams - Optional Parameters: * @param "IfMatch" (string) - If provided, applies this mutation if (and only if) the “revision” field of this [map item] matches the provided value. This matches the semantics of (and is implemented with) the HTTP [If-Match header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Match). -*/ -func (c *DefaultApiService) DeleteSyncMapItem(ServiceSid string, MapSid string, Key string, params *DeleteSyncMapItemParams) (error) { - path := "/v1/Services/{ServiceSid}/Maps/{MapSid}/Items/{Key}" + */ +func (c *DefaultApiService) DeleteSyncMapItem(ServiceSid string, MapSid string, Key string, params *DeleteSyncMapItemParams) error { + path := "/v1/Services/{ServiceSid}/Maps/{MapSid}/Items/{Key}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"MapSid"+"}", MapSid, -1) path = strings.Replace(path, "{"+"Key"+"}", Key, -1) - data := url.Values{} - headers := make(map[string]interface{}) - + data := url.Values{} + headers := make(map[string]interface{}) if params != nil && params.IfMatch != nil { headers["IfMatch"] = *params.IfMatch } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -698,26 +686,24 @@ func (c *DefaultApiService) DeleteSyncMapItem(ServiceSid string, MapSid string, * @param ServiceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync Map Permission resource to delete. Can be the Service's `sid` value or `default`. * @param MapSid The SID of the Sync Map with the Sync Map Permission resource to delete. Can be the Sync Map resource's `sid` or its `unique_name`. * @param Identity The application-defined string that uniquely identifies the User's Sync Map Permission resource to delete. -*/ -func (c *DefaultApiService) DeleteSyncMapPermission(ServiceSid string, MapSid string, Identity string, ) (error) { - path := "/v1/Services/{ServiceSid}/Maps/{MapSid}/Permissions/{Identity}" + */ +func (c *DefaultApiService) DeleteSyncMapPermission(ServiceSid string, MapSid string, Identity string) error { + path := "/v1/Services/{ServiceSid}/Maps/{MapSid}/Permissions/{Identity}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"MapSid"+"}", MapSid, -1) path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -725,25 +711,23 @@ func (c *DefaultApiService) DeleteSyncMapPermission(ServiceSid string, MapSid st * Delete a specific Stream. * @param ServiceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync Stream resource to delete. * @param Sid The SID of the Stream resource to delete. -*/ -func (c *DefaultApiService) DeleteSyncStream(ServiceSid string, Sid string, ) (error) { - path := "/v1/Services/{ServiceSid}/Streams/{Sid}" + */ +func (c *DefaultApiService) DeleteSyncStream(ServiceSid string, Sid string) error { + path := "/v1/Services/{ServiceSid}/Streams/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -751,30 +735,28 @@ func (c *DefaultApiService) DeleteSyncStream(ServiceSid string, Sid string, ) (e * @param ServiceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Document resource to fetch. * @param Sid The SID of the Document resource to fetch. Can be the Document resource's `sid` or its `unique_name`. * @return SyncV1ServiceDocument -*/ -func (c *DefaultApiService) FetchDocument(ServiceSid string, Sid string, ) (*SyncV1ServiceDocument, error) { - path := "/v1/Services/{ServiceSid}/Documents/{Sid}" + */ +func (c *DefaultApiService) FetchDocument(ServiceSid string, Sid string) (*SyncV1ServiceDocument, error) { + path := "/v1/Services/{ServiceSid}/Documents/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &SyncV1ServiceDocument{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &SyncV1ServiceDocument{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -784,60 +766,56 @@ func (c *DefaultApiService) FetchDocument(ServiceSid string, Sid string, ) (*Syn * @param DocumentSid The SID of the Sync Document with the Document Permission resource to fetch. Can be the Document resource's `sid` or its `unique_name`. * @param Identity The application-defined string that uniquely identifies the User's Document Permission resource to fetch. * @return SyncV1ServiceDocumentDocumentPermission -*/ -func (c *DefaultApiService) FetchDocumentPermission(ServiceSid string, DocumentSid string, Identity string, ) (*SyncV1ServiceDocumentDocumentPermission, error) { - path := "/v1/Services/{ServiceSid}/Documents/{DocumentSid}/Permissions/{Identity}" + */ +func (c *DefaultApiService) FetchDocumentPermission(ServiceSid string, DocumentSid string, Identity string) (*SyncV1ServiceDocumentDocumentPermission, error) { + path := "/v1/Services/{ServiceSid}/Documents/{DocumentSid}/Permissions/{Identity}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"DocumentSid"+"}", DocumentSid, -1) path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &SyncV1ServiceDocumentDocumentPermission{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &SyncV1ServiceDocumentDocumentPermission{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * FetchService Method for FetchService * @param Sid The SID of the Service resource to fetch. * @return SyncV1Service -*/ -func (c *DefaultApiService) FetchService(Sid string, ) (*SyncV1Service, error) { - path := "/v1/Services/{Sid}" + */ +func (c *DefaultApiService) FetchService(Sid string) (*SyncV1Service, error) { + path := "/v1/Services/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &SyncV1Service{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &SyncV1Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -845,30 +823,28 @@ func (c *DefaultApiService) FetchService(Sid string, ) (*SyncV1Service, error) { * @param ServiceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync List resource to fetch. * @param Sid The SID of the Sync List resource to fetch. Can be the Sync List resource's `sid` or its `unique_name`. * @return SyncV1ServiceSyncList -*/ -func (c *DefaultApiService) FetchSyncList(ServiceSid string, Sid string, ) (*SyncV1ServiceSyncList, error) { - path := "/v1/Services/{ServiceSid}/Lists/{Sid}" + */ +func (c *DefaultApiService) FetchSyncList(ServiceSid string, Sid string) (*SyncV1ServiceSyncList, error) { + path := "/v1/Services/{ServiceSid}/Lists/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &SyncV1ServiceSyncList{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &SyncV1ServiceSyncList{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -877,31 +853,29 @@ func (c *DefaultApiService) FetchSyncList(ServiceSid string, Sid string, ) (*Syn * @param ListSid The SID of the Sync List with the Sync List Item resource to fetch. Can be the Sync List resource's `sid` or its `unique_name`. * @param Index The index of the Sync List Item resource to fetch. * @return SyncV1ServiceSyncListSyncListItem -*/ -func (c *DefaultApiService) FetchSyncListItem(ServiceSid string, ListSid string, Index int32, ) (*SyncV1ServiceSyncListSyncListItem, error) { - path := "/v1/Services/{ServiceSid}/Lists/{ListSid}/Items/{Index}" + */ +func (c *DefaultApiService) FetchSyncListItem(ServiceSid string, ListSid string, Index int32) (*SyncV1ServiceSyncListSyncListItem, error) { + path := "/v1/Services/{ServiceSid}/Lists/{ListSid}/Items/{Index}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ListSid"+"}", ListSid, -1) path = strings.Replace(path, "{"+"Index"+"}", fmt.Sprint(Index), -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &SyncV1ServiceSyncListSyncListItem{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &SyncV1ServiceSyncListSyncListItem{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -911,31 +885,29 @@ func (c *DefaultApiService) FetchSyncListItem(ServiceSid string, ListSid string, * @param ListSid The SID of the Sync List with the Sync List Permission resource to fetch. Can be the Sync List resource's `sid` or its `unique_name`. * @param Identity The application-defined string that uniquely identifies the User's Sync List Permission resource to fetch. * @return SyncV1ServiceSyncListSyncListPermission -*/ -func (c *DefaultApiService) FetchSyncListPermission(ServiceSid string, ListSid string, Identity string, ) (*SyncV1ServiceSyncListSyncListPermission, error) { - path := "/v1/Services/{ServiceSid}/Lists/{ListSid}/Permissions/{Identity}" + */ +func (c *DefaultApiService) FetchSyncListPermission(ServiceSid string, ListSid string, Identity string) (*SyncV1ServiceSyncListSyncListPermission, error) { + path := "/v1/Services/{ServiceSid}/Lists/{ListSid}/Permissions/{Identity}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ListSid"+"}", ListSid, -1) path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &SyncV1ServiceSyncListSyncListPermission{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &SyncV1ServiceSyncListSyncListPermission{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -943,30 +915,28 @@ func (c *DefaultApiService) FetchSyncListPermission(ServiceSid string, ListSid s * @param ServiceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync Map resource to fetch. * @param Sid The SID of the Sync Map resource to fetch. Can be the Sync Map's `sid` or its `unique_name`. * @return SyncV1ServiceSyncMap -*/ -func (c *DefaultApiService) FetchSyncMap(ServiceSid string, Sid string, ) (*SyncV1ServiceSyncMap, error) { - path := "/v1/Services/{ServiceSid}/Maps/{Sid}" + */ +func (c *DefaultApiService) FetchSyncMap(ServiceSid string, Sid string) (*SyncV1ServiceSyncMap, error) { + path := "/v1/Services/{ServiceSid}/Maps/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &SyncV1ServiceSyncMap{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &SyncV1ServiceSyncMap{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -975,31 +945,29 @@ func (c *DefaultApiService) FetchSyncMap(ServiceSid string, Sid string, ) (*Sync * @param MapSid The SID of the Sync Map with the Sync Map Item resource to fetch. Can be the Sync Map resource's `sid` or its `unique_name`. * @param Key The `key` value of the Sync Map Item resource to fetch. * @return SyncV1ServiceSyncMapSyncMapItem -*/ -func (c *DefaultApiService) FetchSyncMapItem(ServiceSid string, MapSid string, Key string, ) (*SyncV1ServiceSyncMapSyncMapItem, error) { - path := "/v1/Services/{ServiceSid}/Maps/{MapSid}/Items/{Key}" + */ +func (c *DefaultApiService) FetchSyncMapItem(ServiceSid string, MapSid string, Key string) (*SyncV1ServiceSyncMapSyncMapItem, error) { + path := "/v1/Services/{ServiceSid}/Maps/{MapSid}/Items/{Key}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"MapSid"+"}", MapSid, -1) path = strings.Replace(path, "{"+"Key"+"}", Key, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &SyncV1ServiceSyncMapSyncMapItem{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &SyncV1ServiceSyncMapSyncMapItem{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -1009,31 +977,29 @@ func (c *DefaultApiService) FetchSyncMapItem(ServiceSid string, MapSid string, K * @param MapSid The SID of the Sync Map with the Sync Map Permission resource to fetch. Can be the Sync Map resource's `sid` or its `unique_name`. * @param Identity The application-defined string that uniquely identifies the User's Sync Map Permission resource to fetch. * @return SyncV1ServiceSyncMapSyncMapPermission -*/ -func (c *DefaultApiService) FetchSyncMapPermission(ServiceSid string, MapSid string, Identity string, ) (*SyncV1ServiceSyncMapSyncMapPermission, error) { - path := "/v1/Services/{ServiceSid}/Maps/{MapSid}/Permissions/{Identity}" + */ +func (c *DefaultApiService) FetchSyncMapPermission(ServiceSid string, MapSid string, Identity string) (*SyncV1ServiceSyncMapSyncMapPermission, error) { + path := "/v1/Services/{ServiceSid}/Maps/{MapSid}/Permissions/{Identity}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"MapSid"+"}", MapSid, -1) path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &SyncV1ServiceSyncMapSyncMapPermission{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &SyncV1ServiceSyncMapSyncMapPermission{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -1042,31 +1008,30 @@ func (c *DefaultApiService) FetchSyncMapPermission(ServiceSid string, MapSid str * @param ServiceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync Stream resource to fetch. * @param Sid The SID of the Stream resource to fetch. * @return SyncV1ServiceSyncStream -*/ -func (c *DefaultApiService) FetchSyncStream(ServiceSid string, Sid string, ) (*SyncV1ServiceSyncStream, error) { - path := "/v1/Services/{ServiceSid}/Streams/{Sid}" + */ +func (c *DefaultApiService) FetchSyncStream(ServiceSid string, Sid string) (*SyncV1ServiceSyncStream, error) { + path := "/v1/Services/{ServiceSid}/Streams/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &SyncV1ServiceSyncStream{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &SyncV1ServiceSyncStream{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListDocumentParams Optional parameters for the method 'ListDocument' type ListDocumentParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1078,33 +1043,33 @@ type ListDocumentParams struct { * @param optional nil or *ListDocumentParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListDocumentResponse -*/ + */ func (c *DefaultApiService) ListDocument(ServiceSid string, params *ListDocumentParams) (*ListDocumentResponse, error) { - path := "/v1/Services/{ServiceSid}/Documents" + path := "/v1/Services/{ServiceSid}/Documents" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListDocumentResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListDocumentResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListDocumentPermissionParams Optional parameters for the method 'ListDocumentPermission' type ListDocumentPermissionParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1118,34 +1083,34 @@ type ListDocumentPermissionParams struct { * @param optional nil or *ListDocumentPermissionParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListDocumentPermissionResponse -*/ + */ func (c *DefaultApiService) ListDocumentPermission(ServiceSid string, DocumentSid string, params *ListDocumentPermissionParams) (*ListDocumentPermissionResponse, error) { - path := "/v1/Services/{ServiceSid}/Documents/{DocumentSid}/Permissions" + path := "/v1/Services/{ServiceSid}/Documents/{DocumentSid}/Permissions" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"DocumentSid"+"}", DocumentSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListDocumentPermissionResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListDocumentPermissionResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListServiceParams Optional parameters for the method 'ListService' type ListServiceParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1156,32 +1121,32 @@ type ListServiceParams struct { * @param optional nil or *ListServiceParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListServiceResponse -*/ + */ func (c *DefaultApiService) ListService(params *ListServiceParams) (*ListServiceResponse, error) { - path := "/v1/Services" + path := "/v1/Services" - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListServiceResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListServiceResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListSyncListParams Optional parameters for the method 'ListSyncList' type ListSyncListParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1193,39 +1158,39 @@ type ListSyncListParams struct { * @param optional nil or *ListSyncListParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListSyncListResponse -*/ + */ func (c *DefaultApiService) ListSyncList(ServiceSid string, params *ListSyncListParams) (*ListSyncListResponse, error) { - path := "/v1/Services/{ServiceSid}/Lists" + path := "/v1/Services/{ServiceSid}/Lists" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListSyncListResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListSyncListResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListSyncListItemParams Optional parameters for the method 'ListSyncListItem' type ListSyncListItemParams struct { - Order *string `json:"Order,omitempty"` - From *string `json:"From,omitempty"` - Bounds *string `json:"Bounds,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + Order *string `json:"Order,omitempty"` + From *string `json:"From,omitempty"` + Bounds *string `json:"Bounds,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -1238,43 +1203,43 @@ type ListSyncListItemParams struct { * @param "Bounds" (string) - Whether to include the List Item referenced by the `from` parameter. Can be: `inclusive` to include the List Item referenced by the `from` parameter or `exclusive` to start with the next List Item. The default value is `inclusive`. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListSyncListItemResponse -*/ + */ func (c *DefaultApiService) ListSyncListItem(ServiceSid string, ListSid string, params *ListSyncListItemParams) (*ListSyncListItemResponse, error) { - path := "/v1/Services/{ServiceSid}/Lists/{ListSid}/Items" + path := "/v1/Services/{ServiceSid}/Lists/{ListSid}/Items" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ListSid"+"}", ListSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Order != nil { - data.Set("Order", *params.Order) -} - if params != nil && params.From != nil { - data.Set("From", *params.From) -} - if params != nil && params.Bounds != nil { - data.Set("Bounds", *params.Bounds) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.Order != nil { + data.Set("Order", *params.Order) + } + if params != nil && params.From != nil { + data.Set("From", *params.From) + } + if params != nil && params.Bounds != nil { + data.Set("Bounds", *params.Bounds) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListSyncListItemResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListSyncListItemResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListSyncListPermissionParams Optional parameters for the method 'ListSyncListPermission' type ListSyncListPermissionParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1288,34 +1253,34 @@ type ListSyncListPermissionParams struct { * @param optional nil or *ListSyncListPermissionParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListSyncListPermissionResponse -*/ + */ func (c *DefaultApiService) ListSyncListPermission(ServiceSid string, ListSid string, params *ListSyncListPermissionParams) (*ListSyncListPermissionResponse, error) { - path := "/v1/Services/{ServiceSid}/Lists/{ListSid}/Permissions" + path := "/v1/Services/{ServiceSid}/Lists/{ListSid}/Permissions" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ListSid"+"}", ListSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListSyncListPermissionResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListSyncListPermissionResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListSyncMapParams Optional parameters for the method 'ListSyncMap' type ListSyncMapParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1327,39 +1292,39 @@ type ListSyncMapParams struct { * @param optional nil or *ListSyncMapParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListSyncMapResponse -*/ + */ func (c *DefaultApiService) ListSyncMap(ServiceSid string, params *ListSyncMapParams) (*ListSyncMapResponse, error) { - path := "/v1/Services/{ServiceSid}/Maps" + path := "/v1/Services/{ServiceSid}/Maps" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListSyncMapResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListSyncMapResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListSyncMapItemParams Optional parameters for the method 'ListSyncMapItem' type ListSyncMapItemParams struct { - Order *string `json:"Order,omitempty"` - From *string `json:"From,omitempty"` - Bounds *string `json:"Bounds,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + Order *string `json:"Order,omitempty"` + From *string `json:"From,omitempty"` + Bounds *string `json:"Bounds,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -1372,43 +1337,43 @@ type ListSyncMapItemParams struct { * @param "Bounds" (string) - Whether to include the Map Item referenced by the `from` parameter. Can be: `inclusive` to include the Map Item referenced by the `from` parameter or `exclusive` to start with the next Map Item. The default value is `inclusive`. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListSyncMapItemResponse -*/ + */ func (c *DefaultApiService) ListSyncMapItem(ServiceSid string, MapSid string, params *ListSyncMapItemParams) (*ListSyncMapItemResponse, error) { - path := "/v1/Services/{ServiceSid}/Maps/{MapSid}/Items" + path := "/v1/Services/{ServiceSid}/Maps/{MapSid}/Items" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"MapSid"+"}", MapSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Order != nil { - data.Set("Order", *params.Order) -} - if params != nil && params.From != nil { - data.Set("From", *params.From) -} - if params != nil && params.Bounds != nil { - data.Set("Bounds", *params.Bounds) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.Order != nil { + data.Set("Order", *params.Order) + } + if params != nil && params.From != nil { + data.Set("From", *params.From) + } + if params != nil && params.Bounds != nil { + data.Set("Bounds", *params.Bounds) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListSyncMapItemResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListSyncMapItemResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListSyncMapPermissionParams Optional parameters for the method 'ListSyncMapPermission' type ListSyncMapPermissionParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1422,34 +1387,34 @@ type ListSyncMapPermissionParams struct { * @param optional nil or *ListSyncMapPermissionParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListSyncMapPermissionResponse -*/ + */ func (c *DefaultApiService) ListSyncMapPermission(ServiceSid string, MapSid string, params *ListSyncMapPermissionParams) (*ListSyncMapPermissionResponse, error) { - path := "/v1/Services/{ServiceSid}/Maps/{MapSid}/Permissions" + path := "/v1/Services/{ServiceSid}/Maps/{MapSid}/Permissions" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"MapSid"+"}", MapSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListSyncMapPermissionResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListSyncMapPermissionResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListSyncStreamParams Optional parameters for the method 'ListSyncStream' type ListSyncStreamParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1462,38 +1427,38 @@ type ListSyncStreamParams struct { * @param optional nil or *ListSyncStreamParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListSyncStreamResponse -*/ + */ func (c *DefaultApiService) ListSyncStream(ServiceSid string, params *ListSyncStreamParams) (*ListSyncStreamResponse, error) { - path := "/v1/Services/{ServiceSid}/Streams" + path := "/v1/Services/{ServiceSid}/Streams" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListSyncStreamResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListSyncStreamResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateDocumentParams Optional parameters for the method 'UpdateDocument' type UpdateDocumentParams struct { - IfMatch *string `json:"If-Match,omitempty"` - Data *map[string]interface{} `json:"Data,omitempty"` - Ttl *int32 `json:"Ttl,omitempty"` + IfMatch *string `json:"If-Match,omitempty"` + Data *map[string]interface{} `json:"Data,omitempty"` + Ttl *int32 `json:"Ttl,omitempty"` } /* @@ -1505,51 +1470,52 @@ type UpdateDocumentParams struct { * @param "Data" (map[string]interface{}) - A JSON string that represents an arbitrary, schema-less object that the Sync Document stores. Can be up to 16 KiB in length. * @param "Ttl" (int32) - How long, in seconds, before the Sync Document expires and is deleted (time-to-live). Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the Document resource does not expire. The Document resource will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. * @return SyncV1ServiceDocument -*/ + */ func (c *DefaultApiService) UpdateDocument(ServiceSid string, Sid string, params *UpdateDocumentParams) (*SyncV1ServiceDocument, error) { - path := "/v1/Services/{ServiceSid}/Documents/{Sid}" + path := "/v1/Services/{ServiceSid}/Documents/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := make(map[string]interface{}) + data := url.Values{} + headers := make(map[string]interface{}) - if params != nil && params.Data != nil { - v, err := json.Marshal(params.Data) + if params != nil && params.Data != nil { + v, err := json.Marshal(params.Data) - if err != nil { - return nil, err - } + if err != nil { + return nil, err + } - data.Set("Data", fmt.Sprint(v)) -} - if params != nil && params.Ttl != nil { - data.Set("Ttl", fmt.Sprint(*params.Ttl)) -} + data.Set("Data", fmt.Sprint(v)) + } + if params != nil && params.Ttl != nil { + data.Set("Ttl", fmt.Sprint(*params.Ttl)) + } if params != nil && params.IfMatch != nil { headers["IfMatch"] = *params.IfMatch } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &SyncV1ServiceDocument{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &SyncV1ServiceDocument{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateDocumentPermissionParams Optional parameters for the method 'UpdateDocumentPermission' type UpdateDocumentPermissionParams struct { Manage *bool `json:"Manage,omitempty"` - Read *bool `json:"Read,omitempty"` - Write *bool `json:"Write,omitempty"` + Read *bool `json:"Read,omitempty"` + Write *bool `json:"Write,omitempty"` } /* @@ -1563,50 +1529,50 @@ type UpdateDocumentPermissionParams struct { * @param "Read" (bool) - Whether the identity can read the Sync Document. Default value is `false`. * @param "Write" (bool) - Whether the identity can update the Sync Document. Default value is `false`. * @return SyncV1ServiceDocumentDocumentPermission -*/ + */ func (c *DefaultApiService) UpdateDocumentPermission(ServiceSid string, DocumentSid string, Identity string, params *UpdateDocumentPermissionParams) (*SyncV1ServiceDocumentDocumentPermission, error) { - path := "/v1/Services/{ServiceSid}/Documents/{DocumentSid}/Permissions/{Identity}" + path := "/v1/Services/{ServiceSid}/Documents/{DocumentSid}/Permissions/{Identity}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"DocumentSid"+"}", DocumentSid, -1) path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Manage != nil { - data.Set("Manage", fmt.Sprint(*params.Manage)) -} - if params != nil && params.Read != nil { - data.Set("Read", fmt.Sprint(*params.Read)) -} - if params != nil && params.Write != nil { - data.Set("Write", fmt.Sprint(*params.Write)) -} + data := url.Values{} + headers := 0 + if params != nil && params.Manage != nil { + data.Set("Manage", fmt.Sprint(*params.Manage)) + } + if params != nil && params.Read != nil { + data.Set("Read", fmt.Sprint(*params.Read)) + } + if params != nil && params.Write != nil { + data.Set("Write", fmt.Sprint(*params.Write)) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &SyncV1ServiceDocumentDocumentPermission{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &SyncV1ServiceDocumentDocumentPermission{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateServiceParams Optional parameters for the method 'UpdateService' type UpdateServiceParams struct { - AclEnabled *bool `json:"AclEnabled,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - ReachabilityDebouncingEnabled *bool `json:"ReachabilityDebouncingEnabled,omitempty"` - ReachabilityDebouncingWindow *int32 `json:"ReachabilityDebouncingWindow,omitempty"` - ReachabilityWebhooksEnabled *bool `json:"ReachabilityWebhooksEnabled,omitempty"` - WebhookUrl *string `json:"WebhookUrl,omitempty"` - WebhooksFromRestEnabled *bool `json:"WebhooksFromRestEnabled,omitempty"` + AclEnabled *bool `json:"AclEnabled,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + ReachabilityDebouncingEnabled *bool `json:"ReachabilityDebouncingEnabled,omitempty"` + ReachabilityDebouncingWindow *int32 `json:"ReachabilityDebouncingWindow,omitempty"` + ReachabilityWebhooksEnabled *bool `json:"ReachabilityWebhooksEnabled,omitempty"` + WebhookUrl *string `json:"WebhookUrl,omitempty"` + WebhooksFromRestEnabled *bool `json:"WebhooksFromRestEnabled,omitempty"` } /* @@ -1621,55 +1587,55 @@ type UpdateServiceParams struct { * @param "WebhookUrl" (string) - The URL we should call when Sync objects are manipulated. * @param "WebhooksFromRestEnabled" (bool) - Whether the Service instance should call `webhook_url` when the REST API is used to update Sync objects. The default is `false`. * @return SyncV1Service -*/ + */ func (c *DefaultApiService) UpdateService(Sid string, params *UpdateServiceParams) (*SyncV1Service, error) { - path := "/v1/Services/{Sid}" + path := "/v1/Services/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.AclEnabled != nil { - data.Set("AclEnabled", fmt.Sprint(*params.AclEnabled)) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.ReachabilityDebouncingEnabled != nil { - data.Set("ReachabilityDebouncingEnabled", fmt.Sprint(*params.ReachabilityDebouncingEnabled)) -} - if params != nil && params.ReachabilityDebouncingWindow != nil { - data.Set("ReachabilityDebouncingWindow", fmt.Sprint(*params.ReachabilityDebouncingWindow)) -} - if params != nil && params.ReachabilityWebhooksEnabled != nil { - data.Set("ReachabilityWebhooksEnabled", fmt.Sprint(*params.ReachabilityWebhooksEnabled)) -} - if params != nil && params.WebhookUrl != nil { - data.Set("WebhookUrl", *params.WebhookUrl) -} - if params != nil && params.WebhooksFromRestEnabled != nil { - data.Set("WebhooksFromRestEnabled", fmt.Sprint(*params.WebhooksFromRestEnabled)) -} + data := url.Values{} + headers := 0 + if params != nil && params.AclEnabled != nil { + data.Set("AclEnabled", fmt.Sprint(*params.AclEnabled)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.ReachabilityDebouncingEnabled != nil { + data.Set("ReachabilityDebouncingEnabled", fmt.Sprint(*params.ReachabilityDebouncingEnabled)) + } + if params != nil && params.ReachabilityDebouncingWindow != nil { + data.Set("ReachabilityDebouncingWindow", fmt.Sprint(*params.ReachabilityDebouncingWindow)) + } + if params != nil && params.ReachabilityWebhooksEnabled != nil { + data.Set("ReachabilityWebhooksEnabled", fmt.Sprint(*params.ReachabilityWebhooksEnabled)) + } + if params != nil && params.WebhookUrl != nil { + data.Set("WebhookUrl", *params.WebhookUrl) + } + if params != nil && params.WebhooksFromRestEnabled != nil { + data.Set("WebhooksFromRestEnabled", fmt.Sprint(*params.WebhooksFromRestEnabled)) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &SyncV1Service{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &SyncV1Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateSyncListParams Optional parameters for the method 'UpdateSyncList' type UpdateSyncListParams struct { CollectionTtl *int32 `json:"CollectionTtl,omitempty"` - Ttl *int32 `json:"Ttl,omitempty"` + Ttl *int32 `json:"Ttl,omitempty"` } /* @@ -1680,44 +1646,44 @@ type UpdateSyncListParams struct { * @param "CollectionTtl" (int32) - How long, in seconds, before the Sync List expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the Sync List does not expire. The Sync List will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. * @param "Ttl" (int32) - An alias for `collection_ttl`. If both are provided, this value is ignored. * @return SyncV1ServiceSyncList -*/ + */ func (c *DefaultApiService) UpdateSyncList(ServiceSid string, Sid string, params *UpdateSyncListParams) (*SyncV1ServiceSyncList, error) { - path := "/v1/Services/{ServiceSid}/Lists/{Sid}" + path := "/v1/Services/{ServiceSid}/Lists/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.CollectionTtl != nil { - data.Set("CollectionTtl", fmt.Sprint(*params.CollectionTtl)) -} - if params != nil && params.Ttl != nil { - data.Set("Ttl", fmt.Sprint(*params.Ttl)) -} + data := url.Values{} + headers := 0 + if params != nil && params.CollectionTtl != nil { + data.Set("CollectionTtl", fmt.Sprint(*params.CollectionTtl)) + } + if params != nil && params.Ttl != nil { + data.Set("Ttl", fmt.Sprint(*params.Ttl)) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &SyncV1ServiceSyncList{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &SyncV1ServiceSyncList{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateSyncListItemParams Optional parameters for the method 'UpdateSyncListItem' type UpdateSyncListItemParams struct { - IfMatch *string `json:"If-Match,omitempty"` - CollectionTtl *int32 `json:"CollectionTtl,omitempty"` - Data *map[string]interface{} `json:"Data,omitempty"` - ItemTtl *int32 `json:"ItemTtl,omitempty"` - Ttl *int32 `json:"Ttl,omitempty"` + IfMatch *string `json:"If-Match,omitempty"` + CollectionTtl *int32 `json:"CollectionTtl,omitempty"` + Data *map[string]interface{} `json:"Data,omitempty"` + ItemTtl *int32 `json:"ItemTtl,omitempty"` + Ttl *int32 `json:"Ttl,omitempty"` } /* @@ -1732,58 +1698,59 @@ type UpdateSyncListItemParams struct { * @param "ItemTtl" (int32) - How long, in seconds, before the List Item expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the List Item does not expire. The List Item will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. * @param "Ttl" (int32) - An alias for `item_ttl`. If both parameters are provided, this value is ignored. * @return SyncV1ServiceSyncListSyncListItem -*/ + */ func (c *DefaultApiService) UpdateSyncListItem(ServiceSid string, ListSid string, Index int32, params *UpdateSyncListItemParams) (*SyncV1ServiceSyncListSyncListItem, error) { - path := "/v1/Services/{ServiceSid}/Lists/{ListSid}/Items/{Index}" + path := "/v1/Services/{ServiceSid}/Lists/{ListSid}/Items/{Index}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ListSid"+"}", ListSid, -1) path = strings.Replace(path, "{"+"Index"+"}", fmt.Sprint(Index), -1) - data := url.Values{} - headers := make(map[string]interface{}) - - if params != nil && params.CollectionTtl != nil { - data.Set("CollectionTtl", fmt.Sprint(*params.CollectionTtl)) -} - if params != nil && params.Data != nil { - v, err := json.Marshal(params.Data) + data := url.Values{} + headers := make(map[string]interface{}) - if err != nil { - return nil, err + if params != nil && params.CollectionTtl != nil { + data.Set("CollectionTtl", fmt.Sprint(*params.CollectionTtl)) } + if params != nil && params.Data != nil { + v, err := json.Marshal(params.Data) - data.Set("Data", fmt.Sprint(v)) -} - if params != nil && params.ItemTtl != nil { - data.Set("ItemTtl", fmt.Sprint(*params.ItemTtl)) -} - if params != nil && params.Ttl != nil { - data.Set("Ttl", fmt.Sprint(*params.Ttl)) -} + if err != nil { + return nil, err + } + + data.Set("Data", fmt.Sprint(v)) + } + if params != nil && params.ItemTtl != nil { + data.Set("ItemTtl", fmt.Sprint(*params.ItemTtl)) + } + if params != nil && params.Ttl != nil { + data.Set("Ttl", fmt.Sprint(*params.Ttl)) + } if params != nil && params.IfMatch != nil { headers["IfMatch"] = *params.IfMatch } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &SyncV1ServiceSyncListSyncListItem{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &SyncV1ServiceSyncListSyncListItem{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateSyncListPermissionParams Optional parameters for the method 'UpdateSyncListPermission' type UpdateSyncListPermissionParams struct { Manage *bool `json:"Manage,omitempty"` - Read *bool `json:"Read,omitempty"` - Write *bool `json:"Write,omitempty"` + Read *bool `json:"Read,omitempty"` + Write *bool `json:"Write,omitempty"` } /* @@ -1797,45 +1764,45 @@ type UpdateSyncListPermissionParams struct { * @param "Read" (bool) - Whether the identity can read the Sync List and its Items. Default value is `false`. * @param "Write" (bool) - Whether the identity can create, update, and delete Items in the Sync List. Default value is `false`. * @return SyncV1ServiceSyncListSyncListPermission -*/ + */ func (c *DefaultApiService) UpdateSyncListPermission(ServiceSid string, ListSid string, Identity string, params *UpdateSyncListPermissionParams) (*SyncV1ServiceSyncListSyncListPermission, error) { - path := "/v1/Services/{ServiceSid}/Lists/{ListSid}/Permissions/{Identity}" + path := "/v1/Services/{ServiceSid}/Lists/{ListSid}/Permissions/{Identity}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"ListSid"+"}", ListSid, -1) path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Manage != nil { - data.Set("Manage", fmt.Sprint(*params.Manage)) -} - if params != nil && params.Read != nil { - data.Set("Read", fmt.Sprint(*params.Read)) -} - if params != nil && params.Write != nil { - data.Set("Write", fmt.Sprint(*params.Write)) -} + data := url.Values{} + headers := 0 + if params != nil && params.Manage != nil { + data.Set("Manage", fmt.Sprint(*params.Manage)) + } + if params != nil && params.Read != nil { + data.Set("Read", fmt.Sprint(*params.Read)) + } + if params != nil && params.Write != nil { + data.Set("Write", fmt.Sprint(*params.Write)) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &SyncV1ServiceSyncListSyncListPermission{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &SyncV1ServiceSyncListSyncListPermission{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateSyncMapParams Optional parameters for the method 'UpdateSyncMap' type UpdateSyncMapParams struct { CollectionTtl *int32 `json:"CollectionTtl,omitempty"` - Ttl *int32 `json:"Ttl,omitempty"` + Ttl *int32 `json:"Ttl,omitempty"` } /* @@ -1846,51 +1813,51 @@ type UpdateSyncMapParams struct { * @param "CollectionTtl" (int32) - How long, in seconds, before the Sync Map expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the Sync Map does not expire. The Sync Map will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. * @param "Ttl" (int32) - An alias for `collection_ttl`. If both parameters are provided, this value is ignored. * @return SyncV1ServiceSyncMap -*/ + */ func (c *DefaultApiService) UpdateSyncMap(ServiceSid string, Sid string, params *UpdateSyncMapParams) (*SyncV1ServiceSyncMap, error) { - path := "/v1/Services/{ServiceSid}/Maps/{Sid}" + path := "/v1/Services/{ServiceSid}/Maps/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.CollectionTtl != nil { - data.Set("CollectionTtl", fmt.Sprint(*params.CollectionTtl)) -} - if params != nil && params.Ttl != nil { - data.Set("Ttl", fmt.Sprint(*params.Ttl)) -} + data := url.Values{} + headers := 0 + if params != nil && params.CollectionTtl != nil { + data.Set("CollectionTtl", fmt.Sprint(*params.CollectionTtl)) + } + if params != nil && params.Ttl != nil { + data.Set("Ttl", fmt.Sprint(*params.Ttl)) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &SyncV1ServiceSyncMap{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &SyncV1ServiceSyncMap{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateSyncMapItemParams Optional parameters for the method 'UpdateSyncMapItem' type UpdateSyncMapItemParams struct { - IfMatch *string `json:"If-Match,omitempty"` - CollectionTtl *int32 `json:"CollectionTtl,omitempty"` - Data *map[string]interface{} `json:"Data,omitempty"` - ItemTtl *int32 `json:"ItemTtl,omitempty"` - Ttl *int32 `json:"Ttl,omitempty"` + IfMatch *string `json:"If-Match,omitempty"` + CollectionTtl *int32 `json:"CollectionTtl,omitempty"` + Data *map[string]interface{} `json:"Data,omitempty"` + ItemTtl *int32 `json:"ItemTtl,omitempty"` + Ttl *int32 `json:"Ttl,omitempty"` } /* * UpdateSyncMapItem Method for UpdateSyncMapItem * @param ServiceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync Map Item resource to update. * @param MapSid The SID of the Sync Map with the Sync Map Item resource to update. Can be the Sync Map resource's `sid` or its `unique_name`. -* @param Key The `key` value of the Sync Map Item resource to update. +* @param Key The `key` value of the Sync Map Item resource to update. * @param optional nil or *UpdateSyncMapItemParams - Optional Parameters: * @param "IfMatch" (string) - If provided, applies this mutation if (and only if) the “revision” field of this [map item] matches the provided value. This matches the semantics of (and is implemented with) the HTTP [If-Match header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Match). * @param "CollectionTtl" (int32) - How long, in seconds, before the Map Item's parent Sync Map expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the parent Sync Map does not expire. This parameter can only be used when the Map Item's `data` or `ttl` is updated in the same request. The Sync Map will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. @@ -1898,58 +1865,59 @@ type UpdateSyncMapItemParams struct { * @param "ItemTtl" (int32) - How long, in seconds, before the Map Item expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the Map Item does not expire. The Map Item will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. * @param "Ttl" (int32) - An alias for `item_ttl`. If both parameters are provided, this value is ignored. * @return SyncV1ServiceSyncMapSyncMapItem -*/ + */ func (c *DefaultApiService) UpdateSyncMapItem(ServiceSid string, MapSid string, Key string, params *UpdateSyncMapItemParams) (*SyncV1ServiceSyncMapSyncMapItem, error) { - path := "/v1/Services/{ServiceSid}/Maps/{MapSid}/Items/{Key}" + path := "/v1/Services/{ServiceSid}/Maps/{MapSid}/Items/{Key}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"MapSid"+"}", MapSid, -1) path = strings.Replace(path, "{"+"Key"+"}", Key, -1) - data := url.Values{} - headers := make(map[string]interface{}) - - if params != nil && params.CollectionTtl != nil { - data.Set("CollectionTtl", fmt.Sprint(*params.CollectionTtl)) -} - if params != nil && params.Data != nil { - v, err := json.Marshal(params.Data) + data := url.Values{} + headers := make(map[string]interface{}) - if err != nil { - return nil, err + if params != nil && params.CollectionTtl != nil { + data.Set("CollectionTtl", fmt.Sprint(*params.CollectionTtl)) } + if params != nil && params.Data != nil { + v, err := json.Marshal(params.Data) - data.Set("Data", fmt.Sprint(v)) -} - if params != nil && params.ItemTtl != nil { - data.Set("ItemTtl", fmt.Sprint(*params.ItemTtl)) -} - if params != nil && params.Ttl != nil { - data.Set("Ttl", fmt.Sprint(*params.Ttl)) -} + if err != nil { + return nil, err + } + + data.Set("Data", fmt.Sprint(v)) + } + if params != nil && params.ItemTtl != nil { + data.Set("ItemTtl", fmt.Sprint(*params.ItemTtl)) + } + if params != nil && params.Ttl != nil { + data.Set("Ttl", fmt.Sprint(*params.Ttl)) + } if params != nil && params.IfMatch != nil { headers["IfMatch"] = *params.IfMatch } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &SyncV1ServiceSyncMapSyncMapItem{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &SyncV1ServiceSyncMapSyncMapItem{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateSyncMapPermissionParams Optional parameters for the method 'UpdateSyncMapPermission' type UpdateSyncMapPermissionParams struct { Manage *bool `json:"Manage,omitempty"` - Read *bool `json:"Read,omitempty"` - Write *bool `json:"Write,omitempty"` + Read *bool `json:"Read,omitempty"` + Write *bool `json:"Write,omitempty"` } /* @@ -1963,41 +1931,41 @@ type UpdateSyncMapPermissionParams struct { * @param "Read" (bool) - Whether the identity can read the Sync Map and its Items. Default value is `false`. * @param "Write" (bool) - Whether the identity can create, update, and delete Items in the Sync Map. Default value is `false`. * @return SyncV1ServiceSyncMapSyncMapPermission -*/ + */ func (c *DefaultApiService) UpdateSyncMapPermission(ServiceSid string, MapSid string, Identity string, params *UpdateSyncMapPermissionParams) (*SyncV1ServiceSyncMapSyncMapPermission, error) { - path := "/v1/Services/{ServiceSid}/Maps/{MapSid}/Permissions/{Identity}" + path := "/v1/Services/{ServiceSid}/Maps/{MapSid}/Permissions/{Identity}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"MapSid"+"}", MapSid, -1) path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Manage != nil { - data.Set("Manage", fmt.Sprint(*params.Manage)) -} - if params != nil && params.Read != nil { - data.Set("Read", fmt.Sprint(*params.Read)) -} - if params != nil && params.Write != nil { - data.Set("Write", fmt.Sprint(*params.Write)) -} + data := url.Values{} + headers := 0 + if params != nil && params.Manage != nil { + data.Set("Manage", fmt.Sprint(*params.Manage)) + } + if params != nil && params.Read != nil { + data.Set("Read", fmt.Sprint(*params.Read)) + } + if params != nil && params.Write != nil { + data.Set("Write", fmt.Sprint(*params.Write)) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &SyncV1ServiceSyncMapSyncMapPermission{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &SyncV1ServiceSyncMapSyncMapPermission{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateSyncStreamParams Optional parameters for the method 'UpdateSyncStream' type UpdateSyncStreamParams struct { Ttl *int32 `json:"Ttl,omitempty"` @@ -2011,31 +1979,30 @@ type UpdateSyncStreamParams struct { * @param optional nil or *UpdateSyncStreamParams - Optional Parameters: * @param "Ttl" (int32) - How long, in seconds, before the Stream expires and is deleted (time-to-live). Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the Stream does not expire. The Stream will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. * @return SyncV1ServiceSyncStream -*/ + */ func (c *DefaultApiService) UpdateSyncStream(ServiceSid string, Sid string, params *UpdateSyncStreamParams) (*SyncV1ServiceSyncStream, error) { - path := "/v1/Services/{ServiceSid}/Streams/{Sid}" + path := "/v1/Services/{ServiceSid}/Streams/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Ttl != nil { - data.Set("Ttl", fmt.Sprint(*params.Ttl)) -} + data := url.Values{} + headers := 0 + if params != nil && params.Ttl != nil { + data.Set("Ttl", fmt.Sprint(*params.Ttl)) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &SyncV1ServiceSyncStream{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &SyncV1ServiceSyncStream{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } diff --git a/twilio/rest/sync/v1/model_list_document_permission_response.go b/twilio/rest/sync/v1/model_list_document_permission_response.go index 558eababc..71029f1b1 100644 --- a/twilio/rest/sync/v1/model_list_document_permission_response.go +++ b/twilio/rest/sync/v1/model_list_document_permission_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Sync - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListDocumentPermissionResponse struct for ListDocumentPermissionResponse type ListDocumentPermissionResponse struct { - Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` Permissions []SyncV1ServiceDocumentDocumentPermission `json:"Permissions,omitempty"` } diff --git a/twilio/rest/sync/v1/model_list_document_response.go b/twilio/rest/sync/v1/model_list_document_response.go index 152bfce47..41036b37a 100644 --- a/twilio/rest/sync/v1/model_list_document_response.go +++ b/twilio/rest/sync/v1/model_list_document_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Sync - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListDocumentResponse struct for ListDocumentResponse type ListDocumentResponse struct { Documents []SyncV1ServiceDocument `json:"Documents,omitempty"` - Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/sync/v1/model_list_service_response.go b/twilio/rest/sync/v1/model_list_service_response.go index 07d586f2d..591f94445 100644 --- a/twilio/rest/sync/v1/model_list_service_response.go +++ b/twilio/rest/sync/v1/model_list_service_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Sync - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListServiceResponse struct for ListServiceResponse type ListServiceResponse struct { - Meta ListServiceResponseMeta `json:"Meta,omitempty"` - Services []SyncV1Service `json:"Services,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Services []SyncV1Service `json:"Services,omitempty"` } diff --git a/twilio/rest/sync/v1/model_list_service_response_meta.go b/twilio/rest/sync/v1/model_list_service_response_meta.go index b37848e94..243647d27 100644 --- a/twilio/rest/sync/v1/model_list_service_response_meta.go +++ b/twilio/rest/sync/v1/model_list_service_response_meta.go @@ -1,22 +1,23 @@ /* - * Twilio - Sync - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListServiceResponseMeta struct for ListServiceResponseMeta type ListServiceResponseMeta struct { - FirstPageUrl string `json:"FirstPageUrl,omitempty"` - Key string `json:"Key,omitempty"` - NextPageUrl string `json:"NextPageUrl,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` - Url string `json:"Url,omitempty"` + Url string `json:"Url,omitempty"` } diff --git a/twilio/rest/sync/v1/model_list_sync_list_item_response.go b/twilio/rest/sync/v1/model_list_sync_list_item_response.go index cfc97e182..fb81bfc83 100644 --- a/twilio/rest/sync/v1/model_list_sync_list_item_response.go +++ b/twilio/rest/sync/v1/model_list_sync_list_item_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Sync - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListSyncListItemResponse struct for ListSyncListItemResponse type ListSyncListItemResponse struct { Items []SyncV1ServiceSyncListSyncListItem `json:"Items,omitempty"` - Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/sync/v1/model_list_sync_list_permission_response.go b/twilio/rest/sync/v1/model_list_sync_list_permission_response.go index d7aebadae..028cfcd5f 100644 --- a/twilio/rest/sync/v1/model_list_sync_list_permission_response.go +++ b/twilio/rest/sync/v1/model_list_sync_list_permission_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Sync - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListSyncListPermissionResponse struct for ListSyncListPermissionResponse type ListSyncListPermissionResponse struct { - Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` Permissions []SyncV1ServiceSyncListSyncListPermission `json:"Permissions,omitempty"` } diff --git a/twilio/rest/sync/v1/model_list_sync_list_response.go b/twilio/rest/sync/v1/model_list_sync_list_response.go index 8de938d66..359c4c291 100644 --- a/twilio/rest/sync/v1/model_list_sync_list_response.go +++ b/twilio/rest/sync/v1/model_list_sync_list_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Sync - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListSyncListResponse struct for ListSyncListResponse type ListSyncListResponse struct { Lists []SyncV1ServiceSyncList `json:"Lists,omitempty"` - Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/sync/v1/model_list_sync_map_item_response.go b/twilio/rest/sync/v1/model_list_sync_map_item_response.go index 4b1da7c17..446a3020f 100644 --- a/twilio/rest/sync/v1/model_list_sync_map_item_response.go +++ b/twilio/rest/sync/v1/model_list_sync_map_item_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Sync - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListSyncMapItemResponse struct for ListSyncMapItemResponse type ListSyncMapItemResponse struct { Items []SyncV1ServiceSyncMapSyncMapItem `json:"Items,omitempty"` - Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/sync/v1/model_list_sync_map_permission_response.go b/twilio/rest/sync/v1/model_list_sync_map_permission_response.go index 4aa5f1e77..c725a2e85 100644 --- a/twilio/rest/sync/v1/model_list_sync_map_permission_response.go +++ b/twilio/rest/sync/v1/model_list_sync_map_permission_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Sync - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListSyncMapPermissionResponse struct for ListSyncMapPermissionResponse type ListSyncMapPermissionResponse struct { - Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` Permissions []SyncV1ServiceSyncMapSyncMapPermission `json:"Permissions,omitempty"` } diff --git a/twilio/rest/sync/v1/model_list_sync_map_response.go b/twilio/rest/sync/v1/model_list_sync_map_response.go index 9d6e83b58..34ddfbdbf 100644 --- a/twilio/rest/sync/v1/model_list_sync_map_response.go +++ b/twilio/rest/sync/v1/model_list_sync_map_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Sync - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListSyncMapResponse struct for ListSyncMapResponse type ListSyncMapResponse struct { - Maps []SyncV1ServiceSyncMap `json:"Maps,omitempty"` + Maps []SyncV1ServiceSyncMap `json:"Maps,omitempty"` Meta ListServiceResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/sync/v1/model_list_sync_stream_response.go b/twilio/rest/sync/v1/model_list_sync_stream_response.go index 294413210..ec341052f 100644 --- a/twilio/rest/sync/v1/model_list_sync_stream_response.go +++ b/twilio/rest/sync/v1/model_list_sync_stream_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Sync - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListSyncStreamResponse struct for ListSyncStreamResponse type ListSyncStreamResponse struct { - Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` Streams []SyncV1ServiceSyncStream `json:"Streams,omitempty"` } diff --git a/twilio/rest/sync/v1/model_sync_v1_service.go b/twilio/rest/sync/v1/model_sync_v1_service.go index 345f36c70..3a1566374 100644 --- a/twilio/rest/sync/v1/model_sync_v1_service.go +++ b/twilio/rest/sync/v1/model_sync_v1_service.go @@ -1,18 +1,20 @@ /* - * Twilio - Sync - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // SyncV1Service struct for SyncV1Service type SyncV1Service struct { // The SID of the Account that created the resource diff --git a/twilio/rest/sync/v1/model_sync_v1_service_document.go b/twilio/rest/sync/v1/model_sync_v1_service_document.go index 1a73ef5de..5bcbf4f73 100644 --- a/twilio/rest/sync/v1/model_sync_v1_service_document.go +++ b/twilio/rest/sync/v1/model_sync_v1_service_document.go @@ -1,18 +1,20 @@ /* - * Twilio - Sync - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // SyncV1ServiceDocument struct for SyncV1ServiceDocument type SyncV1ServiceDocument struct { // The SID of the Account that created the resource diff --git a/twilio/rest/sync/v1/model_sync_v1_service_document_document_permission.go b/twilio/rest/sync/v1/model_sync_v1_service_document_document_permission.go index a989c0b8c..16bc4177a 100644 --- a/twilio/rest/sync/v1/model_sync_v1_service_document_document_permission.go +++ b/twilio/rest/sync/v1/model_sync_v1_service_document_document_permission.go @@ -1,15 +1,16 @@ /* - * Twilio - Sync - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // SyncV1ServiceDocumentDocumentPermission struct for SyncV1ServiceDocumentDocumentPermission type SyncV1ServiceDocumentDocumentPermission struct { // The SID of the Account that created the resource diff --git a/twilio/rest/sync/v1/model_sync_v1_service_sync_list.go b/twilio/rest/sync/v1/model_sync_v1_service_sync_list.go index 7117557bc..804206a5f 100644 --- a/twilio/rest/sync/v1/model_sync_v1_service_sync_list.go +++ b/twilio/rest/sync/v1/model_sync_v1_service_sync_list.go @@ -1,18 +1,20 @@ /* - * Twilio - Sync - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // SyncV1ServiceSyncList struct for SyncV1ServiceSyncList type SyncV1ServiceSyncList struct { // The SID of the Account that created the resource diff --git a/twilio/rest/sync/v1/model_sync_v1_service_sync_list_sync_list_item.go b/twilio/rest/sync/v1/model_sync_v1_service_sync_list_sync_list_item.go index f6b3a67dc..f48dc36ac 100644 --- a/twilio/rest/sync/v1/model_sync_v1_service_sync_list_sync_list_item.go +++ b/twilio/rest/sync/v1/model_sync_v1_service_sync_list_sync_list_item.go @@ -1,18 +1,20 @@ /* - * Twilio - Sync - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // SyncV1ServiceSyncListSyncListItem struct for SyncV1ServiceSyncListSyncListItem type SyncV1ServiceSyncListSyncListItem struct { // The SID of the Account that created the resource diff --git a/twilio/rest/sync/v1/model_sync_v1_service_sync_list_sync_list_permission.go b/twilio/rest/sync/v1/model_sync_v1_service_sync_list_sync_list_permission.go index 71a8a8aa2..0c932f3a7 100644 --- a/twilio/rest/sync/v1/model_sync_v1_service_sync_list_sync_list_permission.go +++ b/twilio/rest/sync/v1/model_sync_v1_service_sync_list_sync_list_permission.go @@ -1,15 +1,16 @@ /* - * Twilio - Sync - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // SyncV1ServiceSyncListSyncListPermission struct for SyncV1ServiceSyncListSyncListPermission type SyncV1ServiceSyncListSyncListPermission struct { // The SID of the Account that created the resource diff --git a/twilio/rest/sync/v1/model_sync_v1_service_sync_map.go b/twilio/rest/sync/v1/model_sync_v1_service_sync_map.go index 1d7b301a6..66877b36a 100644 --- a/twilio/rest/sync/v1/model_sync_v1_service_sync_map.go +++ b/twilio/rest/sync/v1/model_sync_v1_service_sync_map.go @@ -1,18 +1,20 @@ /* - * Twilio - Sync - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // SyncV1ServiceSyncMap struct for SyncV1ServiceSyncMap type SyncV1ServiceSyncMap struct { // The SID of the Account that created the resource diff --git a/twilio/rest/sync/v1/model_sync_v1_service_sync_map_sync_map_item.go b/twilio/rest/sync/v1/model_sync_v1_service_sync_map_sync_map_item.go index 6a3638121..707181731 100644 --- a/twilio/rest/sync/v1/model_sync_v1_service_sync_map_sync_map_item.go +++ b/twilio/rest/sync/v1/model_sync_v1_service_sync_map_sync_map_item.go @@ -1,18 +1,20 @@ /* - * Twilio - Sync - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // SyncV1ServiceSyncMapSyncMapItem struct for SyncV1ServiceSyncMapSyncMapItem type SyncV1ServiceSyncMapSyncMapItem struct { // The SID of the Account that created the resource diff --git a/twilio/rest/sync/v1/model_sync_v1_service_sync_map_sync_map_permission.go b/twilio/rest/sync/v1/model_sync_v1_service_sync_map_sync_map_permission.go index 1e288c3e1..284c6bda4 100644 --- a/twilio/rest/sync/v1/model_sync_v1_service_sync_map_sync_map_permission.go +++ b/twilio/rest/sync/v1/model_sync_v1_service_sync_map_sync_map_permission.go @@ -1,15 +1,16 @@ /* - * Twilio - Sync - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // SyncV1ServiceSyncMapSyncMapPermission struct for SyncV1ServiceSyncMapSyncMapPermission type SyncV1ServiceSyncMapSyncMapPermission struct { // The SID of the Account that created the resource diff --git a/twilio/rest/sync/v1/model_sync_v1_service_sync_stream.go b/twilio/rest/sync/v1/model_sync_v1_service_sync_stream.go index bacaffb6f..b0e1c66f0 100644 --- a/twilio/rest/sync/v1/model_sync_v1_service_sync_stream.go +++ b/twilio/rest/sync/v1/model_sync_v1_service_sync_stream.go @@ -1,18 +1,20 @@ /* - * Twilio - Sync - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // SyncV1ServiceSyncStream struct for SyncV1ServiceSyncStream type SyncV1ServiceSyncStream struct { // The SID of the Account that created the resource diff --git a/twilio/rest/sync/v1/model_sync_v1_service_sync_stream_stream_message.go b/twilio/rest/sync/v1/model_sync_v1_service_sync_stream_stream_message.go index 96f215401..f4df9f1ed 100644 --- a/twilio/rest/sync/v1/model_sync_v1_service_sync_stream_stream_message.go +++ b/twilio/rest/sync/v1/model_sync_v1_service_sync_stream_stream_message.go @@ -1,15 +1,16 @@ /* - * Twilio - Sync - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // SyncV1ServiceSyncStreamStreamMessage struct for SyncV1ServiceSyncStreamStreamMessage type SyncV1ServiceSyncStreamStreamMessage struct { // Stream Message body diff --git a/twilio/rest/taskrouter/v1/api_default.go b/twilio/rest/taskrouter/v1/api_default.go index 98a96facb..21542a99b 100644 --- a/twilio/rest/taskrouter/v1/api_default.go +++ b/twilio/rest/taskrouter/v1/api_default.go @@ -1,11 +1,11 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,11 +14,11 @@ package openapi import ( "encoding/json" "fmt" - twilio "github.com/twilio/twilio-go/client" "net/url" - "strings" - "time" - "reflect" + "strings" + "time" + + twilio "github.com/twilio/twilio-go/client" ) type DefaultApiService struct { @@ -27,15 +27,15 @@ type DefaultApiService struct { } func NewDefaultApiService(client *twilio.Client) *DefaultApiService { - return &DefaultApiService { - client: client, + return &DefaultApiService{ + client: client, baseURL: "https://taskrouter.twilio.com", } } // CreateActivityParams Optional parameters for the method 'CreateActivity' type CreateActivityParams struct { - Available *bool `json:"Available,omitempty"` + Available *bool `json:"Available,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` } @@ -46,42 +46,42 @@ type CreateActivityParams struct { * @param "Available" (bool) - Whether the Worker should be eligible to receive a Task when it occupies the Activity. A value of `true`, `1`, or `yes` specifies the Activity is available. All other values specify that it is not. The value cannot be changed after the Activity is created. * @param "FriendlyName" (string) - A descriptive string that you create to describe the Activity resource. It can be up to 64 characters long. These names are used to calculate and expose statistics about Workers, and provide visibility into the state of each Worker. Examples of friendly names include: `on-call`, `break`, and `email`. * @return TaskrouterV1WorkspaceActivity -*/ + */ func (c *DefaultApiService) CreateActivity(WorkspaceSid string, params *CreateActivityParams) (*TaskrouterV1WorkspaceActivity, error) { - path := "/v1/Workspaces/{WorkspaceSid}/Activities" + path := "/v1/Workspaces/{WorkspaceSid}/Activities" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Available != nil { - data.Set("Available", fmt.Sprint(*params.Available)) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} + data := url.Values{} + headers := 0 + if params != nil && params.Available != nil { + data.Set("Available", fmt.Sprint(*params.Available)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &TaskrouterV1WorkspaceActivity{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TaskrouterV1WorkspaceActivity{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateTaskParams Optional parameters for the method 'CreateTask' type CreateTaskParams struct { - Attributes *string `json:"Attributes,omitempty"` - Priority *int32 `json:"Priority,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + Priority *int32 `json:"Priority,omitempty"` TaskChannel *string `json:"TaskChannel,omitempty"` - Timeout *int32 `json:"Timeout,omitempty"` + Timeout *int32 `json:"Timeout,omitempty"` WorkflowSid *string `json:"WorkflowSid,omitempty"` } @@ -95,50 +95,50 @@ type CreateTaskParams struct { * @param "Timeout" (int32) - The amount of time in seconds the new task can live before being assigned. Can be up to a maximum of 2 weeks (1,209,600 seconds). The default value is 24 hours (86,400 seconds). On timeout, the `task.canceled` event will fire with description `Task TTL Exceeded`. * @param "WorkflowSid" (string) - The SID of the Workflow that you would like to handle routing for the new Task. If there is only one Workflow defined for the Workspace that you are posting the new task to, this parameter is optional. * @return TaskrouterV1WorkspaceTask -*/ + */ func (c *DefaultApiService) CreateTask(WorkspaceSid string, params *CreateTaskParams) (*TaskrouterV1WorkspaceTask, error) { - path := "/v1/Workspaces/{WorkspaceSid}/Tasks" + path := "/v1/Workspaces/{WorkspaceSid}/Tasks" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) -} - if params != nil && params.Priority != nil { - data.Set("Priority", fmt.Sprint(*params.Priority)) -} - if params != nil && params.TaskChannel != nil { - data.Set("TaskChannel", *params.TaskChannel) -} - if params != nil && params.Timeout != nil { - data.Set("Timeout", fmt.Sprint(*params.Timeout)) -} - if params != nil && params.WorkflowSid != nil { - data.Set("WorkflowSid", *params.WorkflowSid) -} + data := url.Values{} + headers := 0 + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.Priority != nil { + data.Set("Priority", fmt.Sprint(*params.Priority)) + } + if params != nil && params.TaskChannel != nil { + data.Set("TaskChannel", *params.TaskChannel) + } + if params != nil && params.Timeout != nil { + data.Set("Timeout", fmt.Sprint(*params.Timeout)) + } + if params != nil && params.WorkflowSid != nil { + data.Set("WorkflowSid", *params.WorkflowSid) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &TaskrouterV1WorkspaceTask{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TaskrouterV1WorkspaceTask{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateTaskChannelParams Optional parameters for the method 'CreateTaskChannel' type CreateTaskChannelParams struct { - ChannelOptimizedRouting *bool `json:"ChannelOptimizedRouting,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + ChannelOptimizedRouting *bool `json:"ChannelOptimizedRouting,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` } /* @@ -149,47 +149,47 @@ type CreateTaskChannelParams struct { * @param "FriendlyName" (string) - A descriptive string that you create to describe the Task Channel. It can be up to 64 characters long. * @param "UniqueName" (string) - An application-defined string that uniquely identifies the Task Channel, such as `voice` or `sms`. * @return TaskrouterV1WorkspaceTaskChannel -*/ + */ func (c *DefaultApiService) CreateTaskChannel(WorkspaceSid string, params *CreateTaskChannelParams) (*TaskrouterV1WorkspaceTaskChannel, error) { - path := "/v1/Workspaces/{WorkspaceSid}/TaskChannels" + path := "/v1/Workspaces/{WorkspaceSid}/TaskChannels" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.ChannelOptimizedRouting != nil { - data.Set("ChannelOptimizedRouting", fmt.Sprint(*params.ChannelOptimizedRouting)) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) -} + data := url.Values{} + headers := 0 + if params != nil && params.ChannelOptimizedRouting != nil { + data.Set("ChannelOptimizedRouting", fmt.Sprint(*params.ChannelOptimizedRouting)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &TaskrouterV1WorkspaceTaskChannel{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TaskrouterV1WorkspaceTaskChannel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateTaskQueueParams Optional parameters for the method 'CreateTaskQueue' type CreateTaskQueueParams struct { - AssignmentActivitySid *string `json:"AssignmentActivitySid,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - MaxReservedWorkers *int32 `json:"MaxReservedWorkers,omitempty"` + AssignmentActivitySid *string `json:"AssignmentActivitySid,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + MaxReservedWorkers *int32 `json:"MaxReservedWorkers,omitempty"` ReservationActivitySid *string `json:"ReservationActivitySid,omitempty"` - TargetWorkers *string `json:"TargetWorkers,omitempty"` - TaskOrder *string `json:"TaskOrder,omitempty"` + TargetWorkers *string `json:"TargetWorkers,omitempty"` + TaskOrder *string `json:"TaskOrder,omitempty"` } /* @@ -203,52 +203,52 @@ type CreateTaskQueueParams struct { * @param "TargetWorkers" (string) - A string that describes the Worker selection criteria for any Tasks that enter the TaskQueue. For example, `'\\\"language\\\" == \\\"spanish\\\"'`. The default value is `1==1`. If this value is empty, Tasks will wait in the TaskQueue until they are deleted or moved to another TaskQueue. For more information about Worker selection, see [Describing Worker selection criteria](https://www.twilio.com/docs/taskrouter/api/taskqueues#target-workers). * @param "TaskOrder" (string) - How Tasks will be assigned to Workers. Set this parameter to `LIFO` to assign most recently created Task first or FIFO to assign the oldest Task first. Default is `FIFO`. [Click here](https://www.twilio.com/docs/taskrouter/queue-ordering-last-first-out-lifo) to learn more. * @return TaskrouterV1WorkspaceTaskQueue -*/ + */ func (c *DefaultApiService) CreateTaskQueue(WorkspaceSid string, params *CreateTaskQueueParams) (*TaskrouterV1WorkspaceTaskQueue, error) { - path := "/v1/Workspaces/{WorkspaceSid}/TaskQueues" + path := "/v1/Workspaces/{WorkspaceSid}/TaskQueues" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.AssignmentActivitySid != nil { - data.Set("AssignmentActivitySid", *params.AssignmentActivitySid) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.MaxReservedWorkers != nil { - data.Set("MaxReservedWorkers", fmt.Sprint(*params.MaxReservedWorkers)) -} - if params != nil && params.ReservationActivitySid != nil { - data.Set("ReservationActivitySid", *params.ReservationActivitySid) -} - if params != nil && params.TargetWorkers != nil { - data.Set("TargetWorkers", *params.TargetWorkers) -} - if params != nil && params.TaskOrder != nil { - data.Set("TaskOrder", *params.TaskOrder) -} + data := url.Values{} + headers := 0 + if params != nil && params.AssignmentActivitySid != nil { + data.Set("AssignmentActivitySid", *params.AssignmentActivitySid) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.MaxReservedWorkers != nil { + data.Set("MaxReservedWorkers", fmt.Sprint(*params.MaxReservedWorkers)) + } + if params != nil && params.ReservationActivitySid != nil { + data.Set("ReservationActivitySid", *params.ReservationActivitySid) + } + if params != nil && params.TargetWorkers != nil { + data.Set("TargetWorkers", *params.TargetWorkers) + } + if params != nil && params.TaskOrder != nil { + data.Set("TaskOrder", *params.TaskOrder) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &TaskrouterV1WorkspaceTaskQueue{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TaskrouterV1WorkspaceTaskQueue{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateWorkerParams Optional parameters for the method 'CreateWorker' type CreateWorkerParams struct { - ActivitySid *string `json:"ActivitySid,omitempty"` - Attributes *string `json:"Attributes,omitempty"` + ActivitySid *string `json:"ActivitySid,omitempty"` + Attributes *string `json:"Attributes,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` } @@ -260,46 +260,46 @@ type CreateWorkerParams struct { * @param "Attributes" (string) - A valid JSON string that describes the new Worker. For example: `{ \\\"email\\\": \\\"Bob@example.com\\\", \\\"phone\\\": \\\"+5095551234\\\" }`. This data is passed to the `assignment_callback_url` when TaskRouter assigns a Task to the Worker. Defaults to {}. * @param "FriendlyName" (string) - A descriptive string that you create to describe the new Worker. It can be up to 64 characters long. * @return TaskrouterV1WorkspaceWorker -*/ + */ func (c *DefaultApiService) CreateWorker(WorkspaceSid string, params *CreateWorkerParams) (*TaskrouterV1WorkspaceWorker, error) { - path := "/v1/Workspaces/{WorkspaceSid}/Workers" + path := "/v1/Workspaces/{WorkspaceSid}/Workers" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.ActivitySid != nil { - data.Set("ActivitySid", *params.ActivitySid) -} - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} + data := url.Values{} + headers := 0 + if params != nil && params.ActivitySid != nil { + data.Set("ActivitySid", *params.ActivitySid) + } + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &TaskrouterV1WorkspaceWorker{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TaskrouterV1WorkspaceWorker{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateWorkflowParams Optional parameters for the method 'CreateWorkflow' type CreateWorkflowParams struct { - AssignmentCallbackUrl *string `json:"AssignmentCallbackUrl,omitempty"` - Configuration *string `json:"Configuration,omitempty"` + AssignmentCallbackUrl *string `json:"AssignmentCallbackUrl,omitempty"` + Configuration *string `json:"Configuration,omitempty"` FallbackAssignmentCallbackUrl *string `json:"FallbackAssignmentCallbackUrl,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - TaskReservationTimeout *int32 `json:"TaskReservationTimeout,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + TaskReservationTimeout *int32 `json:"TaskReservationTimeout,omitempty"` } /* @@ -312,53 +312,53 @@ type CreateWorkflowParams struct { * @param "FriendlyName" (string) - A descriptive string that you create to describe the Workflow resource. For example, `Inbound Call Workflow` or `2014 Outbound Campaign`. * @param "TaskReservationTimeout" (int32) - How long TaskRouter will wait for a confirmation response from your application after it assigns a Task to a Worker. Can be up to `86,400` (24 hours) and the default is `120`. * @return TaskrouterV1WorkspaceWorkflow -*/ + */ func (c *DefaultApiService) CreateWorkflow(WorkspaceSid string, params *CreateWorkflowParams) (*TaskrouterV1WorkspaceWorkflow, error) { - path := "/v1/Workspaces/{WorkspaceSid}/Workflows" + path := "/v1/Workspaces/{WorkspaceSid}/Workflows" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.AssignmentCallbackUrl != nil { - data.Set("AssignmentCallbackUrl", *params.AssignmentCallbackUrl) -} - if params != nil && params.Configuration != nil { - data.Set("Configuration", *params.Configuration) -} - if params != nil && params.FallbackAssignmentCallbackUrl != nil { - data.Set("FallbackAssignmentCallbackUrl", *params.FallbackAssignmentCallbackUrl) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.TaskReservationTimeout != nil { - data.Set("TaskReservationTimeout", fmt.Sprint(*params.TaskReservationTimeout)) -} + data := url.Values{} + headers := 0 + if params != nil && params.AssignmentCallbackUrl != nil { + data.Set("AssignmentCallbackUrl", *params.AssignmentCallbackUrl) + } + if params != nil && params.Configuration != nil { + data.Set("Configuration", *params.Configuration) + } + if params != nil && params.FallbackAssignmentCallbackUrl != nil { + data.Set("FallbackAssignmentCallbackUrl", *params.FallbackAssignmentCallbackUrl) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.TaskReservationTimeout != nil { + data.Set("TaskReservationTimeout", fmt.Sprint(*params.TaskReservationTimeout)) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &TaskrouterV1WorkspaceWorkflow{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TaskrouterV1WorkspaceWorkflow{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateWorkspaceParams Optional parameters for the method 'CreateWorkspace' type CreateWorkspaceParams struct { - EventCallbackUrl *string `json:"EventCallbackUrl,omitempty"` - EventsFilter *string `json:"EventsFilter,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - MultiTaskEnabled *bool `json:"MultiTaskEnabled,omitempty"` + EventCallbackUrl *string `json:"EventCallbackUrl,omitempty"` + EventsFilter *string `json:"EventsFilter,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + MultiTaskEnabled *bool `json:"MultiTaskEnabled,omitempty"` PrioritizeQueueOrder *string `json:"PrioritizeQueueOrder,omitempty"` - Template *string `json:"Template,omitempty"` + Template *string `json:"Template,omitempty"` } /* @@ -371,219 +371,204 @@ type CreateWorkspaceParams struct { * @param "PrioritizeQueueOrder" (string) - The type of TaskQueue to prioritize when Workers are receiving Tasks from both types of TaskQueues. Can be: `LIFO` or `FIFO` and the default is `FIFO`. For more information, see [Queue Ordering][https://www.twilio.com/docs/taskrouter/queue-ordering-last-first-out-lifo]. * @param "Template" (string) - An available template name. Can be: `NONE` or `FIFO` and the default is `NONE`. Pre-configures the Workspace with the Workflow and Activities specified in the template. `NONE` will create a Workspace with only a set of default activities. `FIFO` will configure TaskRouter with a set of default activities and a single TaskQueue for first-in, first-out distribution, which can be useful when you are getting started with TaskRouter. * @return TaskrouterV1Workspace -*/ + */ func (c *DefaultApiService) CreateWorkspace(params *CreateWorkspaceParams) (*TaskrouterV1Workspace, error) { - path := "/v1/Workspaces" - - data := url.Values{} - headers := 0 + path := "/v1/Workspaces" - if params != nil && params.EventCallbackUrl != nil { - data.Set("EventCallbackUrl", *params.EventCallbackUrl) -} - if params != nil && params.EventsFilter != nil { - data.Set("EventsFilter", *params.EventsFilter) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.MultiTaskEnabled != nil { - data.Set("MultiTaskEnabled", fmt.Sprint(*params.MultiTaskEnabled)) -} - if params != nil && params.PrioritizeQueueOrder != nil { - data.Set("PrioritizeQueueOrder", *params.PrioritizeQueueOrder) -} - if params != nil && params.Template != nil { - data.Set("Template", *params.Template) -} + data := url.Values{} + headers := 0 + if params != nil && params.EventCallbackUrl != nil { + data.Set("EventCallbackUrl", *params.EventCallbackUrl) + } + if params != nil && params.EventsFilter != nil { + data.Set("EventsFilter", *params.EventsFilter) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.MultiTaskEnabled != nil { + data.Set("MultiTaskEnabled", fmt.Sprint(*params.MultiTaskEnabled)) + } + if params != nil && params.PrioritizeQueueOrder != nil { + data.Set("PrioritizeQueueOrder", *params.PrioritizeQueueOrder) + } + if params != nil && params.Template != nil { + data.Set("Template", *params.Template) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &TaskrouterV1Workspace{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TaskrouterV1Workspace{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * DeleteActivity Method for DeleteActivity * @param WorkspaceSid The SID of the Workspace with the Activity resources to delete. * @param Sid The SID of the Activity resource to delete. -*/ -func (c *DefaultApiService) DeleteActivity(WorkspaceSid string, Sid string, ) (error) { - path := "/v1/Workspaces/{WorkspaceSid}/Activities/{Sid}" + */ +func (c *DefaultApiService) DeleteActivity(WorkspaceSid string, Sid string) error { + path := "/v1/Workspaces/{WorkspaceSid}/Activities/{Sid}" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* * DeleteTask Method for DeleteTask * @param WorkspaceSid The SID of the Workspace with the Task to delete. * @param Sid The SID of the Task resource to delete. -*/ -func (c *DefaultApiService) DeleteTask(WorkspaceSid string, Sid string, ) (error) { - path := "/v1/Workspaces/{WorkspaceSid}/Tasks/{Sid}" + */ +func (c *DefaultApiService) DeleteTask(WorkspaceSid string, Sid string) error { + path := "/v1/Workspaces/{WorkspaceSid}/Tasks/{Sid}" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* * DeleteTaskChannel Method for DeleteTaskChannel * @param WorkspaceSid The SID of the Workspace with the Task Channel to delete. * @param Sid The SID of the Task Channel resource to delete. -*/ -func (c *DefaultApiService) DeleteTaskChannel(WorkspaceSid string, Sid string, ) (error) { - path := "/v1/Workspaces/{WorkspaceSid}/TaskChannels/{Sid}" + */ +func (c *DefaultApiService) DeleteTaskChannel(WorkspaceSid string, Sid string) error { + path := "/v1/Workspaces/{WorkspaceSid}/TaskChannels/{Sid}" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + defer resp.Body.Close() - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() - - return nil + return nil } /* * DeleteTaskQueue Method for DeleteTaskQueue * @param WorkspaceSid The SID of the Workspace with the TaskQueue to delete. * @param Sid The SID of the TaskQueue resource to delete. -*/ -func (c *DefaultApiService) DeleteTaskQueue(WorkspaceSid string, Sid string, ) (error) { - path := "/v1/Workspaces/{WorkspaceSid}/TaskQueues/{Sid}" + */ +func (c *DefaultApiService) DeleteTaskQueue(WorkspaceSid string, Sid string) error { + path := "/v1/Workspaces/{WorkspaceSid}/TaskQueues/{Sid}" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* * DeleteWorker Method for DeleteWorker * @param WorkspaceSid The SID of the Workspace with the Worker to delete. * @param Sid The SID of the Worker resource to delete. -*/ -func (c *DefaultApiService) DeleteWorker(WorkspaceSid string, Sid string, ) (error) { - path := "/v1/Workspaces/{WorkspaceSid}/Workers/{Sid}" + */ +func (c *DefaultApiService) DeleteWorker(WorkspaceSid string, Sid string) error { + path := "/v1/Workspaces/{WorkspaceSid}/Workers/{Sid}" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* * DeleteWorkflow Method for DeleteWorkflow * @param WorkspaceSid The SID of the Workspace with the Workflow to delete. * @param Sid The SID of the Workflow resource to delete. -*/ -func (c *DefaultApiService) DeleteWorkflow(WorkspaceSid string, Sid string, ) (error) { - path := "/v1/Workspaces/{WorkspaceSid}/Workflows/{Sid}" + */ +func (c *DefaultApiService) DeleteWorkflow(WorkspaceSid string, Sid string) error { + path := "/v1/Workspaces/{WorkspaceSid}/Workflows/{Sid}" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* * DeleteWorkspace Method for DeleteWorkspace * @param Sid The SID of the Workspace resource to delete. -*/ -func (c *DefaultApiService) DeleteWorkspace(Sid string, ) (error) { - path := "/v1/Workspaces/{Sid}" + */ +func (c *DefaultApiService) DeleteWorkspace(Sid string) error { + path := "/v1/Workspaces/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + defer resp.Body.Close() - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() - - return nil + return nil } /* @@ -591,30 +576,28 @@ func (c *DefaultApiService) DeleteWorkspace(Sid string, ) (error) { * @param WorkspaceSid The SID of the Workspace with the Activity resources to fetch. * @param Sid The SID of the Activity resource to fetch. * @return TaskrouterV1WorkspaceActivity -*/ -func (c *DefaultApiService) FetchActivity(WorkspaceSid string, Sid string, ) (*TaskrouterV1WorkspaceActivity, error) { - path := "/v1/Workspaces/{WorkspaceSid}/Activities/{Sid}" + */ +func (c *DefaultApiService) FetchActivity(WorkspaceSid string, Sid string) (*TaskrouterV1WorkspaceActivity, error) { + path := "/v1/Workspaces/{WorkspaceSid}/Activities/{Sid}" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &TaskrouterV1WorkspaceActivity{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TaskrouterV1WorkspaceActivity{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -622,30 +605,28 @@ func (c *DefaultApiService) FetchActivity(WorkspaceSid string, Sid string, ) (*T * @param WorkspaceSid The SID of the Workspace with the Event to fetch. * @param Sid The SID of the Event resource to fetch. * @return TaskrouterV1WorkspaceEvent -*/ -func (c *DefaultApiService) FetchEvent(WorkspaceSid string, Sid string, ) (*TaskrouterV1WorkspaceEvent, error) { - path := "/v1/Workspaces/{WorkspaceSid}/Events/{Sid}" + */ +func (c *DefaultApiService) FetchEvent(WorkspaceSid string, Sid string) (*TaskrouterV1WorkspaceEvent, error) { + path := "/v1/Workspaces/{WorkspaceSid}/Events/{Sid}" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &TaskrouterV1WorkspaceEvent{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TaskrouterV1WorkspaceEvent{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -653,30 +634,28 @@ func (c *DefaultApiService) FetchEvent(WorkspaceSid string, Sid string, ) (*Task * @param WorkspaceSid The SID of the Workspace with the Task to fetch. * @param Sid The SID of the Task resource to fetch. * @return TaskrouterV1WorkspaceTask -*/ -func (c *DefaultApiService) FetchTask(WorkspaceSid string, Sid string, ) (*TaskrouterV1WorkspaceTask, error) { - path := "/v1/Workspaces/{WorkspaceSid}/Tasks/{Sid}" + */ +func (c *DefaultApiService) FetchTask(WorkspaceSid string, Sid string) (*TaskrouterV1WorkspaceTask, error) { + path := "/v1/Workspaces/{WorkspaceSid}/Tasks/{Sid}" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &TaskrouterV1WorkspaceTask{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TaskrouterV1WorkspaceTask{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -684,30 +663,28 @@ func (c *DefaultApiService) FetchTask(WorkspaceSid string, Sid string, ) (*Taskr * @param WorkspaceSid The SID of the Workspace with the Task Channel to fetch. * @param Sid The SID of the Task Channel resource to fetch. * @return TaskrouterV1WorkspaceTaskChannel -*/ -func (c *DefaultApiService) FetchTaskChannel(WorkspaceSid string, Sid string, ) (*TaskrouterV1WorkspaceTaskChannel, error) { - path := "/v1/Workspaces/{WorkspaceSid}/TaskChannels/{Sid}" + */ +func (c *DefaultApiService) FetchTaskChannel(WorkspaceSid string, Sid string) (*TaskrouterV1WorkspaceTaskChannel, error) { + path := "/v1/Workspaces/{WorkspaceSid}/TaskChannels/{Sid}" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &TaskrouterV1WorkspaceTaskChannel{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TaskrouterV1WorkspaceTaskChannel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -715,38 +692,37 @@ func (c *DefaultApiService) FetchTaskChannel(WorkspaceSid string, Sid string, ) * @param WorkspaceSid The SID of the Workspace with the TaskQueue to fetch. * @param Sid The SID of the TaskQueue resource to fetch. * @return TaskrouterV1WorkspaceTaskQueue -*/ -func (c *DefaultApiService) FetchTaskQueue(WorkspaceSid string, Sid string, ) (*TaskrouterV1WorkspaceTaskQueue, error) { - path := "/v1/Workspaces/{WorkspaceSid}/TaskQueues/{Sid}" + */ +func (c *DefaultApiService) FetchTaskQueue(WorkspaceSid string, Sid string) (*TaskrouterV1WorkspaceTaskQueue, error) { + path := "/v1/Workspaces/{WorkspaceSid}/TaskQueues/{Sid}" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &TaskrouterV1WorkspaceTaskQueue{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TaskrouterV1WorkspaceTaskQueue{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // FetchTaskQueueCumulativeStatisticsParams Optional parameters for the method 'FetchTaskQueueCumulativeStatistics' type FetchTaskQueueCumulativeStatisticsParams struct { - EndDate *time.Time `json:"EndDate,omitempty"` - Minutes *int32 `json:"Minutes,omitempty"` - StartDate *time.Time `json:"StartDate,omitempty"` - TaskChannel *string `json:"TaskChannel,omitempty"` - SplitByWaitTime *string `json:"SplitByWaitTime,omitempty"` + EndDate *time.Time `json:"EndDate,omitempty"` + Minutes *int32 `json:"Minutes,omitempty"` + StartDate *time.Time `json:"StartDate,omitempty"` + TaskChannel *string `json:"TaskChannel,omitempty"` + SplitByWaitTime *string `json:"SplitByWaitTime,omitempty"` } /* @@ -760,46 +736,46 @@ type FetchTaskQueueCumulativeStatisticsParams struct { * @param "TaskChannel" (string) - Only calculate cumulative statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. * @param "SplitByWaitTime" (string) - A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on. For each threshold specified, the number of Tasks canceled and reservations accepted above and below the specified thresholds in seconds are computed. * @return TaskrouterV1WorkspaceTaskQueueTaskQueueCumulativeStatistics -*/ + */ func (c *DefaultApiService) FetchTaskQueueCumulativeStatistics(WorkspaceSid string, TaskQueueSid string, params *FetchTaskQueueCumulativeStatisticsParams) (*TaskrouterV1WorkspaceTaskQueueTaskQueueCumulativeStatistics, error) { - path := "/v1/Workspaces/{WorkspaceSid}/TaskQueues/{TaskQueueSid}/CumulativeStatistics" + path := "/v1/Workspaces/{WorkspaceSid}/TaskQueues/{TaskQueueSid}/CumulativeStatistics" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) path = strings.Replace(path, "{"+"TaskQueueSid"+"}", TaskQueueSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.EndDate != nil { - data.Set("EndDate", fmt.Sprint(*params.EndDate)) -} - if params != nil && params.Minutes != nil { - data.Set("Minutes", fmt.Sprint(*params.Minutes)) -} - if params != nil && params.StartDate != nil { - data.Set("StartDate", fmt.Sprint(*params.StartDate)) -} - if params != nil && params.TaskChannel != nil { - data.Set("TaskChannel", *params.TaskChannel) -} - if params != nil && params.SplitByWaitTime != nil { - data.Set("SplitByWaitTime", *params.SplitByWaitTime) -} + data := url.Values{} + headers := 0 + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) + } + if params != nil && params.Minutes != nil { + data.Set("Minutes", fmt.Sprint(*params.Minutes)) + } + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) + } + if params != nil && params.TaskChannel != nil { + data.Set("TaskChannel", *params.TaskChannel) + } + if params != nil && params.SplitByWaitTime != nil { + data.Set("SplitByWaitTime", *params.SplitByWaitTime) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &TaskrouterV1WorkspaceTaskQueueTaskQueueCumulativeStatistics{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TaskrouterV1WorkspaceTaskQueueTaskQueueCumulativeStatistics{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // FetchTaskQueueRealTimeStatisticsParams Optional parameters for the method 'FetchTaskQueueRealTimeStatistics' type FetchTaskQueueRealTimeStatisticsParams struct { TaskChannel *string `json:"TaskChannel,omitempty"` @@ -812,41 +788,41 @@ type FetchTaskQueueRealTimeStatisticsParams struct { * @param optional nil or *FetchTaskQueueRealTimeStatisticsParams - Optional Parameters: * @param "TaskChannel" (string) - The TaskChannel for which to fetch statistics. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. * @return TaskrouterV1WorkspaceTaskQueueTaskQueueRealTimeStatistics -*/ + */ func (c *DefaultApiService) FetchTaskQueueRealTimeStatistics(WorkspaceSid string, TaskQueueSid string, params *FetchTaskQueueRealTimeStatisticsParams) (*TaskrouterV1WorkspaceTaskQueueTaskQueueRealTimeStatistics, error) { - path := "/v1/Workspaces/{WorkspaceSid}/TaskQueues/{TaskQueueSid}/RealTimeStatistics" + path := "/v1/Workspaces/{WorkspaceSid}/TaskQueues/{TaskQueueSid}/RealTimeStatistics" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) path = strings.Replace(path, "{"+"TaskQueueSid"+"}", TaskQueueSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.TaskChannel != nil { - data.Set("TaskChannel", *params.TaskChannel) -} + data := url.Values{} + headers := 0 + if params != nil && params.TaskChannel != nil { + data.Set("TaskChannel", *params.TaskChannel) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &TaskrouterV1WorkspaceTaskQueueTaskQueueRealTimeStatistics{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TaskrouterV1WorkspaceTaskQueueTaskQueueRealTimeStatistics{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // FetchTaskQueueStatisticsParams Optional parameters for the method 'FetchTaskQueueStatistics' type FetchTaskQueueStatisticsParams struct { - EndDate *time.Time `json:"EndDate,omitempty"` - Minutes *int32 `json:"Minutes,omitempty"` - StartDate *time.Time `json:"StartDate,omitempty"` - TaskChannel *string `json:"TaskChannel,omitempty"` - SplitByWaitTime *string `json:"SplitByWaitTime,omitempty"` + EndDate *time.Time `json:"EndDate,omitempty"` + Minutes *int32 `json:"Minutes,omitempty"` + StartDate *time.Time `json:"StartDate,omitempty"` + TaskChannel *string `json:"TaskChannel,omitempty"` + SplitByWaitTime *string `json:"SplitByWaitTime,omitempty"` } /* @@ -860,45 +836,44 @@ type FetchTaskQueueStatisticsParams struct { * @param "TaskChannel" (string) - Only calculate real-time and cumulative statistics for the specified TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. * @param "SplitByWaitTime" (string) - A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on. For each threshold specified, the number of Tasks canceled and reservations accepted above and below the specified thresholds in seconds are computed. * @return TaskrouterV1WorkspaceTaskQueueTaskQueueStatistics -*/ + */ func (c *DefaultApiService) FetchTaskQueueStatistics(WorkspaceSid string, TaskQueueSid string, params *FetchTaskQueueStatisticsParams) (*TaskrouterV1WorkspaceTaskQueueTaskQueueStatistics, error) { - path := "/v1/Workspaces/{WorkspaceSid}/TaskQueues/{TaskQueueSid}/Statistics" + path := "/v1/Workspaces/{WorkspaceSid}/TaskQueues/{TaskQueueSid}/Statistics" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) path = strings.Replace(path, "{"+"TaskQueueSid"+"}", TaskQueueSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.EndDate != nil { - data.Set("EndDate", fmt.Sprint(*params.EndDate)) -} - if params != nil && params.Minutes != nil { - data.Set("Minutes", fmt.Sprint(*params.Minutes)) -} - if params != nil && params.StartDate != nil { - data.Set("StartDate", fmt.Sprint(*params.StartDate)) -} - if params != nil && params.TaskChannel != nil { - data.Set("TaskChannel", *params.TaskChannel) -} - if params != nil && params.SplitByWaitTime != nil { - data.Set("SplitByWaitTime", *params.SplitByWaitTime) -} + data := url.Values{} + headers := 0 + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) + } + if params != nil && params.Minutes != nil { + data.Set("Minutes", fmt.Sprint(*params.Minutes)) + } + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) + } + if params != nil && params.TaskChannel != nil { + data.Set("TaskChannel", *params.TaskChannel) + } + if params != nil && params.SplitByWaitTime != nil { + data.Set("SplitByWaitTime", *params.SplitByWaitTime) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &TaskrouterV1WorkspaceTaskQueueTaskQueueStatistics{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TaskrouterV1WorkspaceTaskQueueTaskQueueStatistics{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -907,31 +882,29 @@ func (c *DefaultApiService) FetchTaskQueueStatistics(WorkspaceSid string, TaskQu * @param TaskSid The SID of the reserved Task resource with the TaskReservation resource to fetch. * @param Sid The SID of the TaskReservation resource to fetch. * @return TaskrouterV1WorkspaceTaskTaskReservation -*/ -func (c *DefaultApiService) FetchTaskReservation(WorkspaceSid string, TaskSid string, Sid string, ) (*TaskrouterV1WorkspaceTaskTaskReservation, error) { - path := "/v1/Workspaces/{WorkspaceSid}/Tasks/{TaskSid}/Reservations/{Sid}" + */ +func (c *DefaultApiService) FetchTaskReservation(WorkspaceSid string, TaskSid string, Sid string) (*TaskrouterV1WorkspaceTaskTaskReservation, error) { + path := "/v1/Workspaces/{WorkspaceSid}/Tasks/{TaskSid}/Reservations/{Sid}" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) path = strings.Replace(path, "{"+"TaskSid"+"}", TaskSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &TaskrouterV1WorkspaceTaskTaskReservation{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TaskrouterV1WorkspaceTaskTaskReservation{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -939,30 +912,28 @@ func (c *DefaultApiService) FetchTaskReservation(WorkspaceSid string, TaskSid st * @param WorkspaceSid The SID of the Workspace with the Worker to fetch. * @param Sid The SID of the Worker resource to fetch. * @return TaskrouterV1WorkspaceWorker -*/ -func (c *DefaultApiService) FetchWorker(WorkspaceSid string, Sid string, ) (*TaskrouterV1WorkspaceWorker, error) { - path := "/v1/Workspaces/{WorkspaceSid}/Workers/{Sid}" + */ +func (c *DefaultApiService) FetchWorker(WorkspaceSid string, Sid string) (*TaskrouterV1WorkspaceWorker, error) { + path := "/v1/Workspaces/{WorkspaceSid}/Workers/{Sid}" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &TaskrouterV1WorkspaceWorker{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TaskrouterV1WorkspaceWorker{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -971,38 +942,37 @@ func (c *DefaultApiService) FetchWorker(WorkspaceSid string, Sid string, ) (*Tas * @param WorkerSid The SID of the Worker with the WorkerChannel to fetch. * @param Sid The SID of the WorkerChannel to fetch. * @return TaskrouterV1WorkspaceWorkerWorkerChannel -*/ -func (c *DefaultApiService) FetchWorkerChannel(WorkspaceSid string, WorkerSid string, Sid string, ) (*TaskrouterV1WorkspaceWorkerWorkerChannel, error) { - path := "/v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Channels/{Sid}" + */ +func (c *DefaultApiService) FetchWorkerChannel(WorkspaceSid string, WorkerSid string, Sid string) (*TaskrouterV1WorkspaceWorkerWorkerChannel, error) { + path := "/v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Channels/{Sid}" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) path = strings.Replace(path, "{"+"WorkerSid"+"}", WorkerSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &TaskrouterV1WorkspaceWorkerWorkerChannel{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TaskrouterV1WorkspaceWorkerWorkerChannel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // FetchWorkerInstanceStatisticsParams Optional parameters for the method 'FetchWorkerInstanceStatistics' type FetchWorkerInstanceStatisticsParams struct { - Minutes *int32 `json:"Minutes,omitempty"` - StartDate *time.Time `json:"StartDate,omitempty"` - EndDate *time.Time `json:"EndDate,omitempty"` - TaskChannel *string `json:"TaskChannel,omitempty"` + Minutes *int32 `json:"Minutes,omitempty"` + StartDate *time.Time `json:"StartDate,omitempty"` + EndDate *time.Time `json:"EndDate,omitempty"` + TaskChannel *string `json:"TaskChannel,omitempty"` } /* @@ -1015,42 +985,41 @@ type FetchWorkerInstanceStatisticsParams struct { * @param "EndDate" (time.Time) - Only include usage that occurred on or before this date, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time. * @param "TaskChannel" (string) - Only calculate statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. * @return TaskrouterV1WorkspaceWorkerWorkerInstanceStatistics -*/ + */ func (c *DefaultApiService) FetchWorkerInstanceStatistics(WorkspaceSid string, WorkerSid string, params *FetchWorkerInstanceStatisticsParams) (*TaskrouterV1WorkspaceWorkerWorkerInstanceStatistics, error) { - path := "/v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Statistics" + path := "/v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Statistics" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) path = strings.Replace(path, "{"+"WorkerSid"+"}", WorkerSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Minutes != nil { - data.Set("Minutes", fmt.Sprint(*params.Minutes)) -} - if params != nil && params.StartDate != nil { - data.Set("StartDate", fmt.Sprint(*params.StartDate)) -} - if params != nil && params.EndDate != nil { - data.Set("EndDate", fmt.Sprint(*params.EndDate)) -} - if params != nil && params.TaskChannel != nil { - data.Set("TaskChannel", *params.TaskChannel) -} + data := url.Values{} + headers := 0 + if params != nil && params.Minutes != nil { + data.Set("Minutes", fmt.Sprint(*params.Minutes)) + } + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) + } + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) + } + if params != nil && params.TaskChannel != nil { + data.Set("TaskChannel", *params.TaskChannel) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &TaskrouterV1WorkspaceWorkerWorkerInstanceStatistics{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TaskrouterV1WorkspaceWorkerWorkerInstanceStatistics{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -1059,41 +1028,40 @@ func (c *DefaultApiService) FetchWorkerInstanceStatistics(WorkspaceSid string, W * @param WorkerSid The SID of the reserved Worker resource with the WorkerReservation resource to fetch. * @param Sid The SID of the WorkerReservation resource to fetch. * @return TaskrouterV1WorkspaceWorkerWorkerReservation -*/ -func (c *DefaultApiService) FetchWorkerReservation(WorkspaceSid string, WorkerSid string, Sid string, ) (*TaskrouterV1WorkspaceWorkerWorkerReservation, error) { - path := "/v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Reservations/{Sid}" + */ +func (c *DefaultApiService) FetchWorkerReservation(WorkspaceSid string, WorkerSid string, Sid string) (*TaskrouterV1WorkspaceWorkerWorkerReservation, error) { + path := "/v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Reservations/{Sid}" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) path = strings.Replace(path, "{"+"WorkerSid"+"}", WorkerSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &TaskrouterV1WorkspaceWorkerWorkerReservation{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TaskrouterV1WorkspaceWorkerWorkerReservation{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // FetchWorkerStatisticsParams Optional parameters for the method 'FetchWorkerStatistics' type FetchWorkerStatisticsParams struct { - Minutes *int32 `json:"Minutes,omitempty"` - StartDate *time.Time `json:"StartDate,omitempty"` - EndDate *time.Time `json:"EndDate,omitempty"` - TaskQueueSid *string `json:"TaskQueueSid,omitempty"` - TaskQueueName *string `json:"TaskQueueName,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - TaskChannel *string `json:"TaskChannel,omitempty"` + Minutes *int32 `json:"Minutes,omitempty"` + StartDate *time.Time `json:"StartDate,omitempty"` + EndDate *time.Time `json:"EndDate,omitempty"` + TaskQueueSid *string `json:"TaskQueueSid,omitempty"` + TaskQueueName *string `json:"TaskQueueName,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + TaskChannel *string `json:"TaskChannel,omitempty"` } /* @@ -1108,57 +1076,57 @@ type FetchWorkerStatisticsParams struct { * @param "FriendlyName" (string) - Only include Workers with `friendly_name` values that match this parameter. * @param "TaskChannel" (string) - Only calculate statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. * @return TaskrouterV1WorkspaceWorkerWorkerStatistics -*/ + */ func (c *DefaultApiService) FetchWorkerStatistics(WorkspaceSid string, params *FetchWorkerStatisticsParams) (*TaskrouterV1WorkspaceWorkerWorkerStatistics, error) { - path := "/v1/Workspaces/{WorkspaceSid}/Workers/Statistics" + path := "/v1/Workspaces/{WorkspaceSid}/Workers/Statistics" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Minutes != nil { - data.Set("Minutes", fmt.Sprint(*params.Minutes)) -} - if params != nil && params.StartDate != nil { - data.Set("StartDate", fmt.Sprint(*params.StartDate)) -} - if params != nil && params.EndDate != nil { - data.Set("EndDate", fmt.Sprint(*params.EndDate)) -} - if params != nil && params.TaskQueueSid != nil { - data.Set("TaskQueueSid", *params.TaskQueueSid) -} - if params != nil && params.TaskQueueName != nil { - data.Set("TaskQueueName", *params.TaskQueueName) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.TaskChannel != nil { - data.Set("TaskChannel", *params.TaskChannel) -} + data := url.Values{} + headers := 0 + if params != nil && params.Minutes != nil { + data.Set("Minutes", fmt.Sprint(*params.Minutes)) + } + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) + } + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) + } + if params != nil && params.TaskQueueSid != nil { + data.Set("TaskQueueSid", *params.TaskQueueSid) + } + if params != nil && params.TaskQueueName != nil { + data.Set("TaskQueueName", *params.TaskQueueName) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.TaskChannel != nil { + data.Set("TaskChannel", *params.TaskChannel) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &TaskrouterV1WorkspaceWorkerWorkerStatistics{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TaskrouterV1WorkspaceWorkerWorkerStatistics{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // FetchWorkersCumulativeStatisticsParams Optional parameters for the method 'FetchWorkersCumulativeStatistics' type FetchWorkersCumulativeStatisticsParams struct { - EndDate *time.Time `json:"EndDate,omitempty"` - Minutes *int32 `json:"Minutes,omitempty"` - StartDate *time.Time `json:"StartDate,omitempty"` - TaskChannel *string `json:"TaskChannel,omitempty"` + EndDate *time.Time `json:"EndDate,omitempty"` + Minutes *int32 `json:"Minutes,omitempty"` + StartDate *time.Time `json:"StartDate,omitempty"` + TaskChannel *string `json:"TaskChannel,omitempty"` } /* @@ -1170,42 +1138,42 @@ type FetchWorkersCumulativeStatisticsParams struct { * @param "StartDate" (time.Time) - Only calculate statistics from this date and time and later, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. * @param "TaskChannel" (string) - Only calculate cumulative statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. * @return TaskrouterV1WorkspaceWorkerWorkersCumulativeStatistics -*/ + */ func (c *DefaultApiService) FetchWorkersCumulativeStatistics(WorkspaceSid string, params *FetchWorkersCumulativeStatisticsParams) (*TaskrouterV1WorkspaceWorkerWorkersCumulativeStatistics, error) { - path := "/v1/Workspaces/{WorkspaceSid}/Workers/CumulativeStatistics" + path := "/v1/Workspaces/{WorkspaceSid}/Workers/CumulativeStatistics" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.EndDate != nil { - data.Set("EndDate", fmt.Sprint(*params.EndDate)) -} - if params != nil && params.Minutes != nil { - data.Set("Minutes", fmt.Sprint(*params.Minutes)) -} - if params != nil && params.StartDate != nil { - data.Set("StartDate", fmt.Sprint(*params.StartDate)) -} - if params != nil && params.TaskChannel != nil { - data.Set("TaskChannel", *params.TaskChannel) -} + data := url.Values{} + headers := 0 + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) + } + if params != nil && params.Minutes != nil { + data.Set("Minutes", fmt.Sprint(*params.Minutes)) + } + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) + } + if params != nil && params.TaskChannel != nil { + data.Set("TaskChannel", *params.TaskChannel) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &TaskrouterV1WorkspaceWorkerWorkersCumulativeStatistics{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TaskrouterV1WorkspaceWorkerWorkersCumulativeStatistics{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // FetchWorkersRealTimeStatisticsParams Optional parameters for the method 'FetchWorkersRealTimeStatistics' type FetchWorkersRealTimeStatisticsParams struct { TaskChannel *string `json:"TaskChannel,omitempty"` @@ -1217,32 +1185,31 @@ type FetchWorkersRealTimeStatisticsParams struct { * @param optional nil or *FetchWorkersRealTimeStatisticsParams - Optional Parameters: * @param "TaskChannel" (string) - Only calculate real-time statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. * @return TaskrouterV1WorkspaceWorkerWorkersRealTimeStatistics -*/ + */ func (c *DefaultApiService) FetchWorkersRealTimeStatistics(WorkspaceSid string, params *FetchWorkersRealTimeStatisticsParams) (*TaskrouterV1WorkspaceWorkerWorkersRealTimeStatistics, error) { - path := "/v1/Workspaces/{WorkspaceSid}/Workers/RealTimeStatistics" + path := "/v1/Workspaces/{WorkspaceSid}/Workers/RealTimeStatistics" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.TaskChannel != nil { - data.Set("TaskChannel", *params.TaskChannel) -} + data := url.Values{} + headers := 0 + if params != nil && params.TaskChannel != nil { + data.Set("TaskChannel", *params.TaskChannel) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &TaskrouterV1WorkspaceWorkerWorkersRealTimeStatistics{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TaskrouterV1WorkspaceWorkerWorkersRealTimeStatistics{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -1250,38 +1217,37 @@ func (c *DefaultApiService) FetchWorkersRealTimeStatistics(WorkspaceSid string, * @param WorkspaceSid The SID of the Workspace with the Workflow to fetch. * @param Sid The SID of the Workflow resource to fetch. * @return TaskrouterV1WorkspaceWorkflow -*/ -func (c *DefaultApiService) FetchWorkflow(WorkspaceSid string, Sid string, ) (*TaskrouterV1WorkspaceWorkflow, error) { - path := "/v1/Workspaces/{WorkspaceSid}/Workflows/{Sid}" + */ +func (c *DefaultApiService) FetchWorkflow(WorkspaceSid string, Sid string) (*TaskrouterV1WorkspaceWorkflow, error) { + path := "/v1/Workspaces/{WorkspaceSid}/Workflows/{Sid}" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &TaskrouterV1WorkspaceWorkflow{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TaskrouterV1WorkspaceWorkflow{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // FetchWorkflowCumulativeStatisticsParams Optional parameters for the method 'FetchWorkflowCumulativeStatistics' type FetchWorkflowCumulativeStatisticsParams struct { - EndDate *time.Time `json:"EndDate,omitempty"` - Minutes *int32 `json:"Minutes,omitempty"` - StartDate *time.Time `json:"StartDate,omitempty"` - TaskChannel *string `json:"TaskChannel,omitempty"` - SplitByWaitTime *string `json:"SplitByWaitTime,omitempty"` + EndDate *time.Time `json:"EndDate,omitempty"` + Minutes *int32 `json:"Minutes,omitempty"` + StartDate *time.Time `json:"StartDate,omitempty"` + TaskChannel *string `json:"TaskChannel,omitempty"` + SplitByWaitTime *string `json:"SplitByWaitTime,omitempty"` } /* @@ -1295,46 +1261,46 @@ type FetchWorkflowCumulativeStatisticsParams struct { * @param "TaskChannel" (string) - Only calculate cumulative statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. * @param "SplitByWaitTime" (string) - A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on. For each threshold specified, the number of Tasks canceled and reservations accepted above and below the specified thresholds in seconds are computed. For example, `5,30` would show splits of Tasks that were canceled or accepted before and after 5 seconds and before and after 30 seconds. This can be used to show short abandoned Tasks or Tasks that failed to meet an SLA. * @return TaskrouterV1WorkspaceWorkflowWorkflowCumulativeStatistics -*/ + */ func (c *DefaultApiService) FetchWorkflowCumulativeStatistics(WorkspaceSid string, WorkflowSid string, params *FetchWorkflowCumulativeStatisticsParams) (*TaskrouterV1WorkspaceWorkflowWorkflowCumulativeStatistics, error) { - path := "/v1/Workspaces/{WorkspaceSid}/Workflows/{WorkflowSid}/CumulativeStatistics" + path := "/v1/Workspaces/{WorkspaceSid}/Workflows/{WorkflowSid}/CumulativeStatistics" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) path = strings.Replace(path, "{"+"WorkflowSid"+"}", WorkflowSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.EndDate != nil { - data.Set("EndDate", fmt.Sprint(*params.EndDate)) -} - if params != nil && params.Minutes != nil { - data.Set("Minutes", fmt.Sprint(*params.Minutes)) -} - if params != nil && params.StartDate != nil { - data.Set("StartDate", fmt.Sprint(*params.StartDate)) -} - if params != nil && params.TaskChannel != nil { - data.Set("TaskChannel", *params.TaskChannel) -} - if params != nil && params.SplitByWaitTime != nil { - data.Set("SplitByWaitTime", *params.SplitByWaitTime) -} + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) + } + if params != nil && params.Minutes != nil { + data.Set("Minutes", fmt.Sprint(*params.Minutes)) + } + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) + } + if params != nil && params.TaskChannel != nil { + data.Set("TaskChannel", *params.TaskChannel) + } + if params != nil && params.SplitByWaitTime != nil { + data.Set("SplitByWaitTime", *params.SplitByWaitTime) + } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + defer resp.Body.Close() - defer resp.Body.Close() - - ps := &TaskrouterV1WorkspaceWorkflowWorkflowCumulativeStatistics{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TaskrouterV1WorkspaceWorkflowWorkflowCumulativeStatistics{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // FetchWorkflowRealTimeStatisticsParams Optional parameters for the method 'FetchWorkflowRealTimeStatistics' type FetchWorkflowRealTimeStatisticsParams struct { TaskChannel *string `json:"TaskChannel,omitempty"` @@ -1347,41 +1313,41 @@ type FetchWorkflowRealTimeStatisticsParams struct { * @param optional nil or *FetchWorkflowRealTimeStatisticsParams - Optional Parameters: * @param "TaskChannel" (string) - Only calculate real-time statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. * @return TaskrouterV1WorkspaceWorkflowWorkflowRealTimeStatistics -*/ + */ func (c *DefaultApiService) FetchWorkflowRealTimeStatistics(WorkspaceSid string, WorkflowSid string, params *FetchWorkflowRealTimeStatisticsParams) (*TaskrouterV1WorkspaceWorkflowWorkflowRealTimeStatistics, error) { - path := "/v1/Workspaces/{WorkspaceSid}/Workflows/{WorkflowSid}/RealTimeStatistics" + path := "/v1/Workspaces/{WorkspaceSid}/Workflows/{WorkflowSid}/RealTimeStatistics" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) path = strings.Replace(path, "{"+"WorkflowSid"+"}", WorkflowSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.TaskChannel != nil { - data.Set("TaskChannel", *params.TaskChannel) -} + data := url.Values{} + headers := 0 + if params != nil && params.TaskChannel != nil { + data.Set("TaskChannel", *params.TaskChannel) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &TaskrouterV1WorkspaceWorkflowWorkflowRealTimeStatistics{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TaskrouterV1WorkspaceWorkflowWorkflowRealTimeStatistics{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // FetchWorkflowStatisticsParams Optional parameters for the method 'FetchWorkflowStatistics' type FetchWorkflowStatisticsParams struct { - Minutes *int32 `json:"Minutes,omitempty"` - StartDate *time.Time `json:"StartDate,omitempty"` - EndDate *time.Time `json:"EndDate,omitempty"` - TaskChannel *string `json:"TaskChannel,omitempty"` - SplitByWaitTime *string `json:"SplitByWaitTime,omitempty"` + Minutes *int32 `json:"Minutes,omitempty"` + StartDate *time.Time `json:"StartDate,omitempty"` + EndDate *time.Time `json:"EndDate,omitempty"` + TaskChannel *string `json:"TaskChannel,omitempty"` + SplitByWaitTime *string `json:"SplitByWaitTime,omitempty"` } /* @@ -1395,82 +1361,80 @@ type FetchWorkflowStatisticsParams struct { * @param "TaskChannel" (string) - Only calculate real-time statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. * @param "SplitByWaitTime" (string) - A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on. For each threshold specified, the number of Tasks canceled and reservations accepted above and below the specified thresholds in seconds are computed. For example, `5,30` would show splits of Tasks that were canceled or accepted before and after 5 seconds and before and after 30 seconds. This can be used to show short abandoned Tasks or Tasks that failed to meet an SLA. * @return TaskrouterV1WorkspaceWorkflowWorkflowStatistics -*/ + */ func (c *DefaultApiService) FetchWorkflowStatistics(WorkspaceSid string, WorkflowSid string, params *FetchWorkflowStatisticsParams) (*TaskrouterV1WorkspaceWorkflowWorkflowStatistics, error) { - path := "/v1/Workspaces/{WorkspaceSid}/Workflows/{WorkflowSid}/Statistics" + path := "/v1/Workspaces/{WorkspaceSid}/Workflows/{WorkflowSid}/Statistics" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) path = strings.Replace(path, "{"+"WorkflowSid"+"}", WorkflowSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Minutes != nil { - data.Set("Minutes", fmt.Sprint(*params.Minutes)) -} - if params != nil && params.StartDate != nil { - data.Set("StartDate", fmt.Sprint(*params.StartDate)) -} - if params != nil && params.EndDate != nil { - data.Set("EndDate", fmt.Sprint(*params.EndDate)) -} - if params != nil && params.TaskChannel != nil { - data.Set("TaskChannel", *params.TaskChannel) -} - if params != nil && params.SplitByWaitTime != nil { - data.Set("SplitByWaitTime", *params.SplitByWaitTime) -} + data := url.Values{} + headers := 0 + if params != nil && params.Minutes != nil { + data.Set("Minutes", fmt.Sprint(*params.Minutes)) + } + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) + } + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) + } + if params != nil && params.TaskChannel != nil { + data.Set("TaskChannel", *params.TaskChannel) + } + if params != nil && params.SplitByWaitTime != nil { + data.Set("SplitByWaitTime", *params.SplitByWaitTime) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &TaskrouterV1WorkspaceWorkflowWorkflowStatistics{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TaskrouterV1WorkspaceWorkflowWorkflowStatistics{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * FetchWorkspace Method for FetchWorkspace * @param Sid The SID of the Workspace resource to fetch. * @return TaskrouterV1Workspace -*/ -func (c *DefaultApiService) FetchWorkspace(Sid string, ) (*TaskrouterV1Workspace, error) { - path := "/v1/Workspaces/{Sid}" + */ +func (c *DefaultApiService) FetchWorkspace(Sid string) (*TaskrouterV1Workspace, error) { + path := "/v1/Workspaces/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &TaskrouterV1Workspace{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TaskrouterV1Workspace{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // FetchWorkspaceCumulativeStatisticsParams Optional parameters for the method 'FetchWorkspaceCumulativeStatistics' type FetchWorkspaceCumulativeStatisticsParams struct { - EndDate *time.Time `json:"EndDate,omitempty"` - Minutes *int32 `json:"Minutes,omitempty"` - StartDate *time.Time `json:"StartDate,omitempty"` - TaskChannel *string `json:"TaskChannel,omitempty"` - SplitByWaitTime *string `json:"SplitByWaitTime,omitempty"` + EndDate *time.Time `json:"EndDate,omitempty"` + Minutes *int32 `json:"Minutes,omitempty"` + StartDate *time.Time `json:"StartDate,omitempty"` + TaskChannel *string `json:"TaskChannel,omitempty"` + SplitByWaitTime *string `json:"SplitByWaitTime,omitempty"` } /* @@ -1483,45 +1447,45 @@ type FetchWorkspaceCumulativeStatisticsParams struct { * @param "TaskChannel" (string) - Only calculate cumulative statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. * @param "SplitByWaitTime" (string) - A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on. For each threshold specified, the number of Tasks canceled and reservations accepted above and below the specified thresholds in seconds are computed. For example, `5,30` would show splits of Tasks that were canceled or accepted before and after 5 seconds and before and after 30 seconds. This can be used to show short abandoned Tasks or Tasks that failed to meet an SLA. * @return TaskrouterV1WorkspaceWorkspaceCumulativeStatistics -*/ + */ func (c *DefaultApiService) FetchWorkspaceCumulativeStatistics(WorkspaceSid string, params *FetchWorkspaceCumulativeStatisticsParams) (*TaskrouterV1WorkspaceWorkspaceCumulativeStatistics, error) { - path := "/v1/Workspaces/{WorkspaceSid}/CumulativeStatistics" + path := "/v1/Workspaces/{WorkspaceSid}/CumulativeStatistics" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.EndDate != nil { - data.Set("EndDate", fmt.Sprint(*params.EndDate)) -} - if params != nil && params.Minutes != nil { - data.Set("Minutes", fmt.Sprint(*params.Minutes)) -} - if params != nil && params.StartDate != nil { - data.Set("StartDate", fmt.Sprint(*params.StartDate)) -} - if params != nil && params.TaskChannel != nil { - data.Set("TaskChannel", *params.TaskChannel) -} - if params != nil && params.SplitByWaitTime != nil { - data.Set("SplitByWaitTime", *params.SplitByWaitTime) -} + data := url.Values{} + headers := 0 + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) + } + if params != nil && params.Minutes != nil { + data.Set("Minutes", fmt.Sprint(*params.Minutes)) + } + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) + } + if params != nil && params.TaskChannel != nil { + data.Set("TaskChannel", *params.TaskChannel) + } + if params != nil && params.SplitByWaitTime != nil { + data.Set("SplitByWaitTime", *params.SplitByWaitTime) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &TaskrouterV1WorkspaceWorkspaceCumulativeStatistics{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TaskrouterV1WorkspaceWorkspaceCumulativeStatistics{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // FetchWorkspaceRealTimeStatisticsParams Optional parameters for the method 'FetchWorkspaceRealTimeStatistics' type FetchWorkspaceRealTimeStatisticsParams struct { TaskChannel *string `json:"TaskChannel,omitempty"` @@ -1533,40 +1497,40 @@ type FetchWorkspaceRealTimeStatisticsParams struct { * @param optional nil or *FetchWorkspaceRealTimeStatisticsParams - Optional Parameters: * @param "TaskChannel" (string) - Only calculate real-time statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. * @return TaskrouterV1WorkspaceWorkspaceRealTimeStatistics -*/ + */ func (c *DefaultApiService) FetchWorkspaceRealTimeStatistics(WorkspaceSid string, params *FetchWorkspaceRealTimeStatisticsParams) (*TaskrouterV1WorkspaceWorkspaceRealTimeStatistics, error) { - path := "/v1/Workspaces/{WorkspaceSid}/RealTimeStatistics" + path := "/v1/Workspaces/{WorkspaceSid}/RealTimeStatistics" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.TaskChannel != nil { - data.Set("TaskChannel", *params.TaskChannel) -} + data := url.Values{} + headers := 0 + if params != nil && params.TaskChannel != nil { + data.Set("TaskChannel", *params.TaskChannel) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &TaskrouterV1WorkspaceWorkspaceRealTimeStatistics{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TaskrouterV1WorkspaceWorkspaceRealTimeStatistics{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // FetchWorkspaceStatisticsParams Optional parameters for the method 'FetchWorkspaceStatistics' type FetchWorkspaceStatisticsParams struct { - Minutes *int32 `json:"Minutes,omitempty"` - StartDate *time.Time `json:"StartDate,omitempty"` - EndDate *time.Time `json:"EndDate,omitempty"` - TaskChannel *string `json:"TaskChannel,omitempty"` - SplitByWaitTime *string `json:"SplitByWaitTime,omitempty"` + Minutes *int32 `json:"Minutes,omitempty"` + StartDate *time.Time `json:"StartDate,omitempty"` + EndDate *time.Time `json:"EndDate,omitempty"` + TaskChannel *string `json:"TaskChannel,omitempty"` + SplitByWaitTime *string `json:"SplitByWaitTime,omitempty"` } /* @@ -1579,50 +1543,50 @@ type FetchWorkspaceStatisticsParams struct { * @param "TaskChannel" (string) - Only calculate statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. * @param "SplitByWaitTime" (string) - A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on. For each threshold specified, the number of Tasks canceled and reservations accepted above and below the specified thresholds in seconds are computed. For example, `5,30` would show splits of Tasks that were canceled or accepted before and after 5 seconds and before and after 30 seconds. This can be used to show short abandoned Tasks or Tasks that failed to meet an SLA. * @return TaskrouterV1WorkspaceWorkspaceStatistics -*/ + */ func (c *DefaultApiService) FetchWorkspaceStatistics(WorkspaceSid string, params *FetchWorkspaceStatisticsParams) (*TaskrouterV1WorkspaceWorkspaceStatistics, error) { - path := "/v1/Workspaces/{WorkspaceSid}/Statistics" + path := "/v1/Workspaces/{WorkspaceSid}/Statistics" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Minutes != nil { - data.Set("Minutes", fmt.Sprint(*params.Minutes)) -} - if params != nil && params.StartDate != nil { - data.Set("StartDate", fmt.Sprint(*params.StartDate)) -} - if params != nil && params.EndDate != nil { - data.Set("EndDate", fmt.Sprint(*params.EndDate)) -} - if params != nil && params.TaskChannel != nil { - data.Set("TaskChannel", *params.TaskChannel) -} - if params != nil && params.SplitByWaitTime != nil { - data.Set("SplitByWaitTime", *params.SplitByWaitTime) -} + data := url.Values{} + headers := 0 + if params != nil && params.Minutes != nil { + data.Set("Minutes", fmt.Sprint(*params.Minutes)) + } + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) + } + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) + } + if params != nil && params.TaskChannel != nil { + data.Set("TaskChannel", *params.TaskChannel) + } + if params != nil && params.SplitByWaitTime != nil { + data.Set("SplitByWaitTime", *params.SplitByWaitTime) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &TaskrouterV1WorkspaceWorkspaceStatistics{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TaskrouterV1WorkspaceWorkspaceStatistics{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListActivityParams Optional parameters for the method 'ListActivity' type ListActivityParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` - Available *string `json:"Available,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + Available *string `json:"Available,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -1633,53 +1597,53 @@ type ListActivityParams struct { * @param "Available" (string) - Whether return only Activity resources that are available or unavailable. A value of `true` returns only available activities. Values of '1' or `yes` also indicate `true`. All other values represent `false` and return activities that are unavailable. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListActivityResponse -*/ + */ func (c *DefaultApiService) ListActivity(WorkspaceSid string, params *ListActivityParams) (*ListActivityResponse, error) { - path := "/v1/Workspaces/{WorkspaceSid}/Activities" + path := "/v1/Workspaces/{WorkspaceSid}/Activities" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.Available != nil { - data.Set("Available", *params.Available) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Available != nil { + data.Set("Available", *params.Available) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListActivityResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListActivityResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListEventParams Optional parameters for the method 'ListEvent' type ListEventParams struct { - EndDate *time.Time `json:"EndDate,omitempty"` - EventType *string `json:"EventType,omitempty"` - Minutes *int32 `json:"Minutes,omitempty"` - ReservationSid *string `json:"ReservationSid,omitempty"` - StartDate *time.Time `json:"StartDate,omitempty"` - TaskQueueSid *string `json:"TaskQueueSid,omitempty"` - TaskSid *string `json:"TaskSid,omitempty"` - WorkerSid *string `json:"WorkerSid,omitempty"` - WorkflowSid *string `json:"WorkflowSid,omitempty"` - TaskChannel *string `json:"TaskChannel,omitempty"` - Sid *string `json:"Sid,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + EndDate *time.Time `json:"EndDate,omitempty"` + EventType *string `json:"EventType,omitempty"` + Minutes *int32 `json:"Minutes,omitempty"` + ReservationSid *string `json:"ReservationSid,omitempty"` + StartDate *time.Time `json:"StartDate,omitempty"` + TaskQueueSid *string `json:"TaskQueueSid,omitempty"` + TaskSid *string `json:"TaskSid,omitempty"` + WorkerSid *string `json:"WorkerSid,omitempty"` + WorkflowSid *string `json:"WorkflowSid,omitempty"` + TaskChannel *string `json:"TaskChannel,omitempty"` + Sid *string `json:"Sid,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -1699,78 +1663,78 @@ type ListEventParams struct { * @param "Sid" (string) - The SID of the Event resource to read. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListEventResponse -*/ + */ func (c *DefaultApiService) ListEvent(WorkspaceSid string, params *ListEventParams) (*ListEventResponse, error) { - path := "/v1/Workspaces/{WorkspaceSid}/Events" + path := "/v1/Workspaces/{WorkspaceSid}/Events" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.EndDate != nil { - data.Set("EndDate", fmt.Sprint(*params.EndDate)) -} - if params != nil && params.EventType != nil { - data.Set("EventType", *params.EventType) -} - if params != nil && params.Minutes != nil { - data.Set("Minutes", fmt.Sprint(*params.Minutes)) -} - if params != nil && params.ReservationSid != nil { - data.Set("ReservationSid", *params.ReservationSid) -} - if params != nil && params.StartDate != nil { - data.Set("StartDate", fmt.Sprint(*params.StartDate)) -} - if params != nil && params.TaskQueueSid != nil { - data.Set("TaskQueueSid", *params.TaskQueueSid) -} - if params != nil && params.TaskSid != nil { - data.Set("TaskSid", *params.TaskSid) -} - if params != nil && params.WorkerSid != nil { - data.Set("WorkerSid", *params.WorkerSid) -} - if params != nil && params.WorkflowSid != nil { - data.Set("WorkflowSid", *params.WorkflowSid) -} - if params != nil && params.TaskChannel != nil { - data.Set("TaskChannel", *params.TaskChannel) -} - if params != nil && params.Sid != nil { - data.Set("Sid", *params.Sid) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) + } + if params != nil && params.EventType != nil { + data.Set("EventType", *params.EventType) + } + if params != nil && params.Minutes != nil { + data.Set("Minutes", fmt.Sprint(*params.Minutes)) + } + if params != nil && params.ReservationSid != nil { + data.Set("ReservationSid", *params.ReservationSid) + } + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) + } + if params != nil && params.TaskQueueSid != nil { + data.Set("TaskQueueSid", *params.TaskQueueSid) + } + if params != nil && params.TaskSid != nil { + data.Set("TaskSid", *params.TaskSid) + } + if params != nil && params.WorkerSid != nil { + data.Set("WorkerSid", *params.WorkerSid) + } + if params != nil && params.WorkflowSid != nil { + data.Set("WorkflowSid", *params.WorkflowSid) + } + if params != nil && params.TaskChannel != nil { + data.Set("TaskChannel", *params.TaskChannel) + } + if params != nil && params.Sid != nil { + data.Set("Sid", *params.Sid) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListEventResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListEventResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListTaskParams Optional parameters for the method 'ListTask' type ListTaskParams struct { - Priority *int32 `json:"Priority,omitempty"` - AssignmentStatus *[]string `json:"AssignmentStatus,omitempty"` - WorkflowSid *string `json:"WorkflowSid,omitempty"` - WorkflowName *string `json:"WorkflowName,omitempty"` - TaskQueueSid *string `json:"TaskQueueSid,omitempty"` - TaskQueueName *string `json:"TaskQueueName,omitempty"` - EvaluateTaskAttributes *string `json:"EvaluateTaskAttributes,omitempty"` - Ordering *string `json:"Ordering,omitempty"` - HasAddons *bool `json:"HasAddons,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + Priority *int32 `json:"Priority,omitempty"` + AssignmentStatus *[]string `json:"AssignmentStatus,omitempty"` + WorkflowSid *string `json:"WorkflowSid,omitempty"` + WorkflowName *string `json:"WorkflowName,omitempty"` + TaskQueueSid *string `json:"TaskQueueSid,omitempty"` + TaskQueueName *string `json:"TaskQueueName,omitempty"` + EvaluateTaskAttributes *string `json:"EvaluateTaskAttributes,omitempty"` + Ordering *string `json:"Ordering,omitempty"` + HasAddons *bool `json:"HasAddons,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -1788,60 +1752,60 @@ type ListTaskParams struct { * @param "HasAddons" (bool) - Whether to read Tasks with addons. If `true`, returns only Tasks with addons. If `false`, returns only Tasks without addons. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListTaskResponse -*/ + */ func (c *DefaultApiService) ListTask(WorkspaceSid string, params *ListTaskParams) (*ListTaskResponse, error) { - path := "/v1/Workspaces/{WorkspaceSid}/Tasks" + path := "/v1/Workspaces/{WorkspaceSid}/Tasks" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Priority != nil { - data.Set("Priority", fmt.Sprint(*params.Priority)) -} - if params != nil && params.AssignmentStatus != nil { - data.Set("AssignmentStatus", strings.Join(*params.AssignmentStatus, ",")) -} - if params != nil && params.WorkflowSid != nil { - data.Set("WorkflowSid", *params.WorkflowSid) -} - if params != nil && params.WorkflowName != nil { - data.Set("WorkflowName", *params.WorkflowName) -} - if params != nil && params.TaskQueueSid != nil { - data.Set("TaskQueueSid", *params.TaskQueueSid) -} - if params != nil && params.TaskQueueName != nil { - data.Set("TaskQueueName", *params.TaskQueueName) -} - if params != nil && params.EvaluateTaskAttributes != nil { - data.Set("EvaluateTaskAttributes", *params.EvaluateTaskAttributes) -} - if params != nil && params.Ordering != nil { - data.Set("Ordering", *params.Ordering) -} - if params != nil && params.HasAddons != nil { - data.Set("HasAddons", fmt.Sprint(*params.HasAddons)) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.Priority != nil { + data.Set("Priority", fmt.Sprint(*params.Priority)) + } + if params != nil && params.AssignmentStatus != nil { + data.Set("AssignmentStatus", strings.Join(*params.AssignmentStatus, ",")) + } + if params != nil && params.WorkflowSid != nil { + data.Set("WorkflowSid", *params.WorkflowSid) + } + if params != nil && params.WorkflowName != nil { + data.Set("WorkflowName", *params.WorkflowName) + } + if params != nil && params.TaskQueueSid != nil { + data.Set("TaskQueueSid", *params.TaskQueueSid) + } + if params != nil && params.TaskQueueName != nil { + data.Set("TaskQueueName", *params.TaskQueueName) + } + if params != nil && params.EvaluateTaskAttributes != nil { + data.Set("EvaluateTaskAttributes", *params.EvaluateTaskAttributes) + } + if params != nil && params.Ordering != nil { + data.Set("Ordering", *params.Ordering) + } + if params != nil && params.HasAddons != nil { + data.Set("HasAddons", fmt.Sprint(*params.HasAddons)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListTaskResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListTaskResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListTaskChannelParams Optional parameters for the method 'ListTaskChannel' type ListTaskChannelParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1853,39 +1817,39 @@ type ListTaskChannelParams struct { * @param optional nil or *ListTaskChannelParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListTaskChannelResponse -*/ + */ func (c *DefaultApiService) ListTaskChannel(WorkspaceSid string, params *ListTaskChannelParams) (*ListTaskChannelResponse, error) { - path := "/v1/Workspaces/{WorkspaceSid}/TaskChannels" + path := "/v1/Workspaces/{WorkspaceSid}/TaskChannels" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListTaskChannelResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListTaskChannelResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListTaskQueueParams Optional parameters for the method 'ListTaskQueue' type ListTaskQueueParams struct { - FriendlyName *string `json:"FriendlyName,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` EvaluateWorkerAttributes *string `json:"EvaluateWorkerAttributes,omitempty"` - WorkerSid *string `json:"WorkerSid,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + WorkerSid *string `json:"WorkerSid,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -1897,51 +1861,51 @@ type ListTaskQueueParams struct { * @param "WorkerSid" (string) - The SID of the Worker with the TaskQueue resources to read. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListTaskQueueResponse -*/ + */ func (c *DefaultApiService) ListTaskQueue(WorkspaceSid string, params *ListTaskQueueParams) (*ListTaskQueueResponse, error) { - path := "/v1/Workspaces/{WorkspaceSid}/TaskQueues" + path := "/v1/Workspaces/{WorkspaceSid}/TaskQueues" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.EvaluateWorkerAttributes != nil { - data.Set("EvaluateWorkerAttributes", *params.EvaluateWorkerAttributes) -} - if params != nil && params.WorkerSid != nil { - data.Set("WorkerSid", *params.WorkerSid) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.EvaluateWorkerAttributes != nil { + data.Set("EvaluateWorkerAttributes", *params.EvaluateWorkerAttributes) + } + if params != nil && params.WorkerSid != nil { + data.Set("WorkerSid", *params.WorkerSid) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListTaskQueueResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListTaskQueueResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListTaskQueuesStatisticsParams Optional parameters for the method 'ListTaskQueuesStatistics' type ListTaskQueuesStatisticsParams struct { - EndDate *time.Time `json:"EndDate,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Minutes *int32 `json:"Minutes,omitempty"` - StartDate *time.Time `json:"StartDate,omitempty"` - TaskChannel *string `json:"TaskChannel,omitempty"` - SplitByWaitTime *string `json:"SplitByWaitTime,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + EndDate *time.Time `json:"EndDate,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Minutes *int32 `json:"Minutes,omitempty"` + StartDate *time.Time `json:"StartDate,omitempty"` + TaskChannel *string `json:"TaskChannel,omitempty"` + SplitByWaitTime *string `json:"SplitByWaitTime,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -1956,55 +1920,55 @@ type ListTaskQueuesStatisticsParams struct { * @param "SplitByWaitTime" (string) - A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on. For each threshold specified, the number of Tasks canceled and reservations accepted above and below the specified thresholds in seconds are computed. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListTaskQueuesStatisticsResponse -*/ + */ func (c *DefaultApiService) ListTaskQueuesStatistics(WorkspaceSid string, params *ListTaskQueuesStatisticsParams) (*ListTaskQueuesStatisticsResponse, error) { - path := "/v1/Workspaces/{WorkspaceSid}/TaskQueues/Statistics" + path := "/v1/Workspaces/{WorkspaceSid}/TaskQueues/Statistics" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.EndDate != nil { - data.Set("EndDate", fmt.Sprint(*params.EndDate)) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.Minutes != nil { - data.Set("Minutes", fmt.Sprint(*params.Minutes)) -} - if params != nil && params.StartDate != nil { - data.Set("StartDate", fmt.Sprint(*params.StartDate)) -} - if params != nil && params.TaskChannel != nil { - data.Set("TaskChannel", *params.TaskChannel) -} - if params != nil && params.SplitByWaitTime != nil { - data.Set("SplitByWaitTime", *params.SplitByWaitTime) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Minutes != nil { + data.Set("Minutes", fmt.Sprint(*params.Minutes)) + } + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) + } + if params != nil && params.TaskChannel != nil { + data.Set("TaskChannel", *params.TaskChannel) + } + if params != nil && params.SplitByWaitTime != nil { + data.Set("SplitByWaitTime", *params.SplitByWaitTime) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListTaskQueuesStatisticsResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListTaskQueuesStatisticsResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListTaskReservationParams Optional parameters for the method 'ListTaskReservation' type ListTaskReservationParams struct { ReservationStatus *string `json:"ReservationStatus,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -2015,47 +1979,47 @@ type ListTaskReservationParams struct { * @param "ReservationStatus" (string) - Returns the list of reservations for a task with a specified ReservationStatus. Can be: `pending`, `accepted`, `rejected`, or `timeout`. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListTaskReservationResponse -*/ + */ func (c *DefaultApiService) ListTaskReservation(WorkspaceSid string, TaskSid string, params *ListTaskReservationParams) (*ListTaskReservationResponse, error) { - path := "/v1/Workspaces/{WorkspaceSid}/Tasks/{TaskSid}/Reservations" + path := "/v1/Workspaces/{WorkspaceSid}/Tasks/{TaskSid}/Reservations" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) path = strings.Replace(path, "{"+"TaskSid"+"}", TaskSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.ReservationStatus != nil { - data.Set("ReservationStatus", *params.ReservationStatus) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.ReservationStatus != nil { + data.Set("ReservationStatus", *params.ReservationStatus) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListTaskReservationResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListTaskReservationResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListWorkerParams Optional parameters for the method 'ListWorker' type ListWorkerParams struct { - ActivityName *string `json:"ActivityName,omitempty"` - ActivitySid *string `json:"ActivitySid,omitempty"` - Available *string `json:"Available,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` + ActivityName *string `json:"ActivityName,omitempty"` + ActivitySid *string `json:"ActivitySid,omitempty"` + Available *string `json:"Available,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` TargetWorkersExpression *string `json:"TargetWorkersExpression,omitempty"` - TaskQueueName *string `json:"TaskQueueName,omitempty"` - TaskQueueSid *string `json:"TaskQueueSid,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + TaskQueueName *string `json:"TaskQueueName,omitempty"` + TaskQueueSid *string `json:"TaskQueueSid,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -2071,54 +2035,54 @@ type ListWorkerParams struct { * @param "TaskQueueSid" (string) - The SID of the TaskQueue that the Workers to read are eligible for. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListWorkerResponse -*/ + */ func (c *DefaultApiService) ListWorker(WorkspaceSid string, params *ListWorkerParams) (*ListWorkerResponse, error) { - path := "/v1/Workspaces/{WorkspaceSid}/Workers" + path := "/v1/Workspaces/{WorkspaceSid}/Workers" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.ActivityName != nil { - data.Set("ActivityName", *params.ActivityName) -} - if params != nil && params.ActivitySid != nil { - data.Set("ActivitySid", *params.ActivitySid) -} - if params != nil && params.Available != nil { - data.Set("Available", *params.Available) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.TargetWorkersExpression != nil { - data.Set("TargetWorkersExpression", *params.TargetWorkersExpression) -} - if params != nil && params.TaskQueueName != nil { - data.Set("TaskQueueName", *params.TaskQueueName) -} - if params != nil && params.TaskQueueSid != nil { - data.Set("TaskQueueSid", *params.TaskQueueSid) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.ActivityName != nil { + data.Set("ActivityName", *params.ActivityName) + } + if params != nil && params.ActivitySid != nil { + data.Set("ActivitySid", *params.ActivitySid) + } + if params != nil && params.Available != nil { + data.Set("Available", *params.Available) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.TargetWorkersExpression != nil { + data.Set("TargetWorkersExpression", *params.TargetWorkersExpression) + } + if params != nil && params.TaskQueueName != nil { + data.Set("TaskQueueName", *params.TaskQueueName) + } + if params != nil && params.TaskQueueSid != nil { + data.Set("TaskQueueSid", *params.TaskQueueSid) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListWorkerResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListWorkerResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListWorkerChannelParams Optional parameters for the method 'ListWorkerChannel' type ListWorkerChannelParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -2131,38 +2095,38 @@ type ListWorkerChannelParams struct { * @param optional nil or *ListWorkerChannelParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListWorkerChannelResponse -*/ + */ func (c *DefaultApiService) ListWorkerChannel(WorkspaceSid string, WorkerSid string, params *ListWorkerChannelParams) (*ListWorkerChannelResponse, error) { - path := "/v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Channels" + path := "/v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Channels" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) path = strings.Replace(path, "{"+"WorkerSid"+"}", WorkerSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListWorkerChannelResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListWorkerChannelResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListWorkerReservationParams Optional parameters for the method 'ListWorkerReservation' type ListWorkerReservationParams struct { ReservationStatus *string `json:"ReservationStatus,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -2173,41 +2137,41 @@ type ListWorkerReservationParams struct { * @param "ReservationStatus" (string) - Returns the list of reservations for a worker with a specified ReservationStatus. Can be: `pending`, `accepted`, `rejected`, `timeout`, `canceled`, or `rescinded`. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListWorkerReservationResponse -*/ + */ func (c *DefaultApiService) ListWorkerReservation(WorkspaceSid string, WorkerSid string, params *ListWorkerReservationParams) (*ListWorkerReservationResponse, error) { - path := "/v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Reservations" + path := "/v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Reservations" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) path = strings.Replace(path, "{"+"WorkerSid"+"}", WorkerSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.ReservationStatus != nil { - data.Set("ReservationStatus", *params.ReservationStatus) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.ReservationStatus != nil { + data.Set("ReservationStatus", *params.ReservationStatus) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListWorkerReservationResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListWorkerReservationResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListWorkflowParams Optional parameters for the method 'ListWorkflow' type ListWorkflowParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -2217,40 +2181,40 @@ type ListWorkflowParams struct { * @param "FriendlyName" (string) - The `friendly_name` of the Workflow resources to read. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListWorkflowResponse -*/ + */ func (c *DefaultApiService) ListWorkflow(WorkspaceSid string, params *ListWorkflowParams) (*ListWorkflowResponse, error) { - path := "/v1/Workspaces/{WorkspaceSid}/Workflows" + path := "/v1/Workspaces/{WorkspaceSid}/Workflows" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListWorkflowResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListWorkflowResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListWorkspaceParams Optional parameters for the method 'ListWorkspace' type ListWorkspaceParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -2259,35 +2223,35 @@ type ListWorkspaceParams struct { * @param "FriendlyName" (string) - The `friendly_name` of the Workspace resources to read. For example `Customer Support` or `2014 Election Campaign`. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListWorkspaceResponse -*/ + */ func (c *DefaultApiService) ListWorkspace(params *ListWorkspaceParams) (*ListWorkspaceResponse, error) { - path := "/v1/Workspaces" - - data := url.Values{} - headers := 0 + path := "/v1/Workspaces" - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListWorkspaceResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListWorkspaceResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateActivityParams Optional parameters for the method 'UpdateActivity' type UpdateActivityParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` @@ -2300,41 +2264,41 @@ type UpdateActivityParams struct { * @param optional nil or *UpdateActivityParams - Optional Parameters: * @param "FriendlyName" (string) - A descriptive string that you create to describe the Activity resource. It can be up to 64 characters long. These names are used to calculate and expose statistics about Workers, and provide visibility into the state of each Worker. Examples of friendly names include: `on-call`, `break`, and `email`. * @return TaskrouterV1WorkspaceActivity -*/ + */ func (c *DefaultApiService) UpdateActivity(WorkspaceSid string, Sid string, params *UpdateActivityParams) (*TaskrouterV1WorkspaceActivity, error) { - path := "/v1/Workspaces/{WorkspaceSid}/Activities/{Sid}" + path := "/v1/Workspaces/{WorkspaceSid}/Activities/{Sid}" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} + data := url.Values{} + headers := 0 + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &TaskrouterV1WorkspaceActivity{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TaskrouterV1WorkspaceActivity{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateTaskParams Optional parameters for the method 'UpdateTask' type UpdateTaskParams struct { AssignmentStatus *string `json:"AssignmentStatus,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - Priority *int32 `json:"Priority,omitempty"` - Reason *string `json:"Reason,omitempty"` - TaskChannel *string `json:"TaskChannel,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + Priority *int32 `json:"Priority,omitempty"` + Reason *string `json:"Reason,omitempty"` + TaskChannel *string `json:"TaskChannel,omitempty"` } /* @@ -2348,50 +2312,50 @@ type UpdateTaskParams struct { * @param "Reason" (string) - The reason that the Task was canceled or completed. This parameter is required only if the Task is canceled or completed. Setting this value queues the task for deletion and logs the reason. * @param "TaskChannel" (string) - When MultiTasking is enabled, specify the TaskChannel with the task to update. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. * @return TaskrouterV1WorkspaceTask -*/ + */ func (c *DefaultApiService) UpdateTask(WorkspaceSid string, Sid string, params *UpdateTaskParams) (*TaskrouterV1WorkspaceTask, error) { - path := "/v1/Workspaces/{WorkspaceSid}/Tasks/{Sid}" + path := "/v1/Workspaces/{WorkspaceSid}/Tasks/{Sid}" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.AssignmentStatus != nil { - data.Set("AssignmentStatus", *params.AssignmentStatus) -} - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) -} - if params != nil && params.Priority != nil { - data.Set("Priority", fmt.Sprint(*params.Priority)) -} - if params != nil && params.Reason != nil { - data.Set("Reason", *params.Reason) -} - if params != nil && params.TaskChannel != nil { - data.Set("TaskChannel", *params.TaskChannel) -} + if params != nil && params.AssignmentStatus != nil { + data.Set("AssignmentStatus", *params.AssignmentStatus) + } + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.Priority != nil { + data.Set("Priority", fmt.Sprint(*params.Priority)) + } + if params != nil && params.Reason != nil { + data.Set("Reason", *params.Reason) + } + if params != nil && params.TaskChannel != nil { + data.Set("TaskChannel", *params.TaskChannel) + } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + defer resp.Body.Close() - defer resp.Body.Close() + ps := &TaskrouterV1WorkspaceTask{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - ps := &TaskrouterV1WorkspaceTask{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err + return ps, err } + // UpdateTaskChannelParams Optional parameters for the method 'UpdateTaskChannel' type UpdateTaskChannelParams struct { - ChannelOptimizedRouting *bool `json:"ChannelOptimizedRouting,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` + ChannelOptimizedRouting *bool `json:"ChannelOptimizedRouting,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` } /* @@ -2402,45 +2366,45 @@ type UpdateTaskChannelParams struct { * @param "ChannelOptimizedRouting" (bool) - Whether the TaskChannel should prioritize Workers that have been idle. If `true`, Workers that have been idle the longest are prioritized. * @param "FriendlyName" (string) - A descriptive string that you create to describe the Task Channel. It can be up to 64 characters long. * @return TaskrouterV1WorkspaceTaskChannel -*/ + */ func (c *DefaultApiService) UpdateTaskChannel(WorkspaceSid string, Sid string, params *UpdateTaskChannelParams) (*TaskrouterV1WorkspaceTaskChannel, error) { - path := "/v1/Workspaces/{WorkspaceSid}/TaskChannels/{Sid}" + path := "/v1/Workspaces/{WorkspaceSid}/TaskChannels/{Sid}" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.ChannelOptimizedRouting != nil { - data.Set("ChannelOptimizedRouting", fmt.Sprint(*params.ChannelOptimizedRouting)) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} + data := url.Values{} + headers := 0 + if params != nil && params.ChannelOptimizedRouting != nil { + data.Set("ChannelOptimizedRouting", fmt.Sprint(*params.ChannelOptimizedRouting)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &TaskrouterV1WorkspaceTaskChannel{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TaskrouterV1WorkspaceTaskChannel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateTaskQueueParams Optional parameters for the method 'UpdateTaskQueue' type UpdateTaskQueueParams struct { - AssignmentActivitySid *string `json:"AssignmentActivitySid,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - MaxReservedWorkers *int32 `json:"MaxReservedWorkers,omitempty"` + AssignmentActivitySid *string `json:"AssignmentActivitySid,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + MaxReservedWorkers *int32 `json:"MaxReservedWorkers,omitempty"` ReservationActivitySid *string `json:"ReservationActivitySid,omitempty"` - TargetWorkers *string `json:"TargetWorkers,omitempty"` - TaskOrder *string `json:"TaskOrder,omitempty"` + TargetWorkers *string `json:"TargetWorkers,omitempty"` + TaskOrder *string `json:"TaskOrder,omitempty"` } /* @@ -2455,104 +2419,104 @@ type UpdateTaskQueueParams struct { * @param "TargetWorkers" (string) - A string describing the Worker selection criteria for any Tasks that enter the TaskQueue. For example '\\\"language\\\" == \\\"spanish\\\"' If no TargetWorkers parameter is provided, Tasks will wait in the queue until they are either deleted or moved to another queue. Additional examples on how to describing Worker selection criteria below. * @param "TaskOrder" (string) - How Tasks will be assigned to Workers. Can be: `FIFO` or `LIFO` and the default is `FIFO`. Use `FIFO` to assign the oldest task first and `LIFO` to assign the most recent task first. For more information, see [Queue Ordering](https://www.twilio.com/docs/taskrouter/queue-ordering-last-first-out-lifo). * @return TaskrouterV1WorkspaceTaskQueue -*/ + */ func (c *DefaultApiService) UpdateTaskQueue(WorkspaceSid string, Sid string, params *UpdateTaskQueueParams) (*TaskrouterV1WorkspaceTaskQueue, error) { - path := "/v1/Workspaces/{WorkspaceSid}/TaskQueues/{Sid}" + path := "/v1/Workspaces/{WorkspaceSid}/TaskQueues/{Sid}" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.AssignmentActivitySid != nil { - data.Set("AssignmentActivitySid", *params.AssignmentActivitySid) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.MaxReservedWorkers != nil { - data.Set("MaxReservedWorkers", fmt.Sprint(*params.MaxReservedWorkers)) -} - if params != nil && params.ReservationActivitySid != nil { - data.Set("ReservationActivitySid", *params.ReservationActivitySid) -} - if params != nil && params.TargetWorkers != nil { - data.Set("TargetWorkers", *params.TargetWorkers) -} - if params != nil && params.TaskOrder != nil { - data.Set("TaskOrder", *params.TaskOrder) -} + data := url.Values{} + headers := 0 + if params != nil && params.AssignmentActivitySid != nil { + data.Set("AssignmentActivitySid", *params.AssignmentActivitySid) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.MaxReservedWorkers != nil { + data.Set("MaxReservedWorkers", fmt.Sprint(*params.MaxReservedWorkers)) + } + if params != nil && params.ReservationActivitySid != nil { + data.Set("ReservationActivitySid", *params.ReservationActivitySid) + } + if params != nil && params.TargetWorkers != nil { + data.Set("TargetWorkers", *params.TargetWorkers) + } + if params != nil && params.TaskOrder != nil { + data.Set("TaskOrder", *params.TaskOrder) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &TaskrouterV1WorkspaceTaskQueue{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TaskrouterV1WorkspaceTaskQueue{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateTaskReservationParams Optional parameters for the method 'UpdateTaskReservation' type UpdateTaskReservationParams struct { - Beep *string `json:"Beep,omitempty"` - BeepOnCustomerEntrance *bool `json:"BeepOnCustomerEntrance,omitempty"` - CallAccept *bool `json:"CallAccept,omitempty"` - CallFrom *string `json:"CallFrom,omitempty"` - CallRecord *string `json:"CallRecord,omitempty"` - CallStatusCallbackUrl *string `json:"CallStatusCallbackUrl,omitempty"` - CallTimeout *int32 `json:"CallTimeout,omitempty"` - CallTo *string `json:"CallTo,omitempty"` - CallUrl *string `json:"CallUrl,omitempty"` - ConferenceRecord *string `json:"ConferenceRecord,omitempty"` - ConferenceRecordingStatusCallback *string `json:"ConferenceRecordingStatusCallback,omitempty"` - ConferenceRecordingStatusCallbackMethod *string `json:"ConferenceRecordingStatusCallbackMethod,omitempty"` - ConferenceStatusCallback *string `json:"ConferenceStatusCallback,omitempty"` - ConferenceStatusCallbackEvent *[]string `json:"ConferenceStatusCallbackEvent,omitempty"` - ConferenceStatusCallbackMethod *string `json:"ConferenceStatusCallbackMethod,omitempty"` - ConferenceTrim *string `json:"ConferenceTrim,omitempty"` - DequeueFrom *string `json:"DequeueFrom,omitempty"` - DequeuePostWorkActivitySid *string `json:"DequeuePostWorkActivitySid,omitempty"` - DequeueRecord *string `json:"DequeueRecord,omitempty"` - DequeueStatusCallbackEvent *[]string `json:"DequeueStatusCallbackEvent,omitempty"` - DequeueStatusCallbackUrl *string `json:"DequeueStatusCallbackUrl,omitempty"` - DequeueTimeout *int32 `json:"DequeueTimeout,omitempty"` - DequeueTo *string `json:"DequeueTo,omitempty"` - EarlyMedia *bool `json:"EarlyMedia,omitempty"` - EndConferenceOnCustomerExit *bool `json:"EndConferenceOnCustomerExit,omitempty"` - EndConferenceOnExit *bool `json:"EndConferenceOnExit,omitempty"` - From *string `json:"From,omitempty"` - Instruction *string `json:"Instruction,omitempty"` - MaxParticipants *int32 `json:"MaxParticipants,omitempty"` - Muted *bool `json:"Muted,omitempty"` - PostWorkActivitySid *string `json:"PostWorkActivitySid,omitempty"` - Record *bool `json:"Record,omitempty"` - RecordingChannels *string `json:"RecordingChannels,omitempty"` - RecordingStatusCallback *string `json:"RecordingStatusCallback,omitempty"` - RecordingStatusCallbackMethod *string `json:"RecordingStatusCallbackMethod,omitempty"` - RedirectAccept *bool `json:"RedirectAccept,omitempty"` - RedirectCallSid *string `json:"RedirectCallSid,omitempty"` - RedirectUrl *string `json:"RedirectUrl,omitempty"` - Region *string `json:"Region,omitempty"` - ReservationStatus *string `json:"ReservationStatus,omitempty"` - SipAuthPassword *string `json:"SipAuthPassword,omitempty"` - SipAuthUsername *string `json:"SipAuthUsername,omitempty"` - StartConferenceOnEnter *bool `json:"StartConferenceOnEnter,omitempty"` - StatusCallback *string `json:"StatusCallback,omitempty"` - StatusCallbackEvent *[]string `json:"StatusCallbackEvent,omitempty"` - StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` - Supervisor *string `json:"Supervisor,omitempty"` - SupervisorMode *string `json:"SupervisorMode,omitempty"` - Timeout *int32 `json:"Timeout,omitempty"` - To *string `json:"To,omitempty"` - WaitMethod *string `json:"WaitMethod,omitempty"` - WaitUrl *string `json:"WaitUrl,omitempty"` - WorkerActivitySid *string `json:"WorkerActivitySid,omitempty"` + Beep *string `json:"Beep,omitempty"` + BeepOnCustomerEntrance *bool `json:"BeepOnCustomerEntrance,omitempty"` + CallAccept *bool `json:"CallAccept,omitempty"` + CallFrom *string `json:"CallFrom,omitempty"` + CallRecord *string `json:"CallRecord,omitempty"` + CallStatusCallbackUrl *string `json:"CallStatusCallbackUrl,omitempty"` + CallTimeout *int32 `json:"CallTimeout,omitempty"` + CallTo *string `json:"CallTo,omitempty"` + CallUrl *string `json:"CallUrl,omitempty"` + ConferenceRecord *string `json:"ConferenceRecord,omitempty"` + ConferenceRecordingStatusCallback *string `json:"ConferenceRecordingStatusCallback,omitempty"` + ConferenceRecordingStatusCallbackMethod *string `json:"ConferenceRecordingStatusCallbackMethod,omitempty"` + ConferenceStatusCallback *string `json:"ConferenceStatusCallback,omitempty"` + ConferenceStatusCallbackEvent *[]string `json:"ConferenceStatusCallbackEvent,omitempty"` + ConferenceStatusCallbackMethod *string `json:"ConferenceStatusCallbackMethod,omitempty"` + ConferenceTrim *string `json:"ConferenceTrim,omitempty"` + DequeueFrom *string `json:"DequeueFrom,omitempty"` + DequeuePostWorkActivitySid *string `json:"DequeuePostWorkActivitySid,omitempty"` + DequeueRecord *string `json:"DequeueRecord,omitempty"` + DequeueStatusCallbackEvent *[]string `json:"DequeueStatusCallbackEvent,omitempty"` + DequeueStatusCallbackUrl *string `json:"DequeueStatusCallbackUrl,omitempty"` + DequeueTimeout *int32 `json:"DequeueTimeout,omitempty"` + DequeueTo *string `json:"DequeueTo,omitempty"` + EarlyMedia *bool `json:"EarlyMedia,omitempty"` + EndConferenceOnCustomerExit *bool `json:"EndConferenceOnCustomerExit,omitempty"` + EndConferenceOnExit *bool `json:"EndConferenceOnExit,omitempty"` + From *string `json:"From,omitempty"` + Instruction *string `json:"Instruction,omitempty"` + MaxParticipants *int32 `json:"MaxParticipants,omitempty"` + Muted *bool `json:"Muted,omitempty"` + PostWorkActivitySid *string `json:"PostWorkActivitySid,omitempty"` + Record *bool `json:"Record,omitempty"` + RecordingChannels *string `json:"RecordingChannels,omitempty"` + RecordingStatusCallback *string `json:"RecordingStatusCallback,omitempty"` + RecordingStatusCallbackMethod *string `json:"RecordingStatusCallbackMethod,omitempty"` + RedirectAccept *bool `json:"RedirectAccept,omitempty"` + RedirectCallSid *string `json:"RedirectCallSid,omitempty"` + RedirectUrl *string `json:"RedirectUrl,omitempty"` + Region *string `json:"Region,omitempty"` + ReservationStatus *string `json:"ReservationStatus,omitempty"` + SipAuthPassword *string `json:"SipAuthPassword,omitempty"` + SipAuthUsername *string `json:"SipAuthUsername,omitempty"` + StartConferenceOnEnter *bool `json:"StartConferenceOnEnter,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` + StatusCallbackEvent *[]string `json:"StatusCallbackEvent,omitempty"` + StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` + Supervisor *string `json:"Supervisor,omitempty"` + SupervisorMode *string `json:"SupervisorMode,omitempty"` + Timeout *int32 `json:"Timeout,omitempty"` + To *string `json:"To,omitempty"` + WaitMethod *string `json:"WaitMethod,omitempty"` + WaitUrl *string `json:"WaitUrl,omitempty"` + WorkerActivitySid *string `json:"WorkerActivitySid,omitempty"` } /* @@ -2615,197 +2579,197 @@ type UpdateTaskReservationParams struct { * @param "WaitUrl" (string) - The URL we should call using the `wait_method` for the music to play while participants are waiting for the conference to start. The default value is the URL of our standard hold music. [Learn more about hold music](https://www.twilio.com/labs/twimlets/holdmusic). * @param "WorkerActivitySid" (string) - The new worker activity SID if rejecting a reservation. * @return TaskrouterV1WorkspaceTaskTaskReservation -*/ + */ func (c *DefaultApiService) UpdateTaskReservation(WorkspaceSid string, TaskSid string, Sid string, params *UpdateTaskReservationParams) (*TaskrouterV1WorkspaceTaskTaskReservation, error) { - path := "/v1/Workspaces/{WorkspaceSid}/Tasks/{TaskSid}/Reservations/{Sid}" + path := "/v1/Workspaces/{WorkspaceSid}/Tasks/{TaskSid}/Reservations/{Sid}" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) path = strings.Replace(path, "{"+"TaskSid"+"}", TaskSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Beep != nil { - data.Set("Beep", *params.Beep) -} - if params != nil && params.BeepOnCustomerEntrance != nil { - data.Set("BeepOnCustomerEntrance", fmt.Sprint(*params.BeepOnCustomerEntrance)) -} - if params != nil && params.CallAccept != nil { - data.Set("CallAccept", fmt.Sprint(*params.CallAccept)) -} - if params != nil && params.CallFrom != nil { - data.Set("CallFrom", *params.CallFrom) -} - if params != nil && params.CallRecord != nil { - data.Set("CallRecord", *params.CallRecord) -} - if params != nil && params.CallStatusCallbackUrl != nil { - data.Set("CallStatusCallbackUrl", *params.CallStatusCallbackUrl) -} - if params != nil && params.CallTimeout != nil { - data.Set("CallTimeout", fmt.Sprint(*params.CallTimeout)) -} - if params != nil && params.CallTo != nil { - data.Set("CallTo", *params.CallTo) -} - if params != nil && params.CallUrl != nil { - data.Set("CallUrl", *params.CallUrl) -} - if params != nil && params.ConferenceRecord != nil { - data.Set("ConferenceRecord", *params.ConferenceRecord) -} - if params != nil && params.ConferenceRecordingStatusCallback != nil { - data.Set("ConferenceRecordingStatusCallback", *params.ConferenceRecordingStatusCallback) -} - if params != nil && params.ConferenceRecordingStatusCallbackMethod != nil { - data.Set("ConferenceRecordingStatusCallbackMethod", *params.ConferenceRecordingStatusCallbackMethod) -} - if params != nil && params.ConferenceStatusCallback != nil { - data.Set("ConferenceStatusCallback", *params.ConferenceStatusCallback) -} - if params != nil && params.ConferenceStatusCallbackEvent != nil { - data.Set("ConferenceStatusCallbackEvent", strings.Join(*params.ConferenceStatusCallbackEvent, ",")) -} - if params != nil && params.ConferenceStatusCallbackMethod != nil { - data.Set("ConferenceStatusCallbackMethod", *params.ConferenceStatusCallbackMethod) -} - if params != nil && params.ConferenceTrim != nil { - data.Set("ConferenceTrim", *params.ConferenceTrim) -} - if params != nil && params.DequeueFrom != nil { - data.Set("DequeueFrom", *params.DequeueFrom) -} - if params != nil && params.DequeuePostWorkActivitySid != nil { - data.Set("DequeuePostWorkActivitySid", *params.DequeuePostWorkActivitySid) -} - if params != nil && params.DequeueRecord != nil { - data.Set("DequeueRecord", *params.DequeueRecord) -} - if params != nil && params.DequeueStatusCallbackEvent != nil { - data.Set("DequeueStatusCallbackEvent", strings.Join(*params.DequeueStatusCallbackEvent, ",")) -} - if params != nil && params.DequeueStatusCallbackUrl != nil { - data.Set("DequeueStatusCallbackUrl", *params.DequeueStatusCallbackUrl) -} - if params != nil && params.DequeueTimeout != nil { - data.Set("DequeueTimeout", fmt.Sprint(*params.DequeueTimeout)) -} - if params != nil && params.DequeueTo != nil { - data.Set("DequeueTo", *params.DequeueTo) -} - if params != nil && params.EarlyMedia != nil { - data.Set("EarlyMedia", fmt.Sprint(*params.EarlyMedia)) -} - if params != nil && params.EndConferenceOnCustomerExit != nil { - data.Set("EndConferenceOnCustomerExit", fmt.Sprint(*params.EndConferenceOnCustomerExit)) -} - if params != nil && params.EndConferenceOnExit != nil { - data.Set("EndConferenceOnExit", fmt.Sprint(*params.EndConferenceOnExit)) -} - if params != nil && params.From != nil { - data.Set("From", *params.From) -} - if params != nil && params.Instruction != nil { - data.Set("Instruction", *params.Instruction) -} - if params != nil && params.MaxParticipants != nil { - data.Set("MaxParticipants", fmt.Sprint(*params.MaxParticipants)) -} - if params != nil && params.Muted != nil { - data.Set("Muted", fmt.Sprint(*params.Muted)) -} - if params != nil && params.PostWorkActivitySid != nil { - data.Set("PostWorkActivitySid", *params.PostWorkActivitySid) -} - if params != nil && params.Record != nil { - data.Set("Record", fmt.Sprint(*params.Record)) -} - if params != nil && params.RecordingChannels != nil { - data.Set("RecordingChannels", *params.RecordingChannels) -} - if params != nil && params.RecordingStatusCallback != nil { - data.Set("RecordingStatusCallback", *params.RecordingStatusCallback) -} - if params != nil && params.RecordingStatusCallbackMethod != nil { - data.Set("RecordingStatusCallbackMethod", *params.RecordingStatusCallbackMethod) -} - if params != nil && params.RedirectAccept != nil { - data.Set("RedirectAccept", fmt.Sprint(*params.RedirectAccept)) -} - if params != nil && params.RedirectCallSid != nil { - data.Set("RedirectCallSid", *params.RedirectCallSid) -} - if params != nil && params.RedirectUrl != nil { - data.Set("RedirectUrl", *params.RedirectUrl) -} - if params != nil && params.Region != nil { - data.Set("Region", *params.Region) -} - if params != nil && params.ReservationStatus != nil { - data.Set("ReservationStatus", *params.ReservationStatus) -} - if params != nil && params.SipAuthPassword != nil { - data.Set("SipAuthPassword", *params.SipAuthPassword) -} - if params != nil && params.SipAuthUsername != nil { - data.Set("SipAuthUsername", *params.SipAuthUsername) -} - if params != nil && params.StartConferenceOnEnter != nil { - data.Set("StartConferenceOnEnter", fmt.Sprint(*params.StartConferenceOnEnter)) -} - if params != nil && params.StatusCallback != nil { - data.Set("StatusCallback", *params.StatusCallback) -} - if params != nil && params.StatusCallbackEvent != nil { - data.Set("StatusCallbackEvent", strings.Join(*params.StatusCallbackEvent, ",")) -} - if params != nil && params.StatusCallbackMethod != nil { - data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) -} - if params != nil && params.Supervisor != nil { - data.Set("Supervisor", *params.Supervisor) -} - if params != nil && params.SupervisorMode != nil { - data.Set("SupervisorMode", *params.SupervisorMode) -} - if params != nil && params.Timeout != nil { - data.Set("Timeout", fmt.Sprint(*params.Timeout)) -} - if params != nil && params.To != nil { - data.Set("To", *params.To) -} - if params != nil && params.WaitMethod != nil { - data.Set("WaitMethod", *params.WaitMethod) -} - if params != nil && params.WaitUrl != nil { - data.Set("WaitUrl", *params.WaitUrl) -} - if params != nil && params.WorkerActivitySid != nil { - data.Set("WorkerActivitySid", *params.WorkerActivitySid) -} + data := url.Values{} + headers := 0 + if params != nil && params.Beep != nil { + data.Set("Beep", *params.Beep) + } + if params != nil && params.BeepOnCustomerEntrance != nil { + data.Set("BeepOnCustomerEntrance", fmt.Sprint(*params.BeepOnCustomerEntrance)) + } + if params != nil && params.CallAccept != nil { + data.Set("CallAccept", fmt.Sprint(*params.CallAccept)) + } + if params != nil && params.CallFrom != nil { + data.Set("CallFrom", *params.CallFrom) + } + if params != nil && params.CallRecord != nil { + data.Set("CallRecord", *params.CallRecord) + } + if params != nil && params.CallStatusCallbackUrl != nil { + data.Set("CallStatusCallbackUrl", *params.CallStatusCallbackUrl) + } + if params != nil && params.CallTimeout != nil { + data.Set("CallTimeout", fmt.Sprint(*params.CallTimeout)) + } + if params != nil && params.CallTo != nil { + data.Set("CallTo", *params.CallTo) + } + if params != nil && params.CallUrl != nil { + data.Set("CallUrl", *params.CallUrl) + } + if params != nil && params.ConferenceRecord != nil { + data.Set("ConferenceRecord", *params.ConferenceRecord) + } + if params != nil && params.ConferenceRecordingStatusCallback != nil { + data.Set("ConferenceRecordingStatusCallback", *params.ConferenceRecordingStatusCallback) + } + if params != nil && params.ConferenceRecordingStatusCallbackMethod != nil { + data.Set("ConferenceRecordingStatusCallbackMethod", *params.ConferenceRecordingStatusCallbackMethod) + } + if params != nil && params.ConferenceStatusCallback != nil { + data.Set("ConferenceStatusCallback", *params.ConferenceStatusCallback) + } + if params != nil && params.ConferenceStatusCallbackEvent != nil { + data.Set("ConferenceStatusCallbackEvent", strings.Join(*params.ConferenceStatusCallbackEvent, ",")) + } + if params != nil && params.ConferenceStatusCallbackMethod != nil { + data.Set("ConferenceStatusCallbackMethod", *params.ConferenceStatusCallbackMethod) + } + if params != nil && params.ConferenceTrim != nil { + data.Set("ConferenceTrim", *params.ConferenceTrim) + } + if params != nil && params.DequeueFrom != nil { + data.Set("DequeueFrom", *params.DequeueFrom) + } + if params != nil && params.DequeuePostWorkActivitySid != nil { + data.Set("DequeuePostWorkActivitySid", *params.DequeuePostWorkActivitySid) + } + if params != nil && params.DequeueRecord != nil { + data.Set("DequeueRecord", *params.DequeueRecord) + } + if params != nil && params.DequeueStatusCallbackEvent != nil { + data.Set("DequeueStatusCallbackEvent", strings.Join(*params.DequeueStatusCallbackEvent, ",")) + } + if params != nil && params.DequeueStatusCallbackUrl != nil { + data.Set("DequeueStatusCallbackUrl", *params.DequeueStatusCallbackUrl) + } + if params != nil && params.DequeueTimeout != nil { + data.Set("DequeueTimeout", fmt.Sprint(*params.DequeueTimeout)) + } + if params != nil && params.DequeueTo != nil { + data.Set("DequeueTo", *params.DequeueTo) + } + if params != nil && params.EarlyMedia != nil { + data.Set("EarlyMedia", fmt.Sprint(*params.EarlyMedia)) + } + if params != nil && params.EndConferenceOnCustomerExit != nil { + data.Set("EndConferenceOnCustomerExit", fmt.Sprint(*params.EndConferenceOnCustomerExit)) + } + if params != nil && params.EndConferenceOnExit != nil { + data.Set("EndConferenceOnExit", fmt.Sprint(*params.EndConferenceOnExit)) + } + if params != nil && params.From != nil { + data.Set("From", *params.From) + } + if params != nil && params.Instruction != nil { + data.Set("Instruction", *params.Instruction) + } + if params != nil && params.MaxParticipants != nil { + data.Set("MaxParticipants", fmt.Sprint(*params.MaxParticipants)) + } + if params != nil && params.Muted != nil { + data.Set("Muted", fmt.Sprint(*params.Muted)) + } + if params != nil && params.PostWorkActivitySid != nil { + data.Set("PostWorkActivitySid", *params.PostWorkActivitySid) + } + if params != nil && params.Record != nil { + data.Set("Record", fmt.Sprint(*params.Record)) + } + if params != nil && params.RecordingChannels != nil { + data.Set("RecordingChannels", *params.RecordingChannels) + } + if params != nil && params.RecordingStatusCallback != nil { + data.Set("RecordingStatusCallback", *params.RecordingStatusCallback) + } + if params != nil && params.RecordingStatusCallbackMethod != nil { + data.Set("RecordingStatusCallbackMethod", *params.RecordingStatusCallbackMethod) + } + if params != nil && params.RedirectAccept != nil { + data.Set("RedirectAccept", fmt.Sprint(*params.RedirectAccept)) + } + if params != nil && params.RedirectCallSid != nil { + data.Set("RedirectCallSid", *params.RedirectCallSid) + } + if params != nil && params.RedirectUrl != nil { + data.Set("RedirectUrl", *params.RedirectUrl) + } + if params != nil && params.Region != nil { + data.Set("Region", *params.Region) + } + if params != nil && params.ReservationStatus != nil { + data.Set("ReservationStatus", *params.ReservationStatus) + } + if params != nil && params.SipAuthPassword != nil { + data.Set("SipAuthPassword", *params.SipAuthPassword) + } + if params != nil && params.SipAuthUsername != nil { + data.Set("SipAuthUsername", *params.SipAuthUsername) + } + if params != nil && params.StartConferenceOnEnter != nil { + data.Set("StartConferenceOnEnter", fmt.Sprint(*params.StartConferenceOnEnter)) + } + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) + } + if params != nil && params.StatusCallbackEvent != nil { + data.Set("StatusCallbackEvent", strings.Join(*params.StatusCallbackEvent, ",")) + } + if params != nil && params.StatusCallbackMethod != nil { + data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) + } + if params != nil && params.Supervisor != nil { + data.Set("Supervisor", *params.Supervisor) + } + if params != nil && params.SupervisorMode != nil { + data.Set("SupervisorMode", *params.SupervisorMode) + } + if params != nil && params.Timeout != nil { + data.Set("Timeout", fmt.Sprint(*params.Timeout)) + } + if params != nil && params.To != nil { + data.Set("To", *params.To) + } + if params != nil && params.WaitMethod != nil { + data.Set("WaitMethod", *params.WaitMethod) + } + if params != nil && params.WaitUrl != nil { + data.Set("WaitUrl", *params.WaitUrl) + } + if params != nil && params.WorkerActivitySid != nil { + data.Set("WorkerActivitySid", *params.WorkerActivitySid) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &TaskrouterV1WorkspaceTaskTaskReservation{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TaskrouterV1WorkspaceTaskTaskReservation{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateWorkerParams Optional parameters for the method 'UpdateWorker' type UpdateWorkerParams struct { - ActivitySid *string `json:"ActivitySid,omitempty"` - Attributes *string `json:"Attributes,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - RejectPendingReservations *bool `json:"RejectPendingReservations,omitempty"` + ActivitySid *string `json:"ActivitySid,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + RejectPendingReservations *bool `json:"RejectPendingReservations,omitempty"` } /* @@ -2818,47 +2782,47 @@ type UpdateWorkerParams struct { * @param "FriendlyName" (string) - A descriptive string that you create to describe the Worker. It can be up to 64 characters long. * @param "RejectPendingReservations" (bool) - Whether to reject pending reservations. * @return TaskrouterV1WorkspaceWorker -*/ + */ func (c *DefaultApiService) UpdateWorker(WorkspaceSid string, Sid string, params *UpdateWorkerParams) (*TaskrouterV1WorkspaceWorker, error) { - path := "/v1/Workspaces/{WorkspaceSid}/Workers/{Sid}" + path := "/v1/Workspaces/{WorkspaceSid}/Workers/{Sid}" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.ActivitySid != nil { - data.Set("ActivitySid", *params.ActivitySid) -} - if params != nil && params.Attributes != nil { - data.Set("Attributes", *params.Attributes) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.RejectPendingReservations != nil { - data.Set("RejectPendingReservations", fmt.Sprint(*params.RejectPendingReservations)) -} + data := url.Values{} + headers := 0 + if params != nil && params.ActivitySid != nil { + data.Set("ActivitySid", *params.ActivitySid) + } + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.RejectPendingReservations != nil { + data.Set("RejectPendingReservations", fmt.Sprint(*params.RejectPendingReservations)) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &TaskrouterV1WorkspaceWorker{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TaskrouterV1WorkspaceWorker{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateWorkerChannelParams Optional parameters for the method 'UpdateWorkerChannel' type UpdateWorkerChannelParams struct { - Available *bool `json:"Available,omitempty"` - Capacity *int32 `json:"Capacity,omitempty"` + Available *bool `json:"Available,omitempty"` + Capacity *int32 `json:"Capacity,omitempty"` } /* @@ -2870,91 +2834,91 @@ type UpdateWorkerChannelParams struct { * @param "Available" (bool) - Whether the WorkerChannel is available. Set to `false` to prevent the Worker from receiving any new Tasks of this TaskChannel type. * @param "Capacity" (int32) - The total number of Tasks that the Worker should handle for the TaskChannel type. TaskRouter creates reservations for Tasks of this TaskChannel type up to the specified capacity. If the capacity is 0, no new reservations will be created. * @return TaskrouterV1WorkspaceWorkerWorkerChannel -*/ + */ func (c *DefaultApiService) UpdateWorkerChannel(WorkspaceSid string, WorkerSid string, Sid string, params *UpdateWorkerChannelParams) (*TaskrouterV1WorkspaceWorkerWorkerChannel, error) { - path := "/v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Channels/{Sid}" + path := "/v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Channels/{Sid}" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) path = strings.Replace(path, "{"+"WorkerSid"+"}", WorkerSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Available != nil { - data.Set("Available", fmt.Sprint(*params.Available)) -} - if params != nil && params.Capacity != nil { - data.Set("Capacity", fmt.Sprint(*params.Capacity)) -} + data := url.Values{} + headers := 0 + if params != nil && params.Available != nil { + data.Set("Available", fmt.Sprint(*params.Available)) + } + if params != nil && params.Capacity != nil { + data.Set("Capacity", fmt.Sprint(*params.Capacity)) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &TaskrouterV1WorkspaceWorkerWorkerChannel{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TaskrouterV1WorkspaceWorkerWorkerChannel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateWorkerReservationParams Optional parameters for the method 'UpdateWorkerReservation' type UpdateWorkerReservationParams struct { - Beep *string `json:"Beep,omitempty"` - BeepOnCustomerEntrance *bool `json:"BeepOnCustomerEntrance,omitempty"` - CallAccept *bool `json:"CallAccept,omitempty"` - CallFrom *string `json:"CallFrom,omitempty"` - CallRecord *string `json:"CallRecord,omitempty"` - CallStatusCallbackUrl *string `json:"CallStatusCallbackUrl,omitempty"` - CallTimeout *int32 `json:"CallTimeout,omitempty"` - CallTo *string `json:"CallTo,omitempty"` - CallUrl *string `json:"CallUrl,omitempty"` - ConferenceRecord *string `json:"ConferenceRecord,omitempty"` - ConferenceRecordingStatusCallback *string `json:"ConferenceRecordingStatusCallback,omitempty"` - ConferenceRecordingStatusCallbackMethod *string `json:"ConferenceRecordingStatusCallbackMethod,omitempty"` - ConferenceStatusCallback *string `json:"ConferenceStatusCallback,omitempty"` - ConferenceStatusCallbackEvent *[]string `json:"ConferenceStatusCallbackEvent,omitempty"` - ConferenceStatusCallbackMethod *string `json:"ConferenceStatusCallbackMethod,omitempty"` - ConferenceTrim *string `json:"ConferenceTrim,omitempty"` - DequeueFrom *string `json:"DequeueFrom,omitempty"` - DequeuePostWorkActivitySid *string `json:"DequeuePostWorkActivitySid,omitempty"` - DequeueRecord *string `json:"DequeueRecord,omitempty"` - DequeueStatusCallbackEvent *[]string `json:"DequeueStatusCallbackEvent,omitempty"` - DequeueStatusCallbackUrl *string `json:"DequeueStatusCallbackUrl,omitempty"` - DequeueTimeout *int32 `json:"DequeueTimeout,omitempty"` - DequeueTo *string `json:"DequeueTo,omitempty"` - EarlyMedia *bool `json:"EarlyMedia,omitempty"` - EndConferenceOnCustomerExit *bool `json:"EndConferenceOnCustomerExit,omitempty"` - EndConferenceOnExit *bool `json:"EndConferenceOnExit,omitempty"` - From *string `json:"From,omitempty"` - Instruction *string `json:"Instruction,omitempty"` - MaxParticipants *int32 `json:"MaxParticipants,omitempty"` - Muted *bool `json:"Muted,omitempty"` - PostWorkActivitySid *string `json:"PostWorkActivitySid,omitempty"` - Record *bool `json:"Record,omitempty"` - RecordingChannels *string `json:"RecordingChannels,omitempty"` - RecordingStatusCallback *string `json:"RecordingStatusCallback,omitempty"` - RecordingStatusCallbackMethod *string `json:"RecordingStatusCallbackMethod,omitempty"` - RedirectAccept *bool `json:"RedirectAccept,omitempty"` - RedirectCallSid *string `json:"RedirectCallSid,omitempty"` - RedirectUrl *string `json:"RedirectUrl,omitempty"` - Region *string `json:"Region,omitempty"` - ReservationStatus *string `json:"ReservationStatus,omitempty"` - SipAuthPassword *string `json:"SipAuthPassword,omitempty"` - SipAuthUsername *string `json:"SipAuthUsername,omitempty"` - StartConferenceOnEnter *bool `json:"StartConferenceOnEnter,omitempty"` - StatusCallback *string `json:"StatusCallback,omitempty"` - StatusCallbackEvent *[]string `json:"StatusCallbackEvent,omitempty"` - StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` - Timeout *int32 `json:"Timeout,omitempty"` - To *string `json:"To,omitempty"` - WaitMethod *string `json:"WaitMethod,omitempty"` - WaitUrl *string `json:"WaitUrl,omitempty"` - WorkerActivitySid *string `json:"WorkerActivitySid,omitempty"` + Beep *string `json:"Beep,omitempty"` + BeepOnCustomerEntrance *bool `json:"BeepOnCustomerEntrance,omitempty"` + CallAccept *bool `json:"CallAccept,omitempty"` + CallFrom *string `json:"CallFrom,omitempty"` + CallRecord *string `json:"CallRecord,omitempty"` + CallStatusCallbackUrl *string `json:"CallStatusCallbackUrl,omitempty"` + CallTimeout *int32 `json:"CallTimeout,omitempty"` + CallTo *string `json:"CallTo,omitempty"` + CallUrl *string `json:"CallUrl,omitempty"` + ConferenceRecord *string `json:"ConferenceRecord,omitempty"` + ConferenceRecordingStatusCallback *string `json:"ConferenceRecordingStatusCallback,omitempty"` + ConferenceRecordingStatusCallbackMethod *string `json:"ConferenceRecordingStatusCallbackMethod,omitempty"` + ConferenceStatusCallback *string `json:"ConferenceStatusCallback,omitempty"` + ConferenceStatusCallbackEvent *[]string `json:"ConferenceStatusCallbackEvent,omitempty"` + ConferenceStatusCallbackMethod *string `json:"ConferenceStatusCallbackMethod,omitempty"` + ConferenceTrim *string `json:"ConferenceTrim,omitempty"` + DequeueFrom *string `json:"DequeueFrom,omitempty"` + DequeuePostWorkActivitySid *string `json:"DequeuePostWorkActivitySid,omitempty"` + DequeueRecord *string `json:"DequeueRecord,omitempty"` + DequeueStatusCallbackEvent *[]string `json:"DequeueStatusCallbackEvent,omitempty"` + DequeueStatusCallbackUrl *string `json:"DequeueStatusCallbackUrl,omitempty"` + DequeueTimeout *int32 `json:"DequeueTimeout,omitempty"` + DequeueTo *string `json:"DequeueTo,omitempty"` + EarlyMedia *bool `json:"EarlyMedia,omitempty"` + EndConferenceOnCustomerExit *bool `json:"EndConferenceOnCustomerExit,omitempty"` + EndConferenceOnExit *bool `json:"EndConferenceOnExit,omitempty"` + From *string `json:"From,omitempty"` + Instruction *string `json:"Instruction,omitempty"` + MaxParticipants *int32 `json:"MaxParticipants,omitempty"` + Muted *bool `json:"Muted,omitempty"` + PostWorkActivitySid *string `json:"PostWorkActivitySid,omitempty"` + Record *bool `json:"Record,omitempty"` + RecordingChannels *string `json:"RecordingChannels,omitempty"` + RecordingStatusCallback *string `json:"RecordingStatusCallback,omitempty"` + RecordingStatusCallbackMethod *string `json:"RecordingStatusCallbackMethod,omitempty"` + RedirectAccept *bool `json:"RedirectAccept,omitempty"` + RedirectCallSid *string `json:"RedirectCallSid,omitempty"` + RedirectUrl *string `json:"RedirectUrl,omitempty"` + Region *string `json:"Region,omitempty"` + ReservationStatus *string `json:"ReservationStatus,omitempty"` + SipAuthPassword *string `json:"SipAuthPassword,omitempty"` + SipAuthUsername *string `json:"SipAuthUsername,omitempty"` + StartConferenceOnEnter *bool `json:"StartConferenceOnEnter,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` + StatusCallbackEvent *[]string `json:"StatusCallbackEvent,omitempty"` + StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` + Timeout *int32 `json:"Timeout,omitempty"` + To *string `json:"To,omitempty"` + WaitMethod *string `json:"WaitMethod,omitempty"` + WaitUrl *string `json:"WaitUrl,omitempty"` + WorkerActivitySid *string `json:"WorkerActivitySid,omitempty"` } /* @@ -3015,193 +2979,193 @@ type UpdateWorkerReservationParams struct { * @param "WaitUrl" (string) - The URL we should call using the `wait_method` for the music to play while participants are waiting for the conference to start. The default value is the URL of our standard hold music. [Learn more about hold music](https://www.twilio.com/labs/twimlets/holdmusic). * @param "WorkerActivitySid" (string) - The new worker activity SID if rejecting a reservation. * @return TaskrouterV1WorkspaceWorkerWorkerReservation -*/ + */ func (c *DefaultApiService) UpdateWorkerReservation(WorkspaceSid string, WorkerSid string, Sid string, params *UpdateWorkerReservationParams) (*TaskrouterV1WorkspaceWorkerWorkerReservation, error) { - path := "/v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Reservations/{Sid}" + path := "/v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Reservations/{Sid}" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) path = strings.Replace(path, "{"+"WorkerSid"+"}", WorkerSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Beep != nil { - data.Set("Beep", *params.Beep) -} - if params != nil && params.BeepOnCustomerEntrance != nil { - data.Set("BeepOnCustomerEntrance", fmt.Sprint(*params.BeepOnCustomerEntrance)) -} - if params != nil && params.CallAccept != nil { - data.Set("CallAccept", fmt.Sprint(*params.CallAccept)) -} - if params != nil && params.CallFrom != nil { - data.Set("CallFrom", *params.CallFrom) -} - if params != nil && params.CallRecord != nil { - data.Set("CallRecord", *params.CallRecord) -} - if params != nil && params.CallStatusCallbackUrl != nil { - data.Set("CallStatusCallbackUrl", *params.CallStatusCallbackUrl) -} - if params != nil && params.CallTimeout != nil { - data.Set("CallTimeout", fmt.Sprint(*params.CallTimeout)) -} - if params != nil && params.CallTo != nil { - data.Set("CallTo", *params.CallTo) -} - if params != nil && params.CallUrl != nil { - data.Set("CallUrl", *params.CallUrl) -} - if params != nil && params.ConferenceRecord != nil { - data.Set("ConferenceRecord", *params.ConferenceRecord) -} - if params != nil && params.ConferenceRecordingStatusCallback != nil { - data.Set("ConferenceRecordingStatusCallback", *params.ConferenceRecordingStatusCallback) -} - if params != nil && params.ConferenceRecordingStatusCallbackMethod != nil { - data.Set("ConferenceRecordingStatusCallbackMethod", *params.ConferenceRecordingStatusCallbackMethod) -} - if params != nil && params.ConferenceStatusCallback != nil { - data.Set("ConferenceStatusCallback", *params.ConferenceStatusCallback) -} - if params != nil && params.ConferenceStatusCallbackEvent != nil { - data.Set("ConferenceStatusCallbackEvent", strings.Join(*params.ConferenceStatusCallbackEvent, ",")) -} - if params != nil && params.ConferenceStatusCallbackMethod != nil { - data.Set("ConferenceStatusCallbackMethod", *params.ConferenceStatusCallbackMethod) -} - if params != nil && params.ConferenceTrim != nil { - data.Set("ConferenceTrim", *params.ConferenceTrim) -} - if params != nil && params.DequeueFrom != nil { - data.Set("DequeueFrom", *params.DequeueFrom) -} - if params != nil && params.DequeuePostWorkActivitySid != nil { - data.Set("DequeuePostWorkActivitySid", *params.DequeuePostWorkActivitySid) -} - if params != nil && params.DequeueRecord != nil { - data.Set("DequeueRecord", *params.DequeueRecord) -} - if params != nil && params.DequeueStatusCallbackEvent != nil { - data.Set("DequeueStatusCallbackEvent", strings.Join(*params.DequeueStatusCallbackEvent, ",")) -} - if params != nil && params.DequeueStatusCallbackUrl != nil { - data.Set("DequeueStatusCallbackUrl", *params.DequeueStatusCallbackUrl) -} - if params != nil && params.DequeueTimeout != nil { - data.Set("DequeueTimeout", fmt.Sprint(*params.DequeueTimeout)) -} - if params != nil && params.DequeueTo != nil { - data.Set("DequeueTo", *params.DequeueTo) -} - if params != nil && params.EarlyMedia != nil { - data.Set("EarlyMedia", fmt.Sprint(*params.EarlyMedia)) -} - if params != nil && params.EndConferenceOnCustomerExit != nil { - data.Set("EndConferenceOnCustomerExit", fmt.Sprint(*params.EndConferenceOnCustomerExit)) -} - if params != nil && params.EndConferenceOnExit != nil { - data.Set("EndConferenceOnExit", fmt.Sprint(*params.EndConferenceOnExit)) -} - if params != nil && params.From != nil { - data.Set("From", *params.From) -} - if params != nil && params.Instruction != nil { - data.Set("Instruction", *params.Instruction) -} - if params != nil && params.MaxParticipants != nil { - data.Set("MaxParticipants", fmt.Sprint(*params.MaxParticipants)) -} - if params != nil && params.Muted != nil { - data.Set("Muted", fmt.Sprint(*params.Muted)) -} - if params != nil && params.PostWorkActivitySid != nil { - data.Set("PostWorkActivitySid", *params.PostWorkActivitySid) -} - if params != nil && params.Record != nil { - data.Set("Record", fmt.Sprint(*params.Record)) -} - if params != nil && params.RecordingChannels != nil { - data.Set("RecordingChannels", *params.RecordingChannels) -} - if params != nil && params.RecordingStatusCallback != nil { - data.Set("RecordingStatusCallback", *params.RecordingStatusCallback) -} - if params != nil && params.RecordingStatusCallbackMethod != nil { - data.Set("RecordingStatusCallbackMethod", *params.RecordingStatusCallbackMethod) -} - if params != nil && params.RedirectAccept != nil { - data.Set("RedirectAccept", fmt.Sprint(*params.RedirectAccept)) -} - if params != nil && params.RedirectCallSid != nil { - data.Set("RedirectCallSid", *params.RedirectCallSid) -} - if params != nil && params.RedirectUrl != nil { - data.Set("RedirectUrl", *params.RedirectUrl) -} - if params != nil && params.Region != nil { - data.Set("Region", *params.Region) -} - if params != nil && params.ReservationStatus != nil { - data.Set("ReservationStatus", *params.ReservationStatus) -} - if params != nil && params.SipAuthPassword != nil { - data.Set("SipAuthPassword", *params.SipAuthPassword) -} - if params != nil && params.SipAuthUsername != nil { - data.Set("SipAuthUsername", *params.SipAuthUsername) -} - if params != nil && params.StartConferenceOnEnter != nil { - data.Set("StartConferenceOnEnter", fmt.Sprint(*params.StartConferenceOnEnter)) -} - if params != nil && params.StatusCallback != nil { - data.Set("StatusCallback", *params.StatusCallback) -} - if params != nil && params.StatusCallbackEvent != nil { - data.Set("StatusCallbackEvent", strings.Join(*params.StatusCallbackEvent, ",")) -} - if params != nil && params.StatusCallbackMethod != nil { - data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) -} - if params != nil && params.Timeout != nil { - data.Set("Timeout", fmt.Sprint(*params.Timeout)) -} - if params != nil && params.To != nil { - data.Set("To", *params.To) -} - if params != nil && params.WaitMethod != nil { - data.Set("WaitMethod", *params.WaitMethod) -} - if params != nil && params.WaitUrl != nil { - data.Set("WaitUrl", *params.WaitUrl) -} - if params != nil && params.WorkerActivitySid != nil { - data.Set("WorkerActivitySid", *params.WorkerActivitySid) -} + data := url.Values{} + headers := 0 + if params != nil && params.Beep != nil { + data.Set("Beep", *params.Beep) + } + if params != nil && params.BeepOnCustomerEntrance != nil { + data.Set("BeepOnCustomerEntrance", fmt.Sprint(*params.BeepOnCustomerEntrance)) + } + if params != nil && params.CallAccept != nil { + data.Set("CallAccept", fmt.Sprint(*params.CallAccept)) + } + if params != nil && params.CallFrom != nil { + data.Set("CallFrom", *params.CallFrom) + } + if params != nil && params.CallRecord != nil { + data.Set("CallRecord", *params.CallRecord) + } + if params != nil && params.CallStatusCallbackUrl != nil { + data.Set("CallStatusCallbackUrl", *params.CallStatusCallbackUrl) + } + if params != nil && params.CallTimeout != nil { + data.Set("CallTimeout", fmt.Sprint(*params.CallTimeout)) + } + if params != nil && params.CallTo != nil { + data.Set("CallTo", *params.CallTo) + } + if params != nil && params.CallUrl != nil { + data.Set("CallUrl", *params.CallUrl) + } + if params != nil && params.ConferenceRecord != nil { + data.Set("ConferenceRecord", *params.ConferenceRecord) + } + if params != nil && params.ConferenceRecordingStatusCallback != nil { + data.Set("ConferenceRecordingStatusCallback", *params.ConferenceRecordingStatusCallback) + } + if params != nil && params.ConferenceRecordingStatusCallbackMethod != nil { + data.Set("ConferenceRecordingStatusCallbackMethod", *params.ConferenceRecordingStatusCallbackMethod) + } + if params != nil && params.ConferenceStatusCallback != nil { + data.Set("ConferenceStatusCallback", *params.ConferenceStatusCallback) + } + if params != nil && params.ConferenceStatusCallbackEvent != nil { + data.Set("ConferenceStatusCallbackEvent", strings.Join(*params.ConferenceStatusCallbackEvent, ",")) + } + if params != nil && params.ConferenceStatusCallbackMethod != nil { + data.Set("ConferenceStatusCallbackMethod", *params.ConferenceStatusCallbackMethod) + } + if params != nil && params.ConferenceTrim != nil { + data.Set("ConferenceTrim", *params.ConferenceTrim) + } + if params != nil && params.DequeueFrom != nil { + data.Set("DequeueFrom", *params.DequeueFrom) + } + if params != nil && params.DequeuePostWorkActivitySid != nil { + data.Set("DequeuePostWorkActivitySid", *params.DequeuePostWorkActivitySid) + } + if params != nil && params.DequeueRecord != nil { + data.Set("DequeueRecord", *params.DequeueRecord) + } + if params != nil && params.DequeueStatusCallbackEvent != nil { + data.Set("DequeueStatusCallbackEvent", strings.Join(*params.DequeueStatusCallbackEvent, ",")) + } + if params != nil && params.DequeueStatusCallbackUrl != nil { + data.Set("DequeueStatusCallbackUrl", *params.DequeueStatusCallbackUrl) + } + if params != nil && params.DequeueTimeout != nil { + data.Set("DequeueTimeout", fmt.Sprint(*params.DequeueTimeout)) + } + if params != nil && params.DequeueTo != nil { + data.Set("DequeueTo", *params.DequeueTo) + } + if params != nil && params.EarlyMedia != nil { + data.Set("EarlyMedia", fmt.Sprint(*params.EarlyMedia)) + } + if params != nil && params.EndConferenceOnCustomerExit != nil { + data.Set("EndConferenceOnCustomerExit", fmt.Sprint(*params.EndConferenceOnCustomerExit)) + } + if params != nil && params.EndConferenceOnExit != nil { + data.Set("EndConferenceOnExit", fmt.Sprint(*params.EndConferenceOnExit)) + } + if params != nil && params.From != nil { + data.Set("From", *params.From) + } + if params != nil && params.Instruction != nil { + data.Set("Instruction", *params.Instruction) + } + if params != nil && params.MaxParticipants != nil { + data.Set("MaxParticipants", fmt.Sprint(*params.MaxParticipants)) + } + if params != nil && params.Muted != nil { + data.Set("Muted", fmt.Sprint(*params.Muted)) + } + if params != nil && params.PostWorkActivitySid != nil { + data.Set("PostWorkActivitySid", *params.PostWorkActivitySid) + } + if params != nil && params.Record != nil { + data.Set("Record", fmt.Sprint(*params.Record)) + } + if params != nil && params.RecordingChannels != nil { + data.Set("RecordingChannels", *params.RecordingChannels) + } + if params != nil && params.RecordingStatusCallback != nil { + data.Set("RecordingStatusCallback", *params.RecordingStatusCallback) + } + if params != nil && params.RecordingStatusCallbackMethod != nil { + data.Set("RecordingStatusCallbackMethod", *params.RecordingStatusCallbackMethod) + } + if params != nil && params.RedirectAccept != nil { + data.Set("RedirectAccept", fmt.Sprint(*params.RedirectAccept)) + } + if params != nil && params.RedirectCallSid != nil { + data.Set("RedirectCallSid", *params.RedirectCallSid) + } + if params != nil && params.RedirectUrl != nil { + data.Set("RedirectUrl", *params.RedirectUrl) + } + if params != nil && params.Region != nil { + data.Set("Region", *params.Region) + } + if params != nil && params.ReservationStatus != nil { + data.Set("ReservationStatus", *params.ReservationStatus) + } + if params != nil && params.SipAuthPassword != nil { + data.Set("SipAuthPassword", *params.SipAuthPassword) + } + if params != nil && params.SipAuthUsername != nil { + data.Set("SipAuthUsername", *params.SipAuthUsername) + } + if params != nil && params.StartConferenceOnEnter != nil { + data.Set("StartConferenceOnEnter", fmt.Sprint(*params.StartConferenceOnEnter)) + } + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) + } + if params != nil && params.StatusCallbackEvent != nil { + data.Set("StatusCallbackEvent", strings.Join(*params.StatusCallbackEvent, ",")) + } + if params != nil && params.StatusCallbackMethod != nil { + data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) + } + if params != nil && params.Timeout != nil { + data.Set("Timeout", fmt.Sprint(*params.Timeout)) + } + if params != nil && params.To != nil { + data.Set("To", *params.To) + } + if params != nil && params.WaitMethod != nil { + data.Set("WaitMethod", *params.WaitMethod) + } + if params != nil && params.WaitUrl != nil { + data.Set("WaitUrl", *params.WaitUrl) + } + if params != nil && params.WorkerActivitySid != nil { + data.Set("WorkerActivitySid", *params.WorkerActivitySid) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &TaskrouterV1WorkspaceWorkerWorkerReservation{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TaskrouterV1WorkspaceWorkerWorkerReservation{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateWorkflowParams Optional parameters for the method 'UpdateWorkflow' type UpdateWorkflowParams struct { - AssignmentCallbackUrl *string `json:"AssignmentCallbackUrl,omitempty"` - Configuration *string `json:"Configuration,omitempty"` + AssignmentCallbackUrl *string `json:"AssignmentCallbackUrl,omitempty"` + Configuration *string `json:"Configuration,omitempty"` FallbackAssignmentCallbackUrl *string `json:"FallbackAssignmentCallbackUrl,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - ReEvaluateTasks *string `json:"ReEvaluateTasks,omitempty"` - TaskReservationTimeout *int32 `json:"TaskReservationTimeout,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + ReEvaluateTasks *string `json:"ReEvaluateTasks,omitempty"` + TaskReservationTimeout *int32 `json:"TaskReservationTimeout,omitempty"` } /* @@ -3216,58 +3180,58 @@ type UpdateWorkflowParams struct { * @param "ReEvaluateTasks" (string) - Whether or not to re-evaluate Tasks. The default is `false`, which means Tasks in the Workflow will not be processed through the assignment loop again. * @param "TaskReservationTimeout" (int32) - How long TaskRouter will wait for a confirmation response from your application after it assigns a Task to a Worker. Can be up to `86,400` (24 hours) and the default is `120`. * @return TaskrouterV1WorkspaceWorkflow -*/ + */ func (c *DefaultApiService) UpdateWorkflow(WorkspaceSid string, Sid string, params *UpdateWorkflowParams) (*TaskrouterV1WorkspaceWorkflow, error) { - path := "/v1/Workspaces/{WorkspaceSid}/Workflows/{Sid}" + path := "/v1/Workspaces/{WorkspaceSid}/Workflows/{Sid}" path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.AssignmentCallbackUrl != nil { - data.Set("AssignmentCallbackUrl", *params.AssignmentCallbackUrl) -} - if params != nil && params.Configuration != nil { - data.Set("Configuration", *params.Configuration) -} - if params != nil && params.FallbackAssignmentCallbackUrl != nil { - data.Set("FallbackAssignmentCallbackUrl", *params.FallbackAssignmentCallbackUrl) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.ReEvaluateTasks != nil { - data.Set("ReEvaluateTasks", *params.ReEvaluateTasks) -} - if params != nil && params.TaskReservationTimeout != nil { - data.Set("TaskReservationTimeout", fmt.Sprint(*params.TaskReservationTimeout)) -} + data := url.Values{} + headers := 0 + if params != nil && params.AssignmentCallbackUrl != nil { + data.Set("AssignmentCallbackUrl", *params.AssignmentCallbackUrl) + } + if params != nil && params.Configuration != nil { + data.Set("Configuration", *params.Configuration) + } + if params != nil && params.FallbackAssignmentCallbackUrl != nil { + data.Set("FallbackAssignmentCallbackUrl", *params.FallbackAssignmentCallbackUrl) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.ReEvaluateTasks != nil { + data.Set("ReEvaluateTasks", *params.ReEvaluateTasks) + } + if params != nil && params.TaskReservationTimeout != nil { + data.Set("TaskReservationTimeout", fmt.Sprint(*params.TaskReservationTimeout)) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &TaskrouterV1WorkspaceWorkflow{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TaskrouterV1WorkspaceWorkflow{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateWorkspaceParams Optional parameters for the method 'UpdateWorkspace' type UpdateWorkspaceParams struct { - DefaultActivitySid *string `json:"DefaultActivitySid,omitempty"` - EventCallbackUrl *string `json:"EventCallbackUrl,omitempty"` - EventsFilter *string `json:"EventsFilter,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - MultiTaskEnabled *bool `json:"MultiTaskEnabled,omitempty"` + DefaultActivitySid *string `json:"DefaultActivitySid,omitempty"` + EventCallbackUrl *string `json:"EventCallbackUrl,omitempty"` + EventsFilter *string `json:"EventsFilter,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + MultiTaskEnabled *bool `json:"MultiTaskEnabled,omitempty"` PrioritizeQueueOrder *string `json:"PrioritizeQueueOrder,omitempty"` - TimeoutActivitySid *string `json:"TimeoutActivitySid,omitempty"` + TimeoutActivitySid *string `json:"TimeoutActivitySid,omitempty"` } /* @@ -3282,48 +3246,47 @@ type UpdateWorkspaceParams struct { * @param "PrioritizeQueueOrder" (string) - The type of TaskQueue to prioritize when Workers are receiving Tasks from both types of TaskQueues. Can be: `LIFO` or `FIFO` and the default is `FIFO`. For more information, see [Queue Ordering][https://www.twilio.com/docs/taskrouter/queue-ordering-last-first-out-lifo]. * @param "TimeoutActivitySid" (string) - The SID of the Activity that will be assigned to a Worker when a Task reservation times out without a response. * @return TaskrouterV1Workspace -*/ + */ func (c *DefaultApiService) UpdateWorkspace(Sid string, params *UpdateWorkspaceParams) (*TaskrouterV1Workspace, error) { - path := "/v1/Workspaces/{Sid}" + path := "/v1/Workspaces/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.DefaultActivitySid != nil { - data.Set("DefaultActivitySid", *params.DefaultActivitySid) -} - if params != nil && params.EventCallbackUrl != nil { - data.Set("EventCallbackUrl", *params.EventCallbackUrl) -} - if params != nil && params.EventsFilter != nil { - data.Set("EventsFilter", *params.EventsFilter) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.MultiTaskEnabled != nil { - data.Set("MultiTaskEnabled", fmt.Sprint(*params.MultiTaskEnabled)) -} - if params != nil && params.PrioritizeQueueOrder != nil { - data.Set("PrioritizeQueueOrder", *params.PrioritizeQueueOrder) -} - if params != nil && params.TimeoutActivitySid != nil { - data.Set("TimeoutActivitySid", *params.TimeoutActivitySid) -} + data := url.Values{} + headers := 0 + if params != nil && params.DefaultActivitySid != nil { + data.Set("DefaultActivitySid", *params.DefaultActivitySid) + } + if params != nil && params.EventCallbackUrl != nil { + data.Set("EventCallbackUrl", *params.EventCallbackUrl) + } + if params != nil && params.EventsFilter != nil { + data.Set("EventsFilter", *params.EventsFilter) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.MultiTaskEnabled != nil { + data.Set("MultiTaskEnabled", fmt.Sprint(*params.MultiTaskEnabled)) + } + if params != nil && params.PrioritizeQueueOrder != nil { + data.Set("PrioritizeQueueOrder", *params.PrioritizeQueueOrder) + } + if params != nil && params.TimeoutActivitySid != nil { + data.Set("TimeoutActivitySid", *params.TimeoutActivitySid) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &TaskrouterV1Workspace{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TaskrouterV1Workspace{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } diff --git a/twilio/rest/taskrouter/v1/model_list_activity_response.go b/twilio/rest/taskrouter/v1/model_list_activity_response.go index 691cb4b99..9d785e5e3 100644 --- a/twilio/rest/taskrouter/v1/model_list_activity_response.go +++ b/twilio/rest/taskrouter/v1/model_list_activity_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListActivityResponse struct for ListActivityResponse type ListActivityResponse struct { Activities []TaskrouterV1WorkspaceActivity `json:"Activities,omitempty"` - Meta ListWorkspaceResponseMeta `json:"Meta,omitempty"` + Meta ListWorkspaceResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/taskrouter/v1/model_list_event_response.go b/twilio/rest/taskrouter/v1/model_list_event_response.go index a499198a0..69625f1af 100644 --- a/twilio/rest/taskrouter/v1/model_list_event_response.go +++ b/twilio/rest/taskrouter/v1/model_list_event_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListEventResponse struct for ListEventResponse type ListEventResponse struct { Events []TaskrouterV1WorkspaceEvent `json:"Events,omitempty"` - Meta ListWorkspaceResponseMeta `json:"Meta,omitempty"` + Meta ListWorkspaceResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/taskrouter/v1/model_list_task_channel_response.go b/twilio/rest/taskrouter/v1/model_list_task_channel_response.go index b33f6e4ac..c7889118a 100644 --- a/twilio/rest/taskrouter/v1/model_list_task_channel_response.go +++ b/twilio/rest/taskrouter/v1/model_list_task_channel_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListTaskChannelResponse struct for ListTaskChannelResponse type ListTaskChannelResponse struct { Channels []TaskrouterV1WorkspaceTaskChannel `json:"Channels,omitempty"` - Meta ListWorkspaceResponseMeta `json:"Meta,omitempty"` + Meta ListWorkspaceResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/taskrouter/v1/model_list_task_queue_response.go b/twilio/rest/taskrouter/v1/model_list_task_queue_response.go index fd4c6e42d..466cb91bd 100644 --- a/twilio/rest/taskrouter/v1/model_list_task_queue_response.go +++ b/twilio/rest/taskrouter/v1/model_list_task_queue_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListTaskQueueResponse struct for ListTaskQueueResponse type ListTaskQueueResponse struct { - Meta ListWorkspaceResponseMeta `json:"Meta,omitempty"` + Meta ListWorkspaceResponseMeta `json:"Meta,omitempty"` TaskQueues []TaskrouterV1WorkspaceTaskQueue `json:"TaskQueues,omitempty"` } diff --git a/twilio/rest/taskrouter/v1/model_list_task_queues_statistics_response.go b/twilio/rest/taskrouter/v1/model_list_task_queues_statistics_response.go index 270e3fc0f..367a90a1b 100644 --- a/twilio/rest/taskrouter/v1/model_list_task_queues_statistics_response.go +++ b/twilio/rest/taskrouter/v1/model_list_task_queues_statistics_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListTaskQueuesStatisticsResponse struct for ListTaskQueuesStatisticsResponse type ListTaskQueuesStatisticsResponse struct { - Meta ListWorkspaceResponseMeta `json:"Meta,omitempty"` + Meta ListWorkspaceResponseMeta `json:"Meta,omitempty"` TaskQueuesStatistics []TaskrouterV1WorkspaceTaskQueueTaskQueuesStatistics `json:"TaskQueuesStatistics,omitempty"` } diff --git a/twilio/rest/taskrouter/v1/model_list_task_reservation_response.go b/twilio/rest/taskrouter/v1/model_list_task_reservation_response.go index 6c4c855ad..ac7a7b6da 100644 --- a/twilio/rest/taskrouter/v1/model_list_task_reservation_response.go +++ b/twilio/rest/taskrouter/v1/model_list_task_reservation_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListTaskReservationResponse struct for ListTaskReservationResponse type ListTaskReservationResponse struct { - Meta ListWorkspaceResponseMeta `json:"Meta,omitempty"` + Meta ListWorkspaceResponseMeta `json:"Meta,omitempty"` Reservations []TaskrouterV1WorkspaceTaskTaskReservation `json:"Reservations,omitempty"` } diff --git a/twilio/rest/taskrouter/v1/model_list_task_response.go b/twilio/rest/taskrouter/v1/model_list_task_response.go index 4c0f2a280..0a9d39b1b 100644 --- a/twilio/rest/taskrouter/v1/model_list_task_response.go +++ b/twilio/rest/taskrouter/v1/model_list_task_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListTaskResponse struct for ListTaskResponse type ListTaskResponse struct { - Meta ListWorkspaceResponseMeta `json:"Meta,omitempty"` + Meta ListWorkspaceResponseMeta `json:"Meta,omitempty"` Tasks []TaskrouterV1WorkspaceTask `json:"Tasks,omitempty"` } diff --git a/twilio/rest/taskrouter/v1/model_list_worker_channel_response.go b/twilio/rest/taskrouter/v1/model_list_worker_channel_response.go index eb8cb79aa..fec175d5c 100644 --- a/twilio/rest/taskrouter/v1/model_list_worker_channel_response.go +++ b/twilio/rest/taskrouter/v1/model_list_worker_channel_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListWorkerChannelResponse struct for ListWorkerChannelResponse type ListWorkerChannelResponse struct { Channels []TaskrouterV1WorkspaceWorkerWorkerChannel `json:"Channels,omitempty"` - Meta ListWorkspaceResponseMeta `json:"Meta,omitempty"` + Meta ListWorkspaceResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/taskrouter/v1/model_list_worker_reservation_response.go b/twilio/rest/taskrouter/v1/model_list_worker_reservation_response.go index 08000835a..7550734bc 100644 --- a/twilio/rest/taskrouter/v1/model_list_worker_reservation_response.go +++ b/twilio/rest/taskrouter/v1/model_list_worker_reservation_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListWorkerReservationResponse struct for ListWorkerReservationResponse type ListWorkerReservationResponse struct { - Meta ListWorkspaceResponseMeta `json:"Meta,omitempty"` + Meta ListWorkspaceResponseMeta `json:"Meta,omitempty"` Reservations []TaskrouterV1WorkspaceWorkerWorkerReservation `json:"Reservations,omitempty"` } diff --git a/twilio/rest/taskrouter/v1/model_list_worker_response.go b/twilio/rest/taskrouter/v1/model_list_worker_response.go index 9d2b0fc44..570ad78cb 100644 --- a/twilio/rest/taskrouter/v1/model_list_worker_response.go +++ b/twilio/rest/taskrouter/v1/model_list_worker_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListWorkerResponse struct for ListWorkerResponse type ListWorkerResponse struct { - Meta ListWorkspaceResponseMeta `json:"Meta,omitempty"` + Meta ListWorkspaceResponseMeta `json:"Meta,omitempty"` Workers []TaskrouterV1WorkspaceWorker `json:"Workers,omitempty"` } diff --git a/twilio/rest/taskrouter/v1/model_list_workflow_response.go b/twilio/rest/taskrouter/v1/model_list_workflow_response.go index f9179a938..5a853f50f 100644 --- a/twilio/rest/taskrouter/v1/model_list_workflow_response.go +++ b/twilio/rest/taskrouter/v1/model_list_workflow_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListWorkflowResponse struct for ListWorkflowResponse type ListWorkflowResponse struct { - Meta ListWorkspaceResponseMeta `json:"Meta,omitempty"` + Meta ListWorkspaceResponseMeta `json:"Meta,omitempty"` Workflows []TaskrouterV1WorkspaceWorkflow `json:"Workflows,omitempty"` } diff --git a/twilio/rest/taskrouter/v1/model_list_workspace_response.go b/twilio/rest/taskrouter/v1/model_list_workspace_response.go index 2a43888f5..b5c6ec1b1 100644 --- a/twilio/rest/taskrouter/v1/model_list_workspace_response.go +++ b/twilio/rest/taskrouter/v1/model_list_workspace_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListWorkspaceResponse struct for ListWorkspaceResponse type ListWorkspaceResponse struct { - Meta ListWorkspaceResponseMeta `json:"Meta,omitempty"` - Workspaces []TaskrouterV1Workspace `json:"Workspaces,omitempty"` + Meta ListWorkspaceResponseMeta `json:"Meta,omitempty"` + Workspaces []TaskrouterV1Workspace `json:"Workspaces,omitempty"` } diff --git a/twilio/rest/taskrouter/v1/model_list_workspace_response_meta.go b/twilio/rest/taskrouter/v1/model_list_workspace_response_meta.go index e3bc8861a..f868cd1c0 100644 --- a/twilio/rest/taskrouter/v1/model_list_workspace_response_meta.go +++ b/twilio/rest/taskrouter/v1/model_list_workspace_response_meta.go @@ -1,22 +1,23 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListWorkspaceResponseMeta struct for ListWorkspaceResponseMeta type ListWorkspaceResponseMeta struct { - FirstPageUrl string `json:"FirstPageUrl,omitempty"` - Key string `json:"Key,omitempty"` - NextPageUrl string `json:"NextPageUrl,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` - Url string `json:"Url,omitempty"` + Url string `json:"Url,omitempty"` } diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace.go index 6b29ea1bc..fb28b9c14 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace.go @@ -1,18 +1,20 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // TaskrouterV1Workspace struct for TaskrouterV1Workspace type TaskrouterV1Workspace struct { // The SID of the Account that created the resource diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_activity.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_activity.go index d4e193f3a..77a9d0b66 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_activity.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_activity.go @@ -1,18 +1,20 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // TaskrouterV1WorkspaceActivity struct for TaskrouterV1WorkspaceActivity type TaskrouterV1WorkspaceActivity struct { // The SID of the Account that created the resource diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_event.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_event.go index 9f72612e5..4e62f7713 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_event.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_event.go @@ -1,18 +1,20 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // TaskrouterV1WorkspaceEvent struct for TaskrouterV1WorkspaceEvent type TaskrouterV1WorkspaceEvent struct { // The SID of the Account that created the resource diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task.go index b32a07261..2ebb1eb23 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task.go @@ -1,18 +1,20 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // TaskrouterV1WorkspaceTask struct for TaskrouterV1WorkspaceTask type TaskrouterV1WorkspaceTask struct { // The SID of the Account that created the resource diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_channel.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_channel.go index d62552eb6..a2af030b3 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_channel.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_channel.go @@ -1,18 +1,20 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // TaskrouterV1WorkspaceTaskChannel struct for TaskrouterV1WorkspaceTaskChannel type TaskrouterV1WorkspaceTaskChannel struct { // The SID of the Account that created the resource diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue.go index 336f25990..a3bea67ab 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue.go @@ -1,18 +1,20 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // TaskrouterV1WorkspaceTaskQueue struct for TaskrouterV1WorkspaceTaskQueue type TaskrouterV1WorkspaceTaskQueue struct { // The SID of the Account that created the resource diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue_task_queue_cumulative_statistics.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue_task_queue_cumulative_statistics.go index c1e05c17b..5dec663eb 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue_task_queue_cumulative_statistics.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue_task_queue_cumulative_statistics.go @@ -1,18 +1,20 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // TaskrouterV1WorkspaceTaskQueueTaskQueueCumulativeStatistics struct for TaskrouterV1WorkspaceTaskQueueTaskQueueCumulativeStatistics type TaskrouterV1WorkspaceTaskQueueTaskQueueCumulativeStatistics struct { // The SID of the Account that created the resource diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue_task_queue_real_time_statistics.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue_task_queue_real_time_statistics.go index e1e80a784..2c1824292 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue_task_queue_real_time_statistics.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue_task_queue_real_time_statistics.go @@ -1,15 +1,16 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // TaskrouterV1WorkspaceTaskQueueTaskQueueRealTimeStatistics struct for TaskrouterV1WorkspaceTaskQueueTaskQueueRealTimeStatistics type TaskrouterV1WorkspaceTaskQueueTaskQueueRealTimeStatistics struct { // The SID of the Account that created the resource diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue_task_queue_statistics.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue_task_queue_statistics.go index d6bd3b5cb..ae92903a2 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue_task_queue_statistics.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue_task_queue_statistics.go @@ -1,15 +1,16 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // TaskrouterV1WorkspaceTaskQueueTaskQueueStatistics struct for TaskrouterV1WorkspaceTaskQueueTaskQueueStatistics type TaskrouterV1WorkspaceTaskQueueTaskQueueStatistics struct { // The SID of the Account that created the resource diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue_task_queues_statistics.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue_task_queues_statistics.go index a9454e08b..cb658e252 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue_task_queues_statistics.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue_task_queues_statistics.go @@ -1,15 +1,16 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // TaskrouterV1WorkspaceTaskQueueTaskQueuesStatistics struct for TaskrouterV1WorkspaceTaskQueueTaskQueuesStatistics type TaskrouterV1WorkspaceTaskQueueTaskQueuesStatistics struct { // The SID of the Account that created the resource diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_task_reservation.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_task_reservation.go index f65ddbe6e..00f342de2 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_task_reservation.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_task_reservation.go @@ -1,18 +1,20 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // TaskrouterV1WorkspaceTaskTaskReservation struct for TaskrouterV1WorkspaceTaskTaskReservation type TaskrouterV1WorkspaceTaskTaskReservation struct { // The SID of the Account that created the resource diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker.go index 85ea5b707..9a1c4d5af 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker.go @@ -1,18 +1,20 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // TaskrouterV1WorkspaceWorker struct for TaskrouterV1WorkspaceWorker type TaskrouterV1WorkspaceWorker struct { // The SID of the Account that created the resource diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_worker_channel.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_worker_channel.go index 20b8c2d6e..fd969ad35 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_worker_channel.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_worker_channel.go @@ -1,18 +1,20 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // TaskrouterV1WorkspaceWorkerWorkerChannel struct for TaskrouterV1WorkspaceWorkerWorkerChannel type TaskrouterV1WorkspaceWorkerWorkerChannel struct { // The SID of the Account that created the resource diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_worker_instance_statistics.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_worker_instance_statistics.go index 87746460d..86875ae7a 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_worker_instance_statistics.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_worker_instance_statistics.go @@ -1,15 +1,16 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // TaskrouterV1WorkspaceWorkerWorkerInstanceStatistics struct for TaskrouterV1WorkspaceWorkerWorkerInstanceStatistics type TaskrouterV1WorkspaceWorkerWorkerInstanceStatistics struct { // The SID of the Account that created the resource diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_worker_reservation.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_worker_reservation.go index 0e44364c8..6edfb2192 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_worker_reservation.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_worker_reservation.go @@ -1,18 +1,20 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // TaskrouterV1WorkspaceWorkerWorkerReservation struct for TaskrouterV1WorkspaceWorkerWorkerReservation type TaskrouterV1WorkspaceWorkerWorkerReservation struct { // The SID of the Account that created the resource diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_worker_statistics.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_worker_statistics.go index c0ac082b5..510eaa0cd 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_worker_statistics.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_worker_statistics.go @@ -1,15 +1,16 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // TaskrouterV1WorkspaceWorkerWorkerStatistics struct for TaskrouterV1WorkspaceWorkerWorkerStatistics type TaskrouterV1WorkspaceWorkerWorkerStatistics struct { // The SID of the Account that created the resource diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_workers_cumulative_statistics.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_workers_cumulative_statistics.go index cba3eb335..7e16eb857 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_workers_cumulative_statistics.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_workers_cumulative_statistics.go @@ -1,18 +1,20 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // TaskrouterV1WorkspaceWorkerWorkersCumulativeStatistics struct for TaskrouterV1WorkspaceWorkerWorkersCumulativeStatistics type TaskrouterV1WorkspaceWorkerWorkersCumulativeStatistics struct { // The SID of the Account that created the resource diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_workers_real_time_statistics.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_workers_real_time_statistics.go index 652b78023..08f02c990 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_workers_real_time_statistics.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_workers_real_time_statistics.go @@ -1,15 +1,16 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // TaskrouterV1WorkspaceWorkerWorkersRealTimeStatistics struct for TaskrouterV1WorkspaceWorkerWorkersRealTimeStatistics type TaskrouterV1WorkspaceWorkerWorkersRealTimeStatistics struct { // The SID of the Account that created the resource diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workflow.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workflow.go index 7079931bf..5416a696c 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workflow.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workflow.go @@ -1,18 +1,20 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // TaskrouterV1WorkspaceWorkflow struct for TaskrouterV1WorkspaceWorkflow type TaskrouterV1WorkspaceWorkflow struct { // The SID of the Account that created the resource diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workflow_workflow_cumulative_statistics.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workflow_workflow_cumulative_statistics.go index ce14d864d..176f5cc56 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workflow_workflow_cumulative_statistics.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workflow_workflow_cumulative_statistics.go @@ -1,18 +1,20 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // TaskrouterV1WorkspaceWorkflowWorkflowCumulativeStatistics struct for TaskrouterV1WorkspaceWorkflowWorkflowCumulativeStatistics type TaskrouterV1WorkspaceWorkflowWorkflowCumulativeStatistics struct { // The SID of the Account that created the resource diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workflow_workflow_real_time_statistics.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workflow_workflow_real_time_statistics.go index 30696af9e..31c58f35f 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workflow_workflow_real_time_statistics.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workflow_workflow_real_time_statistics.go @@ -1,15 +1,16 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // TaskrouterV1WorkspaceWorkflowWorkflowRealTimeStatistics struct for TaskrouterV1WorkspaceWorkflowWorkflowRealTimeStatistics type TaskrouterV1WorkspaceWorkflowWorkflowRealTimeStatistics struct { // The SID of the Account that created the resource diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workflow_workflow_statistics.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workflow_workflow_statistics.go index 2f5c0a83b..04a5acabc 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workflow_workflow_statistics.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workflow_workflow_statistics.go @@ -1,15 +1,16 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // TaskrouterV1WorkspaceWorkflowWorkflowStatistics struct for TaskrouterV1WorkspaceWorkflowWorkflowStatistics type TaskrouterV1WorkspaceWorkflowWorkflowStatistics struct { // The SID of the Account that created the resource diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workspace_cumulative_statistics.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workspace_cumulative_statistics.go index 1985050f9..fad6ca928 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workspace_cumulative_statistics.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workspace_cumulative_statistics.go @@ -1,18 +1,20 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // TaskrouterV1WorkspaceWorkspaceCumulativeStatistics struct for TaskrouterV1WorkspaceWorkspaceCumulativeStatistics type TaskrouterV1WorkspaceWorkspaceCumulativeStatistics struct { // The SID of the Account that created the resource diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workspace_real_time_statistics.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workspace_real_time_statistics.go index f90831cc0..b5414c357 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workspace_real_time_statistics.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workspace_real_time_statistics.go @@ -1,15 +1,16 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // TaskrouterV1WorkspaceWorkspaceRealTimeStatistics struct for TaskrouterV1WorkspaceWorkspaceRealTimeStatistics type TaskrouterV1WorkspaceWorkspaceRealTimeStatistics struct { // The SID of the Account that created the resource diff --git a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workspace_statistics.go b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workspace_statistics.go index ac308f56c..3423ac0b9 100644 --- a/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workspace_statistics.go +++ b/twilio/rest/taskrouter/v1/model_taskrouter_v1_workspace_workspace_statistics.go @@ -1,15 +1,16 @@ /* - * Twilio - Taskrouter - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // TaskrouterV1WorkspaceWorkspaceStatistics struct for TaskrouterV1WorkspaceWorkspaceStatistics type TaskrouterV1WorkspaceWorkspaceStatistics struct { // The SID of the Account that created the resource diff --git a/twilio/rest/trunking/v1/api_default.go b/twilio/rest/trunking/v1/api_default.go index ca589eb90..e33af5d93 100644 --- a/twilio/rest/trunking/v1/api_default.go +++ b/twilio/rest/trunking/v1/api_default.go @@ -1,11 +1,11 @@ /* - * Twilio - Trunking - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Trunking + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,9 +14,10 @@ package openapi import ( "encoding/json" "fmt" - twilio "github.com/twilio/twilio-go/client" "net/url" - "strings" + "strings" + + twilio "github.com/twilio/twilio-go/client" ) type DefaultApiService struct { @@ -25,8 +26,8 @@ type DefaultApiService struct { } func NewDefaultApiService(client *twilio.Client) *DefaultApiService { - return &DefaultApiService { - client: client, + return &DefaultApiService{ + client: client, baseURL: "https://trunking.twilio.com", } } @@ -42,33 +43,33 @@ type CreateCredentialListParams struct { * @param optional nil or *CreateCredentialListParams - Optional Parameters: * @param "CredentialListSid" (string) - The SID of the [Credential List](https://www.twilio.com/docs/voice/sip/api/sip-credentiallist-resource) that you want to associate with the trunk. Once associated, we will authenticate access to the trunk against this list. * @return TrunkingV1TrunkCredentialList -*/ + */ func (c *DefaultApiService) CreateCredentialList(TrunkSid string, params *CreateCredentialListParams) (*TrunkingV1TrunkCredentialList, error) { - path := "/v1/Trunks/{TrunkSid}/CredentialLists" + path := "/v1/Trunks/{TrunkSid}/CredentialLists" path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.CredentialListSid != nil { - data.Set("CredentialListSid", *params.CredentialListSid) -} + data := url.Values{} + headers := 0 + if params != nil && params.CredentialListSid != nil { + data.Set("CredentialListSid", *params.CredentialListSid) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &TrunkingV1TrunkCredentialList{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TrunkingV1TrunkCredentialList{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateIpAccessControlListParams Optional parameters for the method 'CreateIpAccessControlList' type CreateIpAccessControlListParams struct { IpAccessControlListSid *string `json:"IpAccessControlListSid,omitempty"` @@ -81,40 +82,40 @@ type CreateIpAccessControlListParams struct { * @param optional nil or *CreateIpAccessControlListParams - Optional Parameters: * @param "IpAccessControlListSid" (string) - The SID of the [IP Access Control List](https://www.twilio.com/docs/voice/sip/api/sip-ipaccesscontrollist-resource) that you want to associate with the trunk. * @return TrunkingV1TrunkIpAccessControlList -*/ + */ func (c *DefaultApiService) CreateIpAccessControlList(TrunkSid string, params *CreateIpAccessControlListParams) (*TrunkingV1TrunkIpAccessControlList, error) { - path := "/v1/Trunks/{TrunkSid}/IpAccessControlLists" + path := "/v1/Trunks/{TrunkSid}/IpAccessControlLists" path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.IpAccessControlListSid != nil { - data.Set("IpAccessControlListSid", *params.IpAccessControlListSid) -} + data := url.Values{} + headers := 0 + if params != nil && params.IpAccessControlListSid != nil { + data.Set("IpAccessControlListSid", *params.IpAccessControlListSid) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &TrunkingV1TrunkIpAccessControlList{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TrunkingV1TrunkIpAccessControlList{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateOriginationUrlParams Optional parameters for the method 'CreateOriginationUrl' type CreateOriginationUrlParams struct { - Enabled *bool `json:"Enabled,omitempty"` + Enabled *bool `json:"Enabled,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` - Priority *int32 `json:"Priority,omitempty"` - SipUrl *string `json:"SipUrl,omitempty"` - Weight *int32 `json:"Weight,omitempty"` + Priority *int32 `json:"Priority,omitempty"` + SipUrl *string `json:"SipUrl,omitempty"` + Weight *int32 `json:"Weight,omitempty"` } /* @@ -127,45 +128,45 @@ type CreateOriginationUrlParams struct { * @param "SipUrl" (string) - The SIP address you want Twilio to route your Origination calls to. This must be a `sip:` schema. * @param "Weight" (int32) - The value that determines the relative share of the load the URI should receive compared to other URIs with the same priority. Can be an integer from 1 to 65535, inclusive, and the default is 10. URLs with higher values receive more load than those with lower ones with the same priority. * @return TrunkingV1TrunkOriginationUrl -*/ + */ func (c *DefaultApiService) CreateOriginationUrl(TrunkSid string, params *CreateOriginationUrlParams) (*TrunkingV1TrunkOriginationUrl, error) { - path := "/v1/Trunks/{TrunkSid}/OriginationUrls" + path := "/v1/Trunks/{TrunkSid}/OriginationUrls" path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Enabled != nil { - data.Set("Enabled", fmt.Sprint(*params.Enabled)) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.Priority != nil { - data.Set("Priority", fmt.Sprint(*params.Priority)) -} - if params != nil && params.SipUrl != nil { - data.Set("SipUrl", *params.SipUrl) -} - if params != nil && params.Weight != nil { - data.Set("Weight", fmt.Sprint(*params.Weight)) -} + data := url.Values{} + headers := 0 + if params != nil && params.Enabled != nil { + data.Set("Enabled", fmt.Sprint(*params.Enabled)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Priority != nil { + data.Set("Priority", fmt.Sprint(*params.Priority)) + } + if params != nil && params.SipUrl != nil { + data.Set("SipUrl", *params.SipUrl) + } + if params != nil && params.Weight != nil { + data.Set("Weight", fmt.Sprint(*params.Weight)) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &TrunkingV1TrunkOriginationUrl{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TrunkingV1TrunkOriginationUrl{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreatePhoneNumberParams Optional parameters for the method 'CreatePhoneNumber' type CreatePhoneNumberParams struct { PhoneNumberSid *string `json:"PhoneNumberSid,omitempty"` @@ -177,42 +178,42 @@ type CreatePhoneNumberParams struct { * @param optional nil or *CreatePhoneNumberParams - Optional Parameters: * @param "PhoneNumberSid" (string) - The SID of the [Incoming Phone Number](https://www.twilio.com/docs/phone-numbers/api/incomingphonenumber-resource) that you want to associate with the trunk. * @return TrunkingV1TrunkPhoneNumber -*/ + */ func (c *DefaultApiService) CreatePhoneNumber(TrunkSid string, params *CreatePhoneNumberParams) (*TrunkingV1TrunkPhoneNumber, error) { - path := "/v1/Trunks/{TrunkSid}/PhoneNumbers" + path := "/v1/Trunks/{TrunkSid}/PhoneNumbers" path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PhoneNumberSid != nil { - data.Set("PhoneNumberSid", *params.PhoneNumberSid) -} + data := url.Values{} + headers := 0 + if params != nil && params.PhoneNumberSid != nil { + data.Set("PhoneNumberSid", *params.PhoneNumberSid) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &TrunkingV1TrunkPhoneNumber{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TrunkingV1TrunkPhoneNumber{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateTrunkParams Optional parameters for the method 'CreateTrunk' type CreateTrunkParams struct { - CnamLookupEnabled *bool `json:"CnamLookupEnabled,omitempty"` + CnamLookupEnabled *bool `json:"CnamLookupEnabled,omitempty"` DisasterRecoveryMethod *string `json:"DisasterRecoveryMethod,omitempty"` - DisasterRecoveryUrl *string `json:"DisasterRecoveryUrl,omitempty"` - DomainName *string `json:"DomainName,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Secure *bool `json:"Secure,omitempty"` - TransferMode *string `json:"TransferMode,omitempty"` + DisasterRecoveryUrl *string `json:"DisasterRecoveryUrl,omitempty"` + DomainName *string `json:"DomainName,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Secure *bool `json:"Secure,omitempty"` + TransferMode *string `json:"TransferMode,omitempty"` } /* @@ -226,74 +227,71 @@ type CreateTrunkParams struct { * @param "Secure" (bool) - Whether Secure Trunking is enabled for the trunk. If enabled, all calls going through the trunk will be secure using SRTP for media and TLS for signaling. If disabled, then RTP will be used for media. See [Secure Trunking](https://www.twilio.com/docs/sip-trunking#securetrunking) for more information. * @param "TransferMode" (string) - The call transfer settings for the trunk. Can be: `enable-all`, `sip-only` and `disable-all`. See [Transfer](https://www.twilio.com/docs/sip-trunking/call-transfer) for more information. * @return TrunkingV1Trunk -*/ + */ func (c *DefaultApiService) CreateTrunk(params *CreateTrunkParams) (*TrunkingV1Trunk, error) { - path := "/v1/Trunks" + path := "/v1/Trunks" - data := url.Values{} - headers := 0 - - if params != nil && params.CnamLookupEnabled != nil { - data.Set("CnamLookupEnabled", fmt.Sprint(*params.CnamLookupEnabled)) -} - if params != nil && params.DisasterRecoveryMethod != nil { - data.Set("DisasterRecoveryMethod", *params.DisasterRecoveryMethod) -} - if params != nil && params.DisasterRecoveryUrl != nil { - data.Set("DisasterRecoveryUrl", *params.DisasterRecoveryUrl) -} - if params != nil && params.DomainName != nil { - data.Set("DomainName", *params.DomainName) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.Secure != nil { - data.Set("Secure", fmt.Sprint(*params.Secure)) -} - if params != nil && params.TransferMode != nil { - data.Set("TransferMode", *params.TransferMode) -} + data := url.Values{} + headers := 0 + if params != nil && params.CnamLookupEnabled != nil { + data.Set("CnamLookupEnabled", fmt.Sprint(*params.CnamLookupEnabled)) + } + if params != nil && params.DisasterRecoveryMethod != nil { + data.Set("DisasterRecoveryMethod", *params.DisasterRecoveryMethod) + } + if params != nil && params.DisasterRecoveryUrl != nil { + data.Set("DisasterRecoveryUrl", *params.DisasterRecoveryUrl) + } + if params != nil && params.DomainName != nil { + data.Set("DomainName", *params.DomainName) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Secure != nil { + data.Set("Secure", fmt.Sprint(*params.Secure)) + } + if params != nil && params.TransferMode != nil { + data.Set("TransferMode", *params.TransferMode) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &TrunkingV1Trunk{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TrunkingV1Trunk{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * DeleteCredentialList Method for DeleteCredentialList * @param TrunkSid The SID of the Trunk from which to delete the credential list. * @param Sid The unique string that we created to identify the CredentialList resource to delete. -*/ -func (c *DefaultApiService) DeleteCredentialList(TrunkSid string, Sid string, ) (error) { - path := "/v1/Trunks/{TrunkSid}/CredentialLists/{Sid}" + */ +func (c *DefaultApiService) DeleteCredentialList(TrunkSid string, Sid string) error { + path := "/v1/Trunks/{TrunkSid}/CredentialLists/{Sid}" path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -301,98 +299,90 @@ func (c *DefaultApiService) DeleteCredentialList(TrunkSid string, Sid string, ) * Remove an associated IP Access Control List from a Trunk * @param TrunkSid The SID of the Trunk from which to delete the IP Access Control List. * @param Sid The unique string that we created to identify the IpAccessControlList resource to delete. -*/ -func (c *DefaultApiService) DeleteIpAccessControlList(TrunkSid string, Sid string, ) (error) { - path := "/v1/Trunks/{TrunkSid}/IpAccessControlLists/{Sid}" + */ +func (c *DefaultApiService) DeleteIpAccessControlList(TrunkSid string, Sid string) error { + path := "/v1/Trunks/{TrunkSid}/IpAccessControlLists/{Sid}" path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* * DeleteOriginationUrl Method for DeleteOriginationUrl * @param TrunkSid The SID of the Trunk from which to delete the OriginationUrl. * @param Sid The unique string that we created to identify the OriginationUrl resource to delete. -*/ -func (c *DefaultApiService) DeleteOriginationUrl(TrunkSid string, Sid string, ) (error) { - path := "/v1/Trunks/{TrunkSid}/OriginationUrls/{Sid}" + */ +func (c *DefaultApiService) DeleteOriginationUrl(TrunkSid string, Sid string) error { + path := "/v1/Trunks/{TrunkSid}/OriginationUrls/{Sid}" path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* * DeletePhoneNumber Method for DeletePhoneNumber * @param TrunkSid The SID of the Trunk from which to delete the PhoneNumber resource. * @param Sid The unique string that we created to identify the PhoneNumber resource to delete. -*/ -func (c *DefaultApiService) DeletePhoneNumber(TrunkSid string, Sid string, ) (error) { - path := "/v1/Trunks/{TrunkSid}/PhoneNumbers/{Sid}" + */ +func (c *DefaultApiService) DeletePhoneNumber(TrunkSid string, Sid string) error { + path := "/v1/Trunks/{TrunkSid}/PhoneNumbers/{Sid}" path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + defer resp.Body.Close() - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() - - return nil + return nil } /* * DeleteTrunk Method for DeleteTrunk * @param Sid The unique string that we created to identify the Trunk resource to delete. -*/ -func (c *DefaultApiService) DeleteTrunk(Sid string, ) (error) { - path := "/v1/Trunks/{Sid}" + */ +func (c *DefaultApiService) DeleteTrunk(Sid string) error { + path := "/v1/Trunks/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -400,30 +390,28 @@ func (c *DefaultApiService) DeleteTrunk(Sid string, ) (error) { * @param TrunkSid The SID of the Trunk from which to fetch the credential list. * @param Sid The unique string that we created to identify the CredentialList resource to fetch. * @return TrunkingV1TrunkCredentialList -*/ -func (c *DefaultApiService) FetchCredentialList(TrunkSid string, Sid string, ) (*TrunkingV1TrunkCredentialList, error) { - path := "/v1/Trunks/{TrunkSid}/CredentialLists/{Sid}" + */ +func (c *DefaultApiService) FetchCredentialList(TrunkSid string, Sid string) (*TrunkingV1TrunkCredentialList, error) { + path := "/v1/Trunks/{TrunkSid}/CredentialLists/{Sid}" path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &TrunkingV1TrunkCredentialList{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TrunkingV1TrunkCredentialList{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -431,30 +419,28 @@ func (c *DefaultApiService) FetchCredentialList(TrunkSid string, Sid string, ) ( * @param TrunkSid The SID of the Trunk from which to fetch the IP Access Control List. * @param Sid The unique string that we created to identify the IpAccessControlList resource to fetch. * @return TrunkingV1TrunkIpAccessControlList -*/ -func (c *DefaultApiService) FetchIpAccessControlList(TrunkSid string, Sid string, ) (*TrunkingV1TrunkIpAccessControlList, error) { - path := "/v1/Trunks/{TrunkSid}/IpAccessControlLists/{Sid}" + */ +func (c *DefaultApiService) FetchIpAccessControlList(TrunkSid string, Sid string) (*TrunkingV1TrunkIpAccessControlList, error) { + path := "/v1/Trunks/{TrunkSid}/IpAccessControlLists/{Sid}" path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &TrunkingV1TrunkIpAccessControlList{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TrunkingV1TrunkIpAccessControlList{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -462,30 +448,28 @@ func (c *DefaultApiService) FetchIpAccessControlList(TrunkSid string, Sid string * @param TrunkSid The SID of the Trunk from which to fetch the OriginationUrl. * @param Sid The unique string that we created to identify the OriginationUrl resource to fetch. * @return TrunkingV1TrunkOriginationUrl -*/ -func (c *DefaultApiService) FetchOriginationUrl(TrunkSid string, Sid string, ) (*TrunkingV1TrunkOriginationUrl, error) { - path := "/v1/Trunks/{TrunkSid}/OriginationUrls/{Sid}" + */ +func (c *DefaultApiService) FetchOriginationUrl(TrunkSid string, Sid string) (*TrunkingV1TrunkOriginationUrl, error) { + path := "/v1/Trunks/{TrunkSid}/OriginationUrls/{Sid}" path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &TrunkingV1TrunkOriginationUrl{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TrunkingV1TrunkOriginationUrl{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -493,89 +477,84 @@ func (c *DefaultApiService) FetchOriginationUrl(TrunkSid string, Sid string, ) ( * @param TrunkSid The SID of the Trunk from which to fetch the PhoneNumber resource. * @param Sid The unique string that we created to identify the PhoneNumber resource to fetch. * @return TrunkingV1TrunkPhoneNumber -*/ -func (c *DefaultApiService) FetchPhoneNumber(TrunkSid string, Sid string, ) (*TrunkingV1TrunkPhoneNumber, error) { - path := "/v1/Trunks/{TrunkSid}/PhoneNumbers/{Sid}" + */ +func (c *DefaultApiService) FetchPhoneNumber(TrunkSid string, Sid string) (*TrunkingV1TrunkPhoneNumber, error) { + path := "/v1/Trunks/{TrunkSid}/PhoneNumbers/{Sid}" path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &TrunkingV1TrunkPhoneNumber{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TrunkingV1TrunkPhoneNumber{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * FetchRecording Method for FetchRecording * @param TrunkSid The SID of the Trunk from which to fetch the recording settings. * @return TrunkingV1TrunkRecording -*/ -func (c *DefaultApiService) FetchRecording(TrunkSid string, ) (*TrunkingV1TrunkRecording, error) { - path := "/v1/Trunks/{TrunkSid}/Recording" + */ +func (c *DefaultApiService) FetchRecording(TrunkSid string) (*TrunkingV1TrunkRecording, error) { + path := "/v1/Trunks/{TrunkSid}/Recording" path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &TrunkingV1TrunkRecording{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TrunkingV1TrunkRecording{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * FetchTrunk Method for FetchTrunk * @param Sid The unique string that we created to identify the Trunk resource to fetch. * @return TrunkingV1Trunk -*/ -func (c *DefaultApiService) FetchTrunk(Sid string, ) (*TrunkingV1Trunk, error) { - path := "/v1/Trunks/{Sid}" + */ +func (c *DefaultApiService) FetchTrunk(Sid string) (*TrunkingV1Trunk, error) { + path := "/v1/Trunks/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &TrunkingV1Trunk{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TrunkingV1Trunk{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListCredentialListParams Optional parameters for the method 'ListCredentialList' type ListCredentialListParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -587,33 +566,33 @@ type ListCredentialListParams struct { * @param optional nil or *ListCredentialListParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListCredentialListResponse -*/ + */ func (c *DefaultApiService) ListCredentialList(TrunkSid string, params *ListCredentialListParams) (*ListCredentialListResponse, error) { - path := "/v1/Trunks/{TrunkSid}/CredentialLists" + path := "/v1/Trunks/{TrunkSid}/CredentialLists" path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListCredentialListResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListCredentialListResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListIpAccessControlListParams Optional parameters for the method 'ListIpAccessControlList' type ListIpAccessControlListParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -626,33 +605,33 @@ type ListIpAccessControlListParams struct { * @param optional nil or *ListIpAccessControlListParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListIpAccessControlListResponse -*/ + */ func (c *DefaultApiService) ListIpAccessControlList(TrunkSid string, params *ListIpAccessControlListParams) (*ListIpAccessControlListResponse, error) { - path := "/v1/Trunks/{TrunkSid}/IpAccessControlLists" + path := "/v1/Trunks/{TrunkSid}/IpAccessControlLists" path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListIpAccessControlListResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListIpAccessControlListResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListOriginationUrlParams Optional parameters for the method 'ListOriginationUrl' type ListOriginationUrlParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -664,33 +643,33 @@ type ListOriginationUrlParams struct { * @param optional nil or *ListOriginationUrlParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListOriginationUrlResponse -*/ + */ func (c *DefaultApiService) ListOriginationUrl(TrunkSid string, params *ListOriginationUrlParams) (*ListOriginationUrlResponse, error) { - path := "/v1/Trunks/{TrunkSid}/OriginationUrls" + path := "/v1/Trunks/{TrunkSid}/OriginationUrls" path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListOriginationUrlResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListOriginationUrlResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListPhoneNumberParams Optional parameters for the method 'ListPhoneNumber' type ListPhoneNumberParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -702,33 +681,33 @@ type ListPhoneNumberParams struct { * @param optional nil or *ListPhoneNumberParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListPhoneNumberResponse -*/ + */ func (c *DefaultApiService) ListPhoneNumber(TrunkSid string, params *ListPhoneNumberParams) (*ListPhoneNumberResponse, error) { - path := "/v1/Trunks/{TrunkSid}/PhoneNumbers" + path := "/v1/Trunks/{TrunkSid}/PhoneNumbers" path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListPhoneNumberResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListPhoneNumberResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListTrunkParams Optional parameters for the method 'ListTrunk' type ListTrunkParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -739,39 +718,39 @@ type ListTrunkParams struct { * @param optional nil or *ListTrunkParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListTrunkResponse -*/ + */ func (c *DefaultApiService) ListTrunk(params *ListTrunkParams) (*ListTrunkResponse, error) { - path := "/v1/Trunks" - - data := url.Values{} - headers := 0 + path := "/v1/Trunks" - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListTrunkResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListTrunkResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateOriginationUrlParams Optional parameters for the method 'UpdateOriginationUrl' type UpdateOriginationUrlParams struct { - Enabled *bool `json:"Enabled,omitempty"` + Enabled *bool `json:"Enabled,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` - Priority *int32 `json:"Priority,omitempty"` - SipUrl *string `json:"SipUrl,omitempty"` - Weight *int32 `json:"Weight,omitempty"` + Priority *int32 `json:"Priority,omitempty"` + SipUrl *string `json:"SipUrl,omitempty"` + Weight *int32 `json:"Weight,omitempty"` } /* @@ -785,46 +764,46 @@ type UpdateOriginationUrlParams struct { * @param "SipUrl" (string) - The SIP address you want Twilio to route your Origination calls to. This must be a `sip:` schema. `sips` is NOT supported. * @param "Weight" (int32) - The value that determines the relative share of the load the URI should receive compared to other URIs with the same priority. Can be an integer from 1 to 65535, inclusive, and the default is 10. URLs with higher values receive more load than those with lower ones with the same priority. * @return TrunkingV1TrunkOriginationUrl -*/ + */ func (c *DefaultApiService) UpdateOriginationUrl(TrunkSid string, Sid string, params *UpdateOriginationUrlParams) (*TrunkingV1TrunkOriginationUrl, error) { - path := "/v1/Trunks/{TrunkSid}/OriginationUrls/{Sid}" + path := "/v1/Trunks/{TrunkSid}/OriginationUrls/{Sid}" path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Enabled != nil { - data.Set("Enabled", fmt.Sprint(*params.Enabled)) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.Priority != nil { - data.Set("Priority", fmt.Sprint(*params.Priority)) -} - if params != nil && params.SipUrl != nil { - data.Set("SipUrl", *params.SipUrl) -} - if params != nil && params.Weight != nil { - data.Set("Weight", fmt.Sprint(*params.Weight)) -} + data := url.Values{} + headers := 0 + if params != nil && params.Enabled != nil { + data.Set("Enabled", fmt.Sprint(*params.Enabled)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Priority != nil { + data.Set("Priority", fmt.Sprint(*params.Priority)) + } + if params != nil && params.SipUrl != nil { + data.Set("SipUrl", *params.SipUrl) + } + if params != nil && params.Weight != nil { + data.Set("Weight", fmt.Sprint(*params.Weight)) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &TrunkingV1TrunkOriginationUrl{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TrunkingV1TrunkOriginationUrl{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateRecordingParams Optional parameters for the method 'UpdateRecording' type UpdateRecordingParams struct { Mode *string `json:"Mode,omitempty"` @@ -838,45 +817,45 @@ type UpdateRecordingParams struct { * @param "Mode" (string) - The recording mode for the trunk. Can be do-not-record (default), record-from-ringing, record-from-answer, record-from-ringing-dual, or record-from-answer-dual. * @param "Trim" (string) - The recording trim setting for the trunk. Can be do-not-trim (default) or trim-silence. * @return TrunkingV1TrunkRecording -*/ + */ func (c *DefaultApiService) UpdateRecording(TrunkSid string, params *UpdateRecordingParams) (*TrunkingV1TrunkRecording, error) { - path := "/v1/Trunks/{TrunkSid}/Recording" + path := "/v1/Trunks/{TrunkSid}/Recording" path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Mode != nil { - data.Set("Mode", *params.Mode) -} - if params != nil && params.Trim != nil { - data.Set("Trim", *params.Trim) -} + data := url.Values{} + headers := 0 + if params != nil && params.Mode != nil { + data.Set("Mode", *params.Mode) + } + if params != nil && params.Trim != nil { + data.Set("Trim", *params.Trim) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &TrunkingV1TrunkRecording{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TrunkingV1TrunkRecording{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateTrunkParams Optional parameters for the method 'UpdateTrunk' type UpdateTrunkParams struct { - CnamLookupEnabled *bool `json:"CnamLookupEnabled,omitempty"` + CnamLookupEnabled *bool `json:"CnamLookupEnabled,omitempty"` DisasterRecoveryMethod *string `json:"DisasterRecoveryMethod,omitempty"` - DisasterRecoveryUrl *string `json:"DisasterRecoveryUrl,omitempty"` - DomainName *string `json:"DomainName,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Secure *bool `json:"Secure,omitempty"` - TransferMode *string `json:"TransferMode,omitempty"` + DisasterRecoveryUrl *string `json:"DisasterRecoveryUrl,omitempty"` + DomainName *string `json:"DomainName,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Secure *bool `json:"Secure,omitempty"` + TransferMode *string `json:"TransferMode,omitempty"` } /* @@ -891,48 +870,47 @@ type UpdateTrunkParams struct { * @param "Secure" (bool) - Whether Secure Trunking is enabled for the trunk. If enabled, all calls going through the trunk will be secure using SRTP for media and TLS for signaling. If disabled, then RTP will be used for media. See [Secure Trunking](https://www.twilio.com/docs/sip-trunking#securetrunking) for more information. * @param "TransferMode" (string) - The call transfer settings for the trunk. Can be: `enable-all`, `sip-only` and `disable-all`. See [Transfer](https://www.twilio.com/docs/sip-trunking/call-transfer) for more information. * @return TrunkingV1Trunk -*/ + */ func (c *DefaultApiService) UpdateTrunk(Sid string, params *UpdateTrunkParams) (*TrunkingV1Trunk, error) { - path := "/v1/Trunks/{Sid}" + path := "/v1/Trunks/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.CnamLookupEnabled != nil { - data.Set("CnamLookupEnabled", fmt.Sprint(*params.CnamLookupEnabled)) -} - if params != nil && params.DisasterRecoveryMethod != nil { - data.Set("DisasterRecoveryMethod", *params.DisasterRecoveryMethod) -} - if params != nil && params.DisasterRecoveryUrl != nil { - data.Set("DisasterRecoveryUrl", *params.DisasterRecoveryUrl) -} - if params != nil && params.DomainName != nil { - data.Set("DomainName", *params.DomainName) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.Secure != nil { - data.Set("Secure", fmt.Sprint(*params.Secure)) -} - if params != nil && params.TransferMode != nil { - data.Set("TransferMode", *params.TransferMode) -} + data := url.Values{} + headers := 0 + if params != nil && params.CnamLookupEnabled != nil { + data.Set("CnamLookupEnabled", fmt.Sprint(*params.CnamLookupEnabled)) + } + if params != nil && params.DisasterRecoveryMethod != nil { + data.Set("DisasterRecoveryMethod", *params.DisasterRecoveryMethod) + } + if params != nil && params.DisasterRecoveryUrl != nil { + data.Set("DisasterRecoveryUrl", *params.DisasterRecoveryUrl) + } + if params != nil && params.DomainName != nil { + data.Set("DomainName", *params.DomainName) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Secure != nil { + data.Set("Secure", fmt.Sprint(*params.Secure)) + } + if params != nil && params.TransferMode != nil { + data.Set("TransferMode", *params.TransferMode) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &TrunkingV1Trunk{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TrunkingV1Trunk{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } diff --git a/twilio/rest/trunking/v1/model_list_credential_list_response.go b/twilio/rest/trunking/v1/model_list_credential_list_response.go index 329ca0092..e82aa3ff2 100644 --- a/twilio/rest/trunking/v1/model_list_credential_list_response.go +++ b/twilio/rest/trunking/v1/model_list_credential_list_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Trunking - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Trunking + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListCredentialListResponse struct for ListCredentialListResponse type ListCredentialListResponse struct { CredentialLists []TrunkingV1TrunkCredentialList `json:"CredentialLists,omitempty"` - Meta ListTrunkResponseMeta `json:"Meta,omitempty"` + Meta ListTrunkResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/trunking/v1/model_list_ip_access_control_list_response.go b/twilio/rest/trunking/v1/model_list_ip_access_control_list_response.go index 50a9c5289..1d80af5c2 100644 --- a/twilio/rest/trunking/v1/model_list_ip_access_control_list_response.go +++ b/twilio/rest/trunking/v1/model_list_ip_access_control_list_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Trunking - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Trunking + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListIpAccessControlListResponse struct for ListIpAccessControlListResponse type ListIpAccessControlListResponse struct { IpAccessControlLists []TrunkingV1TrunkIpAccessControlList `json:"IpAccessControlLists,omitempty"` - Meta ListTrunkResponseMeta `json:"Meta,omitempty"` + Meta ListTrunkResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/trunking/v1/model_list_origination_url_response.go b/twilio/rest/trunking/v1/model_list_origination_url_response.go index 885fd360b..0260aa0d9 100644 --- a/twilio/rest/trunking/v1/model_list_origination_url_response.go +++ b/twilio/rest/trunking/v1/model_list_origination_url_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Trunking - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Trunking + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListOriginationUrlResponse struct for ListOriginationUrlResponse type ListOriginationUrlResponse struct { - Meta ListTrunkResponseMeta `json:"Meta,omitempty"` + Meta ListTrunkResponseMeta `json:"Meta,omitempty"` OriginationUrls []TrunkingV1TrunkOriginationUrl `json:"OriginationUrls,omitempty"` } diff --git a/twilio/rest/trunking/v1/model_list_phone_number_response.go b/twilio/rest/trunking/v1/model_list_phone_number_response.go index 58688d506..3a2849738 100644 --- a/twilio/rest/trunking/v1/model_list_phone_number_response.go +++ b/twilio/rest/trunking/v1/model_list_phone_number_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Trunking - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Trunking + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListPhoneNumberResponse struct for ListPhoneNumberResponse type ListPhoneNumberResponse struct { - Meta ListTrunkResponseMeta `json:"Meta,omitempty"` + Meta ListTrunkResponseMeta `json:"Meta,omitempty"` PhoneNumbers []TrunkingV1TrunkPhoneNumber `json:"PhoneNumbers,omitempty"` } diff --git a/twilio/rest/trunking/v1/model_list_trunk_response.go b/twilio/rest/trunking/v1/model_list_trunk_response.go index 628d228fe..d9e215baa 100644 --- a/twilio/rest/trunking/v1/model_list_trunk_response.go +++ b/twilio/rest/trunking/v1/model_list_trunk_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Trunking - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Trunking + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListTrunkResponse struct for ListTrunkResponse type ListTrunkResponse struct { - Meta ListTrunkResponseMeta `json:"Meta,omitempty"` - Trunks []TrunkingV1Trunk `json:"Trunks,omitempty"` + Meta ListTrunkResponseMeta `json:"Meta,omitempty"` + Trunks []TrunkingV1Trunk `json:"Trunks,omitempty"` } diff --git a/twilio/rest/trunking/v1/model_list_trunk_response_meta.go b/twilio/rest/trunking/v1/model_list_trunk_response_meta.go index da3f4cda3..fa10945ed 100644 --- a/twilio/rest/trunking/v1/model_list_trunk_response_meta.go +++ b/twilio/rest/trunking/v1/model_list_trunk_response_meta.go @@ -1,22 +1,23 @@ /* - * Twilio - Trunking - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Trunking + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListTrunkResponseMeta struct for ListTrunkResponseMeta type ListTrunkResponseMeta struct { - FirstPageUrl string `json:"FirstPageUrl,omitempty"` - Key string `json:"Key,omitempty"` - NextPageUrl string `json:"NextPageUrl,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` - Url string `json:"Url,omitempty"` + Url string `json:"Url,omitempty"` } diff --git a/twilio/rest/trunking/v1/model_trunking_v1_trunk.go b/twilio/rest/trunking/v1/model_trunking_v1_trunk.go index 676038f7b..120618ec5 100644 --- a/twilio/rest/trunking/v1/model_trunking_v1_trunk.go +++ b/twilio/rest/trunking/v1/model_trunking_v1_trunk.go @@ -1,18 +1,20 @@ /* - * Twilio - Trunking - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Trunking + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // TrunkingV1Trunk struct for TrunkingV1Trunk type TrunkingV1Trunk struct { // The SID of the Account that created the resource diff --git a/twilio/rest/trunking/v1/model_trunking_v1_trunk_credential_list.go b/twilio/rest/trunking/v1/model_trunking_v1_trunk_credential_list.go index de98afec6..a1ab61abe 100644 --- a/twilio/rest/trunking/v1/model_trunking_v1_trunk_credential_list.go +++ b/twilio/rest/trunking/v1/model_trunking_v1_trunk_credential_list.go @@ -1,18 +1,20 @@ /* - * Twilio - Trunking - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Trunking + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // TrunkingV1TrunkCredentialList struct for TrunkingV1TrunkCredentialList type TrunkingV1TrunkCredentialList struct { // The SID of the Account that created the resource diff --git a/twilio/rest/trunking/v1/model_trunking_v1_trunk_ip_access_control_list.go b/twilio/rest/trunking/v1/model_trunking_v1_trunk_ip_access_control_list.go index fc9d89c53..ed2a45a52 100644 --- a/twilio/rest/trunking/v1/model_trunking_v1_trunk_ip_access_control_list.go +++ b/twilio/rest/trunking/v1/model_trunking_v1_trunk_ip_access_control_list.go @@ -1,18 +1,20 @@ /* - * Twilio - Trunking - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Trunking + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // TrunkingV1TrunkIpAccessControlList struct for TrunkingV1TrunkIpAccessControlList type TrunkingV1TrunkIpAccessControlList struct { // The SID of the Account that created the resource diff --git a/twilio/rest/trunking/v1/model_trunking_v1_trunk_origination_url.go b/twilio/rest/trunking/v1/model_trunking_v1_trunk_origination_url.go index dba0dc9f0..96ec4a900 100644 --- a/twilio/rest/trunking/v1/model_trunking_v1_trunk_origination_url.go +++ b/twilio/rest/trunking/v1/model_trunking_v1_trunk_origination_url.go @@ -1,18 +1,20 @@ /* - * Twilio - Trunking - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Trunking + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // TrunkingV1TrunkOriginationUrl struct for TrunkingV1TrunkOriginationUrl type TrunkingV1TrunkOriginationUrl struct { // The SID of the Account that created the resource diff --git a/twilio/rest/trunking/v1/model_trunking_v1_trunk_phone_number.go b/twilio/rest/trunking/v1/model_trunking_v1_trunk_phone_number.go index db6bda425..1a55e7b21 100644 --- a/twilio/rest/trunking/v1/model_trunking_v1_trunk_phone_number.go +++ b/twilio/rest/trunking/v1/model_trunking_v1_trunk_phone_number.go @@ -1,18 +1,20 @@ /* - * Twilio - Trunking - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Trunking + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // TrunkingV1TrunkPhoneNumber struct for TrunkingV1TrunkPhoneNumber type TrunkingV1TrunkPhoneNumber struct { // The SID of the Account that created the resource diff --git a/twilio/rest/trunking/v1/model_trunking_v1_trunk_recording.go b/twilio/rest/trunking/v1/model_trunking_v1_trunk_recording.go index 4291a092e..1e9b2d51f 100644 --- a/twilio/rest/trunking/v1/model_trunking_v1_trunk_recording.go +++ b/twilio/rest/trunking/v1/model_trunking_v1_trunk_recording.go @@ -1,15 +1,16 @@ /* - * Twilio - Trunking - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Trunking + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // TrunkingV1TrunkRecording struct for TrunkingV1TrunkRecording type TrunkingV1TrunkRecording struct { // The recording mode for the trunk. diff --git a/twilio/rest/trusthub/v1/api_default.go b/twilio/rest/trusthub/v1/api_default.go index bffc75576..b241a13ea 100644 --- a/twilio/rest/trusthub/v1/api_default.go +++ b/twilio/rest/trusthub/v1/api_default.go @@ -1,11 +1,11 @@ /* - * Twilio - Trusthub - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Trusthub + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,9 +14,10 @@ package openapi import ( "encoding/json" "fmt" - twilio "github.com/twilio/twilio-go/client" "net/url" - "strings" + "strings" + + twilio "github.com/twilio/twilio-go/client" ) type DefaultApiService struct { @@ -25,17 +26,17 @@ type DefaultApiService struct { } func NewDefaultApiService(client *twilio.Client) *DefaultApiService { - return &DefaultApiService { - client: client, + return &DefaultApiService{ + client: client, baseURL: "https://trusthub.twilio.com", } } // CreateCustomerProfileParams Optional parameters for the method 'CreateCustomerProfile' type CreateCustomerProfileParams struct { - Email *string `json:"Email,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - PolicySid *string `json:"PolicySid,omitempty"` + Email *string `json:"Email,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + PolicySid *string `json:"PolicySid,omitempty"` StatusCallback *string `json:"StatusCallback,omitempty"` } @@ -48,44 +49,44 @@ type CreateCustomerProfileParams struct { * @param "PolicySid" (string) - The unique string of a policy that is associated to the Customer-Profile resource. * @param "StatusCallback" (string) - The URL we call to inform your application of status changes. * @return TrusthubV1CustomerProfile -*/ + */ func (c *DefaultApiService) CreateCustomerProfile(params *CreateCustomerProfileParams) (*TrusthubV1CustomerProfile, error) { - path := "/v1/CustomerProfiles" - - data := url.Values{} - headers := 0 + path := "/v1/CustomerProfiles" - if params != nil && params.Email != nil { - data.Set("Email", *params.Email) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.PolicySid != nil { - data.Set("PolicySid", *params.PolicySid) -} - if params != nil && params.StatusCallback != nil { - data.Set("StatusCallback", *params.StatusCallback) -} + data := url.Values{} + headers := 0 + if params != nil && params.Email != nil { + data.Set("Email", *params.Email) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.PolicySid != nil { + data.Set("PolicySid", *params.PolicySid) + } + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &TrusthubV1CustomerProfile{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TrusthubV1CustomerProfile{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateCustomerProfileChannelEndpointAssignmentParams Optional parameters for the method 'CreateCustomerProfileChannelEndpointAssignment' type CreateCustomerProfileChannelEndpointAssignmentParams struct { - ChannelEndpointSid *string `json:"ChannelEndpointSid,omitempty"` + ChannelEndpointSid *string `json:"ChannelEndpointSid,omitempty"` ChannelEndpointType *string `json:"ChannelEndpointType,omitempty"` } @@ -97,36 +98,36 @@ type CreateCustomerProfileChannelEndpointAssignmentParams struct { * @param "ChannelEndpointSid" (string) - The SID of an channel endpoint * @param "ChannelEndpointType" (string) - The type of channel endpoint. eg: phone-number * @return TrusthubV1CustomerProfileCustomerProfileChannelEndpointAssignment -*/ + */ func (c *DefaultApiService) CreateCustomerProfileChannelEndpointAssignment(CustomerProfileSid string, params *CreateCustomerProfileChannelEndpointAssignmentParams) (*TrusthubV1CustomerProfileCustomerProfileChannelEndpointAssignment, error) { - path := "/v1/CustomerProfiles/{CustomerProfileSid}/ChannelEndpointAssignments" + path := "/v1/CustomerProfiles/{CustomerProfileSid}/ChannelEndpointAssignments" path = strings.Replace(path, "{"+"CustomerProfileSid"+"}", CustomerProfileSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.ChannelEndpointSid != nil { - data.Set("ChannelEndpointSid", *params.ChannelEndpointSid) -} - if params != nil && params.ChannelEndpointType != nil { - data.Set("ChannelEndpointType", *params.ChannelEndpointType) -} + data := url.Values{} + headers := 0 + if params != nil && params.ChannelEndpointSid != nil { + data.Set("ChannelEndpointSid", *params.ChannelEndpointSid) + } + if params != nil && params.ChannelEndpointType != nil { + data.Set("ChannelEndpointType", *params.ChannelEndpointType) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &TrusthubV1CustomerProfileCustomerProfileChannelEndpointAssignment{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TrusthubV1CustomerProfileCustomerProfileChannelEndpointAssignment{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateCustomerProfileEntityAssignmentParams Optional parameters for the method 'CreateCustomerProfileEntityAssignment' type CreateCustomerProfileEntityAssignmentParams struct { ObjectSid *string `json:"ObjectSid,omitempty"` @@ -139,33 +140,33 @@ type CreateCustomerProfileEntityAssignmentParams struct { * @param optional nil or *CreateCustomerProfileEntityAssignmentParams - Optional Parameters: * @param "ObjectSid" (string) - The SID of an object bag that holds information of the different items. * @return TrusthubV1CustomerProfileCustomerProfileEntityAssignment -*/ + */ func (c *DefaultApiService) CreateCustomerProfileEntityAssignment(CustomerProfileSid string, params *CreateCustomerProfileEntityAssignmentParams) (*TrusthubV1CustomerProfileCustomerProfileEntityAssignment, error) { - path := "/v1/CustomerProfiles/{CustomerProfileSid}/EntityAssignments" + path := "/v1/CustomerProfiles/{CustomerProfileSid}/EntityAssignments" path = strings.Replace(path, "{"+"CustomerProfileSid"+"}", CustomerProfileSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.ObjectSid != nil { - data.Set("ObjectSid", *params.ObjectSid) -} + data := url.Values{} + headers := 0 + if params != nil && params.ObjectSid != nil { + data.Set("ObjectSid", *params.ObjectSid) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &TrusthubV1CustomerProfileCustomerProfileEntityAssignment{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TrusthubV1CustomerProfileCustomerProfileEntityAssignment{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateCustomerProfileEvaluationParams Optional parameters for the method 'CreateCustomerProfileEvaluation' type CreateCustomerProfileEvaluationParams struct { PolicySid *string `json:"PolicySid,omitempty"` @@ -178,38 +179,38 @@ type CreateCustomerProfileEvaluationParams struct { * @param optional nil or *CreateCustomerProfileEvaluationParams - Optional Parameters: * @param "PolicySid" (string) - The unique string of a policy that is associated to the customer_profile resource. * @return TrusthubV1CustomerProfileCustomerProfileEvaluation -*/ + */ func (c *DefaultApiService) CreateCustomerProfileEvaluation(CustomerProfileSid string, params *CreateCustomerProfileEvaluationParams) (*TrusthubV1CustomerProfileCustomerProfileEvaluation, error) { - path := "/v1/CustomerProfiles/{CustomerProfileSid}/Evaluations" + path := "/v1/CustomerProfiles/{CustomerProfileSid}/Evaluations" path = strings.Replace(path, "{"+"CustomerProfileSid"+"}", CustomerProfileSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PolicySid != nil { - data.Set("PolicySid", *params.PolicySid) -} + data := url.Values{} + headers := 0 + if params != nil && params.PolicySid != nil { + data.Set("PolicySid", *params.PolicySid) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &TrusthubV1CustomerProfileCustomerProfileEvaluation{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TrusthubV1CustomerProfileCustomerProfileEvaluation{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateEndUserParams Optional parameters for the method 'CreateEndUser' type CreateEndUserParams struct { - Attributes *map[string]interface{} `json:"Attributes,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Type *string `json:"Type,omitempty"` + Attributes *map[string]interface{} `json:"Attributes,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Type *string `json:"Type,omitempty"` } /* @@ -220,49 +221,49 @@ type CreateEndUserParams struct { * @param "FriendlyName" (string) - The string that you assigned to describe the resource. * @param "Type" (string) - The type of end user of the Bundle resource - can be `individual` or `business`. * @return TrusthubV1EndUser -*/ + */ func (c *DefaultApiService) CreateEndUser(params *CreateEndUserParams) (*TrusthubV1EndUser, error) { - path := "/v1/EndUsers" + path := "/v1/EndUsers" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Attributes != nil { - v, err := json.Marshal(params.Attributes) + if params != nil && params.Attributes != nil { + v, err := json.Marshal(params.Attributes) - if err != nil { - return nil, err - } - - data.Set("Attributes", fmt.Sprint(v)) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.Type != nil { - data.Set("Type", *params.Type) -} + if err != nil { + return nil, err + } + data.Set("Attributes", fmt.Sprint(v)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Type != nil { + data.Set("Type", *params.Type) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &TrusthubV1EndUser{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TrusthubV1EndUser{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateSupportingDocumentParams Optional parameters for the method 'CreateSupportingDocument' type CreateSupportingDocumentParams struct { - Attributes *map[string]interface{} `json:"Attributes,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Type *string `json:"Type,omitempty"` + Attributes *map[string]interface{} `json:"Attributes,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Type *string `json:"Type,omitempty"` } /* @@ -273,49 +274,49 @@ type CreateSupportingDocumentParams struct { * @param "FriendlyName" (string) - The string that you assigned to describe the resource. * @param "Type" (string) - The type of the Supporting Document. * @return TrusthubV1SupportingDocument -*/ + */ func (c *DefaultApiService) CreateSupportingDocument(params *CreateSupportingDocumentParams) (*TrusthubV1SupportingDocument, error) { - path := "/v1/SupportingDocuments" + path := "/v1/SupportingDocuments" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Attributes != nil { - v, err := json.Marshal(params.Attributes) + if params != nil && params.Attributes != nil { + v, err := json.Marshal(params.Attributes) - if err != nil { - return nil, err - } - - data.Set("Attributes", fmt.Sprint(v)) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.Type != nil { - data.Set("Type", *params.Type) -} + if err != nil { + return nil, err + } + data.Set("Attributes", fmt.Sprint(v)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Type != nil { + data.Set("Type", *params.Type) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &TrusthubV1SupportingDocument{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TrusthubV1SupportingDocument{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateTrustProductParams Optional parameters for the method 'CreateTrustProduct' type CreateTrustProductParams struct { - Email *string `json:"Email,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - PolicySid *string `json:"PolicySid,omitempty"` + Email *string `json:"Email,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + PolicySid *string `json:"PolicySid,omitempty"` StatusCallback *string `json:"StatusCallback,omitempty"` } @@ -328,44 +329,44 @@ type CreateTrustProductParams struct { * @param "PolicySid" (string) - The unique string of a policy that is associated to the Customer-Profile resource. * @param "StatusCallback" (string) - The URL we call to inform your application of status changes. * @return TrusthubV1TrustProduct -*/ + */ func (c *DefaultApiService) CreateTrustProduct(params *CreateTrustProductParams) (*TrusthubV1TrustProduct, error) { - path := "/v1/TrustProducts" - - data := url.Values{} - headers := 0 + path := "/v1/TrustProducts" - if params != nil && params.Email != nil { - data.Set("Email", *params.Email) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.PolicySid != nil { - data.Set("PolicySid", *params.PolicySid) -} - if params != nil && params.StatusCallback != nil { - data.Set("StatusCallback", *params.StatusCallback) -} + data := url.Values{} + headers := 0 + if params != nil && params.Email != nil { + data.Set("Email", *params.Email) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.PolicySid != nil { + data.Set("PolicySid", *params.PolicySid) + } + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &TrusthubV1TrustProduct{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TrusthubV1TrustProduct{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateTrustProductChannelEndpointAssignmentParams Optional parameters for the method 'CreateTrustProductChannelEndpointAssignment' type CreateTrustProductChannelEndpointAssignmentParams struct { - ChannelEndpointSid *string `json:"ChannelEndpointSid,omitempty"` + ChannelEndpointSid *string `json:"ChannelEndpointSid,omitempty"` ChannelEndpointType *string `json:"ChannelEndpointType,omitempty"` } @@ -377,36 +378,36 @@ type CreateTrustProductChannelEndpointAssignmentParams struct { * @param "ChannelEndpointSid" (string) - The SID of an channel endpoint * @param "ChannelEndpointType" (string) - The type of channel endpoint. eg: phone-number * @return TrusthubV1TrustProductTrustProductChannelEndpointAssignment -*/ + */ func (c *DefaultApiService) CreateTrustProductChannelEndpointAssignment(TrustProductSid string, params *CreateTrustProductChannelEndpointAssignmentParams) (*TrusthubV1TrustProductTrustProductChannelEndpointAssignment, error) { - path := "/v1/TrustProducts/{TrustProductSid}/ChannelEndpointAssignments" + path := "/v1/TrustProducts/{TrustProductSid}/ChannelEndpointAssignments" path = strings.Replace(path, "{"+"TrustProductSid"+"}", TrustProductSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.ChannelEndpointSid != nil { - data.Set("ChannelEndpointSid", *params.ChannelEndpointSid) -} - if params != nil && params.ChannelEndpointType != nil { - data.Set("ChannelEndpointType", *params.ChannelEndpointType) -} + data := url.Values{} + headers := 0 + if params != nil && params.ChannelEndpointSid != nil { + data.Set("ChannelEndpointSid", *params.ChannelEndpointSid) + } + if params != nil && params.ChannelEndpointType != nil { + data.Set("ChannelEndpointType", *params.ChannelEndpointType) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &TrusthubV1TrustProductTrustProductChannelEndpointAssignment{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TrusthubV1TrustProductTrustProductChannelEndpointAssignment{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateTrustProductEntityAssignmentParams Optional parameters for the method 'CreateTrustProductEntityAssignment' type CreateTrustProductEntityAssignmentParams struct { ObjectSid *string `json:"ObjectSid,omitempty"` @@ -419,33 +420,33 @@ type CreateTrustProductEntityAssignmentParams struct { * @param optional nil or *CreateTrustProductEntityAssignmentParams - Optional Parameters: * @param "ObjectSid" (string) - The SID of an object bag that holds information of the different items. * @return TrusthubV1TrustProductTrustProductEntityAssignment -*/ + */ func (c *DefaultApiService) CreateTrustProductEntityAssignment(TrustProductSid string, params *CreateTrustProductEntityAssignmentParams) (*TrusthubV1TrustProductTrustProductEntityAssignment, error) { - path := "/v1/TrustProducts/{TrustProductSid}/EntityAssignments" + path := "/v1/TrustProducts/{TrustProductSid}/EntityAssignments" path = strings.Replace(path, "{"+"TrustProductSid"+"}", TrustProductSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.ObjectSid != nil { - data.Set("ObjectSid", *params.ObjectSid) -} + data := url.Values{} + headers := 0 + if params != nil && params.ObjectSid != nil { + data.Set("ObjectSid", *params.ObjectSid) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &TrusthubV1TrustProductTrustProductEntityAssignment{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TrusthubV1TrustProductTrustProductEntityAssignment{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateTrustProductEvaluationParams Optional parameters for the method 'CreateTrustProductEvaluation' type CreateTrustProductEvaluationParams struct { PolicySid *string `json:"PolicySid,omitempty"` @@ -458,56 +459,53 @@ type CreateTrustProductEvaluationParams struct { * @param optional nil or *CreateTrustProductEvaluationParams - Optional Parameters: * @param "PolicySid" (string) - The unique string of a policy that is associated to the customer_profile resource. * @return TrusthubV1TrustProductTrustProductEvaluation -*/ + */ func (c *DefaultApiService) CreateTrustProductEvaluation(TrustProductSid string, params *CreateTrustProductEvaluationParams) (*TrusthubV1TrustProductTrustProductEvaluation, error) { - path := "/v1/TrustProducts/{TrustProductSid}/Evaluations" + path := "/v1/TrustProducts/{TrustProductSid}/Evaluations" path = strings.Replace(path, "{"+"TrustProductSid"+"}", TrustProductSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PolicySid != nil { - data.Set("PolicySid", *params.PolicySid) -} + data := url.Values{} + headers := 0 + if params != nil && params.PolicySid != nil { + data.Set("PolicySid", *params.PolicySid) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &TrusthubV1TrustProductTrustProductEvaluation{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TrusthubV1TrustProductTrustProductEvaluation{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * DeleteCustomerProfile Method for DeleteCustomerProfile * Delete a specific Customer-Profile. * @param Sid The unique string that we created to identify the Customer-Profile resource. -*/ -func (c *DefaultApiService) DeleteCustomerProfile(Sid string, ) (error) { - path := "/v1/CustomerProfiles/{Sid}" + */ +func (c *DefaultApiService) DeleteCustomerProfile(Sid string) error { + path := "/v1/CustomerProfiles/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -515,25 +513,23 @@ func (c *DefaultApiService) DeleteCustomerProfile(Sid string, ) (error) { * Remove an Assignment Item Instance. * @param CustomerProfileSid The unique string that we created to identify the CustomerProfile resource. * @param Sid The unique string that we created to identify the resource. -*/ -func (c *DefaultApiService) DeleteCustomerProfileChannelEndpointAssignment(CustomerProfileSid string, Sid string, ) (error) { - path := "/v1/CustomerProfiles/{CustomerProfileSid}/ChannelEndpointAssignments/{Sid}" + */ +func (c *DefaultApiService) DeleteCustomerProfileChannelEndpointAssignment(CustomerProfileSid string, Sid string) error { + path := "/v1/CustomerProfiles/{CustomerProfileSid}/ChannelEndpointAssignments/{Sid}" path = strings.Replace(path, "{"+"CustomerProfileSid"+"}", CustomerProfileSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -541,97 +537,89 @@ func (c *DefaultApiService) DeleteCustomerProfileChannelEndpointAssignment(Custo * Remove an Assignment Item Instance. * @param CustomerProfileSid The unique string that we created to identify the CustomerProfile resource. * @param Sid The unique string that we created to identify the Identity resource. -*/ -func (c *DefaultApiService) DeleteCustomerProfileEntityAssignment(CustomerProfileSid string, Sid string, ) (error) { - path := "/v1/CustomerProfiles/{CustomerProfileSid}/EntityAssignments/{Sid}" + */ +func (c *DefaultApiService) DeleteCustomerProfileEntityAssignment(CustomerProfileSid string, Sid string) error { + path := "/v1/CustomerProfiles/{CustomerProfileSid}/EntityAssignments/{Sid}" path = strings.Replace(path, "{"+"CustomerProfileSid"+"}", CustomerProfileSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + defer resp.Body.Close() - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() - - return nil + return nil } /* * DeleteEndUser Method for DeleteEndUser * Delete a specific End User. * @param Sid The unique string created by Twilio to identify the End User resource. -*/ -func (c *DefaultApiService) DeleteEndUser(Sid string, ) (error) { - path := "/v1/EndUsers/{Sid}" + */ +func (c *DefaultApiService) DeleteEndUser(Sid string) error { + path := "/v1/EndUsers/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* * DeleteSupportingDocument Method for DeleteSupportingDocument * Delete a specific Supporting Document. * @param Sid The unique string created by Twilio to identify the Supporting Document resource. -*/ -func (c *DefaultApiService) DeleteSupportingDocument(Sid string, ) (error) { - path := "/v1/SupportingDocuments/{Sid}" + */ +func (c *DefaultApiService) DeleteSupportingDocument(Sid string) error { + path := "/v1/SupportingDocuments/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* * DeleteTrustProduct Method for DeleteTrustProduct * Delete a specific Customer-Profile. * @param Sid The unique string that we created to identify the Customer-Profile resource. -*/ -func (c *DefaultApiService) DeleteTrustProduct(Sid string, ) (error) { - path := "/v1/TrustProducts/{Sid}" + */ +func (c *DefaultApiService) DeleteTrustProduct(Sid string) error { + path := "/v1/TrustProducts/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + defer resp.Body.Close() - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() - - return nil + return nil } /* @@ -639,25 +627,23 @@ func (c *DefaultApiService) DeleteTrustProduct(Sid string, ) (error) { * Remove an Assignment Item Instance. * @param TrustProductSid The unique string that we created to identify the CustomerProfile resource. * @param Sid The unique string that we created to identify the resource. -*/ -func (c *DefaultApiService) DeleteTrustProductChannelEndpointAssignment(TrustProductSid string, Sid string, ) (error) { - path := "/v1/TrustProducts/{TrustProductSid}/ChannelEndpointAssignments/{Sid}" + */ +func (c *DefaultApiService) DeleteTrustProductChannelEndpointAssignment(TrustProductSid string, Sid string) error { + path := "/v1/TrustProducts/{TrustProductSid}/ChannelEndpointAssignments/{Sid}" path = strings.Replace(path, "{"+"TrustProductSid"+"}", TrustProductSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -665,25 +651,23 @@ func (c *DefaultApiService) DeleteTrustProductChannelEndpointAssignment(TrustPro * Remove an Assignment Item Instance. * @param TrustProductSid The unique string that we created to identify the TrustProduct resource. * @param Sid The unique string that we created to identify the Identity resource. -*/ -func (c *DefaultApiService) DeleteTrustProductEntityAssignment(TrustProductSid string, Sid string, ) (error) { - path := "/v1/TrustProducts/{TrustProductSid}/EntityAssignments/{Sid}" + */ +func (c *DefaultApiService) DeleteTrustProductEntityAssignment(TrustProductSid string, Sid string) error { + path := "/v1/TrustProducts/{TrustProductSid}/EntityAssignments/{Sid}" path = strings.Replace(path, "{"+"TrustProductSid"+"}", TrustProductSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -691,29 +675,27 @@ func (c *DefaultApiService) DeleteTrustProductEntityAssignment(TrustProductSid s * Fetch a specific Customer-Profile instance. * @param Sid The unique string that we created to identify the Customer-Profile resource. * @return TrusthubV1CustomerProfile -*/ -func (c *DefaultApiService) FetchCustomerProfile(Sid string, ) (*TrusthubV1CustomerProfile, error) { - path := "/v1/CustomerProfiles/{Sid}" + */ +func (c *DefaultApiService) FetchCustomerProfile(Sid string) (*TrusthubV1CustomerProfile, error) { + path := "/v1/CustomerProfiles/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &TrusthubV1CustomerProfile{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TrusthubV1CustomerProfile{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -722,30 +704,28 @@ func (c *DefaultApiService) FetchCustomerProfile(Sid string, ) (*TrusthubV1Custo * @param CustomerProfileSid The unique string that we created to identify the CustomerProfile resource. * @param Sid The unique string that we created to identify the resource. * @return TrusthubV1CustomerProfileCustomerProfileChannelEndpointAssignment -*/ -func (c *DefaultApiService) FetchCustomerProfileChannelEndpointAssignment(CustomerProfileSid string, Sid string, ) (*TrusthubV1CustomerProfileCustomerProfileChannelEndpointAssignment, error) { - path := "/v1/CustomerProfiles/{CustomerProfileSid}/ChannelEndpointAssignments/{Sid}" + */ +func (c *DefaultApiService) FetchCustomerProfileChannelEndpointAssignment(CustomerProfileSid string, Sid string) (*TrusthubV1CustomerProfileCustomerProfileChannelEndpointAssignment, error) { + path := "/v1/CustomerProfiles/{CustomerProfileSid}/ChannelEndpointAssignments/{Sid}" path = strings.Replace(path, "{"+"CustomerProfileSid"+"}", CustomerProfileSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &TrusthubV1CustomerProfileCustomerProfileChannelEndpointAssignment{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TrusthubV1CustomerProfileCustomerProfileChannelEndpointAssignment{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -754,30 +734,28 @@ func (c *DefaultApiService) FetchCustomerProfileChannelEndpointAssignment(Custom * @param CustomerProfileSid The unique string that we created to identify the CustomerProfile resource. * @param Sid The unique string that we created to identify the Identity resource. * @return TrusthubV1CustomerProfileCustomerProfileEntityAssignment -*/ -func (c *DefaultApiService) FetchCustomerProfileEntityAssignment(CustomerProfileSid string, Sid string, ) (*TrusthubV1CustomerProfileCustomerProfileEntityAssignment, error) { - path := "/v1/CustomerProfiles/{CustomerProfileSid}/EntityAssignments/{Sid}" + */ +func (c *DefaultApiService) FetchCustomerProfileEntityAssignment(CustomerProfileSid string, Sid string) (*TrusthubV1CustomerProfileCustomerProfileEntityAssignment, error) { + path := "/v1/CustomerProfiles/{CustomerProfileSid}/EntityAssignments/{Sid}" path = strings.Replace(path, "{"+"CustomerProfileSid"+"}", CustomerProfileSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &TrusthubV1CustomerProfileCustomerProfileEntityAssignment{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TrusthubV1CustomerProfileCustomerProfileEntityAssignment{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -786,30 +764,28 @@ func (c *DefaultApiService) FetchCustomerProfileEntityAssignment(CustomerProfile * @param CustomerProfileSid The unique string that we created to identify the customer_profile resource. * @param Sid The unique string that identifies the Evaluation resource. * @return TrusthubV1CustomerProfileCustomerProfileEvaluation -*/ -func (c *DefaultApiService) FetchCustomerProfileEvaluation(CustomerProfileSid string, Sid string, ) (*TrusthubV1CustomerProfileCustomerProfileEvaluation, error) { - path := "/v1/CustomerProfiles/{CustomerProfileSid}/Evaluations/{Sid}" + */ +func (c *DefaultApiService) FetchCustomerProfileEvaluation(CustomerProfileSid string, Sid string) (*TrusthubV1CustomerProfileCustomerProfileEvaluation, error) { + path := "/v1/CustomerProfiles/{CustomerProfileSid}/Evaluations/{Sid}" path = strings.Replace(path, "{"+"CustomerProfileSid"+"}", CustomerProfileSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &TrusthubV1CustomerProfileCustomerProfileEvaluation{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TrusthubV1CustomerProfileCustomerProfileEvaluation{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -817,29 +793,27 @@ func (c *DefaultApiService) FetchCustomerProfileEvaluation(CustomerProfileSid st * Fetch specific End User Instance. * @param Sid The unique string created by Twilio to identify the End User resource. * @return TrusthubV1EndUser -*/ -func (c *DefaultApiService) FetchEndUser(Sid string, ) (*TrusthubV1EndUser, error) { - path := "/v1/EndUsers/{Sid}" + */ +func (c *DefaultApiService) FetchEndUser(Sid string) (*TrusthubV1EndUser, error) { + path := "/v1/EndUsers/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &TrusthubV1EndUser{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TrusthubV1EndUser{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -847,29 +821,27 @@ func (c *DefaultApiService) FetchEndUser(Sid string, ) (*TrusthubV1EndUser, erro * Fetch a specific End-User Type Instance. * @param Sid The unique string that identifies the End-User Type resource. * @return TrusthubV1EndUserType -*/ -func (c *DefaultApiService) FetchEndUserType(Sid string, ) (*TrusthubV1EndUserType, error) { - path := "/v1/EndUserTypes/{Sid}" + */ +func (c *DefaultApiService) FetchEndUserType(Sid string) (*TrusthubV1EndUserType, error) { + path := "/v1/EndUserTypes/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &TrusthubV1EndUserType{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TrusthubV1EndUserType{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -877,29 +849,27 @@ func (c *DefaultApiService) FetchEndUserType(Sid string, ) (*TrusthubV1EndUserTy * Fetch specific Policy Instance. * @param Sid The unique string that identifies the Policy resource. * @return TrusthubV1Policies -*/ -func (c *DefaultApiService) FetchPolicies(Sid string, ) (*TrusthubV1Policies, error) { - path := "/v1/Policies/{Sid}" + */ +func (c *DefaultApiService) FetchPolicies(Sid string) (*TrusthubV1Policies, error) { + path := "/v1/Policies/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &TrusthubV1Policies{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TrusthubV1Policies{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -907,29 +877,27 @@ func (c *DefaultApiService) FetchPolicies(Sid string, ) (*TrusthubV1Policies, er * Fetch specific Supporting Document Instance. * @param Sid The unique string created by Twilio to identify the Supporting Document resource. * @return TrusthubV1SupportingDocument -*/ -func (c *DefaultApiService) FetchSupportingDocument(Sid string, ) (*TrusthubV1SupportingDocument, error) { - path := "/v1/SupportingDocuments/{Sid}" + */ +func (c *DefaultApiService) FetchSupportingDocument(Sid string) (*TrusthubV1SupportingDocument, error) { + path := "/v1/SupportingDocuments/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &TrusthubV1SupportingDocument{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TrusthubV1SupportingDocument{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -937,29 +905,27 @@ func (c *DefaultApiService) FetchSupportingDocument(Sid string, ) (*TrusthubV1Su * Fetch a specific Supporting Document Type Instance. * @param Sid The unique string that identifies the Supporting Document Type resource. * @return TrusthubV1SupportingDocumentType -*/ -func (c *DefaultApiService) FetchSupportingDocumentType(Sid string, ) (*TrusthubV1SupportingDocumentType, error) { - path := "/v1/SupportingDocumentTypes/{Sid}" + */ +func (c *DefaultApiService) FetchSupportingDocumentType(Sid string) (*TrusthubV1SupportingDocumentType, error) { + path := "/v1/SupportingDocumentTypes/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &TrusthubV1SupportingDocumentType{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TrusthubV1SupportingDocumentType{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -967,29 +933,27 @@ func (c *DefaultApiService) FetchSupportingDocumentType(Sid string, ) (*Trusthub * Fetch a specific Customer-Profile instance. * @param Sid The unique string that we created to identify the Customer-Profile resource. * @return TrusthubV1TrustProduct -*/ -func (c *DefaultApiService) FetchTrustProduct(Sid string, ) (*TrusthubV1TrustProduct, error) { - path := "/v1/TrustProducts/{Sid}" + */ +func (c *DefaultApiService) FetchTrustProduct(Sid string) (*TrusthubV1TrustProduct, error) { + path := "/v1/TrustProducts/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &TrusthubV1TrustProduct{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TrusthubV1TrustProduct{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -998,30 +962,28 @@ func (c *DefaultApiService) FetchTrustProduct(Sid string, ) (*TrusthubV1TrustPro * @param TrustProductSid The unique string that we created to identify the CustomerProfile resource. * @param Sid The unique string that we created to identify the resource. * @return TrusthubV1TrustProductTrustProductChannelEndpointAssignment -*/ -func (c *DefaultApiService) FetchTrustProductChannelEndpointAssignment(TrustProductSid string, Sid string, ) (*TrusthubV1TrustProductTrustProductChannelEndpointAssignment, error) { - path := "/v1/TrustProducts/{TrustProductSid}/ChannelEndpointAssignments/{Sid}" + */ +func (c *DefaultApiService) FetchTrustProductChannelEndpointAssignment(TrustProductSid string, Sid string) (*TrusthubV1TrustProductTrustProductChannelEndpointAssignment, error) { + path := "/v1/TrustProducts/{TrustProductSid}/ChannelEndpointAssignments/{Sid}" path = strings.Replace(path, "{"+"TrustProductSid"+"}", TrustProductSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &TrusthubV1TrustProductTrustProductChannelEndpointAssignment{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TrusthubV1TrustProductTrustProductChannelEndpointAssignment{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -1030,30 +992,28 @@ func (c *DefaultApiService) FetchTrustProductChannelEndpointAssignment(TrustProd * @param TrustProductSid The unique string that we created to identify the TrustProduct resource. * @param Sid The unique string that we created to identify the Identity resource. * @return TrusthubV1TrustProductTrustProductEntityAssignment -*/ -func (c *DefaultApiService) FetchTrustProductEntityAssignment(TrustProductSid string, Sid string, ) (*TrusthubV1TrustProductTrustProductEntityAssignment, error) { - path := "/v1/TrustProducts/{TrustProductSid}/EntityAssignments/{Sid}" + */ +func (c *DefaultApiService) FetchTrustProductEntityAssignment(TrustProductSid string, Sid string) (*TrusthubV1TrustProductTrustProductEntityAssignment, error) { + path := "/v1/TrustProducts/{TrustProductSid}/EntityAssignments/{Sid}" path = strings.Replace(path, "{"+"TrustProductSid"+"}", TrustProductSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &TrusthubV1TrustProductTrustProductEntityAssignment{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TrusthubV1TrustProductTrustProductEntityAssignment{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -1062,37 +1022,36 @@ func (c *DefaultApiService) FetchTrustProductEntityAssignment(TrustProductSid st * @param TrustProductSid The unique string that we created to identify the trust_product resource. * @param Sid The unique string that identifies the Evaluation resource. * @return TrusthubV1TrustProductTrustProductEvaluation -*/ -func (c *DefaultApiService) FetchTrustProductEvaluation(TrustProductSid string, Sid string, ) (*TrusthubV1TrustProductTrustProductEvaluation, error) { - path := "/v1/TrustProducts/{TrustProductSid}/Evaluations/{Sid}" + */ +func (c *DefaultApiService) FetchTrustProductEvaluation(TrustProductSid string, Sid string) (*TrusthubV1TrustProductTrustProductEvaluation, error) { + path := "/v1/TrustProducts/{TrustProductSid}/Evaluations/{Sid}" path = strings.Replace(path, "{"+"TrustProductSid"+"}", TrustProductSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &TrusthubV1TrustProductTrustProductEvaluation{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TrusthubV1TrustProductTrustProductEvaluation{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListCustomerProfileParams Optional parameters for the method 'ListCustomerProfile' type ListCustomerProfileParams struct { - Status *string `json:"Status,omitempty"` + Status *string `json:"Status,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` - PolicySid *string `json:"PolicySid,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PolicySid *string `json:"PolicySid,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -1104,46 +1063,46 @@ type ListCustomerProfileParams struct { * @param "PolicySid" (string) - The unique string of a policy that is associated to the Customer-Profile resource. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListCustomerProfileResponse -*/ + */ func (c *DefaultApiService) ListCustomerProfile(params *ListCustomerProfileParams) (*ListCustomerProfileResponse, error) { - path := "/v1/CustomerProfiles" + path := "/v1/CustomerProfiles" - data := url.Values{} - headers := 0 - - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.PolicySid != nil { - data.Set("PolicySid", *params.PolicySid) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.PolicySid != nil { + data.Set("PolicySid", *params.PolicySid) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListCustomerProfileResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListCustomerProfileResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListCustomerProfileChannelEndpointAssignmentParams Optional parameters for the method 'ListCustomerProfileChannelEndpointAssignment' type ListCustomerProfileChannelEndpointAssignmentParams struct { - ChannelEndpointSid *string `json:"ChannelEndpointSid,omitempty"` + ChannelEndpointSid *string `json:"ChannelEndpointSid,omitempty"` ChannelEndpointSids *string `json:"ChannelEndpointSids,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -1155,39 +1114,39 @@ type ListCustomerProfileChannelEndpointAssignmentParams struct { * @param "ChannelEndpointSids" (string) - comma separated list of channel endpoint sids * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListCustomerProfileChannelEndpointAssignmentResponse -*/ + */ func (c *DefaultApiService) ListCustomerProfileChannelEndpointAssignment(CustomerProfileSid string, params *ListCustomerProfileChannelEndpointAssignmentParams) (*ListCustomerProfileChannelEndpointAssignmentResponse, error) { - path := "/v1/CustomerProfiles/{CustomerProfileSid}/ChannelEndpointAssignments" + path := "/v1/CustomerProfiles/{CustomerProfileSid}/ChannelEndpointAssignments" path = strings.Replace(path, "{"+"CustomerProfileSid"+"}", CustomerProfileSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.ChannelEndpointSid != nil { - data.Set("ChannelEndpointSid", *params.ChannelEndpointSid) -} - if params != nil && params.ChannelEndpointSids != nil { - data.Set("ChannelEndpointSids", *params.ChannelEndpointSids) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.ChannelEndpointSid != nil { + data.Set("ChannelEndpointSid", *params.ChannelEndpointSid) + } + if params != nil && params.ChannelEndpointSids != nil { + data.Set("ChannelEndpointSids", *params.ChannelEndpointSids) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListCustomerProfileChannelEndpointAssignmentResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListCustomerProfileChannelEndpointAssignmentResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListCustomerProfileEntityAssignmentParams Optional parameters for the method 'ListCustomerProfileEntityAssignment' type ListCustomerProfileEntityAssignmentParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1200,33 +1159,33 @@ type ListCustomerProfileEntityAssignmentParams struct { * @param optional nil or *ListCustomerProfileEntityAssignmentParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListCustomerProfileEntityAssignmentResponse -*/ + */ func (c *DefaultApiService) ListCustomerProfileEntityAssignment(CustomerProfileSid string, params *ListCustomerProfileEntityAssignmentParams) (*ListCustomerProfileEntityAssignmentResponse, error) { - path := "/v1/CustomerProfiles/{CustomerProfileSid}/EntityAssignments" + path := "/v1/CustomerProfiles/{CustomerProfileSid}/EntityAssignments" path = strings.Replace(path, "{"+"CustomerProfileSid"+"}", CustomerProfileSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListCustomerProfileEntityAssignmentResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListCustomerProfileEntityAssignmentResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListCustomerProfileEvaluationParams Optional parameters for the method 'ListCustomerProfileEvaluation' type ListCustomerProfileEvaluationParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1239,33 +1198,33 @@ type ListCustomerProfileEvaluationParams struct { * @param optional nil or *ListCustomerProfileEvaluationParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListCustomerProfileEvaluationResponse -*/ + */ func (c *DefaultApiService) ListCustomerProfileEvaluation(CustomerProfileSid string, params *ListCustomerProfileEvaluationParams) (*ListCustomerProfileEvaluationResponse, error) { - path := "/v1/CustomerProfiles/{CustomerProfileSid}/Evaluations" + path := "/v1/CustomerProfiles/{CustomerProfileSid}/Evaluations" path = strings.Replace(path, "{"+"CustomerProfileSid"+"}", CustomerProfileSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListCustomerProfileEvaluationResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListCustomerProfileEvaluationResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListEndUserParams Optional parameters for the method 'ListEndUser' type ListEndUserParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1277,32 +1236,32 @@ type ListEndUserParams struct { * @param optional nil or *ListEndUserParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListEndUserResponse -*/ + */ func (c *DefaultApiService) ListEndUser(params *ListEndUserParams) (*ListEndUserResponse, error) { - path := "/v1/EndUsers" + path := "/v1/EndUsers" - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListEndUserResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListEndUserResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListEndUserTypeParams Optional parameters for the method 'ListEndUserType' type ListEndUserTypeParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1314,32 +1273,32 @@ type ListEndUserTypeParams struct { * @param optional nil or *ListEndUserTypeParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListEndUserTypeResponse -*/ + */ func (c *DefaultApiService) ListEndUserType(params *ListEndUserTypeParams) (*ListEndUserTypeResponse, error) { - path := "/v1/EndUserTypes" - - data := url.Values{} - headers := 0 + path := "/v1/EndUserTypes" - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListEndUserTypeResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListEndUserTypeResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListPoliciesParams Optional parameters for the method 'ListPolicies' type ListPoliciesParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1351,32 +1310,32 @@ type ListPoliciesParams struct { * @param optional nil or *ListPoliciesParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListPoliciesResponse -*/ + */ func (c *DefaultApiService) ListPolicies(params *ListPoliciesParams) (*ListPoliciesResponse, error) { - path := "/v1/Policies" + path := "/v1/Policies" - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListPoliciesResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListPoliciesResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListSupportingDocumentParams Optional parameters for the method 'ListSupportingDocument' type ListSupportingDocumentParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1388,32 +1347,32 @@ type ListSupportingDocumentParams struct { * @param optional nil or *ListSupportingDocumentParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListSupportingDocumentResponse -*/ + */ func (c *DefaultApiService) ListSupportingDocument(params *ListSupportingDocumentParams) (*ListSupportingDocumentResponse, error) { - path := "/v1/SupportingDocuments" - - data := url.Values{} - headers := 0 + path := "/v1/SupportingDocuments" - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListSupportingDocumentResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListSupportingDocumentResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListSupportingDocumentTypeParams Optional parameters for the method 'ListSupportingDocumentType' type ListSupportingDocumentTypeParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1425,38 +1384,38 @@ type ListSupportingDocumentTypeParams struct { * @param optional nil or *ListSupportingDocumentTypeParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListSupportingDocumentTypeResponse -*/ + */ func (c *DefaultApiService) ListSupportingDocumentType(params *ListSupportingDocumentTypeParams) (*ListSupportingDocumentTypeResponse, error) { - path := "/v1/SupportingDocumentTypes" + path := "/v1/SupportingDocumentTypes" - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListSupportingDocumentTypeResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListSupportingDocumentTypeResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListTrustProductParams Optional parameters for the method 'ListTrustProduct' type ListTrustProductParams struct { - Status *string `json:"Status,omitempty"` + Status *string `json:"Status,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` - PolicySid *string `json:"PolicySid,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PolicySid *string `json:"PolicySid,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -1468,46 +1427,46 @@ type ListTrustProductParams struct { * @param "PolicySid" (string) - The unique string of a policy that is associated to the Customer-Profile resource. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListTrustProductResponse -*/ + */ func (c *DefaultApiService) ListTrustProduct(params *ListTrustProductParams) (*ListTrustProductResponse, error) { - path := "/v1/TrustProducts" + path := "/v1/TrustProducts" - data := url.Values{} - headers := 0 - - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.PolicySid != nil { - data.Set("PolicySid", *params.PolicySid) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.PolicySid != nil { + data.Set("PolicySid", *params.PolicySid) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListTrustProductResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListTrustProductResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListTrustProductChannelEndpointAssignmentParams Optional parameters for the method 'ListTrustProductChannelEndpointAssignment' type ListTrustProductChannelEndpointAssignmentParams struct { - ChannelEndpointSid *string `json:"ChannelEndpointSid,omitempty"` + ChannelEndpointSid *string `json:"ChannelEndpointSid,omitempty"` ChannelEndpointSids *string `json:"ChannelEndpointSids,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -1519,39 +1478,39 @@ type ListTrustProductChannelEndpointAssignmentParams struct { * @param "ChannelEndpointSids" (string) - comma separated list of channel endpoint sids * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListTrustProductChannelEndpointAssignmentResponse -*/ + */ func (c *DefaultApiService) ListTrustProductChannelEndpointAssignment(TrustProductSid string, params *ListTrustProductChannelEndpointAssignmentParams) (*ListTrustProductChannelEndpointAssignmentResponse, error) { - path := "/v1/TrustProducts/{TrustProductSid}/ChannelEndpointAssignments" + path := "/v1/TrustProducts/{TrustProductSid}/ChannelEndpointAssignments" path = strings.Replace(path, "{"+"TrustProductSid"+"}", TrustProductSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.ChannelEndpointSid != nil { - data.Set("ChannelEndpointSid", *params.ChannelEndpointSid) -} - if params != nil && params.ChannelEndpointSids != nil { - data.Set("ChannelEndpointSids", *params.ChannelEndpointSids) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.ChannelEndpointSid != nil { + data.Set("ChannelEndpointSid", *params.ChannelEndpointSid) + } + if params != nil && params.ChannelEndpointSids != nil { + data.Set("ChannelEndpointSids", *params.ChannelEndpointSids) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListTrustProductChannelEndpointAssignmentResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListTrustProductChannelEndpointAssignmentResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListTrustProductEntityAssignmentParams Optional parameters for the method 'ListTrustProductEntityAssignment' type ListTrustProductEntityAssignmentParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1564,33 +1523,33 @@ type ListTrustProductEntityAssignmentParams struct { * @param optional nil or *ListTrustProductEntityAssignmentParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListTrustProductEntityAssignmentResponse -*/ + */ func (c *DefaultApiService) ListTrustProductEntityAssignment(TrustProductSid string, params *ListTrustProductEntityAssignmentParams) (*ListTrustProductEntityAssignmentResponse, error) { - path := "/v1/TrustProducts/{TrustProductSid}/EntityAssignments" + path := "/v1/TrustProducts/{TrustProductSid}/EntityAssignments" path = strings.Replace(path, "{"+"TrustProductSid"+"}", TrustProductSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListTrustProductEntityAssignmentResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListTrustProductEntityAssignmentResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListTrustProductEvaluationParams Optional parameters for the method 'ListTrustProductEvaluation' type ListTrustProductEvaluationParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1603,38 +1562,38 @@ type ListTrustProductEvaluationParams struct { * @param optional nil or *ListTrustProductEvaluationParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListTrustProductEvaluationResponse -*/ + */ func (c *DefaultApiService) ListTrustProductEvaluation(TrustProductSid string, params *ListTrustProductEvaluationParams) (*ListTrustProductEvaluationResponse, error) { - path := "/v1/TrustProducts/{TrustProductSid}/Evaluations" + path := "/v1/TrustProducts/{TrustProductSid}/Evaluations" path = strings.Replace(path, "{"+"TrustProductSid"+"}", TrustProductSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListTrustProductEvaluationResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListTrustProductEvaluationResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateCustomerProfileParams Optional parameters for the method 'UpdateCustomerProfile' type UpdateCustomerProfileParams struct { - Email *string `json:"Email,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Status *string `json:"Status,omitempty"` + Email *string `json:"Email,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Status *string `json:"Status,omitempty"` StatusCallback *string `json:"StatusCallback,omitempty"` } @@ -1648,46 +1607,46 @@ type UpdateCustomerProfileParams struct { * @param "Status" (string) - The verification status of the Customer-Profile resource. * @param "StatusCallback" (string) - The URL we call to inform your application of status changes. * @return TrusthubV1CustomerProfile -*/ + */ func (c *DefaultApiService) UpdateCustomerProfile(Sid string, params *UpdateCustomerProfileParams) (*TrusthubV1CustomerProfile, error) { - path := "/v1/CustomerProfiles/{Sid}" + path := "/v1/CustomerProfiles/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Email != nil { - data.Set("Email", *params.Email) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) -} - if params != nil && params.StatusCallback != nil { - data.Set("StatusCallback", *params.StatusCallback) -} + data := url.Values{} + headers := 0 + if params != nil && params.Email != nil { + data.Set("Email", *params.Email) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &TrusthubV1CustomerProfile{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TrusthubV1CustomerProfile{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateEndUserParams Optional parameters for the method 'UpdateEndUser' type UpdateEndUserParams struct { - Attributes *map[string]interface{} `json:"Attributes,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` + Attributes *map[string]interface{} `json:"Attributes,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` } /* @@ -1698,46 +1657,46 @@ type UpdateEndUserParams struct { * @param "Attributes" (map[string]interface{}) - The set of parameters that are the attributes of the End User resource which are derived End User Types. * @param "FriendlyName" (string) - The string that you assigned to describe the resource. * @return TrusthubV1EndUser -*/ + */ func (c *DefaultApiService) UpdateEndUser(Sid string, params *UpdateEndUserParams) (*TrusthubV1EndUser, error) { - path := "/v1/EndUsers/{Sid}" + path := "/v1/EndUsers/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Attributes != nil { - v, err := json.Marshal(params.Attributes) + if params != nil && params.Attributes != nil { + v, err := json.Marshal(params.Attributes) - if err != nil { - return nil, err - } - - data.Set("Attributes", fmt.Sprint(v)) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} + if err != nil { + return nil, err + } + data.Set("Attributes", fmt.Sprint(v)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &TrusthubV1EndUser{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TrusthubV1EndUser{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateSupportingDocumentParams Optional parameters for the method 'UpdateSupportingDocument' type UpdateSupportingDocumentParams struct { - Attributes *map[string]interface{} `json:"Attributes,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` + Attributes *map[string]interface{} `json:"Attributes,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` } /* @@ -1748,47 +1707,47 @@ type UpdateSupportingDocumentParams struct { * @param "Attributes" (map[string]interface{}) - The set of parameters that are the attributes of the Supporting Document resource which are derived Supporting Document Types. * @param "FriendlyName" (string) - The string that you assigned to describe the resource. * @return TrusthubV1SupportingDocument -*/ + */ func (c *DefaultApiService) UpdateSupportingDocument(Sid string, params *UpdateSupportingDocumentParams) (*TrusthubV1SupportingDocument, error) { - path := "/v1/SupportingDocuments/{Sid}" + path := "/v1/SupportingDocuments/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Attributes != nil { - v, err := json.Marshal(params.Attributes) + data := url.Values{} + headers := 0 - if err != nil { - return nil, err - } + if params != nil && params.Attributes != nil { + v, err := json.Marshal(params.Attributes) - data.Set("Attributes", fmt.Sprint(v)) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} + if err != nil { + return nil, err + } + data.Set("Attributes", fmt.Sprint(v)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &TrusthubV1SupportingDocument{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TrusthubV1SupportingDocument{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateTrustProductParams Optional parameters for the method 'UpdateTrustProduct' type UpdateTrustProductParams struct { - Email *string `json:"Email,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Status *string `json:"Status,omitempty"` + Email *string `json:"Email,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Status *string `json:"Status,omitempty"` StatusCallback *string `json:"StatusCallback,omitempty"` } @@ -1802,39 +1761,38 @@ type UpdateTrustProductParams struct { * @param "Status" (string) - The verification status of the Customer-Profile resource. * @param "StatusCallback" (string) - The URL we call to inform your application of status changes. * @return TrusthubV1TrustProduct -*/ + */ func (c *DefaultApiService) UpdateTrustProduct(Sid string, params *UpdateTrustProductParams) (*TrusthubV1TrustProduct, error) { - path := "/v1/TrustProducts/{Sid}" + path := "/v1/TrustProducts/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Email != nil { - data.Set("Email", *params.Email) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) -} - if params != nil && params.StatusCallback != nil { - data.Set("StatusCallback", *params.StatusCallback) -} + data := url.Values{} + headers := 0 + if params != nil && params.Email != nil { + data.Set("Email", *params.Email) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &TrusthubV1TrustProduct{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &TrusthubV1TrustProduct{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } diff --git a/twilio/rest/trusthub/v1/model_list_customer_profile_channel_endpoint_assignment_response.go b/twilio/rest/trusthub/v1/model_list_customer_profile_channel_endpoint_assignment_response.go index e62ab1f69..9edda7d84 100644 --- a/twilio/rest/trusthub/v1/model_list_customer_profile_channel_endpoint_assignment_response.go +++ b/twilio/rest/trusthub/v1/model_list_customer_profile_channel_endpoint_assignment_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Trusthub - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Trusthub + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListCustomerProfileChannelEndpointAssignmentResponse struct for ListCustomerProfileChannelEndpointAssignmentResponse type ListCustomerProfileChannelEndpointAssignmentResponse struct { - Meta ListCustomerProfileResponseMeta `json:"Meta,omitempty"` + Meta ListCustomerProfileResponseMeta `json:"Meta,omitempty"` Results []TrusthubV1CustomerProfileCustomerProfileChannelEndpointAssignment `json:"Results,omitempty"` } diff --git a/twilio/rest/trusthub/v1/model_list_customer_profile_entity_assignment_response.go b/twilio/rest/trusthub/v1/model_list_customer_profile_entity_assignment_response.go index fb0d866b5..9eed5779b 100644 --- a/twilio/rest/trusthub/v1/model_list_customer_profile_entity_assignment_response.go +++ b/twilio/rest/trusthub/v1/model_list_customer_profile_entity_assignment_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Trusthub - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Trusthub + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListCustomerProfileEntityAssignmentResponse struct for ListCustomerProfileEntityAssignmentResponse type ListCustomerProfileEntityAssignmentResponse struct { - Meta ListCustomerProfileResponseMeta `json:"Meta,omitempty"` + Meta ListCustomerProfileResponseMeta `json:"Meta,omitempty"` Results []TrusthubV1CustomerProfileCustomerProfileEntityAssignment `json:"Results,omitempty"` } diff --git a/twilio/rest/trusthub/v1/model_list_customer_profile_evaluation_response.go b/twilio/rest/trusthub/v1/model_list_customer_profile_evaluation_response.go index 3e97b1d2e..614a3e73f 100644 --- a/twilio/rest/trusthub/v1/model_list_customer_profile_evaluation_response.go +++ b/twilio/rest/trusthub/v1/model_list_customer_profile_evaluation_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Trusthub - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Trusthub + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListCustomerProfileEvaluationResponse struct for ListCustomerProfileEvaluationResponse type ListCustomerProfileEvaluationResponse struct { - Meta ListCustomerProfileResponseMeta `json:"Meta,omitempty"` + Meta ListCustomerProfileResponseMeta `json:"Meta,omitempty"` Results []TrusthubV1CustomerProfileCustomerProfileEvaluation `json:"Results,omitempty"` } diff --git a/twilio/rest/trusthub/v1/model_list_customer_profile_response.go b/twilio/rest/trusthub/v1/model_list_customer_profile_response.go index b22812708..4352b8bd4 100644 --- a/twilio/rest/trusthub/v1/model_list_customer_profile_response.go +++ b/twilio/rest/trusthub/v1/model_list_customer_profile_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Trusthub - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Trusthub + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListCustomerProfileResponse struct for ListCustomerProfileResponse type ListCustomerProfileResponse struct { - Meta ListCustomerProfileResponseMeta `json:"Meta,omitempty"` - Results []TrusthubV1CustomerProfile `json:"Results,omitempty"` + Meta ListCustomerProfileResponseMeta `json:"Meta,omitempty"` + Results []TrusthubV1CustomerProfile `json:"Results,omitempty"` } diff --git a/twilio/rest/trusthub/v1/model_list_customer_profile_response_meta.go b/twilio/rest/trusthub/v1/model_list_customer_profile_response_meta.go index cef58ba5d..038faca18 100644 --- a/twilio/rest/trusthub/v1/model_list_customer_profile_response_meta.go +++ b/twilio/rest/trusthub/v1/model_list_customer_profile_response_meta.go @@ -1,22 +1,23 @@ /* - * Twilio - Trusthub - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Trusthub + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListCustomerProfileResponseMeta struct for ListCustomerProfileResponseMeta type ListCustomerProfileResponseMeta struct { - FirstPageUrl string `json:"FirstPageUrl,omitempty"` - Key string `json:"Key,omitempty"` - NextPageUrl string `json:"NextPageUrl,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` - Url string `json:"Url,omitempty"` + Url string `json:"Url,omitempty"` } diff --git a/twilio/rest/trusthub/v1/model_list_end_user_response.go b/twilio/rest/trusthub/v1/model_list_end_user_response.go index 203972588..44aae522d 100644 --- a/twilio/rest/trusthub/v1/model_list_end_user_response.go +++ b/twilio/rest/trusthub/v1/model_list_end_user_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Trusthub - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Trusthub + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListEndUserResponse struct for ListEndUserResponse type ListEndUserResponse struct { - Meta ListCustomerProfileResponseMeta `json:"Meta,omitempty"` - Results []TrusthubV1EndUser `json:"Results,omitempty"` + Meta ListCustomerProfileResponseMeta `json:"Meta,omitempty"` + Results []TrusthubV1EndUser `json:"Results,omitempty"` } diff --git a/twilio/rest/trusthub/v1/model_list_end_user_type_response.go b/twilio/rest/trusthub/v1/model_list_end_user_type_response.go index 070272117..66fecba23 100644 --- a/twilio/rest/trusthub/v1/model_list_end_user_type_response.go +++ b/twilio/rest/trusthub/v1/model_list_end_user_type_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Trusthub - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Trusthub + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListEndUserTypeResponse struct for ListEndUserTypeResponse type ListEndUserTypeResponse struct { - EndUserTypes []TrusthubV1EndUserType `json:"EndUserTypes,omitempty"` - Meta ListCustomerProfileResponseMeta `json:"Meta,omitempty"` + EndUserTypes []TrusthubV1EndUserType `json:"EndUserTypes,omitempty"` + Meta ListCustomerProfileResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/trusthub/v1/model_list_policies_response.go b/twilio/rest/trusthub/v1/model_list_policies_response.go index cad89617a..be514d219 100644 --- a/twilio/rest/trusthub/v1/model_list_policies_response.go +++ b/twilio/rest/trusthub/v1/model_list_policies_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Trusthub - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Trusthub + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListPoliciesResponse struct for ListPoliciesResponse type ListPoliciesResponse struct { - Meta ListCustomerProfileResponseMeta `json:"Meta,omitempty"` - Results []TrusthubV1Policies `json:"Results,omitempty"` + Meta ListCustomerProfileResponseMeta `json:"Meta,omitempty"` + Results []TrusthubV1Policies `json:"Results,omitempty"` } diff --git a/twilio/rest/trusthub/v1/model_list_supporting_document_response.go b/twilio/rest/trusthub/v1/model_list_supporting_document_response.go index 6323f9c61..9476b4673 100644 --- a/twilio/rest/trusthub/v1/model_list_supporting_document_response.go +++ b/twilio/rest/trusthub/v1/model_list_supporting_document_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Trusthub - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Trusthub + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListSupportingDocumentResponse struct for ListSupportingDocumentResponse type ListSupportingDocumentResponse struct { - Meta ListCustomerProfileResponseMeta `json:"Meta,omitempty"` - Results []TrusthubV1SupportingDocument `json:"Results,omitempty"` + Meta ListCustomerProfileResponseMeta `json:"Meta,omitempty"` + Results []TrusthubV1SupportingDocument `json:"Results,omitempty"` } diff --git a/twilio/rest/trusthub/v1/model_list_supporting_document_type_response.go b/twilio/rest/trusthub/v1/model_list_supporting_document_type_response.go index fc23f67e5..6c7757374 100644 --- a/twilio/rest/trusthub/v1/model_list_supporting_document_type_response.go +++ b/twilio/rest/trusthub/v1/model_list_supporting_document_type_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Trusthub - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Trusthub + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListSupportingDocumentTypeResponse struct for ListSupportingDocumentTypeResponse type ListSupportingDocumentTypeResponse struct { - Meta ListCustomerProfileResponseMeta `json:"Meta,omitempty"` + Meta ListCustomerProfileResponseMeta `json:"Meta,omitempty"` SupportingDocumentTypes []TrusthubV1SupportingDocumentType `json:"SupportingDocumentTypes,omitempty"` } diff --git a/twilio/rest/trusthub/v1/model_list_trust_product_channel_endpoint_assignment_response.go b/twilio/rest/trusthub/v1/model_list_trust_product_channel_endpoint_assignment_response.go index f4c9b0848..080968489 100644 --- a/twilio/rest/trusthub/v1/model_list_trust_product_channel_endpoint_assignment_response.go +++ b/twilio/rest/trusthub/v1/model_list_trust_product_channel_endpoint_assignment_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Trusthub - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Trusthub + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListTrustProductChannelEndpointAssignmentResponse struct for ListTrustProductChannelEndpointAssignmentResponse type ListTrustProductChannelEndpointAssignmentResponse struct { - Meta ListCustomerProfileResponseMeta `json:"Meta,omitempty"` + Meta ListCustomerProfileResponseMeta `json:"Meta,omitempty"` Results []TrusthubV1TrustProductTrustProductChannelEndpointAssignment `json:"Results,omitempty"` } diff --git a/twilio/rest/trusthub/v1/model_list_trust_product_entity_assignment_response.go b/twilio/rest/trusthub/v1/model_list_trust_product_entity_assignment_response.go index fe636a423..a96fcee54 100644 --- a/twilio/rest/trusthub/v1/model_list_trust_product_entity_assignment_response.go +++ b/twilio/rest/trusthub/v1/model_list_trust_product_entity_assignment_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Trusthub - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Trusthub + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListTrustProductEntityAssignmentResponse struct for ListTrustProductEntityAssignmentResponse type ListTrustProductEntityAssignmentResponse struct { - Meta ListCustomerProfileResponseMeta `json:"Meta,omitempty"` + Meta ListCustomerProfileResponseMeta `json:"Meta,omitempty"` Results []TrusthubV1TrustProductTrustProductEntityAssignment `json:"Results,omitempty"` } diff --git a/twilio/rest/trusthub/v1/model_list_trust_product_evaluation_response.go b/twilio/rest/trusthub/v1/model_list_trust_product_evaluation_response.go index 544d6fa93..75d97b930 100644 --- a/twilio/rest/trusthub/v1/model_list_trust_product_evaluation_response.go +++ b/twilio/rest/trusthub/v1/model_list_trust_product_evaluation_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Trusthub - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Trusthub + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListTrustProductEvaluationResponse struct for ListTrustProductEvaluationResponse type ListTrustProductEvaluationResponse struct { - Meta ListCustomerProfileResponseMeta `json:"Meta,omitempty"` + Meta ListCustomerProfileResponseMeta `json:"Meta,omitempty"` Results []TrusthubV1TrustProductTrustProductEvaluation `json:"Results,omitempty"` } diff --git a/twilio/rest/trusthub/v1/model_list_trust_product_response.go b/twilio/rest/trusthub/v1/model_list_trust_product_response.go index 925c968da..f30946612 100644 --- a/twilio/rest/trusthub/v1/model_list_trust_product_response.go +++ b/twilio/rest/trusthub/v1/model_list_trust_product_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Trusthub - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Trusthub + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListTrustProductResponse struct for ListTrustProductResponse type ListTrustProductResponse struct { - Meta ListCustomerProfileResponseMeta `json:"Meta,omitempty"` - Results []TrusthubV1TrustProduct `json:"Results,omitempty"` + Meta ListCustomerProfileResponseMeta `json:"Meta,omitempty"` + Results []TrusthubV1TrustProduct `json:"Results,omitempty"` } diff --git a/twilio/rest/trusthub/v1/model_trusthub_v1_customer_profile.go b/twilio/rest/trusthub/v1/model_trusthub_v1_customer_profile.go index f4db96c85..5f0da972d 100644 --- a/twilio/rest/trusthub/v1/model_trusthub_v1_customer_profile.go +++ b/twilio/rest/trusthub/v1/model_trusthub_v1_customer_profile.go @@ -1,18 +1,20 @@ /* - * Twilio - Trusthub - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Trusthub + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // TrusthubV1CustomerProfile struct for TrusthubV1CustomerProfile type TrusthubV1CustomerProfile struct { // The SID of the Account that created the resource diff --git a/twilio/rest/trusthub/v1/model_trusthub_v1_customer_profile_customer_profile_channel_endpoint_assignment.go b/twilio/rest/trusthub/v1/model_trusthub_v1_customer_profile_customer_profile_channel_endpoint_assignment.go index 6a4d3eb47..849e4b9d2 100644 --- a/twilio/rest/trusthub/v1/model_trusthub_v1_customer_profile_customer_profile_channel_endpoint_assignment.go +++ b/twilio/rest/trusthub/v1/model_trusthub_v1_customer_profile_customer_profile_channel_endpoint_assignment.go @@ -1,18 +1,20 @@ /* - * Twilio - Trusthub - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Trusthub + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // TrusthubV1CustomerProfileCustomerProfileChannelEndpointAssignment struct for TrusthubV1CustomerProfileCustomerProfileChannelEndpointAssignment type TrusthubV1CustomerProfileCustomerProfileChannelEndpointAssignment struct { // The SID of the Account that created the resource diff --git a/twilio/rest/trusthub/v1/model_trusthub_v1_customer_profile_customer_profile_entity_assignment.go b/twilio/rest/trusthub/v1/model_trusthub_v1_customer_profile_customer_profile_entity_assignment.go index 70264ad0a..efdee8f59 100644 --- a/twilio/rest/trusthub/v1/model_trusthub_v1_customer_profile_customer_profile_entity_assignment.go +++ b/twilio/rest/trusthub/v1/model_trusthub_v1_customer_profile_customer_profile_entity_assignment.go @@ -1,18 +1,20 @@ /* - * Twilio - Trusthub - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Trusthub + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // TrusthubV1CustomerProfileCustomerProfileEntityAssignment struct for TrusthubV1CustomerProfileCustomerProfileEntityAssignment type TrusthubV1CustomerProfileCustomerProfileEntityAssignment struct { // The SID of the Account that created the resource diff --git a/twilio/rest/trusthub/v1/model_trusthub_v1_customer_profile_customer_profile_evaluation.go b/twilio/rest/trusthub/v1/model_trusthub_v1_customer_profile_customer_profile_evaluation.go index 0b7ea6a7e..89f015fbf 100644 --- a/twilio/rest/trusthub/v1/model_trusthub_v1_customer_profile_customer_profile_evaluation.go +++ b/twilio/rest/trusthub/v1/model_trusthub_v1_customer_profile_customer_profile_evaluation.go @@ -1,25 +1,27 @@ /* - * Twilio - Trusthub - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Trusthub + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // TrusthubV1CustomerProfileCustomerProfileEvaluation struct for TrusthubV1CustomerProfileCustomerProfileEvaluation type TrusthubV1CustomerProfileCustomerProfileEvaluation struct { // The SID of the Account that created the resource AccountSid *string `json:"AccountSid,omitempty"` // The unique string that identifies the resource - CustomerProfileSid *string `json:"CustomerProfileSid,omitempty"` - DateCreated *time.Time `json:"DateCreated,omitempty"` + CustomerProfileSid *string `json:"CustomerProfileSid,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` // The unique string of a policy PolicySid *string `json:"PolicySid,omitempty"` // The results of the Evaluation resource @@ -28,5 +30,5 @@ type TrusthubV1CustomerProfileCustomerProfileEvaluation struct { Sid *string `json:"Sid,omitempty"` // The compliance status of the Evaluation resource Status *string `json:"Status,omitempty"` - Url *string `json:"Url,omitempty"` + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/trusthub/v1/model_trusthub_v1_end_user.go b/twilio/rest/trusthub/v1/model_trusthub_v1_end_user.go index 6a6bb00af..0f7d6e7c3 100644 --- a/twilio/rest/trusthub/v1/model_trusthub_v1_end_user.go +++ b/twilio/rest/trusthub/v1/model_trusthub_v1_end_user.go @@ -1,18 +1,20 @@ /* - * Twilio - Trusthub - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Trusthub + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // TrusthubV1EndUser struct for TrusthubV1EndUser type TrusthubV1EndUser struct { // The SID of the Account that created the resource diff --git a/twilio/rest/trusthub/v1/model_trusthub_v1_end_user_type.go b/twilio/rest/trusthub/v1/model_trusthub_v1_end_user_type.go index 1084b0122..f48d49e5e 100644 --- a/twilio/rest/trusthub/v1/model_trusthub_v1_end_user_type.go +++ b/twilio/rest/trusthub/v1/model_trusthub_v1_end_user_type.go @@ -1,15 +1,16 @@ /* - * Twilio - Trusthub - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Trusthub + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // TrusthubV1EndUserType struct for TrusthubV1EndUserType type TrusthubV1EndUserType struct { // The required information for creating an End-User. diff --git a/twilio/rest/trusthub/v1/model_trusthub_v1_policies.go b/twilio/rest/trusthub/v1/model_trusthub_v1_policies.go index 2487f87e1..055f57d84 100644 --- a/twilio/rest/trusthub/v1/model_trusthub_v1_policies.go +++ b/twilio/rest/trusthub/v1/model_trusthub_v1_policies.go @@ -1,15 +1,16 @@ /* - * Twilio - Trusthub - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Trusthub + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // TrusthubV1Policies struct for TrusthubV1Policies type TrusthubV1Policies struct { // A human-readable description of the Policy resource diff --git a/twilio/rest/trusthub/v1/model_trusthub_v1_supporting_document.go b/twilio/rest/trusthub/v1/model_trusthub_v1_supporting_document.go index e0f9d6e7e..d690c23bb 100644 --- a/twilio/rest/trusthub/v1/model_trusthub_v1_supporting_document.go +++ b/twilio/rest/trusthub/v1/model_trusthub_v1_supporting_document.go @@ -1,18 +1,20 @@ /* - * Twilio - Trusthub - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Trusthub + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // TrusthubV1SupportingDocument struct for TrusthubV1SupportingDocument type TrusthubV1SupportingDocument struct { // The SID of the Account that created the resource diff --git a/twilio/rest/trusthub/v1/model_trusthub_v1_supporting_document_type.go b/twilio/rest/trusthub/v1/model_trusthub_v1_supporting_document_type.go index 5044aa7f2..353ffa97f 100644 --- a/twilio/rest/trusthub/v1/model_trusthub_v1_supporting_document_type.go +++ b/twilio/rest/trusthub/v1/model_trusthub_v1_supporting_document_type.go @@ -1,15 +1,16 @@ /* - * Twilio - Trusthub - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Trusthub + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // TrusthubV1SupportingDocumentType struct for TrusthubV1SupportingDocumentType type TrusthubV1SupportingDocumentType struct { // The required information for creating a Supporting Document diff --git a/twilio/rest/trusthub/v1/model_trusthub_v1_trust_product.go b/twilio/rest/trusthub/v1/model_trusthub_v1_trust_product.go index 44967c41b..c54c6547a 100644 --- a/twilio/rest/trusthub/v1/model_trusthub_v1_trust_product.go +++ b/twilio/rest/trusthub/v1/model_trusthub_v1_trust_product.go @@ -1,18 +1,20 @@ /* - * Twilio - Trusthub - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Trusthub + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // TrusthubV1TrustProduct struct for TrusthubV1TrustProduct type TrusthubV1TrustProduct struct { // The SID of the Account that created the resource diff --git a/twilio/rest/trusthub/v1/model_trusthub_v1_trust_product_trust_product_channel_endpoint_assignment.go b/twilio/rest/trusthub/v1/model_trusthub_v1_trust_product_trust_product_channel_endpoint_assignment.go index d3c97ba5e..49692db28 100644 --- a/twilio/rest/trusthub/v1/model_trusthub_v1_trust_product_trust_product_channel_endpoint_assignment.go +++ b/twilio/rest/trusthub/v1/model_trusthub_v1_trust_product_trust_product_channel_endpoint_assignment.go @@ -1,18 +1,20 @@ /* - * Twilio - Trusthub - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Trusthub + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // TrusthubV1TrustProductTrustProductChannelEndpointAssignment struct for TrusthubV1TrustProductTrustProductChannelEndpointAssignment type TrusthubV1TrustProductTrustProductChannelEndpointAssignment struct { // The SID of the Account that created the resource diff --git a/twilio/rest/trusthub/v1/model_trusthub_v1_trust_product_trust_product_entity_assignment.go b/twilio/rest/trusthub/v1/model_trusthub_v1_trust_product_trust_product_entity_assignment.go index a52df4cce..183da6793 100644 --- a/twilio/rest/trusthub/v1/model_trusthub_v1_trust_product_trust_product_entity_assignment.go +++ b/twilio/rest/trusthub/v1/model_trusthub_v1_trust_product_trust_product_entity_assignment.go @@ -1,18 +1,20 @@ /* - * Twilio - Trusthub - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Trusthub + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // TrusthubV1TrustProductTrustProductEntityAssignment struct for TrusthubV1TrustProductTrustProductEntityAssignment type TrusthubV1TrustProductTrustProductEntityAssignment struct { // The SID of the Account that created the resource diff --git a/twilio/rest/trusthub/v1/model_trusthub_v1_trust_product_trust_product_evaluation.go b/twilio/rest/trusthub/v1/model_trusthub_v1_trust_product_trust_product_evaluation.go index a11c07404..f6b6269c3 100644 --- a/twilio/rest/trusthub/v1/model_trusthub_v1_trust_product_trust_product_evaluation.go +++ b/twilio/rest/trusthub/v1/model_trusthub_v1_trust_product_trust_product_evaluation.go @@ -1,22 +1,24 @@ /* - * Twilio - Trusthub - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Trusthub + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // TrusthubV1TrustProductTrustProductEvaluation struct for TrusthubV1TrustProductTrustProductEvaluation type TrusthubV1TrustProductTrustProductEvaluation struct { // The SID of the Account that created the resource - AccountSid *string `json:"AccountSid,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` DateCreated *time.Time `json:"DateCreated,omitempty"` // The unique string of a policy PolicySid *string `json:"PolicySid,omitempty"` @@ -28,5 +30,5 @@ type TrusthubV1TrustProductTrustProductEvaluation struct { Status *string `json:"Status,omitempty"` // The unique string that identifies the resource TrustProductSid *string `json:"TrustProductSid,omitempty"` - Url *string `json:"Url,omitempty"` + Url *string `json:"Url,omitempty"` } diff --git a/twilio/rest/verify/v2/api_default.go b/twilio/rest/verify/v2/api_default.go index e991614bc..589c303c8 100644 --- a/twilio/rest/verify/v2/api_default.go +++ b/twilio/rest/verify/v2/api_default.go @@ -1,11 +1,11 @@ /* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,10 +14,11 @@ package openapi import ( "encoding/json" "fmt" - twilio "github.com/twilio/twilio-go/client" "net/url" - "strings" - "time" + "strings" + "time" + + twilio "github.com/twilio/twilio-go/client" ) type DefaultApiService struct { @@ -26,8 +27,8 @@ type DefaultApiService struct { } func NewDefaultApiService(client *twilio.Client) *DefaultApiService { - return &DefaultApiService { - client: client, + return &DefaultApiService{ + client: client, baseURL: "https://verify.twilio.com", } } @@ -35,7 +36,7 @@ func NewDefaultApiService(client *twilio.Client) *DefaultApiService { // CreateAccessTokenParams Optional parameters for the method 'CreateAccessToken' type CreateAccessTokenParams struct { FactorType *string `json:"FactorType,omitempty"` - Identity *string `json:"Identity,omitempty"` + Identity *string `json:"Identity,omitempty"` } /* @@ -46,40 +47,40 @@ type CreateAccessTokenParams struct { * @param "FactorType" (string) - The Type of this Factor. Eg. `push` * @param "Identity" (string) - The unique external identifier for the Entity of the Service. This identifier should be immutable, not PII, and generated by your external system, such as your user's UUID, GUID, or SID. * @return VerifyV2ServiceAccessToken -*/ + */ func (c *DefaultApiService) CreateAccessToken(ServiceSid string, params *CreateAccessTokenParams) (*VerifyV2ServiceAccessToken, error) { - path := "/v2/Services/{ServiceSid}/AccessTokens" + path := "/v2/Services/{ServiceSid}/AccessTokens" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.FactorType != nil { - data.Set("FactorType", *params.FactorType) -} - if params != nil && params.Identity != nil { - data.Set("Identity", *params.Identity) -} + data := url.Values{} + headers := 0 + if params != nil && params.FactorType != nil { + data.Set("FactorType", *params.FactorType) + } + if params != nil && params.Identity != nil { + data.Set("Identity", *params.Identity) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &VerifyV2ServiceAccessToken{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VerifyV2ServiceAccessToken{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateBucketParams Optional parameters for the method 'CreateBucket' type CreateBucketParams struct { Interval *int32 `json:"Interval,omitempty"` - Max *int32 `json:"Max,omitempty"` + Max *int32 `json:"Max,omitempty"` } /* @@ -91,44 +92,44 @@ type CreateBucketParams struct { * @param "Interval" (int32) - Number of seconds that the rate limit will be enforced over. * @param "Max" (int32) - Maximum number of requests permitted in during the interval. * @return VerifyV2ServiceRateLimitBucket -*/ + */ func (c *DefaultApiService) CreateBucket(ServiceSid string, RateLimitSid string, params *CreateBucketParams) (*VerifyV2ServiceRateLimitBucket, error) { - path := "/v2/Services/{ServiceSid}/RateLimits/{RateLimitSid}/Buckets" + path := "/v2/Services/{ServiceSid}/RateLimits/{RateLimitSid}/Buckets" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"RateLimitSid"+"}", RateLimitSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Interval != nil { - data.Set("Interval", fmt.Sprint(*params.Interval)) -} - if params != nil && params.Max != nil { - data.Set("Max", fmt.Sprint(*params.Max)) -} + data := url.Values{} + headers := 0 + if params != nil && params.Interval != nil { + data.Set("Interval", fmt.Sprint(*params.Interval)) + } + if params != nil && params.Max != nil { + data.Set("Max", fmt.Sprint(*params.Max)) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &VerifyV2ServiceRateLimitBucket{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VerifyV2ServiceRateLimitBucket{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateChallengeParams Optional parameters for the method 'CreateChallenge' type CreateChallengeParams struct { - DetailsFields *[]map[string]interface{} `json:"Details.Fields,omitempty"` - DetailsMessage *string `json:"Details.Message,omitempty"` - ExpirationDate *time.Time `json:"ExpirationDate,omitempty"` - FactorSid *string `json:"FactorSid,omitempty"` - HiddenDetails *map[string]interface{} `json:"HiddenDetails,omitempty"` + DetailsFields *[]map[string]interface{} `json:"Details.Fields,omitempty"` + DetailsMessage *string `json:"Details.Message,omitempty"` + ExpirationDate *time.Time `json:"ExpirationDate,omitempty"` + FactorSid *string `json:"FactorSid,omitempty"` + HiddenDetails *map[string]interface{} `json:"HiddenDetails,omitempty"` } /* @@ -143,58 +144,58 @@ type CreateChallengeParams struct { * @param "FactorSid" (string) - The unique SID identifier of the Factor. * @param "HiddenDetails" (map[string]interface{}) - Details provided to give context about the Challenge. Not shown to the end user. It must be a stringified JSON with only strings values eg. `{\\\"ip\\\": \\\"172.168.1.234\\\"}` * @return VerifyV2ServiceEntityChallenge -*/ + */ func (c *DefaultApiService) CreateChallenge(ServiceSid string, Identity string, params *CreateChallengeParams) (*VerifyV2ServiceEntityChallenge, error) { - path := "/v2/Services/{ServiceSid}/Entities/{Identity}/Challenges" + path := "/v2/Services/{ServiceSid}/Entities/{Identity}/Challenges" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.DetailsFields != nil { - v, err := json.Marshal(params.DetailsFields) + data := url.Values{} + headers := 0 - if err != nil { - return nil, err - } + if params != nil && params.DetailsFields != nil { + v, err := json.Marshal(params.DetailsFields) - data.Set("DetailsFields", fmt.Sprint(v)) -} - if params != nil && params.DetailsMessage != nil { - data.Set("DetailsMessage", *params.DetailsMessage) -} - if params != nil && params.ExpirationDate != nil { - data.Set("ExpirationDate", fmt.Sprint(*params.ExpirationDate)) -} - if params != nil && params.FactorSid != nil { - data.Set("FactorSid", *params.FactorSid) -} - if params != nil && params.HiddenDetails != nil { - v, err := json.Marshal(params.HiddenDetails) + if err != nil { + return nil, err + } - if err != nil { - return nil, err + data.Set("DetailsFields", fmt.Sprint(v)) + } + if params != nil && params.DetailsMessage != nil { + data.Set("DetailsMessage", *params.DetailsMessage) + } + if params != nil && params.ExpirationDate != nil { + data.Set("ExpirationDate", fmt.Sprint(*params.ExpirationDate)) + } + if params != nil && params.FactorSid != nil { + data.Set("FactorSid", *params.FactorSid) } + if params != nil && params.HiddenDetails != nil { + v, err := json.Marshal(params.HiddenDetails) - data.Set("HiddenDetails", fmt.Sprint(v)) -} + if err != nil { + return nil, err + } + data.Set("HiddenDetails", fmt.Sprint(v)) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &VerifyV2ServiceEntityChallenge{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VerifyV2ServiceEntityChallenge{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateEntityParams Optional parameters for the method 'CreateEntity' type CreateEntityParams struct { Identity *string `json:"Identity,omitempty"` @@ -207,43 +208,43 @@ type CreateEntityParams struct { * @param optional nil or *CreateEntityParams - Optional Parameters: * @param "Identity" (string) - The unique external identifier for the Entity of the Service. This identifier should be immutable, not PII, length between 8 and 64 characters, and generated by your external system, such as your user's UUID, GUID, or SID. * @return VerifyV2ServiceEntity -*/ + */ func (c *DefaultApiService) CreateEntity(ServiceSid string, params *CreateEntityParams) (*VerifyV2ServiceEntity, error) { - path := "/v2/Services/{ServiceSid}/Entities" + path := "/v2/Services/{ServiceSid}/Entities" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Identity != nil { - data.Set("Identity", *params.Identity) -} + data := url.Values{} + headers := 0 + if params != nil && params.Identity != nil { + data.Set("Identity", *params.Identity) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &VerifyV2ServiceEntity{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VerifyV2ServiceEntity{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateFactorParams Optional parameters for the method 'CreateFactor' type CreateFactorParams struct { - BindingAlg *string `json:"Binding.Alg,omitempty"` - BindingPublicKey *string `json:"Binding.PublicKey,omitempty"` - ConfigAppId *string `json:"Config.AppId,omitempty"` + BindingAlg *string `json:"Binding.Alg,omitempty"` + BindingPublicKey *string `json:"Binding.PublicKey,omitempty"` + ConfigAppId *string `json:"Config.AppId,omitempty"` ConfigNotificationPlatform *string `json:"Config.NotificationPlatform,omitempty"` - ConfigNotificationToken *string `json:"Config.NotificationToken,omitempty"` - ConfigSdkVersion *string `json:"Config.SdkVersion,omitempty"` - FactorType *string `json:"FactorType,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` + ConfigNotificationToken *string `json:"Config.NotificationToken,omitempty"` + ConfigSdkVersion *string `json:"Config.SdkVersion,omitempty"` + FactorType *string `json:"FactorType,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` } /* @@ -261,58 +262,58 @@ type CreateFactorParams struct { * @param "FactorType" (string) - The Type of this Factor. Currently only `push` is supported * @param "FriendlyName" (string) - The friendly name of this Factor * @return VerifyV2ServiceEntityFactor -*/ + */ func (c *DefaultApiService) CreateFactor(ServiceSid string, Identity string, params *CreateFactorParams) (*VerifyV2ServiceEntityFactor, error) { - path := "/v2/Services/{ServiceSid}/Entities/{Identity}/Factors" + path := "/v2/Services/{ServiceSid}/Entities/{Identity}/Factors" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.BindingAlg != nil { - data.Set("BindingAlg", *params.BindingAlg) -} - if params != nil && params.BindingPublicKey != nil { - data.Set("BindingPublicKey", *params.BindingPublicKey) -} - if params != nil && params.ConfigAppId != nil { - data.Set("ConfigAppId", *params.ConfigAppId) -} - if params != nil && params.ConfigNotificationPlatform != nil { - data.Set("ConfigNotificationPlatform", *params.ConfigNotificationPlatform) -} - if params != nil && params.ConfigNotificationToken != nil { - data.Set("ConfigNotificationToken", *params.ConfigNotificationToken) -} - if params != nil && params.ConfigSdkVersion != nil { - data.Set("ConfigSdkVersion", *params.ConfigSdkVersion) -} - if params != nil && params.FactorType != nil { - data.Set("FactorType", *params.FactorType) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} + data := url.Values{} + headers := 0 + if params != nil && params.BindingAlg != nil { + data.Set("BindingAlg", *params.BindingAlg) + } + if params != nil && params.BindingPublicKey != nil { + data.Set("BindingPublicKey", *params.BindingPublicKey) + } + if params != nil && params.ConfigAppId != nil { + data.Set("ConfigAppId", *params.ConfigAppId) + } + if params != nil && params.ConfigNotificationPlatform != nil { + data.Set("ConfigNotificationPlatform", *params.ConfigNotificationPlatform) + } + if params != nil && params.ConfigNotificationToken != nil { + data.Set("ConfigNotificationToken", *params.ConfigNotificationToken) + } + if params != nil && params.ConfigSdkVersion != nil { + data.Set("ConfigSdkVersion", *params.ConfigSdkVersion) + } + if params != nil && params.FactorType != nil { + data.Set("FactorType", *params.FactorType) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &VerifyV2ServiceEntityFactor{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VerifyV2ServiceEntityFactor{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateMessagingConfigurationParams Optional parameters for the method 'CreateMessagingConfiguration' type CreateMessagingConfigurationParams struct { - Country *string `json:"Country,omitempty"` + Country *string `json:"Country,omitempty"` MessagingServiceSid *string `json:"MessagingServiceSid,omitempty"` } @@ -324,40 +325,40 @@ type CreateMessagingConfigurationParams struct { * @param "Country" (string) - The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country this configuration will be applied to. If this is a global configuration, Country will take the value `all`. * @param "MessagingServiceSid" (string) - The SID of the [Messaging Service](https://www.twilio.com/docs/sms/services/api) to be used to send SMS to the country of this configuration. * @return VerifyV2ServiceMessagingConfiguration -*/ + */ func (c *DefaultApiService) CreateMessagingConfiguration(ServiceSid string, params *CreateMessagingConfigurationParams) (*VerifyV2ServiceMessagingConfiguration, error) { - path := "/v2/Services/{ServiceSid}/MessagingConfigurations" + path := "/v2/Services/{ServiceSid}/MessagingConfigurations" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Country != nil { - data.Set("Country", *params.Country) -} - if params != nil && params.MessagingServiceSid != nil { - data.Set("MessagingServiceSid", *params.MessagingServiceSid) -} + data := url.Values{} + headers := 0 + if params != nil && params.Country != nil { + data.Set("Country", *params.Country) + } + if params != nil && params.MessagingServiceSid != nil { + data.Set("MessagingServiceSid", *params.MessagingServiceSid) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &VerifyV2ServiceMessagingConfiguration{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VerifyV2ServiceMessagingConfiguration{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateRateLimitParams Optional parameters for the method 'CreateRateLimit' type CreateRateLimitParams struct { Description *string `json:"Description,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` } /* @@ -368,50 +369,50 @@ type CreateRateLimitParams struct { * @param "Description" (string) - Description of this Rate Limit * @param "UniqueName" (string) - Provides a unique and addressable name to be assigned to this Rate Limit, assigned by the developer, to be optionally used in addition to SID. **This value should not contain PII.** * @return VerifyV2ServiceRateLimit -*/ + */ func (c *DefaultApiService) CreateRateLimit(ServiceSid string, params *CreateRateLimitParams) (*VerifyV2ServiceRateLimit, error) { - path := "/v2/Services/{ServiceSid}/RateLimits" + path := "/v2/Services/{ServiceSid}/RateLimits" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Description != nil { - data.Set("Description", *params.Description) -} - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) -} + data := url.Values{} + headers := 0 + if params != nil && params.Description != nil { + data.Set("Description", *params.Description) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &VerifyV2ServiceRateLimit{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VerifyV2ServiceRateLimit{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateServiceParams Optional parameters for the method 'CreateService' type CreateServiceParams struct { - CodeLength *int32 `json:"CodeLength,omitempty"` - CustomCodeEnabled *bool `json:"CustomCodeEnabled,omitempty"` - DoNotShareWarningEnabled *bool `json:"DoNotShareWarningEnabled,omitempty"` - DtmfInputRequired *bool `json:"DtmfInputRequired,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - LookupEnabled *bool `json:"LookupEnabled,omitempty"` - Psd2Enabled *bool `json:"Psd2Enabled,omitempty"` - PushApnCredentialSid *string `json:"Push.ApnCredentialSid,omitempty"` - PushFcmCredentialSid *string `json:"Push.FcmCredentialSid,omitempty"` - PushIncludeDate *bool `json:"Push.IncludeDate,omitempty"` - SkipSmsToLandlines *bool `json:"SkipSmsToLandlines,omitempty"` - TtsName *string `json:"TtsName,omitempty"` + CodeLength *int32 `json:"CodeLength,omitempty"` + CustomCodeEnabled *bool `json:"CustomCodeEnabled,omitempty"` + DoNotShareWarningEnabled *bool `json:"DoNotShareWarningEnabled,omitempty"` + DtmfInputRequired *bool `json:"DtmfInputRequired,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + LookupEnabled *bool `json:"LookupEnabled,omitempty"` + Psd2Enabled *bool `json:"Psd2Enabled,omitempty"` + PushApnCredentialSid *string `json:"Push.ApnCredentialSid,omitempty"` + PushFcmCredentialSid *string `json:"Push.FcmCredentialSid,omitempty"` + PushIncludeDate *bool `json:"Push.IncludeDate,omitempty"` + SkipSmsToLandlines *bool `json:"SkipSmsToLandlines,omitempty"` + TtsName *string `json:"TtsName,omitempty"` } /* @@ -431,79 +432,79 @@ type CreateServiceParams struct { * @param "SkipSmsToLandlines" (bool) - Whether to skip sending SMS verifications to landlines. Requires `lookup_enabled`. * @param "TtsName" (string) - The name of an alternative text-to-speech service to use in phone calls. Applies only to TTS languages. * @return VerifyV2Service -*/ + */ func (c *DefaultApiService) CreateService(params *CreateServiceParams) (*VerifyV2Service, error) { - path := "/v2/Services" + path := "/v2/Services" - data := url.Values{} - headers := 0 - - if params != nil && params.CodeLength != nil { - data.Set("CodeLength", fmt.Sprint(*params.CodeLength)) -} - if params != nil && params.CustomCodeEnabled != nil { - data.Set("CustomCodeEnabled", fmt.Sprint(*params.CustomCodeEnabled)) -} - if params != nil && params.DoNotShareWarningEnabled != nil { - data.Set("DoNotShareWarningEnabled", fmt.Sprint(*params.DoNotShareWarningEnabled)) -} - if params != nil && params.DtmfInputRequired != nil { - data.Set("DtmfInputRequired", fmt.Sprint(*params.DtmfInputRequired)) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.LookupEnabled != nil { - data.Set("LookupEnabled", fmt.Sprint(*params.LookupEnabled)) -} - if params != nil && params.Psd2Enabled != nil { - data.Set("Psd2Enabled", fmt.Sprint(*params.Psd2Enabled)) -} - if params != nil && params.PushApnCredentialSid != nil { - data.Set("PushApnCredentialSid", *params.PushApnCredentialSid) -} - if params != nil && params.PushFcmCredentialSid != nil { - data.Set("PushFcmCredentialSid", *params.PushFcmCredentialSid) -} - if params != nil && params.PushIncludeDate != nil { - data.Set("PushIncludeDate", fmt.Sprint(*params.PushIncludeDate)) -} - if params != nil && params.SkipSmsToLandlines != nil { - data.Set("SkipSmsToLandlines", fmt.Sprint(*params.SkipSmsToLandlines)) -} - if params != nil && params.TtsName != nil { - data.Set("TtsName", *params.TtsName) -} + data := url.Values{} + headers := 0 + if params != nil && params.CodeLength != nil { + data.Set("CodeLength", fmt.Sprint(*params.CodeLength)) + } + if params != nil && params.CustomCodeEnabled != nil { + data.Set("CustomCodeEnabled", fmt.Sprint(*params.CustomCodeEnabled)) + } + if params != nil && params.DoNotShareWarningEnabled != nil { + data.Set("DoNotShareWarningEnabled", fmt.Sprint(*params.DoNotShareWarningEnabled)) + } + if params != nil && params.DtmfInputRequired != nil { + data.Set("DtmfInputRequired", fmt.Sprint(*params.DtmfInputRequired)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.LookupEnabled != nil { + data.Set("LookupEnabled", fmt.Sprint(*params.LookupEnabled)) + } + if params != nil && params.Psd2Enabled != nil { + data.Set("Psd2Enabled", fmt.Sprint(*params.Psd2Enabled)) + } + if params != nil && params.PushApnCredentialSid != nil { + data.Set("PushApnCredentialSid", *params.PushApnCredentialSid) + } + if params != nil && params.PushFcmCredentialSid != nil { + data.Set("PushFcmCredentialSid", *params.PushFcmCredentialSid) + } + if params != nil && params.PushIncludeDate != nil { + data.Set("PushIncludeDate", fmt.Sprint(*params.PushIncludeDate)) + } + if params != nil && params.SkipSmsToLandlines != nil { + data.Set("SkipSmsToLandlines", fmt.Sprint(*params.SkipSmsToLandlines)) + } + if params != nil && params.TtsName != nil { + data.Set("TtsName", *params.TtsName) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &VerifyV2Service{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VerifyV2Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateVerificationParams Optional parameters for the method 'CreateVerification' type CreateVerificationParams struct { - Amount *string `json:"Amount,omitempty"` - AppHash *string `json:"AppHash,omitempty"` - Channel *string `json:"Channel,omitempty"` + Amount *string `json:"Amount,omitempty"` + AppHash *string `json:"AppHash,omitempty"` + Channel *string `json:"Channel,omitempty"` ChannelConfiguration *map[string]interface{} `json:"ChannelConfiguration,omitempty"` - CustomCode *string `json:"CustomCode,omitempty"` - CustomFriendlyName *string `json:"CustomFriendlyName,omitempty"` - CustomMessage *string `json:"CustomMessage,omitempty"` - Locale *string `json:"Locale,omitempty"` - Payee *string `json:"Payee,omitempty"` - RateLimits *map[string]interface{} `json:"RateLimits,omitempty"` - SendDigits *string `json:"SendDigits,omitempty"` - To *string `json:"To,omitempty"` + CustomCode *string `json:"CustomCode,omitempty"` + CustomFriendlyName *string `json:"CustomFriendlyName,omitempty"` + CustomMessage *string `json:"CustomMessage,omitempty"` + Locale *string `json:"Locale,omitempty"` + Payee *string `json:"Payee,omitempty"` + RateLimits *map[string]interface{} `json:"RateLimits,omitempty"` + SendDigits *string `json:"SendDigits,omitempty"` + To *string `json:"To,omitempty"` } /* @@ -524,84 +525,84 @@ type CreateVerificationParams struct { * @param "SendDigits" (string) - The digits to send after a phone call is answered, for example, to dial an extension. For more information, see the Programmable Voice documentation of [sendDigits](https://www.twilio.com/docs/voice/twiml/number#attributes-sendDigits). * @param "To" (string) - The phone number or [email](https://www.twilio.com/docs/verify/email) to verify. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164). * @return VerifyV2ServiceVerification -*/ + */ func (c *DefaultApiService) CreateVerification(ServiceSid string, params *CreateVerificationParams) (*VerifyV2ServiceVerification, error) { - path := "/v2/Services/{ServiceSid}/Verifications" + path := "/v2/Services/{ServiceSid}/Verifications" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Amount != nil { - data.Set("Amount", *params.Amount) -} - if params != nil && params.AppHash != nil { - data.Set("AppHash", *params.AppHash) -} - if params != nil && params.Channel != nil { - data.Set("Channel", *params.Channel) -} - if params != nil && params.ChannelConfiguration != nil { - v, err := json.Marshal(params.ChannelConfiguration) + data := url.Values{} + headers := 0 - if err != nil { - return nil, err + if params != nil && params.Amount != nil { + data.Set("Amount", *params.Amount) + } + if params != nil && params.AppHash != nil { + data.Set("AppHash", *params.AppHash) } + if params != nil && params.Channel != nil { + data.Set("Channel", *params.Channel) + } + if params != nil && params.ChannelConfiguration != nil { + v, err := json.Marshal(params.ChannelConfiguration) - data.Set("ChannelConfiguration", fmt.Sprint(v)) -} - if params != nil && params.CustomCode != nil { - data.Set("CustomCode", *params.CustomCode) -} - if params != nil && params.CustomFriendlyName != nil { - data.Set("CustomFriendlyName", *params.CustomFriendlyName) -} - if params != nil && params.CustomMessage != nil { - data.Set("CustomMessage", *params.CustomMessage) -} - if params != nil && params.Locale != nil { - data.Set("Locale", *params.Locale) -} - if params != nil && params.Payee != nil { - data.Set("Payee", *params.Payee) -} - if params != nil && params.RateLimits != nil { - v, err := json.Marshal(params.RateLimits) + if err != nil { + return nil, err + } - if err != nil { - return nil, err + data.Set("ChannelConfiguration", fmt.Sprint(v)) + } + if params != nil && params.CustomCode != nil { + data.Set("CustomCode", *params.CustomCode) + } + if params != nil && params.CustomFriendlyName != nil { + data.Set("CustomFriendlyName", *params.CustomFriendlyName) + } + if params != nil && params.CustomMessage != nil { + data.Set("CustomMessage", *params.CustomMessage) } + if params != nil && params.Locale != nil { + data.Set("Locale", *params.Locale) + } + if params != nil && params.Payee != nil { + data.Set("Payee", *params.Payee) + } + if params != nil && params.RateLimits != nil { + v, err := json.Marshal(params.RateLimits) - data.Set("RateLimits", fmt.Sprint(v)) -} - if params != nil && params.SendDigits != nil { - data.Set("SendDigits", *params.SendDigits) -} - if params != nil && params.To != nil { - data.Set("To", *params.To) -} + if err != nil { + return nil, err + } + data.Set("RateLimits", fmt.Sprint(v)) + } + if params != nil && params.SendDigits != nil { + data.Set("SendDigits", *params.SendDigits) + } + if params != nil && params.To != nil { + data.Set("To", *params.To) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &VerifyV2ServiceVerification{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VerifyV2ServiceVerification{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateVerificationCheckParams Optional parameters for the method 'CreateVerificationCheck' type CreateVerificationCheckParams struct { - Amount *string `json:"Amount,omitempty"` - Code *string `json:"Code,omitempty"` - Payee *string `json:"Payee,omitempty"` - To *string `json:"To,omitempty"` + Amount *string `json:"Amount,omitempty"` + Code *string `json:"Code,omitempty"` + Payee *string `json:"Payee,omitempty"` + To *string `json:"To,omitempty"` VerificationSid *string `json:"VerificationSid,omitempty"` } @@ -616,51 +617,51 @@ type CreateVerificationCheckParams struct { * @param "To" (string) - The phone number or [email](https://www.twilio.com/docs/verify/email) to verify. Either this parameter or the `verification_sid` must be specified. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164). * @param "VerificationSid" (string) - A SID that uniquely identifies the Verification Check. Either this parameter or the `to` phone number/[email](https://www.twilio.com/docs/verify/email) must be specified. * @return VerifyV2ServiceVerificationCheck -*/ + */ func (c *DefaultApiService) CreateVerificationCheck(ServiceSid string, params *CreateVerificationCheckParams) (*VerifyV2ServiceVerificationCheck, error) { - path := "/v2/Services/{ServiceSid}/VerificationCheck" + path := "/v2/Services/{ServiceSid}/VerificationCheck" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Amount != nil { - data.Set("Amount", *params.Amount) -} - if params != nil && params.Code != nil { - data.Set("Code", *params.Code) -} - if params != nil && params.Payee != nil { - data.Set("Payee", *params.Payee) -} - if params != nil && params.To != nil { - data.Set("To", *params.To) -} - if params != nil && params.VerificationSid != nil { - data.Set("VerificationSid", *params.VerificationSid) -} + data := url.Values{} + headers := 0 + if params != nil && params.Amount != nil { + data.Set("Amount", *params.Amount) + } + if params != nil && params.Code != nil { + data.Set("Code", *params.Code) + } + if params != nil && params.Payee != nil { + data.Set("Payee", *params.Payee) + } + if params != nil && params.To != nil { + data.Set("To", *params.To) + } + if params != nil && params.VerificationSid != nil { + data.Set("VerificationSid", *params.VerificationSid) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &VerifyV2ServiceVerificationCheck{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VerifyV2ServiceVerificationCheck{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateWebhookParams Optional parameters for the method 'CreateWebhook' type CreateWebhookParams struct { - EventTypes *[]string `json:"EventTypes,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Status *string `json:"Status,omitempty"` - WebhookUrl *string `json:"WebhookUrl,omitempty"` + EventTypes *[]string `json:"EventTypes,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Status *string `json:"Status,omitempty"` + WebhookUrl *string `json:"WebhookUrl,omitempty"` } /* @@ -673,41 +674,40 @@ type CreateWebhookParams struct { * @param "Status" (string) - The webhook status. Default value is `enabled`. One of: `enabled` or `disabled` * @param "WebhookUrl" (string) - The URL associated with this Webhook. * @return VerifyV2ServiceWebhook -*/ + */ func (c *DefaultApiService) CreateWebhook(ServiceSid string, params *CreateWebhookParams) (*VerifyV2ServiceWebhook, error) { - path := "/v2/Services/{ServiceSid}/Webhooks" + path := "/v2/Services/{ServiceSid}/Webhooks" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.EventTypes != nil { - data.Set("EventTypes", strings.Join(*params.EventTypes, ",")) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) -} - if params != nil && params.WebhookUrl != nil { - data.Set("WebhookUrl", *params.WebhookUrl) -} + data := url.Values{} + headers := 0 + if params != nil && params.EventTypes != nil { + data.Set("EventTypes", strings.Join(*params.EventTypes, ",")) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + if params != nil && params.WebhookUrl != nil { + data.Set("WebhookUrl", *params.WebhookUrl) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &VerifyV2ServiceWebhook{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VerifyV2ServiceWebhook{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -716,26 +716,24 @@ func (c *DefaultApiService) CreateWebhook(ServiceSid string, params *CreateWebho * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/verify/api/service) the resource is associated with. * @param RateLimitSid The Twilio-provided string that uniquely identifies the Rate Limit resource. * @param Sid A 34 character string that uniquely identifies this Bucket. -*/ -func (c *DefaultApiService) DeleteBucket(ServiceSid string, RateLimitSid string, Sid string, ) (error) { - path := "/v2/Services/{ServiceSid}/RateLimits/{RateLimitSid}/Buckets/{Sid}" + */ +func (c *DefaultApiService) DeleteBucket(ServiceSid string, RateLimitSid string, Sid string) error { + path := "/v2/Services/{ServiceSid}/RateLimits/{RateLimitSid}/Buckets/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"RateLimitSid"+"}", RateLimitSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -743,25 +741,23 @@ func (c *DefaultApiService) DeleteBucket(ServiceSid string, RateLimitSid string, * Delete a specific Entity. * @param ServiceSid The unique SID identifier of the Service. * @param Identity The unique external identifier for the Entity of the Service -*/ -func (c *DefaultApiService) DeleteEntity(ServiceSid string, Identity string, ) (error) { - path := "/v2/Services/{ServiceSid}/Entities/{Identity}" + */ +func (c *DefaultApiService) DeleteEntity(ServiceSid string, Identity string) error { + path := "/v2/Services/{ServiceSid}/Entities/{Identity}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -770,26 +766,24 @@ func (c *DefaultApiService) DeleteEntity(ServiceSid string, Identity string, ) ( * @param ServiceSid The unique SID identifier of the Service. * @param Identity Customer unique identity for the Entity owner of the Factor * @param Sid A 34 character string that uniquely identifies this Factor. -*/ -func (c *DefaultApiService) DeleteFactor(ServiceSid string, Identity string, Sid string, ) (error) { - path := "/v2/Services/{ServiceSid}/Entities/{Identity}/Factors/{Sid}" + */ +func (c *DefaultApiService) DeleteFactor(ServiceSid string, Identity string, Sid string) error { + path := "/v2/Services/{ServiceSid}/Entities/{Identity}/Factors/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + defer resp.Body.Close() - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() - - return nil + return nil } /* @@ -797,25 +791,23 @@ func (c *DefaultApiService) DeleteFactor(ServiceSid string, Identity string, Sid * Delete a specific MessagingConfiguration. * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/verify/api/service) that the resource is associated with. * @param Country The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country this configuration will be applied to. If this is a global configuration, Country will take the value `all`. -*/ -func (c *DefaultApiService) DeleteMessagingConfiguration(ServiceSid string, Country string, ) (error) { - path := "/v2/Services/{ServiceSid}/MessagingConfigurations/{Country}" + */ +func (c *DefaultApiService) DeleteMessagingConfiguration(ServiceSid string, Country string) error { + path := "/v2/Services/{ServiceSid}/MessagingConfigurations/{Country}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Country"+"}", Country, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -823,49 +815,45 @@ func (c *DefaultApiService) DeleteMessagingConfiguration(ServiceSid string, Coun * Delete a specific Rate Limit. * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/verify/api/service) the resource is associated with. * @param Sid The Twilio-provided string that uniquely identifies the Rate Limit resource to fetch. -*/ -func (c *DefaultApiService) DeleteRateLimit(ServiceSid string, Sid string, ) (error) { - path := "/v2/Services/{ServiceSid}/RateLimits/{Sid}" + */ +func (c *DefaultApiService) DeleteRateLimit(ServiceSid string, Sid string) error { + path := "/v2/Services/{ServiceSid}/RateLimits/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* * DeleteService Method for DeleteService * Delete a specific Verification Service Instance. * @param Sid The Twilio-provided string that uniquely identifies the Verification Service resource to delete. -*/ -func (c *DefaultApiService) DeleteService(Sid string, ) (error) { - path := "/v2/Services/{Sid}" + */ +func (c *DefaultApiService) DeleteService(Sid string) error { + path := "/v2/Services/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* @@ -873,25 +861,23 @@ func (c *DefaultApiService) DeleteService(Sid string, ) (error) { * Delete a specific Webhook. * @param ServiceSid The unique SID identifier of the Service. * @param Sid The Twilio-provided string that uniquely identifies the Webhook resource to delete. -*/ -func (c *DefaultApiService) DeleteWebhook(ServiceSid string, Sid string, ) (error) { - path := "/v2/Services/{ServiceSid}/Webhooks/{Sid}" + */ +func (c *DefaultApiService) DeleteWebhook(ServiceSid string, Sid string) error { + path := "/v2/Services/{ServiceSid}/Webhooks/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + defer resp.Body.Close() - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() - - return nil + return nil } /* @@ -901,31 +887,29 @@ func (c *DefaultApiService) DeleteWebhook(ServiceSid string, Sid string, ) (erro * @param RateLimitSid The Twilio-provided string that uniquely identifies the Rate Limit resource. * @param Sid A 34 character string that uniquely identifies this Bucket. * @return VerifyV2ServiceRateLimitBucket -*/ -func (c *DefaultApiService) FetchBucket(ServiceSid string, RateLimitSid string, Sid string, ) (*VerifyV2ServiceRateLimitBucket, error) { - path := "/v2/Services/{ServiceSid}/RateLimits/{RateLimitSid}/Buckets/{Sid}" + */ +func (c *DefaultApiService) FetchBucket(ServiceSid string, RateLimitSid string, Sid string) (*VerifyV2ServiceRateLimitBucket, error) { + path := "/v2/Services/{ServiceSid}/RateLimits/{RateLimitSid}/Buckets/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"RateLimitSid"+"}", RateLimitSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &VerifyV2ServiceRateLimitBucket{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VerifyV2ServiceRateLimitBucket{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -935,31 +919,29 @@ func (c *DefaultApiService) FetchBucket(ServiceSid string, RateLimitSid string, * @param Identity The unique external identifier for the Entity of the Service. This identifier should be immutable, not PII, and generated by your external system, such as your user's UUID, GUID, or SID. * @param Sid A 34 character string that uniquely identifies this Challenge. * @return VerifyV2ServiceEntityChallenge -*/ -func (c *DefaultApiService) FetchChallenge(ServiceSid string, Identity string, Sid string, ) (*VerifyV2ServiceEntityChallenge, error) { - path := "/v2/Services/{ServiceSid}/Entities/{Identity}/Challenges/{Sid}" + */ +func (c *DefaultApiService) FetchChallenge(ServiceSid string, Identity string, Sid string) (*VerifyV2ServiceEntityChallenge, error) { + path := "/v2/Services/{ServiceSid}/Entities/{Identity}/Challenges/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &VerifyV2ServiceEntityChallenge{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VerifyV2ServiceEntityChallenge{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -968,30 +950,28 @@ func (c *DefaultApiService) FetchChallenge(ServiceSid string, Identity string, S * @param ServiceSid The unique SID identifier of the Service. * @param Identity The unique external identifier for the Entity of the Service * @return VerifyV2ServiceEntity -*/ -func (c *DefaultApiService) FetchEntity(ServiceSid string, Identity string, ) (*VerifyV2ServiceEntity, error) { - path := "/v2/Services/{ServiceSid}/Entities/{Identity}" + */ +func (c *DefaultApiService) FetchEntity(ServiceSid string, Identity string) (*VerifyV2ServiceEntity, error) { + path := "/v2/Services/{ServiceSid}/Entities/{Identity}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &VerifyV2ServiceEntity{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VerifyV2ServiceEntity{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -1001,31 +981,29 @@ func (c *DefaultApiService) FetchEntity(ServiceSid string, Identity string, ) (* * @param Identity Customer unique identity for the Entity owner of the Factor * @param Sid A 34 character string that uniquely identifies this Factor. * @return VerifyV2ServiceEntityFactor -*/ -func (c *DefaultApiService) FetchFactor(ServiceSid string, Identity string, Sid string, ) (*VerifyV2ServiceEntityFactor, error) { - path := "/v2/Services/{ServiceSid}/Entities/{Identity}/Factors/{Sid}" + */ +func (c *DefaultApiService) FetchFactor(ServiceSid string, Identity string, Sid string) (*VerifyV2ServiceEntityFactor, error) { + path := "/v2/Services/{ServiceSid}/Entities/{Identity}/Factors/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &VerifyV2ServiceEntityFactor{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VerifyV2ServiceEntityFactor{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -1033,29 +1011,27 @@ func (c *DefaultApiService) FetchFactor(ServiceSid string, Identity string, Sid * Fetch the forms for a specific Form Type. * @param FormType The Type of this Form. Currently only `form-push` is supported. * @return VerifyV2Form -*/ -func (c *DefaultApiService) FetchForm(FormType string, ) (*VerifyV2Form, error) { - path := "/v2/Forms/{FormType}" + */ +func (c *DefaultApiService) FetchForm(FormType string) (*VerifyV2Form, error) { + path := "/v2/Forms/{FormType}" path = strings.Replace(path, "{"+"FormType"+"}", FormType, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &VerifyV2Form{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VerifyV2Form{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -1064,30 +1040,28 @@ func (c *DefaultApiService) FetchForm(FormType string, ) (*VerifyV2Form, error) * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/verify/api/service) that the resource is associated with. * @param Country The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country this configuration will be applied to. If this is a global configuration, Country will take the value `all`. * @return VerifyV2ServiceMessagingConfiguration -*/ -func (c *DefaultApiService) FetchMessagingConfiguration(ServiceSid string, Country string, ) (*VerifyV2ServiceMessagingConfiguration, error) { - path := "/v2/Services/{ServiceSid}/MessagingConfigurations/{Country}" + */ +func (c *DefaultApiService) FetchMessagingConfiguration(ServiceSid string, Country string) (*VerifyV2ServiceMessagingConfiguration, error) { + path := "/v2/Services/{ServiceSid}/MessagingConfigurations/{Country}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Country"+"}", Country, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &VerifyV2ServiceMessagingConfiguration{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VerifyV2ServiceMessagingConfiguration{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -1096,30 +1070,28 @@ func (c *DefaultApiService) FetchMessagingConfiguration(ServiceSid string, Count * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/verify/api/service) the resource is associated with. * @param Sid The Twilio-provided string that uniquely identifies the Rate Limit resource to fetch. * @return VerifyV2ServiceRateLimit -*/ -func (c *DefaultApiService) FetchRateLimit(ServiceSid string, Sid string, ) (*VerifyV2ServiceRateLimit, error) { - path := "/v2/Services/{ServiceSid}/RateLimits/{Sid}" + */ +func (c *DefaultApiService) FetchRateLimit(ServiceSid string, Sid string) (*VerifyV2ServiceRateLimit, error) { + path := "/v2/Services/{ServiceSid}/RateLimits/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &VerifyV2ServiceRateLimit{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VerifyV2ServiceRateLimit{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -1127,29 +1099,27 @@ func (c *DefaultApiService) FetchRateLimit(ServiceSid string, Sid string, ) (*Ve * Fetch specific Verification Service Instance. * @param Sid The Twilio-provided string that uniquely identifies the Verification Service resource to fetch. * @return VerifyV2Service -*/ -func (c *DefaultApiService) FetchService(Sid string, ) (*VerifyV2Service, error) { - path := "/v2/Services/{Sid}" + */ +func (c *DefaultApiService) FetchService(Sid string) (*VerifyV2Service, error) { + path := "/v2/Services/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &VerifyV2Service{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VerifyV2Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -1158,30 +1128,28 @@ func (c *DefaultApiService) FetchService(Sid string, ) (*VerifyV2Service, error) * @param ServiceSid The SID of the verification [Service](https://www.twilio.com/docs/verify/api/service) to fetch the resource from. * @param Sid The Twilio-provided string that uniquely identifies the Verification resource to fetch. * @return VerifyV2ServiceVerification -*/ -func (c *DefaultApiService) FetchVerification(ServiceSid string, Sid string, ) (*VerifyV2ServiceVerification, error) { - path := "/v2/Services/{ServiceSid}/Verifications/{Sid}" + */ +func (c *DefaultApiService) FetchVerification(ServiceSid string, Sid string) (*VerifyV2ServiceVerification, error) { + path := "/v2/Services/{ServiceSid}/Verifications/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &VerifyV2ServiceVerification{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VerifyV2ServiceVerification{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -1189,29 +1157,27 @@ func (c *DefaultApiService) FetchVerification(ServiceSid string, Sid string, ) ( * Fetch a specific verification attempt. * @param Sid The unique SID identifier of a Verification Attempt * @return VerifyV2VerificationAttempt -*/ -func (c *DefaultApiService) FetchVerificationAttempt(Sid string, ) (*VerifyV2VerificationAttempt, error) { - path := "/v2/Attempts/{Sid}" + */ +func (c *DefaultApiService) FetchVerificationAttempt(Sid string) (*VerifyV2VerificationAttempt, error) { + path := "/v2/Attempts/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &VerifyV2VerificationAttempt{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VerifyV2VerificationAttempt{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -1220,31 +1186,30 @@ func (c *DefaultApiService) FetchVerificationAttempt(Sid string, ) (*VerifyV2Ver * @param ServiceSid The unique SID identifier of the Service. * @param Sid The Twilio-provided string that uniquely identifies the Webhook resource to fetch. * @return VerifyV2ServiceWebhook -*/ -func (c *DefaultApiService) FetchWebhook(ServiceSid string, Sid string, ) (*VerifyV2ServiceWebhook, error) { - path := "/v2/Services/{ServiceSid}/Webhooks/{Sid}" + */ +func (c *DefaultApiService) FetchWebhook(ServiceSid string, Sid string) (*VerifyV2ServiceWebhook, error) { + path := "/v2/Services/{ServiceSid}/Webhooks/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &VerifyV2ServiceWebhook{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VerifyV2ServiceWebhook{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListBucketParams Optional parameters for the method 'ListBucket' type ListBucketParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1258,39 +1223,39 @@ type ListBucketParams struct { * @param optional nil or *ListBucketParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListBucketResponse -*/ + */ func (c *DefaultApiService) ListBucket(ServiceSid string, RateLimitSid string, params *ListBucketParams) (*ListBucketResponse, error) { - path := "/v2/Services/{ServiceSid}/RateLimits/{RateLimitSid}/Buckets" + path := "/v2/Services/{ServiceSid}/RateLimits/{RateLimitSid}/Buckets" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"RateLimitSid"+"}", RateLimitSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListBucketResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListBucketResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListChallengeParams Optional parameters for the method 'ListChallenge' type ListChallengeParams struct { FactorSid *string `json:"FactorSid,omitempty"` - Status *string `json:"Status,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + Status *string `json:"Status,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -1303,40 +1268,40 @@ type ListChallengeParams struct { * @param "Status" (string) - The Status of the Challenges to fetch. One of `pending`, `expired`, `approved` or `denied`. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListChallengeResponse -*/ + */ func (c *DefaultApiService) ListChallenge(ServiceSid string, Identity string, params *ListChallengeParams) (*ListChallengeResponse, error) { - path := "/v2/Services/{ServiceSid}/Entities/{Identity}/Challenges" + path := "/v2/Services/{ServiceSid}/Entities/{Identity}/Challenges" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.FactorSid != nil { - data.Set("FactorSid", *params.FactorSid) -} - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.FactorSid != nil { + data.Set("FactorSid", *params.FactorSid) + } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListChallengeResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListChallengeResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListEntityParams Optional parameters for the method 'ListEntity' type ListEntityParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1349,33 +1314,33 @@ type ListEntityParams struct { * @param optional nil or *ListEntityParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListEntityResponse -*/ + */ func (c *DefaultApiService) ListEntity(ServiceSid string, params *ListEntityParams) (*ListEntityResponse, error) { - path := "/v2/Services/{ServiceSid}/Entities" + path := "/v2/Services/{ServiceSid}/Entities" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListEntityResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListEntityResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListFactorParams Optional parameters for the method 'ListFactor' type ListFactorParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1389,34 +1354,34 @@ type ListFactorParams struct { * @param optional nil or *ListFactorParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListFactorResponse -*/ + */ func (c *DefaultApiService) ListFactor(ServiceSid string, Identity string, params *ListFactorParams) (*ListFactorResponse, error) { - path := "/v2/Services/{ServiceSid}/Entities/{Identity}/Factors" + path := "/v2/Services/{ServiceSid}/Entities/{Identity}/Factors" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListFactorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListFactorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListMessagingConfigurationParams Optional parameters for the method 'ListMessagingConfiguration' type ListMessagingConfigurationParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1429,33 +1394,33 @@ type ListMessagingConfigurationParams struct { * @param optional nil or *ListMessagingConfigurationParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListMessagingConfigurationResponse -*/ + */ func (c *DefaultApiService) ListMessagingConfiguration(ServiceSid string, params *ListMessagingConfigurationParams) (*ListMessagingConfigurationResponse, error) { - path := "/v2/Services/{ServiceSid}/MessagingConfigurations" + path := "/v2/Services/{ServiceSid}/MessagingConfigurations" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListMessagingConfigurationResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListMessagingConfigurationResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListRateLimitParams Optional parameters for the method 'ListRateLimit' type ListRateLimitParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1468,33 +1433,33 @@ type ListRateLimitParams struct { * @param optional nil or *ListRateLimitParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListRateLimitResponse -*/ + */ func (c *DefaultApiService) ListRateLimit(ServiceSid string, params *ListRateLimitParams) (*ListRateLimitResponse, error) { - path := "/v2/Services/{ServiceSid}/RateLimits" + path := "/v2/Services/{ServiceSid}/RateLimits" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListRateLimitResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListRateLimitResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListServiceParams Optional parameters for the method 'ListService' type ListServiceParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1506,38 +1471,38 @@ type ListServiceParams struct { * @param optional nil or *ListServiceParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListServiceResponse -*/ + */ func (c *DefaultApiService) ListService(params *ListServiceParams) (*ListServiceResponse, error) { - path := "/v2/Services" - - data := url.Values{} - headers := 0 + path := "/v2/Services" - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListServiceResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListServiceResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListVerificationAttemptParams Optional parameters for the method 'ListVerificationAttempt' type ListVerificationAttemptParams struct { - DateCreatedAfter *time.Time `json:"DateCreatedAfter,omitempty"` + DateCreatedAfter *time.Time `json:"DateCreatedAfter,omitempty"` DateCreatedBefore *time.Time `json:"DateCreatedBefore,omitempty"` - ChannelDataTo *string `json:"ChannelData.To,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + ChannelDataTo *string `json:"ChannelData.To,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -1549,41 +1514,41 @@ type ListVerificationAttemptParams struct { * @param "ChannelDataTo" (string) - Destination of a verification. Depending on the type of channel, it could be a phone number in E.164 format or an email address. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListVerificationAttemptResponse -*/ + */ func (c *DefaultApiService) ListVerificationAttempt(params *ListVerificationAttemptParams) (*ListVerificationAttemptResponse, error) { - path := "/v2/Attempts" + path := "/v2/Attempts" - data := url.Values{} - headers := 0 - - if params != nil && params.DateCreatedAfter != nil { - data.Set("DateCreatedAfter", fmt.Sprint(*params.DateCreatedAfter)) -} - if params != nil && params.DateCreatedBefore != nil { - data.Set("DateCreatedBefore", fmt.Sprint(*params.DateCreatedBefore)) -} - if params != nil && params.ChannelDataTo != nil { - data.Set("ChannelDataTo", *params.ChannelDataTo) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.DateCreatedAfter != nil { + data.Set("DateCreatedAfter", fmt.Sprint(*params.DateCreatedAfter)) + } + if params != nil && params.DateCreatedBefore != nil { + data.Set("DateCreatedBefore", fmt.Sprint(*params.DateCreatedBefore)) + } + if params != nil && params.ChannelDataTo != nil { + data.Set("ChannelDataTo", *params.ChannelDataTo) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListVerificationAttemptResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListVerificationAttemptResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListWebhookParams Optional parameters for the method 'ListWebhook' type ListWebhookParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1596,37 +1561,37 @@ type ListWebhookParams struct { * @param optional nil or *ListWebhookParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListWebhookResponse -*/ + */ func (c *DefaultApiService) ListWebhook(ServiceSid string, params *ListWebhookParams) (*ListWebhookResponse, error) { - path := "/v2/Services/{ServiceSid}/Webhooks" + path := "/v2/Services/{ServiceSid}/Webhooks" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListWebhookResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListWebhookResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateBucketParams Optional parameters for the method 'UpdateBucket' type UpdateBucketParams struct { Interval *int32 `json:"Interval,omitempty"` - Max *int32 `json:"Max,omitempty"` + Max *int32 `json:"Max,omitempty"` } /* @@ -1639,38 +1604,38 @@ type UpdateBucketParams struct { * @param "Interval" (int32) - Number of seconds that the rate limit will be enforced over. * @param "Max" (int32) - Maximum number of requests permitted in during the interval. * @return VerifyV2ServiceRateLimitBucket -*/ + */ func (c *DefaultApiService) UpdateBucket(ServiceSid string, RateLimitSid string, Sid string, params *UpdateBucketParams) (*VerifyV2ServiceRateLimitBucket, error) { - path := "/v2/Services/{ServiceSid}/RateLimits/{RateLimitSid}/Buckets/{Sid}" + path := "/v2/Services/{ServiceSid}/RateLimits/{RateLimitSid}/Buckets/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"RateLimitSid"+"}", RateLimitSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Interval != nil { - data.Set("Interval", fmt.Sprint(*params.Interval)) -} - if params != nil && params.Max != nil { - data.Set("Max", fmt.Sprint(*params.Max)) -} + data := url.Values{} + headers := 0 + if params != nil && params.Interval != nil { + data.Set("Interval", fmt.Sprint(*params.Interval)) + } + if params != nil && params.Max != nil { + data.Set("Max", fmt.Sprint(*params.Max)) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &VerifyV2ServiceRateLimitBucket{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VerifyV2ServiceRateLimitBucket{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateChallengeParams Optional parameters for the method 'UpdateChallenge' type UpdateChallengeParams struct { AuthPayload *string `json:"AuthPayload,omitempty"` @@ -1685,41 +1650,41 @@ type UpdateChallengeParams struct { * @param optional nil or *UpdateChallengeParams - Optional Parameters: * @param "AuthPayload" (string) - The optional payload needed to verify the Challenge. E.g., a TOTP would use the numeric code. * @return VerifyV2ServiceEntityChallenge -*/ + */ func (c *DefaultApiService) UpdateChallenge(ServiceSid string, Identity string, Sid string, params *UpdateChallengeParams) (*VerifyV2ServiceEntityChallenge, error) { - path := "/v2/Services/{ServiceSid}/Entities/{Identity}/Challenges/{Sid}" + path := "/v2/Services/{ServiceSid}/Entities/{Identity}/Challenges/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.AuthPayload != nil { - data.Set("AuthPayload", *params.AuthPayload) -} + data := url.Values{} + headers := 0 + if params != nil && params.AuthPayload != nil { + data.Set("AuthPayload", *params.AuthPayload) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &VerifyV2ServiceEntityChallenge{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VerifyV2ServiceEntityChallenge{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateFactorParams Optional parameters for the method 'UpdateFactor' type UpdateFactorParams struct { - AuthPayload *string `json:"AuthPayload,omitempty"` + AuthPayload *string `json:"AuthPayload,omitempty"` ConfigNotificationToken *string `json:"Config.NotificationToken,omitempty"` - ConfigSdkVersion *string `json:"Config.SdkVersion,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` + ConfigSdkVersion *string `json:"Config.SdkVersion,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` } /* @@ -1734,44 +1699,44 @@ type UpdateFactorParams struct { * @param "ConfigSdkVersion" (string) - The Verify Push SDK version used to configure the factor * @param "FriendlyName" (string) - The new friendly name of this Factor * @return VerifyV2ServiceEntityFactor -*/ + */ func (c *DefaultApiService) UpdateFactor(ServiceSid string, Identity string, Sid string, params *UpdateFactorParams) (*VerifyV2ServiceEntityFactor, error) { - path := "/v2/Services/{ServiceSid}/Entities/{Identity}/Factors/{Sid}" + path := "/v2/Services/{ServiceSid}/Entities/{Identity}/Factors/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.AuthPayload != nil { - data.Set("AuthPayload", *params.AuthPayload) -} - if params != nil && params.ConfigNotificationToken != nil { - data.Set("ConfigNotificationToken", *params.ConfigNotificationToken) -} - if params != nil && params.ConfigSdkVersion != nil { - data.Set("ConfigSdkVersion", *params.ConfigSdkVersion) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} + data := url.Values{} + headers := 0 + if params != nil && params.AuthPayload != nil { + data.Set("AuthPayload", *params.AuthPayload) + } + if params != nil && params.ConfigNotificationToken != nil { + data.Set("ConfigNotificationToken", *params.ConfigNotificationToken) + } + if params != nil && params.ConfigSdkVersion != nil { + data.Set("ConfigSdkVersion", *params.ConfigSdkVersion) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &VerifyV2ServiceEntityFactor{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VerifyV2ServiceEntityFactor{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateMessagingConfigurationParams Optional parameters for the method 'UpdateMessagingConfiguration' type UpdateMessagingConfigurationParams struct { MessagingServiceSid *string `json:"MessagingServiceSid,omitempty"` @@ -1785,34 +1750,34 @@ type UpdateMessagingConfigurationParams struct { * @param optional nil or *UpdateMessagingConfigurationParams - Optional Parameters: * @param "MessagingServiceSid" (string) - The SID of the [Messaging Service](https://www.twilio.com/docs/sms/services/api) to be used to send SMS to the country of this configuration. * @return VerifyV2ServiceMessagingConfiguration -*/ + */ func (c *DefaultApiService) UpdateMessagingConfiguration(ServiceSid string, Country string, params *UpdateMessagingConfigurationParams) (*VerifyV2ServiceMessagingConfiguration, error) { - path := "/v2/Services/{ServiceSid}/MessagingConfigurations/{Country}" + path := "/v2/Services/{ServiceSid}/MessagingConfigurations/{Country}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Country"+"}", Country, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.MessagingServiceSid != nil { - data.Set("MessagingServiceSid", *params.MessagingServiceSid) -} + data := url.Values{} + headers := 0 + if params != nil && params.MessagingServiceSid != nil { + data.Set("MessagingServiceSid", *params.MessagingServiceSid) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &VerifyV2ServiceMessagingConfiguration{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VerifyV2ServiceMessagingConfiguration{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateRateLimitParams Optional parameters for the method 'UpdateRateLimit' type UpdateRateLimitParams struct { Description *string `json:"Description,omitempty"` @@ -1826,48 +1791,48 @@ type UpdateRateLimitParams struct { * @param optional nil or *UpdateRateLimitParams - Optional Parameters: * @param "Description" (string) - Description of this Rate Limit * @return VerifyV2ServiceRateLimit -*/ + */ func (c *DefaultApiService) UpdateRateLimit(ServiceSid string, Sid string, params *UpdateRateLimitParams) (*VerifyV2ServiceRateLimit, error) { - path := "/v2/Services/{ServiceSid}/RateLimits/{Sid}" + path := "/v2/Services/{ServiceSid}/RateLimits/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Description != nil { - data.Set("Description", *params.Description) -} + data := url.Values{} + headers := 0 + if params != nil && params.Description != nil { + data.Set("Description", *params.Description) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &VerifyV2ServiceRateLimit{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VerifyV2ServiceRateLimit{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateServiceParams Optional parameters for the method 'UpdateService' type UpdateServiceParams struct { - CodeLength *int32 `json:"CodeLength,omitempty"` - CustomCodeEnabled *bool `json:"CustomCodeEnabled,omitempty"` - DoNotShareWarningEnabled *bool `json:"DoNotShareWarningEnabled,omitempty"` - DtmfInputRequired *bool `json:"DtmfInputRequired,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - LookupEnabled *bool `json:"LookupEnabled,omitempty"` - Psd2Enabled *bool `json:"Psd2Enabled,omitempty"` - PushApnCredentialSid *string `json:"Push.ApnCredentialSid,omitempty"` - PushFcmCredentialSid *string `json:"Push.FcmCredentialSid,omitempty"` - PushIncludeDate *bool `json:"Push.IncludeDate,omitempty"` - SkipSmsToLandlines *bool `json:"SkipSmsToLandlines,omitempty"` - TtsName *string `json:"TtsName,omitempty"` + CodeLength *int32 `json:"CodeLength,omitempty"` + CustomCodeEnabled *bool `json:"CustomCodeEnabled,omitempty"` + DoNotShareWarningEnabled *bool `json:"DoNotShareWarningEnabled,omitempty"` + DtmfInputRequired *bool `json:"DtmfInputRequired,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + LookupEnabled *bool `json:"LookupEnabled,omitempty"` + Psd2Enabled *bool `json:"Psd2Enabled,omitempty"` + PushApnCredentialSid *string `json:"Push.ApnCredentialSid,omitempty"` + PushFcmCredentialSid *string `json:"Push.FcmCredentialSid,omitempty"` + PushIncludeDate *bool `json:"Push.IncludeDate,omitempty"` + SkipSmsToLandlines *bool `json:"SkipSmsToLandlines,omitempty"` + TtsName *string `json:"TtsName,omitempty"` } /* @@ -1888,66 +1853,66 @@ type UpdateServiceParams struct { * @param "SkipSmsToLandlines" (bool) - Whether to skip sending SMS verifications to landlines. Requires `lookup_enabled`. * @param "TtsName" (string) - The name of an alternative text-to-speech service to use in phone calls. Applies only to TTS languages. * @return VerifyV2Service -*/ + */ func (c *DefaultApiService) UpdateService(Sid string, params *UpdateServiceParams) (*VerifyV2Service, error) { - path := "/v2/Services/{Sid}" + path := "/v2/Services/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.CodeLength != nil { - data.Set("CodeLength", fmt.Sprint(*params.CodeLength)) -} - if params != nil && params.CustomCodeEnabled != nil { - data.Set("CustomCodeEnabled", fmt.Sprint(*params.CustomCodeEnabled)) -} - if params != nil && params.DoNotShareWarningEnabled != nil { - data.Set("DoNotShareWarningEnabled", fmt.Sprint(*params.DoNotShareWarningEnabled)) -} - if params != nil && params.DtmfInputRequired != nil { - data.Set("DtmfInputRequired", fmt.Sprint(*params.DtmfInputRequired)) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.LookupEnabled != nil { - data.Set("LookupEnabled", fmt.Sprint(*params.LookupEnabled)) -} - if params != nil && params.Psd2Enabled != nil { - data.Set("Psd2Enabled", fmt.Sprint(*params.Psd2Enabled)) -} - if params != nil && params.PushApnCredentialSid != nil { - data.Set("PushApnCredentialSid", *params.PushApnCredentialSid) -} - if params != nil && params.PushFcmCredentialSid != nil { - data.Set("PushFcmCredentialSid", *params.PushFcmCredentialSid) -} - if params != nil && params.PushIncludeDate != nil { - data.Set("PushIncludeDate", fmt.Sprint(*params.PushIncludeDate)) -} - if params != nil && params.SkipSmsToLandlines != nil { - data.Set("SkipSmsToLandlines", fmt.Sprint(*params.SkipSmsToLandlines)) -} - if params != nil && params.TtsName != nil { - data.Set("TtsName", *params.TtsName) -} + data := url.Values{} + headers := 0 + if params != nil && params.CodeLength != nil { + data.Set("CodeLength", fmt.Sprint(*params.CodeLength)) + } + if params != nil && params.CustomCodeEnabled != nil { + data.Set("CustomCodeEnabled", fmt.Sprint(*params.CustomCodeEnabled)) + } + if params != nil && params.DoNotShareWarningEnabled != nil { + data.Set("DoNotShareWarningEnabled", fmt.Sprint(*params.DoNotShareWarningEnabled)) + } + if params != nil && params.DtmfInputRequired != nil { + data.Set("DtmfInputRequired", fmt.Sprint(*params.DtmfInputRequired)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.LookupEnabled != nil { + data.Set("LookupEnabled", fmt.Sprint(*params.LookupEnabled)) + } + if params != nil && params.Psd2Enabled != nil { + data.Set("Psd2Enabled", fmt.Sprint(*params.Psd2Enabled)) + } + if params != nil && params.PushApnCredentialSid != nil { + data.Set("PushApnCredentialSid", *params.PushApnCredentialSid) + } + if params != nil && params.PushFcmCredentialSid != nil { + data.Set("PushFcmCredentialSid", *params.PushFcmCredentialSid) + } + if params != nil && params.PushIncludeDate != nil { + data.Set("PushIncludeDate", fmt.Sprint(*params.PushIncludeDate)) + } + if params != nil && params.SkipSmsToLandlines != nil { + data.Set("SkipSmsToLandlines", fmt.Sprint(*params.SkipSmsToLandlines)) + } + if params != nil && params.TtsName != nil { + data.Set("TtsName", *params.TtsName) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &VerifyV2Service{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VerifyV2Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateVerificationParams Optional parameters for the method 'UpdateVerification' type UpdateVerificationParams struct { Status *string `json:"Status,omitempty"` @@ -1961,40 +1926,40 @@ type UpdateVerificationParams struct { * @param optional nil or *UpdateVerificationParams - Optional Parameters: * @param "Status" (string) - The new status of the resource. Can be: `canceled` or `approved`. * @return VerifyV2ServiceVerification -*/ + */ func (c *DefaultApiService) UpdateVerification(ServiceSid string, Sid string, params *UpdateVerificationParams) (*VerifyV2ServiceVerification, error) { - path := "/v2/Services/{ServiceSid}/Verifications/{Sid}" + path := "/v2/Services/{ServiceSid}/Verifications/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) -} + data := url.Values{} + headers := 0 + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &VerifyV2ServiceVerification{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VerifyV2ServiceVerification{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateWebhookParams Optional parameters for the method 'UpdateWebhook' type UpdateWebhookParams struct { - EventTypes *[]string `json:"EventTypes,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Status *string `json:"Status,omitempty"` - WebhookUrl *string `json:"WebhookUrl,omitempty"` + EventTypes *[]string `json:"EventTypes,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Status *string `json:"Status,omitempty"` + WebhookUrl *string `json:"WebhookUrl,omitempty"` } /* @@ -2007,40 +1972,39 @@ type UpdateWebhookParams struct { * @param "Status" (string) - The webhook status. Default value is `enabled`. One of: `enabled` or `disabled` * @param "WebhookUrl" (string) - The URL associated with this Webhook. * @return VerifyV2ServiceWebhook -*/ + */ func (c *DefaultApiService) UpdateWebhook(ServiceSid string, Sid string, params *UpdateWebhookParams) (*VerifyV2ServiceWebhook, error) { - path := "/v2/Services/{ServiceSid}/Webhooks/{Sid}" + path := "/v2/Services/{ServiceSid}/Webhooks/{Sid}" path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.EventTypes != nil { - data.Set("EventTypes", strings.Join(*params.EventTypes, ",")) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) -} - if params != nil && params.WebhookUrl != nil { - data.Set("WebhookUrl", *params.WebhookUrl) -} + data := url.Values{} + headers := 0 + if params != nil && params.EventTypes != nil { + data.Set("EventTypes", strings.Join(*params.EventTypes, ",")) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + if params != nil && params.WebhookUrl != nil { + data.Set("WebhookUrl", *params.WebhookUrl) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &VerifyV2ServiceWebhook{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VerifyV2ServiceWebhook{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } diff --git a/twilio/rest/verify/v2/model_list_bucket_response.go b/twilio/rest/verify/v2/model_list_bucket_response.go index ea8d22d8c..b04cee545 100644 --- a/twilio/rest/verify/v2/model_list_bucket_response.go +++ b/twilio/rest/verify/v2/model_list_bucket_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListBucketResponse struct for ListBucketResponse type ListBucketResponse struct { - Buckets []VerifyV2ServiceRateLimitBucket `json:"Buckets,omitempty"` - Meta ListVerificationAttemptResponseMeta `json:"Meta,omitempty"` + Buckets []VerifyV2ServiceRateLimitBucket `json:"Buckets,omitempty"` + Meta ListVerificationAttemptResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/verify/v2/model_list_challenge_response.go b/twilio/rest/verify/v2/model_list_challenge_response.go index 99b3bab55..2060b8516 100644 --- a/twilio/rest/verify/v2/model_list_challenge_response.go +++ b/twilio/rest/verify/v2/model_list_challenge_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListChallengeResponse struct for ListChallengeResponse type ListChallengeResponse struct { - Challenges []VerifyV2ServiceEntityChallenge `json:"Challenges,omitempty"` - Meta ListVerificationAttemptResponseMeta `json:"Meta,omitempty"` + Challenges []VerifyV2ServiceEntityChallenge `json:"Challenges,omitempty"` + Meta ListVerificationAttemptResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/verify/v2/model_list_entity_response.go b/twilio/rest/verify/v2/model_list_entity_response.go index 0863dd6b4..7cf480939 100644 --- a/twilio/rest/verify/v2/model_list_entity_response.go +++ b/twilio/rest/verify/v2/model_list_entity_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListEntityResponse struct for ListEntityResponse type ListEntityResponse struct { - Entities []VerifyV2ServiceEntity `json:"Entities,omitempty"` - Meta ListVerificationAttemptResponseMeta `json:"Meta,omitempty"` + Entities []VerifyV2ServiceEntity `json:"Entities,omitempty"` + Meta ListVerificationAttemptResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/verify/v2/model_list_factor_response.go b/twilio/rest/verify/v2/model_list_factor_response.go index 37ac28ff5..5021b034c 100644 --- a/twilio/rest/verify/v2/model_list_factor_response.go +++ b/twilio/rest/verify/v2/model_list_factor_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListFactorResponse struct for ListFactorResponse type ListFactorResponse struct { - Factors []VerifyV2ServiceEntityFactor `json:"Factors,omitempty"` - Meta ListVerificationAttemptResponseMeta `json:"Meta,omitempty"` + Factors []VerifyV2ServiceEntityFactor `json:"Factors,omitempty"` + Meta ListVerificationAttemptResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/verify/v2/model_list_messaging_configuration_response.go b/twilio/rest/verify/v2/model_list_messaging_configuration_response.go index ebcffd965..f0f427a0d 100644 --- a/twilio/rest/verify/v2/model_list_messaging_configuration_response.go +++ b/twilio/rest/verify/v2/model_list_messaging_configuration_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListMessagingConfigurationResponse struct for ListMessagingConfigurationResponse type ListMessagingConfigurationResponse struct { MessagingConfigurations []VerifyV2ServiceMessagingConfiguration `json:"MessagingConfigurations,omitempty"` - Meta ListVerificationAttemptResponseMeta `json:"Meta,omitempty"` + Meta ListVerificationAttemptResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/verify/v2/model_list_rate_limit_response.go b/twilio/rest/verify/v2/model_list_rate_limit_response.go index 75e62eb7f..b008eed26 100644 --- a/twilio/rest/verify/v2/model_list_rate_limit_response.go +++ b/twilio/rest/verify/v2/model_list_rate_limit_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListRateLimitResponse struct for ListRateLimitResponse type ListRateLimitResponse struct { - Meta ListVerificationAttemptResponseMeta `json:"Meta,omitempty"` - RateLimits []VerifyV2ServiceRateLimit `json:"RateLimits,omitempty"` + Meta ListVerificationAttemptResponseMeta `json:"Meta,omitempty"` + RateLimits []VerifyV2ServiceRateLimit `json:"RateLimits,omitempty"` } diff --git a/twilio/rest/verify/v2/model_list_service_response.go b/twilio/rest/verify/v2/model_list_service_response.go index d215eb384..37a9c820a 100644 --- a/twilio/rest/verify/v2/model_list_service_response.go +++ b/twilio/rest/verify/v2/model_list_service_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListServiceResponse struct for ListServiceResponse type ListServiceResponse struct { - Meta ListVerificationAttemptResponseMeta `json:"Meta,omitempty"` - Services []VerifyV2Service `json:"Services,omitempty"` + Meta ListVerificationAttemptResponseMeta `json:"Meta,omitempty"` + Services []VerifyV2Service `json:"Services,omitempty"` } diff --git a/twilio/rest/verify/v2/model_list_verification_attempt_response.go b/twilio/rest/verify/v2/model_list_verification_attempt_response.go index d7b3dff79..3a40d88bc 100644 --- a/twilio/rest/verify/v2/model_list_verification_attempt_response.go +++ b/twilio/rest/verify/v2/model_list_verification_attempt_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListVerificationAttemptResponse struct for ListVerificationAttemptResponse type ListVerificationAttemptResponse struct { - Attempts []VerifyV2VerificationAttempt `json:"Attempts,omitempty"` - Meta ListVerificationAttemptResponseMeta `json:"Meta,omitempty"` + Attempts []VerifyV2VerificationAttempt `json:"Attempts,omitempty"` + Meta ListVerificationAttemptResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/verify/v2/model_list_verification_attempt_response_meta.go b/twilio/rest/verify/v2/model_list_verification_attempt_response_meta.go index 64463ee7e..e38ec6d98 100644 --- a/twilio/rest/verify/v2/model_list_verification_attempt_response_meta.go +++ b/twilio/rest/verify/v2/model_list_verification_attempt_response_meta.go @@ -1,22 +1,23 @@ /* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListVerificationAttemptResponseMeta struct for ListVerificationAttemptResponseMeta type ListVerificationAttemptResponseMeta struct { - FirstPageUrl string `json:"FirstPageUrl,omitempty"` - Key string `json:"Key,omitempty"` - NextPageUrl string `json:"NextPageUrl,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` - Url string `json:"Url,omitempty"` + Url string `json:"Url,omitempty"` } diff --git a/twilio/rest/verify/v2/model_list_webhook_response.go b/twilio/rest/verify/v2/model_list_webhook_response.go index b22e7d742..0032ed708 100644 --- a/twilio/rest/verify/v2/model_list_webhook_response.go +++ b/twilio/rest/verify/v2/model_list_webhook_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListWebhookResponse struct for ListWebhookResponse type ListWebhookResponse struct { - Meta ListVerificationAttemptResponseMeta `json:"Meta,omitempty"` - Webhooks []VerifyV2ServiceWebhook `json:"Webhooks,omitempty"` + Meta ListVerificationAttemptResponseMeta `json:"Meta,omitempty"` + Webhooks []VerifyV2ServiceWebhook `json:"Webhooks,omitempty"` } diff --git a/twilio/rest/verify/v2/model_verify_v2_form.go b/twilio/rest/verify/v2/model_verify_v2_form.go index 9655c780f..15b4185c1 100644 --- a/twilio/rest/verify/v2/model_verify_v2_form.go +++ b/twilio/rest/verify/v2/model_verify_v2_form.go @@ -1,15 +1,16 @@ /* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // VerifyV2Form struct for VerifyV2Form type VerifyV2Form struct { // Additional information for the available forms for this type. diff --git a/twilio/rest/verify/v2/model_verify_v2_service.go b/twilio/rest/verify/v2/model_verify_v2_service.go index 42867593d..615a3098a 100644 --- a/twilio/rest/verify/v2/model_verify_v2_service.go +++ b/twilio/rest/verify/v2/model_verify_v2_service.go @@ -1,18 +1,20 @@ /* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // VerifyV2Service struct for VerifyV2Service type VerifyV2Service struct { // The SID of the Account that created the resource diff --git a/twilio/rest/verify/v2/model_verify_v2_service_access_token.go b/twilio/rest/verify/v2/model_verify_v2_service_access_token.go index cad5988a6..d9ac6a72d 100644 --- a/twilio/rest/verify/v2/model_verify_v2_service_access_token.go +++ b/twilio/rest/verify/v2/model_verify_v2_service_access_token.go @@ -1,15 +1,16 @@ /* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // VerifyV2ServiceAccessToken struct for VerifyV2ServiceAccessToken type VerifyV2ServiceAccessToken struct { // Generated access token. diff --git a/twilio/rest/verify/v2/model_verify_v2_service_entity.go b/twilio/rest/verify/v2/model_verify_v2_service_entity.go index d2bcae1c7..bbba7c3ac 100644 --- a/twilio/rest/verify/v2/model_verify_v2_service_entity.go +++ b/twilio/rest/verify/v2/model_verify_v2_service_entity.go @@ -1,18 +1,20 @@ /* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // VerifyV2ServiceEntity struct for VerifyV2ServiceEntity type VerifyV2ServiceEntity struct { // Account Sid. diff --git a/twilio/rest/verify/v2/model_verify_v2_service_entity_challenge.go b/twilio/rest/verify/v2/model_verify_v2_service_entity_challenge.go index cdd0043fe..f61392beb 100644 --- a/twilio/rest/verify/v2/model_verify_v2_service_entity_challenge.go +++ b/twilio/rest/verify/v2/model_verify_v2_service_entity_challenge.go @@ -1,18 +1,20 @@ /* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // VerifyV2ServiceEntityChallenge struct for VerifyV2ServiceEntityChallenge type VerifyV2ServiceEntityChallenge struct { // Account Sid. diff --git a/twilio/rest/verify/v2/model_verify_v2_service_entity_factor.go b/twilio/rest/verify/v2/model_verify_v2_service_entity_factor.go index eed01fa40..6ffc37406 100644 --- a/twilio/rest/verify/v2/model_verify_v2_service_entity_factor.go +++ b/twilio/rest/verify/v2/model_verify_v2_service_entity_factor.go @@ -1,18 +1,20 @@ /* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // VerifyV2ServiceEntityFactor struct for VerifyV2ServiceEntityFactor type VerifyV2ServiceEntityFactor struct { // Account Sid. diff --git a/twilio/rest/verify/v2/model_verify_v2_service_messaging_configuration.go b/twilio/rest/verify/v2/model_verify_v2_service_messaging_configuration.go index 074a66c84..f9ab31337 100644 --- a/twilio/rest/verify/v2/model_verify_v2_service_messaging_configuration.go +++ b/twilio/rest/verify/v2/model_verify_v2_service_messaging_configuration.go @@ -1,18 +1,20 @@ /* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // VerifyV2ServiceMessagingConfiguration struct for VerifyV2ServiceMessagingConfiguration type VerifyV2ServiceMessagingConfiguration struct { // The SID of the Account that created the resource diff --git a/twilio/rest/verify/v2/model_verify_v2_service_rate_limit.go b/twilio/rest/verify/v2/model_verify_v2_service_rate_limit.go index 14a6b1c2b..d81665816 100644 --- a/twilio/rest/verify/v2/model_verify_v2_service_rate_limit.go +++ b/twilio/rest/verify/v2/model_verify_v2_service_rate_limit.go @@ -1,18 +1,20 @@ /* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // VerifyV2ServiceRateLimit struct for VerifyV2ServiceRateLimit type VerifyV2ServiceRateLimit struct { // The SID of the Account that created the resource diff --git a/twilio/rest/verify/v2/model_verify_v2_service_rate_limit_bucket.go b/twilio/rest/verify/v2/model_verify_v2_service_rate_limit_bucket.go index 9372309ed..8c1e7cd2a 100644 --- a/twilio/rest/verify/v2/model_verify_v2_service_rate_limit_bucket.go +++ b/twilio/rest/verify/v2/model_verify_v2_service_rate_limit_bucket.go @@ -1,18 +1,20 @@ /* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // VerifyV2ServiceRateLimitBucket struct for VerifyV2ServiceRateLimitBucket type VerifyV2ServiceRateLimitBucket struct { // The SID of the Account that created the resource diff --git a/twilio/rest/verify/v2/model_verify_v2_service_verification.go b/twilio/rest/verify/v2/model_verify_v2_service_verification.go index 9bb2a4ecd..5c95ac235 100644 --- a/twilio/rest/verify/v2/model_verify_v2_service_verification.go +++ b/twilio/rest/verify/v2/model_verify_v2_service_verification.go @@ -1,18 +1,20 @@ /* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // VerifyV2ServiceVerification struct for VerifyV2ServiceVerification type VerifyV2ServiceVerification struct { // The SID of the Account that created the resource diff --git a/twilio/rest/verify/v2/model_verify_v2_service_verification_check.go b/twilio/rest/verify/v2/model_verify_v2_service_verification_check.go index 7a8887128..3b12c77cb 100644 --- a/twilio/rest/verify/v2/model_verify_v2_service_verification_check.go +++ b/twilio/rest/verify/v2/model_verify_v2_service_verification_check.go @@ -1,18 +1,20 @@ /* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // VerifyV2ServiceVerificationCheck struct for VerifyV2ServiceVerificationCheck type VerifyV2ServiceVerificationCheck struct { // The SID of the Account that created the resource diff --git a/twilio/rest/verify/v2/model_verify_v2_service_webhook.go b/twilio/rest/verify/v2/model_verify_v2_service_webhook.go index 6a7e323e3..851842c79 100644 --- a/twilio/rest/verify/v2/model_verify_v2_service_webhook.go +++ b/twilio/rest/verify/v2/model_verify_v2_service_webhook.go @@ -1,18 +1,20 @@ /* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // VerifyV2ServiceWebhook struct for VerifyV2ServiceWebhook type VerifyV2ServiceWebhook struct { // The SID of the Account that created the resource diff --git a/twilio/rest/verify/v2/model_verify_v2_verification_attempt.go b/twilio/rest/verify/v2/model_verify_v2_verification_attempt.go index 31877f78f..5c0d53a10 100644 --- a/twilio/rest/verify/v2/model_verify_v2_verification_attempt.go +++ b/twilio/rest/verify/v2/model_verify_v2_verification_attempt.go @@ -1,18 +1,20 @@ /* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // VerifyV2VerificationAttempt struct for VerifyV2VerificationAttempt type VerifyV2VerificationAttempt struct { // Account Sid @@ -27,7 +29,7 @@ type VerifyV2VerificationAttempt struct { DateCreated *time.Time `json:"DateCreated,omitempty"` // The date this Attempt was updated DateUpdated *time.Time `json:"DateUpdated,omitempty"` - ServiceSid *string `json:"ServiceSid,omitempty"` + ServiceSid *string `json:"ServiceSid,omitempty"` // A string that uniquely identifies this Verification Attempt Sid *string `json:"Sid,omitempty"` Url *string `json:"Url,omitempty"` diff --git a/twilio/rest/video/v1/api_default.go b/twilio/rest/video/v1/api_default.go index d44c8fd45..edab3fec7 100644 --- a/twilio/rest/video/v1/api_default.go +++ b/twilio/rest/video/v1/api_default.go @@ -1,11 +1,11 @@ /* - * Twilio - Video - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,11 +14,11 @@ package openapi import ( "encoding/json" "fmt" - twilio "github.com/twilio/twilio-go/client" "net/url" - "strings" - "time" - "reflect" + "strings" + "time" + + twilio "github.com/twilio/twilio-go/client" ) type DefaultApiService struct { @@ -27,23 +27,23 @@ type DefaultApiService struct { } func NewDefaultApiService(client *twilio.Client) *DefaultApiService { - return &DefaultApiService { - client: client, + return &DefaultApiService{ + client: client, baseURL: "https://video.twilio.com", } } // CreateCompositionParams Optional parameters for the method 'CreateComposition' type CreateCompositionParams struct { - AudioSources *[]string `json:"AudioSources,omitempty"` - AudioSourcesExcluded *[]string `json:"AudioSourcesExcluded,omitempty"` - Format *string `json:"Format,omitempty"` - Resolution *string `json:"Resolution,omitempty"` - RoomSid *string `json:"RoomSid,omitempty"` - StatusCallback *string `json:"StatusCallback,omitempty"` - StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` - Trim *bool `json:"Trim,omitempty"` - VideoLayout *map[string]interface{} `json:"VideoLayout,omitempty"` + AudioSources *[]string `json:"AudioSources,omitempty"` + AudioSourcesExcluded *[]string `json:"AudioSourcesExcluded,omitempty"` + Format *string `json:"Format,omitempty"` + Resolution *string `json:"Resolution,omitempty"` + RoomSid *string `json:"RoomSid,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` + StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` + Trim *bool `json:"Trim,omitempty"` + VideoLayout *map[string]interface{} `json:"VideoLayout,omitempty"` } /* @@ -59,74 +59,74 @@ type CreateCompositionParams struct { * @param "Trim" (bool) - Whether to clip the intervals where there is no active media in the composition. The default is `true`. Compositions with `trim` enabled are shorter when the Room is created and no Participant joins for a while as well as if all the Participants leave the room and join later, because those gaps will be removed. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info. * @param "VideoLayout" (map[string]interface{}) - An object that describes the video layout of the composition in terms of regions. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info. Please, be aware that either video_layout or audio_sources have to be provided to get a valid creation request * @return VideoV1Composition -*/ + */ func (c *DefaultApiService) CreateComposition(params *CreateCompositionParams) (*VideoV1Composition, error) { - path := "/v1/Compositions" + path := "/v1/Compositions" - data := url.Values{} - headers := 0 - - if params != nil && params.AudioSources != nil { - data.Set("AudioSources", strings.Join(*params.AudioSources, ",")) -} - if params != nil && params.AudioSourcesExcluded != nil { - data.Set("AudioSourcesExcluded", strings.Join(*params.AudioSourcesExcluded, ",")) -} - if params != nil && params.Format != nil { - data.Set("Format", *params.Format) -} - if params != nil && params.Resolution != nil { - data.Set("Resolution", *params.Resolution) -} - if params != nil && params.RoomSid != nil { - data.Set("RoomSid", *params.RoomSid) -} - if params != nil && params.StatusCallback != nil { - data.Set("StatusCallback", *params.StatusCallback) -} - if params != nil && params.StatusCallbackMethod != nil { - data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) -} - if params != nil && params.Trim != nil { - data.Set("Trim", fmt.Sprint(*params.Trim)) -} - if params != nil && params.VideoLayout != nil { - v, err := json.Marshal(params.VideoLayout) + data := url.Values{} + headers := 0 - if err != nil { - return nil, err + if params != nil && params.AudioSources != nil { + data.Set("AudioSources", strings.Join(*params.AudioSources, ",")) + } + if params != nil && params.AudioSourcesExcluded != nil { + data.Set("AudioSourcesExcluded", strings.Join(*params.AudioSourcesExcluded, ",")) + } + if params != nil && params.Format != nil { + data.Set("Format", *params.Format) + } + if params != nil && params.Resolution != nil { + data.Set("Resolution", *params.Resolution) + } + if params != nil && params.RoomSid != nil { + data.Set("RoomSid", *params.RoomSid) + } + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) } + if params != nil && params.StatusCallbackMethod != nil { + data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) + } + if params != nil && params.Trim != nil { + data.Set("Trim", fmt.Sprint(*params.Trim)) + } + if params != nil && params.VideoLayout != nil { + v, err := json.Marshal(params.VideoLayout) - data.Set("VideoLayout", fmt.Sprint(v)) -} + if err != nil { + return nil, err + } + data.Set("VideoLayout", fmt.Sprint(v)) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &VideoV1Composition{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VideoV1Composition{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateCompositionHookParams Optional parameters for the method 'CreateCompositionHook' type CreateCompositionHookParams struct { - AudioSources *[]string `json:"AudioSources,omitempty"` - AudioSourcesExcluded *[]string `json:"AudioSourcesExcluded,omitempty"` - Enabled *bool `json:"Enabled,omitempty"` - Format *string `json:"Format,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Resolution *string `json:"Resolution,omitempty"` - StatusCallback *string `json:"StatusCallback,omitempty"` - StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` - Trim *bool `json:"Trim,omitempty"` - VideoLayout *map[string]interface{} `json:"VideoLayout,omitempty"` + AudioSources *[]string `json:"AudioSources,omitempty"` + AudioSourcesExcluded *[]string `json:"AudioSourcesExcluded,omitempty"` + Enabled *bool `json:"Enabled,omitempty"` + Format *string `json:"Format,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Resolution *string `json:"Resolution,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` + StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` + Trim *bool `json:"Trim,omitempty"` + VideoLayout *map[string]interface{} `json:"VideoLayout,omitempty"` } /* @@ -143,73 +143,73 @@ type CreateCompositionHookParams struct { * @param "Trim" (bool) - Whether to clip the intervals where there is no active media in the Compositions triggered by the composition hook. The default is `true`. Compositions with `trim` enabled are shorter when the Room is created and no Participant joins for a while as well as if all the Participants leave the room and join later, because those gaps will be removed. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info. * @param "VideoLayout" (map[string]interface{}) - An object that describes the video layout of the composition hook in terms of regions. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info. * @return VideoV1CompositionHook -*/ + */ func (c *DefaultApiService) CreateCompositionHook(params *CreateCompositionHookParams) (*VideoV1CompositionHook, error) { - path := "/v1/CompositionHooks" + path := "/v1/CompositionHooks" - data := url.Values{} - headers := 0 - - if params != nil && params.AudioSources != nil { - data.Set("AudioSources", strings.Join(*params.AudioSources, ",")) -} - if params != nil && params.AudioSourcesExcluded != nil { - data.Set("AudioSourcesExcluded", strings.Join(*params.AudioSourcesExcluded, ",")) -} - if params != nil && params.Enabled != nil { - data.Set("Enabled", fmt.Sprint(*params.Enabled)) -} - if params != nil && params.Format != nil { - data.Set("Format", *params.Format) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.Resolution != nil { - data.Set("Resolution", *params.Resolution) -} - if params != nil && params.StatusCallback != nil { - data.Set("StatusCallback", *params.StatusCallback) -} - if params != nil && params.StatusCallbackMethod != nil { - data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) -} - if params != nil && params.Trim != nil { - data.Set("Trim", fmt.Sprint(*params.Trim)) -} - if params != nil && params.VideoLayout != nil { - v, err := json.Marshal(params.VideoLayout) + data := url.Values{} + headers := 0 - if err != nil { - return nil, err + if params != nil && params.AudioSources != nil { + data.Set("AudioSources", strings.Join(*params.AudioSources, ",")) + } + if params != nil && params.AudioSourcesExcluded != nil { + data.Set("AudioSourcesExcluded", strings.Join(*params.AudioSourcesExcluded, ",")) + } + if params != nil && params.Enabled != nil { + data.Set("Enabled", fmt.Sprint(*params.Enabled)) + } + if params != nil && params.Format != nil { + data.Set("Format", *params.Format) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Resolution != nil { + data.Set("Resolution", *params.Resolution) + } + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) + } + if params != nil && params.StatusCallbackMethod != nil { + data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) + } + if params != nil && params.Trim != nil { + data.Set("Trim", fmt.Sprint(*params.Trim)) } + if params != nil && params.VideoLayout != nil { + v, err := json.Marshal(params.VideoLayout) - data.Set("VideoLayout", fmt.Sprint(v)) -} + if err != nil { + return nil, err + } + data.Set("VideoLayout", fmt.Sprint(v)) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &VideoV1CompositionHook{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VideoV1CompositionHook{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateCompositionSettingsParams Optional parameters for the method 'CreateCompositionSettings' type CreateCompositionSettingsParams struct { AwsCredentialsSid *string `json:"AwsCredentialsSid,omitempty"` - AwsS3Url *string `json:"AwsS3Url,omitempty"` - AwsStorageEnabled *bool `json:"AwsStorageEnabled,omitempty"` - EncryptionEnabled *bool `json:"EncryptionEnabled,omitempty"` - EncryptionKeySid *string `json:"EncryptionKeySid,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` + AwsS3Url *string `json:"AwsS3Url,omitempty"` + AwsStorageEnabled *bool `json:"AwsStorageEnabled,omitempty"` + EncryptionEnabled *bool `json:"EncryptionEnabled,omitempty"` + EncryptionKeySid *string `json:"EncryptionKeySid,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` } /* @@ -222,55 +222,55 @@ type CreateCompositionSettingsParams struct { * @param "EncryptionKeySid" (string) - The SID of the Public Key resource to use for encryption. * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource and show to the user in the console * @return VideoV1CompositionSettings -*/ + */ func (c *DefaultApiService) CreateCompositionSettings(params *CreateCompositionSettingsParams) (*VideoV1CompositionSettings, error) { - path := "/v1/CompositionSettings/Default" + path := "/v1/CompositionSettings/Default" - data := url.Values{} - headers := 0 - - if params != nil && params.AwsCredentialsSid != nil { - data.Set("AwsCredentialsSid", *params.AwsCredentialsSid) -} - if params != nil && params.AwsS3Url != nil { - data.Set("AwsS3Url", *params.AwsS3Url) -} - if params != nil && params.AwsStorageEnabled != nil { - data.Set("AwsStorageEnabled", fmt.Sprint(*params.AwsStorageEnabled)) -} - if params != nil && params.EncryptionEnabled != nil { - data.Set("EncryptionEnabled", fmt.Sprint(*params.EncryptionEnabled)) -} - if params != nil && params.EncryptionKeySid != nil { - data.Set("EncryptionKeySid", *params.EncryptionKeySid) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} + data := url.Values{} + headers := 0 + if params != nil && params.AwsCredentialsSid != nil { + data.Set("AwsCredentialsSid", *params.AwsCredentialsSid) + } + if params != nil && params.AwsS3Url != nil { + data.Set("AwsS3Url", *params.AwsS3Url) + } + if params != nil && params.AwsStorageEnabled != nil { + data.Set("AwsStorageEnabled", fmt.Sprint(*params.AwsStorageEnabled)) + } + if params != nil && params.EncryptionEnabled != nil { + data.Set("EncryptionEnabled", fmt.Sprint(*params.EncryptionEnabled)) + } + if params != nil && params.EncryptionKeySid != nil { + data.Set("EncryptionKeySid", *params.EncryptionKeySid) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &VideoV1CompositionSettings{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VideoV1CompositionSettings{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateRecordingSettingsParams Optional parameters for the method 'CreateRecordingSettings' type CreateRecordingSettingsParams struct { AwsCredentialsSid *string `json:"AwsCredentialsSid,omitempty"` - AwsS3Url *string `json:"AwsS3Url,omitempty"` - AwsStorageEnabled *bool `json:"AwsStorageEnabled,omitempty"` - EncryptionEnabled *bool `json:"EncryptionEnabled,omitempty"` - EncryptionKeySid *string `json:"EncryptionKeySid,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` + AwsS3Url *string `json:"AwsS3Url,omitempty"` + AwsStorageEnabled *bool `json:"AwsStorageEnabled,omitempty"` + EncryptionEnabled *bool `json:"EncryptionEnabled,omitempty"` + EncryptionKeySid *string `json:"EncryptionKeySid,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` } /* @@ -283,58 +283,58 @@ type CreateRecordingSettingsParams struct { * @param "EncryptionKeySid" (string) - The SID of the Public Key resource to use for encryption. * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource and be shown to users in the console * @return VideoV1RecordingSettings -*/ + */ func (c *DefaultApiService) CreateRecordingSettings(params *CreateRecordingSettingsParams) (*VideoV1RecordingSettings, error) { - path := "/v1/RecordingSettings/Default" + path := "/v1/RecordingSettings/Default" - data := url.Values{} - headers := 0 - - if params != nil && params.AwsCredentialsSid != nil { - data.Set("AwsCredentialsSid", *params.AwsCredentialsSid) -} - if params != nil && params.AwsS3Url != nil { - data.Set("AwsS3Url", *params.AwsS3Url) -} - if params != nil && params.AwsStorageEnabled != nil { - data.Set("AwsStorageEnabled", fmt.Sprint(*params.AwsStorageEnabled)) -} - if params != nil && params.EncryptionEnabled != nil { - data.Set("EncryptionEnabled", fmt.Sprint(*params.EncryptionEnabled)) -} - if params != nil && params.EncryptionKeySid != nil { - data.Set("EncryptionKeySid", *params.EncryptionKeySid) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} + data := url.Values{} + headers := 0 + if params != nil && params.AwsCredentialsSid != nil { + data.Set("AwsCredentialsSid", *params.AwsCredentialsSid) + } + if params != nil && params.AwsS3Url != nil { + data.Set("AwsS3Url", *params.AwsS3Url) + } + if params != nil && params.AwsStorageEnabled != nil { + data.Set("AwsStorageEnabled", fmt.Sprint(*params.AwsStorageEnabled)) + } + if params != nil && params.EncryptionEnabled != nil { + data.Set("EncryptionEnabled", fmt.Sprint(*params.EncryptionEnabled)) + } + if params != nil && params.EncryptionKeySid != nil { + data.Set("EncryptionKeySid", *params.EncryptionKeySid) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &VideoV1RecordingSettings{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VideoV1RecordingSettings{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateRoomParams Optional parameters for the method 'CreateRoom' type CreateRoomParams struct { - EnableTurn *bool `json:"EnableTurn,omitempty"` - MaxParticipants *int32 `json:"MaxParticipants,omitempty"` - MediaRegion *string `json:"MediaRegion,omitempty"` - RecordParticipantsOnConnect *bool `json:"RecordParticipantsOnConnect,omitempty"` - StatusCallback *string `json:"StatusCallback,omitempty"` - StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` - Type *string `json:"Type,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` - VideoCodecs *[]string `json:"VideoCodecs,omitempty"` + EnableTurn *bool `json:"EnableTurn,omitempty"` + MaxParticipants *int32 `json:"MaxParticipants,omitempty"` + MediaRegion *string `json:"MediaRegion,omitempty"` + RecordParticipantsOnConnect *bool `json:"RecordParticipantsOnConnect,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` + StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` + Type *string `json:"Type,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` + VideoCodecs *[]string `json:"VideoCodecs,omitempty"` } /* @@ -350,152 +350,143 @@ type CreateRoomParams struct { * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. It can be used as a `room_sid` in place of the resource's `sid` in the URL to address the resource. This value is unique for `in-progress` rooms. SDK clients can use this name to connect to the room. REST API clients can use this name in place of the Room SID to interact with the room as long as the room is `in-progress`. * @param "VideoCodecs" ([]string) - An array of the video codecs that are supported when publishing a track in the room. Can be: `VP8` and `H264`. ***This feature is not available in `peer-to-peer` rooms*** * @return VideoV1Room -*/ + */ func (c *DefaultApiService) CreateRoom(params *CreateRoomParams) (*VideoV1Room, error) { - path := "/v1/Rooms" + path := "/v1/Rooms" - data := url.Values{} - headers := 0 - - if params != nil && params.EnableTurn != nil { - data.Set("EnableTurn", fmt.Sprint(*params.EnableTurn)) -} - if params != nil && params.MaxParticipants != nil { - data.Set("MaxParticipants", fmt.Sprint(*params.MaxParticipants)) -} - if params != nil && params.MediaRegion != nil { - data.Set("MediaRegion", *params.MediaRegion) -} - if params != nil && params.RecordParticipantsOnConnect != nil { - data.Set("RecordParticipantsOnConnect", fmt.Sprint(*params.RecordParticipantsOnConnect)) -} - if params != nil && params.StatusCallback != nil { - data.Set("StatusCallback", *params.StatusCallback) -} - if params != nil && params.StatusCallbackMethod != nil { - data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) -} - if params != nil && params.Type != nil { - data.Set("Type", *params.Type) -} - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) -} - if params != nil && params.VideoCodecs != nil { - data.Set("VideoCodecs", strings.Join(*params.VideoCodecs, ",")) -} + data := url.Values{} + headers := 0 + if params != nil && params.EnableTurn != nil { + data.Set("EnableTurn", fmt.Sprint(*params.EnableTurn)) + } + if params != nil && params.MaxParticipants != nil { + data.Set("MaxParticipants", fmt.Sprint(*params.MaxParticipants)) + } + if params != nil && params.MediaRegion != nil { + data.Set("MediaRegion", *params.MediaRegion) + } + if params != nil && params.RecordParticipantsOnConnect != nil { + data.Set("RecordParticipantsOnConnect", fmt.Sprint(*params.RecordParticipantsOnConnect)) + } + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) + } + if params != nil && params.StatusCallbackMethod != nil { + data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) + } + if params != nil && params.Type != nil { + data.Set("Type", *params.Type) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } + if params != nil && params.VideoCodecs != nil { + data.Set("VideoCodecs", strings.Join(*params.VideoCodecs, ",")) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &VideoV1Room{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VideoV1Room{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * DeleteComposition Method for DeleteComposition * Delete a Recording Composition resource identified by a Composition SID. * @param Sid The SID of the Composition resource to delete. -*/ -func (c *DefaultApiService) DeleteComposition(Sid string, ) (error) { - path := "/v1/Compositions/{Sid}" + */ +func (c *DefaultApiService) DeleteComposition(Sid string) error { + path := "/v1/Compositions/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* * DeleteCompositionHook Method for DeleteCompositionHook * Delete a Recording CompositionHook resource identified by a `CompositionHook SID`. * @param Sid The SID of the CompositionHook resource to delete. -*/ -func (c *DefaultApiService) DeleteCompositionHook(Sid string, ) (error) { - path := "/v1/CompositionHooks/{Sid}" + */ +func (c *DefaultApiService) DeleteCompositionHook(Sid string) error { + path := "/v1/CompositionHooks/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* * DeleteRecording Method for DeleteRecording * Delete a Recording resource identified by a Recording SID. * @param Sid The SID of the Recording resource to delete. -*/ -func (c *DefaultApiService) DeleteRecording(Sid string, ) (error) { - path := "/v1/Recordings/{Sid}" + */ +func (c *DefaultApiService) DeleteRecording(Sid string) error { + path := "/v1/Recordings/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* * DeleteRoomRecording Method for DeleteRoomRecording * @param RoomSid The SID of the room with the RoomRecording resource to delete. * @param Sid The SID of the RoomRecording resource to delete. -*/ -func (c *DefaultApiService) DeleteRoomRecording(RoomSid string, Sid string, ) (error) { - path := "/v1/Rooms/{RoomSid}/Recordings/{Sid}" + */ +func (c *DefaultApiService) DeleteRoomRecording(RoomSid string, Sid string) error { + path := "/v1/Rooms/{RoomSid}/Recordings/{Sid}" path = strings.Replace(path, "{"+"RoomSid"+"}", RoomSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + defer resp.Body.Close() - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() - - return nil + return nil } /* @@ -503,29 +494,27 @@ func (c *DefaultApiService) DeleteRoomRecording(RoomSid string, Sid string, ) (e * Returns a single Composition resource identified by a Composition SID. * @param Sid The SID of the Composition resource to fetch. * @return VideoV1Composition -*/ -func (c *DefaultApiService) FetchComposition(Sid string, ) (*VideoV1Composition, error) { - path := "/v1/Compositions/{Sid}" + */ +func (c *DefaultApiService) FetchComposition(Sid string) (*VideoV1Composition, error) { + path := "/v1/Compositions/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &VideoV1Composition{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VideoV1Composition{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -533,56 +522,52 @@ func (c *DefaultApiService) FetchComposition(Sid string, ) (*VideoV1Composition, * Returns a single CompositionHook resource identified by a CompositionHook SID. * @param Sid The SID of the CompositionHook resource to fetch. * @return VideoV1CompositionHook -*/ -func (c *DefaultApiService) FetchCompositionHook(Sid string, ) (*VideoV1CompositionHook, error) { - path := "/v1/CompositionHooks/{Sid}" + */ +func (c *DefaultApiService) FetchCompositionHook(Sid string) (*VideoV1CompositionHook, error) { + path := "/v1/CompositionHooks/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &VideoV1CompositionHook{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VideoV1CompositionHook{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * FetchCompositionSettings Method for FetchCompositionSettings * @return VideoV1CompositionSettings -*/ + */ func (c *DefaultApiService) FetchCompositionSettings() (*VideoV1CompositionSettings, error) { - path := "/v1/CompositionSettings/Default" - - data := url.Values{} - headers := 0 - + path := "/v1/CompositionSettings/Default" + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &VideoV1CompositionSettings{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VideoV1CompositionSettings{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -590,85 +575,79 @@ func (c *DefaultApiService) FetchCompositionSettings() (*VideoV1CompositionSetti * Returns a single Recording resource identified by a Recording SID. * @param Sid The SID of the Recording resource to fetch. * @return VideoV1Recording -*/ -func (c *DefaultApiService) FetchRecording(Sid string, ) (*VideoV1Recording, error) { - path := "/v1/Recordings/{Sid}" + */ +func (c *DefaultApiService) FetchRecording(Sid string) (*VideoV1Recording, error) { + path := "/v1/Recordings/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &VideoV1Recording{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VideoV1Recording{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * FetchRecordingSettings Method for FetchRecordingSettings * @return VideoV1RecordingSettings -*/ + */ func (c *DefaultApiService) FetchRecordingSettings() (*VideoV1RecordingSettings, error) { - path := "/v1/RecordingSettings/Default" - - data := url.Values{} - headers := 0 + path := "/v1/RecordingSettings/Default" + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &VideoV1RecordingSettings{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VideoV1RecordingSettings{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * FetchRoom Method for FetchRoom * @param Sid The SID of the Room resource to fetch. * @return VideoV1Room -*/ -func (c *DefaultApiService) FetchRoom(Sid string, ) (*VideoV1Room, error) { - path := "/v1/Rooms/{Sid}" + */ +func (c *DefaultApiService) FetchRoom(Sid string) (*VideoV1Room, error) { + path := "/v1/Rooms/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &VideoV1Room{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VideoV1Room{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -676,30 +655,28 @@ func (c *DefaultApiService) FetchRoom(Sid string, ) (*VideoV1Room, error) { * @param RoomSid The SID of the room with the Participant resource to fetch. * @param Sid The SID of the RoomParticipant resource to fetch. * @return VideoV1RoomRoomParticipant -*/ -func (c *DefaultApiService) FetchRoomParticipant(RoomSid string, Sid string, ) (*VideoV1RoomRoomParticipant, error) { - path := "/v1/Rooms/{RoomSid}/Participants/{Sid}" + */ +func (c *DefaultApiService) FetchRoomParticipant(RoomSid string, Sid string) (*VideoV1RoomRoomParticipant, error) { + path := "/v1/Rooms/{RoomSid}/Participants/{Sid}" path = strings.Replace(path, "{"+"RoomSid"+"}", RoomSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &VideoV1RoomRoomParticipant{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VideoV1RoomRoomParticipant{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -709,31 +686,29 @@ func (c *DefaultApiService) FetchRoomParticipant(RoomSid string, Sid string, ) ( * @param ParticipantSid The SID of the Participant resource with the published track to fetch. * @param Sid The SID of the RoomParticipantPublishedTrack resource to fetch. * @return VideoV1RoomRoomParticipantRoomParticipantPublishedTrack -*/ -func (c *DefaultApiService) FetchRoomParticipantPublishedTrack(RoomSid string, ParticipantSid string, Sid string, ) (*VideoV1RoomRoomParticipantRoomParticipantPublishedTrack, error) { - path := "/v1/Rooms/{RoomSid}/Participants/{ParticipantSid}/PublishedTracks/{Sid}" + */ +func (c *DefaultApiService) FetchRoomParticipantPublishedTrack(RoomSid string, ParticipantSid string, Sid string) (*VideoV1RoomRoomParticipantRoomParticipantPublishedTrack, error) { + path := "/v1/Rooms/{RoomSid}/Participants/{ParticipantSid}/PublishedTracks/{Sid}" path = strings.Replace(path, "{"+"RoomSid"+"}", RoomSid, -1) path = strings.Replace(path, "{"+"ParticipantSid"+"}", ParticipantSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &VideoV1RoomRoomParticipantRoomParticipantPublishedTrack{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VideoV1RoomRoomParticipantRoomParticipantPublishedTrack{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -742,30 +717,28 @@ func (c *DefaultApiService) FetchRoomParticipantPublishedTrack(RoomSid string, P * @param RoomSid The SID of the Room resource where the subscribe rules to fetch apply. * @param ParticipantSid The SID of the Participant resource with the subscribe rules to fetch. * @return VideoV1RoomRoomParticipantRoomParticipantSubscribeRule -*/ -func (c *DefaultApiService) FetchRoomParticipantSubscribeRule(RoomSid string, ParticipantSid string, ) (*VideoV1RoomRoomParticipantRoomParticipantSubscribeRule, error) { - path := "/v1/Rooms/{RoomSid}/Participants/{ParticipantSid}/SubscribeRules" + */ +func (c *DefaultApiService) FetchRoomParticipantSubscribeRule(RoomSid string, ParticipantSid string) (*VideoV1RoomRoomParticipantRoomParticipantSubscribeRule, error) { + path := "/v1/Rooms/{RoomSid}/Participants/{ParticipantSid}/SubscribeRules" path = strings.Replace(path, "{"+"RoomSid"+"}", RoomSid, -1) path = strings.Replace(path, "{"+"ParticipantSid"+"}", ParticipantSid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &VideoV1RoomRoomParticipantRoomParticipantSubscribeRule{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VideoV1RoomRoomParticipantRoomParticipantSubscribeRule{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -775,31 +748,29 @@ func (c *DefaultApiService) FetchRoomParticipantSubscribeRule(RoomSid string, Pa * @param ParticipantSid The SID of the participant that subscribes to the Track resource to fetch. * @param Sid The SID of the RoomParticipantSubscribedTrack resource to fetch. * @return VideoV1RoomRoomParticipantRoomParticipantSubscribedTrack -*/ -func (c *DefaultApiService) FetchRoomParticipantSubscribedTrack(RoomSid string, ParticipantSid string, Sid string, ) (*VideoV1RoomRoomParticipantRoomParticipantSubscribedTrack, error) { - path := "/v1/Rooms/{RoomSid}/Participants/{ParticipantSid}/SubscribedTracks/{Sid}" + */ +func (c *DefaultApiService) FetchRoomParticipantSubscribedTrack(RoomSid string, ParticipantSid string, Sid string) (*VideoV1RoomRoomParticipantRoomParticipantSubscribedTrack, error) { + path := "/v1/Rooms/{RoomSid}/Participants/{ParticipantSid}/SubscribedTracks/{Sid}" path = strings.Replace(path, "{"+"RoomSid"+"}", RoomSid, -1) path = strings.Replace(path, "{"+"ParticipantSid"+"}", ParticipantSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &VideoV1RoomRoomParticipantRoomParticipantSubscribedTrack{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VideoV1RoomRoomParticipantRoomParticipantSubscribedTrack{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -807,30 +778,28 @@ func (c *DefaultApiService) FetchRoomParticipantSubscribedTrack(RoomSid string, * @param RoomSid The SID of the Room resource with the recording to fetch. * @param Sid The SID of the RoomRecording resource to fetch. * @return VideoV1RoomRoomRecording -*/ -func (c *DefaultApiService) FetchRoomRecording(RoomSid string, Sid string, ) (*VideoV1RoomRoomRecording, error) { - path := "/v1/Rooms/{RoomSid}/Recordings/{Sid}" + */ +func (c *DefaultApiService) FetchRoomRecording(RoomSid string, Sid string) (*VideoV1RoomRoomRecording, error) { + path := "/v1/Rooms/{RoomSid}/Recordings/{Sid}" path = strings.Replace(path, "{"+"RoomSid"+"}", RoomSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &VideoV1RoomRoomRecording{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VideoV1RoomRoomRecording{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -838,37 +807,36 @@ func (c *DefaultApiService) FetchRoomRecording(RoomSid string, Sid string, ) (*V * Returns a list of Recording Rules for the Room. * @param RoomSid The SID of the Room resource where the recording rules to fetch apply. * @return VideoV1RoomRoomRecordingRule -*/ -func (c *DefaultApiService) FetchRoomRecordingRule(RoomSid string, ) (*VideoV1RoomRoomRecordingRule, error) { - path := "/v1/Rooms/{RoomSid}/RecordingRules" + */ +func (c *DefaultApiService) FetchRoomRecordingRule(RoomSid string) (*VideoV1RoomRoomRecordingRule, error) { + path := "/v1/Rooms/{RoomSid}/RecordingRules" path = strings.Replace(path, "{"+"RoomSid"+"}", RoomSid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &VideoV1RoomRoomRecordingRule{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VideoV1RoomRoomRecordingRule{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListCompositionParams Optional parameters for the method 'ListComposition' type ListCompositionParams struct { - Status *string `json:"Status,omitempty"` - DateCreatedAfter *time.Time `json:"DateCreatedAfter,omitempty"` + Status *string `json:"Status,omitempty"` + DateCreatedAfter *time.Time `json:"DateCreatedAfter,omitempty"` DateCreatedBefore *time.Time `json:"DateCreatedBefore,omitempty"` - RoomSid *string `json:"RoomSid,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + RoomSid *string `json:"RoomSid,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -881,51 +849,51 @@ type ListCompositionParams struct { * @param "RoomSid" (string) - Read only Composition resources with this Room SID. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListCompositionResponse -*/ + */ func (c *DefaultApiService) ListComposition(params *ListCompositionParams) (*ListCompositionResponse, error) { - path := "/v1/Compositions" + path := "/v1/Compositions" - data := url.Values{} - headers := 0 - - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) -} - if params != nil && params.DateCreatedAfter != nil { - data.Set("DateCreatedAfter", fmt.Sprint(*params.DateCreatedAfter)) -} - if params != nil && params.DateCreatedBefore != nil { - data.Set("DateCreatedBefore", fmt.Sprint(*params.DateCreatedBefore)) -} - if params != nil && params.RoomSid != nil { - data.Set("RoomSid", *params.RoomSid) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + if params != nil && params.DateCreatedAfter != nil { + data.Set("DateCreatedAfter", fmt.Sprint(*params.DateCreatedAfter)) + } + if params != nil && params.DateCreatedBefore != nil { + data.Set("DateCreatedBefore", fmt.Sprint(*params.DateCreatedBefore)) + } + if params != nil && params.RoomSid != nil { + data.Set("RoomSid", *params.RoomSid) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListCompositionResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListCompositionResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListCompositionHookParams Optional parameters for the method 'ListCompositionHook' type ListCompositionHookParams struct { - Enabled *bool `json:"Enabled,omitempty"` - DateCreatedAfter *time.Time `json:"DateCreatedAfter,omitempty"` + Enabled *bool `json:"Enabled,omitempty"` + DateCreatedAfter *time.Time `json:"DateCreatedAfter,omitempty"` DateCreatedBefore *time.Time `json:"DateCreatedBefore,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -938,53 +906,53 @@ type ListCompositionHookParams struct { * @param "FriendlyName" (string) - Read only CompositionHook resources with friendly names that match this string. The match is not case sensitive and can include asterisk `*` characters as wildcard match. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListCompositionHookResponse -*/ + */ func (c *DefaultApiService) ListCompositionHook(params *ListCompositionHookParams) (*ListCompositionHookResponse, error) { - path := "/v1/CompositionHooks" + path := "/v1/CompositionHooks" - data := url.Values{} - headers := 0 - - if params != nil && params.Enabled != nil { - data.Set("Enabled", fmt.Sprint(*params.Enabled)) -} - if params != nil && params.DateCreatedAfter != nil { - data.Set("DateCreatedAfter", fmt.Sprint(*params.DateCreatedAfter)) -} - if params != nil && params.DateCreatedBefore != nil { - data.Set("DateCreatedBefore", fmt.Sprint(*params.DateCreatedBefore)) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.Enabled != nil { + data.Set("Enabled", fmt.Sprint(*params.Enabled)) + } + if params != nil && params.DateCreatedAfter != nil { + data.Set("DateCreatedAfter", fmt.Sprint(*params.DateCreatedAfter)) + } + if params != nil && params.DateCreatedBefore != nil { + data.Set("DateCreatedBefore", fmt.Sprint(*params.DateCreatedBefore)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListCompositionHookResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListCompositionHookResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListRecordingParams Optional parameters for the method 'ListRecording' type ListRecordingParams struct { - Status *string `json:"Status,omitempty"` - SourceSid *string `json:"SourceSid,omitempty"` - GroupingSid *[]string `json:"GroupingSid,omitempty"` - DateCreatedAfter *time.Time `json:"DateCreatedAfter,omitempty"` + Status *string `json:"Status,omitempty"` + SourceSid *string `json:"SourceSid,omitempty"` + GroupingSid *[]string `json:"GroupingSid,omitempty"` + DateCreatedAfter *time.Time `json:"DateCreatedAfter,omitempty"` DateCreatedBefore *time.Time `json:"DateCreatedBefore,omitempty"` - MediaType *string `json:"MediaType,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + MediaType *string `json:"MediaType,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -999,57 +967,57 @@ type ListRecordingParams struct { * @param "MediaType" (string) - Read only recordings that have this media type. Can be either `audio` or `video`. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListRecordingResponse -*/ + */ func (c *DefaultApiService) ListRecording(params *ListRecordingParams) (*ListRecordingResponse, error) { - path := "/v1/Recordings" - - data := url.Values{} - headers := 0 + path := "/v1/Recordings" - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) -} - if params != nil && params.SourceSid != nil { - data.Set("SourceSid", *params.SourceSid) -} - if params != nil && params.GroupingSid != nil { - data.Set("GroupingSid", strings.Join(*params.GroupingSid, ",")) -} - if params != nil && params.DateCreatedAfter != nil { - data.Set("DateCreatedAfter", fmt.Sprint(*params.DateCreatedAfter)) -} - if params != nil && params.DateCreatedBefore != nil { - data.Set("DateCreatedBefore", fmt.Sprint(*params.DateCreatedBefore)) -} - if params != nil && params.MediaType != nil { - data.Set("MediaType", *params.MediaType) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + if params != nil && params.SourceSid != nil { + data.Set("SourceSid", *params.SourceSid) + } + if params != nil && params.GroupingSid != nil { + data.Set("GroupingSid", strings.Join(*params.GroupingSid, ",")) + } + if params != nil && params.DateCreatedAfter != nil { + data.Set("DateCreatedAfter", fmt.Sprint(*params.DateCreatedAfter)) + } + if params != nil && params.DateCreatedBefore != nil { + data.Set("DateCreatedBefore", fmt.Sprint(*params.DateCreatedBefore)) + } + if params != nil && params.MediaType != nil { + data.Set("MediaType", *params.MediaType) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListRecordingResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListRecordingResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListRoomParams Optional parameters for the method 'ListRoom' type ListRoomParams struct { - Status *string `json:"Status,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` - DateCreatedAfter *time.Time `json:"DateCreatedAfter,omitempty"` + Status *string `json:"Status,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` + DateCreatedAfter *time.Time `json:"DateCreatedAfter,omitempty"` DateCreatedBefore *time.Time `json:"DateCreatedBefore,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -1061,51 +1029,51 @@ type ListRoomParams struct { * @param "DateCreatedBefore" (time.Time) - Read only rooms that started before this date, given as `YYYY-MM-DD`. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListRoomResponse -*/ + */ func (c *DefaultApiService) ListRoom(params *ListRoomParams) (*ListRoomResponse, error) { - path := "/v1/Rooms" + path := "/v1/Rooms" - data := url.Values{} - headers := 0 - - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) -} - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) -} - if params != nil && params.DateCreatedAfter != nil { - data.Set("DateCreatedAfter", fmt.Sprint(*params.DateCreatedAfter)) -} - if params != nil && params.DateCreatedBefore != nil { - data.Set("DateCreatedBefore", fmt.Sprint(*params.DateCreatedBefore)) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } + if params != nil && params.DateCreatedAfter != nil { + data.Set("DateCreatedAfter", fmt.Sprint(*params.DateCreatedAfter)) + } + if params != nil && params.DateCreatedBefore != nil { + data.Set("DateCreatedBefore", fmt.Sprint(*params.DateCreatedBefore)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListRoomResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListRoomResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListRoomParticipantParams Optional parameters for the method 'ListRoomParticipant' type ListRoomParticipantParams struct { - Status *string `json:"Status,omitempty"` - Identity *string `json:"Identity,omitempty"` - DateCreatedAfter *time.Time `json:"DateCreatedAfter,omitempty"` + Status *string `json:"Status,omitempty"` + Identity *string `json:"Identity,omitempty"` + DateCreatedAfter *time.Time `json:"DateCreatedAfter,omitempty"` DateCreatedBefore *time.Time `json:"DateCreatedBefore,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -1118,45 +1086,45 @@ type ListRoomParticipantParams struct { * @param "DateCreatedBefore" (time.Time) - Read only Participants that started before this date in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601#UTC) format. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListRoomParticipantResponse -*/ + */ func (c *DefaultApiService) ListRoomParticipant(RoomSid string, params *ListRoomParticipantParams) (*ListRoomParticipantResponse, error) { - path := "/v1/Rooms/{RoomSid}/Participants" + path := "/v1/Rooms/{RoomSid}/Participants" path = strings.Replace(path, "{"+"RoomSid"+"}", RoomSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) -} - if params != nil && params.Identity != nil { - data.Set("Identity", *params.Identity) -} - if params != nil && params.DateCreatedAfter != nil { - data.Set("DateCreatedAfter", fmt.Sprint(*params.DateCreatedAfter)) -} - if params != nil && params.DateCreatedBefore != nil { - data.Set("DateCreatedBefore", fmt.Sprint(*params.DateCreatedBefore)) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + if params != nil && params.Identity != nil { + data.Set("Identity", *params.Identity) + } + if params != nil && params.DateCreatedAfter != nil { + data.Set("DateCreatedAfter", fmt.Sprint(*params.DateCreatedAfter)) + } + if params != nil && params.DateCreatedBefore != nil { + data.Set("DateCreatedBefore", fmt.Sprint(*params.DateCreatedBefore)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListRoomParticipantResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListRoomParticipantResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListRoomParticipantPublishedTrackParams Optional parameters for the method 'ListRoomParticipantPublishedTrack' type ListRoomParticipantPublishedTrackParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1170,34 +1138,34 @@ type ListRoomParticipantPublishedTrackParams struct { * @param optional nil or *ListRoomParticipantPublishedTrackParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListRoomParticipantPublishedTrackResponse -*/ + */ func (c *DefaultApiService) ListRoomParticipantPublishedTrack(RoomSid string, ParticipantSid string, params *ListRoomParticipantPublishedTrackParams) (*ListRoomParticipantPublishedTrackResponse, error) { - path := "/v1/Rooms/{RoomSid}/Participants/{ParticipantSid}/PublishedTracks" + path := "/v1/Rooms/{RoomSid}/Participants/{ParticipantSid}/PublishedTracks" path = strings.Replace(path, "{"+"RoomSid"+"}", RoomSid, -1) path = strings.Replace(path, "{"+"ParticipantSid"+"}", ParticipantSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListRoomParticipantPublishedTrackResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListRoomParticipantPublishedTrackResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListRoomParticipantSubscribedTrackParams Optional parameters for the method 'ListRoomParticipantSubscribedTrack' type ListRoomParticipantSubscribedTrackParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -1211,41 +1179,41 @@ type ListRoomParticipantSubscribedTrackParams struct { * @param optional nil or *ListRoomParticipantSubscribedTrackParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListRoomParticipantSubscribedTrackResponse -*/ + */ func (c *DefaultApiService) ListRoomParticipantSubscribedTrack(RoomSid string, ParticipantSid string, params *ListRoomParticipantSubscribedTrackParams) (*ListRoomParticipantSubscribedTrackResponse, error) { - path := "/v1/Rooms/{RoomSid}/Participants/{ParticipantSid}/SubscribedTracks" + path := "/v1/Rooms/{RoomSid}/Participants/{ParticipantSid}/SubscribedTracks" path = strings.Replace(path, "{"+"RoomSid"+"}", RoomSid, -1) path = strings.Replace(path, "{"+"ParticipantSid"+"}", ParticipantSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListRoomParticipantSubscribedTrackResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListRoomParticipantSubscribedTrackResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListRoomRecordingParams Optional parameters for the method 'ListRoomRecording' type ListRoomRecordingParams struct { - Status *string `json:"Status,omitempty"` - SourceSid *string `json:"SourceSid,omitempty"` - DateCreatedAfter *time.Time `json:"DateCreatedAfter,omitempty"` + Status *string `json:"Status,omitempty"` + SourceSid *string `json:"SourceSid,omitempty"` + DateCreatedAfter *time.Time `json:"DateCreatedAfter,omitempty"` DateCreatedBefore *time.Time `json:"DateCreatedBefore,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -1258,57 +1226,57 @@ type ListRoomRecordingParams struct { * @param "DateCreatedBefore" (time.Time) - Read only Recordings that started before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime with time zone. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListRoomRecordingResponse -*/ + */ func (c *DefaultApiService) ListRoomRecording(RoomSid string, params *ListRoomRecordingParams) (*ListRoomRecordingResponse, error) { - path := "/v1/Rooms/{RoomSid}/Recordings" + path := "/v1/Rooms/{RoomSid}/Recordings" path = strings.Replace(path, "{"+"RoomSid"+"}", RoomSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) -} - if params != nil && params.SourceSid != nil { - data.Set("SourceSid", *params.SourceSid) -} - if params != nil && params.DateCreatedAfter != nil { - data.Set("DateCreatedAfter", fmt.Sprint(*params.DateCreatedAfter)) -} - if params != nil && params.DateCreatedBefore != nil { - data.Set("DateCreatedBefore", fmt.Sprint(*params.DateCreatedBefore)) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + if params != nil && params.SourceSid != nil { + data.Set("SourceSid", *params.SourceSid) + } + if params != nil && params.DateCreatedAfter != nil { + data.Set("DateCreatedAfter", fmt.Sprint(*params.DateCreatedAfter)) + } + if params != nil && params.DateCreatedBefore != nil { + data.Set("DateCreatedBefore", fmt.Sprint(*params.DateCreatedBefore)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListRoomRecordingResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListRoomRecordingResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateCompositionHookParams Optional parameters for the method 'UpdateCompositionHook' type UpdateCompositionHookParams struct { - AudioSources *[]string `json:"AudioSources,omitempty"` - AudioSourcesExcluded *[]string `json:"AudioSourcesExcluded,omitempty"` - Enabled *bool `json:"Enabled,omitempty"` - Format *string `json:"Format,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Resolution *string `json:"Resolution,omitempty"` - StatusCallback *string `json:"StatusCallback,omitempty"` - StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` - Trim *bool `json:"Trim,omitempty"` - VideoLayout *map[string]interface{} `json:"VideoLayout,omitempty"` + AudioSources *[]string `json:"AudioSources,omitempty"` + AudioSourcesExcluded *[]string `json:"AudioSourcesExcluded,omitempty"` + Enabled *bool `json:"Enabled,omitempty"` + Format *string `json:"Format,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Resolution *string `json:"Resolution,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` + StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` + Trim *bool `json:"Trim,omitempty"` + VideoLayout *map[string]interface{} `json:"VideoLayout,omitempty"` } /* @@ -1326,66 +1294,66 @@ type UpdateCompositionHookParams struct { * @param "Trim" (bool) - Whether to clip the intervals where there is no active media in the compositions triggered by the composition hook. The default is `true`. Compositions with `trim` enabled are shorter when the Room is created and no Participant joins for a while as well as if all the Participants leave the room and join later, because those gaps will be removed. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info. * @param "VideoLayout" (map[string]interface{}) - A JSON object that describes the video layout of the composition hook in terms of regions. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info. * @return VideoV1CompositionHook -*/ + */ func (c *DefaultApiService) UpdateCompositionHook(Sid string, params *UpdateCompositionHookParams) (*VideoV1CompositionHook, error) { - path := "/v1/CompositionHooks/{Sid}" + path := "/v1/CompositionHooks/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.AudioSources != nil { - data.Set("AudioSources", strings.Join(*params.AudioSources, ",")) -} - if params != nil && params.AudioSourcesExcluded != nil { - data.Set("AudioSourcesExcluded", strings.Join(*params.AudioSourcesExcluded, ",")) -} - if params != nil && params.Enabled != nil { - data.Set("Enabled", fmt.Sprint(*params.Enabled)) -} - if params != nil && params.Format != nil { - data.Set("Format", *params.Format) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.Resolution != nil { - data.Set("Resolution", *params.Resolution) -} - if params != nil && params.StatusCallback != nil { - data.Set("StatusCallback", *params.StatusCallback) -} - if params != nil && params.StatusCallbackMethod != nil { - data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) -} - if params != nil && params.Trim != nil { - data.Set("Trim", fmt.Sprint(*params.Trim)) -} - if params != nil && params.VideoLayout != nil { - v, err := json.Marshal(params.VideoLayout) + data := url.Values{} + headers := 0 - if err != nil { - return nil, err + if params != nil && params.AudioSources != nil { + data.Set("AudioSources", strings.Join(*params.AudioSources, ",")) + } + if params != nil && params.AudioSourcesExcluded != nil { + data.Set("AudioSourcesExcluded", strings.Join(*params.AudioSourcesExcluded, ",")) } + if params != nil && params.Enabled != nil { + data.Set("Enabled", fmt.Sprint(*params.Enabled)) + } + if params != nil && params.Format != nil { + data.Set("Format", *params.Format) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Resolution != nil { + data.Set("Resolution", *params.Resolution) + } + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) + } + if params != nil && params.StatusCallbackMethod != nil { + data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) + } + if params != nil && params.Trim != nil { + data.Set("Trim", fmt.Sprint(*params.Trim)) + } + if params != nil && params.VideoLayout != nil { + v, err := json.Marshal(params.VideoLayout) - data.Set("VideoLayout", fmt.Sprint(v)) -} + if err != nil { + return nil, err + } + data.Set("VideoLayout", fmt.Sprint(v)) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &VideoV1CompositionHook{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VideoV1CompositionHook{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateRoomParams Optional parameters for the method 'UpdateRoom' type UpdateRoomParams struct { Status *string `json:"Status,omitempty"` @@ -1397,33 +1365,33 @@ type UpdateRoomParams struct { * @param optional nil or *UpdateRoomParams - Optional Parameters: * @param "Status" (string) - The new status of the resource. Set to `completed` to end the room. * @return VideoV1Room -*/ + */ func (c *DefaultApiService) UpdateRoom(Sid string, params *UpdateRoomParams) (*VideoV1Room, error) { - path := "/v1/Rooms/{Sid}" + path := "/v1/Rooms/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) -} + data := url.Values{} + headers := 0 + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &VideoV1Room{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VideoV1Room{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateRoomParticipantParams Optional parameters for the method 'UpdateRoomParticipant' type UpdateRoomParticipantParams struct { Status *string `json:"Status,omitempty"` @@ -1436,34 +1404,34 @@ type UpdateRoomParticipantParams struct { * @param optional nil or *UpdateRoomParticipantParams - Optional Parameters: * @param "Status" (string) - The new status of the resource. Can be: `connected` or `disconnected`. For `in-progress` Rooms the default Status is `connected`, for `completed` Rooms only `disconnected` Participants are returned. * @return VideoV1RoomRoomParticipant -*/ + */ func (c *DefaultApiService) UpdateRoomParticipant(RoomSid string, Sid string, params *UpdateRoomParticipantParams) (*VideoV1RoomRoomParticipant, error) { - path := "/v1/Rooms/{RoomSid}/Participants/{Sid}" + path := "/v1/Rooms/{RoomSid}/Participants/{Sid}" path = strings.Replace(path, "{"+"RoomSid"+"}", RoomSid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) -} + data := url.Values{} + headers := 0 + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &VideoV1RoomRoomParticipant{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VideoV1RoomRoomParticipant{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateRoomParticipantSubscribeRuleParams Optional parameters for the method 'UpdateRoomParticipantSubscribeRule' type UpdateRoomParticipantSubscribeRuleParams struct { Rules *map[string]interface{} `json:"Rules,omitempty"` @@ -1477,40 +1445,40 @@ type UpdateRoomParticipantSubscribeRuleParams struct { * @param optional nil or *UpdateRoomParticipantSubscribeRuleParams - Optional Parameters: * @param "Rules" (map[string]interface{}) - A JSON-encoded array of subscribe rules. See the [Specifying Subscribe Rules](https://www.twilio.com/docs/video/api/track-subscriptions#specifying-sr) section for further information. * @return VideoV1RoomRoomParticipantRoomParticipantSubscribeRule -*/ + */ func (c *DefaultApiService) UpdateRoomParticipantSubscribeRule(RoomSid string, ParticipantSid string, params *UpdateRoomParticipantSubscribeRuleParams) (*VideoV1RoomRoomParticipantRoomParticipantSubscribeRule, error) { - path := "/v1/Rooms/{RoomSid}/Participants/{ParticipantSid}/SubscribeRules" + path := "/v1/Rooms/{RoomSid}/Participants/{ParticipantSid}/SubscribeRules" path = strings.Replace(path, "{"+"RoomSid"+"}", RoomSid, -1) path = strings.Replace(path, "{"+"ParticipantSid"+"}", ParticipantSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Rules != nil { - v, err := json.Marshal(params.Rules) + if params != nil && params.Rules != nil { + v, err := json.Marshal(params.Rules) - if err != nil { - return nil, err - } - - data.Set("Rules", fmt.Sprint(v)) -} + if err != nil { + return nil, err + } + data.Set("Rules", fmt.Sprint(v)) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &VideoV1RoomRoomParticipantRoomParticipantSubscribeRule{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VideoV1RoomRoomParticipantRoomParticipantSubscribeRule{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateRoomRecordingRuleParams Optional parameters for the method 'UpdateRoomRecordingRule' type UpdateRoomRecordingRuleParams struct { Rules *map[string]interface{} `json:"Rules,omitempty"` @@ -1523,36 +1491,35 @@ type UpdateRoomRecordingRuleParams struct { * @param optional nil or *UpdateRoomRecordingRuleParams - Optional Parameters: * @param "Rules" (map[string]interface{}) - A JSON-encoded array of recording rules. * @return VideoV1RoomRoomRecordingRule -*/ + */ func (c *DefaultApiService) UpdateRoomRecordingRule(RoomSid string, params *UpdateRoomRecordingRuleParams) (*VideoV1RoomRoomRecordingRule, error) { - path := "/v1/Rooms/{RoomSid}/RecordingRules" + path := "/v1/Rooms/{RoomSid}/RecordingRules" path = strings.Replace(path, "{"+"RoomSid"+"}", RoomSid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 - if params != nil && params.Rules != nil { - v, err := json.Marshal(params.Rules) + if params != nil && params.Rules != nil { + v, err := json.Marshal(params.Rules) - if err != nil { - return nil, err - } - - data.Set("Rules", fmt.Sprint(v)) -} + if err != nil { + return nil, err + } + data.Set("Rules", fmt.Sprint(v)) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &VideoV1RoomRoomRecordingRule{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VideoV1RoomRoomRecordingRule{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } diff --git a/twilio/rest/video/v1/model_list_composition_hook_response.go b/twilio/rest/video/v1/model_list_composition_hook_response.go index 87f2f97ba..30f0f62d7 100644 --- a/twilio/rest/video/v1/model_list_composition_hook_response.go +++ b/twilio/rest/video/v1/model_list_composition_hook_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Video - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListCompositionHookResponse struct for ListCompositionHookResponse type ListCompositionHookResponse struct { - CompositionHooks []VideoV1CompositionHook `json:"CompositionHooks,omitempty"` - Meta ListCompositionHookResponseMeta `json:"Meta,omitempty"` + CompositionHooks []VideoV1CompositionHook `json:"CompositionHooks,omitempty"` + Meta ListCompositionHookResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/video/v1/model_list_composition_hook_response_meta.go b/twilio/rest/video/v1/model_list_composition_hook_response_meta.go index 88921ef38..112ef51ac 100644 --- a/twilio/rest/video/v1/model_list_composition_hook_response_meta.go +++ b/twilio/rest/video/v1/model_list_composition_hook_response_meta.go @@ -1,22 +1,23 @@ /* - * Twilio - Video - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListCompositionHookResponseMeta struct for ListCompositionHookResponseMeta type ListCompositionHookResponseMeta struct { - FirstPageUrl string `json:"FirstPageUrl,omitempty"` - Key string `json:"Key,omitempty"` - NextPageUrl string `json:"NextPageUrl,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` - Url string `json:"Url,omitempty"` + Url string `json:"Url,omitempty"` } diff --git a/twilio/rest/video/v1/model_list_composition_response.go b/twilio/rest/video/v1/model_list_composition_response.go index 3c9705043..eea3f2942 100644 --- a/twilio/rest/video/v1/model_list_composition_response.go +++ b/twilio/rest/video/v1/model_list_composition_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Video - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListCompositionResponse struct for ListCompositionResponse type ListCompositionResponse struct { - Compositions []VideoV1Composition `json:"Compositions,omitempty"` - Meta ListCompositionHookResponseMeta `json:"Meta,omitempty"` + Compositions []VideoV1Composition `json:"Compositions,omitempty"` + Meta ListCompositionHookResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/video/v1/model_list_recording_response.go b/twilio/rest/video/v1/model_list_recording_response.go index 476b3418b..151a061fd 100644 --- a/twilio/rest/video/v1/model_list_recording_response.go +++ b/twilio/rest/video/v1/model_list_recording_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Video - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListRecordingResponse struct for ListRecordingResponse type ListRecordingResponse struct { - Meta ListCompositionHookResponseMeta `json:"Meta,omitempty"` - Recordings []VideoV1Recording `json:"Recordings,omitempty"` + Meta ListCompositionHookResponseMeta `json:"Meta,omitempty"` + Recordings []VideoV1Recording `json:"Recordings,omitempty"` } diff --git a/twilio/rest/video/v1/model_list_room_participant_published_track_response.go b/twilio/rest/video/v1/model_list_room_participant_published_track_response.go index 3e8ef4fd9..5437014ad 100644 --- a/twilio/rest/video/v1/model_list_room_participant_published_track_response.go +++ b/twilio/rest/video/v1/model_list_room_participant_published_track_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Video - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListRoomParticipantPublishedTrackResponse struct for ListRoomParticipantPublishedTrackResponse type ListRoomParticipantPublishedTrackResponse struct { - Meta ListCompositionHookResponseMeta `json:"Meta,omitempty"` + Meta ListCompositionHookResponseMeta `json:"Meta,omitempty"` PublishedTracks []VideoV1RoomRoomParticipantRoomParticipantPublishedTrack `json:"PublishedTracks,omitempty"` } diff --git a/twilio/rest/video/v1/model_list_room_participant_response.go b/twilio/rest/video/v1/model_list_room_participant_response.go index e47331ee7..6d15feb66 100644 --- a/twilio/rest/video/v1/model_list_room_participant_response.go +++ b/twilio/rest/video/v1/model_list_room_participant_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Video - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListRoomParticipantResponse struct for ListRoomParticipantResponse type ListRoomParticipantResponse struct { - Meta ListCompositionHookResponseMeta `json:"Meta,omitempty"` - Participants []VideoV1RoomRoomParticipant `json:"Participants,omitempty"` + Meta ListCompositionHookResponseMeta `json:"Meta,omitempty"` + Participants []VideoV1RoomRoomParticipant `json:"Participants,omitempty"` } diff --git a/twilio/rest/video/v1/model_list_room_participant_subscribed_track_response.go b/twilio/rest/video/v1/model_list_room_participant_subscribed_track_response.go index e4c1f199c..a01cad8ff 100644 --- a/twilio/rest/video/v1/model_list_room_participant_subscribed_track_response.go +++ b/twilio/rest/video/v1/model_list_room_participant_subscribed_track_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Video - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListRoomParticipantSubscribedTrackResponse struct for ListRoomParticipantSubscribedTrackResponse type ListRoomParticipantSubscribedTrackResponse struct { - Meta ListCompositionHookResponseMeta `json:"Meta,omitempty"` + Meta ListCompositionHookResponseMeta `json:"Meta,omitempty"` SubscribedTracks []VideoV1RoomRoomParticipantRoomParticipantSubscribedTrack `json:"SubscribedTracks,omitempty"` } diff --git a/twilio/rest/video/v1/model_list_room_recording_response.go b/twilio/rest/video/v1/model_list_room_recording_response.go index a3919efda..59b426b94 100644 --- a/twilio/rest/video/v1/model_list_room_recording_response.go +++ b/twilio/rest/video/v1/model_list_room_recording_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Video - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListRoomRecordingResponse struct for ListRoomRecordingResponse type ListRoomRecordingResponse struct { - Meta ListCompositionHookResponseMeta `json:"Meta,omitempty"` - Recordings []VideoV1RoomRoomRecording `json:"Recordings,omitempty"` + Meta ListCompositionHookResponseMeta `json:"Meta,omitempty"` + Recordings []VideoV1RoomRoomRecording `json:"Recordings,omitempty"` } diff --git a/twilio/rest/video/v1/model_list_room_response.go b/twilio/rest/video/v1/model_list_room_response.go index 572db5f05..2f0f3445c 100644 --- a/twilio/rest/video/v1/model_list_room_response.go +++ b/twilio/rest/video/v1/model_list_room_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Video - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListRoomResponse struct for ListRoomResponse type ListRoomResponse struct { - Meta ListCompositionHookResponseMeta `json:"Meta,omitempty"` - Rooms []VideoV1Room `json:"Rooms,omitempty"` + Meta ListCompositionHookResponseMeta `json:"Meta,omitempty"` + Rooms []VideoV1Room `json:"Rooms,omitempty"` } diff --git a/twilio/rest/video/v1/model_video_v1_composition.go b/twilio/rest/video/v1/model_video_v1_composition.go index 9d3377191..f96603bcb 100644 --- a/twilio/rest/video/v1/model_video_v1_composition.go +++ b/twilio/rest/video/v1/model_video_v1_composition.go @@ -1,18 +1,20 @@ /* - * Twilio - Video - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // VideoV1Composition struct for VideoV1Composition type VideoV1Composition struct { // The SID of the Account that created the resource diff --git a/twilio/rest/video/v1/model_video_v1_composition_hook.go b/twilio/rest/video/v1/model_video_v1_composition_hook.go index 5902d9519..a531e9087 100644 --- a/twilio/rest/video/v1/model_video_v1_composition_hook.go +++ b/twilio/rest/video/v1/model_video_v1_composition_hook.go @@ -1,18 +1,20 @@ /* - * Twilio - Video - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // VideoV1CompositionHook struct for VideoV1CompositionHook type VideoV1CompositionHook struct { // The SID of the Account that created the resource diff --git a/twilio/rest/video/v1/model_video_v1_composition_settings.go b/twilio/rest/video/v1/model_video_v1_composition_settings.go index ff534f580..c1dfbdb26 100644 --- a/twilio/rest/video/v1/model_video_v1_composition_settings.go +++ b/twilio/rest/video/v1/model_video_v1_composition_settings.go @@ -1,15 +1,16 @@ /* - * Twilio - Video - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // VideoV1CompositionSettings struct for VideoV1CompositionSettings type VideoV1CompositionSettings struct { // The SID of the Account that created the resource diff --git a/twilio/rest/video/v1/model_video_v1_recording.go b/twilio/rest/video/v1/model_video_v1_recording.go index 9e1bbf535..e7a69695f 100644 --- a/twilio/rest/video/v1/model_video_v1_recording.go +++ b/twilio/rest/video/v1/model_video_v1_recording.go @@ -1,18 +1,20 @@ /* - * Twilio - Video - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // VideoV1Recording struct for VideoV1Recording type VideoV1Recording struct { // The SID of the Account that created the resource diff --git a/twilio/rest/video/v1/model_video_v1_recording_settings.go b/twilio/rest/video/v1/model_video_v1_recording_settings.go index 64f0ac180..b2b309779 100644 --- a/twilio/rest/video/v1/model_video_v1_recording_settings.go +++ b/twilio/rest/video/v1/model_video_v1_recording_settings.go @@ -1,15 +1,16 @@ /* - * Twilio - Video - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // VideoV1RecordingSettings struct for VideoV1RecordingSettings type VideoV1RecordingSettings struct { // The SID of the Account that created the resource diff --git a/twilio/rest/video/v1/model_video_v1_room.go b/twilio/rest/video/v1/model_video_v1_room.go index a5c01e6d3..4cbd6421c 100644 --- a/twilio/rest/video/v1/model_video_v1_room.go +++ b/twilio/rest/video/v1/model_video_v1_room.go @@ -1,18 +1,20 @@ /* - * Twilio - Video - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // VideoV1Room struct for VideoV1Room type VideoV1Room struct { // The SID of the Account that created the resource diff --git a/twilio/rest/video/v1/model_video_v1_room_room_participant.go b/twilio/rest/video/v1/model_video_v1_room_room_participant.go index d1ec743c3..0a052e2cb 100644 --- a/twilio/rest/video/v1/model_video_v1_room_room_participant.go +++ b/twilio/rest/video/v1/model_video_v1_room_room_participant.go @@ -1,18 +1,20 @@ /* - * Twilio - Video - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // VideoV1RoomRoomParticipant struct for VideoV1RoomRoomParticipant type VideoV1RoomRoomParticipant struct { // The SID of the Account that created the resource diff --git a/twilio/rest/video/v1/model_video_v1_room_room_participant_room_participant_published_track.go b/twilio/rest/video/v1/model_video_v1_room_room_participant_room_participant_published_track.go index 141c65629..31354dec0 100644 --- a/twilio/rest/video/v1/model_video_v1_room_room_participant_room_participant_published_track.go +++ b/twilio/rest/video/v1/model_video_v1_room_room_participant_room_participant_published_track.go @@ -1,18 +1,20 @@ /* - * Twilio - Video - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // VideoV1RoomRoomParticipantRoomParticipantPublishedTrack struct for VideoV1RoomRoomParticipantRoomParticipantPublishedTrack type VideoV1RoomRoomParticipantRoomParticipantPublishedTrack struct { // The ISO 8601 date and time in GMT when the resource was created diff --git a/twilio/rest/video/v1/model_video_v1_room_room_participant_room_participant_subscribe_rule.go b/twilio/rest/video/v1/model_video_v1_room_room_participant_room_participant_subscribe_rule.go index 8ccf5bb79..5da5b600b 100644 --- a/twilio/rest/video/v1/model_video_v1_room_room_participant_room_participant_subscribe_rule.go +++ b/twilio/rest/video/v1/model_video_v1_room_room_participant_room_participant_subscribe_rule.go @@ -1,18 +1,20 @@ /* - * Twilio - Video - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // VideoV1RoomRoomParticipantRoomParticipantSubscribeRule struct for VideoV1RoomRoomParticipantRoomParticipantSubscribeRule type VideoV1RoomRoomParticipantRoomParticipantSubscribeRule struct { // The ISO 8601 date and time in GMT when the resource was created diff --git a/twilio/rest/video/v1/model_video_v1_room_room_participant_room_participant_subscribed_track.go b/twilio/rest/video/v1/model_video_v1_room_room_participant_room_participant_subscribed_track.go index 280efd7ab..0d94d3f9e 100644 --- a/twilio/rest/video/v1/model_video_v1_room_room_participant_room_participant_subscribed_track.go +++ b/twilio/rest/video/v1/model_video_v1_room_room_participant_room_participant_subscribed_track.go @@ -1,18 +1,20 @@ /* - * Twilio - Video - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // VideoV1RoomRoomParticipantRoomParticipantSubscribedTrack struct for VideoV1RoomRoomParticipantRoomParticipantSubscribedTrack type VideoV1RoomRoomParticipantRoomParticipantSubscribedTrack struct { // The ISO 8601 date and time in GMT when the resource was created diff --git a/twilio/rest/video/v1/model_video_v1_room_room_recording.go b/twilio/rest/video/v1/model_video_v1_room_room_recording.go index 06d2fad94..a2d33ecc1 100644 --- a/twilio/rest/video/v1/model_video_v1_room_room_recording.go +++ b/twilio/rest/video/v1/model_video_v1_room_room_recording.go @@ -1,18 +1,20 @@ /* - * Twilio - Video - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // VideoV1RoomRoomRecording struct for VideoV1RoomRoomRecording type VideoV1RoomRoomRecording struct { // The SID of the Account that created the resource diff --git a/twilio/rest/video/v1/model_video_v1_room_room_recording_rule.go b/twilio/rest/video/v1/model_video_v1_room_room_recording_rule.go index 86f27c705..6df7ada4d 100644 --- a/twilio/rest/video/v1/model_video_v1_room_room_recording_rule.go +++ b/twilio/rest/video/v1/model_video_v1_room_room_recording_rule.go @@ -1,18 +1,20 @@ /* - * Twilio - Video - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // VideoV1RoomRoomRecordingRule struct for VideoV1RoomRoomRecordingRule type VideoV1RoomRoomRecordingRule struct { // The ISO 8601 date and time in GMT when the resource was created diff --git a/twilio/rest/video/v1/model_video_v1_room_room_recording_rule_rules.go b/twilio/rest/video/v1/model_video_v1_room_room_recording_rule_rules.go index e613787e3..b5f57ac20 100644 --- a/twilio/rest/video/v1/model_video_v1_room_room_recording_rule_rules.go +++ b/twilio/rest/video/v1/model_video_v1_room_room_recording_rule_rules.go @@ -1,20 +1,21 @@ /* - * Twilio - Video - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // VideoV1RoomRoomRecordingRuleRules struct for VideoV1RoomRoomRecordingRuleRules type VideoV1RoomRoomRecordingRuleRules struct { - All bool `json:"All,omitempty"` - Kind string `json:"Kind,omitempty"` + All bool `json:"All,omitempty"` + Kind string `json:"Kind,omitempty"` Publisher string `json:"Publisher,omitempty"` - Track string `json:"Track,omitempty"` - Type string `json:"Type,omitempty"` + Track string `json:"Track,omitempty"` + Type string `json:"Type,omitempty"` } diff --git a/twilio/rest/voice/v1/api_default.go b/twilio/rest/voice/v1/api_default.go index fd2aff0aa..1acfe99ae 100644 --- a/twilio/rest/voice/v1/api_default.go +++ b/twilio/rest/voice/v1/api_default.go @@ -1,11 +1,11 @@ /* - * Twilio - Voice - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Voice + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,9 +14,10 @@ package openapi import ( "encoding/json" "fmt" - twilio "github.com/twilio/twilio-go/client" "net/url" - "strings" + "strings" + + twilio "github.com/twilio/twilio-go/client" ) type DefaultApiService struct { @@ -25,24 +26,24 @@ type DefaultApiService struct { } func NewDefaultApiService(client *twilio.Client) *DefaultApiService { - return &DefaultApiService { - client: client, + return &DefaultApiService{ + client: client, baseURL: "https://voice.twilio.com", } } // CreateByocTrunkParams Optional parameters for the method 'CreateByocTrunk' type CreateByocTrunkParams struct { - CnamLookupEnabled *bool `json:"CnamLookupEnabled,omitempty"` - ConnectionPolicySid *string `json:"ConnectionPolicySid,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - FromDomainSid *string `json:"FromDomainSid,omitempty"` + CnamLookupEnabled *bool `json:"CnamLookupEnabled,omitempty"` + ConnectionPolicySid *string `json:"ConnectionPolicySid,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + FromDomainSid *string `json:"FromDomainSid,omitempty"` StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` - StatusCallbackUrl *string `json:"StatusCallbackUrl,omitempty"` - VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"` - VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` - VoiceMethod *string `json:"VoiceMethod,omitempty"` - VoiceUrl *string `json:"VoiceUrl,omitempty"` + StatusCallbackUrl *string `json:"StatusCallbackUrl,omitempty"` + VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"` + VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` + VoiceMethod *string `json:"VoiceMethod,omitempty"` + VoiceUrl *string `json:"VoiceUrl,omitempty"` } /* @@ -59,59 +60,59 @@ type CreateByocTrunkParams struct { * @param "VoiceMethod" (string) - The HTTP method we should use to call `voice_url`. Can be: `GET` or `POST`. * @param "VoiceUrl" (string) - The URL we should call when the BYOC Trunk receives a call. * @return VoiceV1ByocTrunk -*/ + */ func (c *DefaultApiService) CreateByocTrunk(params *CreateByocTrunkParams) (*VoiceV1ByocTrunk, error) { - path := "/v1/ByocTrunks" + path := "/v1/ByocTrunks" - data := url.Values{} - headers := 0 - - if params != nil && params.CnamLookupEnabled != nil { - data.Set("CnamLookupEnabled", fmt.Sprint(*params.CnamLookupEnabled)) -} - if params != nil && params.ConnectionPolicySid != nil { - data.Set("ConnectionPolicySid", *params.ConnectionPolicySid) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.FromDomainSid != nil { - data.Set("FromDomainSid", *params.FromDomainSid) -} - if params != nil && params.StatusCallbackMethod != nil { - data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) -} - if params != nil && params.StatusCallbackUrl != nil { - data.Set("StatusCallbackUrl", *params.StatusCallbackUrl) -} - if params != nil && params.VoiceFallbackMethod != nil { - data.Set("VoiceFallbackMethod", *params.VoiceFallbackMethod) -} - if params != nil && params.VoiceFallbackUrl != nil { - data.Set("VoiceFallbackUrl", *params.VoiceFallbackUrl) -} - if params != nil && params.VoiceMethod != nil { - data.Set("VoiceMethod", *params.VoiceMethod) -} - if params != nil && params.VoiceUrl != nil { - data.Set("VoiceUrl", *params.VoiceUrl) -} + data := url.Values{} + headers := 0 + if params != nil && params.CnamLookupEnabled != nil { + data.Set("CnamLookupEnabled", fmt.Sprint(*params.CnamLookupEnabled)) + } + if params != nil && params.ConnectionPolicySid != nil { + data.Set("ConnectionPolicySid", *params.ConnectionPolicySid) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.FromDomainSid != nil { + data.Set("FromDomainSid", *params.FromDomainSid) + } + if params != nil && params.StatusCallbackMethod != nil { + data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) + } + if params != nil && params.StatusCallbackUrl != nil { + data.Set("StatusCallbackUrl", *params.StatusCallbackUrl) + } + if params != nil && params.VoiceFallbackMethod != nil { + data.Set("VoiceFallbackMethod", *params.VoiceFallbackMethod) + } + if params != nil && params.VoiceFallbackUrl != nil { + data.Set("VoiceFallbackUrl", *params.VoiceFallbackUrl) + } + if params != nil && params.VoiceMethod != nil { + data.Set("VoiceMethod", *params.VoiceMethod) + } + if params != nil && params.VoiceUrl != nil { + data.Set("VoiceUrl", *params.VoiceUrl) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &VoiceV1ByocTrunk{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VoiceV1ByocTrunk{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateConnectionPolicyParams Optional parameters for the method 'CreateConnectionPolicy' type CreateConnectionPolicyParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` @@ -122,39 +123,39 @@ type CreateConnectionPolicyParams struct { * @param optional nil or *CreateConnectionPolicyParams - Optional Parameters: * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. * @return VoiceV1ConnectionPolicy -*/ + */ func (c *DefaultApiService) CreateConnectionPolicy(params *CreateConnectionPolicyParams) (*VoiceV1ConnectionPolicy, error) { - path := "/v1/ConnectionPolicies" - - data := url.Values{} - headers := 0 + path := "/v1/ConnectionPolicies" - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} + data := url.Values{} + headers := 0 + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &VoiceV1ConnectionPolicy{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VoiceV1ConnectionPolicy{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateConnectionPolicyTargetParams Optional parameters for the method 'CreateConnectionPolicyTarget' type CreateConnectionPolicyTargetParams struct { - Enabled *bool `json:"Enabled,omitempty"` + Enabled *bool `json:"Enabled,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` - Priority *int32 `json:"Priority,omitempty"` - Target *string `json:"Target,omitempty"` - Weight *int32 `json:"Weight,omitempty"` + Priority *int32 `json:"Priority,omitempty"` + Target *string `json:"Target,omitempty"` + Weight *int32 `json:"Weight,omitempty"` } /* @@ -167,45 +168,45 @@ type CreateConnectionPolicyTargetParams struct { * @param "Target" (string) - The SIP address you want Twilio to route your calls to. This must be a `sip:` schema. `sips` is NOT supported. * @param "Weight" (int32) - The value that determines the relative share of the load the Target should receive compared to other Targets with the same priority. Can be an integer from 1 to 65535, inclusive, and the default is 10. Targets with higher values receive more load than those with lower ones with the same priority. * @return VoiceV1ConnectionPolicyConnectionPolicyTarget -*/ + */ func (c *DefaultApiService) CreateConnectionPolicyTarget(ConnectionPolicySid string, params *CreateConnectionPolicyTargetParams) (*VoiceV1ConnectionPolicyConnectionPolicyTarget, error) { - path := "/v1/ConnectionPolicies/{ConnectionPolicySid}/Targets" + path := "/v1/ConnectionPolicies/{ConnectionPolicySid}/Targets" path = strings.Replace(path, "{"+"ConnectionPolicySid"+"}", ConnectionPolicySid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Enabled != nil { - data.Set("Enabled", fmt.Sprint(*params.Enabled)) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.Priority != nil { - data.Set("Priority", fmt.Sprint(*params.Priority)) -} - if params != nil && params.Target != nil { - data.Set("Target", *params.Target) -} - if params != nil && params.Weight != nil { - data.Set("Weight", fmt.Sprint(*params.Weight)) -} + data := url.Values{} + headers := 0 + if params != nil && params.Enabled != nil { + data.Set("Enabled", fmt.Sprint(*params.Enabled)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Priority != nil { + data.Set("Priority", fmt.Sprint(*params.Priority)) + } + if params != nil && params.Target != nil { + data.Set("Target", *params.Target) + } + if params != nil && params.Weight != nil { + data.Set("Weight", fmt.Sprint(*params.Weight)) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &VoiceV1ConnectionPolicyConnectionPolicyTarget{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VoiceV1ConnectionPolicyConnectionPolicyTarget{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateDialingPermissionsCountryBulkUpdateParams Optional parameters for the method 'CreateDialingPermissionsCountryBulkUpdate' type CreateDialingPermissionsCountryBulkUpdateParams struct { UpdateRequest *string `json:"UpdateRequest,omitempty"` @@ -217,37 +218,37 @@ type CreateDialingPermissionsCountryBulkUpdateParams struct { * @param optional nil or *CreateDialingPermissionsCountryBulkUpdateParams - Optional Parameters: * @param "UpdateRequest" (string) - URL encoded JSON array of update objects. example : `[ { \\\"iso_code\\\": \\\"GB\\\", \\\"low_risk_numbers_enabled\\\": \\\"true\\\", \\\"high_risk_special_numbers_enabled\\\":\\\"true\\\", \\\"high_risk_tollfraud_numbers_enabled\\\": \\\"false\\\" } ]` * @return VoiceV1DialingPermissionsDialingPermissionsCountryBulkUpdate -*/ + */ func (c *DefaultApiService) CreateDialingPermissionsCountryBulkUpdate(params *CreateDialingPermissionsCountryBulkUpdateParams) (*VoiceV1DialingPermissionsDialingPermissionsCountryBulkUpdate, error) { - path := "/v1/DialingPermissions/BulkCountryUpdates" + path := "/v1/DialingPermissions/BulkCountryUpdates" - data := url.Values{} - headers := 0 - - if params != nil && params.UpdateRequest != nil { - data.Set("UpdateRequest", *params.UpdateRequest) -} + data := url.Values{} + headers := 0 + if params != nil && params.UpdateRequest != nil { + data.Set("UpdateRequest", *params.UpdateRequest) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &VoiceV1DialingPermissionsDialingPermissionsCountryBulkUpdate{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VoiceV1DialingPermissionsDialingPermissionsCountryBulkUpdate{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateIpRecordParams Optional parameters for the method 'CreateIpRecord' type CreateIpRecordParams struct { - CidrPrefixLength *int32 `json:"CidrPrefixLength,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - IpAddress *string `json:"IpAddress,omitempty"` + CidrPrefixLength *int32 `json:"CidrPrefixLength,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + IpAddress *string `json:"IpAddress,omitempty"` } /* @@ -257,41 +258,41 @@ type CreateIpRecordParams struct { * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. * @param "IpAddress" (string) - An IP address in dotted decimal notation, IPv4 only. * @return VoiceV1IpRecord -*/ + */ func (c *DefaultApiService) CreateIpRecord(params *CreateIpRecordParams) (*VoiceV1IpRecord, error) { - path := "/v1/IpRecords" - - data := url.Values{} - headers := 0 + path := "/v1/IpRecords" - if params != nil && params.CidrPrefixLength != nil { - data.Set("CidrPrefixLength", fmt.Sprint(*params.CidrPrefixLength)) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.IpAddress != nil { - data.Set("IpAddress", *params.IpAddress) -} + data := url.Values{} + headers := 0 + if params != nil && params.CidrPrefixLength != nil { + data.Set("CidrPrefixLength", fmt.Sprint(*params.CidrPrefixLength)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.IpAddress != nil { + data.Set("IpAddress", *params.IpAddress) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &VoiceV1IpRecord{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VoiceV1IpRecord{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateSourceIpMappingParams Optional parameters for the method 'CreateSourceIpMapping' type CreateSourceIpMappingParams struct { - IpRecordSid *string `json:"IpRecordSid,omitempty"` + IpRecordSid *string `json:"IpRecordSid,omitempty"` SipDomainSid *string `json:"SipDomainSid,omitempty"` } @@ -301,209 +302,194 @@ type CreateSourceIpMappingParams struct { * @param "IpRecordSid" (string) - The Twilio-provided string that uniquely identifies the IP Record resource to map from. * @param "SipDomainSid" (string) - The SID of the SIP Domain that the IP Record should be mapped to. * @return VoiceV1SourceIpMapping -*/ + */ func (c *DefaultApiService) CreateSourceIpMapping(params *CreateSourceIpMappingParams) (*VoiceV1SourceIpMapping, error) { - path := "/v1/SourceIpMappings" + path := "/v1/SourceIpMappings" - data := url.Values{} - headers := 0 - - if params != nil && params.IpRecordSid != nil { - data.Set("IpRecordSid", *params.IpRecordSid) -} - if params != nil && params.SipDomainSid != nil { - data.Set("SipDomainSid", *params.SipDomainSid) -} + data := url.Values{} + headers := 0 + if params != nil && params.IpRecordSid != nil { + data.Set("IpRecordSid", *params.IpRecordSid) + } + if params != nil && params.SipDomainSid != nil { + data.Set("SipDomainSid", *params.SipDomainSid) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &VoiceV1SourceIpMapping{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VoiceV1SourceIpMapping{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * DeleteByocTrunk Method for DeleteByocTrunk * @param Sid The Twilio-provided string that uniquely identifies the BYOC Trunk resource to delete. -*/ -func (c *DefaultApiService) DeleteByocTrunk(Sid string, ) (error) { - path := "/v1/ByocTrunks/{Sid}" + */ +func (c *DefaultApiService) DeleteByocTrunk(Sid string) error { + path := "/v1/ByocTrunks/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* * DeleteConnectionPolicy Method for DeleteConnectionPolicy * @param Sid The unique string that we created to identify the Connection Policy resource to delete. -*/ -func (c *DefaultApiService) DeleteConnectionPolicy(Sid string, ) (error) { - path := "/v1/ConnectionPolicies/{Sid}" + */ +func (c *DefaultApiService) DeleteConnectionPolicy(Sid string) error { + path := "/v1/ConnectionPolicies/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* * DeleteConnectionPolicyTarget Method for DeleteConnectionPolicyTarget * @param ConnectionPolicySid The SID of the Connection Policy that owns the Target. * @param Sid The unique string that we created to identify the Target resource to delete. -*/ -func (c *DefaultApiService) DeleteConnectionPolicyTarget(ConnectionPolicySid string, Sid string, ) (error) { - path := "/v1/ConnectionPolicies/{ConnectionPolicySid}/Targets/{Sid}" + */ +func (c *DefaultApiService) DeleteConnectionPolicyTarget(ConnectionPolicySid string, Sid string) error { + path := "/v1/ConnectionPolicies/{ConnectionPolicySid}/Targets/{Sid}" path = strings.Replace(path, "{"+"ConnectionPolicySid"+"}", ConnectionPolicySid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + defer resp.Body.Close() - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() - - return nil + return nil } /* * DeleteIpRecord Method for DeleteIpRecord * @param Sid The Twilio-provided string that uniquely identifies the IP Record resource to delete. -*/ -func (c *DefaultApiService) DeleteIpRecord(Sid string, ) (error) { - path := "/v1/IpRecords/{Sid}" + */ +func (c *DefaultApiService) DeleteIpRecord(Sid string) error { + path := "/v1/IpRecords/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + defer resp.Body.Close() - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() - - return nil + return nil } /* * DeleteSourceIpMapping Method for DeleteSourceIpMapping * @param Sid The Twilio-provided string that uniquely identifies the IP Record resource to delete. -*/ -func (c *DefaultApiService) DeleteSourceIpMapping(Sid string, ) (error) { - path := "/v1/SourceIpMappings/{Sid}" + */ +func (c *DefaultApiService) DeleteSourceIpMapping(Sid string) error { + path := "/v1/SourceIpMappings/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() + defer resp.Body.Close() - return nil + return nil } /* * FetchByocTrunk Method for FetchByocTrunk * @param Sid The Twilio-provided string that uniquely identifies the BYOC Trunk resource to fetch. * @return VoiceV1ByocTrunk -*/ -func (c *DefaultApiService) FetchByocTrunk(Sid string, ) (*VoiceV1ByocTrunk, error) { - path := "/v1/ByocTrunks/{Sid}" + */ +func (c *DefaultApiService) FetchByocTrunk(Sid string) (*VoiceV1ByocTrunk, error) { + path := "/v1/ByocTrunks/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &VoiceV1ByocTrunk{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VoiceV1ByocTrunk{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * FetchConnectionPolicy Method for FetchConnectionPolicy * @param Sid The unique string that we created to identify the Connection Policy resource to fetch. * @return VoiceV1ConnectionPolicy -*/ -func (c *DefaultApiService) FetchConnectionPolicy(Sid string, ) (*VoiceV1ConnectionPolicy, error) { - path := "/v1/ConnectionPolicies/{Sid}" + */ +func (c *DefaultApiService) FetchConnectionPolicy(Sid string) (*VoiceV1ConnectionPolicy, error) { + path := "/v1/ConnectionPolicies/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &VoiceV1ConnectionPolicy{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VoiceV1ConnectionPolicy{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -511,30 +497,28 @@ func (c *DefaultApiService) FetchConnectionPolicy(Sid string, ) (*VoiceV1Connect * @param ConnectionPolicySid The SID of the Connection Policy that owns the Target. * @param Sid The unique string that we created to identify the Target resource to fetch. * @return VoiceV1ConnectionPolicyConnectionPolicyTarget -*/ -func (c *DefaultApiService) FetchConnectionPolicyTarget(ConnectionPolicySid string, Sid string, ) (*VoiceV1ConnectionPolicyConnectionPolicyTarget, error) { - path := "/v1/ConnectionPolicies/{ConnectionPolicySid}/Targets/{Sid}" + */ +func (c *DefaultApiService) FetchConnectionPolicyTarget(ConnectionPolicySid string, Sid string) (*VoiceV1ConnectionPolicyConnectionPolicyTarget, error) { + path := "/v1/ConnectionPolicies/{ConnectionPolicySid}/Targets/{Sid}" path = strings.Replace(path, "{"+"ConnectionPolicySid"+"}", ConnectionPolicySid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &VoiceV1ConnectionPolicyConnectionPolicyTarget{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VoiceV1ConnectionPolicyConnectionPolicyTarget{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -542,116 +526,109 @@ func (c *DefaultApiService) FetchConnectionPolicyTarget(ConnectionPolicySid stri * Retrieve voice dialing country permissions identified by the given ISO country code * @param IsoCode The [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the DialingPermissions Country resource to fetch * @return VoiceV1DialingPermissionsDialingPermissionsCountryInstance -*/ -func (c *DefaultApiService) FetchDialingPermissionsCountry(IsoCode string, ) (*VoiceV1DialingPermissionsDialingPermissionsCountryInstance, error) { - path := "/v1/DialingPermissions/Countries/{IsoCode}" + */ +func (c *DefaultApiService) FetchDialingPermissionsCountry(IsoCode string) (*VoiceV1DialingPermissionsDialingPermissionsCountryInstance, error) { + path := "/v1/DialingPermissions/Countries/{IsoCode}" path = strings.Replace(path, "{"+"IsoCode"+"}", IsoCode, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &VoiceV1DialingPermissionsDialingPermissionsCountryInstance{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VoiceV1DialingPermissionsDialingPermissionsCountryInstance{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * FetchDialingPermissionsSettings Method for FetchDialingPermissionsSettings * Retrieve voice dialing permissions inheritance for the sub-account * @return VoiceV1DialingPermissionsDialingPermissionsSettings -*/ + */ func (c *DefaultApiService) FetchDialingPermissionsSettings() (*VoiceV1DialingPermissionsDialingPermissionsSettings, error) { - path := "/v1/Settings" + path := "/v1/Settings" - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &VoiceV1DialingPermissionsDialingPermissionsSettings{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VoiceV1DialingPermissionsDialingPermissionsSettings{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * FetchIpRecord Method for FetchIpRecord * @param Sid The Twilio-provided string that uniquely identifies the IP Record resource to fetch. * @return VoiceV1IpRecord -*/ -func (c *DefaultApiService) FetchIpRecord(Sid string, ) (*VoiceV1IpRecord, error) { - path := "/v1/IpRecords/{Sid}" + */ +func (c *DefaultApiService) FetchIpRecord(Sid string) (*VoiceV1IpRecord, error) { + path := "/v1/IpRecords/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &VoiceV1IpRecord{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VoiceV1IpRecord{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * FetchSourceIpMapping Method for FetchSourceIpMapping * @param Sid The Twilio-provided string that uniquely identifies the IP Record resource to fetch. * @return VoiceV1SourceIpMapping -*/ -func (c *DefaultApiService) FetchSourceIpMapping(Sid string, ) (*VoiceV1SourceIpMapping, error) { - path := "/v1/SourceIpMappings/{Sid}" + */ +func (c *DefaultApiService) FetchSourceIpMapping(Sid string) (*VoiceV1SourceIpMapping, error) { + path := "/v1/SourceIpMappings/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &VoiceV1SourceIpMapping{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VoiceV1SourceIpMapping{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListByocTrunkParams Optional parameters for the method 'ListByocTrunk' type ListByocTrunkParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -662,32 +639,32 @@ type ListByocTrunkParams struct { * @param optional nil or *ListByocTrunkParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListByocTrunkResponse -*/ + */ func (c *DefaultApiService) ListByocTrunk(params *ListByocTrunkParams) (*ListByocTrunkResponse, error) { - path := "/v1/ByocTrunks" + path := "/v1/ByocTrunks" - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListByocTrunkResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListByocTrunkResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListConnectionPolicyParams Optional parameters for the method 'ListConnectionPolicy' type ListConnectionPolicyParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -698,32 +675,32 @@ type ListConnectionPolicyParams struct { * @param optional nil or *ListConnectionPolicyParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListConnectionPolicyResponse -*/ + */ func (c *DefaultApiService) ListConnectionPolicy(params *ListConnectionPolicyParams) (*ListConnectionPolicyResponse, error) { - path := "/v1/ConnectionPolicies" - - data := url.Values{} - headers := 0 + path := "/v1/ConnectionPolicies" - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListConnectionPolicyResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListConnectionPolicyResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListConnectionPolicyTargetParams Optional parameters for the method 'ListConnectionPolicyTarget' type ListConnectionPolicyTargetParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -735,42 +712,42 @@ type ListConnectionPolicyTargetParams struct { * @param optional nil or *ListConnectionPolicyTargetParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListConnectionPolicyTargetResponse -*/ + */ func (c *DefaultApiService) ListConnectionPolicyTarget(ConnectionPolicySid string, params *ListConnectionPolicyTargetParams) (*ListConnectionPolicyTargetResponse, error) { - path := "/v1/ConnectionPolicies/{ConnectionPolicySid}/Targets" + path := "/v1/ConnectionPolicies/{ConnectionPolicySid}/Targets" path = strings.Replace(path, "{"+"ConnectionPolicySid"+"}", ConnectionPolicySid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListConnectionPolicyTargetResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListConnectionPolicyTargetResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListDialingPermissionsCountryParams Optional parameters for the method 'ListDialingPermissionsCountry' type ListDialingPermissionsCountryParams struct { - IsoCode *string `json:"IsoCode,omitempty"` - Continent *string `json:"Continent,omitempty"` - CountryCode *string `json:"CountryCode,omitempty"` - LowRiskNumbersEnabled *bool `json:"LowRiskNumbersEnabled,omitempty"` - HighRiskSpecialNumbersEnabled *bool `json:"HighRiskSpecialNumbersEnabled,omitempty"` - HighRiskTollfraudNumbersEnabled *bool `json:"HighRiskTollfraudNumbersEnabled,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + IsoCode *string `json:"IsoCode,omitempty"` + Continent *string `json:"Continent,omitempty"` + CountryCode *string `json:"CountryCode,omitempty"` + LowRiskNumbersEnabled *bool `json:"LowRiskNumbersEnabled,omitempty"` + HighRiskSpecialNumbersEnabled *bool `json:"HighRiskSpecialNumbersEnabled,omitempty"` + HighRiskTollfraudNumbersEnabled *bool `json:"HighRiskTollfraudNumbersEnabled,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -785,50 +762,50 @@ type ListDialingPermissionsCountryParams struct { * @param "HighRiskTollfraudNumbersEnabled" (bool) - Filter to retrieve the country permissions with dialing to high-risk [toll fraud](https://www.twilio.com/learn/voice-and-video/toll-fraud) numbers enabled. Can be: `true` or `false`. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListDialingPermissionsCountryResponse -*/ + */ func (c *DefaultApiService) ListDialingPermissionsCountry(params *ListDialingPermissionsCountryParams) (*ListDialingPermissionsCountryResponse, error) { - path := "/v1/DialingPermissions/Countries" - - data := url.Values{} - headers := 0 + path := "/v1/DialingPermissions/Countries" - if params != nil && params.IsoCode != nil { - data.Set("IsoCode", *params.IsoCode) -} - if params != nil && params.Continent != nil { - data.Set("Continent", *params.Continent) -} - if params != nil && params.CountryCode != nil { - data.Set("CountryCode", *params.CountryCode) -} - if params != nil && params.LowRiskNumbersEnabled != nil { - data.Set("LowRiskNumbersEnabled", fmt.Sprint(*params.LowRiskNumbersEnabled)) -} - if params != nil && params.HighRiskSpecialNumbersEnabled != nil { - data.Set("HighRiskSpecialNumbersEnabled", fmt.Sprint(*params.HighRiskSpecialNumbersEnabled)) -} - if params != nil && params.HighRiskTollfraudNumbersEnabled != nil { - data.Set("HighRiskTollfraudNumbersEnabled", fmt.Sprint(*params.HighRiskTollfraudNumbersEnabled)) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.IsoCode != nil { + data.Set("IsoCode", *params.IsoCode) + } + if params != nil && params.Continent != nil { + data.Set("Continent", *params.Continent) + } + if params != nil && params.CountryCode != nil { + data.Set("CountryCode", *params.CountryCode) + } + if params != nil && params.LowRiskNumbersEnabled != nil { + data.Set("LowRiskNumbersEnabled", fmt.Sprint(*params.LowRiskNumbersEnabled)) + } + if params != nil && params.HighRiskSpecialNumbersEnabled != nil { + data.Set("HighRiskSpecialNumbersEnabled", fmt.Sprint(*params.HighRiskSpecialNumbersEnabled)) + } + if params != nil && params.HighRiskTollfraudNumbersEnabled != nil { + data.Set("HighRiskTollfraudNumbersEnabled", fmt.Sprint(*params.HighRiskTollfraudNumbersEnabled)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListDialingPermissionsCountryResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListDialingPermissionsCountryResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListDialingPermissionsHrsPrefixesParams Optional parameters for the method 'ListDialingPermissionsHrsPrefixes' type ListDialingPermissionsHrsPrefixesParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -841,33 +818,33 @@ type ListDialingPermissionsHrsPrefixesParams struct { * @param optional nil or *ListDialingPermissionsHrsPrefixesParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListDialingPermissionsHrsPrefixesResponse -*/ + */ func (c *DefaultApiService) ListDialingPermissionsHrsPrefixes(IsoCode string, params *ListDialingPermissionsHrsPrefixesParams) (*ListDialingPermissionsHrsPrefixesResponse, error) { - path := "/v1/DialingPermissions/Countries/{IsoCode}/HighRiskSpecialPrefixes" + path := "/v1/DialingPermissions/Countries/{IsoCode}/HighRiskSpecialPrefixes" path = strings.Replace(path, "{"+"IsoCode"+"}", IsoCode, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListDialingPermissionsHrsPrefixesResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListDialingPermissionsHrsPrefixesResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListIpRecordParams Optional parameters for the method 'ListIpRecord' type ListIpRecordParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -878,32 +855,32 @@ type ListIpRecordParams struct { * @param optional nil or *ListIpRecordParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListIpRecordResponse -*/ + */ func (c *DefaultApiService) ListIpRecord(params *ListIpRecordParams) (*ListIpRecordResponse, error) { - path := "/v1/IpRecords" - - data := url.Values{} - headers := 0 + path := "/v1/IpRecords" - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListIpRecordResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListIpRecordResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListSourceIpMappingParams Optional parameters for the method 'ListSourceIpMapping' type ListSourceIpMappingParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -914,44 +891,44 @@ type ListSourceIpMappingParams struct { * @param optional nil or *ListSourceIpMappingParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListSourceIpMappingResponse -*/ + */ func (c *DefaultApiService) ListSourceIpMapping(params *ListSourceIpMappingParams) (*ListSourceIpMappingResponse, error) { - path := "/v1/SourceIpMappings" + path := "/v1/SourceIpMappings" - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListSourceIpMappingResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListSourceIpMappingResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateByocTrunkParams Optional parameters for the method 'UpdateByocTrunk' type UpdateByocTrunkParams struct { - CnamLookupEnabled *bool `json:"CnamLookupEnabled,omitempty"` - ConnectionPolicySid *string `json:"ConnectionPolicySid,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - FromDomainSid *string `json:"FromDomainSid,omitempty"` + CnamLookupEnabled *bool `json:"CnamLookupEnabled,omitempty"` + ConnectionPolicySid *string `json:"ConnectionPolicySid,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + FromDomainSid *string `json:"FromDomainSid,omitempty"` StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` - StatusCallbackUrl *string `json:"StatusCallbackUrl,omitempty"` - VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"` - VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` - VoiceMethod *string `json:"VoiceMethod,omitempty"` - VoiceUrl *string `json:"VoiceUrl,omitempty"` + StatusCallbackUrl *string `json:"StatusCallbackUrl,omitempty"` + VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"` + VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` + VoiceMethod *string `json:"VoiceMethod,omitempty"` + VoiceUrl *string `json:"VoiceUrl,omitempty"` } /* @@ -969,60 +946,60 @@ type UpdateByocTrunkParams struct { * @param "VoiceMethod" (string) - The HTTP method we should use to call `voice_url` * @param "VoiceUrl" (string) - The URL we should call when the BYOC Trunk receives a call. * @return VoiceV1ByocTrunk -*/ + */ func (c *DefaultApiService) UpdateByocTrunk(Sid string, params *UpdateByocTrunkParams) (*VoiceV1ByocTrunk, error) { - path := "/v1/ByocTrunks/{Sid}" + path := "/v1/ByocTrunks/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.CnamLookupEnabled != nil { - data.Set("CnamLookupEnabled", fmt.Sprint(*params.CnamLookupEnabled)) -} - if params != nil && params.ConnectionPolicySid != nil { - data.Set("ConnectionPolicySid", *params.ConnectionPolicySid) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.FromDomainSid != nil { - data.Set("FromDomainSid", *params.FromDomainSid) -} - if params != nil && params.StatusCallbackMethod != nil { - data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) -} - if params != nil && params.StatusCallbackUrl != nil { - data.Set("StatusCallbackUrl", *params.StatusCallbackUrl) -} - if params != nil && params.VoiceFallbackMethod != nil { - data.Set("VoiceFallbackMethod", *params.VoiceFallbackMethod) -} - if params != nil && params.VoiceFallbackUrl != nil { - data.Set("VoiceFallbackUrl", *params.VoiceFallbackUrl) -} - if params != nil && params.VoiceMethod != nil { - data.Set("VoiceMethod", *params.VoiceMethod) -} - if params != nil && params.VoiceUrl != nil { - data.Set("VoiceUrl", *params.VoiceUrl) -} + data := url.Values{} + headers := 0 + if params != nil && params.CnamLookupEnabled != nil { + data.Set("CnamLookupEnabled", fmt.Sprint(*params.CnamLookupEnabled)) + } + if params != nil && params.ConnectionPolicySid != nil { + data.Set("ConnectionPolicySid", *params.ConnectionPolicySid) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.FromDomainSid != nil { + data.Set("FromDomainSid", *params.FromDomainSid) + } + if params != nil && params.StatusCallbackMethod != nil { + data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) + } + if params != nil && params.StatusCallbackUrl != nil { + data.Set("StatusCallbackUrl", *params.StatusCallbackUrl) + } + if params != nil && params.VoiceFallbackMethod != nil { + data.Set("VoiceFallbackMethod", *params.VoiceFallbackMethod) + } + if params != nil && params.VoiceFallbackUrl != nil { + data.Set("VoiceFallbackUrl", *params.VoiceFallbackUrl) + } + if params != nil && params.VoiceMethod != nil { + data.Set("VoiceMethod", *params.VoiceMethod) + } + if params != nil && params.VoiceUrl != nil { + data.Set("VoiceUrl", *params.VoiceUrl) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &VoiceV1ByocTrunk{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VoiceV1ByocTrunk{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateConnectionPolicyParams Optional parameters for the method 'UpdateConnectionPolicy' type UpdateConnectionPolicyParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` @@ -1034,40 +1011,40 @@ type UpdateConnectionPolicyParams struct { * @param optional nil or *UpdateConnectionPolicyParams - Optional Parameters: * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. * @return VoiceV1ConnectionPolicy -*/ + */ func (c *DefaultApiService) UpdateConnectionPolicy(Sid string, params *UpdateConnectionPolicyParams) (*VoiceV1ConnectionPolicy, error) { - path := "/v1/ConnectionPolicies/{Sid}" + path := "/v1/ConnectionPolicies/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} + data := url.Values{} + headers := 0 + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &VoiceV1ConnectionPolicy{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VoiceV1ConnectionPolicy{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateConnectionPolicyTargetParams Optional parameters for the method 'UpdateConnectionPolicyTarget' type UpdateConnectionPolicyTargetParams struct { - Enabled *bool `json:"Enabled,omitempty"` + Enabled *bool `json:"Enabled,omitempty"` FriendlyName *string `json:"FriendlyName,omitempty"` - Priority *int32 `json:"Priority,omitempty"` - Target *string `json:"Target,omitempty"` - Weight *int32 `json:"Weight,omitempty"` + Priority *int32 `json:"Priority,omitempty"` + Target *string `json:"Target,omitempty"` + Weight *int32 `json:"Weight,omitempty"` } /* @@ -1081,46 +1058,46 @@ type UpdateConnectionPolicyTargetParams struct { * @param "Target" (string) - The SIP address you want Twilio to route your calls to. This must be a `sip:` schema. `sips` is NOT supported. * @param "Weight" (int32) - The value that determines the relative share of the load the Target should receive compared to other Targets with the same priority. Can be an integer from 1 to 65535, inclusive. Targets with higher values receive more load than those with lower ones with the same priority. * @return VoiceV1ConnectionPolicyConnectionPolicyTarget -*/ + */ func (c *DefaultApiService) UpdateConnectionPolicyTarget(ConnectionPolicySid string, Sid string, params *UpdateConnectionPolicyTargetParams) (*VoiceV1ConnectionPolicyConnectionPolicyTarget, error) { - path := "/v1/ConnectionPolicies/{ConnectionPolicySid}/Targets/{Sid}" + path := "/v1/ConnectionPolicies/{ConnectionPolicySid}/Targets/{Sid}" path = strings.Replace(path, "{"+"ConnectionPolicySid"+"}", ConnectionPolicySid, -1) path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.Enabled != nil { - data.Set("Enabled", fmt.Sprint(*params.Enabled)) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.Priority != nil { - data.Set("Priority", fmt.Sprint(*params.Priority)) -} - if params != nil && params.Target != nil { - data.Set("Target", *params.Target) -} - if params != nil && params.Weight != nil { - data.Set("Weight", fmt.Sprint(*params.Weight)) -} + data := url.Values{} + headers := 0 + if params != nil && params.Enabled != nil { + data.Set("Enabled", fmt.Sprint(*params.Enabled)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Priority != nil { + data.Set("Priority", fmt.Sprint(*params.Priority)) + } + if params != nil && params.Target != nil { + data.Set("Target", *params.Target) + } + if params != nil && params.Weight != nil { + data.Set("Weight", fmt.Sprint(*params.Weight)) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &VoiceV1ConnectionPolicyConnectionPolicyTarget{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VoiceV1ConnectionPolicyConnectionPolicyTarget{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateDialingPermissionsSettingsParams Optional parameters for the method 'UpdateDialingPermissionsSettings' type UpdateDialingPermissionsSettingsParams struct { DialingPermissionsInheritance *bool `json:"DialingPermissionsInheritance,omitempty"` @@ -1132,32 +1109,32 @@ type UpdateDialingPermissionsSettingsParams struct { * @param optional nil or *UpdateDialingPermissionsSettingsParams - Optional Parameters: * @param "DialingPermissionsInheritance" (bool) - `true` for the sub-account to inherit voice dialing permissions from the Master Project; otherwise `false`. * @return VoiceV1DialingPermissionsDialingPermissionsSettings -*/ + */ func (c *DefaultApiService) UpdateDialingPermissionsSettings(params *UpdateDialingPermissionsSettingsParams) (*VoiceV1DialingPermissionsDialingPermissionsSettings, error) { - path := "/v1/Settings" + path := "/v1/Settings" - data := url.Values{} - headers := 0 - - if params != nil && params.DialingPermissionsInheritance != nil { - data.Set("DialingPermissionsInheritance", fmt.Sprint(*params.DialingPermissionsInheritance)) -} + data := url.Values{} + headers := 0 + if params != nil && params.DialingPermissionsInheritance != nil { + data.Set("DialingPermissionsInheritance", fmt.Sprint(*params.DialingPermissionsInheritance)) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &VoiceV1DialingPermissionsDialingPermissionsSettings{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VoiceV1DialingPermissionsDialingPermissionsSettings{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateIpRecordParams Optional parameters for the method 'UpdateIpRecord' type UpdateIpRecordParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` @@ -1169,33 +1146,33 @@ type UpdateIpRecordParams struct { * @param optional nil or *UpdateIpRecordParams - Optional Parameters: * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. * @return VoiceV1IpRecord -*/ + */ func (c *DefaultApiService) UpdateIpRecord(Sid string, params *UpdateIpRecordParams) (*VoiceV1IpRecord, error) { - path := "/v1/IpRecords/{Sid}" + path := "/v1/IpRecords/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} + data := url.Values{} + headers := 0 + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &VoiceV1IpRecord{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VoiceV1IpRecord{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateSourceIpMappingParams Optional parameters for the method 'UpdateSourceIpMapping' type UpdateSourceIpMappingParams struct { SipDomainSid *string `json:"SipDomainSid,omitempty"` @@ -1207,30 +1184,29 @@ type UpdateSourceIpMappingParams struct { * @param optional nil or *UpdateSourceIpMappingParams - Optional Parameters: * @param "SipDomainSid" (string) - The SID of the SIP Domain that the IP Record should be mapped to. * @return VoiceV1SourceIpMapping -*/ + */ func (c *DefaultApiService) UpdateSourceIpMapping(Sid string, params *UpdateSourceIpMappingParams) (*VoiceV1SourceIpMapping, error) { - path := "/v1/SourceIpMappings/{Sid}" + path := "/v1/SourceIpMappings/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.SipDomainSid != nil { - data.Set("SipDomainSid", *params.SipDomainSid) -} + data := url.Values{} + headers := 0 + if params != nil && params.SipDomainSid != nil { + data.Set("SipDomainSid", *params.SipDomainSid) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &VoiceV1SourceIpMapping{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &VoiceV1SourceIpMapping{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } diff --git a/twilio/rest/voice/v1/model_list_byoc_trunk_response.go b/twilio/rest/voice/v1/model_list_byoc_trunk_response.go index 3ec613401..1ba87d3d0 100644 --- a/twilio/rest/voice/v1/model_list_byoc_trunk_response.go +++ b/twilio/rest/voice/v1/model_list_byoc_trunk_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Voice - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Voice + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListByocTrunkResponse struct for ListByocTrunkResponse type ListByocTrunkResponse struct { - ByocTrunks []VoiceV1ByocTrunk `json:"ByocTrunks,omitempty"` - Meta ListByocTrunkResponseMeta `json:"Meta,omitempty"` + ByocTrunks []VoiceV1ByocTrunk `json:"ByocTrunks,omitempty"` + Meta ListByocTrunkResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/voice/v1/model_list_byoc_trunk_response_meta.go b/twilio/rest/voice/v1/model_list_byoc_trunk_response_meta.go index 19c6e52fb..da59c318a 100644 --- a/twilio/rest/voice/v1/model_list_byoc_trunk_response_meta.go +++ b/twilio/rest/voice/v1/model_list_byoc_trunk_response_meta.go @@ -1,22 +1,23 @@ /* - * Twilio - Voice - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Voice + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListByocTrunkResponseMeta struct for ListByocTrunkResponseMeta type ListByocTrunkResponseMeta struct { - FirstPageUrl string `json:"FirstPageUrl,omitempty"` - Key string `json:"Key,omitempty"` - NextPageUrl string `json:"NextPageUrl,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` - Url string `json:"Url,omitempty"` + Url string `json:"Url,omitempty"` } diff --git a/twilio/rest/voice/v1/model_list_connection_policy_response.go b/twilio/rest/voice/v1/model_list_connection_policy_response.go index 24cf1caf4..2d6974a15 100644 --- a/twilio/rest/voice/v1/model_list_connection_policy_response.go +++ b/twilio/rest/voice/v1/model_list_connection_policy_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Voice - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Voice + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListConnectionPolicyResponse struct for ListConnectionPolicyResponse type ListConnectionPolicyResponse struct { ConnectionPolicies []VoiceV1ConnectionPolicy `json:"ConnectionPolicies,omitempty"` - Meta ListByocTrunkResponseMeta `json:"Meta,omitempty"` + Meta ListByocTrunkResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/voice/v1/model_list_connection_policy_target_response.go b/twilio/rest/voice/v1/model_list_connection_policy_target_response.go index 1726cc2e5..42ebf77c7 100644 --- a/twilio/rest/voice/v1/model_list_connection_policy_target_response.go +++ b/twilio/rest/voice/v1/model_list_connection_policy_target_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Voice - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Voice + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListConnectionPolicyTargetResponse struct for ListConnectionPolicyTargetResponse type ListConnectionPolicyTargetResponse struct { - Meta ListByocTrunkResponseMeta `json:"Meta,omitempty"` + Meta ListByocTrunkResponseMeta `json:"Meta,omitempty"` Targets []VoiceV1ConnectionPolicyConnectionPolicyTarget `json:"Targets,omitempty"` } diff --git a/twilio/rest/voice/v1/model_list_dialing_permissions_country_response.go b/twilio/rest/voice/v1/model_list_dialing_permissions_country_response.go index 10aeb5945..d52acae56 100644 --- a/twilio/rest/voice/v1/model_list_dialing_permissions_country_response.go +++ b/twilio/rest/voice/v1/model_list_dialing_permissions_country_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Voice - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Voice + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListDialingPermissionsCountryResponse struct for ListDialingPermissionsCountryResponse type ListDialingPermissionsCountryResponse struct { Content []VoiceV1DialingPermissionsDialingPermissionsCountry `json:"Content,omitempty"` - Meta ListByocTrunkResponseMeta `json:"Meta,omitempty"` + Meta ListByocTrunkResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/voice/v1/model_list_dialing_permissions_hrs_prefixes_response.go b/twilio/rest/voice/v1/model_list_dialing_permissions_hrs_prefixes_response.go index db038acf4..b10db145b 100644 --- a/twilio/rest/voice/v1/model_list_dialing_permissions_hrs_prefixes_response.go +++ b/twilio/rest/voice/v1/model_list_dialing_permissions_hrs_prefixes_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Voice - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Voice + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListDialingPermissionsHrsPrefixesResponse struct for ListDialingPermissionsHrsPrefixesResponse type ListDialingPermissionsHrsPrefixesResponse struct { Content []VoiceV1DialingPermissionsDialingPermissionsCountryDialingPermissionsHrsPrefixes `json:"Content,omitempty"` - Meta ListByocTrunkResponseMeta `json:"Meta,omitempty"` + Meta ListByocTrunkResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/voice/v1/model_list_ip_record_response.go b/twilio/rest/voice/v1/model_list_ip_record_response.go index 8edf9aec8..a153141e8 100644 --- a/twilio/rest/voice/v1/model_list_ip_record_response.go +++ b/twilio/rest/voice/v1/model_list_ip_record_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Voice - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Voice + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListIpRecordResponse struct for ListIpRecordResponse type ListIpRecordResponse struct { - IpRecords []VoiceV1IpRecord `json:"IpRecords,omitempty"` - Meta ListByocTrunkResponseMeta `json:"Meta,omitempty"` + IpRecords []VoiceV1IpRecord `json:"IpRecords,omitempty"` + Meta ListByocTrunkResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/voice/v1/model_list_source_ip_mapping_response.go b/twilio/rest/voice/v1/model_list_source_ip_mapping_response.go index 8e712ff34..40ff6d9c9 100644 --- a/twilio/rest/voice/v1/model_list_source_ip_mapping_response.go +++ b/twilio/rest/voice/v1/model_list_source_ip_mapping_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Voice - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Voice + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListSourceIpMappingResponse struct for ListSourceIpMappingResponse type ListSourceIpMappingResponse struct { - Meta ListByocTrunkResponseMeta `json:"Meta,omitempty"` - SourceIpMappings []VoiceV1SourceIpMapping `json:"SourceIpMappings,omitempty"` + Meta ListByocTrunkResponseMeta `json:"Meta,omitempty"` + SourceIpMappings []VoiceV1SourceIpMapping `json:"SourceIpMappings,omitempty"` } diff --git a/twilio/rest/voice/v1/model_voice_v1_byoc_trunk.go b/twilio/rest/voice/v1/model_voice_v1_byoc_trunk.go index 786bc78e1..5fe758965 100644 --- a/twilio/rest/voice/v1/model_voice_v1_byoc_trunk.go +++ b/twilio/rest/voice/v1/model_voice_v1_byoc_trunk.go @@ -1,18 +1,20 @@ /* - * Twilio - Voice - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Voice + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // VoiceV1ByocTrunk struct for VoiceV1ByocTrunk type VoiceV1ByocTrunk struct { // The SID of the Account that created the resource diff --git a/twilio/rest/voice/v1/model_voice_v1_connection_policy.go b/twilio/rest/voice/v1/model_voice_v1_connection_policy.go index 8ad95325f..33868920b 100644 --- a/twilio/rest/voice/v1/model_voice_v1_connection_policy.go +++ b/twilio/rest/voice/v1/model_voice_v1_connection_policy.go @@ -1,18 +1,20 @@ /* - * Twilio - Voice - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Voice + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // VoiceV1ConnectionPolicy struct for VoiceV1ConnectionPolicy type VoiceV1ConnectionPolicy struct { // The SID of the Account that created the resource diff --git a/twilio/rest/voice/v1/model_voice_v1_connection_policy_connection_policy_target.go b/twilio/rest/voice/v1/model_voice_v1_connection_policy_connection_policy_target.go index 08f5330b5..80316b507 100644 --- a/twilio/rest/voice/v1/model_voice_v1_connection_policy_connection_policy_target.go +++ b/twilio/rest/voice/v1/model_voice_v1_connection_policy_connection_policy_target.go @@ -1,18 +1,20 @@ /* - * Twilio - Voice - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Voice + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // VoiceV1ConnectionPolicyConnectionPolicyTarget struct for VoiceV1ConnectionPolicyConnectionPolicyTarget type VoiceV1ConnectionPolicyConnectionPolicyTarget struct { // The SID of the Account that created the resource diff --git a/twilio/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_country.go b/twilio/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_country.go index bf1e96264..972080ae6 100644 --- a/twilio/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_country.go +++ b/twilio/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_country.go @@ -1,15 +1,16 @@ /* - * Twilio - Voice - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Voice + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // VoiceV1DialingPermissionsDialingPermissionsCountry struct for VoiceV1DialingPermissionsDialingPermissionsCountry type VoiceV1DialingPermissionsDialingPermissionsCountry struct { // The name of the continent in which the country is located diff --git a/twilio/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_country_bulk_update.go b/twilio/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_country_bulk_update.go index f2a9c79b1..809f28ea4 100644 --- a/twilio/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_country_bulk_update.go +++ b/twilio/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_country_bulk_update.go @@ -1,15 +1,16 @@ /* - * Twilio - Voice - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Voice + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // VoiceV1DialingPermissionsDialingPermissionsCountryBulkUpdate struct for VoiceV1DialingPermissionsDialingPermissionsCountryBulkUpdate type VoiceV1DialingPermissionsDialingPermissionsCountryBulkUpdate struct { // The number of countries updated diff --git a/twilio/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_country_dialing_permissions_hrs_prefixes.go b/twilio/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_country_dialing_permissions_hrs_prefixes.go index f120654fa..b8c566076 100644 --- a/twilio/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_country_dialing_permissions_hrs_prefixes.go +++ b/twilio/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_country_dialing_permissions_hrs_prefixes.go @@ -1,15 +1,16 @@ /* - * Twilio - Voice - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Voice + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // VoiceV1DialingPermissionsDialingPermissionsCountryDialingPermissionsHrsPrefixes struct for VoiceV1DialingPermissionsDialingPermissionsCountryDialingPermissionsHrsPrefixes type VoiceV1DialingPermissionsDialingPermissionsCountryDialingPermissionsHrsPrefixes struct { // A prefix that includes the E.164 assigned country code diff --git a/twilio/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_country_instance.go b/twilio/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_country_instance.go index 543c137e3..b53aca6a6 100644 --- a/twilio/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_country_instance.go +++ b/twilio/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_country_instance.go @@ -1,15 +1,16 @@ /* - * Twilio - Voice - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Voice + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // VoiceV1DialingPermissionsDialingPermissionsCountryInstance struct for VoiceV1DialingPermissionsDialingPermissionsCountryInstance type VoiceV1DialingPermissionsDialingPermissionsCountryInstance struct { // The name of the continent in which the country is located diff --git a/twilio/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_settings.go b/twilio/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_settings.go index 86cfe54d5..0f13ad583 100644 --- a/twilio/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_settings.go +++ b/twilio/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_settings.go @@ -1,15 +1,16 @@ /* - * Twilio - Voice - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Voice + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // VoiceV1DialingPermissionsDialingPermissionsSettings struct for VoiceV1DialingPermissionsDialingPermissionsSettings type VoiceV1DialingPermissionsDialingPermissionsSettings struct { // `true` if the sub-account will inherit voice dialing permissions from the Master Project; otherwise `false` diff --git a/twilio/rest/voice/v1/model_voice_v1_ip_record.go b/twilio/rest/voice/v1/model_voice_v1_ip_record.go index e8e166562..e74167da9 100644 --- a/twilio/rest/voice/v1/model_voice_v1_ip_record.go +++ b/twilio/rest/voice/v1/model_voice_v1_ip_record.go @@ -1,18 +1,20 @@ /* - * Twilio - Voice - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Voice + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // VoiceV1IpRecord struct for VoiceV1IpRecord type VoiceV1IpRecord struct { // The SID of the Account that created the resource diff --git a/twilio/rest/voice/v1/model_voice_v1_source_ip_mapping.go b/twilio/rest/voice/v1/model_voice_v1_source_ip_mapping.go index 87f6425c2..9b9399a33 100644 --- a/twilio/rest/voice/v1/model_voice_v1_source_ip_mapping.go +++ b/twilio/rest/voice/v1/model_voice_v1_source_ip_mapping.go @@ -1,18 +1,20 @@ /* - * Twilio - Voice - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Voice + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // VoiceV1SourceIpMapping struct for VoiceV1SourceIpMapping type VoiceV1SourceIpMapping struct { // The RFC 2822 date and time in GMT that the resource was created diff --git a/twilio/rest/wireless/v1/api_default.go b/twilio/rest/wireless/v1/api_default.go index 15e427897..06f792ad3 100644 --- a/twilio/rest/wireless/v1/api_default.go +++ b/twilio/rest/wireless/v1/api_default.go @@ -1,11 +1,11 @@ /* - * Twilio - Wireless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Wireless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,10 +14,11 @@ package openapi import ( "encoding/json" "fmt" - twilio "github.com/twilio/twilio-go/client" "net/url" - "strings" - "time" + "strings" + "time" + + twilio "github.com/twilio/twilio-go/client" ) type DefaultApiService struct { @@ -26,21 +27,21 @@ type DefaultApiService struct { } func NewDefaultApiService(client *twilio.Client) *DefaultApiService { - return &DefaultApiService { - client: client, + return &DefaultApiService{ + client: client, baseURL: "https://wireless.twilio.com", } } // CreateCommandParams Optional parameters for the method 'CreateCommand' type CreateCommandParams struct { - CallbackMethod *string `json:"CallbackMethod,omitempty"` - CallbackUrl *string `json:"CallbackUrl,omitempty"` - Command *string `json:"Command,omitempty"` - CommandMode *string `json:"CommandMode,omitempty"` - DeliveryReceiptRequested *bool `json:"DeliveryReceiptRequested,omitempty"` - IncludeSid *string `json:"IncludeSid,omitempty"` - Sim *string `json:"Sim,omitempty"` + CallbackMethod *string `json:"CallbackMethod,omitempty"` + CallbackUrl *string `json:"CallbackUrl,omitempty"` + Command *string `json:"Command,omitempty"` + CommandMode *string `json:"CommandMode,omitempty"` + DeliveryReceiptRequested *bool `json:"DeliveryReceiptRequested,omitempty"` + IncludeSid *string `json:"IncludeSid,omitempty"` + Sim *string `json:"Sim,omitempty"` } /* @@ -55,63 +56,63 @@ type CreateCommandParams struct { * @param "IncludeSid" (string) - Whether to include the SID of the command in the message body. Can be: `none`, `start`, or `end`, and the default behavior is `none`. When sending a Command to a SIM in text mode, we can automatically include the SID of the Command in the message body, which could be used to ensure that the device does not process the same Command more than once. A value of `start` will prepend the message with the Command SID, and `end` will append it to the end, separating the Command SID from the message body with a space. The length of the Command SID is included in the 160 character limit so the SMS body must be 128 characters or less before the Command SID is included. * @param "Sim" (string) - The `sid` or `unique_name` of the [SIM](https://www.twilio.com/docs/wireless/api/sim-resource) to send the Command to. * @return WirelessV1Command -*/ + */ func (c *DefaultApiService) CreateCommand(params *CreateCommandParams) (*WirelessV1Command, error) { - path := "/v1/Commands" + path := "/v1/Commands" - data := url.Values{} - headers := 0 - - if params != nil && params.CallbackMethod != nil { - data.Set("CallbackMethod", *params.CallbackMethod) -} - if params != nil && params.CallbackUrl != nil { - data.Set("CallbackUrl", *params.CallbackUrl) -} - if params != nil && params.Command != nil { - data.Set("Command", *params.Command) -} - if params != nil && params.CommandMode != nil { - data.Set("CommandMode", *params.CommandMode) -} - if params != nil && params.DeliveryReceiptRequested != nil { - data.Set("DeliveryReceiptRequested", fmt.Sprint(*params.DeliveryReceiptRequested)) -} - if params != nil && params.IncludeSid != nil { - data.Set("IncludeSid", *params.IncludeSid) -} - if params != nil && params.Sim != nil { - data.Set("Sim", *params.Sim) -} + data := url.Values{} + headers := 0 + if params != nil && params.CallbackMethod != nil { + data.Set("CallbackMethod", *params.CallbackMethod) + } + if params != nil && params.CallbackUrl != nil { + data.Set("CallbackUrl", *params.CallbackUrl) + } + if params != nil && params.Command != nil { + data.Set("Command", *params.Command) + } + if params != nil && params.CommandMode != nil { + data.Set("CommandMode", *params.CommandMode) + } + if params != nil && params.DeliveryReceiptRequested != nil { + data.Set("DeliveryReceiptRequested", fmt.Sprint(*params.DeliveryReceiptRequested)) + } + if params != nil && params.IncludeSid != nil { + data.Set("IncludeSid", *params.IncludeSid) + } + if params != nil && params.Sim != nil { + data.Set("Sim", *params.Sim) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &WirelessV1Command{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &WirelessV1Command{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // CreateRatePlanParams Optional parameters for the method 'CreateRatePlan' type CreateRatePlanParams struct { - DataEnabled *bool `json:"DataEnabled,omitempty"` - DataLimit *int32 `json:"DataLimit,omitempty"` - DataMetering *string `json:"DataMetering,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - InternationalRoaming *[]string `json:"InternationalRoaming,omitempty"` - InternationalRoamingDataLimit *int32 `json:"InternationalRoamingDataLimit,omitempty"` - MessagingEnabled *bool `json:"MessagingEnabled,omitempty"` - NationalRoamingDataLimit *int32 `json:"NationalRoamingDataLimit,omitempty"` - NationalRoamingEnabled *bool `json:"NationalRoamingEnabled,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` - VoiceEnabled *bool `json:"VoiceEnabled,omitempty"` + DataEnabled *bool `json:"DataEnabled,omitempty"` + DataLimit *int32 `json:"DataLimit,omitempty"` + DataMetering *string `json:"DataMetering,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + InternationalRoaming *[]string `json:"InternationalRoaming,omitempty"` + InternationalRoamingDataLimit *int32 `json:"InternationalRoamingDataLimit,omitempty"` + MessagingEnabled *bool `json:"MessagingEnabled,omitempty"` + NationalRoamingDataLimit *int32 `json:"NationalRoamingDataLimit,omitempty"` + NationalRoamingEnabled *bool `json:"NationalRoamingEnabled,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` + VoiceEnabled *bool `json:"VoiceEnabled,omitempty"` } /* @@ -129,132 +130,125 @@ type CreateRatePlanParams struct { * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. It can be used in place of the resource's `sid` in the URL to address the resource. * @param "VoiceEnabled" (bool) - Whether SIMs can make and receive voice calls. * @return WirelessV1RatePlan -*/ + */ func (c *DefaultApiService) CreateRatePlan(params *CreateRatePlanParams) (*WirelessV1RatePlan, error) { - path := "/v1/RatePlans" + path := "/v1/RatePlans" - data := url.Values{} - headers := 0 - - if params != nil && params.DataEnabled != nil { - data.Set("DataEnabled", fmt.Sprint(*params.DataEnabled)) -} - if params != nil && params.DataLimit != nil { - data.Set("DataLimit", fmt.Sprint(*params.DataLimit)) -} - if params != nil && params.DataMetering != nil { - data.Set("DataMetering", *params.DataMetering) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.InternationalRoaming != nil { - data.Set("InternationalRoaming", strings.Join(*params.InternationalRoaming, ",")) -} - if params != nil && params.InternationalRoamingDataLimit != nil { - data.Set("InternationalRoamingDataLimit", fmt.Sprint(*params.InternationalRoamingDataLimit)) -} - if params != nil && params.MessagingEnabled != nil { - data.Set("MessagingEnabled", fmt.Sprint(*params.MessagingEnabled)) -} - if params != nil && params.NationalRoamingDataLimit != nil { - data.Set("NationalRoamingDataLimit", fmt.Sprint(*params.NationalRoamingDataLimit)) -} - if params != nil && params.NationalRoamingEnabled != nil { - data.Set("NationalRoamingEnabled", fmt.Sprint(*params.NationalRoamingEnabled)) -} - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) -} - if params != nil && params.VoiceEnabled != nil { - data.Set("VoiceEnabled", fmt.Sprint(*params.VoiceEnabled)) -} + data := url.Values{} + headers := 0 + if params != nil && params.DataEnabled != nil { + data.Set("DataEnabled", fmt.Sprint(*params.DataEnabled)) + } + if params != nil && params.DataLimit != nil { + data.Set("DataLimit", fmt.Sprint(*params.DataLimit)) + } + if params != nil && params.DataMetering != nil { + data.Set("DataMetering", *params.DataMetering) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.InternationalRoaming != nil { + data.Set("InternationalRoaming", strings.Join(*params.InternationalRoaming, ",")) + } + if params != nil && params.InternationalRoamingDataLimit != nil { + data.Set("InternationalRoamingDataLimit", fmt.Sprint(*params.InternationalRoamingDataLimit)) + } + if params != nil && params.MessagingEnabled != nil { + data.Set("MessagingEnabled", fmt.Sprint(*params.MessagingEnabled)) + } + if params != nil && params.NationalRoamingDataLimit != nil { + data.Set("NationalRoamingDataLimit", fmt.Sprint(*params.NationalRoamingDataLimit)) + } + if params != nil && params.NationalRoamingEnabled != nil { + data.Set("NationalRoamingEnabled", fmt.Sprint(*params.NationalRoamingEnabled)) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } + if params != nil && params.VoiceEnabled != nil { + data.Set("VoiceEnabled", fmt.Sprint(*params.VoiceEnabled)) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &WirelessV1RatePlan{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &WirelessV1RatePlan{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * DeleteCommand Method for DeleteCommand * Delete a Command instance from your account. * @param Sid The SID of the Command resource to delete. -*/ -func (c *DefaultApiService) DeleteCommand(Sid string, ) (error) { - path := "/v1/Commands/{Sid}" + */ +func (c *DefaultApiService) DeleteCommand(Sid string) error { + path := "/v1/Commands/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + defer resp.Body.Close() - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() - - return nil + return nil } /* * DeleteRatePlan Method for DeleteRatePlan * @param Sid The SID of the RatePlan resource to delete. -*/ -func (c *DefaultApiService) DeleteRatePlan(Sid string, ) (error) { - path := "/v1/RatePlans/{Sid}" + */ +func (c *DefaultApiService) DeleteRatePlan(Sid string) error { + path := "/v1/RatePlans/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + defer resp.Body.Close() - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() - - return nil + return nil } /* * DeleteSim Method for DeleteSim * Delete a Sim resource on your Account. * @param Sid The SID or the `unique_name` of the Sim resource to delete. -*/ -func (c *DefaultApiService) DeleteSim(Sid string, ) (error) { - path := "/v1/Sims/{Sid}" + */ +func (c *DefaultApiService) DeleteSim(Sid string) error { + path := "/v1/Sims/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + defer resp.Body.Close() - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() - - return nil + return nil } /* @@ -262,58 +256,54 @@ func (c *DefaultApiService) DeleteSim(Sid string, ) (error) { * Fetch a Command instance from your account. * @param Sid The SID of the Command resource to fetch. * @return WirelessV1Command -*/ -func (c *DefaultApiService) FetchCommand(Sid string, ) (*WirelessV1Command, error) { - path := "/v1/Commands/{Sid}" + */ +func (c *DefaultApiService) FetchCommand(Sid string) (*WirelessV1Command, error) { + path := "/v1/Commands/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + defer resp.Body.Close() - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &WirelessV1Command{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &WirelessV1Command{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* * FetchRatePlan Method for FetchRatePlan * @param Sid The SID of the RatePlan resource to fetch. * @return WirelessV1RatePlan -*/ -func (c *DefaultApiService) FetchRatePlan(Sid string, ) (*WirelessV1RatePlan, error) { - path := "/v1/RatePlans/{Sid}" + */ +func (c *DefaultApiService) FetchRatePlan(Sid string) (*WirelessV1RatePlan, error) { + path := "/v1/RatePlans/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - + data := url.Values{} + headers := 0 - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &WirelessV1RatePlan{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &WirelessV1RatePlan{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } /* @@ -321,36 +311,35 @@ func (c *DefaultApiService) FetchRatePlan(Sid string, ) (*WirelessV1RatePlan, er * Fetch a Sim resource on your Account. * @param Sid The SID or the `unique_name` of the Sim resource to fetch. * @return WirelessV1Sim -*/ -func (c *DefaultApiService) FetchSim(Sid string, ) (*WirelessV1Sim, error) { - path := "/v1/Sims/{Sid}" + */ +func (c *DefaultApiService) FetchSim(Sid string) (*WirelessV1Sim, error) { + path := "/v1/Sims/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - + data := url.Values{} + headers := 0 + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() + defer resp.Body.Close() - ps := &WirelessV1Sim{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &WirelessV1Sim{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListAccountUsageRecordParams Optional parameters for the method 'ListAccountUsageRecord' type ListAccountUsageRecordParams struct { - End *time.Time `json:"End,omitempty"` - Start *time.Time `json:"Start,omitempty"` - Granularity *string `json:"Granularity,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + End *time.Time `json:"End,omitempty"` + Start *time.Time `json:"Start,omitempty"` + Granularity *string `json:"Granularity,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -361,48 +350,48 @@ type ListAccountUsageRecordParams struct { * @param "Granularity" (string) - How to summarize the usage by time. Can be: `daily`, `hourly`, or `all`. A value of `all` returns one Usage Record that describes the usage for the entire period. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListAccountUsageRecordResponse -*/ + */ func (c *DefaultApiService) ListAccountUsageRecord(params *ListAccountUsageRecordParams) (*ListAccountUsageRecordResponse, error) { - path := "/v1/UsageRecords" + path := "/v1/UsageRecords" - data := url.Values{} - headers := 0 - - if params != nil && params.End != nil { - data.Set("End", fmt.Sprint(*params.End)) -} - if params != nil && params.Start != nil { - data.Set("Start", fmt.Sprint(*params.Start)) -} - if params != nil && params.Granularity != nil { - data.Set("Granularity", *params.Granularity) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.End != nil { + data.Set("End", fmt.Sprint(*params.End)) + } + if params != nil && params.Start != nil { + data.Set("Start", fmt.Sprint(*params.Start)) + } + if params != nil && params.Granularity != nil { + data.Set("Granularity", *params.Granularity) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListAccountUsageRecordResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListAccountUsageRecordResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListCommandParams Optional parameters for the method 'ListCommand' type ListCommandParams struct { - Sim *string `json:"Sim,omitempty"` - Status *string `json:"Status,omitempty"` + Sim *string `json:"Sim,omitempty"` + Status *string `json:"Status,omitempty"` Direction *string `json:"Direction,omitempty"` Transport *string `json:"Transport,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -415,44 +404,44 @@ type ListCommandParams struct { * @param "Transport" (string) - Only return Commands with this transport value. Can be: `sms` or `ip`. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListCommandResponse -*/ + */ func (c *DefaultApiService) ListCommand(params *ListCommandParams) (*ListCommandResponse, error) { - path := "/v1/Commands" + path := "/v1/Commands" - data := url.Values{} - headers := 0 - - if params != nil && params.Sim != nil { - data.Set("Sim", *params.Sim) -} - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) -} - if params != nil && params.Direction != nil { - data.Set("Direction", *params.Direction) -} - if params != nil && params.Transport != nil { - data.Set("Transport", *params.Transport) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.Sim != nil { + data.Set("Sim", *params.Sim) + } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + if params != nil && params.Direction != nil { + data.Set("Direction", *params.Direction) + } + if params != nil && params.Transport != nil { + data.Set("Transport", *params.Transport) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListCommandResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListCommandResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListDataSessionParams Optional parameters for the method 'ListDataSession' type ListDataSessionParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -464,33 +453,33 @@ type ListDataSessionParams struct { * @param optional nil or *ListDataSessionParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListDataSessionResponse -*/ + */ func (c *DefaultApiService) ListDataSession(SimSid string, params *ListDataSessionParams) (*ListDataSessionResponse, error) { - path := "/v1/Sims/{SimSid}/DataSessions" + path := "/v1/Sims/{SimSid}/DataSessions" path = strings.Replace(path, "{"+"SimSid"+"}", SimSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListDataSessionResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListDataSessionResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListRatePlanParams Optional parameters for the method 'ListRatePlan' type ListRatePlanParams struct { PageSize *int32 `json:"PageSize,omitempty"` @@ -501,40 +490,40 @@ type ListRatePlanParams struct { * @param optional nil or *ListRatePlanParams - Optional Parameters: * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListRatePlanResponse -*/ + */ func (c *DefaultApiService) ListRatePlan(params *ListRatePlanParams) (*ListRatePlanResponse, error) { - path := "/v1/RatePlans" + path := "/v1/RatePlans" - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListRatePlanResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListRatePlanResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListSimParams Optional parameters for the method 'ListSim' type ListSimParams struct { - Status *string `json:"Status,omitempty"` - Iccid *string `json:"Iccid,omitempty"` - RatePlan *string `json:"RatePlan,omitempty"` - EId *string `json:"EId,omitempty"` + Status *string `json:"Status,omitempty"` + Iccid *string `json:"Iccid,omitempty"` + RatePlan *string `json:"RatePlan,omitempty"` + EId *string `json:"EId,omitempty"` SimRegistrationCode *string `json:"SimRegistrationCode,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -548,53 +537,53 @@ type ListSimParams struct { * @param "SimRegistrationCode" (string) - Only return Sim resources with this registration code. This will return a list with a maximum size of 1. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListSimResponse -*/ + */ func (c *DefaultApiService) ListSim(params *ListSimParams) (*ListSimResponse, error) { - path := "/v1/Sims" - - data := url.Values{} - headers := 0 + path := "/v1/Sims" - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) -} - if params != nil && params.Iccid != nil { - data.Set("Iccid", *params.Iccid) -} - if params != nil && params.RatePlan != nil { - data.Set("RatePlan", *params.RatePlan) -} - if params != nil && params.EId != nil { - data.Set("EId", *params.EId) -} - if params != nil && params.SimRegistrationCode != nil { - data.Set("SimRegistrationCode", *params.SimRegistrationCode) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + if params != nil && params.Iccid != nil { + data.Set("Iccid", *params.Iccid) + } + if params != nil && params.RatePlan != nil { + data.Set("RatePlan", *params.RatePlan) + } + if params != nil && params.EId != nil { + data.Set("EId", *params.EId) + } + if params != nil && params.SimRegistrationCode != nil { + data.Set("SimRegistrationCode", *params.SimRegistrationCode) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListSimResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListSimResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // ListUsageRecordParams Optional parameters for the method 'ListUsageRecord' type ListUsageRecordParams struct { - End *time.Time `json:"End,omitempty"` - Start *time.Time `json:"Start,omitempty"` - Granularity *string `json:"Granularity,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` + End *time.Time `json:"End,omitempty"` + Start *time.Time `json:"Start,omitempty"` + Granularity *string `json:"Granularity,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` } /* @@ -606,46 +595,46 @@ type ListUsageRecordParams struct { * @param "Granularity" (string) - How to summarize the usage by time. Can be: `daily`, `hourly`, or `all`. The default is `all`. A value of `all` returns one Usage Record that describes the usage for the entire period. * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. * @return ListUsageRecordResponse -*/ + */ func (c *DefaultApiService) ListUsageRecord(SimSid string, params *ListUsageRecordParams) (*ListUsageRecordResponse, error) { - path := "/v1/Sims/{SimSid}/UsageRecords" + path := "/v1/Sims/{SimSid}/UsageRecords" path = strings.Replace(path, "{"+"SimSid"+"}", SimSid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.End != nil { - data.Set("End", fmt.Sprint(*params.End)) -} - if params != nil && params.Start != nil { - data.Set("Start", fmt.Sprint(*params.Start)) -} - if params != nil && params.Granularity != nil { - data.Set("Granularity", *params.Granularity) -} - if params != nil && params.PageSize != nil { - data.Set("PageSize", fmt.Sprint(*params.PageSize)) -} + data := url.Values{} + headers := 0 + if params != nil && params.End != nil { + data.Set("End", fmt.Sprint(*params.End)) + } + if params != nil && params.Start != nil { + data.Set("Start", fmt.Sprint(*params.Start)) + } + if params != nil && params.Granularity != nil { + data.Set("Granularity", *params.Granularity) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &ListUsageRecordResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &ListUsageRecordResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateRatePlanParams Optional parameters for the method 'UpdateRatePlan' type UpdateRatePlanParams struct { FriendlyName *string `json:"FriendlyName,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` } /* @@ -655,56 +644,56 @@ type UpdateRatePlanParams struct { * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It does not have to be unique. * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. It can be used in place of the resource's `sid` in the URL to address the resource. * @return WirelessV1RatePlan -*/ + */ func (c *DefaultApiService) UpdateRatePlan(Sid string, params *UpdateRatePlanParams) (*WirelessV1RatePlan, error) { - path := "/v1/RatePlans/{Sid}" + path := "/v1/RatePlans/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) -} + data := url.Values{} + headers := 0 + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &WirelessV1RatePlan{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &WirelessV1RatePlan{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } + // UpdateSimParams Optional parameters for the method 'UpdateSim' type UpdateSimParams struct { - AccountSid *string `json:"AccountSid,omitempty"` - CallbackMethod *string `json:"CallbackMethod,omitempty"` - CallbackUrl *string `json:"CallbackUrl,omitempty"` + AccountSid *string `json:"AccountSid,omitempty"` + CallbackMethod *string `json:"CallbackMethod,omitempty"` + CallbackUrl *string `json:"CallbackUrl,omitempty"` CommandsCallbackMethod *string `json:"CommandsCallbackMethod,omitempty"` - CommandsCallbackUrl *string `json:"CommandsCallbackUrl,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - RatePlan *string `json:"RatePlan,omitempty"` - ResetStatus *string `json:"ResetStatus,omitempty"` - SmsFallbackMethod *string `json:"SmsFallbackMethod,omitempty"` - SmsFallbackUrl *string `json:"SmsFallbackUrl,omitempty"` - SmsMethod *string `json:"SmsMethod,omitempty"` - SmsUrl *string `json:"SmsUrl,omitempty"` - Status *string `json:"Status,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` - VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"` - VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` - VoiceMethod *string `json:"VoiceMethod,omitempty"` - VoiceUrl *string `json:"VoiceUrl,omitempty"` + CommandsCallbackUrl *string `json:"CommandsCallbackUrl,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + RatePlan *string `json:"RatePlan,omitempty"` + ResetStatus *string `json:"ResetStatus,omitempty"` + SmsFallbackMethod *string `json:"SmsFallbackMethod,omitempty"` + SmsFallbackUrl *string `json:"SmsFallbackUrl,omitempty"` + SmsMethod *string `json:"SmsMethod,omitempty"` + SmsUrl *string `json:"SmsUrl,omitempty"` + Status *string `json:"Status,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` + VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"` + VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` + VoiceMethod *string `json:"VoiceMethod,omitempty"` + VoiceUrl *string `json:"VoiceUrl,omitempty"` } /* @@ -731,81 +720,80 @@ type UpdateSimParams struct { * @param "VoiceMethod" (string) - The HTTP method we should use when we call `voice_url`. Can be: `GET` or `POST`. * @param "VoiceUrl" (string) - The URL we should call using the `voice_method` when the SIM-connected device makes a voice call. * @return WirelessV1Sim -*/ + */ func (c *DefaultApiService) UpdateSim(Sid string, params *UpdateSimParams) (*WirelessV1Sim, error) { - path := "/v1/Sims/{Sid}" + path := "/v1/Sims/{Sid}" path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) - data := url.Values{} - headers := 0 - - if params != nil && params.AccountSid != nil { - data.Set("AccountSid", *params.AccountSid) -} - if params != nil && params.CallbackMethod != nil { - data.Set("CallbackMethod", *params.CallbackMethod) -} - if params != nil && params.CallbackUrl != nil { - data.Set("CallbackUrl", *params.CallbackUrl) -} - if params != nil && params.CommandsCallbackMethod != nil { - data.Set("CommandsCallbackMethod", *params.CommandsCallbackMethod) -} - if params != nil && params.CommandsCallbackUrl != nil { - data.Set("CommandsCallbackUrl", *params.CommandsCallbackUrl) -} - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) -} - if params != nil && params.RatePlan != nil { - data.Set("RatePlan", *params.RatePlan) -} - if params != nil && params.ResetStatus != nil { - data.Set("ResetStatus", *params.ResetStatus) -} - if params != nil && params.SmsFallbackMethod != nil { - data.Set("SmsFallbackMethod", *params.SmsFallbackMethod) -} - if params != nil && params.SmsFallbackUrl != nil { - data.Set("SmsFallbackUrl", *params.SmsFallbackUrl) -} - if params != nil && params.SmsMethod != nil { - data.Set("SmsMethod", *params.SmsMethod) -} - if params != nil && params.SmsUrl != nil { - data.Set("SmsUrl", *params.SmsUrl) -} - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) -} - if params != nil && params.UniqueName != nil { - data.Set("UniqueName", *params.UniqueName) -} - if params != nil && params.VoiceFallbackMethod != nil { - data.Set("VoiceFallbackMethod", *params.VoiceFallbackMethod) -} - if params != nil && params.VoiceFallbackUrl != nil { - data.Set("VoiceFallbackUrl", *params.VoiceFallbackUrl) -} - if params != nil && params.VoiceMethod != nil { - data.Set("VoiceMethod", *params.VoiceMethod) -} - if params != nil && params.VoiceUrl != nil { - data.Set("VoiceUrl", *params.VoiceUrl) -} + data := url.Values{} + headers := 0 + if params != nil && params.AccountSid != nil { + data.Set("AccountSid", *params.AccountSid) + } + if params != nil && params.CallbackMethod != nil { + data.Set("CallbackMethod", *params.CallbackMethod) + } + if params != nil && params.CallbackUrl != nil { + data.Set("CallbackUrl", *params.CallbackUrl) + } + if params != nil && params.CommandsCallbackMethod != nil { + data.Set("CommandsCallbackMethod", *params.CommandsCallbackMethod) + } + if params != nil && params.CommandsCallbackUrl != nil { + data.Set("CommandsCallbackUrl", *params.CommandsCallbackUrl) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.RatePlan != nil { + data.Set("RatePlan", *params.RatePlan) + } + if params != nil && params.ResetStatus != nil { + data.Set("ResetStatus", *params.ResetStatus) + } + if params != nil && params.SmsFallbackMethod != nil { + data.Set("SmsFallbackMethod", *params.SmsFallbackMethod) + } + if params != nil && params.SmsFallbackUrl != nil { + data.Set("SmsFallbackUrl", *params.SmsFallbackUrl) + } + if params != nil && params.SmsMethod != nil { + data.Set("SmsMethod", *params.SmsMethod) + } + if params != nil && params.SmsUrl != nil { + data.Set("SmsUrl", *params.SmsUrl) + } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } + if params != nil && params.VoiceFallbackMethod != nil { + data.Set("VoiceFallbackMethod", *params.VoiceFallbackMethod) + } + if params != nil && params.VoiceFallbackUrl != nil { + data.Set("VoiceFallbackUrl", *params.VoiceFallbackUrl) + } + if params != nil && params.VoiceMethod != nil { + data.Set("VoiceMethod", *params.VoiceMethod) + } + if params != nil && params.VoiceUrl != nil { + data.Set("VoiceUrl", *params.VoiceUrl) + } - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } - defer resp.Body.Close() + defer resp.Body.Close() - ps := &WirelessV1Sim{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } + ps := &WirelessV1Sim{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } - return ps, err + return ps, err } diff --git a/twilio/rest/wireless/v1/model_list_account_usage_record_response.go b/twilio/rest/wireless/v1/model_list_account_usage_record_response.go index 550c96479..f5283d8ef 100644 --- a/twilio/rest/wireless/v1/model_list_account_usage_record_response.go +++ b/twilio/rest/wireless/v1/model_list_account_usage_record_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Wireless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Wireless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListAccountUsageRecordResponse struct for ListAccountUsageRecordResponse type ListAccountUsageRecordResponse struct { - Meta ListCommandResponseMeta `json:"Meta,omitempty"` + Meta ListCommandResponseMeta `json:"Meta,omitempty"` UsageRecords []WirelessV1AccountUsageRecord `json:"UsageRecords,omitempty"` } diff --git a/twilio/rest/wireless/v1/model_list_command_response.go b/twilio/rest/wireless/v1/model_list_command_response.go index ae941718c..d8ddc9845 100644 --- a/twilio/rest/wireless/v1/model_list_command_response.go +++ b/twilio/rest/wireless/v1/model_list_command_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Wireless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Wireless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListCommandResponse struct for ListCommandResponse type ListCommandResponse struct { - Commands []WirelessV1Command `json:"Commands,omitempty"` - Meta ListCommandResponseMeta `json:"Meta,omitempty"` + Commands []WirelessV1Command `json:"Commands,omitempty"` + Meta ListCommandResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/wireless/v1/model_list_command_response_meta.go b/twilio/rest/wireless/v1/model_list_command_response_meta.go index ff491616d..011765a82 100644 --- a/twilio/rest/wireless/v1/model_list_command_response_meta.go +++ b/twilio/rest/wireless/v1/model_list_command_response_meta.go @@ -1,22 +1,23 @@ /* - * Twilio - Wireless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Wireless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListCommandResponseMeta struct for ListCommandResponseMeta type ListCommandResponseMeta struct { - FirstPageUrl string `json:"FirstPageUrl,omitempty"` - Key string `json:"Key,omitempty"` - NextPageUrl string `json:"NextPageUrl,omitempty"` - Page int32 `json:"Page,omitempty"` - PageSize int32 `json:"PageSize,omitempty"` + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` - Url string `json:"Url,omitempty"` + Url string `json:"Url,omitempty"` } diff --git a/twilio/rest/wireless/v1/model_list_data_session_response.go b/twilio/rest/wireless/v1/model_list_data_session_response.go index 3e7739762..58bf518ac 100644 --- a/twilio/rest/wireless/v1/model_list_data_session_response.go +++ b/twilio/rest/wireless/v1/model_list_data_session_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Wireless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Wireless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListDataSessionResponse struct for ListDataSessionResponse type ListDataSessionResponse struct { DataSessions []WirelessV1SimDataSession `json:"DataSessions,omitempty"` - Meta ListCommandResponseMeta `json:"Meta,omitempty"` + Meta ListCommandResponseMeta `json:"Meta,omitempty"` } diff --git a/twilio/rest/wireless/v1/model_list_rate_plan_response.go b/twilio/rest/wireless/v1/model_list_rate_plan_response.go index de1afd13a..76bd96621 100644 --- a/twilio/rest/wireless/v1/model_list_rate_plan_response.go +++ b/twilio/rest/wireless/v1/model_list_rate_plan_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Wireless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Wireless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListRatePlanResponse struct for ListRatePlanResponse type ListRatePlanResponse struct { - Meta ListCommandResponseMeta `json:"Meta,omitempty"` - RatePlans []WirelessV1RatePlan `json:"RatePlans,omitempty"` + Meta ListCommandResponseMeta `json:"Meta,omitempty"` + RatePlans []WirelessV1RatePlan `json:"RatePlans,omitempty"` } diff --git a/twilio/rest/wireless/v1/model_list_sim_response.go b/twilio/rest/wireless/v1/model_list_sim_response.go index 0b22d29a5..198f63469 100644 --- a/twilio/rest/wireless/v1/model_list_sim_response.go +++ b/twilio/rest/wireless/v1/model_list_sim_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Wireless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Wireless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListSimResponse struct for ListSimResponse type ListSimResponse struct { Meta ListCommandResponseMeta `json:"Meta,omitempty"` - Sims []WirelessV1Sim `json:"Sims,omitempty"` + Sims []WirelessV1Sim `json:"Sims,omitempty"` } diff --git a/twilio/rest/wireless/v1/model_list_usage_record_response.go b/twilio/rest/wireless/v1/model_list_usage_record_response.go index 0bb1b1f86..d61fa0f41 100644 --- a/twilio/rest/wireless/v1/model_list_usage_record_response.go +++ b/twilio/rest/wireless/v1/model_list_usage_record_response.go @@ -1,17 +1,18 @@ /* - * Twilio - Wireless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Wireless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // ListUsageRecordResponse struct for ListUsageRecordResponse type ListUsageRecordResponse struct { - Meta ListCommandResponseMeta `json:"Meta,omitempty"` + Meta ListCommandResponseMeta `json:"Meta,omitempty"` UsageRecords []WirelessV1SimUsageRecord `json:"UsageRecords,omitempty"` } diff --git a/twilio/rest/wireless/v1/model_wireless_v1_account_usage_record.go b/twilio/rest/wireless/v1/model_wireless_v1_account_usage_record.go index b9a99abd8..f21cbbaba 100644 --- a/twilio/rest/wireless/v1/model_wireless_v1_account_usage_record.go +++ b/twilio/rest/wireless/v1/model_wireless_v1_account_usage_record.go @@ -1,15 +1,16 @@ /* - * Twilio - Wireless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Wireless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // WirelessV1AccountUsageRecord struct for WirelessV1AccountUsageRecord type WirelessV1AccountUsageRecord struct { // The SID of the Account that created the resource diff --git a/twilio/rest/wireless/v1/model_wireless_v1_command.go b/twilio/rest/wireless/v1/model_wireless_v1_command.go index 0d9597768..7099c10e9 100644 --- a/twilio/rest/wireless/v1/model_wireless_v1_command.go +++ b/twilio/rest/wireless/v1/model_wireless_v1_command.go @@ -1,18 +1,20 @@ /* - * Twilio - Wireless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Wireless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // WirelessV1Command struct for WirelessV1Command type WirelessV1Command struct { // The SID of the Account that created the resource diff --git a/twilio/rest/wireless/v1/model_wireless_v1_rate_plan.go b/twilio/rest/wireless/v1/model_wireless_v1_rate_plan.go index 84972fa98..c987f3933 100644 --- a/twilio/rest/wireless/v1/model_wireless_v1_rate_plan.go +++ b/twilio/rest/wireless/v1/model_wireless_v1_rate_plan.go @@ -1,18 +1,20 @@ /* - * Twilio - Wireless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Wireless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // WirelessV1RatePlan struct for WirelessV1RatePlan type WirelessV1RatePlan struct { // The SID of the Account that created the resource diff --git a/twilio/rest/wireless/v1/model_wireless_v1_sim.go b/twilio/rest/wireless/v1/model_wireless_v1_sim.go index 21e8469ab..74b8a206d 100644 --- a/twilio/rest/wireless/v1/model_wireless_v1_sim.go +++ b/twilio/rest/wireless/v1/model_wireless_v1_sim.go @@ -1,18 +1,20 @@ /* - * Twilio - Wireless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Wireless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // WirelessV1Sim struct for WirelessV1Sim type WirelessV1Sim struct { // The SID of the Account to which the Sim resource belongs diff --git a/twilio/rest/wireless/v1/model_wireless_v1_sim_data_session.go b/twilio/rest/wireless/v1/model_wireless_v1_sim_data_session.go index 631897564..40df0f18a 100644 --- a/twilio/rest/wireless/v1/model_wireless_v1_sim_data_session.go +++ b/twilio/rest/wireless/v1/model_wireless_v1_sim_data_session.go @@ -1,18 +1,20 @@ /* - * Twilio - Wireless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Wireless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + import ( "time" ) + // WirelessV1SimDataSession struct for WirelessV1SimDataSession type WirelessV1SimDataSession struct { // The SID of the Account that created the resource diff --git a/twilio/rest/wireless/v1/model_wireless_v1_sim_usage_record.go b/twilio/rest/wireless/v1/model_wireless_v1_sim_usage_record.go index 06b0e62d6..35db06e8e 100644 --- a/twilio/rest/wireless/v1/model_wireless_v1_sim_usage_record.go +++ b/twilio/rest/wireless/v1/model_wireless_v1_sim_usage_record.go @@ -1,15 +1,16 @@ /* - * Twilio - Wireless - * - * This is the public Twilio REST API. - * - * API version: 1.10.0 - * Contact: support@twilio.com -*/ + * Twilio - Wireless + * + * This is the public Twilio REST API. + * + * API version: 1.10.0 + * Contact: support@twilio.com + */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi + // WirelessV1SimUsageRecord struct for WirelessV1SimUsageRecord type WirelessV1SimUsageRecord struct { // The SID of the Account that created the resource